No BSD License  

Highlights from
IIR Filters for Texas Instruments C5000 / C6000 DSP

IIR Filters for Texas Instruments C5000 / C6000 DSP

by

 

17 Jul 2003 (Updated )

A series of IIR filters for use with the Texas Instruments TMS320C5510 DSK with C code and MATLAB.

IIR_bp_01.m
% IIR_BP_1.m
% Calculating IIR filter coefficients of 2nd Order IIR Filter 
% 2000 Hz to 2800 Hz Band Pass IIR Filter Using BLT. 48000 Hz Sampling
% Date - 25th June 2004.

% Numerator coefficients for fixed-point implementation

B0 = 1632;
B1 = 0 ;
B2 = -1632;

% Numerator coefficients for floating-point implementation
% Comment out the following three lines when using fixed-point

B0 = 0.04980;
B1 = 0;
B2 = -0.04980;

% Denominator coefficients for fixed-point implementation


A0 = 32767;        % Always 1.0000
A1 = -29652 * 2;
A2 = 29503;

% Numerator coefficients for fixed-point implementation
% Comment out the following three lines when using fixed-point

A0 = 1.0000;
A1 = -1.80987;
A2 = 0.90040;


b = [B0 B1 B2];
a = [A0 A1 A2];

Fs = 48000          % Sampling frequency 
[H,f] = freqz ( b, a, 512, Fs)
magnitude = 20 * log10(abs(H));
plot ( f, magnitude), grid on
xlabel ('Frequency (Hz)');
ylabel ('Magnitude Response (dB)');
title ('2000 Hz to 2800 Hz Band Pass IIR Filter Using BLT. 48000 Hz Sampling');
set (gca, 'xlim', [0, 12000])
set (gca, 'XTick', [0, 2000, 4000, 6000, 8000, 10000, 12000])
set (gca, 'XTickLabel', [0 2000 4000 6000 8000 10000, 12000])
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])

% Uncomment following line to display poles and zeroes
%zplane ( b, a)

Contact us