lag_c
Enter the vectors of the numerator (numo) and denominator (denum) pol.
Start with the highest order term. Ex: [1 2 3] corr. (s^2 + 2 s + 3)
Both vectors should have the same length
Enter numo: [0 0 0 1]
numo =
0 0 0 1
Enter deno: [.5 1.5 1 0]
deno =
0.5000 1.5000 1.0000 0
OPEN-LOOP SYSTEM (without Compensator):
num/den =
1
----------------------
0.5 s^3 + 1.5 s^2 + s
Enter desired Kv: 5
Kv =
5
Warning: The closed-loop system is unstable.
> In /package/matlab-6.5/toolbox/control/control/@lti/margin.m at line 89
In /package/matlab-6.5/toolbox/control/control/margin.m at line 92
In /home/pan/.www/ELEC360/compensat/lag_c.m at line 43
Phase margin "Pm" at the Gain crossover frq. "Wcp"
Pm =
-12.9919
Wcp =
1.8020
Gain margin "Gm" in dB at the Phase crossover frq " Wcg"
Gm =
-4.4370
Wcg =
1.4142
Zeros and poles of closed-loop system without compensator:
zeros =
Empty matrix: 0-by-1
poles =
-3.3089
0.1545 + 1.7316i
0.1545 - 1.7316i
Settling time "sett" and zeta "zeta" of same closed-loop system:
sett =
1.2089
zeta =
1
Press CR to continue
Press CR to continue
Desired Phase margin in degrees (include an allowance for the effect of lag compensator): 52
Phase margin is "degree" degrees at w = "Wcg".
degree =
52
Wcg =
0.4632
Try another Phase margin? (y/n): .46
Enter wc, new gain crossover frequency: .46
wc =
0.4600
Location of the zero of the compensator: .1
beta =
9.6236
bTt =
0.0104
Kc =
0.5196
Compensator:
num/den =
s + 0.1
------------
s + 0.010391
Compensator gain Kc:
Kc =
0.5196
Compensated Open-Loop trsf. function;
num/den =
0.51955 s + 0.051955
----------------------------------------------
0.5 s^4 + 1.5052 s^3 + 1.0156 s^2 + 0.010391 s
Phase margin "Pm" at the Gain crossover frq. "Wcp"
Pm =
40.9439
Wcp =
0.4683
Gain margin "Gm" in dB at the Phase crossover frq " Wcg"
Gm =
13.9713
Wcg =
1.3157
Zeros and poles of Closed-loop system with compensator:
zeros =
-0.1000
poles =
-2.3245
-0.2823 + 0.5372i
-0.2823 - 0.5372i
-0.1214
Settling time "sett" and zeta "zeta" of compens. closed-loop system:
sett =
14.1711
zeta =
0.4652
Press CR to continue
Press CR to continue
Enter decision ( >0 to continue) :0
decision =
0
diary