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

 Réponse acceptée

Mischa Kim
Mischa Kim le 18 Fév 2014
Modifié(e) : Mischa Kim le 18 Fév 2014

1 vote

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 commentaires

Quid
Quid le 18 Fév 2014
Modifié(e) : Quid le 18 Fév 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 le 18 Fév 2014
Modifié(e) : Mischa Kim le 18 Fév 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 le 18 Fév 2014
Modifié(e) : Quid le 18 Fév 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 le 18 Fév 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?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Control System Toolbox dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by