Professional Documents
Culture Documents
+ power
Controller actuator plant
amplifier
-
transducer
1100
+ DIGITAL
A/D D/A actuator plant
COMPUTER
-
Clock (T)
Discrete-time domain
transducer
G. Palli (DEI) Automatic Control & System Theory 3
Control of Digital Systems
Signals Typologies
Analog continuous-time
Sampled
data
D/A
Controller actuator plant
interface
A/D
sensor
interface
00110
11101
01100
T T T
Digital discrete-time Analog continuous-time
signals signals
A/D Interface
A/D interface: the input signal x(t) is sampled with period T
• The sequence of converted and quantized data x(kT) is given as
output
A/D
A/D
δT
D/A Interface
Design a digital lag net such that the phase margin results Mf = 55o
Impulse Response
1
0.9
is τ = 0.5 s. 0.6
Amplitude
0.5
T = 0.1 s. 0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8 9 10
Time (sec)
G. Palli (DEI) Automatic Control & System Theory 13
Control of Digital Systems
Bode diagrams of the original transfer function and of the sampled one
Bode Diagram
20
0
Magnitude (dB)
-20
-40
G(s)
-60
-80
-100
-90
G(z)
-135
-180
Phase (deg)
-225
-270
-315
-360
-1 0 1
10 10 10
Frequency (rad/sec)
Nyquist Diagram
2
1.5
There is a small increase of the
1 phase lag.
0.5
In this case, is “small”
G1(s) since T is small.
Imaginary Axis
-0.5
A similar result is obtained
with the approximation
-1 G(s)
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1
Real Axis
• The result of the design of the lag net for G1(s) (phase margin MF = 55o) is:
• From which
• Then
1
1 0.8
0.6
0.5 0.4
0.2
0 0
0 10 20 30 40 50 0 1 2 3 4 5
tempo (s) tempo (s)
Azione di controllo Azione di controllo
0.6 0.4
0.4 0.3
0.2 0.2
0 0.1
-0.2 0
0 10 20 30 40 50 0 1 2 3 4 5
tempo (s) tempo (s)
0.4 0.3
0.2 0.2
0 0.1
-0.2 0
0 10 20 30 40 50 0 1 2 3 4 5
tempo (s) tempo (s)
Results with T = 2 s
1 0.8
0.6
0.5 0.4
0.2
0 0
0 10 20 30 40 50 0 1 2 3 4 5
tempo (s) tempo (s)
Azione di controllo Azione di controllo
0.6 0.5
0.4
0.4
0.3
0.2
0.2
0 0.1
-0.2 0
0 10 20 30 40 50 0 1 2 3 4 5
tempo (s) tempo (s)
CONTINUOUS-TIME DISCRETE-TIME
SYSTEMS SYSTEMS
Differential Finite-difference
equations A/D equations
D/A
Laplace
transform
Z transform
Control Y
D/A Hold Actuator Plant
algorithm
The control algorithm must be designed in such a way that the overall control
system with the same input behaves as much as possible to the continuous-time
regulator R(s)
U(s) Y(s)
G(s)
Data Sampling
n The signal u(t) is piecewise continuous:
for
u(kT) u(t)
n The signal y(t) sampled with a period T generates the sampled signal
y(kT) Segnale y(t) Segnale y(kT)
3 3
y(t) y(kT)
2 2
1 1
0 0
-1 -1
-2 -2
-3 -3
0 2 4 6 8 10 0 2 4 6 8 10
Tempo (sec) Tempo kT (sec)
n The input-output behavior of the overall system is the same of the
discrete-time system:
U(z) Y(z)
G(z)
n The state x(t) that is reached starting from the initial state x(kT) at the time
instant t=kT is:
n Hence, being u(t)=u(kT) constant, the state x((k+1)T) reached at the time
instant t=(k+1)T is:
n The output y(kT) is obtained from the signal y(t) sampled at t=kT:
n Then, the relation between the matrices (A, B, C) and (F, G, H) is:
n The discrete-time system G(z) obtained from the continuous-time one
G(s) in this way is called sampled-data system.
n THEOREM: Consider the completely reachable system (A, b) and the
sampling period T. The corresponding sampled-data system is
reachable iff each couple λi , λj of distinct eigenvalues of A with the
same real part satisfies the relation:
n THEOREM: Consider the completely observable system (A, c) and the
sampling period T. The corresponding sampled data system is
observable iff each couple λi , λj of distinct eigenvalues of A with the
same real part satisfies the relation:
n Note: If all the eigenvalues of matrix A are real, the sampled-data system
maintains always, for any T > 0, the same structural characteristics
(reachability, controllability, observability, reconstructability) of the original
continuous-time system (A, b, c).
3 6
2 4
1 2
0 0
-1 -2
-2 -4
-3
-6
-4
T = π/20 T = π/5
0 5 10 15 20 -8
0 5 10 15 20
15 20
15
10
10
5
5
0 0
-5
-5
-10
-10
-15
-15
T = π/2 T=π
0 5 10 15 20 -20
0 5 10 15 20
G. Palli (DEI) Automatic Control & System Theory 35
Control of Digital Systems
0.4 0.4
0.2 0.2
0 0
-0.2 -0.2
-0.4 -0.4
-0.6 -0.6
T = π/20 T = π/5
-0.8
0 5 10 15 20 -0.8
0 5 10 15 20
0.6
0.4
0.2
-0.6
T=π
-0.8
0 5 10 15 20
G. Palli (DEI) Automatic Control & System Theory 36
Control of Digital Systems
n The transfer function G(z) of the corresponding sampled data system
is:
n Example: consider the following purely inertial system with unitary
mass (m=1) subject to the external force u(t):
u(t)
m
n The state vector is given by the position and the velocity
n It can be easily verified that this system is fully reachable and
observable
n The state can not be driven to zero in a time interval of 2T by means
of state feedback only in the case of continuous-time systems. In fact,
in the case of continuous-time systems the state goes to zero (or any
other final value) exponentially, that means the state is zero only for t
-> ∞.
G. Palli (DEI) Automatic Control & System Theory 44
Control of Digital Systems
Clock
To Workspace1 uo
To Workspace6
yd
To Workspace14
1
K*u K*u K*u y
s
Generator Hold
A
Zero-Order
K*u
K Hold1
K*u xo
To Workspace2
K*u ys
C1 To Workspace3
4
4
2
3
0
-2 2
0 2 4 6 8 10
Response of x1 and x2
1
5
0
-1
-5 -2
0 2 4 6 8 10 0 1 2 3 4 5 6 7 8 9 10
4 4
2 2
0 0
-2 -2
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
4
0
2
-5
0
-10 -2
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
10
0.5
0
0
-10
-20 -0.5
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
10
2
5
0
1
-5
0 10 20 30 40 50 60
0
Response of x1 and x2
15
10 -1
0 -2
-5
-10 -3
0 10 20 30 40 50 60 0 10 20 30 40 50 60
G
n If the state is not measureable, a dead-beat observer can be designed: in such
an observer the state estimation error evolves with a dynamics characterized by two
null eigenvalues (modes). This means that the eigenvalues of A+LC (or F+LH) are all
zeros.
n Recalling the design of a generic reduced-order observer in the discrete-time case: the
system output directly coincides with the first q=1 components of the state.
n Therefore, the observer dynamics is:
it follows
To Workspace14
1
K*u K*u K*u y
s
Pulse Kups Zero-Order B Integrator C To Workspace13
Generator Hold A
Zero-Order K*u
K Hold1
K*u xo
To Workspace2
xhat K*u ys
To Workspace4 C. To Workspace3
1 In1 y
x hat
K*u x hat
L In2 u
Subsystem
-1
1 K*u
Z
In1 y
Integer Delay -1/T
-1
2 K*u
Z
In2 u
Integer Delay1 T/2
0 0
-5 -5
-10 -10
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Andamento x1 e x2 Andamento x1 e x2
10 20
5 10
0 0
-5 -10
-10 -20
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Azione di controllo u(k) Azione di controllo u(k)
10 40
5 20
0 0
-5 -20
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
10 10
5 5
0 0
-5 -5
0 10 20 30 40 50 60 0 10 20 30 40 50 60
Andamento x1 e x2 Andamento x1 e x2
20 20
10 10
0
0
-10
-10
0 10 20 30 40 50 60 -20
0 10 20 30 40 50 60
Azione di controllo u(k)
5
Azione di controllo u(k)
20
10
0
0
-10
-5
0 10 20 30 40 50 60 -20
0 10 20 30 40 50 60
THE END