Professional Documents
Culture Documents
Assignment 1 Reference
Assignment 1 Reference
phase
margin is negative.
Lenzing 8:
What is the condition for stability in a Bode diagram?
Ans:
Gain margin below 0dB is positive gain margin. Phase margin above -180 o line is positive phase
margin.
Lenzing 9:
Given the following open-loop transfer function of a control system. Show how to draw the Bode
diagram using Matlab.
Obtain the gain margin and phase margin from the plot.
Ans:
5.2
0.01s 0.25s 2 s
3
Matlab Code:
clf % clear figure
G=tf([5.2], [0.01 0.25 1 0]);
bode(G)
margin(G)
OR
clf % Clear figure
s=tf('s'); % Define s as transfer function
g=(5.2)/(0.01*s^3+0.25*s^2+s); % Same as C++ maths
G=minreal(g);
bode(G)
margin(G)
The system is stable because both gain margin and phase margin are positive.
Gain margin (at the top of the picture box) = +13.6 dB
Phase margin (at the top of the picture box) = 40.2 deg
Nichols diagram
Lenzing 10:
Given the following open-loop transfer function of a control system. Show how to draw the
Nichols diagram using Matlab.
G ( s)
1000
s (4 s 8)(8s 5)
Ans:
Matlab Code:
clf % Clear figure
s=tf('s'); % Define s as transfer funtion
g=(1000)/[s*(4*s+8)*(8*s+5)];
G=minreal(g);
nichols(G)
Compensators:
A compensator when added to the transfer function of a control system can alter the gain
margin, phase margin, rise time, settling time, overshoot, steady-state error, etc. of the system.
Lenzing 11:
Given the following open-loop transfer function of a control system.
G ( s)
Gc ( s) 1
1000
s (4 s 8)(8s 5)
( s 1)
( s 100)
A compensator of type,
is to be added to the above transfer function. Draw
the Nichols diagram of the uncompensated and compensated systems on the same plot using
Matlab.
The uncompensated system has the following transfer function:
G ( s)
1000
s (4 s 8)(8s 5)
Gall =
Matlab Code:
clf % clear figure
s=tf('s');
g=(1000)/[s*(4*s+8)*(8*s+5)]; % Draw
G=minreal(g);
nichols(G,'r') % r=red color
1000
s (4s 8)(8s 5)
( s 1)
( s 100)
G(s) first.
Gall
H
1000(8s 13) 4 s (1 s )
.
s(2 s 12)(8s 13) 4 s(1 s)
from
PID Controller:
PID is a special controller which allows rise time, settling time, overshoot, stead-state error, etc.
of a control system to be altered.
P = proportional control (i.e. gain control)
I = integral control (i.e. integration control)
D = differential control (i.e. differentiation control)
Sometimes P control alone is used. Combination of PI, PD or PID control is also often used in
control systems.
Lenzing 12:
Plot step response for the closed-loop transfer function and comment on the response (if
any), when
Kp=1, Kd=0, Ki=0.
Ans:
Kp
P = proportional control =
I = integral control =
Ki
s
Kd s
D = differential control =
We must first find the forward path transfer function, substituting Kp=1, Kd=0, Ki=0, this give us
G forward
0s 2 1s 0
0.01
.
2
s
0.005s 0.06 s 1.001
Difficult to reach amplitude 1.0 in a short time (must have comment for
each graph).
10