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일

1 개 추천

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.
Quid
Quid 2014년 2월 18일
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에 대해 자세히 알아보기

태그

질문:

2014년 2월 17일

편집:

2014년 2월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by