No BSD License  

Highlights from
Multirate Processing using the Texas Instruments TMS320C5416 DSK

Multirate Processing using the Texas Instruments TMS320C5416 DSK

by

 

23 Jul 2003 (Updated )

Improving FIR filter performance using sample rate change.

multirate_10.m
% multirate_10.m
% Calculating FIR coefficients
Fs = 12000;          % Sampling frequency 
FN = Fs/2;           % Nyquist frequency 
Fc = 300/FN;         % Cutoff frequency normalised to FN
N = 51;              % 51 coefficients
hd = fir1 ( N-1, Fc, 'low', boxcar(N), 'noscale');
wn = blackman(N);
hn = fir1 ( N-1, Fc, 'low', wn, 'noscale' ); % Calculate blackman window coefficients
[H,f] = freqz ( hn, 1, 512, Fs);
magnitude = 20 * log10(abs(H));
plot ( f, magnitude), grid on
xlabel ('Frequency (Hz)');
ylabel ('Magnitude Response (dB)');
title ('300 Hz Low Pass FIR Filter Using Blackman Window. 12000 Hz Sampling');
set (gca, 'xlim', [0, 2000])
set (gca, 'XTick', [0, 500, 1000, 1500, 2000])
set (gca, 'XTickLabel', [0 500 1000 1500 2000])
set (gca, 'ylim', [-42, 6])
set (gca, 'YTick', [-42, -36, -30, -24, -18, -12, -6, 0, 6])
set (gca, 'YTickLabel', [-42, -36, -30, -24, -18, -12, -6, 0, 6])

Contact us