DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

Relationship of Basis Functions and Sampling Rate

Started by hrh1818 ●October 5, 2009
On Oct 5, 12:33&#4294967295;pm, Rune Allnor <all...@tele.ntnu.no> wrote:
> On 5 Okt, 17:18, hrh1818 <hr...@att.net> wrote: > ... > >&#4294967295;Does the data need to be processed with a > > window to minimize spectral leakage before performing a DFT if the > > sampling rate is an integer multiple of the fundamental and its > > harmonics? > > There might be reasons to do that, but there are no such > requirements what the DFT is concerned.
i know this was controversial with some (and still do not believe it to be intrinsically controversial), but think of the DFT as a mapping of one discrete, infinite, and periodic sequence with period N to another discrete, infinite, and periodic sequence with the same period. and the iDFT does the same thing but maps it back. what this means is that the DFT theoretically periodically extends the finite-lengthed (of length N) sequence that is passed to it. it always "assumes" that the N samples passed to it comprise exactly one periodic of this periodic sequence of period N. so, if the number of samples per period is precisely an integer, N, and that is the same as the DFT length, they effect of yanking out those N numbers and passing those N numbers to the DFT means that the inherent periodic extension that the DFT does changes nothing. if that is not the case, the effect of windowing is what happens when you yank out N samples out of this sequence that is not periodic with period N. r b-j
On Oct 5, 10:51&#4294967295;am, Jerry Avins <j...@ieee.org> wrote:

> > Your use of "basis function" shows that you need to go back and do more > reading. > > The condition for no leakage is more stringent than you suppose. The > samped waveform must include an integer number of cycles of each of its > components frequencies.
Thanks Jerry, You confirmed my suspicion that it is practically impossible to judiciously select the sampling frequency to eliminate the need for a window. For example for the 3, 5, 7, 9, 11, 13, 15, 17, and 19 odd harmonics would require a sampling frequency of 43,648,605 samples per second.to collect an integer number of cycles for all of these odd harmonics. Howard
> > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
hrh1818 <hrhan@att.net> wrote:
(snip)
 
< Thanks Jerry,   You confirmed my suspicion that it is practically
< impossible to judiciously select the sampling frequency to eliminate
< the need for a window.  For example for the  3, 5, 7, 9, 11, 13, 15,
< 17, and 19 odd harmonics would require  a sampling frequency of
< 43,648,605 samples per second.to collect an integer number of cycles
< for all of these  odd harmonics.

Hmmm.  If you sample one cycle of the fundamental that will contain
an integer number of cycles of any harmonic.  I don't see why you
want the LCM of them.  An integer number of samples for the fundamental,
easy with a PLL, hard without one, should do it.  (or, I suppose,
now a DLL or otherwise locking onto the source.)

-- glen
hrh1818 wrote:
> On Oct 5, 10:51 am, Jerry Avins <j...@ieee.org> wrote: > >> Your use of "basis function" shows that you need to go back and do more >> reading. >> >> The condition for no leakage is more stringent than you suppose. The >> samped waveform must include an integer number of cycles of each of its >> components frequencies. > > Thanks Jerry, You confirmed my suspicion that it is practically > impossible to judiciously select the sampling frequency to eliminate > the need for a window. For example for the 3, 5, 7, 9, 11, 13, 15, > 17, and 19 odd harmonics would require a sampling frequency of > 43,648,605 samples per second.to collect an integer number of cycles > for all of these odd harmonics.
Two full cycles of second harmonic fit into one cycle of the fundamental; three cycles of the third, 17 od the 17th, and so on. Every signal to be sampled has to be bandlimited. If your signal contains 25 harmonics, you need to sample somewhat faster than 50 times the fundamental frequency. That's not as bad as you seem to think. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"joepierson" <gkicomputers@yahoo.com> wrote in message 
news:05bc0357-f340-4f19-a7af-c7f3b20a1c5e@m33g2000pri.googlegroups.com...

