Subido por Joseph Ochoa

The z transform and its inverse

Anuncio
Lectures 10-12
The z transform
and its inverse
Course of the week
In this week, we study the following:
△ We present the z transform, which is a mathematical tool commonly used for the
analysis and synthesis of discrete-time control systems.
△ We give properties and theorems associated with the z transform.
△ We present the inverse z transform and the ways to find it.
△ We show how to use the z transform technique to solve a difference equation.
△ We show how the z transform is related to Laplace transform.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
151
Introduction
The z transform is a mathematical tool used in the analysis and design of discrete-time control
systems to
• define the characteristics of a discrete-time control system in terms of transfer function in the
frequency domain.
• facilitate finding the solution of a difference equation that describes a discrete-time control
system so that the difference equation is transformed into algebraic equation.
The z transform can be applied to
• a sampled-data signal x(kT ) (k is an integer and T is the sampling period) that arises from
sampling a continuous-time signal x(t).
• a discrete-time signal x(k) that arises by accumulating a variable over discrete time instants.
The accumulation period here is implicit.
• a number sequence x(k) that arises from iterative process in a digital computer.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
152
Definition of the z transform
The z transform of a sequence of values x(kT ), resulting from sampling of a time function x(t), where
k is an integer and T is the sampling period, is defined by the following infinite series in powers of
z−1 as
∞
X(z) = Z [x(t)] = Z [x(kT )] =
∑ x(kT )z−k
k=0
Similarly, for a sequence of numbers x(k) the z transform is defined to be
∞
X(z) = Z [x(k)] =
∑ x(k)z−k
k=0
The z transform defined above is referred to as the one-sided z transform. In a one-sided z transform,
we assume that x(t) = 0 for t < 0 or x(k) = 0 for k < 0. Note that z is a complex variable.
Remark: The z transform exists, if the infinite series above converges. In using however the z
transform method for solving discrete-time problems it is not necessary each time to specify the
values of z over which series is convergent.
When a time function x(t) or number sequence x(k) is defined for t < 0 or k < 0, the z transform can
be defined in terms of two-sided z transform in which series expand from negative values of t or k.
The inverse z transform denoted by Z −1 is the operation to determine the time sequence x(kT ) from
X(z). Different methods are used to evaluate the inverse z transform.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
153
z transform of commonly encountered time sequences
Once again, the z transform of a time function x(t) can be determined by the infinite power series
∞
X(z) = Z [x(t)] = Z [x(kT )] =
∑ x(kT )z−k
k=0
However, this calculation is usually laborious. In practice, we determine the z transform of
elementary functions by using the definition so that these z transforms will be used with some
properties and theorems of z transform to determine the z transform of more complicated functions.
This leads to a table of z transforms of commonly encountered functions for solving problems in the
field of discrete-time systems. Below is such a table.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
154
z transform of commonly encountered time sequences
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
155
z transform of commonly encountered time sequences
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
156
Important properties and theorems of the z transform
Below, we present some important properties and useful theorems of the z transform.
Linearity. If F(z) and G(z) are the z transforms of sequences f (k) and g(k), and α and β are scalars,
the sequence formed by a linear combination x(k) = α f (k) + βg(k) has the z transform
X(z) = αF(z) + βG(z).
Multiplication by ak . If X(z) is the z transform of x(k), then the z transform of ak x(k) is given by
X(a−1 z); that is Z [ak x(k)] = X(a−1 z).
Shifting theorem (also called real translational theorem). If x(t) = 0 for t < 0 and x(t) has the z transform
X(z), then
Z [x(t − nT )] = Z [x(kT − nT )] = z−n X(z)
and
"
n−1
Z [x(t + nT )] = Z [x(kT + nT )] = zn X(z) − ∑ x(kT )z−k
k=0
#
where n is zero or a positive integer.
Similarly, for the number sequence x(k) we have
Z [x(k − n)] = z−n X(z)
and
"
n−1
Z [x(k + n)] = zn X(z) − ∑ x(k)z−k
Prof. K. Melhem (Qassim University)
k=0
#
Digital Control Systems Academic year 2013-2014
157
Important properties and theorems of the z transform
Shifting theorem (cont’d). From the earlier equations, we have
Z [x(k + 1)] = zX(z) − zx(0)
Z [x(k − 1)] = z−1 X(z)
Findings:
• Multiplication of a z transform X(z) by z has the effect of advancing the signal x(kT ) by one
step (1 sampling period).
• Multiplication of the z transform X(z) by z−1 has the effect of delaying the signal x(kT ) by one
step (1 sampling period).
Example: Find the z transform of u(t − T ) and f (k) = ak−1 , where f (k) = 0, k ≤ 0, by using the shifting
theorem.
Using the shifting theorem, we get
−1
Z [u(t − T )] = z Z [u(t)] = z
Z [ f (k)] = Z [a
k−1
]=z
−1
k
Z [a ] = z
Prof. K. Melhem (Qassim University)
−1
−1
z−1
1
=
1 − z−1
1 − z−1
z−1
1
=
, for k = 1, 2, 3, . . .
1 − az−1
1 − az−1
Digital Control Systems Academic year 2013-2014
158
Important properties and theorems of the z transform
Complex translational theorem. If x(t) has the z transform X(z), then the z transform of e−at x(t) is
X(zeaT ).
Example for Complex translational theorem: Given the z transform of sin ωt and cos ωt as
z−1 sin ωT
Z [sin ωt] =
1 − 2z−1 cos ωT + z−2
1 − z−1 cos ωT
Z [cos ωt] =
1 − 2z−1 cos ωT + z−2
find the z transform of the damped sine function e−at sin ωt and damped cosine function e−at cos ωt.
A direct application of the complex translational theorem gives
e−aT z−1 sin ωT
Z [e sin ωt] = Z [e
sin ωkT ] =
1 − 2e−aT z−1 cos ωT + e−2aT z−2
1 − e−aT z−1 cos ωT
−at
−akT
Z [e cos ωt] = Z [e
cos ωkT ] =
1 − 2e−aT z−1 cos ωT + e−2aT z−2
−at
−akT
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
159
Important properties and theorems of the z transform
Initial value theorem. If x(t) has the z transform X(z) and if limz→∞ X(z) exists, then the initial value
x(0) of x(t) or x(k) is given by x(0) = limz→∞ X(z).
Usefulness: convenient for checking z transform calculations for possible errors. Since x(0) is usually
known, a check of the initial value by limz→∞ X(z) can easily spot errors in X(z), if any exist.
Example: Determine x(0) if X(z) is given by
(1 − e−T )z−1
X(z) =
(1 − z−1 )(1 − e−T z−1 )
By using the initial value theorem, we get
(1 − e−T )z−1
=0
x(0) = lim
z→∞ (1 − z−1 )(1 − e−T z−1 )
But, we know that
x(t) = 1 − e−t
and thus x(0) = 0, which agrees with the result obtained earlier.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
160
Important properties and theorems of the z transform
Final value theorem. Suppose that x(k), where x(k) = 0 for k < 0, has the z transform X(z) and that all
the poles of X(z) lie inside the unit circle, with the possible exception of poles at z = 1. Then, the
final value of x(k) can be given by
x(∞) = lim x(k) = lim [(1 − z−1 )X(z)]
k→∞
z→1
Usefulness: Convenient for determining the steady-state error in discrete-time control systems.
Example: Determine x(∞) if X(z) is given by
X(z) =
by using the final value theorem.
1
1
−
, a>0
1 − z−1 1 − e−aT z−1
By applying the final value theorem to the given X(z), we get
x(∞)
=
=
Prof. K. Melhem (Qassim University)
lim [(1 − z−1 )X(z)]
z→1
1 − z−1
lim 1 −
=1
z→1
1 − e−aT z−1
Digital Control Systems Academic year 2013-2014
161
The inverse z transform
Introduction
When the z transform X(z) is given, the operation that determines the corresponding x(kT ) (or x(k))
is called the inverse z transform. Note that, the inverse z transform gives only the time sequence
x(kT ) at the sampling instants and not the continuous-time function x(t).
Determination of the z transform:
• If the z transform X(z) of a function x(kT ) is given as
X(z) = x(0) + x(T )z−1 + x(2T )z−2 + . . . + x(kT )z−k + . . .
the inverse z transform can be obtained by inspection as a sequence of the function x(kT ) that
corresponds to the values of x(t) at the respective instants of time.
• If the z transform X(z) is given as a ratio of polynomials in z, that is
X(z) =
B(z)
A(z)
where B(z) and A(z) are polynomials in z, then the inverse z transform may be obtained by
several different methods. The most used ones are the (1) Direct division method and (2)
Partial-fraction expansion method.
Before tackling these methods for calculating the inverse z transform, let us define the notion of
poles and zeros of a z transform X(z) which is given as a ratio of polynomials in z.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
162
The inverse z transform
Introduction - - Poles and zeros in the z-plane - In engineering applications of the z transform method, X(z) may have the following form
b0 zm + b1 zm−1 + . . . + bm
X(z) = n
(m ≤ n)
z + a1 zn−1 + · · · + an
or in factored form
X(z) =
b0 (z − z1 )(z − z2 ) · · · (z − zm )
(z − p1 )(z − p2 ) · · · (z − pn )
The denominator polynomial roots pi ’s (i = 1, 2, . . . , n) are the poles of X(z) and the numerator
polynomial roots z j ’s ( j = 1, 2, . . . , m) are the zeros of X(z).
As you might expect, the locations of the poles and zeros of X(z) in the z plane determine the time
characteristics of x(k). A graphical display in the z-plane can be used to locate these poles and zeros.
Alternatively: In control engineering and signal processing, X(z) is frequently expressed as a ratio of
polynomials in z−1 as follows
b0 z−(n−m) + b1 z−(n−m+1) + · · · + bm z−n
X(z) =
1 + a1 z−1 + a2 z−2 + · · · + an z−n
Statement: In finding the poles and zeros of X(z), it is convenient to express X(z) as a ratio of
polynomials in z.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
163
The inverse z transform
Introduction - - Poles and zeros in the z-plane - For example,
z(z + 0.5)
z2 + 0.5z
=
X(z) = 2
z + 3z + 2
(z + 1)(z + 2)
has poles at z = −1 and z = −2, and zeros at z = 0 and z = −0.5. When X(z) is expressed in z−1 , we get
1 + 0.5z−1
1 + 0.5z−1
X(z) =
.
=
1 + 3z−1 + 2z−2
(1 + z−1 )(1 + 2z−1 )
The zero at z = 0 is now not explicitly shown.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
164
The inverse z transform
Direct division method
Given that X(z) is a ratio of polynomials in z−1 , the method states that X(z) can be expanded into
an infinite power series in z−1 by simply dividing the numerator by the denominator. Hence, the
values of x(0), x(1), · · · can be determined by inspection, as by definition X(z) is an infinite power
series in z−1 as
∞
X(z) =
∑ x(kT )z−k = x(0) + x(1)z−1 + x(2)z−2 + . . . + x(k)z−k + · · ·
k=0
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
165
The inverse z transform
Direct division method
Example: Find x(k), for k = 0, 1, 2, 3, 4, when X(z) is given by
X(z) =
10z + 5
(z − 1)(z − 0.2)
First, we rewrite X(z) as a ratio of polynomials in increasing powers of z−1 as follows
10z−1 + 5z−2
.
X(z) =
1 − 1.2z−1 + 0.2z−2
Next, we divide the numerator by the denominator as follows
Thus, X(z) = 10z−1 + 17z−2 + 18.4z−3 + 18.68z−4 + · · · By inspection, we get
x(0) = 0, x(1) = 10, x(2) = 17, x(3) = 18.4, x(4) = 18.68. Note that resulting solution is not in closed form.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
166
The inverse z transform
Direct division method
When may the direct division method be used?
• When it is difficult to find a closed-form expression for the inverse z transform x(k).
• When it is desired to find only the first values of x(k).
• When it is to check inverse z transform calculation by other methods.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
167
The inverse z transform
Partial-fraction expansion method
Partial fraction expansion allows us to write a z transform X(z) as the sum of simpler fraction terms
so that each term is easily recognizable in a table of z transforms.
The procedure for inverse z transformation of a z transform X(z) is
1. Find the partial-fraction expansion of X(z)/z or X(z).
2. Obtain the inverse z transform x(k) using a table of z transforms.
Interestingly enough, the only reason that we expand X(z)/z rather than X(z) into partial fractions is
that most z functions have the term z in their numerators. Note that X(z)/z can be considered for
expansion even if there is no zero at z = 0 in the z transform X(z).
If we choose to expand X(z) instead of X(z)/z, we will be facing with the shifting theorem in order to find the
inverse z transform.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
168
The inverse z transform
Partial-fraction expansion method
Before going ahead, let us review the shifting theorem.
Consider the following z transform
z−1
X(z) =
1 − az−1
Defining
Y (z) =
1
,
1 − az−1
we have X(z) = z−1Y (z). The inverse z transform of Y (z) is simply y(k) = Z −1 [Y (z)] = ak .
By the shifting theorem, we have Z [y(k − 1)] = z−1Y (z) or Z −1 [z−1Y (z)] = y(k − 1). Hence, the inverse z
transform of X(z) is
x(k) = Z −1 [X(z)] = Z −1 [z−1Y (z)] = y(k − 1) = ak−1
Since y(k) is assumed to be zero for k < 0, we have

 ak−1
