DSPRelated.com
Forums

A question about DFT

Started by hyd198471 March 20, 2011
I have exercise to solve.

Giving is an analog signal, the spectra of discrete lines at a minimum
distance deltaF = 2Hz
The ratio of the largest to the smallest signal amplitude is 100:1. The
signal is band limited to 5KHz. The signal spectrum is to be measured with
a DFT Analyzer. Please set the sampling frequency fa, the number M of
samples and the window function (blackman,Rectangular, Hamming or
Hanning)suitably, so that all lines are detected with no doubt.

I figure it out the fa should be 10 KHz, but the number of samples and
which type of window function should be used I don't know how to do it.
Can someone help me?

On 03/20/2011 09:51 AM, hyd198471 wrote:
> I have exercise to solve. > > Giving is an analog signal, the spectra of discrete lines at a minimum > distance deltaF = 2Hz > The ratio of the largest to the smallest signal amplitude is 100:1. The > signal is band limited to 5KHz. The signal spectrum is to be measured with > a DFT Analyzer. Please set the sampling frequency fa, the number M of > samples and the window function (blackman,Rectangular, Hamming or > Hanning)suitably, so that all lines are detected with no doubt. > > I figure it out the fa should be 10 KHz, but the number of samples and > which type of window function should be used I don't know how to do it. > Can someone help me?
If you know how much spectral spreading you're going to experience from the window, and how much loss of precision you're going to see from too few samples, then you should be able to calculate how much a strong signal is going to bleed into an adjoining weak one. So start with the question: how much can a strong line bleed into a weak one before you can't definitively detect the weak one? Then ask: how much spectral leakage does your chosen window induce? Then ask: does the length of the sample affect how much spectral leakage the window induces? How much? Then ask: Is this system linear, i.e. can I use superposition to do my analysis? I'm pretty sure that if you answer all of those questions, then you'll find that the exercise reduces down to turning the crank on the math machine. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On Sun, 20 Mar 2011 11:51:25 -0500, "hyd198471"
<huyuandong@n_o_s_p_a_m.hotmail.com> wrote:

>I have exercise to solve. > >Giving is an analog signal, the spectra of discrete lines at a minimum >distance deltaF = 2Hz >The ratio of the largest to the smallest signal amplitude is 100:1. The >signal is band limited to 5KHz. The signal spectrum is to be measured with >a DFT Analyzer. Please set the sampling frequency fa, the number M of >samples and the window function (blackman,Rectangular, Hamming or >Hanning)suitably, so that all lines are detected with no doubt. > >I figure it out the fa should be 10 KHz, but the number of samples and >which type of window function should be used I don't know how to do it. >Can someone help me?
Hello hyd198471, To add to what Tim wrote: This is a good homework problem. It tests your knowledge of the effects induced in the freq domain by windowing in the time domain. First, fs = 10 kHz is not the correct answer for the sampling rate. If the 5 kHz component of the input signal is a sinewave having an initial phase of zero degrees, ask your self what would be the discrete samples of that 5 kHz sinewave when fa = 10 kHz. If you answer yourself correctlty, you'll realize that you won't be able to detect that 5 kHz sinewave spectral component if fa = 10 kHz. Second, make sure you understand what characteristic your input signal must have if its spectrum is a series of "discrete spectral lines." Third, once you realize what fa should be, you could reword your problem to be: "How many samples (what sample spacing, in Hz, in the freq domain) must I have of a rectangular-windowed signal so that I can detect two spectral components that are separated by 2 kHz and their amplitudes can differ by a factor of 100:1?" Answering that question will give your "rectangular-windowed solution." Next replace the words "rectangular-windowed signal" with "Hanning-windowed signal" which will give your "Hanning-windowed solution." Next replace the words "Hanning-windowed signal" with "Hamming-windowed signal" which will give your "Hamming-windowed solution." etc. etc. Good Luck, [-Rick-]

hyd198471 wrote:

