Is my bode plot inaccurate?

Given the following transfer function
s = tf('s');
P = 125/(s*(s+1)*(s+5));
bode(P);
Why at 5 rad/s is magnitude -3.19 dB?
Should it not be -7.6 dB?
I get -7.6 dB if I compute the magnitude at 5 rad/s:
>> 20*log10(125/(5*(5+1)*(5+5)))
ans =
-7.6042

 Respuesta aceptada

Mischa Kim
Mischa Kim el 18 de Feb. de 2014
Editada: Mischa Kim el 18 de Feb. de 2014

1 voto

Quid, the Bode plot is correct. To compute the magnitude of the P you need to replace (substitute) the complex frequency s by iw = i5.
syms s
Ps = 125/(s*(s+1)*(s+5));
Pw = subs(Ps,s,i*5);
aPw = double(20*log10(abs(Pw)))
aPw =
-3.180633349627616
pPw = (180/pi)*double(angle(Pw))
pPw =
1.463099324740202e+02

4 comentarios

Quid
Quid el 18 de Feb. de 2014
Editada: Quid el 18 de Feb. de 2014
Mischa thanks, and sorry for my mistake.
One last thing, I'm also trying to understand how MATLAB computes phase, my question is: do MATLAB computes phase for each pole and zero and total up or there is a simpler formula as for magnitude: 20*log10(abs(Pw)) ?
Mischa Kim
Mischa Kim el 18 de Feb. de 2014
Editada: Mischa Kim el 18 de Feb. de 2014
Misread. If you want to do it yourself (with correct sign!) you could do a partial fraction decomposition and then add phase components. I would suspect that that's also the way MATLAB does it internally. To get a definite answer you could go into the code itself.
Quid
Quid el 18 de Feb. de 2014
Editada: Quid el 18 de Feb. de 2014
Mischa, there must be a mistake in your example... phase at 5 rad/s is -214 deg not 146 deg, how is it possible? Look at the diagram that I posted.
Quid
Quid el 18 de Feb. de 2014
Ok thanks, but I don't see how to use the angle function to compute the correct phase at a given frequency, because the angle function always returns angles between [-pi, pi]. I think that there is no simple formula in this case, am I right?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with Control System Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 17 de Feb. de 2014

Editada:

el 18 de Feb. de 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by