Professional Documents
Culture Documents
ENGINEERING
Digital Controller Design & Simulation for a Servo System (Practical CO2)
1.1 AIM
The aim of this practical is to design and simulate a digital controller for a servo system and thereafter
investigate the behaviour of the system under different conditions.
1
d ia 1
= ( V −i R −k ω)
dt La t a a ω
2
This confirms equation 2
i a ( s) β+ Js
(b) G 2 ( s )= =
V t (s) L a J s + ( Ra J + La β ) s+ ( R a β +k φ2 )
2
T i (s)
(c) G 3 ( s )= =−J− β
ω( s)
T i (s) La J s + ( R J + L β ) s+ ( R−k φ )
2 2
(d) G 4 ( s )= =
i a (s ) kφ
3
[num den] = ss2tf(A, E, C, D, 1)
num(2,2)=0
V2v = tf(num(2,:), den)
figure(1)
bode(V2v);
title('Bode plot of V to v');
% Transfer function of V-I (with bode plot)
[num den] = ss2tf(A, E, C, D, 1)
V2i = tf(num(1,:), den)
figure(2)
bode(V2i);
title('Bode plot of V to i');
% Transfer function of TL-v (with bode plot)
[num den] = ss2tf(A, E, C, D, 2)
TL2v = tf(num(2,:), den)
figure(3)
bode(TL2v);
title('Bode plot of TL to v');
% Transfer function of TL-i (with bode plot)
[num den] = ss2tf(A, E, C, D, 2)
TL2i = tf(num(1,:), den)
figure(4)
bode(TL2i);
title('Bode plot of TL to i');
Bode plot of V to v
20
-20
-40
-60
-80
P h a s e (d e g )
-45
-90
-135
-180
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/s)
Bode plot of V to i
20
10
-10
-20
-30
90
45
-45
-90
-3 -2 -1 0 1 2 3
10 10 10 10 10 10 10
Frequency (rad/s)
4
Figure 2: Bode plot of Voltage to Current
5
T i s +1 T d s+1
Gc (s)=k p
T i s ( 1 ) T d s +1
T i s +1 T d s+1
G c (s)=k p
T i s T d s+1
T i s +1
G c (s)=k p
Tis
The controller structure becomes dependent on the integral term only if when α =1.
b. When T i=α T d
c. when T d=0,
T i s +1
Gc (s)=k p
Tis
6
G ( s )=k p
( T i s+ 1
Ti s ) (
=k p 1+
1
Tis )
Choose Ti to cancel the seconds fastest time constant in the system.
Method 1:
R 0.12
T i= = =4
L 20 ×10−3
Method 2:
B 0. 08
T i= = =0. 044
J 1. 8
The largest value of T i was set to 6 as this would cancel the second fastest time constant in
the system.
kp=120
ti=4
s=tf('s')
g=kp*(1+(1/(ti*s)))
sisotool(g)
Poles and zeros were then added to the plot in order to obtain a stable function.
7
Figure 7: Bode plot for the transfer function
Using this transfer function and the system parameters the following Simulink model could
be designed using cascade control:
8
Figure 10: Simulink model of the servo system
4. CONCLUSION
5. REFERENCES