Professional Documents
Culture Documents
>> 'G(s)H(s)'
ans =
'G(s)H(s)'
>> GH=tf(numgh,dengh)
GH =
s^2 - 4 s + 20
--------------
s^2 + 6 s + 8
>> sgrid(Z,wn)
>> pause
>> rlocus(GH)
>>
>> title('Close-up')
>> z=0.45;
>> wn=0;
>> sqrid(z,wn)
>> Z=0.2:0.05:0.5;
>> wn=0:1:10;
>> sgrid(z,wn)
[K,p]=rlocfin
clear
clf
numg=[1 1.5]
deng=poly([0 -1 -10])
'G(s)'
G=tf(numgh,dengh)
G=
s^2 - 4 s + 20
--------------
s^2 + 6 s + 8
>> rlocus(G)
Type %0S
>> z=-log(pos/100)/sqrt(pi^2+[log(pos/100)]^2)
z=
[]
sgrid(z,0)
>> title(['Root locus with ',num2str(pos),'%overshoot line'])
>> [K,p]=rlocfind(G)
selected_point =
2.3649 - 0.0000i
K=
1.7221
p=
0.1632 + 3.9452i
0.1632 - 3.9452i
>> pause
'T(s)'
ans =
'T(s)'
>> T=feedback(K*G,1)
T=
----------------------------
>> step(T)
>> pause