Control System Design Lab
Control System Design Lab
1
Simulation and Analysis of TF models 20/01/2021
-
Time and Frequency response
boltwore Used
MATLAB
the
Hu s-plane
chavaceiske guation haud
haud ot
Bt dn
ancdporamea.
Cosd Ro
Magudlul (gnditsn
LasHe) =t180(2k+)
oudihi
londibn
a puot lous ill sati
alove tuo codihns
2
Bod
Bode glat
tonsist
Qnd
Manikudk
plrase mangn Js u
addilional pase
at te
big stabiuy
Pluas Mang
sCSt4)
Sype
Chavodinistc Egualioa is
wonied rem o to
Foy bode
w,2S
4.
2xs =4
0. 4
Peak
=
-36 dB,
Peak
=b/-2x04* 2
-4.123 qads
Magnikud
(CC2s-w} +4w?)
Plhase dan
4
Experiment 1
1 Experiment 1
1.2 Output:
Transfer Function
Gm =
Inf
Pm =
68.9154
1-1 | P age
Experiment 1
10
Bode Diagram
Magnitude(dB)
D-10
-20
-30
40
-50
-60
10 100 10' 10
phase(deg)
-50
-100
-150
-200
10*1 10 10 10
Frequency (rad/s)
Bode, Diagram
Gm = Inf dB (at Ini rad/s) Pm =68.9 deg (at 5.83 rad/s)
(dB) 10
Magnitude
20
-30
40
-50
(deg)
-45
Phase -90
D-135
-180
101 10° 10 102
Frequency (rad/s)
1-2| P age
Experiment 1
for k=4:0.1:100
z(i,1)=-2;
z(i,2)=sqrt(k-4);
i=i+1;
end
plot(z(:,1),z(: ,2), 'b',y(:,1).y(:,2),'r',z(:,1),-z(:,2),'r',x(:,1) ,x(:,2), "b')
hold on
grid on
title(' ROot Locus')
xlabel('Real Axis')
ylabel ('Imaginary Axis')
1.4 Output :
Root Locus
10
4
Axis
Imaginary
-2
-4
-6
-8
-1
-3.5 -2.5 -1.5 -1 -0.5
Real Axis
1-3 | P age
i) Fom
te plated sol lous, it iu
dfed
tuat tee Hoot aus
Inus heven
.
Henie the
aways stable Anues .
all k
Meseh pt
Hene
te brain Margin e
tu systi
68-9
Resut:
tee
A
MATLAB iade 0as duleped to plot
Hent dowu and bode plot q
ta taken ystem. Thuu
A
0 btain a
Couiuuou Slired Tauk Reatlor bimulate thu
pohamito te gualiu
mathunatial eguatins
MATL AB
: MATLAB
sed
a
Matlematual nodel i
a
tirted tauk Heaco CcsTR) js
A
Lntuaus
Aateh uaclor guigpod ita
. Jr chemial
deuri u
to
Bu am CSTR
wd o madel
idualed agitatid tauk neator
aperatn sanialtu ngubad ko atain
Modallng
wl e a
nsiderec as
Lonitot
dllev) e
dv
olt olt
V
Voue
total
dV
v
Thu stab Nriallu wlde will Ca
aud
V
dlcav)
4 da
olt
dt dlt
-ERr
d CCAV) [Cai lgi)-g)a-ko
dt
-E/RT
V odCa
Chanactuilng te total
Jn Kiemadguamits.
conpoitibn
H
#(T,na, ng)
B& CSTR,
ku nols A
A
ad in
at dr dna
JT dt SnA alt
evep
uaction
mixie
HA, fig <
Pontal molan sntapuis A
aud B.
&
CAL
ds
olt
d
Clpv)o-F
d
trV
dT tHA
dt
(-<8 4rV)
Mas Balaue Eguatio
nUmlation] to seachion
A
| due
time
time fime
Time
dt
it ome
Cmolu volm) b!
Cai, CA Malan onctatips
stean aud
hu indet
Hu
Dutet steam
-E /R
dea
V
- Ga) - kp -
CCA
eE/r CA.
dt V
l2
dH
dl
hi - h - 2
-
.
E
- )
dT (Te (HA- He)AV-
V
dT
olt
Dividig y vV
dT
dt
Aoolant p
Temoud
wit ime
,
unit ime
-E/er
-Stisren 13
Dwtput
Ceolant
(-AH) o A
V
Pavamib ist:
T Reatos
the noninal panamells ae
Tempealuu
Feed o w
Feed cnlntration
ed
Feed Tempualne
1bOL/mn
Celaht cenpeatan
Duiis e, ee
at tramte
puod At
Experiment 2
2 Experiment 2
2.1
2.2 Code:
Cao = i nput('Enter initial value of Ca =');
TO = input('Enter initial value of T =):
%globa1 u;
%u = input ("Tf = ");
[t,y] = ode45 (Qodefun, [1 20], [ca0 TO]);
subplot (2,1,1)
plot(y(:,1), '* "):
title('Effluent Concentration');
subplot(2,1,2)
plot (y(:,2),'.');
title('Reactor Temperature');
function dydt odefun(t,y)
V= 100;
K q= 100;
caf = 1;
Tf = 350:
qc = 100:
TC = 350;
rho = 1000;
rhoc = 1000;
Cp = 1;
Cpc = 1;
ko = 7.2*10^10;
= E/R
S= 9.98*10+A3; S
%
delH = 2*10^5;
hA = 7*10^5;
dydt = zeros(2,1);
dydt (1) =
(a/v)* (Caf - y(1))) - ko*y (1) *exp(-(S) * (1/y (2)));
dydt (2) = ((g/)* (Tf - y(2) )) +(((-delH * ko * y(1))/(rho * cp) * exp(-(S)*(1/y(2)))))+
(rhoc*cpc*qc) /(rho*cp*v)) * ((1-exp((-1*hA) / (qc* rhoc*Cpc))) * (Tc - y(2)));
end
2-4 | P age
Experiment 2
2.3 Inputs:
expt2_ l
Enter initial value of Ca =0.09235
Enter initial value of T =441.81
:
2.4 Output
Effluent Concentration vs time
0.6
0.4
Concent
0.2
20 30 40 50 60 70 80 90
10
Time s
Reactor Temperature
460
Y 440
420
400
380
360
340 30 40 50 60 70 80 90
10 20
Time s
2-5 | P age
14
soolant wsed
udus t eator impnaline
Bven tine
i) model e tie 2 Do F
Ca,T
givas olifrutial equalitna moln wtica
Reult:
Lsus te matiematiial model af a ContiuD
lontinuou
Birved tauk Peactor as
was
Aimulatid ing MATLAB
Enpt -NO:3 kimlatipn Moalel
lunear Continuaus
Ain
To
simwlate aud
tu dinear ntinuow
modl
Mattab
Sofwane vsd:
Stai
\hiables to
raten than
ue
Aguakom
bmallest nubset variatbs at
state at
te luire
Any given time stat
ually
to
t erdu
, but uot sueesonily
in
ypaue
Geneal stab- ngrsentain liear
- Dutput Vactr
- 8tatu Vector ge matyix
t)
weutor A4) -tat matyi .
(ct) - 0utput
Bct) Input matviy
Feedthyoug matri {Transmision mat)
Vie) Vou)
kvL
dt
olice
-
olt
Vellage
=
Vec)
m
Difuiating te
dia aboe guakim w.r-t
dWee ice)
dt
ice)
dige
X=
dvece)
Ve co
ices
-R/L
di Vice).
dVu Vece)
icr)
ve )
Ouondamga Case
-
LC
Vadadanpa .
Case
R=0.5
2
Le.
Ca
&o R= 4
Experiment 3
3 Experiment 3
3-6| P
age
Experiment 3
Step Response
1.5
Amplitude
0.5
3 5
Time (seconds)
end
-1
-2
4L
-6 -5 4
Real Part
3-7 | P age
23
i) Hn two
Lc. Hue stati aialles
miim numb stat vaniall
deeded
R s do It doenot
store
te state
Aiahes Eungy tam letien
magneke usgy and elctiostatic enengy kappeau
eteen
iii) wen te pot
ji) Resiataue is aid.
out
Aous s Jraced
:
Result
wodel tor
Stat
and tu was simulatio
and
and Pnjoymane Auaysa g teaol
Jiga
MRTLABB
daig spuijuations wig
:
i MATAB
delioane Vd
H
ead onpusator s au etriad siruit
thct oen provided
rovided sottsnsoiclal input
oitth a
a
sinwoidal signal as outpt soith
to tat
as
Juoidal • A
sod dompuuatrr
and
grod dompig
. benaaly,
Daihed porautin tabiily aud
ton ndae duuod eulti. But incearing gain
gain
yutim adiedly. Iatodaig
ide pbtoÜin
Jead
desined tranint
25
awod wu
) Finc wiich
doation
, ot nbetsen
deminaut pol
at
yoot loes
to otsect te
plaud
locatibn
g iteia to
te desied
met
dyan duoiploni
Hes)
atid
koth
Judanpad oaulabn
Jotws is
stalle
To meet Hu
dued amiut
dheed to oot docws to delt sie
a I
Tie Coi th 2y. riterig, 4s
Perent tesoot P6 35 /.
Experiment 4
4 Experiment 4
Compensator... ..4-9
Compensated System Plot ..4-9
4-8| P
age
28
Experiment 4
% Pole Placement
0= [0;0];
Root = [R;I]:
D = ROot-0;
no rm (D);
Tl = atan2d(D (2) ,D(1)); %
angle from (o,0) to desired point
Tp = (-2 * T1)+270;
P= 2*(R-(1/tan(Tp) )*(-I));
4.5 Compensator
GC = K * (s - 2)/(s - P);
:
4.7 Inputs
>>expt4
: 4
Settling time
Percentage Overshoot 35
Select
a
zeta value above 0.3169
0.45
Desired rOot locations are1300+198i and1:001 98i
4-9| P
age
29
Experiment 4
4.8 Ouput:
4.8.1 Uncompensated System
Root Locus Uncomponsatod Systom
15 2
1.8
10
1.6
1.4
.2
0.8
0.6
0.4
-10
0.2
0.5
-6
3.5 3
-2.5 -2 -1.5 -0.5 Timo (secoñds) 8 10
Real Axis seconds
4-10 Page
auilatoy.
fpmids donsidluabe
n
tu
i)
graph otsck
dign spuitjeatim
and
dign
,
apzifatin but te kondlition
angt conditiom
augle
u
must
Aud eo lostion must Aot
aplth noot dous patus
Reult:
a lead
nargialy
was tabiliaed
nstalle
dugu puifiaten wene mety
31
Acin
PD nlioles
Aontoll
kp TüS
Dut. The
Mthcd 2
is made magialy
Jm
tis method
te
waes ane Jound But.
table, tun tu wmasgunal
Pey is found by
Fom bb Ha Hun valu kp>
dividing by
OUe fund.
kp Ti Td
o
P P
5ke
PI 04S KeY
06 kys PY 0-12SPr
PID 2
D
33
Ra
W,ada wpm).
w
Yada
(mny constac)
D
Ialn Cpaaping YathD.
.
J=D
I kt Ia.
Tovque to otatienal neloccty (),
D o
+
Jde T-Ddo
do Ia -D de
+ (kt dt
di.
di Ia Ra - Ke
de
J/v-
la dt.
34
Porometin
J
b. b2
D0.2
2 S
H.
D.s
k
Vey
(8L FR (ST
+
B) + k
C0-Ss +
2) (0b23+6. 2)
Experiment 5
5 Experiment 5
Sytem Parameters.... .5-11
J= 0.02 0.02
B= 0.2 0.2
Kt = 2 0.015
Ra = 2 2
La = 0.5 0.5
%}
sys2 0.015/(0.01*sA2+2.5*s+0.44);
subplot (121)
plot(t,y);
hold on;
ypp = diff(y,2):
,
tinfl fzero(@() interp1(t (2 :end-1) ypp,T,'linear', 'extrap') ,0);
=
=
y_infl interp1(t, y,t_infl, "linear');
plot(t_infl,y_infl, 'ro')
subplot (122)
plot (ypp);
5-11| Page
36
Experiment 5
Slop Rosponso
1.5
Amplitude
0.5|
2 3 6
Time (seconds)
5-12 Page
31
Experiment 5
3.5
3
7
6
2.5
5
2
4
1.5
3
1
0.5 1
L
5.5 Finding andT
L= (1/max (dy) ) * (-y__infl) + t_infl;
=
T (1/max (dy) ) * (max (y)-y_infl) + t_infl;
subplot (121)
plot(L,0, '*")
plot(T,0, ***)
stem(T, max (y) )
3.5 8 x103
6
2.5
5
2
1.5
3
0.5
0.2 -1
0.4 0.6 0.8 1 1.21.4 1.6 1.8 50 100 150 200
5-13 Page
38
Experiment 5
:
Select the controller
1: P
2: PI
3: PID
5-14 | P age
Experiment 5
5.8
P
controller
Step Responso
1.5
s:
Amplitude
o
0.5!
5.9 PIController
Step Response
1.8
1.6
1.4
1.2 -
.8
0.6
0.2
5-15 P
age
Experiment 5
1.2
Anplitude
0.4
0.2
5.11 Method 2
Kp
=
System
s(s+1) (s+5) +Kp
%}
5-16 | Page
Experiment 5
Kcr = margin(sys);
sysg = Kcr*sys:
Gs = feedback (sysg,1);
step (Gs)
[wn,zeta] = damp (GS);
PCr = (2*pi)/wn(1);
5-17 | Page
42
Experiment 5
:
5.17 Output
Root Locus
Root Locus
15
10
-10
Step Response
2
1.8
1.6
1.4
0.8
0.6
0.4
0.2
20 30 Time (seconds) 50 60 70 80
5-18| Page
43
Experiment 5
P
controller
Step Response
1.8
1.6
1.4
1.2
p.8
0.6
0.4
0.2
5 10 Time (3econds) 20 25 30
PIController
Step Response
2.5
opnwy
0.5
5-19| Page
44
Experiment 5
PID Controller
Step Response
1.8
1.6
1.4+
1.2
.8
0.6
0.4
0.2
5 10 15
Time (seconds)
5-20 Page
to
kiger -Nicals
)
al provid s-haped
stale
Reult:
P, PI ad PID onlalles AQene tyed
methods and te
Bbtained.
46
spt No:
Deign and Payor mame Aualyni
An
o duign a statt fedhack otral
.
it
: MATLAB
The
to de
that ait Jes te eigu ala A-Bk
2= (A-BK)
(he stat fedbact goin matrlx is sbtaind
3 nettuo
)
Diet metod
gormla
U ng Traformation matria
.
47
i) Diet method
lwhe te stat matrix is
Letollabte amemical
A =
pre doatins
dtyis
matris tmecta are gicen by
=
kn- d2-2
we CA) A
+a, Ah
ta AM..an- A ta, I
prnd
Lanonial
A
kUmoni tormula used
Hu code takl
- 2
0.s,Db, 7
-2
D.S, Db.
Experiment 6
6 Experiment 6
6.1 State Feedback Control
To use either direct method or ackerman's formula
:
Program Working
* Uses direct method for matrix that are in Controllable Canonical
Form
* Uses Ackerman's formula if it is not so
% System 1
% |0 1 0 | |0 |
+
x(k+1) 0 0 1 | x(k) |0 | u(k)
| -1 -2 -3 | |1 |
System 2
-1 -1 | |0|
+
x(k+1) = | 0 -2 | x(k) |1 |
u(k)
%
% Desired closed LOop poles 0.5, 0.6
Right Answer: [-2.4 -4.1]
%
B zeros (n,1);
=
for b = l:n
fprintf('\nEnter B
the matrix element %d
:,b)
B(b,1) = input(" ");
end
6-21 | P age
Experiment 6
Dp = Zeros (1,n);
for c = 1:n
fprintf('\nEnter the desired pole %d-: ,c)
=
Dp(1,c) input ('");
end
== n
if rank (Uc)
syms z
global equation
for d = 1:n
if d == 1
prev = (2-Dp(1));
equation = prev;
else
equation = prev * (z-Dp (d));
prev = equation;
end
end
if(Set = 1)
K = ackerman_formu la);
6-22 P
age
51
Experiment 6
global equation
global A
n
global
UC_1 = inv(Uc);
=
Coeff coeffs (equation);
for v= 1:n
if v == 1
phy_A = Coeff(v) *eye (n);
else
Sum = A^(V-1) * Coeff (v);
phyA = Sum + phy_A;
end
end
phy_A = phyA + A^n;
O=zeros (1, n);
o(1,n) = 1;
out = 0*UC_1*phyA;
end
=
Coeff coeffs (equation);
for 1 = 1:n
F = Coeff(1) - abs(A(n,1));
] == 1
if
Fp = F:
else
out = [Fp F];
Fp Out:
end
end
end
6-23 | P age
S2
Experiment 6
:
6.8 Output
>> statefeedbackControl
:
Enter the order of the system 3
: 0
Enter the A matrix element 1,1
: 1
Enter the A matrix element 1,2
Enter the A
matrix element 1,3 0
Enter the A
matrix elenent 2,1 0
Enter the A
matri element 2,2 :0
Enter the A
matrix element 2,3: 1
Enter the A
matrix element 3,1-1
1:210 -0.9304.800
6-24 Page
3
Experiment 6
StateeedbackControl
Enter the order of the system: 2
Enter the
A
Enter the
A
matrix element 1,2:-1
Enter the A
matrixelement 2,1 :0
Enter the A
matrix element 2,2:2
B
Enterthe matrix element l:0
Enter the B
matriX element 2: 1
6-25 P
age
i) Stat Feedback Conbol bnly be
daiged
at tle last
matsix can e CE ard desired not
CE
tu diluene belen Atual
Ackemaud ornula
i)
snatin
stat matrix
.
ondihien
fully kantiallale.
Reult
MATLAB tode
fund
qaiww mmatnin for stato Hacdlback ontret wing
tee
botu Direct meliod
ad Ackemaá fermala.
bpt No:1 Dunign diucreti
contolu
Aing Bole plet
AAn
duign A
discrst conislea for a
Mattob
dojwore Usd:
A Aead mpsator
dinset dema
A Jead kompuiatir i wsd to
frouide
dead providu betta thaniut
phau and
A a Pyby-wie
Kentod
As modolled as
proess
3(s+).
Pro us
Dyramiu Angle Prs)
D(z)
Orol
Holod
2uigu Spiyakou
o ordeu beld iu
a
natemabia odl
ADC
7 Experiment 7
7.1 Design of discrete controller
Aim : To design a controller in discrete domain for a physical system
Z - b
Kcr = margin(Gz);
r=exp((-4*T)/TS);
-log(PO/100) ;
-
(X/pi)^2;
7-26 Page
7
Experiment
= sqrt(A/(1+A));
zeta
Roots e roots(den);
a= -Roots (2) ;
wn = Ts/(4*zeta);
zd = exp((-zeta*wn+i *wn*sqrt(1-zeta^2) ) *T);
R_Zd = real (zd);
I_Zd = imag(zd);
=
0l [0.9673;0];
Root = [R_Zd;I_Zd];
D1 = ROot-01;
norm(D1);
T1 = atan2d (D1(2),D1(1));
02 = [1;0];
D2 = ROot-02;
norm(D2);
T2 = atan2d (D2 (2),D2 (1));
03 = [0.9048;0];
D3 = ROot-03;
norm(D3):
T3 = atan2d(D3(2), D3 (1));
Tp = -180+T1-T2-T3;
%b = (R_Zd-(1/tan (Tp) ) *(-I_Zd));
b = -Izd*tan(Tp) + R_Zd;
b = b/4;
DZ = tf([1 a], [1 b],0.1);
7-27 Page
Experiment 7
7.7 Output:
7.7.1 Uncompensated System
2
1.5|
.5
0.4
-1
-1.5
0.2
-2
-2.5
2 Time (sêcondß) 10 12 -5 Feal Ais 1
1 1 fooe
Axiso
0.8
Ampltude
maginary
.6
0.5 0.4
8
i-1 0.2
+1.5
-3 Reá Axis1 1 0.5 Time (seconds) 1.5
7-28 | P age
) he
ouft lu conpealsr setls oits DSs
Aud 'sw ovonfoot
Hesfoot pluns.
citiria s met
domain
Relt:
Mas daigned ia
diseto plomain aud he
guinda
met
8 disnet time
npt No: talbilihy
103]21
Aimw
a discret -tóny
To analyu Hustaliliy g
Juny Staility Test.
aloane heyuid
:
Matab
for med.
Row
C
2 an
. bo b |an an-k
3 bnl bn-2
bh
4 bb
K=0, , 2..n-I.
6)
A
l ewen unved nes
immediaty
n odol
<Dtor
0
Cn~a) onstracnty
A gunalisd Drden
Experiment 8
8 Experiment 8
8.1 Jury's Stability Criteria
= 22^4+72^3+10z^2+4Z+1
Example Characteristic Equation Characteristic Equation
:
.8-29
Initialization.
Necessary Condition .8-29
Table.. .8-30
8.2 Initialization
n= input('Enter the order of the System : ):
fprintf(\nEnter the coefficients in ascending order\n'):
for i = l:n+1
fprintf('Enter the coefficient of z%d :',i-1);
c(i) = input(');
end
% Priniting out the CE
Syms Z
for i = 1:n+1
=
if i 1
prev = C(1);
else
CE = C(i)*ZA(i-1) + prev;
prev = CE;
end
end
fprintf('\nThe characteristic Equation is :');
disp(CE);
if sum(c)>0
fprintfC'\n f(1)>0 ):
end
for i = 1:n+1
i == 1
if
prev = C(1);:
else
suml = c(i)*((-1)^(i-1)) + prev;
prev = Sum1:
end
end
if suml>0
fprintf('\n f(-1) *(-1) An > 0');
end
8-29 Page
Experiment 8
8.4 Table
temp =n;
A = zeros (n+l,n+1);
for i 1: (2*n)-3
=
if i 1
A(1,:) = C;
end
=
if i 2
for j = 1: n+l
A(2,j) = c((n+1)-(j-1));
end
end
if i>2
if mod(i,2)~=0
for j = 1:temp
A(i,j) =
A(i-2, 1)*A(i-1, (temp+1) -(G-1)) - A(i-2, (temp+1) - (j-1))*A(i-1, 1) ;
end
else
for k = 1:temp
=
A(i,k) A(i-1, (temp-(k-1)));
end
end
if (mod(i,2) == 0 && i>2)
temp = temp -1;
end
end
end
fprintfC"\ngury's Table :\n"):
disp(A);
8-30 | P age
b4
Experiment 8
:
8.6 Output
f(1)>0
f(1)*(-1)An > 0
Jury!s Table
10
2 10 4
3 10 10 1 0
10 10 0
8 20 20 0
8-31 Page
65
Reslt:
A MATLAB code
od Was to chuck
ordbs chanactistic guationin
ing day stability Critien
Design aud Penforman Aualyuis f
rain dtah Fbask Contol
17/03/2021
a
Aim :
(e)
mati
: MATLAB
The
to .
providu dinsd penfermane 1u duind
be statd i tirns
lis tine- dlomai
tybomana Lhoies te
muasws. le dg
peyormane Huch as
uninimiig indn, tue
iignal Squan Eror (1SE). 6yitas tat
that ane
paforma incln
J=
Ket) =
State vector
Control utor
u)
Ih alow guation ia
waldl Riccak Equation.
Pantin bno
e t
ontral nuguirsment
to
=
-2 hgt
D=[o]
2 R= 2.
Experiment 9
9 Experiment 9
Optimal Controller
...... .9-32
f=
pl =
-0.66332495807107996982298654733414
0.66332495807107996982298654733414
0
0.61
-0.6i
p2 =
9-32 | P age
Experiment 9
0.1
0.1
-
0.01 + 0.099498743710661995473447982100121i
-
0.01 - 0.099498743710661995473447982100121i
-0.1
-0.1
p3 =
0.1
0.1
0.01 0.099498743710661995473447982 100121i
- 0.01 + 0.099498743710661995473447982 100121i
-0.1
-0.1
p4 =
-0.043166247903553998491149327366707
0.023166247903553998491149327366707
-0.01
-0.01
0.01 - 0.03i
0.01 + 0.03i
eig(A)
A2 = A-B*K
eig(A2)
P =
0.6633 0.1000
0.1000 0.0232
9-33| P
age
72
Experiment 9
K=
1.0000 0.2317
ans =
0
-2
A2 =
1.0000
-20.0000 -6.6332
ans =
-3.3166 + 3.00001
-3.3166 3.0000i
9.5 Output:
9.5.1 Uncompensated System
Step Response
2500
2000
500
000
500
9-34 P
age
Experiment 9
Step Response
1.2
-
0.4
0.2
9-35 | Page
74
i) The
natris Pis fositue dfuild mabriy
i) The
riccai non- linean
quation Aran tems
inyelved in it, hene Men- inan mattab
must de usd
ii) his eliion he inimun
poyomaua inden J.
:
Result
Tus epkinat
contaller s
MATLAB .
had
Reof
17/03/202| Jos acnigue
Vsed: MATLAB.
he eot locus Hs
s-oleni Hoot docus. Tu
To
cinle Tu
he sone augl aud magnit
optlocus
wieria in sdomain
Maguihuole
condihen
Conoliten
A ad
in oise domain
desid
donninant
plaud
itrion
.
Pole Aocaesd
docaka ato
at esenalle
distaue to tue
The
lype I Orlu 2
k
sls+2)
Diz)
Duia bpeajual
10 Experiment 10
10.1 Design of Digital lead compensator using Root Locus
System :
1
G(S) =
s*(s+2)
Design Specifications 10-360-36
Initialization... 10-360-36
Desired Pole location .10-37
Finding the angle contributions of zeroes .10-37
10.3 Initialization
Z=0.5
Ts=2;
wn=4/(z*TS);
num=1;
den=[1 2 0];
G=tf (rum,den);
T=0.2;
GZ=c2d (G,T)
Gl = feedback (Gz, 1)
figure (1)
subplot (121)
rlocus(G1)
subplot (122)
step(G1)
Z =
0.5000
GZ =
0.01758 z + 0.01539
G1 =
0.01758 z + 0.01539
10-36| Page
Experiment 10
1.5
0.8
.6
D.5
0.4
0.2
-1.5
-2
4 healyis 1 Time (secoñds) 8 10
z=zero (Gz);
zang=zeros (1, size(z,1)) ;
zd =
0.5158 + 0.42811
P =
1.0000
0.6703
10-37 | Page
Experiment 10
if(real(z(i,1))>real (zd))
zang (i)=180-zang(i):
end
end
thetap=sum (pang);
thetaz=Sum (zang);
angdef=thetap-thetaz-180
=
angdef
51.2585
angzc=abs (atand ((abs (imag (zd) ) -imag (zc))/ (abs(real (zd)) -real(zc))))
ang=180-angzc-angdef;
ZC
0.6703
angzC =
70.1522
B(1)=1;
for i=l:size (z1, 1)
B(i+1) =abs (zd-z1(i));
B(i+1) =B(i)*B (i+1);
end
K=A(end) /B (end)
,
[num1, den1] =tfdata (Gz 'v');
Kl=K/num1(2);
Gt=K1Gf
10-38 Page
Experiment 10
G2 feedback (Gt,1)
figure (2)
subplot (12 1)
rlocus(G2)
subplot(122)
step (G2)
Zp =
0.2543
GCZ =
z -0.6703
Z -0.2543
Gf
A=
K=
0.2228
Gt =
G2 =
10-39 | Page
Experiment 10
- 0.3012
zA3 - 1.702 z^2 + 1.141 z
1.5
1 oesbes oseseoooreoaoore0e
0.8
3.6
.s 0.4
-1
0.2
-1.5
2
-4 -3 Reá Axis 0 1
Time (secoñds) 5
10-40Page
bvas bvenshoot wic
As
alsnt
te dai .
alanys to User eeds
imaginay aKs
a
i) The ua
gaud at
af pstin
desiyed
tic at te
Reslt:
lod cmpesalr daizud
elscett oltnaiw disreti Heot
licaigu aud the duigu sputiatio met.