Digital Control System Analysis and Design 4th Edition by Phillips ISBN Solution Manual
Digital Control System Analysis and Design 4th Edition by Phillips ISBN Solution Manual
CHAPTER 2
2.2-1. The rectangular rules for numerical integration are illustrated in Fig. P2.2-1. The left-side rule is
depicted in Fig. P2.2-1(a), and the right-side rule is depicted in Fig. P2.2-1(b). The integral of x(t)
is approximated by the sum of the rectangular areas shown for each rule. Let y(kT ) be the
numerical integral of x(t), 0 ≤ t ≤ kT.
x(t)
x(k)
x(k + 1)
kT (k + 1)T
(a)
x(t)
x(k + 1)
kT (k + 1)T
(b)
FIGURE P2.2-1 Rectangular rules for integration: (a) left side; (b) right side.
(a) Write the difference equation relating y(k + 1) , y(k) , and x(k) for the left-side rule.
(b) Find the transfer function Y (z)/X (z) for part (a).
(c) Write the difference equation relating y(k + 1), y(k) , and x(k + 1) for the right-side rule.
(d) Find the transfer function Y (z)/X (z) for part (c).
(e) Express y(k) as a summation on x(k) for the left-side rule.
(f) Express y(k) as a summation on x(k) for the right-side rule.
Solution:
(a) y(k +1) = y(k) + Tx(k)
Y (z)
(b) zY (z) = Y (z) + TX (z) = T
X (z) z −1
Y (z)
(d) zY (z) = Y (z) + TzX (z) = Tz
X (z) z −1
k −1
2.2-2. The trapezoidal rule (modified Euler method) for numerical integration approximates the integral
of a function x(t) by summing trapezoid areas as shown in Fig. P2.2-2. Let y(t) be the integral of
x(t) .
x(t)
x(k)
x(k + 1)
kT (k + 1)T
(a) Write the difference equation relating y ⎡(k + 1)T ⎤ , y(kT ), x ⎡(k + 1)T ⎤ , and x(kT ) for this rule.
⎣⎢ ⎥⎦ ⎣⎢ ⎥⎦
(b) Show that the transfer function for this integrator is given by
Y ( z) (T 2)(z + 1)
=
X ( z) z−1
Solution:
x(k) + x(k +1)
(a) y(k + 1) = y(k) + T
2
T T z +1
(b) zY (z) = Y (z) + X (z) + zX (z) Y (z) = X (z)
2 2 z −1
2.2-3. (a) The transfer function for the right-side rectangular-rule integrator was found in Problem 2.2-1
to be Y (z)/X (z) = Tz/(z − 1) . We would suspect that the reciprocal of this transfer function should
yield an approximation to a differentiator. That is, if w(kT ) is a numerical derivative of x(t) at
t = kT ,
W (z ) z−1
=
X (z) Tz
(b) Draw a figure similar to those in Fig. P2.2-1 illustrating the approximate differentiation.
(c) Repeat part (a) for the left-side rule, where W (z)/X (z) = T / (z − 1).
Solution:
1
w(k + 1) = x(k + 1) − x(k)
T
(b)
calculated
slope
kT (k + 1)T t
kT (k + 1)T t
1
w(k) = x(k + 1) − x(k)
T
2.3-1. Find the z-transform of the number sequence generated by sampling the time function e(t) = t
every T seconds, beginning at t = 0 . Can you express this transform in closed form?
Tz
Solution: e(t) = t; E(z ) = 0 + Tz −1 + 2Tz−2 + =
(z − 1)2
2.3-2. (a) Write, as a series, the z-transform of the number sequence generated by sampling the time
function e(t) = −t every T seconds, beginning at t = 0 . Can you express this transform in
closed form?
(b) Evaluate the coefficients in the series of part (a) for the case that T = 0.05 s .
(c) The exponential e(t) = −bt is sampled every T = 0.2 s , yielding the z-transform
⎛ 1⎞ ⎛ 1⎞2 − ⎛ 1 ⎞3 −
E(z) = 1 + ⎜ ⎟z −1 + ⎜ ⎟ z 2 + ⎜ ⎟ z 3 +
⎟
⎝⎟
⎜2⎠ ⎜⎝ 2 ⎟⎠ ⎜⎝ 2 ⎟⎠
Evaluate b.
Solution:
1
= 1 + (−T z −1) 1+ (−T z −1)2 + = =
z
1 − −T z−1 z − −T
z
(b) E(z) = 1+ (0.9512z−1 )1 + (0.9512z−1)2 + =
z − 0.9512
2.3-3. Find the z-transforms of the number sequences generated by sampling the following time functions
every T seconds, beginning at t = 0 . Express these transforms in closed form.
Solution:
z
(a) e(t) = −at E(z ) = 1+ −aT z−1 + −2aT z−2 + = 2-3.
z − −aT
E(z ) = z−1 + −T z−2 + −2T z−3 + = z−1 z (=1 −T
−T
z− z−
2.4-1. A function e(t) is sampled, and the resultant sequence has the z-transform
z3 − 2z
E( z ) =
z4 − 0.9z2 + 0.8
Solve this problem using E(z) and the properties of the z-transform.
(z3 − 2z)z−2
(a) �[e(t − 2T )u(t − 2T )] =
z4 − 0.9z2 + 0.8
z3 − 2z 1 −1.1z2 + 0.8
=
z − =
z4 − 0.9z2 + 0.8 z z4 − 0.9z2 + 0.8
z2 − z
=
z4 − 0.9z2 + 0.8
2.4-2. A function e(t) is sampled, and the resultant sequence has the z-transform
z −b
E (z ) =
z2 − cz2 + d
Find the z-transform of akT e(kT ) . Solve this problem using E(z) and the properties of the z-
transform.
Solution:
By complex translation
z−aT − b
�⎡ akT e(kT )⎤ = E(z −aT ) =
⎣⎢ ⎦⎥ z2−2aT − cz2−2aT + d
⎡ ⎤ z(z − cos aT )
�⎢⎣cos akT ⎥⎦ =
z2 − 2z cos aT + 1
(a) Find the conditions on the parameter a such that ⇥ ⎡⎢⎣cos akT ⎤⎥⎦is first order (pole-zero cancellation
occurs).
Solution:
(c) E(z) = z
=
z , cos a = 1, a = 0, 2π, 4π,
z − cos a z −1
2.5-2. Find the z-transform, in closed form, of the number sequence generated by sampling the time
function e(t) every T seconds beginning at t = 0 . The function e(t) is specified by its Laplace
transform,
E (s ) =
(
2 1 − −5s ), T = 1s
s( s + 2)
Solution:
E (s) = 2 1 −1
= +
1
s(s + 2) s s + 2
1, k = 0, 1
x(k) − 3x(k − 1) + 2x(k − 2) = e(k), e(k) =
0, k 2
x(−2) = x(−1) = 0
(c) Will the final-value theorem give the correct value of x(k) as k → ∞ ?
Solution:
z +1
(b) [1 − 3z + 2z ]X (z) = E(z) = 1 + z =
−1 −2 −1
z
z2 z +1 z(z +1) −2 3
X (z) =
(z − 1)(z − 2) z = =z +
(z − 1)(z − 2) z − 1 z − 2
x(k) = −2 + 3(2)k
(a) Solve for y(k) as a function of k, and give the numerical values of y(k), 0 ≤k ≤ 4.
(b) Solve the difference equation directly for y(k), 0 ≤ k ≤ 4, to verify the results of part (a).
(c) Repeat parts (a) and (b) for e(k) = 0 for all k, and y(0) = 1, y(1) = −2 .
Solution:
z 1
(a) E(z) = �[u(k − 1)] = z−1 =
z − 1 z−1
3 1
z2 − z+ Y (z) = E(z)
4
8
1 −8 8 3
Y (z) 1 · z −1 = + + −16 + 64 3
z =
z z−
1 1
z− z z −1 z − 1 z −1 4
2
2 4
1 k 64 1 k
y(k ) = −8δ(0) + −16 +
2 3 4
7
y(0) = 0; y(1) = 0; y(2) = 0; y(3) = 1; y(4) =
4
3 1
(b) y(k + 2) = e(k) + y(k + 1) − y(k)
4 8
3 1
y(2) = 0 + (0) − (0) = 0
4 8
3 1
y(3) = 1 + (0) − (0) = 1
4 8
3 1
y(4) = 1 + (1) − (0) = 7 4
4 8
(
(a) Solve for x(k) as a function of k, using the z-transform. Give the values of x(0), x(1) , and
x(2) .
(b) Verify the values x(0), x(1) , and x(2) , using the power-series method.
(c) Verify the values x(0), x(1) , and x(2) by solving the difference equationdirectly.
(d) Will the final-value property give the correct value for x(∞)?
Solution:
z
(a) [1− z−1 + z−2 ]X (z) = E(z) =
z −1
z3 1
X (z) 1 k1 k*
= + + 1 with p =
1 60
z z −1 z − p1 z − p1*
z2 1120
k1 = =
(z −1)(z −1 − 60) (.5 + j.866 −1)(.5 + j.866 − .5 + j.866)
z=160
1120
= = 0.5774 − 90
1120 [ j2(0.866)]
π
aT = ln ( p ) = 0; bT = arg p =
1 1
3
2z2 − 2z + 1
2z2 − 4z + 4 − 2z−1
2z +
x(0) = 1+ 0 − 0 = 1
x(1) = 1+1− 0 = 2
x(2) = 1 + 2 −1 = 2
where
⎧⎪ 1, k=0
e( k ) = ⎟⎨
⎪ 0, otherwise
⎟⎩
x(0) = 1
x(1) = −1
(c) Verify the results in part (b) using the power-series method.
(d) Verify the results in part (b) by solving the difference equation directly.
Solution:
(a) z2[X (z) − x(0) − x(1)z−1] + 3z[X (z) − x(0)] + 2X (z) = E(z) = 1
1 + z2 − z + 3z z2 + 2z + 1 z + 1
X (z) = 2 = =
z − 3z + 2 z2 + 3z + 2 z + 2
1
X (z) = z z +1 = z +
2
2 1
z(z + 2) z z + 2
1 1
x(k) = (k) + (−2)k
2 2
(a) Write a digital computer program that will calculate x(k) . Run this program solving for x(3),
x(4) , . . . , x(25) .
(c) Use the z-transform and the power-series method to verify the values x(k), 0 ≤ k ≤ 5.
Solution:
(a) x0 = 0;
x1 = 0;
x2 = 0;
for k = 0:5;
x0 = x1;
x1 = x2;
x2 = x3;
end
x(3) = 1+ 0 − 0 + 0 = 1
z
(c) [z3 − 2.2z2 +1.57z − 0.36]X (z) = E(z) =
z −1
z
X (z) =
(z −1)(z − 2.2z + 1.57z − 0.36)
3 2
x(3) = 1
x(4) = 3.2
x(5) = 6.47
0.1
E(z ) =
z(z − 0.9)
(c) Check the values calculated in part (a) using partial fractions.
(d) Find e(k) for k = 0, 1, 2, 3, and 4 if ⇥ ⎡e(k)⎤ is givenby
E( z ) =
1.98z
(z 2
− 0.9z + 0.9 )(z − 0.8)(z 2
− 1.2z + 0.27 )
(e) Find a function e(t) which, when sampled at a rate of 10 Hz (T = 0.1s), results in the
(g) From parts (e) and (f), what is the effect on the inverse z-transform of changing the sign on a
real pole?
Solution:
0.1zk−1 zk−2
(a) e(k) = z(z − 0.9)
= z − 0.9
residues residues
0.1 0.1
k = 0 : fcn = , residue = = 0.1235
z2(z − 0.9) z=0.9
(0.9)2
e(0) = 0
0.1 0.1
k = 1 : e(1) = + =0
z − 0.9 z=0 z z =0.9
k = 10 : e(10) = 0.1(0.9)8
k1 k2 k3
(c)(c) E(z) = 0.1 = + +
z z2 (z − 0.9) z2 z z − 0.9
−0.1 1
k= =− ;k 0.1 1
=
1 3
0.9 9 (0.9)2 8.1
d −1
k= 0.1 = , from (a)
2 dz z −0.9
z=0 8.1
−1 1 1
e(k) = (k) − (k −1) + (0.9)k
8.1 9 8.1
1 1 1 0.9
x(0) = − + 0 + = 0; x(1) = − 0 − + =0
8.1 8.1 9 8.1
0.1
x(10) = − 0 − 0 + (0.9)10 = 0.1(0.9)8
(0.9)2
1.98z
(d) E(z) = = 1.98z−4 + ()z−5 + ()z−6 +
z +
5
2z
(e) E(z) = = 2z
−aT = 0.8 aT = 0.2231
z − 0.8 z − −aT
0.2231
2z
(f) E(z) = ; −aT jπ = −0.8 aT = 2.231
z − (−0.8)
ωs
e(t) = 2e−2.231t cos10πt where = 10π
2
E( z ) =
z
( z + 1)
2
(b) Check your result in part (a) by finding the inverse z-transform of E(z).
Solution:
z(z − 1)
(a) e() = lim (z − 1)E(z) = =0
z→1 (z +1)2 z =1
z
(b) e(k) = z−1 = k(−1)k, e()unbounded
(z −1)2 z
(c) (a) e() = lim (z −1) ,
unbounded
z→1 (z −1)2
z
(d) (a) e() = lim (z −1) =0
z→1 (z − 0.9)2
z
(e) (a) e() = lim (z −1) =0
z→1 (z −1.1)2
2.7-3. Find the inverse z-transform of each E(z) below by the four methods given in the text. Compare
the values of e(z) , for k = 0, 1, 2, and 3, obtained by the four methods.
0.5
(a) E(z) = 0.5z (b) E(z ) =
Solution:
0.5z−1 + 0.8z−2 + 0.98z−3 +
(a) (i) z − 1.6z + 0.6 0.5z
2
k
(iii) zk − E(z) = 0.5z1
(z − 1)(z − 0.6)
0.5(1)k 0.5(0.6)k k
e(k) = + = 1.25(1 − 0.6 )u(k)
1 − 0.6 0.6 −1
0.5z
(iv) E1(z) = e1 (k) = 0.5(0.6)k
z − 0.6
1
E (z) = e2 (0) = 0; e2 (k) = 1, k 1
2
z −1
(b) e(0) = 0
2.8-1. Given in Fig. P2.8-1 are two digital-filter structures, or realizations, for second-order filters.
e(k)
y(k)
+ + y(k)
(a)
b2
b1
+
(k) + f(k) + y(k)
T T b0
- +
-
a1
a0
(b)
(b) Derive the filter transfer function Y (z)/E(z) for the 3D structure by taking the z-transform of
the equation in part (a).
(c) Write the difference equation for the 1D structure of Fig. P2.8-1(b). Two equations are
required, with one for f (k) and one for y(k) .
(d) Derive the filter transfer function Y (z)/E(z) for the 1D structure by taking the z-transform of
the equations in part (c) and eliminating F (z) .
(e) From parts (b) and (d), relate the coefficients αi , βi to ai , bi such that the two filters realize the
same transfer function.
(f) Write a computer-program segment that realizes the 3D structure. This program should be of
the form used in Example 2.10.
(g) Write a MATLAB-program segment that realizes the 1D structure. This program should be of
the form used in Example 2.10.
Solution:
Y (z) 2 z2 + 1z + 0
=
E(z) z2 + 1z + 0
E(z)
(d) F(z) = E(z) − (a1z + a0 z )F (z) F(z) =
−1 −2
1 + a1z−1 + a0 z−2
b2 z2 + b1z + b0
Y (z) = (b + b z−1 + b z−2 ) F (z) = E(z)
2 1 0 z2 + a z + a
1 0
(e) i = ai and βi = bi , i = 1, 2
(f)
ykminus2 = 0;
ykminus1 = 0;
ekminus2 = 0;
ekminus1 = 0;
ek = 1;
for k = 0:5
yk=b2*ek+b1*ekminus1+b0*ekminus2–a1*ykminus1-a0*ykminus2;
ekminus2 = ekminus1;
ekminus1 = ek;
ykminus2 = ykminus1;
ykminus1 = yk;
end
(g)
fkminus2 = 0;
fkminus1 = 0;
ek = 1;
for k = 0:5
fk=ek-a1*fkminus1–a0*fkminus2;
yk = b2*fk+b1*fkminus1+b0*fkminus2;
fkminus2 = fkminus1;
fkminus1 = fk;
end
2.8-2. Shown in Fig. P2.8-2 is the second-order digital-filter structure 1X.
+
+ f2(k)
g4
D(z) = b + A + A
2
z− p z−p
where p and p (conjugate of p) are complex. The relationships between the filter coefficients
and the coefficients in Fig. P2.8-2 are given by
g1 = Re( p) g3 = −2 Im(A)
g2 = Im( p) g4 = 2 Re( A)
(a) To realize this filter, difference equations are required for f1(k), f2 (k), and y ( k ) . Write these
equations.
(b) Find the filter transfer function Y (z)/E(z) by taking the z-transform of the equations of part (a)
and eliminating F1(z) and F2 (z) .
(c) Verify the results in part (b) using Mason’s gain formula.
(d) Write a MATLAB-program segment that realizes the 1X structure. This program should be of
the form of that is used in Example 2.10.
Solution:
z − g1 g3zE(z)
g4 zE(z) = (g4 z − g1g4 z + g2 g3 z) E(z)
2
F2 (s) = −g2
z − g1 g2 (z − g1 )2 + g 22
−g2 z − g1
Y (z) g4 z + g2 g3 − g1g4
= b2+
E(z) (z − g )2 + g 2
1 2
1
(g4 − jg3 ) 1 (g + jg )3
= b2 + 2
+ 2 4
z − g1 − jg2 z − g1 + jg2
g4 z − g1g4 + g2 g3
= b2 + (z − g )2 + g 2
1 2
g2 g3 z−2 + g4 (1 − g1z−1)
(c) D(z) = b0 +
1 − g1 z−1 − g1z−1 + g12 z−2 + g2 2 z−2
g4 z + g2 g3 − g1g4
= b0 + z2 − 2g z + g 2 + g 2
1 1 2
(d) f1kminus1 = 0;
f2kminus1 = 0;
ek = 1;
for k = 0:5
yk = b0*ek+f2kminus1;
f1kminus1 = f1k;
f2kminus1 = f2k;
end
z2 − 1.4z + 0.98
(a) Find the coefficients of the 3D structure of Fig. P2.8-1 such that D(z) is realized.
(b) Find the coefficients of the ID structure of Fig. P2.8-1 such that D(z) is realized.
(c) Find the coefficients of the IX structure of Fig. P2.8-2 such that D(z) is realized.
(e) Verify the results in part (c) using Mason’s gain formula.
Solution:
( )
1
= 0.2 + j0.6857
g1 = 0.7 g3 = 1.371
g2 = 0.7 g4 = 0.4
[r,p,k,]=residue(num, den)
= 1−1.4z−1 + 0.98z−2
1
D(z) = 2 + [1.371 (0.7)z−2 + 0.4z−1(1 + 0.7z−1)]
0.4z − 1.24 2z 2 − 2.4z + 0.72
=
2+ =
z2 − 1.4z + 0.98 z2 − 1.4z + 0.98
2.9-1. Find two different state-variable formulations that model the system whose difference equation is
given by:
Solution:
0 1 0
x(k + 1) = x(k) + u(k)
−5
−6 1
y(k) = 2 0x(k)
u(k)
Z O O
x2(k) x1(k) y(k)
−6 1 0
x(k + 1) = x(k) + u(k)
−
5
y(k) = 1 0x(k)
−6 1 1
x(k +1)= x(k) + u(k)
−
5
y(k) = 1 0x(k)
−6 1 1
x(k + 1) = x(k) + u(k)
−
5
2.9-2. Write the state equations for the observer canonical form of a system, shown in Fig. 2-10, which
has the transfer function given in (2-51) and (2-61)
b zn−1 + bz+b
G(z) =
n−1 1 0
n−1 1 0
Solution:
0
an 1
1 0
bn−1
− b
x(k + 1) = an−2 0 x(k ) + n−2 u(k )
0 1
0 0 0 0
b
0
y(k ) = 1 0 0 □ 0x(k )
2.10-1.Find a state-variable formulation for the system described by the coupled second-order difference
equations giv en. The system output is y(k) , and e1(k) and e2 (k) are the system inputs. Hint:
Draw a simulation diagramfirst.
Solution:
e1(k) x1(k)
x2(k) x(k)
y(k)
e2(k) x3(k)
x4(k) n(k)
0 1 0 0 0 0
0 0 0 −1 4 1
e(k)
x(k) +
x(k + 1)=
0 0 0 1 0 0
−1 0 1 0 2 0
y(k) = x4 (k +1) − x2 (k) + e1(k) = −x1(k) + x3 (k) − x2 (k) + e1(k)
(b) Using any similarity transformation, find a different state model for this system.
(c) Find the transfer function of the system from the transformed state equations.
(d) Verify that A given and Aw derived in part (b) satisfy the first three properties of similarity
transformations. The fourth property was verified in part (c).
(a)
2.10-3.Consider the system of Problem 2.10-2. A similarity transformation on these equations yields
⎢⎡ d1 0⎥⎤
w( k + 1) =
⎢ ⎥ ( k ) + B wu(k)
w
0 d2 ⎥
⎣⎢ ⎦
y(k) = Cwx(k)
(b) Find a similarity transformation that results in the Aw matrix given. Note that this matrix is
diagonal.
(d) Find the transfer functions of both sets of state equations to verify the results of this problem.
y(k) = ⎡⎢ 1 2 ⎤⎥ x(k)
⎣ ⎦
(b) Using any similarity transformation, find a different state model for this system.
(c) Find the transfer function of the system from the transformed state equations.
(d) Verify that A given and Aw derived in part (b) satisfy the first three properties of similarity
transformations. The fourth property was verified in part (c).
Solution:
(a)
2.11-1.Consider a system with the transfer function
Y (z )
G(z) = = 2
U (z ) z(z − 1)
(b) Verify the transfer function of each state model in part (a), using (2-84).
Solution:
2 2z−2
(a) G(z) = G1 (z)G2 (z) = =
z2 − z 1 − z−1
(1)
x1(k) x2 x1 y(k)
x1(k)
x1(k) y(k)
x2(k)
change Z to 2
(3)(3)
u(k) x2 + x1 y(k)
change Z to 2
(b) (1)
2.11-2.Consider a system described by the coupled difference equation
y(k + 2) − v(k) = 0
(a) Find a state-variable formulation for this system. Consider the outputs to be y(k + 1) and v(k) .
Hint: Draw a simulation diagram first.
(b) Repeat part (a) with y(k) and v(k) as the outputs.
(d) Use (2-84) to (f) Verify the transfer function V (z)/U (z) in
calculate the part (d) by using Mason’s gain formula on
system the simulation diagram of part (a).
transfer
y(k + 2) y(k + 1) y(k)
x2(k) x1(k)
function with
v(k) as the Solution:
system
output, as in (a)
part (c); that
is, find V
(z)/U (z) .
1
(b) (e) z2Y (z) − V (z) = 0 Y (z) = V (z)
z2
1
zV (z) + zY (z) = zV (z) + V (z) = U (z)
z
V (z) Y0(z) 1 z
= = 1=
U (z) U (z) z+ z +1
2
z
(c) From (a):
1 y0(z)
u(z) 1
Y0 (z) z−1 z
= = 2
U (z) 1 + z −2
z +1
⎢ ⎥ ⎢ ⎥
⎢ 0 1 0 ⎥ ⎢ 0 ⎥
⎣ ⎦ ⎣ ⎦
y(k) = ⎡⎢ 0 0 1 ⎤⎥ x(k)
⎣ ⎦
(a) Calculate the transfer function Y (z)/U (z) , using (2-84).
(b) Draw a simulation diagram for this system, from the state equations given.
(c) Use Mason’s gain formula and the simulation diagram to verify the transfer function found in
part (a).
Solution:
z − 1 0 0
(a) zI − A = −1 z − 1 0 ; = z − 2z + z = z(z − 1)
3 2 2
0 −1 z
1
z(z −1) z 1 z−1 0 0
1 1
Cof (zI − A) = 0 z(z − 1) z − 1 , (zI − A)−1 = 0
(z −1)
2 z −1
(z −1)2
0 0
1 1 1
z(z − 1)
2 z(z − 1) z
1
G(z) = C[zI − A] B = 0 0 1[zI − A] 0
−1 −1
0
1
1 1 1 1 1
= 0 = =
z(z − 1)
2 z(z − 1) z z(z − 1)2 z3 − 2z2 + z
0
(b)
e(k) + x1(k)
x2(k)
x3(k) y(k)
2.11-4.Section 2.9 gives some standard forms for state equations (simulation diagrams for the control
canonical and observer canonical forms). The MATLAB statement
⎡⎢ A,B,C,D⎤⎥ = tf 2ss(num,den)
⎣ ⎦
generates a standard set of state equations for the transfer function whose numerator
coefficients are given in the vector num and denominator coefficients in the vector den.
(a) Use the MATLAB statement given to generate a set of state equations for the transfer function
G(z) = 3z + 4
z2 + 5z + 6
(b) Draw a simulation diagram for the state equations in part (a).
(c) Determine if the simulation diagram in part (b) is one of the standard forms in Section 2.9.
Solution:
(a) n = [0 3 4];
d = [1 5 6];
[A,B,C,D] = tf2ss(n, d)
−5 −6 1
x(k + 1) = x(k) + u(k)
1 0
0
y(k) = 3 4x(k)
(b)
(b) Let u(k) = 1, k ≥ 0 (a unit step function) and x(0) = 0 . Use the transfer function of part (a) to
find the system response.
(c) Find the state transition matrix Φ(k) for this system.
(d) Use (2-90) to verify the step response calculated in part (b). This calculation results in the
response expressed as a summation. Then check the values y(0), y(1) , and y(2) .
(e) Verify the results of part (d) by the iterative solution of the state equations.
Solution:
z −1
(a) zI − A = 0 z ; = zI − A = z(z − 3) =
− 3
Y (z) 1 z − 3 1 1
= C[zI − A]−1B = −2 1
U (z) 0 z 1
=
1
− 2z + 6 z −21= −z + 4
1
z(z − 3)
= = + 2 + 6
(d) Show that the solution in part (a) satisfies the given initial conditions.
(e) Use an iterative solution of the state equations to show that the values y(k) , for k = 0, 1, 2, and
3, in part (b) are correct.
(a)
Solution:
2.12-3.The system described by the equations
is excited by the initial conditions x(0) = ⎡⎢⎣ −1 2 ⎤ with u(k) = 0 for all k.
T
(a) Use (2-89) to solve for x(k), k ≥ 0.
(c) Show that Φ(k) in part (a) satisfies the property Φ(0) = I .
(d) Show that the solution in part (a) satisfies the given initial conditions.
(e) Use an iterative solution of the state equations to show that the values y(k) , for k = 0, 1, 2, and
3, in part (b) are correct.
−15 + 14 −1
(d) x(k) = =
k =0 9 − 7 2
−1
y(0) = Cx(0) =1 −1 = −3
2
0.9
1.1 1 −1 0.9 y(1) = 1 −1 = 0.6
;
x(1) = = 0.3 0.3
−0.3 0 2
1.29
1.1 1 0.9 1.29 y(2) = 1 −1 = 1.56
x(2) = = ;
−0.3 0 0.3 − −0.27
0.27
1.149
1.1 1 1.29 1.149 y(3) =1 −1 = 1.536
x(3) = = ;
−0.3 0 −0.27 − −0.389
0.387
MATLAB:
x=[–1; 2];
u = 0;
for k = 0:3
x1 = A*x + B*u;
y = C*x;
[k,y]
x = x1;
end
x(k + 1) = Ax(k)