> I have exercise to solve. > > Giving is an analog signal, the spectra of discrete lines at a minimum > distance deltaF = 2Hz > The ratio of the largest to the smallest signal amplitude is 100:1. The > signal is band limited to 5KHz. The signal spectrum is to be measured with > a DFT Analyzer. Please set the sampling frequency fa, the number M of > samples and the window function (blackman,Rectangular, Hamming or > Hanning)suitably, so that all lines are detected with no doubt. > > I figure it out the fa should be 10 KHz, but the number of samples and > which type of window function should be used I don't know how to do it. > Can someone help me?
The resolution is determined only by signal to noise ratio. Windows, DFTs, etc, are no more then minor technicalities. Since there is no noise in your homework, you only need 5kHz/2Hz = 2500 samples to resolve all of the components. VLV
>On Sun, 20 Mar 2011 11:51:25 -0500, "hyd198471" ><huyuandong@n_o_s_p_a_m.hotmail.com> wrote: > >>I have exercise to solve. >> >>Giving is an analog signal, the spectra of discrete lines at a minimum >>distance deltaF = 2Hz >>The ratio of the largest to the smallest signal amplitude is 100:1. The >>signal is band limited to 5KHz. The signal spectrum is to be measured
with
>>a DFT Analyzer. Please set the sampling frequency fa, the number M of >>samples and the window function (blackman,Rectangular, Hamming or >>Hanning)suitably, so that all lines are detected with no doubt. >> >>I figure it out the fa should be 10 KHz, but the number of samples and >>which type of window function should be used I don't know how to do it. >>Can someone help me? > >Hello hyd198471, > To add to what Tim wrote: > >This is a good homework problem. It tests >your knowledge of the effects induced in >the freq domain by windowing in the time domain. > >First, fs = 10 kHz is not the correct answer for >the sampling rate. If the 5 kHz component of the >input signal is a sinewave having an initial >phase of zero degrees, ask your self what would be >the discrete samples of that 5 kHz sinewave when >fa = 10 kHz. If you answer yourself correctlty, you'll >realize that you won't be able to detect that 5 kHz >sinewave spectral component if fa = 10 kHz. > >Second, make sure you understand what characteristic >your input signal must have if its spectrum is a >series of "discrete spectral lines." > >Third, once you realize what fa should be, you could >reword your problem to be: "How many samples (what >sample spacing, in Hz, in the freq domain) must I >have of a rectangular-windowed signal so that I can >detect two spectral components that are separated by >2 kHz and their amplitudes can differ by a factor of >100:1?" Answering that question will give your >"rectangular-windowed solution." > >Next replace the words "rectangular-windowed signal" >with "Hanning-windowed signal" which will give your >"Hanning-windowed solution." > >Next replace the words "Hanning-windowed signal" >with "Hamming-windowed signal" which will give your >"Hamming-windowed solution." > >etc. > >etc. > >Good Luck, >[-Rick-] > >So My analog input signal must be a set of sine or cos wave which is
discrete spectral lines in frequency domain. For example: My analog input signal could be S(t)= S1(t)+S2(t) S1(t) = 100cos(2*pi*2KHz*t) and S2(t)= 1cos(2*pi*2.002KHz*t). The spectrum of these two signal are 50(delta(f-2KHz)+delta(f+2KHz)) and 0.5(delta(f-2.002KHz)+delta(f+2.002KHz)). The sample frequency must be larger or equal than 2 times maxsignal so that fa>= 2*(5KHz). And the samples are 5Khz/2=2500 samples.rectanglur windows is used is that correct.
>On Sun, 20 Mar 2011 11:51:25 -0500, "hyd198471" ><huyuandong@n_o_s_p_a_m.hotmail.com> wrote: > >>I have exercise to solve. >> >>Giving is an analog signal, the spectra of discrete lines at a minimum >>distance deltaF = 2Hz >>The ratio of the largest to the smallest signal amplitude is 100:1. The >>signal is band limited to 5KHz. The signal spectrum is to be measured
with
>>a DFT Analyzer. Please set the sampling frequency fa, the number M of >>samples and the window function (blackman,Rectangular, Hamming or >>Hanning)suitably, so that all lines are detected with no doubt. >> >>I figure it out the fa should be 10 KHz, but the number of samples and >>which type of window function should be used I don't know how to do it. >>Can someone help me? > >Hello hyd198471, > To add to what Tim wrote: > >This is a good homework problem. It tests >your knowledge of the effects induced in >the freq domain by windowing in the time domain. > >First, fs = 10 kHz is not the correct answer for >the sampling rate. If the 5 kHz component of the >input signal is a sinewave having an initial >phase of zero degrees, ask your self what would be >the discrete samples of that 5 kHz sinewave when >fa = 10 kHz. If you answer yourself correctlty, you'll >realize that you won't be able to detect that 5 kHz >sinewave spectral component if fa = 10 kHz. > >Second, make sure you understand what characteristic >your input signal must have if its spectrum is a >series of "discrete spectral lines." > >Third, once you realize what fa should be, you could >reword your problem to be: "How many samples (what >sample spacing, in Hz, in the freq domain) must I >have of a rectangular-windowed signal so that I can >detect two spectral components that are separated by >2 kHz and their amplitudes can differ by a factor of >100:1?" Answering that question will give your >"rectangular-windowed solution." > >Next replace the words "rectangular-windowed signal" >with "Hanning-windowed signal" which will give your >"Hanning-windowed solution." > >Next replace the words "Hanning-windowed signal" >with "Hamming-windowed signal" which will give your >"Hamming-windowed solution." > >etc. > >etc. > >Good Luck, >[-Rick-] > >So My analog input signal must be a set of sine or cos wave which is
discrete spectral lines in frequency domain. For example: My analog input signal could be S(t)= S1(t)+S2(t) S1(t) = 100cos(2*pi*2KHz*t) and S2(t)= 1cos(2*pi*2.002KHz*t). The spectrum of these two signal are 50(delta(f-2KHz)+delta(f+2KHz)) and 0.5(delta(f-2.002KHz)+delta(f+2.002KHz)). The sample frequency must be larger or equal than 2 times maxsignal so that fa>= 2*(5KHz). And the samples are 5Khz/2=2500 samples.rectanglur windows is used is that correct.
On Mar 21, 10:16&#4294967295;am, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> hyd198471 wrote: > > I have exercise to solve. > > > Giving is an analog signal, the spectra of discrete lines at a minimum > > distance deltaF = 2Hz > > The ratio of the largest to the smallest signal amplitude is 100:1. The > > signal is band limited to 5KHz. The signal spectrum is to be measured with > > a DFT Analyzer. Please set the sampling frequency fa, the number M of > > samples and the window function (blackman,Rectangular, Hamming or > > Hanning)suitably, so that all lines are detected with no doubt. > > > I figure it out the fa should be 10 KHz, but the number of samples and > > which type of window function should be used I don't know how to do it. > > Can someone help me? > > The resolution is determined only by signal to noise ratio. Windows, > DFTs, etc, are no more then minor technicalities. Since there is no > noise in your homework, you only need 5kHz/2Hz = 2500 samples to resolve > all of the components. > > VLV
I don't know what weed you're smokin. Resolution is determined by the observation time of the signal. Remember resolution is the ability to separate to closely spaced sinusoids of equal power. Observation time is the most important factor, but it will be affected by the window used - the window provides resolution when the sinusoids have different power. Probability of detection on the other hand is definitely affected by SNR. Cheers, Dave

