🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.dsp
Article #2082

Re: Windows for High Res Spectral Analysis

#2082
From: David Knight
Date: Thu, 21 Jan 1993 19:01
91 lines
4662 bytes

Newsgroups: comp.dsp
Subject: Re: Windows for High Res Spectral Analysis

In article 14930@nstn.ns.ca, tcreasy@fox.nstn.ns.ca (Tim Creasy) writes:
>
>SUMMARY:
>
>I am looking for feedback from the net about applying windows to 
>discrete-time samples for high resolution spectral analysis.  
>I need to resolve a spectrum accurately at more than 90dB 
>below the level of the fundamental signal.
>
>
>THE PROBLEM:
>
>I am testing a 16 bit A-D converter for SNR and Harmonic Distortion.
>This involves appling a spectrally pure sine wave of known frequency 
>to the input, and capturing the digital samples at the output into 
>memory on a single board computer.  Then I perform an FFT, enabling 
>me to analyze the output in the frequency domain.
>
>I soon encountered the problem of spectral leakage.  If there is
>a discontinuity in amplitude between the first and last time sample,
>the fundamental tone does not fall neatly in an FFT bin, but spreads out 
>over a large number of bins, totally obscuring any harmonics at the
>-90dB level and below.

I don't believe that's the fundamental cause of the spread you observe.
The results of an FFT are themselves samples (but in the frequency domain), not
averaged or cumulative frequencies over a bin of frequencies.  As such, all
the potential problems of aliasing and sampling still exist in the frequency
domain just as they do in the time domain.  The fundamental
cause of the spread you notice is primarily a function of the number of
samples you take the FFT of and your window.  To obtain ideal resolution in
the frequency domain, you'd have to use an infinite number of samples.  The
frequency of your signal would have to be constant the entire time it's being
sampled, too.

>
>One way of overcoming this is to phase lock the sinusoidal source to 
>the sampling clock (not possible with my set up), or equivalently,
>truncate the time data so that there remains an integer number of sine 
>waves in the sample interval.  But this is not satisfactory because 
>now the number of time samples is not a power of two, so the Fourier 
>Transform is slow.
>
>The more common way is to multiply the time data by a window before
>performing the FFT.  This effectively makes the input waveform
>(and possibly its derivatives) continuous at its endpoints.  But 
>I know windowing must also have a side effect of distorting the
>output spectrum, especially at the low levels I am talking about.
>Apparently the familiar Hanning and Hamming windows are not good 
>enough for this application.  To date, I have achieved best results 
>with a four-term Blackmann-Harris window.  This is where I need help!
>
>
>QUESTIONS
>
>1. How much distortion can I expect the Blackmann-Harris window to 
>   put into my resulting spectrum?  Will the levels of the harmonics
>   be affected?  Can I trust it at the -90 to -100dB level?

I don't think you can trust it at those levels.  I don't have my copy of
Discrete Time Signal Processing, by Oppenheim and Shafer, handy, but I believe
they have a chart comparing the Hamming, Hanning, Blackman, & some Kaiser
windows.

>
>2. Are there better windows to use?  (I have never seen anyone mention
>   5 or 6-term windows, but I can't see why they wouldn't exist AND
>   be better than the 3 or 4 term variety.  More computing power is 
>   not a big issue here.)

My impression is that a Kaiser window could be preferable.  See Discrete Time
Signal Processing.  There are two main issues of window selection: resolution
and spectral leakage.  The Kaiser window allows you to independently control
both, given that you can also choose the number of samples that you take your
FFT over.

>[...]

Hope this helps,
-- Dave Knight, david@osc.edu

(Disclaimer: I'm just learning this stuff myself, so if I've made any errors
understand that I'm not passing myself off as an expert.  I'd be interested in
reading any corrections.  I think it's safe to suggest that you take a look at
"Discrete Time Signal Processing," though.  It has hints about programming a
Kaiser window as well as selecting its parameters, too.)
Technical Details
Message-ID: <1993Jan21.190124.25163@cgrg.ohio-state.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mane.cgrg.ohio-state.edu!conan!david
References: <1jm5euINN5up@rave.larc.nasa.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.dsp
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mane.cgrg.ohio-state.edu!conan!david
From: david@osc.edu (David Knight)
Subject: Re: Windows for High Res Spectral Analysis
Message-ID: <1993Jan21.190124.25163@cgrg.ohio-state.edu>
Sender: news@cgrg.ohio-state.edu (Usenet News Poster)
Reply-To: david@osc.edu
Organization: The Ohio Supercomputer Center
References: <1jm5euINN5up@rave.larc.nasa.gov>
Date: Thu, 21 Jan 1993 19:01:24 GMT
Lines: 92