> http://www.diracdelta.co.uk/science/source/f/l/flattop%20window/source.html#
Always a joy to discover another previously-unknown encyclopaedia ("encyclopedia" to the Yanks) !
On Oct 5, 10:44&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> hrh1818 wrote: > > On Oct 5, 10:51 am, Jerry Avins <j...@ieee.org> wrote: > > >> Your use of "basis function" shows that you need to go back and do more > >> reading. > > >> The condition for no leakage is more stringent than you suppose. The > >> samped waveform must include an integer number of cycles of each of its > >> components frequencies. > > > Thanks Jerry, &#4294967295; You confirmed my suspicion that it is practically > > impossible to judiciously select the sampling frequency to eliminate > > the need for a window. &#4294967295;For example for the &#4294967295;3, 5, 7, 9, 11, 13, 15, > > 17, and 19 odd harmonics would require &#4294967295;a sampling frequency of > > 43,648,605 samples per second.to collect an integer number of cycles > > for all of these &#4294967295;odd harmonics. > > Two full cycles of second harmonic fit into one cycle of the > fundamental; three cycles of the third, 17 od the 17th, and so on. Every > signal to be sampled has to be bandlimited. If your signal contains 25 > harmonics, you need to sample somewhat faster than 50 times the > fundamental frequency. That's not as bad as you seem to think. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry, thanks for keeping me from going off in the wrong direction. There appears to another complication when processes the data with a FFT. That is the need to collect 2^N samples for an integer number of cycles of the fundamental. This means the ratio of sampling frequency to fundamental frequency would need to be: (2^N samples/number of cycles of fundamental frequency in which data is collected) Hence for the application that initiated the original question, spectral analysis of power line current, trying to judiciously select the sampling frequency to avoid the need to window the data adds to much complication. Howard
On Oct 6, 12:39 am, "Phil O. Sopher" <inva...@invalid.invalid> wrote:
> "joepierson" <gkicomput...@yahoo.com> wrote in message > > news:05bc0357-f340-4f19-a7af-c7f3b20a1c5e@m33g2000pri.googlegroups.com... > > >http://www.diracdelta.co.uk/science/source/f/l/flattop%20window/sourc... > > Always a joy to discover another previously-unknown encyclopaedia > ("encyclopedia" to the Yanks) !
It would be a more joyous discovery if they could have gotten something as widely known as the Kaiser-Bessel window right. http://www.diracdelta.co.uk/science/source/k/a/kaiser%20bessel%20window/source.html Dale B. Dalrymple
On Tue, 06 Oct 2009 09:26:29 -0700, hrh1818 wrote:

> On Oct 5, 10:44&nbsp;pm, Jerry Avins <j...@ieee.org> wrote: >> hrh1818 wrote: >> > On Oct 5, 10:51 am, Jerry Avins <j...@ieee.org> wrote: >> >> >> Your use of "basis function" shows that you need to go back and do >> >> more reading. >> >> >> The condition for no leakage is more stringent than you suppose. The >> >> samped waveform must include an integer number of cycles of each of >> >> its components frequencies. >> >> > Thanks Jerry, &nbsp; You confirmed my suspicion that it is practically >> > impossible to judiciously select the sampling frequency to eliminate >> > the need for a window. &nbsp;For example for the &nbsp;3, 5, 7, 9, 11, 13, 15, >> > 17, and 19 odd harmonics would require &nbsp;a sampling frequency of >> > 43,648,605 samples per second.to collect an integer number of cycles >> > for all of these &nbsp;odd harmonics. >> >> Two full cycles of second harmonic fit into one cycle of the >> fundamental; three cycles of the third, 17 od the 17th, and so on. >> Every signal to be sampled has to be bandlimited. If your signal >> contains 25 harmonics, you need to sample somewhat faster than 50 times >> the fundamental frequency. That's not as bad as you seem to think. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr; > > Jerry, thanks for keeping me from going off in the wrong direction. > There appears to another complication when processes the data with a > FFT. That is the need to collect 2^N samples for an integer number of > cycles of the fundamental. This means the ratio of sampling frequency to > fundamental frequency would need to be: (2^N samples/number of cycles of > fundamental frequency in which data is collected) > Hence for the application that initiated the original question, spectral > analysis of power line current, trying to judiciously select the > sampling frequency to avoid the need to window the data adds to much > complication. > > Howard
Eh??? You mentioned the 19th harmonic -- OK, if you want to measure the 19th harmonic energy on a 60Hz power line, you need to sample faster than 2 * 19 * 60. Assuming that you're going to use anti-alias filtering, you probably want to sample at greater than 4 * 19 * 60. Just to make the math easy you can call it 5 * 20 * 60Hz, or 6000kHz sampling. 6kHz ain't all that fast. It's a bit much if you want to do it with a $0.25 processor, but for one or two bucks in quantity you can get a hot- rod 8-bit processor with enough speed to phase lock to the power line, collect 6000 samples, then analyze the sample vector at leisure. -- www.wescottdesign.com
hrh1818 wrote:
> On Oct 5, 10:44 pm, Jerry Avins <j...@ieee.org> wrote: >> hrh1818 wrote: >>> On Oct 5, 10:51 am, Jerry Avins <j...@ieee.org> wrote: >>>> Your use of "basis function" shows that you need to go back and do more >>>> reading. >>>> The condition for no leakage is more stringent than you suppose. The >>>> samped waveform must include an integer number of cycles of each of its >>>> components frequencies. >>> Thanks Jerry, You confirmed my suspicion that it is practically >>> impossible to judiciously select the sampling frequency to eliminate >>> the need for a window. For example for the 3, 5, 7, 9, 11, 13, 15, >>> 17, and 19 odd harmonics would require a sampling frequency of >>> 43,648,605 samples per second.to collect an integer number of cycles >>> for all of these odd harmonics. >> Two full cycles of second harmonic fit into one cycle of the >> fundamental; three cycles of the third, 17 od the 17th, and so on. Every >> signal to be sampled has to be bandlimited. If your signal contains 25 >> harmonics, you need to sample somewhat faster than 50 times the >> fundamental frequency. That's not as bad as you seem to think. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295; > > Jerry, thanks for keeping me from going off in the wrong direction. > There appears to another complication when processes the data with a > FFT. That is the need to collect 2^N samples for an integer number of > cycles of the fundamental. This means the ratio of sampling frequency > to fundamental frequency would need to be: > (2^N samples/number of cycles of fundamental frequency in which data > is collected) > Hence for the application that initiated the original question, > spectral analysis of power line current, trying to judiciously select > the sampling frequency to avoid the need to window the data adds to > much complication.
Windowing isn't so terrible to do, and results without it at arbitrary sampling rates are quite serviceable for many purposes. Still, there's no question that synchronous sampling simplifies the thought process. Most power-line measurements seek to include at least the first 15 harmonics. Because one must sample /faster/ than twice the bandwidth ans synchronous sampling requires an integer ratio, you would sample at 60 times the line frequency. That gives a generous oversample ratio of 2. Personally, I'd work back from the highest sampling raye my system could easily run at, and work back from there to see how many harmonics I could include. An audio ADC running at 48Ksps could synchronously sample 200 harmonics of a 60Hz line. To make the anti-alias filter simple, I'd likely design the system for 50 *potential* harmonics and use however many made sense. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
glen herrmannsfeldt wrote:
> Fred Marshall <fmarshallx@remove_the_xacm.org> wrote: > (snip) > > < I don't like saying "basis functions" when one means a sinusoid in > < particular. There are others including sincs, etc. So, it's best to > < say what you mean. > > The basis functions of the Fourier transforms are sinusoids. > > There is, for example, the Fourier-Bessel transform used in > cylindrical coordinates which has sinusoids for some variables > and bessel functions for the radial basis functions. > > -- glen
Right. And, if that was the context of Smith's book quote then fine. Otherwise the DFT wasn't mentioned in the OP and one can construct using sincs as basis functions just as well as sinusoids - as long as one is dealing with bandlimited or timelimited functions - which is our typical assumption. Fred