x(k) =
 0
Prof. K. Melhem (Qassim University)
k = 1, 2, 3, · · ·
k≤0
Digital Control Systems Academic year 2013-2014
169
The inverse z transform
Partial-fraction expansion method
Usually, three types of z domain functions X(z) are considered: (1) functions with simple real poles,
(2) functions with complex conjugate and real poles, and (3) functions with repeated poles.
Case 1: X(z) is expanded as
K2
K1
+
+···
z − p1 z − p2
The residue Ki of the ith expanded term is given as Ki = (z − p1 )X(z)|z→pi .
X(z) =
Case 2: With complex conjugate poles (roots of a quadratic polynomial z2 + az + b), X(z) can be
expanded as
K1 z + K2
+···
X(z) = 2
z + az + b
The two coefficients K1 and K2 are determined by multiplying X(z) on both sides by the common
denominator of the expanded terms and then balancing. With complex conjugate poles, we can also
expand X(z) as
Kz
K∗z
X(z) =
+
+···
z − p z − p∗
where p and p∗ are the complex conjugate poles and K (K ∗ is its conjugate) is a complex coefficient
that can be found by the residues method as in case 1.
Case 3: With a repeated pole p with multiplicity r, X(z) is expanded as
X(z) =
The coefficients Ki is given as Ki =
K1
K2
Kr
+
+
·
·
·
+
+···
(z − p)r (z − p)r−1
(z − p)
d i−1
1
r
(i−1)! dzi−1 (z − p) X(z)|z→p
Prof. K. Melhem (Qassim University)
with i = 1, 2, · · · , r.
Digital Control Systems Academic year 2013-2014
170
The inverse z transform
Partial-fraction expansion method
Example 1 (Case 1): Given the z transform
(1 − e−aT )z
X(z) =
(z − 1)(z − e−aT )
where a is a constant and T is the sampling period, find the inverse z transform x(kT ) by use of the
partial-fraction expansion method.
The partial-fraction expansion of X(z)/z is found to be
(1 − e−aT )
1
1
X(z)
=
=
−
z
(z − 1)(z − e−aT )
z − 1 z − e−aT
thus X(z) =
z
z
−
z − 1 z − e−aT
Hence, the inverse z transform of X(z) is
x(kT ) = 1 − e−akT
k = 0, 1, 2, . . .
Homework: Find the solution now by expanding X(z), rather than X(z)/z, into partial fractions.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
171
The inverse z transform
Partial-fraction expansion method
Example 2 (Case 2): Find the inverse z transform of
z2 + z + 2
X(z) =
(z − 1)(z2 − z + 1)
by use of the partial-fraction expansion method.
With complex conjugate poles (z2,3 = 0.5 ± j0.866 with |z2,3 | = 1) in the quadratic factor z2 − z + 1, we
expand X(z) in simple partial fractions as
−3z + 2
4z−1
−3z−1 + 2z−2
4
X(z) =
+
or X(z) =
+
z − 1 z2 − z + 1
1 − z−1
1 − z−1 + z−2
Recalling that the z transform of damped cosine and sine functions are given by
1 − e−aT z−1 cos ωT
Z [e
cos ωkT ] =
1 − 2e−aT z−1 cos ωT + e−2aT z−2
e−aT z−1 sin ωT
−akT
Z [e
sin ωkT ] =
,
1 − 2e−aT z−1 cos ωT + e−2aT z−2
−akT
we observe that the second expanded term in the expression of X(z) above can be viewed as the z
transform of a damped sinusoid. Actually, X(z) can be rewritten as
−1
z − 0.5z−2
0.5z−2
4z−1
−3
+
X(z) =
1 − z−1
1 − z−1 + z−2
1 − z−1 + z−2
=
4z
−1
−1
0.5z−1
1
−1 1 − 0.5z
−1
− 3z
+z
1 − z−1
1 − z−1 + z−2
1 − z−1 + z−2
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
172
The inverse z transform
Partial-fraction expansion method
Example 2 (Case 2):
By identification, e−2aT = 1 and cos ωT = 1/2. Hence, we get ωT = π/3, sin ωT =
inverse z transform of X(z) is found to be

 4(1(k − 1)) − 3(1k−1 ) cos (k−1)π + √1 (1k−1 ) sin (k−1)π
