"Bhaskar " <email@example.com> wrote in message <firstname.lastname@example.org>...
> 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.
> 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',...
hp = plot(HmssResamp); set(hp,'color',[0 0 0])
axis([340 360 -10 5])
Hope that helps,