discrete-time systems - tu berlin · tu berlin discrete-time control systems 2 sampling a...
TRANSCRIPT
TU Berlin Discrete-Time Control Systems 1
Discrete-Time Systems
Overview
• Sampling a Continuous-Time State-Space Model
• Input-Output-Models: The Pulse Response
• Shift Operator
• The Pulse-Transfer Operator
• The z -Transform
• Computation of the Pulse-Transfer Function
• Poles and Zeros
21st April 2014
TU Berlin Discrete-Time Control Systems 2
Sampling a Continuous-Time State-Space Model
• Assuming a continuous-time system given in the following state-space form
dx(t)
dt= Ax(t) +Bu(t)
y(t) = Cx(t) +Du(t)
The system has r inputs, p outputs, and is of order n.
• General solution x(t) of the state over a time interval starting at t0
x(t) = eA(t−t0)x(t0) +∫ t
t0
eA(t−s′)Bu(s′)ds′
• Assuming the time interval now goes from one sampling instant t0 = k∆ to the next sampling
instant t = k∆+∆.
• The control signal u(t) is kept constant over the sampling interval:
u(s′) = u(k∆), k∆ ≤ s′ < k∆+∆
21st April 2014
TU Berlin Discrete-Time Control Systems 3
• With the additional time transformation s = k∆+∆− s′ we can obtain:
x(k∆+∆) = eA∆x(k∆) +
∫ ∆
0
eAsdsBu(k∆)
Let us define
Φ(∆) = eA∆
Γ (∆) =
∫ ∆
0
eAsdsB
in order to obtain the following discrete-time system for the sampled continuous-time system:
x[k + 1] = Φx[k] + Γu[k]
y[k] = Cx[k] +Du[k]
21st April 2014
TU Berlin Discrete-Time Control Systems 4
How to compute Γ andΦ
Can be computed by
• Numerical calculation (Scilab, Matlab, ...)
• Series expansion of the matrix exponential
• Laplace transform (L{eAt} = (sI −A)−1)
• Transformation of the state-space model to diagonal or Jordan forms
Calculation by hand are feasible for low order systems, n ≤ 2, and for high-order systems with
special structures.
Using the definition of the matrix exponential yields
Φ(∆) = eA∆ = I +A∆+A2∆2
2!+A3∆3
3!+ · · ·+
Ai∆i
(i)!+ · · · =
∞∑
k=0
Ak∆k
(k!),
which can be rewritten into
Φ(∆) = I +AΨ(∆)
21st April 2014
TU Berlin Discrete-Time Control Systems 5
with
Ψ(∆) = I∆+A∆2
2!+A2∆3
3!+ · · ·+
Ai∆i+1
(i+ 1)!+ · · · =
∞∑
k=0
Ak∆k+1
(k + 1)!.
Γ (∆) =
∫ ∆
0
eAsdsB =
∫ ∆
0
( ∞∑
k=0
Aksk
(k!)
)dsB =
[ ∞∑
k=0
Aksk+1
(k + 1)!
]s=∆
s=0
B
=
∞∑
k=0
Ak∆k+1
(k + 1)!B = Ψ(∆)B
Examples (blackboard) ...
21st April 2014
TU Berlin Discrete-Time Control Systems 6
Solution of the System Equation
Assume that the initial condition x[k0] and the input signals u[k0],u[k0 + 1], . . . for the
discrete-time system in state-space form are given.
x[k0 + 1] = Φx[k0] + Γu[k0]
x[k0 + 2] = Φx[k0 + 1] + Γu[k0 + 1]
= Φ2x[k0] +ΦΓu[k0] + Γu[k0 + 1]
...
x[k] = Φk−k0x[k0] +Φk−k0−1Γu[k0] + · · ·+ Γu[k − 1]
= Φk−k0x[k0] +k−1∑
j=k0
Φk−j−1Γu[j]
The solution consists of two parts: One depends on the initial condition and the other is the weighted
sum of the input signals.
21st April 2014
TU Berlin Discrete-Time Control Systems 7
• The Eigenvalues ofΦ will determine the properties of the solution.
• The Eigenvalues are obtained from the characteristic equation:
det (λI −Φ) = 0
Example (blackboard) ...
21st April 2014
TU Berlin Discrete-Time Control Systems 8
Changing Coordinates in State-Space Models
Coordinate transformation
z[k] = Tx[k]
where T is a nonsingular matrix. It follows:
z[k + 1] = Tx[k + 1] = TΦx[k] + TΓu[k] = TΦT−1z[k] + TΓu[k]
= Φz(k) + Γ u[k]
and
y[k] = Cx[k] +Du[k] = CT−1z[k] +Du[k]
= Cz[k] +Du[k]
21st April 2014
TU Berlin Discrete-Time Control Systems 9
The characteristic equation
det(λI −Φ) = 0
is invariant when new states are introduced through the nonsingular transformation matrix T .
Proof.
det(λTIT−1 − TΦT−1) = det(T ) det(λI −Φ) detT−1 = det(λI −Φ)
To find a transformation it is the same as solving for the n2 elements of T from a linear set of
equations:
TΦ = ΦT (TΦT−1 = Φ)
Coordinates can be chosen to give simple forms of the system equations.
21st April 2014
TU Berlin Discrete-Time Control Systems 10
Diagonal Form
AssumeΦ has distinct eigenvalues. Then there exists a T such that
TφT−1 =
λ1 0
. . .
0 λn
where λi are the eigenvalues ofΦ. Assuming single input u[k], with the transformation a set of
decoupled first order difference equations is obtained:
z1[k + 1] = λ1z1[k] + β1u[k]
...
zn[k + 1] = λnzn[k] + βnu[k]
y[k] = γ1z1[k] + · · ·+ γnzn[k]
21st April 2014
TU Berlin Discrete-Time Control Systems 11
The solution is now simple. Each mode will have the solution:
zi[k] = λki zi[0] +
k−1∑
j=0
λk−j−1i βiu[j]
Jordan Form
IfΦ has multiple Eigenvalues, then it is generally not possible to diagonalizeΦ. Introduce the
notation
Lk(λ) =
λ 1 0 · · · 0
0 λ 1 0...
. . .. . .
. . .
0 · · · 0 λ 1
0 · · · 0 0 λ
where Lk is a k × k matrix.
21st April 2014
TU Berlin Discrete-Time Control Systems 12
Then there exists a matrix T such that
TφT−1 =
Lk1(λ1) 0
. . .
0 Lkn(λn)
with k1 + k2 · · ·+ kr = n. The transform matrix, Φ, has the eigenvalues in the diagonal and
some 1’s in the superdiagonal.
21st April 2014
TU Berlin Discrete-Time Control Systems 13
Input-Output-Models: The Pulse Response
Consider a system with one input and one output only. The input and output vectors over a finite
interval can be represented as finite-dimensional vectors
U =(u[0] · · ·u[N − 1]T
)
Y =(y[0] · · · y[N − 1]T
)
A general linear model that relatesU and Y can be expressed as
Y =HU + Y p
whereH is a N ×N matrix and Y p accounts for initial conditions. If the relation betweenU and
Y is causal, the matrixH must be lower triangular. The element h(k,m) ofH is thus zero if
m > k.
The input-output relation can also be written as
y[k] =
k∑
m=0
h(k,m)u[m] + yp[k]
21st April 2014
TU Berlin Discrete-Time Control Systems 14
where yp accounts for initial conditions of the system.
• The function h(k,m) is called the pulse-response function.
• The pulse-response function can be easily measured by injecting a pulse of unit magnitude and
the width of the sampling interval and recording the output. For zero initial conditions the value
h(k,m) is the output at sampling instant k for a unit pulse at instant m.
• For time-invariant systems the pulse response becomes
h(k,m) = h(k −m).
21st April 2014
TU Berlin Discrete-Time Control Systems 15
• It is easy to compute the pulse response of the system defined by the state-space model
(k0 = 0):
y[k] = CΦk−k0x[k0] +k−1∑
j=k0
CΦk−j−1Γu[j] +Du[k]
h(k) =
0 k < 0
D k = 0
CΦk−1Γ k ≥ 1
(1)
• The pulse response is invariant with respect to the coordinate transf. of the state-space model.
21st April 2014
TU Berlin Discrete-Time Control Systems 16
Shift Operator
• In operator calculus, all signals are considered as doubly infinite sequences
{f [k] : k = · · · − 1, 0, 1, · · · }.
• The forward-shift operator is denoted as q. It has the property
qf [k] = f [k + 1]
• The shift operator has unit norm. It does not change norm of signal it operates on.
• The inverse of the forward shift operator is called backward-shift operator or delay operator.
• Operator calculus gives compact description of systems and makes it easy to derive
relationships among system variables.
• Difference equations can be reduced to a purely algebraic problem.
21st April 2014
TU Berlin Discrete-Time Control Systems 17
Consider the following higher-order difference equation
y[k + na] + a1y[k + na − 1] + · · · anay[k] = b0u[k + nb] + · · ·+ bnbu[k]
where na ≥ nb. Use of shift operator gives
(qna + a1qna−1 + · · ·+ ana
)y[k] = (b0qnb + b1q
nb−1 + · · ·+ bnb)u[k]
With the polynomials
A(q) = qna + a1qna−1 + · · ·+ ana
B(q) = b0qnb + b1q
nb−1 + · · ·+ bnb
it follows
A(q)y[k] = B(q)u[k]
The degree of a polynomial can be expressed by a subscript, for example, Ana(q).
21st April 2014
TU Berlin Discrete-Time Control Systems 18
The before introduced higher-order difference equation can be expressed in terms of back-shift
operator
y[k] + a1y[k − 1] + · · · anay[k − nna
] = b0u[k − d] + · · ·+ bnbu[k − d− nb]
where d = na − nb is the pole excess (time-delay) of the system.
The reciprocal polynomial
A∗(q) = 1 + a1q + · · ·+ anaqna = qnaA(q−1)
is obtained from the polynomial A by reversion the order of the coefficients. With reciprocal
polynomials the system we can write
A∗(q−1)y[k] = B∗(q−1)u[k − d]
Attention: A∗∗ is not necessary the same as A (see for example A(q) = q). A polynomial is
self-reciprocal if
A∗(q) = A(q)
21st April 2014
TU Berlin Discrete-Time Control Systems 19
A difficulty with the shift operator
• Difference equations can be multiplied by powers of q.
• Equations for shifted times can be multiplied by real numbers and added (corresponds to
multiplying by a polynomial in q.
• However, it is not possible to divide by a polynomial in q unless special assumptions are made.
• Division by an arbitrary polynomial are only allowed if it is assumed that there is some k0such that all sequences are zero for k ≤ k0!
Example (see blackboard) ...
21st April 2014
TU Berlin Discrete-Time Control Systems 20
The Pulse-Transfer Operator
• Expression of input-output relations as rational functions in either the forward- or the
backward-shift operator pulse-transfer operator
• Obtained from any description by eliminating internal variables using purely algebraic
manipulations
x[k + 1] = qx[k] = Φx[k] + Γu[k]
Hence
(qI −Φ)x[k] = Γu[k]
This gives
y[k] = Cx[k] +Du[k] =(C(qI −Φ)−1Γ +D
)u[k]
21st April 2014
TU Berlin Discrete-Time Control Systems 21
The pulse transfer-operator is thus given by
H(q) =(C(qI −Φ)−1Γ +D
)=
B(q)
A(q)
The pulse transfer-operator can also be expressed in terms of the backward-shift operator
H∗(q−1) =(C(I − q−1Φ)−1q−1Γ +D
)
If the state vector is of dimension n and if the polynomials A and B do not have common factors,
then the polynomial A is of degree n.
Example (see blackboard) ...
• The pulse-transfer operator H(q) for a state-space model is independent of the state
representation.
21st April 2014
TU Berlin Discrete-Time Control Systems 22
Poles and Zeros - Pulse-Transfer Operator
• The poles are the zeros of the denominator of H(q), the characteristic polynomial A(q).
• The zeros are obtained from B(q) = 0 and are the poles of the inverse of the system.
• Time delay (pole excess) gives rise to poles at the origin.
The Order of the System - Pulse-Transfer Operator
• Order of the system = dimension of the state-space representation = number of poles
• Important: Always use the forward-shift form to determine the order because of time delays.
Example (see blackboard) ...
21st April 2014
TU Berlin Discrete-Time Control Systems 23
The z-Transform
• The discrete-time analogy of the Laplace transform is the z-transform – a convenient tool to
study linear difference equations without and with initial conditions (in contrast to the calculus
operator).
• The z-Transform maps a semi-infinite time sequence (in contrast to the operator calculus) into a
function of a complex variable.
• The z-Transform is defined as
Z{f(k∆} = F (z) =
∞∑
k=0
f(k∆)z−k
where z is a complex variable (in contrast to q).
• The inverse transform is given by
f(k∆) =1
2πj
∮F (z)zk−1dz
21st April 2014
TU Berlin Discrete-Time Control Systems 24
Some properties of the z-Transform (h ≡ ∆):
21st April 2014
TU Berlin Discrete-Time Control Systems 25
The z-Transform can be used to solve difference equations, for instance
x[k + 1] = Φx[k] + Γu[k]
y[k] = Cx[k] +Du[k]
If the z-transform of both sided is taken
∞∑
k=0
z−kx[k + 1] = z
( ∞∑
k=0
z−kx[k]− x[0])
=
∞∑
k=0
Φz−kx[k] +∞∑
k=0
Γ z−ku[k]
Hence
z (X(z)− x[0]) = ΦX(z) + ΓU(z)
X(z) = (zI −Φ)−1 (zx[0] + ΓU(z))
Y (z) = C(zI −Φ)−1zx[0] +(C(zI −Φ)−1Γ +D
)U(z)
21st April 2014
TU Berlin Discrete-Time Control Systems 26
• Pulse-transfer function:
H(z) =(C(zI −Φ)−1Γ +D
)
• The time sequence y[k] can now be obtained using the inverse transform.
• The pulse response and the pulse-transfer function are a z-transform pair, that is,
Z{h(k)} = H(z).
21st April 2014
TU Berlin Discrete-Time Control Systems 27
Computation of the Pulse-Transfer Function
• Determine the pulse-transfer function H(z) directly from the cont.-time transfer-function G(s).
• Let us assume the following system:
holdZero-order
G(s)u[k] = u(k∆) u(t) y(t) y[k] = y(k∆)
H(z)
• H(z) is uniquely determined by the response to a given signal.
Consider for example a unit step input: {u[k]} is a sequence of ones and u(t) is a unit step. Let
Y (s) denote the Laplace transform of y(t), that is,
Y (s) =G(s)
s(2)
21st April 2014
TU Berlin Discrete-Time Control Systems 28
Let the output sequence {y[k]} of the sampled system have the z-transform
Y (z) = Z{L−1{Y (s)}}.
Division of Y (z) by the z-transform of the input, which is z/(z − 1) gives
H(z) = (1− z−1)Y (z)
The pulse-transfer function H(z) is obtained as follows:
1. Determine the step response of the system with the transfer-function G(s).
2. Determine the corresponding z-transform of the step response.
3. Divide by the z-transform of the step function.
Example (see blackboard) ...
21st April 2014
TU Berlin Discrete-Time Control Systems 29
Some time functions and corresponding Laplace and z-transforms (h ≡ ∆).
21st April 2014
TU Berlin Discrete-Time Control Systems 30
Poles and Zeros
• Poles and Zeros can be obtained from the denominator and numerator of the pulse-transfer
function.
• A pole z = a corresponds to a free mode of the system associated with the sequence
z[k] = ak.
• Poles are also the eigenvalues of the system matrixΦ.
• The zeros are related to how inputs and outputs are coupled to the states.
• Zeros can also be characterised by their signal blocking properties. A zero z = a means that a
transmission u(k) = ak is blocked by the system.
21st April 2014
TU Berlin Discrete-Time Control Systems 31
Poles
Consider the continuous-time system described by the nth-order state-space model
dx(t)
dt= Ax(t) +Bu(t)
y(t) = Cx(t)
The poles of the system are the eigenvalues ofA: λi(A), i = 1, . . . , n. The zero-order-hold
sampling gives the discrete-time system
x[k + 1] = Φx[k] + Γu[k]
y[k] = Cx[k].
The poles of this system are the eigenvalues ofΦ: λi(Φ), i = 1, . . . , n.
• BecauseΦ = eA∆ is follows from the properties of matrix functions that
λi(Φ) = eλi(A)∆
This defines the mapping of the complex s-plane into the z-plane, when z = es∆.
21st April 2014
TU Berlin Discrete-Time Control Systems 32
The conformal map z = es∆ (aus Astroem & Wittenmark, Computer-Controlled Systems, 1997)
21st April 2014
TU Berlin Discrete-Time Control Systems 33
• This map is not bijective - several points in the s-plane are mapped into the same point in the
z-plane (aliasing effect) (∆ ≡ h).
21st April 2014
TU Berlin Discrete-Time Control Systems 34
Complex Poles:
Consider the continuous-time system
ω20
s2 + 2ζω0s+ ω0.
The poles of the corresponding discrete-time system are given by the characteristic equation
z2 + a1z + a2 = 0
where
a1 = −2ζe−ζω0∆ cos(√
1− ζ2ω0∆)
a2 = e−2ζω0∆
21st April 2014
TU Berlin Discrete-Time Control Systems 35
Step responses of the second order discrete-time system for different values of ∆ when ζ = 0.5
and ω0 = 1.83, which gives a rise time tr = 1 s. (a) ∆ = 0.125s, (b) ∆ = 0.25s, (c) ∆ = 0.5s,
and (d) ∆ = 1s.
21st April 2014
TU Berlin Discrete-Time Control Systems 36
Loci of constant ζ (solid) and ω0 (dashed) when a second order continuous-time system is sampled.
21st April 2014
TU Berlin Discrete-Time Control Systems 37
Zeros
• It is not possible to give a simple formula for the mapping of zeros.
• The discrete-time system has in general n− 1 zeros! The sampling procedure gives extra zeros.
• For fast sampling periods, a discrete-time system will have zeros in
zi ≈ esi∆
where the si’s are the zeros of the continuous-time system.
• A continuous time system with a stable inverse may become a discrete-time system with a
unstable inverse (poles outside the unit circle). Also continuous-time nonminimum-phase system
will not always become a discrete-time system with a unstable inverse.
• Large effect of sampling period on zeros.
21st April 2014