3
3
3
x(k) =
 0
√
3/2. Then the
k = 1, 2, 3, · · ·
k≤0
Homework: Find the solution by writing the expanded term of quadratic factor as two terms with
complex coefficients.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
173
The inverse z transform
Partial-fraction expansion method
Example 3 (Case 3): Obtain the z transform of
X(z) =
1
z2 (z − 0.5)
We expand X(z)/z into simple fractions as
1
K1 K2 K3
K4
X(z)
= 3
= 3 + 2 +
+
z
z (z − 0.5)
z
z
z
z − 0.5
where
K1
=
K2
=
X(z)
1
|z=0 =
|z=0 = −2
z
z − 0.5
1 d 3 X(z)
d
1
−1
z
|z=0 =
|z=0 =
|z=0 = −4
1! dz
z
dz z − 0.5
(z − 0.5)2
z3
K3
=
1 d
−1
1 (−1)(−2)
1 d 2 3 X(z)
z
|
=
|
=
|z=0 = −8
z=0
z=0
2! dz2
z
2 dz (z − 0.5)2
2 (z − 0.5)3
K4
=
(z − 0.5)
1
X(z)
|z=0.5 = 3 |z=0.5 = 8
z
z
Thus, X(z) is expanded as
X(z) = −2z−2 − 4z−1 − 8 +
Prof. K. Melhem (Qassim University)
8
1 − 0.5z−1
Digital Control Systems Academic year 2013-2014
174
The inverse z transform
Partial-fraction expansion method
Example 3 (Case 3): The inverse z transform is then given as

 −2δ(k − 2) − 4δ(k − 1) − 8δ(k) + 8(0.5)k
