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

 采纳的回答

Mischa Kim
Mischa Kim 2014-2-18
编辑:Mischa Kim 2014-2-18
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 个评论

Quid
Quid 2014-2-18
编辑:Quid 2014-2-18
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 2014-2-18
编辑:Mischa Kim 2014-2-18
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 2014-2-18
编辑:Quid 2014-2-18
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.
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?

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Get Started with Control System Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by