A better design would be:
[z,p,k] = butter(n, Wp, 'bandpass');
[sos, g] = zp2sos(z,p,k);
or the complete code (that I typed myself because my version of MATLAB will not run images of code):
Fs = 22500;
Fn = Fs/2;
Wp = [9000 10000]/Fn;
Ws = [8500 10500]/Fn;
Rp = 0.5;
Rs = 50;
[n, Wn] = buttord(Wp, Ws, Rp, Rs);
[z,p,k] = butter(n, Wp, 'bandpass');
[sos, g] = zp2sos(z,p,k);
and you can see the Bode plot:
figure
freqz(sos, 2^16, Fs)
so it is obvious that only a small portion of your signal will be passed. That is how the filter is designed, and it appears to work correctly.
.
Best Answer