x(k) =
 0
Notice that x(0) = x(1) = x(2) = 0. Thus, we can write

 (0.5)k−3
x(k) =
 0
k≥0
k<0
k≥3
k<3
Notice that the solution can be directly obtained using the shifting theorem, without the need for
partial-fraction expansion, since X(z) can be rewritten as
X(z) = z−3
Prof. K. Melhem (Qassim University)
z
z − 0.5
Digital Control Systems Academic year 2013-2014
175
A difference equation: Definition and forms
A n-th linear constant coefficient difference equation describing a linear time-invariant discrete-time
system is given as
x(k + n) + a1 x(k + n − 1) + · · · + an x(k) = b0 u(k + n) + b1 u(k + n − 1) + · · · + bn u(k)
where u(k) and x(k) are the system’s input and output, respectively. This equation to be solved
needs to specify the initial conditions x(0), x(1), . . . , x(n − 1) as well as the input u(k).
This difference equation can have a different form by replacing k + n by k in the equation above to
yield
x(k) + a1 x(k − 1) + · · · + an x(k − n) = b0 u(k) + b1 u(k − 1) + · · · + bn u(k − n)
This second form of difference equation is useful when the system has zero initial conditions (zero
initial values for the output and their shifted sequences) and zero initial values for the input and
their shifted sequences. Even these initial values are nonzero, if they cancel each others in the
equation, the second form will completely determine the system output response.
There are three basic techniques for solving linear constant coefficient difference equations: (1) The
classical approach consists of finding the homogeneous and particular solutions, (2) the sequential
procedure, which is used in the digital computer solution, and (3) the technique by the z transform.
Next is to consider the second and third techniques.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
176
Solution of difference equations
The sequential technique: An example
It is desired to find m(k) for the difference equation
m(k) = e(k) − e(k − 1) − m(k − 1), k ≥ 0
where
and e(k) and m(k) are zero for k < 0.

 1,
