DSPRelated.com
Forums

Low freq "analog" of Nyquist? ( possibly naive question )

Started by Richard Owlett July 2, 2003
I understand Nyquist specifying a minimum sampling rate to determine 
the high frequency component of a signal.

What happens at at the other end of the spectrum?

I.E. Is there a minimum time window required?

E.G. If the signal has a significant 1 Hz component and sample window 
was .1 sec with a sample rate of 10 kHz, would an FFT portray the 1 Hz 
component?


Richard Owlett wrote:
> > I understand Nyquist specifying a minimum sampling rate to determine > the high frequency component of a signal. > > What happens at at the other end of the spectrum? > > I.E. Is there a minimum time window required? > > E.G. If the signal has a significant 1 Hz component and sample window > was .1 sec with a sample rate of 10 kHz, would an FFT portray the 1 Hz > component?
Richard, The minimum sampling rate is not chosen to determine the bandwidth of a signal, but rather is determined by the bandwidth to be digitized. Many operations are simplified by a sampling rate that is higher than the Nyquist minimum. Anti-alias and IIR filters become easier to design, for one thing, and throughput delay, so critical for servo systems, can be made smaller. On the other hand, oversampling can force FIR filters to be longer and can choke you with unnecessary data. Jerry -- You know that the outhouse is in the right place if it seems too far in winter and too close in summer. �����������������������������������������������������������������������
Jerry Avins wrote:
> Richard Owlett wrote: > >>I understand Nyquist specifying a minimum sampling rate to determine >>the high frequency component of a signal. >> >>What happens at at the other end of the spectrum? >> >>I.E. Is there a minimum time window required? >> >>E.G. If the signal has a significant 1 Hz component and sample window >>was .1 sec with a sample rate of 10 kHz, would an FFT portray the 1 Hz >>component? > > > Richard, > > The minimum sampling rate is not chosen to determine the bandwidth of a > signal, but rather is determined by the bandwidth to be digitized. > > Many operations are simplified by a sampling rate that is higher than > the Nyquist minimum. Anti-alias and IIR filters become easier to design, > for one thing, and throughput delay, so critical for servo systems, can > be made smaller. On the other hand, oversampling can force FIR filters > to be longer and can choke you with unnecessary data. > > Jerry
Hmm Did I mis-phrase my question? or Am I more lost than I thought? If I have .1 sec of data, can I know anything about anything having a 1 Hz fundamental?
Hi Richard - Actually, Nyquist doesn't have anything to say on this.  The 
sampling theorem refers to essentially infinite sequences.  For your case 
(a short sequence compared to the desired frequency), the limits are 
determined by the analysis technique you use.

For FFTs, the resolution is fixed and, with 0.1 seconds of sample, limited 
to 10 Hz (i.e. will return levels of 10, 20, 30, etc. Hz *only*).  Other, 
more involved techniques may be able to discern your 1Hz signal but you 
have to realize that the signal to noise requirements will be fierce.

Best to you!

