Académique Documents
Professionnel Documents
Culture Documents
101
We can implement our controllers with op-amp circuits (cf. Chap. 7).
More commonly nowadays, we use digital computers (e.g.,
microcontrollers) to implement our control designs.
There are two main approaches to digital controller design:
ANALOG :
e(t) u(t)
r (t) D(s) G(s) y(t)
DIGITAL:
A2D D2A
e(t) e(kT ) u(kT ) u(t)
r (t) Q D(z) zoh G(s) y(t)
Efficient implementation
Define constants:
1 = 1 bT .
2 = k0 (aT 1).
u[k] = x + k0 e[k].
x = 1 u[k] + 2 e[k].
R = read. W = write.
C = compute. I = idle.
Forward-rectangular rule
We first look at the forward rectangular rule. We write:
x(t) x(t + t) x(t)
x(t)
= lim = lim .
t0 t t0 t
If sampling interval T = tk+1 tk is small,1
x((k + 1)T ) x(kT ) x[k + 1] x[k]
x(kT
) i.e., x[k]
.
T T
Backward-rectangular rule
x(t) x(t) x(t t)
We could also write x(t)
= lim = lim .
t0 t t0 t
Then, if T is small,
x(T ) x((k 1)T ) x[k] x[k 1]
x(kT
) i.e., x[k]
.
T T
Bilinear (or Tustin) rule
We could also re-index the forward-rectangular rule as
x[k] x[k 1]
x[k
1] =
T
to have the same right-hand-side as the backward-rectangular rule.
1
Rule of thumb: Sampling frequency must be 30 times the bandwidth of the analog
system being emulated for comparable performance.
1. As before, we have
2. Again, we have
u(t)
+ bu(t) = k0e(t)
+ ak0e(t).
U (s) s+a
EXAMPLE : Digitize the lead or lag controller D(s) = = k0 using
E(s) s+b
the bilinear rule.
T ) + bu(t T ) = k0e(t
u(t T ) + ak0e(t T ).
Plant output
1 1
0.5 0.5
analog analog
forward forward
backward backward
bilinear bilinear
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
avg. u(t)
0
10
1
10 1 0 1 2
10 10 10 10
Phase (Deg)
100
120
140
160
180 1 0 1 2
10 10 10 10
Frequency (rad/sec)
The PM has changed from 50 to 30.
PM
. . . changed from 0.5 to 0.3 . . . much less damping.
100
c 19982013, Gregory L. Plett and M. Scott Trimboli
Lecture notes prepared by and copyright
ECE4510/ECE5510, DIGITAL CONTROLLER IMPLEMENTATION 1010
M p from about 20% to 1.5
about 30% . . .
Plant output
1
Faster sampling. . .
delay. . . smaller
0
change in response. 0 0.2 0.4 0.6 0.8 1
Time (sec)
Root-Locus View of the Delay
Recall that we can model a delay using a Pad approximation.
T 1 sT /4
delay esT /2 .
2 1 + sT /4
Poles and zeros reflected about the j-axis.
I(s)
As T 0, delay dynamics .
4 4 R(s)
T T
1
Impact of delay: Suppose D(s)G(s) = .
s+a
I(s) I(s)
With
delay
a R(s) 4 a 4 R(s)
T T
the right. 1
0.8
0.4
tried again with T = 0.1 0.2
Time (msec)
c 19982013, Gregory L. Plett and M. Scott Trimboli
Lecture notes prepared by and copyright
ECE4510/ECE5510, DIGITAL CONTROLLER IMPLEMENTATION 1012
Note, however, that the error is mostly due to the rise time being too
fast, and the damping too low.
FIDDLE with parameters
1.5
continuous
Speed (rads/sec)
digital: T=0.3msec
Time (msec)
KEY POINT: We can emulate a desired analog response, but the delay
added to the system due to the D2A hold circuit will decrease
damping. This could even destabilize the system!!!
This delay can be minimized by sampling at a high rate (expensive).
Or, we can change the digital controller parameters, as in the last
example, to achieve the desired system performance BUT NOT BY
emulating the specific analog controller D(s).
Hence the need for more advanced methods of digital control:
ECE4540/5540.