e(k) =
 0,
k even
k odd
m(k) can be determined by solving the difference equation first for k = 0, then for k = 1, k = 2, and so
on. Thus,
m(0)
=
e(0) − e(−1) − m(−1) = 1 − 0 − 0 = 1
m(1)
=
e(1) − e(0) − m(0) = 0 − 1 − 1 = −2
m(2)
=
e(1) − e(1) − m(1) = 1 − 0 + 2 = 3
Using this sequential technique, we can find m(k) for any value of k. This technique is not practical,
however, for large values of k, except we implemented on a digital computer as shown next.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
177
Solution of difference equations
The sequential technique: An example
The following Matlab program can be used to solve our equation
mkminus1 = 0;
ekminus1 = 0;
ek = 1;
for k = 0 : 20
mk = ek − ekminus1 − mkminus1;
[k, mk]
mkminus1 = mk;
ekminus1 = ek;
ek = 1 − ek;
end
This program gives m(k) for 0 ≤ k ≤ 20.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
178
Solution of difference equations
The z transform technique
Difference equations can be solved easily by use of a digital computer except that closed-form
expressions cannot in general be obtained. However, the z transform method enables us mostly to
find solutions in closed form.
By applying the z transform to the difference equation and using the table (by shifting theorem)
below, the difference equation is transformed into algebraic equation for which solution can be easily
determined by using the inverse z transform. Let us look at some examples.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
179
Solution of difference equations
The z transform technique: Example 1
Problem Solve the following difference equation by use of the z transform method:
x(k + 2) + 3x(k + 1) + 2x(k) = 0, x(0) = 0, x(1) = 1
Solution Taking the z transform of both sides of the given difference equation and using the shifting
theorem gives
z2 X(z) − z2 x(0) − zx(1) + 3zX(z) − 3zx(0) + 2X(z) = 0.
Substituting the initial data and simplifying gives
X(z) =
z
z
=
z2 + 3z + 2
(z + 1)(z + 2)
Expanding X(z)/z in simple fractions to have
1
1
z
z
X(z)
=
−
or X(z) =
−
z
z+1 z+2
z+1 z+2
Now, applying the inverse z transform, the solution x(k) to the difference equation is
x(k) = (−1)k − (−2)k ,
Prof. K. Melhem (Qassim University)
k = 0, 1, 2, . . .
Digital Control Systems Academic year 2013-2014
180
Solution of difference equations
The z transform technique: Example 2
Problem Solve the following difference equation by use of the z transform method:
2x(k) − 2x(k − 1) + x(k − 2) = u(k),
where x(k) = 0 for k < 0 and

 1
