You are on page 1of 10

DISCLIPLINE OF MECHANICAL

ENGINEERING

Pre-Post Practical Report

Digital Controller Design & Simulation for a Servo System (Practical CO2)

Control Systems (ENEL3CS) Semester 2: 2020

Mchunu Lindokuhle : 216025962


1. INTRODUCTION
This practical involves the design of a PID controller which will be used for industrial applications.
These applications involve the speed and position of the motor. The basic layout consists of active and
passive components. Electrical mechanical properties have to be considered

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.

2. THE SERVO SYSTEM EQUATIONS


The motor system may be represented by the Figure 1.

Figure 1: Electrical Characteristics of a Motor


Using KVL circuit:
V t −i a R a−V L−e a=0

Where: e = electromagnetic field voltage produced from the motor


R = armature resistance
L = armature inductance
V(t) = input voltage
i = motor current
but:
e =𝐾𝜙 ω

Where: 𝐾𝜙 = machine constant


ω = shafts angular velocity
Adding Eq1. and Eq2. ,

1
d ia 1
= ( V −i R −k ω)
dt La t a a ω

This confirms the first equation


Considering Figure 2.

Figure 2: Physical Characteristics of a Motor

By Newton’s laws for sum of moments about an axis, Equation 4 is computed



T −T L −T B −J =0
dt

Where: T = Machine Torque


𝑇𝐿= Load Torque
𝛽 = Machine vicious friction
ω= angular velocity
J = Machine and Load inertia

= angular acceleration
dt
But:
T = 𝐾𝜙 𝑖

Where: 𝐾𝜙 = Machine Constant


𝑖= Current
From Equation 4 and the addition of Equation 5.
dω 1
= (k i −T L−βω)
dt j ϕ a

2
This confirms equation 2

2.2 DERIVED TRANFERE FUNCTIONS, RELATED TO THE DYNAMIC OF SERVO


SYSTEM
ω( s) kφ
(a) G1 ( s )= =
V t ( s) La J s + ( Ra J + La β ) s+ ( Rβ +k φ 2 )
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φ

2.3 MATLAB CODING AND BODE PLOTS

The constraints given in the practical hand-out are seen in Table 1.


Table 1
i State variable – current A -
υ State variable - rotational speed rad/s -
L Armature inductance mH 20
R Armature resistance Ω 0.12
kφ Machine constant - 0.4
J Machine and load inertia kg m2 1.8
B Machine viscous friction Nm 0.08
s

% Constants and steady state matrices


L = 0.020; % Armature Inductance
R = 0.12; % Armature Resistance
kphi = 0.4; % Machine Constant
J = 1.8; % Machine, and Load Inertia
B = 0.08; % Machine Viscous Friction
A = [ -R/L -kphi/L; kphi/J -B/J ];
E = [ 1/L 0; 0 -1/J ];
C = [ 1 0; 0 1 ];
D = [ 0 0; 0 0 ];
% Transfer function of V-v (with bode plot)

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');

VOLTAGE TO SPEED TRANSFER FUNCTION


M a g n it u d e ( d B )

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)

Figure 1:Bode plot of Voltage to Speed

VOLTAGE TO CURRENT TRANSFER FUNCTION


P h a s e ( d e g ) M a g n it u d e ( d B )

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

MACHINE TORQUE TO SPEED TRANSFER FUNCTION

Figure 3: Bode plot of Load Torque to speed

MACHINE TORQUE TO CURRENT TRANSFER FUNCTION

Figure 4: Bode plot of Load Torque to Current

2.4 PID CONTROLLERS


a. when α =1
The transfer function:

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

The transfer function:


α T d s +1 T d s+1
Gc (s)=k p
α T d s α T d s +1
T d s+ 1
Gc (s)=k p
αTds

c. when T d=0,

The transfer function:


T i s +1 (0) s+1
Gc (s)=k p
T i s α (0)s+1
T i s +1 1
Gc (s)=k p
Tis 1

T i s +1
Gc (s)=k p
Tis

3.2 CLOSE THE FEEDBACK LOOP

 Set the Derivative Action to Zero


The derivative function was set to zero and the way this was achieved was by setting T d=0
And the obtained function became;

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.

 Use Ziegler Nichols rules for PI and PID.


0.9T i 0.9 ( 4 )
k p= = =120
L 20× 10−3

 Root locus tuning


For this question a compensator was designed using the SISOTOOL function in MATHLAB.
Using the k p value obtained, the following transfer function could be obtained:

G ( s )= ( 480 s+4 s120 )


The following code was used to input this transfer function into SISOTOOL:

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

Figure 8: Step response

3.3 CASCADE CONTROLLER


The position transfer function could be obtained using the information worked out before and
is as follows:
T ( s ) =C ( s ) ×G(s)

Using this transfer function and the system parameters the following Simulink model could
be designed using cascade control:

Figure 9: Simulink model of the cascaded controller

8
Figure 10: Simulink model of the servo system

4. CONCLUSION

According to the information obtained from the experiment, introduction of PI or PID


controller can stabilize the system. The Ziegler Nichols rules for PI and PID were verified.
Controllers improve steady state accuracy by decreasing the steady state errors. As the steady
state accuracy improves, the stability of the system is also improved. They also help in
reducing the offsets produced in the system. Maximum overshoot of the system can be
controlled using these controllers. They also help in reducing the noise signals produced in
the system. Slow response of the over damped system can be made faster with the help of
these controllers

5. REFERENCES

[1] Control Systems, Practical Manual, Durban, 2020.

You might also like