Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to design 2 IIR bandpass filter with the following specifications:

Sampling frequency 1000 Hz Pass-band 50 Hz to 200 Hz Order 6 using bilinear transform and impulse invariance with Butterworth prototype analogue filter.

I'm confused, because the two methods I've got for producing the filters have different results.

fs = 1000;
fNq = fs/2;
f1 = 50/fNq;
f2 = 200/fNq;
[z,p,k] = buttap(6);
[A,B,C,D] = zp2ss(z,p,k);
[zd,pd,kd] = bilinear(z,p,k,fs);
Bw = f2-f1;
Wo = sqrt(f1*f2);
[At,Bt,Ct,Dt] = lp2bp(A,B,C,D,Wo,Bw);
[b,a] = ss2tf(At,Bt,Ct,Dt);

[Ad,Bd,Cd,Dd] = bilinear(At,Bt,Ct,Dt,fs);
[bz, az] = ss2tf(Ad,Bd,Cd,Dd);

(I think that) The above code creates an analogue prototype, transforms to a state-space form, applies the bilinear transform, transforms the low-pass filter to a band-pass filter, transforms to a transfer function and the plots it.

My problem is that it is noticably different to:

[num,den] = butter(6, [f1, f2], 's');
[B,A] = bilinear(num, den, fs);
fvtool(B, A);

I have similar problems with the impulse invariance method.

Could someone please give me a hint as to what I'm doing wrong?

share|improve this question

The issue is resolved: the butter() function automatically does bilinear transform, you just need to specify the frequencies normalised to the Nyqyist freq.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.