From: Bhaskar on 15 Apr 2010 07:29 Hi to all. This is bhaskar and it is my first post. I did the following. I generated a 20kHz signal using sin function with 1sec duration sampled at 44.1kHz. I up sampled the signal to 13 times and use pi/13 filter to remove the unwanted images in the signal using a low pass filter of pi/13 cutoff , 0.1pt transition width and 120 db Astop, Finally I down sampled it to 12 times. So now I want to measure the SNR in the output . Because it is a single tone signal(but critically sampled), I think we can calculate the signal power and rest of it we can treat it as noise and calculate the SNR. But if I apply an N points fft, how many points around 20kHz my signal got spread ? how would I know what is noise and what is signal? whether I took average over signal or peak frame of N-points? Is there any chance to SNR got changed when I change my N- in fft? Any suggestions on what I did or any methods or matlab code , any comments , anything all are welcome. Regards Bhaskar N
From: Wayne King on 15 Apr 2010 09:05 "Bhaskar " <bhaskar.nallani(a)soctronics.com> wrote in message <hq6ta1$a6o$1(a)fred.mathworks.com>... > Hi to all. > This is bhaskar and it is my first post. I did the following. > > I generated a 20kHz signal using sin function with 1sec duration sampled at 44.1kHz. I up sampled the signal to 13 times and use pi/13 filter to remove the unwanted images in the signal using a low pass filter of pi/13 cutoff , 0.1pt transition width and 120 db Astop, Finally I down sampled it to 12 times. > > So now I want to measure the SNR in the output . Because it is a single tone signal(but critically sampled), I think we can calculate the signal power and rest of it we can treat it as noise and calculate the SNR. > > But if I apply an N points fft, > > how many points around 20kHz my signal got spread ? > how would I know what is noise and what is signal? > whether I took average over signal or peak frame of N-points? > Is there any chance to SNR got changed when I change my N- in fft? > > Any suggestions on what I did or any methods or matlab code , any comments , anything all are welcome. > > > Regards > Bhaskar N > > Hi Bhaskar, It's always possible to give the appearance that you've affected the SNR by having your signal energy fall between DFT bins, I'm guessing that's your concern? Obviously that is just an artifact. I think the bigger concern in your situation is the impact of your filtering process in the sample rate conversion. I think if that is done correctly, you won't see any impact on the SNR. Here is an example (requires Signal Processing Toolbox): Fs = 1000; t = 0:1/Fs:1; H = spectrum.periodogram('Hamming'); y = sin(2*pi*350*t); y1 = resample(y,13,12); HmssOrig = msspectrum(H,y,'NFFT',2048,'SpectrumType','onesided','Fs',Fs); HmssResamp = msspectrum(H,y1, 'NFFT',2048,'SpectrumType','onesided',... 'Fs', (13/12)*Fs); plot(HmssOrig) hold on; hp = plot(HmssResamp); set(hp,'color',[0 0 0]) axis([340 360 -10 5]) legend('Original','Resampled'); Hope that helps, Wayne
From: Nallani on 16 Apr 2010 00:00 Hi Wayne King, Thanking you for your quick reply. I will tryout this code. But the multirate tool box (in fdatool) didn't have stop band attenuation option, as it takes only L and M. As for my observation the stopband attenuation is fixed to 60 db in that multirate filter tool box case. So how can I get more SNR in that case when L is going bigger and bigger, because the distributed power in stop band growing along L (power in stopban pi/13>pi/3) . I mean the noise (signal in stopband I am calling it as noise) power is going to be more and more, so I want the stopband attenuation more and more to achieve same SNR in case of pi/13 also as like pi/3. Regards Bhaskar N
|
Pages: 1 Prev: rounding particle value using PSO Next: video compression matlab code |