Embedded Control Systems (EI7262)
Lecture 5
Technische Universitt Mnchen
Recap Control Basics
Transfer function (Input-Output relation):
State-space model:
State-space to transfer function:
Characteristic Polynomial:
System Poles:
Roots of the characteristics polynomial
Stability condition:
(asymptotic stability)
[System pole lies in the left side of the complex plane]
2
Technische Universitt Mnchen
Recap Continuous-time Control Design
Given system:
Control law:
Objectives
(i) Place system poles
(ii) Achieve y r as t
(iii) Design K and F
1. Check controllability of (A,B). Must be controllable. must be invertible.
2. Choose closed loop poles
3. Apply Ackermanns formula
4. Feedforward gain
3
Technische Universitt Mnchen
Recap Discretization
Continuous-time State-space model
Taking Laplace transform
Taking inverse Laplace transform
4
Technische Universitt Mnchen
Discretization Basic Maths
To prove:
Negative Binomial Expansion for Matrices:
Matrix exponential expantion
Taking inverse Laplace transform
5
Technische Universitt Mnchen
Discretization Basic Maths
To prove:
Inverse Laplace Transform of product of two functions
6
Technische Universitt Mnchen
Discretization Basic Maths
ZOH
[Changing limits of integration]
7
Technische Universitt Mnchen
Discretization Basic Maths
Periodic sampling: tk+1 tk = h (sampling period -- constant)
We have
Replacing (tk+1 tk) with sampling period h in
We obtain
8
Technische Universitt Mnchen
Recap Discrete-time Control Design (Ideal Case)
Given system:
Control law:
Objectives
(i) Place system poles
(ii) Achieve y r as t
(iii) Design K and F
1. Check controllability of (A,B) ! must be controllable. must be invertible.
2. Choose closed loop poles
3. Apply Ackermanns formula
4. Feedforward gain
9
Technische Universitt Mnchen
Discretization Basic Maths
Z-transform:
Inverse Z-transform:
Time shifting property of Z-transform:
Z-transform of constant value:
Discrete time systems can be represented in form of difference equation: e.g.
Transfer function:
10
Technische Universitt Mnchen
Recap Discrete-time Control Design (Ideal Case)
Closed-loop
system
Taking z transform
F should be chosen such that y[k] r (constant) as k i.e.,
Using final value theorem
11
Technische Universitt Mnchen
Discrete-time System Stability
Transfer function:
Negative binomial theorem:
Taking inverse Z-transform
Stability condition:
12
Technische Universitt Mnchen
Discrete-time System Stability
Stable system
Absolute values of all poles lesser than unity
Marginally stable system
Absolute values of one or multiple poles are unity
Unstable system
Absolute values of one or more poles are greater than unity
1
Marginally stable
Stable
Unstable
1
Unit circle
13
Technische Universitt Mnchen
Recap Discrete-time Control Design (Delay Case)
What is happening within one sampling period?
x(tk)
Tc
x(tk+1)
Dc
tk
tk+1
14
Technische Universitt Mnchen
Recap Discrete-time Control Design (Delay Case)
Continuous-time equation:
ZOH + Delay:
Sampling Period (tk+1 tk = h)
15
Technische Universitt Mnchen
Recap Discrete-time Control Design (Delay Case)
Continuous-time model
ZOH sampling with period h and
constant sensor-to-actuator delay Dc
Sampled-data model
(Delay Case)
16
Technische Universitt Mnchen
Recap Discrete-time Control Design (Delay case)
We define new system states:
With the new definition of states, the state-space becomes
where the augmented matrices are defined as follows
17
Technische Universitt Mnchen
Recap Discrete-time Control Design (Delay case)
Given system:
Control law:
1. Check controllability of
follows
Objectives
(i) Place system poles
(ii) Achieve y r as t
(iii) Design K and F
. Must be controllable. must be invertible where is defined as
2. Choose poles
3. Apply Ackermanns formula
4. Feedforward gain
18
Technische Universitt Mnchen
Discrete-time Control Design for one
sampling period sensor to actuator delay
19
Technische Universitt Mnchen
Timing Details
x(t)
Sampling period = h
x(tk)
Ts
tk
Tc
Deadline Dc
x(tk+1)
Ts
tk+1
x(tk+2)
Ts
tk+2
20
Technische Universitt Mnchen
Timing Details
x(tk)
Tc
Deadline Dc
Ts
tk
x(tk+1)
Ts
tk+1
x(tk+2)
Ts
tk+2
The u(tk) is computed based on one sampling period old measurement x(tk-1)
and u(tk) is applied at t = (tk + h) =tk+1.
21
Technische Universitt Mnchen
Implementation setting
Physical
System
actuator
actuate()
sensor
measure()
Ts
Ta
u[.]
Tc
x[.]
Task scheduler or Real-time operating system (RTOS)
Input buffer
! Globally accessible to all tasks
Output buffer
22
Technische Universitt Mnchen
Design problem: control system perspective
Given system:
Control law:
Objectives
(i) Place system poles
(ii) Achieve y r as t
(iii) Design KT and FT
1. Check controllability of (,). Must be controllable. must be invertible.
Is it helpful any more?
Answer: No
When can we design a controller for the above system with delayed input?
Answer: we have to go for elaborate stabilizability check
23
Technische Universitt Mnchen
Analysis and design based on the delayed input
u[k] = KT x[k-1]
Step I: Transformation to canonical form
Step II: Analysis and design of system in
controllable canonical form
Step III: Gain transformation
24
Technische Universitt Mnchen
Step I: Transformation to canonical form
25
Technische Universitt Mnchen
Transformation to Canonical form
We have a discrete-time system
We wish to obtain the states z[k] = T x[k]
26
Technische Universitt Mnchen
Since z[k] = T x[k],
Clearly,
What is T?
27
Technische Universitt Mnchen
Transformation Matrix T
Assume
We know,
28
Technische Universitt Mnchen
Transformation Matrix T
We know,
29
Technische Universitt Mnchen
Transformation matrix T (Summary)
Assume that the non-delayed (ideal) system is controllable with det() 0
where is given by
Reading reference: http://www.atp.ruhr-uni-bochum.de/rt1/syscontrol/node104.html
30
Technische Universitt Mnchen
Summary: Step I
Continuous-time
model
Discrete-time
model
Transformation
complete
31
Technische Universitt Mnchen
Step II: Analysis and design of controller
u[k] = K z[k-1] for systems in controllable canonical
form
32
Technische Universitt Mnchen
System in controllable canonical form
We have the following system:
Since the system is controllable, we can start with a controllable canonical
form for a system with dimension n:
33
Technische Universitt Mnchen
System states
We have n system states
With controllable canonical form
34
Technische Universitt Mnchen
The delayed input
The delayed input with only feedback part
35
Technische Universitt Mnchen
Closed-loop system
Putting u[k] = Kz[k-1]
36
Technische Universitt Mnchen
37
Technische Universitt Mnchen
Augmented states
Introduce a new state
We have (n+1) system states
38
Technische Universitt Mnchen
Augmented system
The closed-loop system has (n+1) system states
The stability properties of this system depends on cl
39
Technische Universitt Mnchen
What do we have so far
We have a discrete-time system: z[k+1] = c z[k] + c u[k]
Control input: u[k] = K z[k-1]
The augmented closed loop system: Z[k+1] = cl Z[k] where
What is left: how to design K such that cl has poles at the desired locations?
40
Technische Universitt Mnchen
Characteristics equation (recall: lecture 1)
For system Z[k+1] = cl Z[k], the characteristics equation is obtained by making det(I - cl ) = 0
Thus, we obtain,
We obtain the characteristics equation of the augmented system:
41
Technische Universitt Mnchen
Stabilizability
The system is stabilizable if there exists a feedback gain K with control input u[k] = K z[k-1] that
places all the system poles
circle
of the closed-loop system within the unit
The first question is if it is possible to place (n+1) poles arbitrarily or not. If it not possible to place the
poles arbitrarily then what is the condition of pole choice. This ends up in the question of
stabilizability.
The next question is of course how to choose the feedback gain K if the system is stabilizable.
Therefore, the remaining questions are
(i) Part 1: what is the condition for stabilizability
(ii) Part 2: if stabilizable, how to design the feedback gain K
42
Technische Universitt Mnchen
Pole placement
Suppose (n+1) desired closed-loop poles are given by,
Therefore, the desired characteristics equation is given by:
Please note that
43
Technische Universitt Mnchen
Comparing desired with actual
Comparing the characteristics equations
We can computing the feedback gain:
44
Technische Universitt Mnchen
Part 1: Stabilizability condition
The part of the characteristics equation that is not modified by the input signal u[k] = K z[k-1] is given
by,
For stabilization
The above condition implies
Clearly, the condition for stabilization with one sampling period
delayed input:
and
45
Technische Universitt Mnchen
Part 2: Designing feedback gain K
Step1: choose the desired closed-loop poles
such that
Step2: We can computing the feedback gain:
46
Technische Universitt Mnchen
Summary: Step II
Discrete-time system
in Canonical form
Stabilizability
Feedback control
Desired poles
and
Gain computation
47
Technische Universitt Mnchen
Step III: Gain transformation
u[k] = K z[k-1] to u[k] = KT x[k-1]
48
Technische Universitt Mnchen
What we have
We have discrete-time system in canonical form
We apply u[k] = K z[k-1]
We have seen in Step II how to compute the stabilizing feedback gain K
But the original system is not in Canonical form
for the above system we need to apply u[k] = KT x[k-1] .
Question is how to compute KT given K is already computed
as per Step II
49
Technische Universitt Mnchen
Transformed feedback gain
We have the transformed states z[k] = T x[k]
Thus, we have the following:
50
Technische Universitt Mnchen
Overall feedback controller design with Dc = h
Continuous-time
model
Discrete-time
model
Step I
Step II
Step III
51
Technische Universitt Mnchen
computing Feedforward gain: FT
u[k] = KT x[k-1] + FT r
52
Technische Universitt Mnchen
Augmented closed-loop system
We have
Augmented closed-loop system
Feedforward gain
53
Technische Universitt Mnchen