I am designing an IIR Filter with the following designs constraints:
- Passband $(0.75\pi,\pi)$
- Stopband $(0,0.70\pi)$
- No more than $0.5$ % ripple in the passband
- No less than $40$ dB attenuation in the stopband
Using the designfilt
command I am able to design the filter.
However when I am using the following code for the "Butteworth" filter I do not get any Phase response. The magnitude response is fine, but the Phase values have NaN values - "Not a Number". The same codes are able to design for "Chebyshev" and "Elliptic" filters.
Wp = 0.75;
Ws = 0.7;
Rp = 20*log10(1.005);
Rs = 40;
[Nb, Wnb] = buttord(Wp, Ws, Rp, Rs); % Nb: minimum order; Wnb: cutoff frequency
[Zb, Pb, Kb] = butter(Nb, Wnb,'high'); % Zb : zeros ; Pb : Poles , Kb : gain
SOSb = zp2sos(Zb, Pb, Kb);
freqz(SOSb)
Response for Butterworth Filter
Response for Chebyshev I filter
[b,a]=butter(Nb, Wnb,'high');
andfreqz(b,a)
? $\endgroup$