Dave wrote:
> On Mar 21, 10:16 am, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > >>hyd198471 wrote: >> >>>I have exercise to solve. >> >>>Giving is an analog signal, the spectra of discrete lines at a minimum >>>distance deltaF = 2Hz >>>The ratio of the largest to the smallest signal amplitude is 100:1. The >>>signal is band limited to 5KHz. The signal spectrum is to be measured with >>>a DFT Analyzer. Please set the sampling frequency fa, the number M of >>>samples and the window function (blackman,Rectangular, Hamming or >>>Hanning)suitably, so that all lines are detected with no doubt. >> >>>I figure it out the fa should be 10 KHz, but the number of samples and >>>which type of window function should be used I don't know how to do it. >>>Can someone help me? >> >>The resolution is determined only by signal to noise ratio. Windows, >>DFTs, etc, are no more then minor technicalities. Since there is no >>noise in your homework, you only need 5kHz/2Hz = 2500 samples to resolve >>all of the components. >> >>VLV > > > I don't know what weed you're smokin. Resolution is determined by the > observation time of the signal.
Resolution = distance_between_the_signals/noise
> Remember resolution is the ability to > separate to closely spaced sinusoids of equal power.
Zero noise = infinite resolution
> Observation time > is the most important factor, but it will be affected by the window > used - the window provides resolution when the sinusoids have > different power. Probability of detection on the other hand is > definitely affected by SNR.
Minor technicalities relevant to particularly dumb methods of estimation. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Mar 22, 9:44&#4294967295;am, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> Dave wrote: > > On Mar 21, 10:16 am, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > > >>hyd198471 wrote: > > >>>I have exercise to solve. > > >>>Giving is an analog signal, the spectra of discrete lines at a minimum > >>>distance deltaF = 2Hz > >>>The ratio of the largest to the smallest signal amplitude is 100:1. The > >>>signal is band limited to 5KHz. The signal spectrum is to be measured with > >>>a DFT Analyzer. Please set the sampling frequency fa, the number M of > >>>samples and the window function (blackman,Rectangular, Hamming or > >>>Hanning)suitably, so that all lines are detected with no doubt. > > >>>I figure it out the fa should be 10 KHz, but the number of samples and > >>>which type of window function should be used I don't know how to do it. > >>>Can someone help me? > > >>The resolution is determined only by signal to noise ratio. Windows, > >>DFTs, etc, are no more then minor technicalities. Since there is no > >>noise in your homework, you only need 5kHz/2Hz = 2500 samples to resolve > >>all of the components. > > >>VLV > > > I don't know what weed you're smokin. &#4294967295;Resolution is determined by the > > observation time of the signal. > > Resolution = distance_between_the_signals/noise > > > Remember resolution is the ability to > > separate to closely spaced sinusoids of equal power. > > Zero noise = infinite resolution > > > Observation time > > is the most important factor, but it will be affected by the window > > used - the window provides resolution when the sinusoids have > > different power. &#4294967295;Probability of detection on the other hand is > > definitely affected by SNR. > > Minor technicalities relevant to particularly dumb methods of estimation. > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultanthttp://www.abvolt.com
Maybe before you start changing the titles on people's posts you should go back to school and take a course on spectral estimation or even take the first year DSP course. That's an interesting definition of resolution - too bad you're the only one I know of that uses it. Given your definition, your reply is of absolutely no use to the original poster. Cheers, Dave