u(k) =
 0
k = 0, 1, 2, 3, · · ·
k<0
Solution Taking the z transform of both sides of the given difference equation and using the shifting
theorem, and the z transform of u(k), gives
2X(z) − 2z−1 X(z) + z−2 X(z) =
1
.
1 − z−1
Solving this last equation for X(z), we obtain
1
z3
1
=
X(z) =
1 − z−1 2 − 2z−1 + z−2
(z − 1)(2z2 − 2z + 1)
With complex poles (0.5 ± j0.5) of the quadratic factor, X(z)/z can be expanded in simple fractions as
X(z)
1
−z + 1
z
−z2 + z
1
−1 + z−1
=
+
or X(z) =
+
=
+
z
z − 1 2z2 − 2z + 1
z − 1 2z2 − 2z + 1
1 − z−1 2 − 2z−1 + z−2
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
181
Solution of difference equations
The z transform technique: Example 2
Recalling that the z transform of damped cosine and sine functions are given by
1 − e−aT z−1 cos ωT
Z [e
cos ωkT ] =
1 − 2e−aT z−1 cos ωT + e−2aT z−2
e−aT z−1 sin ωT
−akT
Z [e
sin ωkT ] =
,
1 − 2e−aT z−1 cos ωT + e−2aT z−2
−akT
we observe that the second expanded term in the expression of X(z) above can be viewed as the z
transform of a damped sinusoid. Actually, X(z) can be rewritten as
1 − 0.5z−1
0.5z−1
1
1
1
−
+
X(z) =
1 − z−1 2 1 − z−1 + 0.5z−2 2 1 − z−1 + 0.5z−2
√
√
By identification, e−2aT = 0.5 and cos ωT = 1/ 2. Hence, we get ωT = π/4, sin ωT = 1/ 2, and
√
e−aT = 1/ 2. Then the inverse z transform of X(z) leads to
x(k)
=
=
1
1
1(k) − e−akT cos ωkT + e−akT sin ωkT
2
2
kπ 1
kπ
1
1 k
1 k
√
√
cos
sin , k = 0, 1, 2, . . .
1−
+
2
4
2
4
2
2
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
182
Block-diagram representation of difference equations
Like a linear time-invariant system, a discrete-time system can be represented by a block diagram.
The basic element of this block diagram is a time-dela element, which is a shift register as shown in
figures below.
Every T seconds, a number is shifted into the register, and at the same time, the number that was
stored in the register is shifted out. Therefore, and as shown in the figures, if x(k) is the input at the
register, the output would be x(k − 1).
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
183
Block-diagram representation of difference equations
An interconnection of these shift registers, together with devices that perform multiplication by a
constant and summation, can be used to represent a linear time-invariant discrete-time system. For
example, the discrete-time system given by the following difference equation
m(k) = e(k) − e(k − 1) − m(k − 1)
can be represented by the following block diagram
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
184
Relationship between Laplace transform and z transform
As seen before, the sampled-data signal x∗ (t) is given by
∞
∗
x (t) =
∑ x(kT )δ(t − kT )
k=0
Now, consider the Laplace transform of x∗ (t), we have
∞
∗
X (s) =
∑ x(kT )e−kT s
k=0
If we define
eT s = z or inversely s =
1
lnz
T
the Laplace transform of x∗ (t) becomes
∗
X (s)
∞
s=(1/T )
lnz =
∑ x(kT )z−k
k=0
The right-hand side of the last equation is no other than the z transform of the time sequence
x(0), x(T ), x(2T ), . . . generated from x(t) at t = kT where k = 0, 1, 2, . . .
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
185
Relationship between Laplace transform and z transform
In summary, we have
X ∗ (s)
s=(1/T )
lnz = X(z)
which gives the relationship between Laplace transform and the z transform.
Two important remarks are in order:
• We stress that the notation X(z) does not signify X(s) with s replaced by z, but rather
X ∗ (s = T −1 lnz).
• The definition eT s = z is essential to introduce techniques for analysis and design of
discrete-time control systems. Actually, such techniques are derived from their counterparts for
continuous-time systems using the aforementioned definition.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
186
The z transform of functions involving the term 1 − e−T s
The transfer function of the plant preceded by the zero-order hold is
1 − e−T s
G(s) =
G p (s)
s
The z transform of G(s) (or the discrete transfer function of the plant) can be proved to be as
G
(s)
p
G(z) = Z [G(s)] = (1 − z−1 )Z
s
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
187
The z transform of functions involving the term 1 − e−T s
Example: Obtain the z transform of
1 − e−T s 1
G(s) =
s
s+1
Applying the previous formula, we get
−T
s
1−e
1
1
1
1
G(z) = Z
= (1 − z−1 )Z
= (1 − z−1 )Z
−
s
s+1
s(s + 1)
s s+1
1
1
(1 − e−T )z−1
−1
= (1 − z )
−
=
1 − z−1 1 − e−T z−1
1 − e−T z−1
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
188
Suggested problems
Students are suggested to solve the following problems from the book [Discrete-time
control systems by K. Ogata, Chapter 2]:
A-2-4, A-2-5, A-2-6, A-2-7, A-2-11, A-2-12, B-2-5, B-2-7, B-2-16, B-2-17,
B-2-18
Also, it is suggested to solve the following problems from your [textbook, Chapter 2]:
2-9, 2-10, 2-11, 2-21
Students are encouraged to solve the assigned problems by hand before seeking help
from classmates or the teacher. Subsequently, the accompanying solutions can be
checked for confirmation.
Prof. K. Melhem (Qassim University)
Digital Control Systems Academic year 2013-2014
189
Descargar