EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Tests for Stability:
Jurys test
This is an algebraic test, similar in form to the Routh - Hurwitz approach,
that determines whether the roots of a polynomial lie within the unit circle.
As for Routh - Hurwitz, the test consists of two parts:
(1) simple test for necessary conditions
(2) test for sufficient conditions
For a polynomial of the form:
F z an z n an1z n1 L a1z a0 0
the necessary conditions for stability are:
F 1 0
and
1n F 1 0
an 0
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
The sufficient conditions for stability are obtained by forming a table as
follows:
row
z0
z1
z2
z nk
z n1 z n
a0
a1
a2
ank
an1 an
an
ak
a1
b0
b2
bnk
bn1
bn1 bn2
bn3
bk
b0
c0
c1
c2
c n2
c n2
c n3
c n4
c0
2n 5
p0
p1
p2
p3
2n 4
p3
p2
p1
p0
2n 3
q0
q1
q2
an1 an2
b1
a0
where:
bk
a0
ank
an
ak
ck
b0
bn1k
bn1
bk
dk
c0
cn2k
cn2
ck
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
The sufficient conditions for stability are given by:
b0 bn1
c 0 c n2
n 1 conditions
M M
p0 p 3
q0 q2
a0 an
These inequality conditions must provide conclusive results - singularities
occur if the first and last elements of any row are zero.
Singularities can be dealt with by considering an infinitesimal contraction
and expansion of the unit circle using the transformation
z 1 z
where is a very small number.
The difference between the no. of roots found inside (or outside) the unit
circle when the circle is expanded and contracted by is the no. of roots
on the unit circle.
The transformation is applied by using:
1 n z n 1 n z n
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
the coefficient of the z term is multiplied by 1 n .
n
CE: z 2 z 2 0
Example:
Necessary conditions:
F 1 12 1 2 2 0
1n F 1 12 12 1 2 4 0
Sufficient conditions:
row
1: a0 2
a1 1
a2 1
a2 1
a1 1
a0 2
a0 2 2
and
a2 1
a0 a2
system is UNSTABLE
2:
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Tests for Stability:
bilinear transform & Routh - Hurwitz test
bilinear transform
or
1w
1w
z 1
gives w
, undefined atz 1
z 1
w 1
w 1
z 1
gives w
, undefined atz 1
z 1
Maps the inside of the unit circle in the z - plane into the LH w - plane.
Now can use Routh-Hurwitz criterion on the CE in the w - plane.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Review of Routh - Hurwitz
Consists of
(1) test for necessary conditions
(2) test for sufficient conditions
For a polynomial of the form
F s ans n an1s n1 L a0 0
the necessary condition for stability is that all the coefficients are present
and have the same sign.
Sufficient conditions are obtained from the following table:
sn
an
an2
an4 an6 K
s n1 an1 an3
an5
s n2
bn1 bn2
bn3
s n3
c n1 c n2
c n3
s n4 d n1 d n2
M
s0
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
where
bn k
an
an 2k
an1 an 1 an2k 1
d nk
1 bn1 bnk 1
cn1 cn1 cnk 1
cnk
1 an1 an2k 1
bn1 bn1 bnk 1
Every change of sign in the first column of this array signifies the
presence of a root with a positive real part.
Two different types of singularity can occur:
(a) zero in first column - solution is to let 1 s and repeat the procedure.
(b) full row of zeros (indicates diametrically opposite roots) solution is to solve the auxiliary equation (i.e. the polynomial whose
coefficients are the elements of the row immediately above the row of
zeros) to give the offending roots. The Routh array is completed by
replacing the row by the coefficients of the first derivative of the
auxiliary equation.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
CLCE: z 2 z 2 0
Example:
use z
1 w
1 w
1 w 2 1 w 2 0
1 w 2 1 w
CE becomes
2w 2 w 1 0
Necessary conditions:
all coefficients present
and have the same sign
Sufficient conditions:
w2 :
w1 :
-1
1 2 1
1
1 1 0
w :
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
2 sign changes in the first column - 2 unstable poles
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Time Domain Analysis
As with the continuous-time case, we can characterize the time response
of digital systems by overshoot, rise time etc.
y t
% overshoot (PO )
100
tr
tp
ts
max. overshoot from standard 2nd order curve
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
discrete-time case: care must be taken that sampling period is sufficiently
small.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Example: - OLTF G s
1
s 1 2s
Find CLTF and hence determine the closed loop unit step response.
For sampling times of 0.25 s and 1.0 s, find the OL z - transfer function,
the CL z - transfer function and hence the CL unit step response.
Using MATLAB:
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
% MATLAB commands (code) to produce step responses, root loci,
% frequency responses for a continuous and discrete time system.
% (comments begin with a %)
clf reset;
%clear all figures and reset properties
K=1;T=2;
%system parameters
num=K;
%open loop numerator
den=[T 1 0];
%open loop denominator polynomial
cont_sys=zpk([],[0 -1/T],K/T);
%define continuous time system in
zero/pole/gain form
%calculate and display the closed loop system
cl_cont_sys=feedback(cont_sys,1)
pause
tfinal=20;
t=[0:0.1:tfinal];
figure(1)
step(cl_cont_sys,t)
hold on
pause
[y,x]=step(cl_cont_sys,t);
%set final time
%produce time vector
%plot now
%store results for later
Ts1=0.25;
%define sampling period
dis_sys1=c2d(cont_sys,Ts1,'zoh') %discretize system
cl_dis_sys1=feedback(dis_sys1,1) %close the feedback loop
step(cl_dis_sys1,tfinal)
pause
k1=[0:tf/Ts1];
%"time" vector
[yz1,xz1]=step(cl_dis_sys1,tfinal); %store results for later
Ts2=1.0;
dis_sys2=c2d(cont_sys,Ts2,'zoh');
cl_dis_sys2=feedback(dis_sys2,1)
step(cl_dis_sys2,tfinal)
pause
hold off
k2=[0:tf/Ts2];
[yz2,xz2]=step(cl_dis_sys2,tfinal);
%increase sampling period
%repeat
%close the feedback loop
%"time" vector
%store results for later
%Produce all plots together for comparison.
plot(t,y,k1*Ts1,yz1,'+',k2*Ts2,yz2,'o')
pause
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
%Now do root loci
figure(2)
rlocus(cont_sys)
pause
rlocus(dis_sys1)
axis('equal')
pause
rlocus(dis_sys2)
axis('equal')
pause
%Finally look at frequency response
figure(3)
bode(cont_sys)
hold on
pause
bode(dis_sys1)
pause
bode(dis_sys2)
pause
hold off
%Nyquist plots don't work very
% - need to restrict frequency
figure(4)
wmin=0.1;
wmax=10;
nyquist(cont_sys,{wmin,wmax})
axis([-2 1 -2 1])
grid
hold on
pause
nyquist(dis_sys1,{wmin,wmax})
axis([-2 1 -2 1])
grid
pause
nyquist(dis_sys2,{wmin,wmax})
axis([-2 1 -2 1])
grid
pause
hold off
axis('normal')
well due to type 1 system
range and specify axes.
%set minimum frequency
%set maximum frequency
%set axis limits
EE5563: Microprocessors and Embedded Systems
close all
Lecture 7b Continuation of Lecture 7a
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Root Locus Analysis
Block diagram algebra of closed - loop sampled - data systems leads to
characteristic equations of the form,
1 Gz H z , 1 GH z , etc
or in general 1 P z where P z is a formulation of the open - loop
transfer function, the exact nature of which is determined by the position
of samplers in the loop.
P z is a rational function in z and therefore the characteristic polynomial
can be written in standard pole - zero form as:
K z z i
z pi
(1)
where z i are the open loop system zeros, p i the open loop system poles
and K is a variable gain term.
Eq. (1) is in exactly the same form as can be obtained for root - locus
analysis of characteristic polynomials in the s - domain and therefore the
analysis is identical.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
The only difference lies in the definition of the stability boundary.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Review of Root Locus
Although computer packages for plotting the root - locus are now readily
available, it is important to know the basic rules for sketching the loci.
Re-writing (1) as
K z z 1z z 2
z p1z p2
z zm 1
z zn
(2)
then any point on the root locus must satisfy the magnitude condition:
K z z1 z z 2 z zm
(3)
1
z p1 z p2 z pn
and the angle condition:
z z 1 z z 2
z z m
z p1 z p 2
i
z pn i
(4)
3, 1,1, 3,5,
The angle condition is used to locate points on the root locus and the
magnitude condition gives the value of K at that point.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Manual sketching of the root - locus diagram is considerably eased by a
series of rules that when methodically applied give a good indication of
the shape of the loci.
1) The loci start (i.e. K 0 ) at the n poles of the open loop TF P z
2) The no. of loci is equal to the order of the characteristic equation. (The
plot is symmetrical about the real axis.)
3) The root loci end (i.e. K ) at the m zeros of P z , and if m < n
(usual) then the remaining n - m loci tend to infinity.
4) Portions of the real axis are sections of a root locus if the no. of poles
and zeros lying on the axis to the right is odd.
5) Those loci terminating at infinity tend towards asymptotes at angles
relative to the positive real axis given by:
3
5
2n m 1 (5)
,
,,
n m n m n m
n m
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Examples:
120
90
3 excess poles
45
4 excess poles
6) The intersection of the asymptotes on the real axis occurs at the
'centre of gravity' of the pole - zero configuration of P z , i.e. at
z
poles of P z zeros of Pz
n m
(6)
7) The intersection of the root - loci with the unit circle can be calculated
by Jury, Bilinear Transformation/Routh - Hurwitz or geometrical analysis
(only on some plots).
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
8) The breakaway points (points at which multiple roots of the
characteristic polynomial occur) of the root locus are the solutions of
dK
0 (not all the solutions are necessarily breakaway points.)
dz
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Examples
j z
1
P (z ) z p
1
p1
j z
z z1
P (z ) z p
1
p1
z1
j z
1
P (z ) z p z p
1
2
p1
p2
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
z z1
P (z ) z p z p
1
2
j z
z1
p1
z z1
P (z ) z p z p
1
2
j z
p1
z z1
P (z ) z p z p
1
2
p2
p2 z
z1
p1
z1
p2
j z
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
P (z ) z p z 1p z p
1
2
3
p3
p 2 p1
z z1
P (z ) z p z p z p
1
2
3
z1
p3
j z
p2
j z
p1
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Lines of constant damping ratio, :
in the s-plane, constant is represented by:
j
= constant
2
s n j n 1
using the mapping z e sT
z e T j T
T
z e
n
so
1 2
e T e j T 1
z nT 1 2
and
2
For fixed , as n increases:
z decreases exponentially; z increases linearly
i.e. logarithmic spiral
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Settling time considerations:
For settling to within 5%, t s
So
- depends on n
real part of s 3t
s
T
In the z-plane, z e
n
z e
3T t
j z
radius e
1
1T
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Digital Control System Design
General requirements:
stability of the closed-loop system
good transient behaviour
good steady state behaviour
good disturbance rejection
+
the control algorithm must be realizable
i.e. not require future values of control signals
Design Methods
continuous-time design followed by digital re-design
digital frequency domain design
digital root locus design
state feedback design
digital PID design
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
deadbeat response design
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Digital Re-Design of Continuous-Time Controllers
-
one of the simplest methods
Procedure:
design continuous compensator using traditional methods
(Bode, phase lead etc)
then discretize the resulting compensator.
Traditionally popular in industry
-
continuous methods are well understood
many processes have existing continuous-time compensators
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
1 a) Numerical Integration: Forward Rectangular Rule
consider a continuous variable u t :
u t
T
T
5T
Y s 1
if y t u t dt area under curve , then D s
U s s
u t dt
2T
3T
4T
area of rectangles
i.e. y kT y k 1T Tu k 1T
e.g. y 4T y 3T new area
Y z Tz 1
T
so D z
U z 1 z 1 z 1
D z is obtained from D s by making the substitution:
EE5563: Microprocessors and Embedded Systems
z 1
T
Lecture 7b Continuation of Lecture 7a
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
1 b) Numerical Integration: Backward Rectangular Rule
u t
T
T
2T
3T
4T
5T
so y kT y k 1T Tu kT
D z
Y z
T
Tz
U z 1 z 1 z 1
so D z is obtained from D s by making the substitution:
z 1
s
Tz
alternatively, can also consider
sY s
dy y y kT y k 1T
dt
t
T
finite difference
1 z 1
Y z
T
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
1 c) Numerical Integration: Tustins Rule
u t
A
T
2T
3T
4T
5T
y t u t dt area of trapeziums
so y kT y k 1T
T
u kT uk 1T
i.e. y 4T y 3T A
Y z T 1 z 1 T z 1
D z
U z 2 1 z 1 2 z 1
remembering D s
substitution:
2 z 1
s
T z 1
1
, D z is obtained from D s by making the
s
Tustins rule
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
(bilinear transformation)
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Stability Considerations of Numerical Integration Rules
The following relations can be derived:
a) forward rectangular rule:
z 1Ts
b) backward rectangular rule:
1
1Ts
c) Tustins rule:
1Ts 2
1Ts 2
Letting s j gives the stability boundary for each approximation:
a)
a stable D s could give
b)
c)
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
unstable D z
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Pre-warping with Tustins Rule
The stability boundary using Tustins rule is the same as z e sT
BUT the complete j axis is mapped into the 2 circumference of the
unit circle which is not the case for the mapping z e sT
a large amount of frequency distortion occurs
A measure of the distortion can be obtained by considering the
relationship between c in the s-domain and d in the z-domain
z e jdT
j dT
1
2 e
From Tustins rule: jc
T e j dT 1
i.e. s jc
and
2 e j d T 2 e jd T
jc
T e j d T 2 e jd T
2
c tandT 2
T
2
2
2 2 j sindT 2
T 2 cosdT 2
The distortion can be eliminated for a particular frequency of interest,
a by modifying Tustins rule:
EE5563: Microprocessors and Embedded Systems
a
z 1
tanaT 2 z 1
Lecture 7b Continuation of Lecture 7a
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
2. Pole-Zero Mapping
An alternative approach is to use the mapping z e sT .
For a continuous signal y t , the poles of the Laplace transform Y s
are related to the poles of the z-transform Y z of y kT by z e sT .
This is NOT true for the zeros of Y s and Y z and the z-transform
must be obtained to locate the zeros.
For small T, z e sT is approximately true for the zeros as well as the
poles.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Heuristic Rules:
1. All poles of D s are mapped according to z e sT
s p 0
z e pT 0
2. All finite zeros of D s are also mapped according to z e sT
s 0
z e
3. EITHER: the q zeros of D s at s , where q is the pole excess, are
mapped to z 1 i.e. Dz zeros at z 1
OR: q 1 zeros of D s at s are mapped to z 1 and the
remaining zero at s is mapped to a zero at z
(This leads to a D z which has a unit delay in its impulse response.)
4. The gain of D z is selected to match the gain of D s at the band
centre, or a similar critical frequency. In most control applications, the
critical frequency is s 0 so typically:
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
D z z 1 D s s 0
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
3. Zero-order Hold Equivalence
A final approach is to consider a transformation such that D s and
D z have identical step responses at the sampling instants
i.e.
or
1 1
1
D
s
D z
1
z
s
t kT
1
1
1
D z
D
s
1 z 1
s t
The MATLAB command c2d converts
from continuous to discrete-time:
- the default method is zoh
- other methods are:
foh
tustin
prewarp
matched
kT
D s
s
D z 1 z 1
D s s1
i.e.
D(z)
ZOH
D(s)
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
This is probably the most popular approach.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
s
s 2 s 25
{bandpass filter with a centre frequency of 0 5 rads 1}
Example: Digital Re-design of D s
First determine a suitable sampling period T:
- consider the frequency response of the continuous system at 1.5 Hz;
D j 0.2
(i.e. < -14 dB)
suitable sampling frequency fs 2 1.5 3 Hz (but could be
higher)
1
sec
3
1. a) Forward rectangular rule (FR)
s
s 2 s 25
z 1 T
z 2 2z 1 T 2 z 1 T 25
z 1
0.3333z 0.3333
3z 2 5z 10.33 z 2 1.6667z 3.4444
(unstable)
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
1. b) Backward rectangular rule (BR)
s
z 1 Tz
s 2 s 25
z 2 2z 1 T 2z 2 z 1 Tz 25
z z 1
12.33z 2 7z 3
1. c) Tustins rule (TU)
s
s 2 s 25
0.0811z 2 0.0811z
z 2 0.5676z 0.2432
2 z 1
T z 1
4 z 1 2 z 1
25
2
2
T z 1 T z 1
2
0.6667z 2 0.6667
7.444z 2 2.444z 6.111
1. d) Tustins rule with Prewarping (TUW)
s
s 2 s 25
0.0896z 2 0.0896
z 2 0.3283z 0.8209
a
z 1
tan aT 2 z 1
a 2
z 12
a
z 1
25
tan2 aT 2 z 12 tan aT 2 z 1
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
5.5029z 5.5029
0.0905z 0.0905
60.8z 2 10.6 49.8 z 2 0.1741z 0.8189
2
a 0
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
2. Pole-Zero Mapping (PZ)
s
s 2 s 25
z e
s 0.5 j 4.97s 0.5 j 4.97
K a z 1
0.5 j 4.97T
z e
0.5 j 4.97T
0.1909z 0.1909
z 2 0.148z 0.7165
3. Zero Order Hold Equivalence (ZOH)
s
s 2 s 25
1 z
1 z
1 z
s s 25
1
1
j 2 4.97
j 2 4.97
0.5
j
4.97
0.5
j4.97
z
z
1
j 2 4.97
0.5 j 4.97T
z e 0.5 j 4.97T
z e
0.1695z 0.1695
z 2 0.148z 0.7165
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Step Responses for Various Mappings
0.2
+
x
0.15
BR
TU
TUW
PZ
ZOH
0.1
0.05
-0.05
-0.1
-0.15
0.5
1.5
Time (s)
2.5
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Bode Magnitude Plots for Various Mappings
5 rad/s
0
TU
-5
PZ
-10
Magnitude (dB)
-15
-20
ZOH
cont
FR
-25
BR
TUW
-30
-35
-40
-45
-50
10 0
Frequency (rad/s)
s
2
10 1
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Digital Root Locus Design
Again weve seen analysis using root locus in the z - plane
- design is very similar to s - plane.
There is one further consideration to do with the sampling rate:
s - plane
j s
z - plane
2
j s
Hence the angle of a particular pole location gives the number of
samples/cycle in the time response.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Example: Design a compensator for a system with TF G s
1
s2
such that 0.5 and t s 2% 1 sec for a step input.
Y(s)
U(s) +
-
D(z)
T
ZOH
G(s)
From the specification, fd fn 1 2 1Hz
choose sampling frequency 10 - 20 times higher, say fs 20 Hz
T 0.05 sec
- open loop z-transfer function:
1 e sT T 2 z 1
z 1
G z Z 3
0.00125
2
z 12
s
2 z 1
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
The root locus in the z-plane is:
-1
+1
We require a zero near the double pole to pull the root locus inside
the unit circle.
Settling time: poles must lie within a circle of radius e 4T t s 0.8
Try
- choose CL poles such that z 0.7 and 0.6 locus
pole required for "proper" controller
z 0.7
D z K
but well away from area of interest
z 0.8
Roughly:
requires K = 600
2
-1
+1
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Results:
overshoot is too large but t s is well within specification
- repeat design using slower settling time
i.e. D z 240
z 0.9
z 0.8
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Digital PID Control Design
* process industries commonly use 3-term (PID) controllers
D s K P
KI
K Ds
s
or
D s K 1
TD s
TI s
W(z) +
input -
digital PID
system
controller
E(z)
U(z)
D(z)
G(z)
Y(z)
output
Consider the control system:
The control signal (output of the 3-term controller) is:
u * kT K P e * kT K Ii * kT KD d * kT
where i* and d* are the integral and derivative of the error respectively
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
We need to approximate i * kT and d * kT .
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Two Methods
Eulers method:
i * kT i * k 1T T e * kT
[backward rectangular rule]
Trapezium rule:
i * kT i * k 1T
Also:
d * kT
T
e * kT e * k 1T
2
e * kT e * k 1T
T
In the z - domain:
(i) I z
Tz
E z
z 1
(ii) I z
and D z
T z 1
E z
2 z 1
z 1
E z
zT
Now we need to find values for K P , K I and K D
[Tustins rule]
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Ziegler - Nichols Method: closed loop
empirically based, derived from studies of perfect systems.
Method:
Use proportional CL control only, start with a low gain and increase until
plant output oscillates with constant amplitude.
- call the period of oscillation Tu and value of gain K u .
The gains to give good responses are:
Proportional (P) Control only:
K P 0.5K u
Proportional + Integral (PI) Control:
1.2K P 0.54K u
K P 0.45K u
KI
Tu
Tu
Proportional + Integral + Derivative (PID) Control:
0.6TuK u
1.2K u
KD
K P 0.6K u
KI
8
Tu
Only applicable for systems which are CL stable at low gains.
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Ziegler - Nichols Method: open loop
basically the same as the continuous time design.
gain K
maximum slope N
H
mag. of step
T1
Open loop step response:
P control:
KP
T1 T1
NL HL KL
PI control:
KP
0.9
NL
KI
0.3K P
L
PID control:
KP
1.2
NL
KI
0.5K P
L
K D 0.5LK P
EE5563: Microprocessors and Embedded Systems
Lecture 7b Continuation of Lecture 7a
Only works for stable OL type 0 systems