DSPRelated.com
Forums

spectral estimation question

Started by Randy Yates April 2, 2006
Ron N. wrote:
> Randy Yates wrote: > >>OK, here's one of those "This should be simple..." questions. >> >>We know that many (all?) methods of spectral estimation of >>discrete-time data rely fundamentally on the DFT (the N-point DFT). >> >>However, the output of a specific bin of the DFT can be viewed as a >>bandpass filter. This DFT bandpass filter is not particularly "good," >>i.e., it has high side lobes and poor stop-band rejection. >> >>So, how do we ever get a good spectral estimate using such inherently >>poor filters? > > > Note that some of the better methods of spectral estimation do not > use a single poor quality bandpass filter (one DFT or FFT bin), but > several of them together (say 3 adjacent bins for some interpolation > scheme, parabolic, triangular, inverse sinc, etc.) The frequency > information content of multiple bin filters can be interpreted as an > intermediate stage of a filter with better bandpass characteristics. > With all N bins, the information is complete and the data can be > reconstructed for use inside any filter. Less than N bins and the > spectral information is "concentrated" by the basis transform so > that most of some frequency component is in a lesser number of bins > than the total number of samples.
Consider the three optical bandpass filters that are the three sensor pigments in the eye. They are very broad and overlap almost completely. Processing allows very fine color discrimination nonetheless, but the whole scheme is subject to striking illusions when the brain's assumed conditions aren't met. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins <jya@ieee.org> writes:

> Ron N. wrote: >> Randy Yates wrote: >> >>>OK, here's one of those "This should be simple..." questions. >>> >>>We know that many (all?) methods of spectral estimation of >>>discrete-time data rely fundamentally on the DFT (the N-point DFT). >>> >>>However, the output of a specific bin of the DFT can be viewed as a >>>bandpass filter. This DFT bandpass filter is not particularly "good," >>>i.e., it has high side lobes and poor stop-band rejection. >>> >>>So, how do we ever get a good spectral estimate using such inherently >>>poor filters? >> Note that some of the better methods of spectral estimation do not >> use a single poor quality bandpass filter (one DFT or FFT bin), but >> several of them together (say 3 adjacent bins for some interpolation >> scheme, parabolic, triangular, inverse sinc, etc.) The frequency >> information content of multiple bin filters can be interpreted as an >> intermediate stage of a filter with better bandpass characteristics. >> With all N bins, the information is complete and the data can be >> reconstructed for use inside any filter. Less than N bins and the >> spectral information is "concentrated" by the basis transform so >> that most of some frequency component is in a lesser number of bins >> than the total number of samples. > > Consider the three optical bandpass filters that are the three sensor > pigments in the eye. They are very broad and overlap almost > completely. Processing allows very fine color discrimination > nonetheless, but the whole scheme is subject to striking illusions > when the brain's assumed conditions aren't met.
That's a brilliant analogy, Jerry. (I'm not joking, and no pun intended!) -- % Randy Yates % "She's sweet on Wagner-I think she'd die for Beethoven. %% Fuquay-Varina, NC % She love the way Puccini lays down a tune, and %%% 919-577-9882 % Verdi's always creepin' from her room." %%%% <yates@ieee.org> % "Rockaria", *A New World Record*, ELO http://home.earthlink.net/~yatescr
Fred Marshall wrote:
> > OK, now say we had a magic spectrum analyzer that gave us an EXACT > > spectrum of the signal, and assume that this exact spectrum has > > a spike at \pi/20 rad/s and another at \pi/5 rad/s. > > OK, well is this a continuous spectrum analyzer or a discrete spectrum > analyzer? > I will assume continous for now.... > And, I will assume that there are corresponding spikes at negative > frequencies just to keep things simple and the time domain function real. > In that case, the signal can't have the spectrum you describe because there > will be nonzero samples outside the 1024 samples.
I think you've defined "spectrum" at the output of an FT. If the magic spectrum analyzer did piecewise sinusiodal fragment curve fitting of some sort, as one would when eye-balling a signal, then it might so report the spectrum as given. What if you consider these spikes in a time limited signal as the "true" spectrum, and the output of the FT as the result which is slightly "flawed" instead? Yes, you could consider a dual sync "spatter" as the true spectrum, but that would be at odds with the practice of using a description with the highest information density relative to the data and problem at hand. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
"Ron N." <rhnlogic@yahoo.com> wrote in message 
news:1144124356.378719.100790@i40g2000cwc.googlegroups.com...
> Fred Marshall wrote: >> > OK, now say we had a magic spectrum analyzer that gave us an EXACT >> > spectrum of the signal, and assume that this exact spectrum has >> > a spike at \pi/20 rad/s and another at \pi/5 rad/s. >> >> OK, well is this a continuous spectrum analyzer or a discrete spectrum >> analyzer? >> I will assume continous for now.... >> And, I will assume that there are corresponding spikes at negative >> frequencies just to keep things simple and the time domain function real. >> In that case, the signal can't have the spectrum you describe because >> there >> will be nonzero samples outside the 1024 samples. > > I think you've defined "spectrum" at the output of an FT.
If you mean the output of an infinite, continous Fourier Transform then, yes. How else?
> If the magic spectrum analyzer did piecewise sinusiodal fragment > curve fitting of some sort, as one would when eye-balling a > signal, then it might so report the spectrum as given.
I have no idea what you mean by "piecewise sinusoidal fragment curve fitting". When "eye-balling a signal" we usually do it in the time domain. Otherwise we aren't eye-balling the signal but a mapping of it in some other domain - like frequency. But here you're referring to the output of a magic spectrum analyzer.
>What if > you consider these spikes in a time limited signal as the "true" > spectrum, and the output of the FT as the result which is > slightly "flawed" instead?
Spikes in time are a spectrum..... oh my! This is really a troll isn't it?
> > Yes, you could consider a dual sync "spatter" as the true > spectrum, but that would be at odds with the practice of > using a description with the highest information density > relative to the data and problem at hand.
Totally lost.....
Fred Marshall wrote:
> "Ron N." <rhnlogic@yahoo.com> wrote in message > news:1144124356.378719.100790@i40g2000cwc.googlegroups.com... > > Fred Marshall wrote: > >> > OK, now say we had a magic spectrum analyzer that gave us an EXACT > >> > spectrum of the signal, and assume that this exact spectrum has > >> > a spike at \pi/20 rad/s and another at \pi/5 rad/s. > >> > >> OK, well is this a continuous spectrum analyzer or a discrete spectrum > >> analyzer? > >> I will assume continous for now.... > >> And, I will assume that there are corresponding spikes at negative > >> frequencies just to keep things simple and the time domain function real. > >> In that case, the signal can't have the spectrum you describe because > >> there > >> will be nonzero samples outside the 1024 samples. > > > > I think you've defined "spectrum" at the output of an FT. > > If you mean the output of an infinite, continous Fourier Transform then, > yes. > How else? > > > If the magic spectrum analyzer did piecewise sinusiodal fragment > > curve fitting of some sort, as one would when eye-balling a > > signal, then it might so report the spectrum as given. > > I have no idea what you mean by "piecewise sinusoidal fragment curve > fitting". > When "eye-balling a signal" we usually do it in the time domain. Otherwise > we aren't eye-balling the signal but a mapping of it in some other domain - > like frequency. > But here you're referring to the output of a magic spectrum analyzer. > > >What if > > you consider these spikes in a time limited signal as the "true" > > spectrum, and the output of the FT as the result which is > > slightly "flawed" instead? > > Spikes in time are a spectrum..... oh my!
The spikes at pi/20 and pi/5 mentioned above. Did you lose the top of this post? Why can't these be called the spectrum? (Of the time limited signal fragment.) Then call the FT results something else since they are obvious contaminated by a windowing instead of using some sort of intelligent analytic continuation that is closer to what is done "by inspection".
> This is really a troll isn't it?
Depends if you think one has to follow some party-line in order not to be trolling. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
>"Fred Marshall" <fmarshallx@remove_the_x.acm.org> writes: > >> "Randy Yates" <yates@ieee.org> wrote in message >> news:m3fykvom5y.fsf@ieee.org... >>> OK, here's one of those "This should be simple..." questions. >>> >>> We know that many (all?) methods of spectral estimation of >>> discrete-time data rely fundamentally on the DFT (the N-point DFT). >>> >>> However, the output of a specific bin of the DFT can be viewed as a >>> bandpass filter. This DFT bandpass filter is not particularly "good," >>> i.e., it has high side lobes and poor stop-band rejection. >>> >>> So, how do we ever get a good spectral estimate using such inherently >>> poor filters? >>> >>> Now I'm pretty sure someone's going to bring up windowing, but in my >>> view windowing is a technique to tradeoff resolution and out-of-band >>> rejection due to the finite-extent of the data. The problem with DFT >>> lobes is separate. I think... >> >> Randy, >> >> Not different. > >I think it is. > >Try this gedanken: We have a length of 1024 points of data that >represent an entire, complete signal. That is, those 1024 points don't >need to be windowed. We can even assume that several samples near the >endpoints are already zero, and that this is part of the original data >and not any result of windowing. > >OK, now say we had a magic spectrum analyzer that gave us an EXACT >spectrum of the signal, and assume that this exact spectrum has >a spike at \pi/20 rad/s and another at \pi/5 rad/s. > >If we run this signal through a 1024-point FFT, then, due to those >blasted lousy bandpass filters, not only does the spike at \pi/5 rad/s >show up in (I'll just pick a bin) bin 500, but also a little bit of >the energy from the spike at \pi/20. > >So the FFT's spectrum result at bin 500 has an error in it that isn't >a result of windowing but rather of the FFT's poor bandpass filters. > >Now instead of FFT bins, imagine we input the signal into 1024 >bandpass filters with REALLY good stop-band characteristics. Now >the 500th filter shows (practically) only the energy from the >spike at \pi/5 and none of that from the spike at \pi/20. > >Where is my error (if there is one)? >-- >% Randy Yates % "Rollin' and riding and slippin' and >%% Fuquay-Varina, NC % sliding, it's magic." >%%% 919-577-9882 % >%%%% <yates@ieee.org> % 'Living' Thing', *A New World Record*,
ELO
>http://home.earthlink.net/~yatescr >
From my understanding, the DFT assumes periodicity of the input waveform. Therefore, for the purposes of the DFT, your 1024 point data set is in fact windowed because it omits the periodic extension of your input. If you were to increase N by zero-padding your input, your bin width would decrease, i.e., the DFT bin bandpass filters would be narrower. Eric
Randy Yates wrote:
> Jerry Avins <jya@ieee.org> writes: > > > Ron N. wrote: > >> Randy Yates wrote: > >> > >>>OK, here's one of those "This should be simple..." questions. > >>> > >>>We know that many (all?) methods of spectral estimation of > >>>discrete-time data rely fundamentally on the DFT (the N-point DFT). > >>> > >>>However, the output of a specific bin of the DFT can be viewed as a > >>>bandpass filter. This DFT bandpass filter is not particularly "good," > >>>i.e., it has high side lobes and poor stop-band rejection. > >>>
There has been a lot of discussion about the assumed finite time duration of the input time domain data fundamentally implying a limited resolution in the output in the frequency domain. Also if we assume the input data is repetitive we can improve the output frequency resolution. OK Good. Yes we can improve the resolution of the DFT by making each bin narrower. But I was hoping to see some discussion about improving the SHAPE FACTOR of the DFT bin filters, i.e. making the skirts steeper for a given passband bandwidth. I think that was what Randy was getting at with his original question. The SHAPE FACTOR of the DFT bins is fixed. But if we were making individual filters instead of using the DFT, we could use "better" filters ...here better does not just mean narrower, but instead better means with a better SHAPE FACTOR. thanks Mark
Fred Marshall wrote:

   ...

> Totally lost.....
You, or Ron? :-( 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;
"Ron N." <rhnlogic@yahoo.com> wrote in message 
news:1144139621.335475.152090@i40g2000cwc.googlegroups.com...
> Fred Marshall wrote: >> "Ron N." <rhnlogic@yahoo.com> wrote in message >> news:1144124356.378719.100790@i40g2000cwc.googlegroups.com... >> > Fred Marshall wrote: >> >> > OK, now say we had a magic spectrum analyzer that gave us an EXACT >> >> > spectrum of the signal, and assume that this exact spectrum has >> >> > a spike at \pi/20 rad/s and another at \pi/5 rad/s. >> >> >> >> OK, well is this a continuous spectrum analyzer or a discrete spectrum >> >> analyzer? >> >> I will assume continous for now.... >> >> And, I will assume that there are corresponding spikes at negative >> >> frequencies just to keep things simple and the time domain function >> >> real. >> >> In that case, the signal can't have the spectrum you describe because >> >> there >> >> will be nonzero samples outside the 1024 samples. >> > >> > I think you've defined "spectrum" at the output of an FT. >> >> If you mean the output of an infinite, continous Fourier Transform then, >> yes. >> How else? >> >> > If the magic spectrum analyzer did piecewise sinusiodal fragment >> > curve fitting of some sort, as one would when eye-balling a >> > signal, then it might so report the spectrum as given. >> >> I have no idea what you mean by "piecewise sinusoidal fragment curve >> fitting". >> When "eye-balling a signal" we usually do it in the time domain. >> Otherwise >> we aren't eye-balling the signal but a mapping of it in some other >> domain - >> like frequency. >> But here you're referring to the output of a magic spectrum analyzer. >> >> >What if >> > you consider these spikes in a time limited signal as the "true" >> > spectrum, and the output of the FT as the result which is >> > slightly "flawed" instead? >> >> Spikes in time are a spectrum..... oh my! > > The spikes at pi/20 and pi/5 mentioned above. Did you lose the > top of this post? Why can't these be called the spectrum? (Of the > time limited signal fragment.) Then call the FT results something > else since they are obvious contaminated by a windowing instead > of using some sort of intelligent analytic continuation that is closer > to what is done "by inspection".
OK. Well, I'm a bit of a stickler for language unless it's me doing the talking. :-) Here are a couple of points: You said: It seems perfectly reasonable to call the single frequency, by inspection, of a time limited non-periodic signal as simply its frequency. I respond: In the real AND arm-waving world it is reasonable. You gate the output of a very stable sinusoidal generator for a short time. The "frequency" of the sinusoid is clear. But the frequency of the sinusoid and the spectrum of the signal are very different things. There can be no doubt that the sharp edges of the gated sinusoid contribute rich spectral content that is measurable. So, a perfect spectrum analyzer will see that energy. It is there. These are not "theoretical or abstract" components of the signal. Randy said: OK, now say we had a magic spectrum analyzer that gave us an EXACT spectrum of the signal, and assume that this exact spectrum has a spike at \pi/20 rad/s and another at \pi/5 rad/s. I respond: I will paraphrase: What if we consider the described "exact spectrum" made up of two pairs of spikes (to include negative frequency components and keep the time signal real for convenience)? Except for the slight modification of the spikes to pairs of spikes, that's what Randy said above. [If the "exact spectrum" purports to be the continuous, infinite Fourier Transform of a time limited signal but as we shall see below, that cannot be]. [Note that I assert that the continuous, infinite Fourier Transform (the plain old normal Fourier Transform) to be the magic spectrum analyzer. I know of no other. Its resolution is infinitely fine]. ....Now, we call this the "true" spectrum. Then, we call the output of a continuous, infinite Fourier Transform of some time limited time series as a result which is slightly "flawed" instead? This is all about the same thing. It's not the process that makes the spectrum be what it is unless you apply a time-limiting process as we often do in DSP. The latter is a perspective that's unfortunate. First time limit - then process. There is no difference in the spectrum of a naturally-occurring time limited signal and the identical slice of a longer signal that has been time limited by a window or gate. The Fourier Transform itself that *follows* such a construct has no impact on that. Here's an interesting thought experiment: Take any infinite signal and time limit it. The *general* statement is that the spectrum is broadened by virtue of the time limitation imposed - as above. Now take a time limited signal that is defined over infinite time - that is it just has a bunch of zeros at the ends. We can compute its Fourier Transform just fine. It will have a Fourier Transform of infinite extent - we know this. Now, gate the signal in a couple of ways: Case 1: gate it so that all of the time span of the nonzero part is within the gate. There is no impact on the spectrum (the FT) because the edges of the gate "cut" nothing but zeros. There's no spectral energy added. And, the signal isn't made to be shorter than it was. Case 2: gate it so that only 1/2 of the time span of the nonzero part is within the gate. Since we haven't specified the actual signal or the timing of the gate then we can't say "how much" spectral energy is added by the cuts - it will vary. But, in *general* there will be spectral components added - partly because the captured signal is shorter than before. Example: A gated sinsuoid has a sinx/x FT. The same gated sinusoid with a gate 1/2 the width has a sinx/x FT that has the sidelobes of double the width as before. I think we really agree but haven't come to terms with the perspectives yet. Fred

Fred Marshall wrote:
> > "Ron N." <rhnlogic@yahoo.com> wrote in message > news:1144139621.335475.152090@i40g2000cwc.googlegroups.com... > > Fred Marshall wrote: > >> "Ron N." <rhnlogic@yahoo.com> wrote in message > >> news:1144124356.378719.100790@i40g2000cwc.googlegroups.com... > >> > Fred Marshall wrote: > >> >> > OK, now say we had a magic spectrum analyzer that gave us an EXACT > >> >> > spectrum of the signal, and assume that this exact spectrum has > >> >> > a spike at \pi/20 rad/s and another at \pi/5 rad/s. > >> >> > >> >> OK, well is this a continuous spectrum analyzer or a discrete spectrum > >> >> analyzer? > >> >> I will assume continous for now.... > >> >> And, I will assume that there are corresponding spikes at negative > >> >> frequencies just to keep things simple and the time domain function > >> >> real. > >> >> In that case, the signal can't have the spectrum you describe because > >> >> there > >> >> will be nonzero samples outside the 1024 samples. > >> > > >> > I think you've defined "spectrum" at the output of an FT. > >> > >> If you mean the output of an infinite, continous Fourier Transform then, > >> yes. > >> How else? > >> > >> > If the magic spectrum analyzer did piecewise sinusiodal fragment > >> > curve fitting of some sort, as one would when eye-balling a > >> > signal, then it might so report the spectrum as given. > >> > >> I have no idea what you mean by "piecewise sinusoidal fragment curve > >> fitting". > >> When "eye-balling a signal" we usually do it in the time domain. > >> Otherwise > >> we aren't eye-balling the signal but a mapping of it in some other > >> domain - > >> like frequency. > >> But here you're referring to the output of a magic spectrum analyzer. > >> > >> >What if > >> > you consider these spikes in a time limited signal as the "true" > >> > spectrum, and the output of the FT as the result which is > >> > slightly "flawed" instead? > >> > >> Spikes in time are a spectrum..... oh my! > > > > The spikes at pi/20 and pi/5 mentioned above. Did you lose the > > top of this post? Why can't these be called the spectrum? (Of the > > time limited signal fragment.) Then call the FT results something > > else since they are obvious contaminated by a windowing instead > > of using some sort of intelligent analytic continuation that is closer > > to what is done "by inspection". > > OK. Well, I'm a bit of a stickler for language unless it's me doing the > talking. :-) > > Here are a couple of points: > > You said: > > It seems perfectly reasonable to call the single > frequency, by inspection, of a time limited non-periodic signal > as simply its frequency. > > I respond: > > In the real AND arm-waving world it is reasonable. You gate the output of a > very stable sinusoidal generator for a short time. The "frequency" of the > sinusoid is clear. > But the frequency of the sinusoid and the spectrum of the signal are very > different things. > There can be no doubt that the sharp edges of the gated sinusoid contribute > rich spectral content that is measurable. So, a perfect spectrum analyzer > will see that energy.
No not true. This is only true if your gating and sampling functions are "brain dead" which admittedly they most often are. But there is no reason it has to be that way (well there might be reasons in some specific cases but speaking in general). If there is a mechanism for detecting repetition in the signal and modifying the sample rate and length of samples analyzed to match then your objections completely evaporate. Randy's question is based on the assumption that there exists knowledge of what exists outside the 1024 samples. The reasoning goes something like this: what are the chances that the 1024 represents a complete cycle of a repeating wave form in the real world? Well the chances are excellent if the system were to be designed for that. -jim It is there. These are not "theoretical or abstract"
> components of the signal. > > Randy said: > > OK, now say we had a magic spectrum analyzer that gave us an EXACT > spectrum of the signal, and assume that this exact spectrum has > a spike at \pi/20 rad/s and another at \pi/5 rad/s. > > I respond: > > I will paraphrase: > What if we consider the described "exact spectrum" made up of two pairs of > spikes (to include negative frequency components and keep the time signal > real for convenience)? Except for the slight modification of the spikes to > pairs of spikes, that's what Randy said above. > > [If the "exact spectrum" purports to be the continuous, infinite Fourier > Transform of a time limited signal but as we shall see below, that cannot > be]. > [Note that I assert that the continuous, infinite Fourier Transform (the > plain old normal Fourier Transform) to be the magic spectrum analyzer. I > know of no other. Its resolution is infinitely fine]. > > ....Now, we call this the "true" spectrum. > > Then, we call the output of a continuous, infinite Fourier Transform of some > time limited time series as a result which is slightly "flawed" instead? > > This is all about the same thing. > It's not the process that makes the spectrum be what it is unless you apply > a time-limiting process as we often do in DSP. The latter is a perspective > that's unfortunate. > First time limit - then process. > There is no difference in the spectrum of a naturally-occurring time limited > signal and the identical slice of a longer signal that has been time limited > by a window or gate. > The Fourier Transform itself that *follows* such a construct has no impact > on that. > > Here's an interesting thought experiment: > > Take any infinite signal and time limit it. > The *general* statement is that the spectrum is broadened by virtue of the > time limitation imposed - as above. > > Now take a time limited signal that is defined over infinite time - that is > it just has a bunch of zeros at the ends. > We can compute its Fourier Transform just fine. > It will have a Fourier Transform of infinite extent - we know this. > Now, gate the signal in a couple of ways: > > Case 1: gate it so that all of the time span of the nonzero part is within > the gate. > There is no impact on the spectrum (the FT) because the edges of the gate > "cut" nothing but zeros. There's no spectral energy added. And, the signal > isn't made to be shorter than it was. > > Case 2: gate it so that only 1/2 of the time span of the nonzero part is > within the gate. Since we haven't specified the actual signal or the timing > of the gate then we can't say "how much" spectral energy is added by the > cuts - it will vary. But, in *general* there will be spectral components > added - partly because the captured signal is shorter than before. > > Example: A gated sinsuoid has a sinx/x FT. The same gated sinusoid with a > gate 1/2 the width has a sinx/x FT that has the sidelobes of double the > width as before. > > I think we really agree but haven't come to terms with the perspectives yet. > > Fred
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----