Jim Horn, WB9SYN/6
"James Horn" <jimhorn@svn.net> wrote in message
news:vg6fd9ov7a2l97@corp.supernews.com...
> Hi Richard - Actually, Nyquist doesn't have anything to say on this. The > sampling theorem refers to essentially infinite sequences. For your case > (a short sequence compared to the desired frequency), the limits are > determined by the analysis technique you use. > > For FFTs, the resolution is fixed and, with 0.1 seconds of sample, limited > to 10 Hz (i.e. will return levels of 10, 20, 30, etc. Hz *only*). Other, > more involved techniques may be able to discern your 1Hz signal but you > have to realize that the signal to noise requirements will be fierce.
Also, Nyquist doesn't specify the maximum, but the bandwidth. If you are band limited such that all signals are between 25kHz and 35kHz that is a fine 10kHz bandwidth, as is 0Hz to 10kHz. -- glen
Richard Owlett wrote:
> > Jerry Avins wrote: > > Richard Owlett wrote: > > > >>I understand Nyquist specifying a minimum sampling rate to determine > >>the high frequency component of a signal. > >> > >>What happens at at the other end of the spectrum? > >> > >>I.E. Is there a minimum time window required? > >> > >>E.G. If the signal has a significant 1 Hz component and sample window > >>was .1 sec with a sample rate of 10 kHz, would an FFT portray the 1 Hz > >>component? > > > > > > Richard, > > > > The minimum sampling rate is not chosen to determine the bandwidth of a > > signal, but rather is determined by the bandwidth to be digitized. > > > > Many operations are simplified by a sampling rate that is higher than > > the Nyquist minimum. Anti-alias and IIR filters become easier to design, > > for one thing, and throughput delay, so critical for servo systems, can > > be made smaller. On the other hand, oversampling can force FIR filters > > to be longer and can choke you with unnecessary data. > > > > Jerry > > Hmm > Did I mis-phrase my question?
Not necessarily. Maybe I read it wrong. Here's the scoop, assuming that the sampled signal is at baseband: To avoid aliasing, the sampling rate -- that is, the reciprocal of the interval between samples -- has to be twice the highest frequency present in the signal. That's not the highest frequency you care about, but the highest frequency there. (I can show you an exception, but it doesn't change anything.) The sampling rate determines the highest allowable frequency in the signal, and it's up to the implementor to arrange that it be so. The sampled period -- that is, the length of time that the collection of samples represents -- determines the resolution of the FT's spectrum, and hence the lowest frequency that an FT can distinguish from DC.
> or > Am I more lost than I thought?
Probably. We all are.
> > If I have .1 sec of data, can I know anything about anything having a > 1 Hz fundamental?
Not with a Fourier transform. 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;
"Richard Owlett" <rowlett@atlascomm.net> wrote in message
news:vg67rsivcmn27a@corp.supernews.com...
> I understand Nyquist specifying a minimum sampling rate to determine > the high frequency component of a signal. > > What happens at at the other end of the spectrum? > > I.E. Is there a minimum time window required? > > E.G. If the signal has a significant 1 Hz component and sample window > was .1 sec with a sample rate of 10 kHz, would an FFT portray the 1 Hz > component?
"Required" and "portray"? It depends. There's no minimum time window required as such - but your application may require it. If there are no other strong components below 5Hz, then there may be distinguishable energy in the zeroeth frequency sample. The 1Hz component will show up in the zeroeth frequency sample which roughtly covers -5Hz to +5Hz. If the sample epoch happens to straddle a zero point of the 1Hz signal, the output due to the 1Hz signal won't be all that much - because the zeroeth term is the average of the signal in the epoch. At first I thought you were going to ask if there's a Nyquist criterion that's applied to sampling in frequency. The answer is yes. In order to sample in frequency without aliasing, the time domain signal must be time-limited to below 1/df where df is the frequency sample interval. This is the duality property applied to Nyquist's sampling theorem and is analogous to: the frequency domain signal must be band-limited to below 1/(2*dt)=fs/2 where dt is the time sample interval and fs is the sampling frequency in time. The factor of 2 shows up because we consider "bandwidth" to be 1/2 the total bandwidth. If you consider negative frequencies and symmetrical spectra, the "total" bandwidth would be fs. Thus, the difference in the time expression above. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:PwIMa.2136$Jk5.1182785@feed2.centurytel.net...

(snip)

> There's no minimum time window required as such - > but your application may require it. > If there are no other strong components below 5Hz, then there may be > distinguishable energy in the zeroeth frequency sample. The 1Hz component > will show up in the zeroeth frequency sample which roughtly covers -5Hz to > +5Hz. If the sample epoch happens to straddle a zero point of the 1Hz > signal, the output due to the 1Hz signal won't be all that much - because > the zeroeth term is the average of the signal in the epoch.
Well, the way I usually consider finite length Fourier transforms is that the signal is periodic at that length. That is what the result will be if you do an inverse FT on it. If it is periodic at 0.1s, then the components are multiples of 10Hz, and there can't be a 1Hz component. If you have samples over 0.1s, and you don't do a Fourier transform, you can ask different questions. If you know that the signal is the sum of 1Hz, 2Hz, and 3Hz components only, six points will determine the amplitude and phase of those components. Consider a signal, f, sampled over time T, from t=0 to t=T. Assume that f(0)=f(T)=0 for now. All the components must be sine with periods that are multiples of 2T. If it is known to have a maximum frequency component < Fn then the number of possible frequency components is 2 T Fn. A system with 2 T Fn unknowns needs 2 T Fn equations, so 2 T Fn sampling points. 2 T Fn sampling points uniformly distributed over time T are 2 Fn apart. Nyquist doesn't require them to be equally spaced, but the math, including the ability to do a Fourier transform, does. -- glen
"Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:i0LMa.1321$Ey6.785@rwcrnsc52.ops.asp.att.net...
> > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:PwIMa.2136$Jk5.1182785@feed2.centurytel.net... > > (snip) > > > There's no minimum time window required as such - > > but your application may require it. > > If there are no other strong components below 5Hz, then there may be > > distinguishable energy in the zeroeth frequency sample. The 1Hz
component
> > will show up in the zeroeth frequency sample which roughtly covers -5Hz
to
> > +5Hz. If the sample epoch happens to straddle a zero point of the 1Hz > > signal, the output due to the 1Hz signal won't be all that much -
because
> > the zeroeth term is the average of the signal in the epoch. > > Well, the way I usually consider finite length Fourier transforms is that > the signal is periodic at that length. That is what the result will be if > you do an inverse FT on it.
Well, that's correct with suitable modifications: 1) If you consider it to be periodic then you are also defining a *discrete* spectrum. But an (unqualified) Fourier Transform yields a continuous spectrum. 2) Doing an inverse Fourier Transform has nothing to do with it.
> > If it is periodic at 0.1s, then the components are multiples of 10Hz, and > there can't be a 1Hz component.
Correct but not always intuitive. This raises an interesting conundrum that I've seen folks make mistakes with. Try this: Take a sum of sin(2*pi*t) and sin(10*pi*t) so we have a 1Hz sinusoid and a 4.5Hz sinusoid. Presumably this is bandlimited to 4.5Hz and is defined for all time. Take a finite epoch of this function that is 0.1 sec in length. Is the result bandlimited or not? Some would say "yes" because it only has 1Hz and 4.5Hz components. But, your (correct) argument says "no". It has no 1Hz component. And, further, if we decide to make it periodic, which removes no information, then the fundamental frequency will be 10Hz which certainly has no 1Hz or 4.5Hz components in it at all. How can this be? It's because the time limiting action above changed the essential character of the function. It is no longer a function with 1Hz and 4.5Hz discrete components, it is a function with infinite spectral extent. Making it periodic doesn't take away the infinite nature of the extent of the spectrum, it only discretizes the spectrum to correspond with the periodicity. Since you will probably want to sample in time, we can look at it in a different order: Before we do the time limiting, let's sample the temporal function according to Nyquist and chose a sample rate of 100Hz. Now we have a periodic continuous spectrum that repeats at 100Hz intervals and contains the 1Hz and 5Hz components. No sins committed here, yet. Now let's do the time limiting to 0.1 seconds. The result is the same as above. We have 10 samples in the interval and the continuous spectrum is convolved with a 10Hz wide, 100Hz period Dirichlet kernel (a "periodic sinc"). Goodbye 1Hz and 5Hz components once more! This causes spectral aliasing as well. If we go on to make the time segment of 0.1 seconds or 10 samples periodic, then the only thing we do is to make the continuous periodic spectrum into a discrete spectrum with fundamental frequency of 10Hz which corresponds with 10 samples over the 100Hz spectral period.
> > If you have samples over 0.1s, and you don't do a Fourier transform, you
can
> ask different questions. If you know that the signal is the sum of 1Hz, > 2Hz, and 3Hz components only, six points will determine the amplitude and > phase of those components.
Well, yeah but that's not the question here. Totally different thing.
> > Consider a signal, f, sampled over time T, from t=0 to t=T. Assume that > f(0)=f(T)=0 for now. All the components must be sine with periods that
are
> multiples of 2T.
Not yet. You didn't say that this was going to be considered to be one period of a periodic waveform yet. Or, you didn't say that the spectrum would be discrete. For example. You could append zeros for 9.9 seconds and then call that 1 period of 10 seconds, etc. etc. until the function extends from +/- infinity - which is how the Fourier Transform is defined - an integral over that range.
>If it is known to have a maximum frequency component < Fn > then the number of possible frequency components is 2 T Fn. A system with
2
> T Fn unknowns needs 2 T Fn equations, so 2 T Fn sampling points. 2 T Fn > sampling points uniformly distributed over time T are 2 Fn apart.
OK - let's see ... call fs/2>Fn and the temporal epoch length is T divided by the sample interval 1/fs=d so T/d=n samples. You say: a system with 2TFn = 2ndfs/2=ndfs=Tfs unknowns needs Tfs equations, so Tfs sampling points which are uniformly distributed over time T are d=T/n apart - not 2Fn = fs apart. d is dimensioned in seconds and fs is dimensioned in sec^-1. I guess you mean that "a system....." is a system of equations which then conjures up the notion of a basis set. Ok and the equations can be in terms of sin and cos or, alternately, sinc. But this can't be the case for a time-limited continuous function - only a bandlimited one. And we started out with a time-limited one. If you decide to make the time limitation into a period, then that makes the FT discrete but doesn't yet say anything about discrete time yet and the spectrum is of infinite extent still. The final step is to decide to make time discrete. If you do this, you're assuming that the spectrum is periodic and accept whatever aliasing occurs in frequency - because some will occur - the spectrum is discrete but infinite still at this point. Having accepted the spectral aliasing by sampling in time, we finally have discrete, periodic time and discrete, periodic frequency. When you said: "assume that f(0)=f(T)=0" then you denied the later assertion: "it is known to have a maximum frequency component < Fn". Perhaps you didn't mean they were tied together but it seemed so.
> > Nyquist doesn't require them to be equally spaced, but the math, including > the ability to do a Fourier transform, does.
Well, I'm not very agreeable tonight it seems .... The math will support it in two ways. 1) You can take a Fourier transform of any set of samples however they may be spaced, but it would be a regular, continuous, Fourier Transform - not a DFT. 2) If we take the case "maximum frequency component < Fn" then for reconstruction all that's needed are Tfs samples of whatever spacing - until the samples coincide and then you need the sample and k-1 derivatives at the sample point for k samples coinciding - I think that's it anyway. The resulting construction is of infinite temporal extent - perhaps periodic and perhaps not. If it's periodic, then a natural basis set is of sines and cosines. If it's not periodic, then a natural basis set is a family of sincs that are regularly spaced, generally nonzero amplitude inside the span of the samples, and zero amplitude everywhere else. You have to solve for the amplitudes of the regularly spaced sincs which would also be the amplitudes of corresponding regularly spaced samples. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:%cQMa.2283$Jk5.1212136@feed2.centurytel.net...
> > "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message > news:i0LMa.1321$Ey6.785@rwcrnsc52.ops.asp.att.net... > >
(big snip)
> > If you have samples over 0.1s, and you don't do a Fourier > > transform, you can ask different questions. > > If you know that the signal is the sum of 1Hz, > > 2Hz, and 3Hz components only, six points will determine the amplitude
and
> > phase of those components. > > Well, yeah but that's not the question here. Totally different thing.
I wasn't sure of that in the beginning. It only came later.
> > Consider a signal, f, sampled over time T, from t=0 to t=T. Assume that > > f(0)=f(T)=0 for now. All the components must be sine with periods that > >re multiples of 2T. > > Not yet. You didn't say that this was going to be considered to be one > period of a periodic waveform yet. Or, you didn't say that the spectrum > would be discrete.
With f(0) = f(T) = 0 they pretty much have to be. Now, you can argue that it is an arbitrary restriction, but I just said to assume it. f(0)=0 removes all cos() terms. f(T) = sin( w T) = 0 allows only w that are integer multiples of pi/T, a discrete spectrum.
> For example. You could append zeros for 9.9 seconds and then call that 1 > period of 10 seconds, etc. etc. until the function extends from +/- > infinity - which is how the Fourier Transform is defined - an integral
over
> that range.
> >If it is known to have a maximum frequency component < Fn > > then the number of possible frequency components is 2 T Fn. > >system with 2 T Fn unknowns needs 2 T Fn equations, > >2 T Fn sampling points. 2 T Fn sampling points uniformly > > distributed over time T are 2 Fn apart. > > OK - let's see ... call fs/2>Fn and the temporal epoch length is T divided > by the sample interval 1/fs=d so T/d=n samples. > You say: a system with 2TFn = 2ndfs/2=ndfs=Tfs unknowns needs Tfs
equations,
> so Tfs sampling points which are uniformly distributed over time T are
d=T/n
> apart - not 2Fn = fs apart. d is dimensioned in seconds and fs is > dimensioned in sec^-1.
Oops, oh well.
> I guess you mean that "a system....." is a system of equations which then > conjures up the notion of a basis set. Ok and the equations can be in
terms
> of sin and cos or, alternately, sinc. > But this can't be the case for a time-limited continuous function - only a > bandlimited one. And we started out with a time-limited one.
> If you decide to make the time limitation into a period, then that makes
the
> FT discrete but doesn't yet say anything about discrete time yet and the > spectrum is of infinite extent still.
The f(0) = f(T) = 0 makes it periodic. As well as I know it, this is pretty close to the origin of FT's. Consider a vibrational wave on a string, as violin makers did many years ago. The result is a nice simple second order partial differential equation. (Which is hard to write in a newsgroup.) OK, d2f/dt2 = v**2 d2f/dx2 (most of those 2's are superscripts) v**2 comes from the tension in the string and the mass per unit length. The string of length L is tied down at each end. Mathematically, there are two ways to solve such an equation. One way comes out with f(x,y) = A g(x - v t) + B h(x + v t), a sum of waves, of arbitrary shape, going opposite directions. Another way is by separation of variables. f(x,t) = X(x)T(t), which, when substituted into the original PDE gives two separate ODE's whose solutions are sin() and cos(). The requirement that f(0,t) = f(L,t) = 0 (the string is tied) allows only sin() components with period 2 L. So Fourier had two different solutions to the same equation. One said that arbitrary functions with period 2 L (apply the boundary conditions to the first solution), and the other was an infinite sum of sin() with with periods integer fractions of 2 L. Assuming both solutions are valid, this indicates that arbitrary periodic functions can be made up as sums of sin() and cos().
> The final step is to decide to make time discrete. If you do this, you're > assuming that the spectrum is periodic and accept whatever aliasing occurs > in frequency - because some will occur - the spectrum is discrete but > infinite still at this point.
Having fixed the end conditions makes the solutions periodic and the spectrum discrete. Very important to musicians.
> Having accepted the spectral aliasing by sampling in time, we finally have > discrete, periodic time and discrete, periodic frequency.
> When you said: "assume that f(0)=f(T)=0" then you denied the later > assertion: "it is known to have a maximum frequency component < Fn". > Perhaps you didn't mean they were tied together but it seemed so.
I only fixed the function at two points. That doesn't limit the frequency spectrum at all.
> > Nyquist doesn't require them to be equally spaced, but the math,
including
> > the ability to do a Fourier transform, does. > > Well, I'm not very agreeable tonight it seems .... The math will support
it
> in two ways. > > 1) You can take a Fourier transform of any set of samples however they may > be spaced, but it would be a regular, continuous, Fourier Transform - not
a
> DFT.
Maybe I was mixing too many things into the discussion. That was a claim that Nyquist doesn't require uniform sampling. The appropriate number of sample points are mathematically enough, though as an engineering solution they aren't very good. So lets consider a DFT. (I haven't tried this before.) The Fourier series tranforms a periodic function into a discrete series of frequencies. If the source function represents sampled data instead of a continuous function, even with non-uniform sampling, we can still ask what series of sin() and cos() satisfy such samples. If we have N sample points there is no use in asking for more than N frequency components. There is also no restriction to choose the N lowest frequencies. Given N frequencies, periodic with the required period, and N sampling points we can reconstruct the amplitude at those points. Hmm, I don't see any restriction that the sample points be uniformly spaced. The sin() and cos() must be harmonics of the appropriate fundamental, but I can use any N such that I desire. Now, FFT has some uniform requirements, and it is certainly a better way to do it, but I don't see such a restriction on DFT.
> 2) If we take the case "maximum frequency component < Fn" then for > reconstruction all that's needed are Tfs samples of whatever spacing -
until
> the samples coincide and then you need the sample and k-1 derivatives at
the
> sample point for k samples coinciding - I think that's it anyway. The > resulting construction is of infinite temporal extent - perhaps periodic
and
> perhaps not. If it's periodic, then a natural basis set is of sines and > cosines. If it's not periodic, then a natural basis set is a family of > sincs that are regularly spaced, generally nonzero amplitude inside the
span
> of the samples, and zero amplitude everywhere else. You have to solve for > the amplitudes of the regularly spaced sincs which would also be the > amplitudes of corresponding regularly spaced samples.
You need N independent parameters. Yes, they can be values at a point, or some derivative at a point. Though the derivative can be defined in a limit as two points getting closer and closer together. (Just to get farther off the topic, some years ago I was watching the Weather Channel where they give the current temperature. I thought it would also be interesting to know the derivative of the temperature, though they don't give that (that would be a weather forecast!) Then why not also the second derivative, and the third! and the fourth and...) Anyway, sinc() is the FT of rect(), which naturally comes out for problems with finite extent. Also the smoothest function satisfying f(n) =0 for integer n != 0, f(0)=1. Now, if a function is defined to be zero outside a certain range then you have to do such complications as you indicate. But if it is only defined over a certain range, and no restrictions are placed on it otherwise, then periodic solutions over that range will work, and are much easier to work on than they otherwise would be. The displacement of a violin string is only defined over the length of the string. There isn't any point in restricting it outside the length of the string. The air pressure change as recorded by a microphone in a concert hall is only interesting over the length of the concert. It is definitely not zero for all time before and after the concert, and there isn't much point in assuming that it is. -- glen