Dave wrote:

> On Mar 22, 9:44 am, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > >>Dave wrote: >> >>>On Mar 21, 10:16 am, Vladimir Vassilevsky <nos...@nowhere.com> wrote: >> >>>>hyd198471 wrote: >> >>>>>I have exercise to solve. >> >>>>>Giving is an analog signal, the spectra of discrete lines at a minimum >>>>>distance deltaF = 2Hz >>>>>The ratio of the largest to the smallest signal amplitude is 100:1. The >>>>>signal is band limited to 5KHz. The signal spectrum is to be measured with >>>>>a DFT Analyzer. Please set the sampling frequency fa, the number M of >>>>>samples and the window function (blackman,Rectangular, Hamming or >>>>>Hanning)suitably, so that all lines are detected with no doubt. >> >>>>>I figure it out the fa should be 10 KHz, but the number of samples and >>>>>which type of window function should be used I don't know how to do it.. >>>>>Can someone help me? >> >>>>The resolution is determined only by signal to noise ratio. Windows, >>>>DFTs, etc, are no more then minor technicalities. Since there is no >>>>noise in your homework, you only need 5kHz/2Hz = 2500 samples to resolve >>>>all of the components. >>
>>>I don't know what weed you're smokin. Resolution is determined by the >>>observation time of the signal. >> >>Resolution = distance_between_the_signals/noise >> >> >>>Remember resolution is the ability to >>>separate to closely spaced sinusoids of equal power. >> >>Zero noise = infinite resolution >> >> >>>Observation time >>>is the most important factor, but it will be affected by the window >>>used - the window provides resolution when the sinusoids have >>>different power. Probability of detection on the other hand is >>>definitely affected by SNR. >> >>Minor technicalities relevant to particularly dumb methods of estimation.
> Maybe before you start changing the titles on people's posts you > should go back to school and take a course on spectral estimation or > even take the first year DSP course.
I can separate two sinusoids as long as the distance between them is higher then noise. Observation time matters only by its effect on the distance to noise ratio. Anything else?
> That's an interesting definition of resolution - too bad you're the > only one I know of that uses it.
Do you have to say anything on technical matters?
> Given your definition, your reply is of absolutely no use to the > original poster.
Who cares about worseless stupident/studiot homeworks. It is because of the folks like that Chernobils and Fukushimas are happening. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com