I need some help can some one point me in the right direction? What is the atten
ID: 2249279 • Letter: I
Question
I need some help can some one point me in the right direction?
What is the attenuation (in dB) at the Nyquist frequency for the 10th order filter?
What is the attenuation (in dB) at the Nyquist frequency for the 40th order filter?
What is the pass-band peak value (linear scale) for the 10th order filter?
What is the pass-band peak value (linear scale) for the 40th order filter?
Assume the edge of the passband is the highest frequency where attenuation does not exceed 2dB.
What is the passband frequency (to nearest tenth) for the 10th order filter?
What is the passband frequency (to nearest tenth) for the 40th order filter?
Assume the edge of the stop-band is the point where attenuation exceeds 10dB.
What is the stopband frequency (to nearest tenth) for the 10th order filter?
What is the stopband frequency (to nearest tenth) for the 40th order filter?
Change the order of the fft (the value of N) from 512 to 2048. What differences do you notice in the Nyquist frequency attenuation and pass-band peak value for each filter?’ They got smaller.
clear;
h_11 = 0.4*sinc(0.4*[-5:5]); %Impulse response, N-11
Npt=512; %points in FFT
fft_h_11 = fft(h_11,Npt); %FFT of filter
psd_h_11 = fft_h_11 .* conj(fft_h_11); %PSD of filter
psd_h_11_dB = 10*log10(psd_h_11); %PSD in dB
h_41 = 0.4*sinc(0.4*[-20:20]); %Impulse response, N=41
fft_h_41 = fft(h_41,Npt); %FFT of filter
psd_h_41 = fft_h_41 .* conj(fft_h_41); %PSD of filter
psd_h_41_dB = 10*log10(psd_h_41); %PSD in dB
omega = [1:Npt]*20/Npt; %frequency axis
subplot(2,1,1) %create an array of plots, 2 by 1
plot(omega,psd_h_11,omega,psd_h_41) %plot linear-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Linear Scale')
grid on;
subplot(2,1,2) %Activate lower plot
plot(omega,psd_h_11_dB,omega,psd_h_41_dB) %plot logarithmic-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Logarithmic Scale')
grid on;
Explanation / Answer
clear;
h_11 = 0.4*sinc(0.4*[-5:5]); %Impulse response, N-11
Npt=512; %points in FFT
fft_h_11 = fft(h_11,Npt); %FFT of filter
psd_h_11 = fft_h_11 .* conj(fft_h_11); %PSD of filter
psd_h_11_dB = 10*log10(psd_h_11); %PSD in dB
h_41 = 0.4*sinc(0.4*[-20:20]); %Impulse response, N=41
fft_h_41 = fft(h_41,Npt); %FFT of filter
psd_h_41 = fft_h_41 .* conj(fft_h_41); %PSD of filter
psd_h_41_dB = 10*log10(psd_h_41); %PSD in dB
omega = [1:Npt]*20/Npt; %frequency axis
subplot(2,1,1) %create an array of plots, 2 by 1
plot(omega,psd_h_11,omega,psd_h_41) %plot linear-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Linear Scale')
grid on;
subplot(2,1,2) %Activate lower plot
plot(omega,psd_h_11_dB,omega,psd_h_41_dB) %plot logarithmic-scaled PSD
legend('10th order', '40th order')
title('Example 9-1 Logarithmic Scale')
grid on;