# How to solve a transfer function equation in Matlab

73 views (last 30 days)
Joe Suat Chai on 2 Sep 2020
Answered: Paul on 8 Sep 2020
How to use Matlab to solve for ω for transfer function equation below:
Magnitude of | (0.001325 s + 110.4) / ( 1.872e-33 s^5 + 3.052e-24 s^4 + 7.143e-16 s^3 + 1.059e-09 s^2) | = 1
s = jω
Manual calculation shows that ω = 164.294e3*2pi
and verify ω = 164.294e3*2pi in Matlab gets abs = 1 and angle = 50.455 degress, which is correct.
However, it is very time consuming to do manual calculation.
Is there a quick way to convert transfer function in s to complex function in jω, then get the magnitude of that complex function = 1 (or other value)?
The abs function only able to get magnitude of complex function if we know ω, but not abs(complex(jω)) = 1.

#### 1 Comment

Joe Suat Chai on 2 Sep 2020
sorry, amendment on angle, should be -129.5458 deg (50.4542 deg is indeed phase margin)
>> abs(-0.6367 - 0.7711i)
ans = 1.0000
>> angle(-0.6367 - 0.7711i)
>> -2.2610*180/pi
ans = -129.5458 deg
>> -129.5458+180
ans = 50.4542 deg (phase margin)
*Substitute ω = 164.294e3*2pi into (ω*0.001325i + 110.4)/(1.872e-33i*ω^5 + 3.052e-24*ω^4 - 7.143e-16i*ω^3 - 1.059e-09*ω^2) will get -0.6367 - 0.7711i

Paul on 8 Sep 2020
The function allmargin in the Control System Toolbox solves for abs(H(jw)) = 1 (among other things)
>> G
G =
0.001325 s + 110.4
-------------------------------------------------------------
1.872e-33 s^5 + 3.052e-24 s^4 + 7.143e-16 s^3 + 1.059e-09 s^2
Continuous-time transfer function.
>> s = allmargin(G);
>> s.PMFrequency/2/pi
ans =
1.6429e+05

VBBV on 8 Sep 2020