Need help calculating and plotting phase delay for op amp filter

Thread Starter

nodeuce

Joined Apr 17, 2009
2
I'm working on a design project where I need to design a 4th order Chebyshev low pass filter. In addition, I need to plot the time delay of this plot. Time delay is the derivative of phase (w/ respect to w = omega).

I calculated the 4 poles to using the design specs (ripple and cut off frequency).
They are:
S1 = 0.1754 + 1.0163i

S2 = 0.4233 + 0.4209i

S3 = 0.4233 - 0.4209i

S4 = 0.1754 - 1.0163i

This is exactly what I expected to see. From here I came up with the ideal transfer function using the above poles.
It's in the form
H(s) = S1*S2*S3*S4/((s+S1)*(s+S2)*(s+S3)*(s+S4)). You can normalize this if you need to by dividing each s term by the cut off frequency.

My professor asked us to use 50k resistors. I split up my poles into 2 transfer functions using S1, S4 and S2,S3. I compared the coefficients of these 2nd order transfer functions with the sallen-key topology transfer (2nd order also) function and calculated the values for the capacitors in the circuit. Everything is fine up to this point. I'm using mat lab to graph the bode plots. I attached the magnitude and phase plots.

My problem is plotting the time delay. Is there a way that I can just pull the values from the phase plot and take the derivative of it and plot it?
Since I didn't know if that was possible, I tried the following method.

I know that phase = exp(-j*arctan((w+b)/a))
where a = real part of the poles, b = imaginary part of poles.

Since I have 4 poles, I can use this expression and sum the phases for each pole. I'm not that familier with matlab so when I tried doing this, I ran into a few problems. Furthermore, I don't know how to take the derivative of the phase when I do get to this point. I attached a few lines of the code I tried that didn't seem to work. Thanks for the help.

I get the following error:
Error using ==> exp
Not enough input arguments.

----------
% Phase
w = [1:10]; %test values
b1 = imag(S1);
b2 = imag(S2);
b3 = imag(S3);
b4 = imag(S4);

a1 = real(S1);
a2 = real(S2);
a3 = real(S3);
a4 = real(S4);

x1 = exp^(-j.*atan((w+b1)/a1))
x2 = exp^(-j.*atan((w+b2)/a2))
x3 = exp^(-j.*atan((w+b3)/a3))
x4 = exp^(-j.*atan((w+b4)/a4))

x = x1+x2+x3+x4;

-----
 

Attachments

Top