Analog Filter Design

Contents

Denomalize to lowpass filter

[z p k] = cheb1ap(4,0.1);
[bp ap] = zp2tf(z,p,k);
f0 = 300;
[b a] = lp2lp(bp,ap,2*pi*f0);
f = linspace(0,400,401);
hh = freqs(b,a,2*pi*f);
ha = abs(hh);
db = 20*log10(ha);
plot(f,db,'LineWidth',2);
xlabel('frequency (Hz)');
ylabel('response (dB)');
grid;

Denormalize to a bandpass filter

[z p k] = cheb2ap(4,20);
[bp ap] = zp2tf(z,p,k);
f0 = 440;
fbw = 40;
[b a] = lp2bp(bp,ap,2*pi*f0,2*pi*fbw);
f = linspace(360,520,201);
hh = freqs(b,a,2*pi*f);
ha = abs(hh);
plot(f,ha,'LineWidth',2);
xlabel('frequency (Hz)');
ylabel('magnitude response');
axis([360 520 0 1]);
grid;