# Problems discretizing a notch filter - Chebyshev Type I

I'm trying to implement and discretize a notch filter (Chebyshev type I) these specifications:

Ws = 2pi[2000 2500]; Wp = 2pi[1000 7000]; Rp = 0.5; Rs = 40;

But when I try to use discretization methods, Tustin has a weird phase graph, and ZOH has also a weird behaviour. I couldn't find anything online that would explain those behaviours. Could anyone help me?

Discretization matlab code:

% continuos to discrete
Ws = 2*pi*[2000 2500];
Wp = 2*pi*[1000 7000];
Rp = 0.5;
Rs = 40;
[n,Wp] = cheb1ord(Wp,Ws,Rp,Rs,'s');
[b,a] = cheby1(n,Rp,Wp,'stop','s');
H = tf(b,a);

Hbi = c2d(H,1/20000,'tustin');
Hzoh = c2d(H,1/20000,'zoh');
Hm = c2d(H,1/20000,'matched');
Hdp = c2d(H,1/20000,'prewarp',2*pi*2250);
%Hii = c2d(H,1/20000,'impulse');

options = bodeoptions;
options.FreqUnits = 'Hz'; % or 'rad/second', 'rpm', etc.

bode(H,'b',Hzoh,'r',Hbi,'m',Hm,'g', Hdp, 'y',{2*pi*100 2*pi*10000}, options), grid
legend('Continuous','ZOH','Tustin','Matched','Tustin w/ pre-warping')


• Why are you using bode() for the discrete transfer functions? That's only for your initial t.f., the rest need freqz(). – a concerned citizen May 28 at 8:49