Documente Academic
Documente Profesional
Documente Cultură
Im(s)
Re(s)
Theorems
• Initial Value Theorem
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
DC Gain of a stable transfer function
• DC gain (static gain) : the ratio of the steady state output
of a system to its constant input, i.e., steady state of the
unit step response
• Use final value theorem to compute the steady state of
the unit step response
Pure integrator
• ODE :
• Impulse response :
• Step response :
+ Ku(t)
+
R
y(t)
C
-
• ODE :
• Impulse response :
• Step response :
Amplitude
3
2.5
2
1.5
1
0.5
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
• step(G) 2.5
Step Response
2
Amplitude
1.5
• Time constant 1
0.5
0
0 0.5 1 1.5 2 2.5 3
Time (sec)
First order system response
Impulse response :
First order system response
Impulse response :
First order system response
Impulse response :
Step response :
Step Response
100
90
80
70
Amplitude
60
50
40
30
20
10
0
0 100 200 300 400 500 600
Time (sec)
First order system response
Im(s)
Re(s)
First order system response
Im(s)
Unstable
Re(s)
First order system response
Im(s)
Unstable
Re(s)
-1
First order system response
Im(s)
Unstable
Re(s)
-2
First order system response
Im(s)
Unstable
faster response slower response
Re(s)
constant
First order system – Time specifications.
First order system – Time specifications.
Time specs:
Time constant :
Settling time :
First order system – Simple behavior.
No overshoot
No oscillations
Impulse Response
analysis of second
order systems
Second order impulse response – Underdamped and
Undamped
Impulse response :
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
1
0.8
0.6
0.4
Amplitude
0.2
-0.2
-0.4
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
1
0.8
0.6
0.4
Amplitude
0.2
-0.2
-0.4
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
1
0.8
0.6
0.4
Amplitude
0.2
-0.2
-0.4
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
1
0.8
0.6
0.4
Amplitude
0.2
-0.2
-0.4
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
0.1
0.08
0.06
0.04
0.02
Amplitude
-0.02
-0.04
-0.06
-0.08
-0.1
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
0.1
0.08
0.06
0.04
0.02
Amplitude
-0.02
-0.04
-0.06
-0.08
-0.1
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
0.1
0.08
0.06
0.04
0.02
Amplitude
-0.02
-0.04
-0.06
-0.08
-0.1
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
0.1
0.08
0.06
0.04
0.02
Amplitude
-0.02
-0.04
-0.06
-0.08
-0.1
0 0.5 1 1.5 2 2.5 3
Time (sec)
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
6
3
Amplitude
-1
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (sec)
10
-5
-10
-6 -4 -2 0 2
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
6
3
Amplitude
-1
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (sec)
10
-5
-10
-6 -4 -2 0 2
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
6
3
Amplitude
-1
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (sec)
10
-5
-10
-6 -4 -2 0 2
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
6
3
Amplitude
-1
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (sec)
10
-5
-10
-6 -4 -2 0 2
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
5
2
Amplitude
-1
-2
-3
-4
0 2 4 6 8 10 12
6
Time (sec)
4
2
0
-2
-4
-6
-5 0 5
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
5
2
Amplitude
-1
-2
-3
-4
0 2 4 6 8 10 12
6
Time (sec)
4
2
0
-2
-4
-6
-5 0 5
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
5
2
Amplitude
-1
-2
-3
-4
0 2 4 6 8 10 12
6
Time (sec)
4
2
0
-2
-4
-6
-5 0 5
Second order impulse response – Underdamped and
Undamped
Increasing / Fixed
Impulse Response
5
2
Amplitude
-1
-2
-3
-4
0 2 4 6 8 10 12
6
Time (sec)
4
2
0
-2
-4
-6
-5 0 5
Second order step response – Underdamped and
Undamped
Second order impulse response – Underdamped and
Undamped
Unstable
Lower frequency oscillations
Second order impulse response – Underdamped and
Undamped
Less damping
Unstable
More damping
Second order step response – Time specifications.
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
Second order step response – Time specifications.
1.4
1.2
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
Second order step response – Time specifications.
Therefore,
Evaluating at ,
is defined as:
… Settling time.
when
Typical specifications for second order systems.
3
Step Response
analysis of second
order systems
Second order system (mass-spring-damper
system)
• ODE : F(t)=ku(t)
y(t)
k b
• Transfer function :
Polar vs. Cartesian representations.
Cartesian representation :
Polar representation :
… natural frequency
… damping ratio
Polar vs. Cartesian representations.
Cartesian representation :
Polar representation :
… natural frequency
… damping ratio
Polar vs. Cartesian representations.
Cartesian representation :
Polar representation :
… natural frequency
… damping ratio
Unless overdamped
Polar vs. Cartesian representations.
System transfer function :
… Undamped
Polar vs. Cartesian representations.
System transfer function :
… Undamped
Polar vs. Cartesian representations.
System transfer function :
… Undamped
Polar vs. Cartesian representations.
System transfer function :
… Undamped
Underdamped second order system
• Underdamped
Impulse Response
0.7
0.6
0.5
0.4
Amplitude
0.3
0.2
0.1
0
-0.1
-0.2
-0.3
0 2 4 6 8 10 12 14 16 18 20
Time (sec)
Unit step response of undamped systems
• Unit step response :
• DC gain :
Unit step response of undamped system
Matlab Simulation
• zeta = 0.3; wn=1; G=tf([wn],[1 2*zeta*wn wn^2]);
• step(G)
Step Response
1.4
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
Time (sec)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Stable 2nd order system:
Unstable
Re(s)
Second order system response.
Im(s)
Unstable
Re(s)
Second order system response.
Im(s)
Unstable
Re(s)
Second order system response.
Im(s)
Re(s)
Second order system response.
Im(s)
Re(s)
Second order system response.
Im(s)
Underdamped
Unstable
Undamped
Overdamped or Critically damped
Re(s)
Underdamped
Overdamped system response
Impulse response :
Step response :
Overdamped and critically damped system response.
Ove rdampe d and c ritic ally dampe d s ys te m re s po ns e .
Ove rdampe d
Ove rdampe d and c ritic ally dampe d s ys te m re s po ns e .
Ove rdampe d
Ove rdampe d and c ritic ally dampe d s ys te m re s po ns e .
Critically dampe d
Po lar vs . Carte s ian re pre s e ntatio ns .
Po lar vs . Carte s ian re pre s e ntatio ns .
System transfer function :
… Cartesian overdamped
… Undamped
Polar vs. Cartesian representations.
System transfer function :
… Cartesian overdamped
… Undamped
Polar vs. Cartesian representations.
System transfer function :
… Cartesian overdamped
… Critically damped
… Underdamped
… Undamped
PI Compensation
90
PI Control
Ki sa
C ( s) K p Kp
s s
a Ki K p
91
PI Remarks
92
Procedure 5.3
wn zwn
a or a
z 1 z 2 tan( ) 10
93
Comments
94
Pole-zero Diagram of PI Controller
scl jw
wd
p scl
z s cl a
a
zw n
95
Proof
w z
tan 180 p d
2
1
From zw n z
Figure
w z
tan 180 z
2
1
d
zw n a z x
a
x
wn
96
Proof (Cont.)
tan A tan B
Trig. identity tan A B
1 tan A tan B
1z 2 1z 2
zx z x 1z 2
tan
1z 2
1z x
1
z z x
1
x
Solve for x z 1 z 2 tan
3.5
x a wn z 10 3
z 1 z 2
tan 1
2.5
10 z 2
2
about 3 1.5
z
0.5
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
98
Example 5.6
1
G( s)
s( s 10)
99
Solution
1
Gi ( s) 2
s ( s 10)
• Procedure 5.1 with modified transfer function.
• Unstable for all gains (see root locus plot).
• Controller must provide an angle 249 at the
desired closed-loop pole location.
• Zero at 1.732.
• Cursor at desired pole location on compensated
system RL gives a gain of about 40.6.
100
RL of System With Integrator
Root Locus
6
4
Imaginary Axis
3 0.7
4
0
-10 -8 -6 -4 -2 0
Real Axis
101
RL of PI-compensated System
102
Analytical Design
103
MATLAB
» scl = 4*exp(j*(pi acos( 0.7)) )
scl =
-2.8000 + 2.8566i
» theta = pi + angle( polyval( [ 1, 10, 0, 0], scl ) )
theta =
1.9285
» a = 4*sqrt(1-.7^2)/tan(theta)+ 4*.7
a=
1.7323
» k = abs(polyval( [ 1, 10, 0,0], scl )/ polyval([1,a], scl) )
k=
40.6400
104
Design I Results
105
Step Response of PI-compensated
System
109
PD Control
• L= loop gain = N / D.
• scl = desired closed-loop pole location.
• Find a controller C s.t. L C(scl) = 180 or its odd
multiple (angle condition).
• Controller Angle for scl
wd
Zero location a zw n
tan C
110
Remarks
• Graphical procedures are no longer needed.
• CAD procedure to obtain the design parameters for
specified z & wn.
» evalfr(l,scl) % Evaluate l at scl
» polyval( num,scl) % Evaluate num at scl
• The complex value and its angle can also be evaluated
using any hand calculator.
111
Procedure:MATLAB or Calculator
1. Calculate L (scl)
»theta = pi angle(evalfr(l, scl) )
2. Calculate zero location using (5.14).
3. Calculate new loop gain (with zero)
» lc = tf( [1, a],1)*l
4. Calculate gain (magnitude condition)
» K = 1/abs( evalfr( lc, scl))
5. Check time response of PD-compensated
system. Modify the design to meet the desired
specifications if necessary (MATLAB).
112
Procedure 5.2: Given e() & z
1 K f G f ( s) 0
113
Procedure 5.2 (Cont.)
3. Obtain Kf corresponding to the desired closed-
loop pole location. As in Procedure 5.1, Kf can
be obtained by clicking on the MATLAB root
locus plot or applying the magnitude condition
using MATLAB or a calculator.
4. Calculate the free parameter from the gain Kf .
5. Check the time response of the PD
compensated system and modify the design to
meet the desired specifications if necessary.
114
Example 5.5
1
G( s)
s( s 4)
115
(a) z =0.7 & wn=10 rad/s
MATLAB: calculate pole location & corresponding gain
» scl = 10*exp( j*( pi-acos(0.7) ) )
scl =
7.0000 + 7.1414I
» g=zpk([ ],[0,-4],1); theta=pi( angle( evalfr( g, scl) ) )
theta =
1.1731
» a = 10 * sqrt(1-0.7^2)/ tan(theta) + 7
a=
10.0000
» k =1/abs(evalfr(tf( [1, a],1)*l,scl)) % Gain at scl
k=
10.0000 116
RL of Uncompensated System
Root Locus
8
0.7
7
5
Imaginary Axis
0
-8 -7 -6 -5 -4 -3 -2 -1 0
Real Axis
117
RL of PD-compensated System
Root Locus
8
0.7
System: gcomp
6 Gain: 10
Pole: -7.01 + 7.13i
Damping: 0.701
4 Overshoot (%): 4.56
Frequency (rad/sec): 10
2
Imaginary Axis
10
0
-2
-4
-6
0.7
-8
-20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0
Real Axis
118
(b) z =0.7, e()=4% for unit ramp
Ka 100
K v 25 Ka 100 i.e. a
4 K
Closed-loop characteristic equation with PD
sa
1 K 0
s( s 4)
Assume that K varies with K a fixed, then
s
1 K 2 0
s 4 s 100
119
RL of PD-compensated System
K a fixed
120
(b) Design Cont.
121
PID Compensation Networks
Different Types of Feedback Control
On-Off Control
Lastly, please keep in mind that you do not need to implement all three controllers
(proportional, derivative, and integral) into a single system, if not necessary. For
example, if a PI controller gives a good enough response (like the above
example), then you don't need to implement derivative controller to the system.
Keep the controller as simple as possible.
Open-Loop Control - Example
1
G( s )
2
s 10s 20
num=1;
den=[1 10 20];
step(num,den)
Proportional Control - Example
The proportional controller (Kp) reduces the rise time, increases the
overshoot, and reduces the steady-state error.
Kp
T( s )
MATLAB Example 2
s 10 s ( 20 Kp)
Step Response
From: U(1)
1.4
num=[Kp]; 1
0.9
Amplitude
0.8 0.8
To: Y(1)
0.6
t=0:0.01:2;
Amplitude
To: Y(1)
0.4
0.5
step(num,den,t) 0.2
K=300 0.4 K=100
0.3
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.2
Time (sec.)
0.1
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (sec.)
Proportional - Derivative - Example
The derivative controller (Kd) reduces both the overshoot and the
settling time.
Kd s Kp
T( s )
MATLAB Example 2
s ( 10 Kd) s ( 20 Kp)
Step Response
From: U(1)
1.4
1.2
Kd=10; 0.8
To: Y(1)
0.9
0.6 0.8
Kd=10 0.6
Amplitude
den=[1 10+Kd 20+Kp];
To: Y(1)
0.2 0.5
0.4
0
Time (sec.)
1.2 1.4 1.6 1.8
0.3
2
0.2
Kd=20
step(num,den,t) 0.1
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (sec.)
Proportional - Integral - Example
The integral controller (Ki) decreases the rise time, increases both
the overshoot and the settling time, and eliminates the steady-state
error Kp s Ki
T( s )
3 2
MATLAB Example s 10 s ( 20 Kp) s Ki
Step Response
From: U(1)
1.4
1.2
Kp=30; Step Response
From: U(1)
1 1.4
Ki=70; 1.2
Amplitude
0.8
To: Y(1)
1
0.6
num=[Kp Ki];
Ki=70
Amplitude
0.8
To: Y(1)
0.4
0.4
0
Time (sec.)
1.2 1.4 1.6 1.8
0.2
2
Ki=100
0
step(num,den,t) 0 0.2 0.4 0.6 0.8 1
Time (sec.)
1.2 1.4 1.6 1.8 2
RLTOOL
Syntax
rltool
rltool(sys)
rltool(sys,comp)
RLTOOL
RLTOOL
RLTOOL
RLTOOL
Example - Practice
A first-order lead compensator can be designed using the root locus. A lead compensator
in root locus form is given by
( s z)
G c( s )
( s p)
where the magnitude of z is less than the magnitude of p. A phase-lead compensator
tends to shift the root locus toward the left half plane. This results in an improvement in
the system's stability and an increase in the response speed.
When a lead compensator is added to a system, the value of this intersection will be a
larger negative number than it was before. The net number of zeros and poles will be the
same (one zero and one pole are added), but the added pole is a larger negative number
than the added zero. Thus, the result of a lead compensator is that the asymptotes'
intersection is moved further into the left half plane, and the entire root locus will be
shifted to the left. This can increase the region of stability as well as the response speed.
Lead or Phase-Lead Compensator Using Root Locus
In Matlab a phase lead compensator in root locus form is implemented by using the
transfer function in the form
numlead=kc*[1 z];
denlead=[1 p];
and using the conv() function to implement it with the numerator and denominator
of the plant
newnum=conv(num,numlead);
newden=conv(den,denlead);
Lead or Phase-Lead Compensator Using Frequency Response
A first-order phase-lead compensator can be designed using the frequency response. A lead
compensator in frequency response form is given by
1 s 1
Gc( s )
1 s
p
1
z
1
wm z p
sin m
1
In frequency response design, the phase-lead compensator adds positive phase to the system
over the frequency range. A bode plot of a phase-lead compensator looks like the following
Lead or Phase-Lead Compensator Using Frequency Response
Additional positive phase increases the phase margin and thus increases the stability of
the system. This type of compensator is designed by determining alfa from the amount of
phase needed to satisfy the phase margin requirements, and determining tal to place the
added phase at the new gain-crossover frequency.
Another effect of the lead compensator can be seen in the magnitude plot. The lead
compensator increases the gain of the system at high frequencies (the amount of this gain
is equal to alfa. This can increase the crossover frequency, which will help to decrease the
rise time and settling time of the system.
Lead or Phase-Lead Compensator Using Frequency Response
A first-order lag compensator can be designed using the root locus. A lag compensator in root
locus form is given by
( s z)
G c( s )
( s p)
where the magnitude of z is greater than the magnitude of p. A phase-lag compensator tends to
shift the root locus to the right, which is undesirable. For this reason, the pole and zero of a lag
compensator must be placed close together (usually near the origin) so they do not appreciably
change the transient response or stability characteristics of the system.
When a lag compensator is added to a system, the value of this intersection will be a smaller
negative number than it was before. The net number of zeros and poles will be the same (one
zero and one pole are added), but the added pole is a smaller negative number than the added
zero. Thus, the result of a lag compensator is that the asymptotes' intersection is moved closer
to the right half plane, and the entire root locus will be shifted to the right.
Lag or Phase-Lag Compensator Using Root Locus
It was previously stated that that lag controller should only minimally change the
transient response because of its negative effect. If the phase-lag compensator is
not supposed to change the transient response noticeably, what is it good for? The
answer is that a phase-lag compensator can improve the system's steady-state
response. It works in the following manner. At high frequencies, the lag controller
will have unity gain. At low frequencies, the gain will be z0/p0 which is greater
than 1. This factor z/p will multiply the position, velocity, or acceleration constant
(Kp, Kv, or Ka), and the steady-state error will thus decrease by the factor z0/p0.
In Matlab, a phase lead compensator in root locus form is implemented by using
the transfer function in the form
numlag=[1 z];
denlag=[1 p];
and using the conv() function to implement it with the numerator and
denominator of the plant
newnum=conv(num,numlag);
newden=conv(den,denlag);
Lag or Phase-Lag Compensator using Frequency Response
A lead-lag compensator combines the effects of a lead compensator with those of a lag
compensator. The result is a system with improved transient response, stability and
steady-state error. To implement a lead-lag compensator, first design the lead
compensator to achieve the desired transient response and stability, and then add on a lag
compensator to improve the steady-state response
Exercise - Dominant Pole-Zero Approximations and Compensations
The influence of a particular pole (or pair of complex poles) on the response is mainly determined
by two factors: the real part of the pole and the relat ive magnitude of the residue at the pole. The
real part determines the rate at which the transient t erm due to the pole decays; the larger the real
part, the faster the decay. The relative magnitude of the residue determines the percentage of the
total response due to a particular pole.
Investigate (using Simulink) the impact of a closed-loop negative real pole on the overshoot of a
system having complex poles.
2
pr wn
T( s )
( s pr) s 2 z wn s wn
2 2
Make pr to vary (2, 3, 5) times the real part of the complex pole for different values of z (0.3, 0.5,
0.7).
Investigate (using Simulink) the impact of a closed-loop negative real zero on the overshoot of a
system having complex poles.
( s zr)
T( s )
s 2 2 z wn s wn 2
Make zr to vary (2, 3, 5) times the real part of the complex pole for different values of z (0.3, 0.5, 0.7).
Exercise - Lead and Lag Compensation
Investigate (using Matlab and Simulink) the effect of lead and lag compensations on the two
systems indicated below. Summarize your observations. Plot the root-locus, bode diagram
and output for a step input before and after the compensations.
Remember
lead compensation: z<p (place zero below the desired root location or to the left of the first two
real poles)
lag compensation: z>p (locate the pole and zero near the origin of the s-plane)