No BSD License  

Highlights from
IIR Bandstop and Notch Filters using the TI TMS320C5416

IIR Bandstop and Notch Filters using the TI TMS320C5416

by

 

12 Aug 2003 (Updated )

Designing IIR filters using the Bilinear Transform (BLT) and by placing

IIR_bs_10.m
% IIR_bs_10.m
% Calculating IIR filter coefficients

% Numerator coefficients

B0 = 32767;
B1 = -32742 * 2;
B2 = 32767 ;

% Denominator coefficients

A0 = 32767;        % Always 1.0000
A1 = -30686 * 2;
A2 = 28781;

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 ('300 Hz notch filter. r = 0.9372. Using poles and zeroes. 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])
%zplane (b,a)

Contact us