EE 56: Digital Control Systems Problem Set 3: Solution Due on Mon 7 th Oct in class Fall 23 Problem For the causal LTI system described by the difference equation y k + 2 y k = x k, () (a) By first finding out the z-transform and then applying a suitable substitution for z, determine the frequency response H(e jω ) for the system Also find out the frequency response against unnormalized frequency if the sampling frequency f s = Hz Taking z-transform of the differential equation with zero initial conditions, Now, let z = e jω, Y (z) + 5z Y (z) = X(z), H(z) = Y (z) X(z) = + 5z = H(e jω ) = + 5e jω Let unnormalized frequency Ω = ω T = ω, which implies that ω = Ω Hence, H(e jω ) = + 5e j Ω (b) Find out y k, for x k = δk, and determine its discrete-time Fourier transform (DTFT) using the formula Y (e jω ) = + k= y k e jωk (2) y k + 2 y k = δk Let s assume a general solution of the form y k = y a k for k Substituting this solution into the differential equation leads to For k =, y k = y = So, For k =, Eventually, Y (z) = y k z k = k= y a k + 5y a k = δk y = δ = y a + 5y = δ =, = a = 5 y k = ( 5) k ( 5) k z k = ( 5z ) k = k= k= Y (e jω ) = + 5e jω ( 5z ) = + 5z
(c) Compare the results of (a) and (b), and state the reason for any similarities or differences between H(e jω ) and Y (e jω ) H(e jω ) equals Y (e jω ) for an impulse input xk = δk Problem 2 (a) For the Euler Forward s-to-z approximation z + T s, find out the range of values of s (if any) in terms of T for which (i) a stable pole on the real axis in s-domain becomes unstable in z-domain In z-domain, the unstable poles lie outside the unit circle, which is the region represented by z > Let s represent this region in z-domain by the set Z u = {z : z >, z C} Substituting the approximation for Euler Forward, we get + T s > However, we are considering only the real number line in the s-domain, the inequality above can be written as + T s > or + T s <, = s > or s < 2 T Let s denote this region in the s-domain by set In brief, Z u gets mapped on to S, ie S = {s : s > or s < 2 T, s R} Z u S On the other hand, let s denote the stable region in the s-domain by the set S s = {s : s <, s R} If a stable pole on the real axis in s-domain becomes unstable in z-domain, it must lie in a region given by S S s = {s : s < 2 T, s R} (ii) an unstable pole on the real axis in s-domain becomes stable in z-domain In z-domain, the stable poles lie inside the unit circle, which is the region represented by z < Let s represent this region in z-domain by the set Z s = {z : z <, z C} Substituting the approximation for Euler Forward, we get + T s < However, we are considering only the real number line in the s-domain, the inequality above can be written as < + T s <, = 2 T < s <
Let s denote this region in the s-domain by set S 2 = {s : 2 T < s <, s R} In brief, the Z s gets mapped on to the region S 2, ie Z s S 2 On the other hand, let s denote the unstable region in the s-domain by the set S u = {s : s >, s R} If an unstable pole on the real axis in s-domain becomes stable in z-domain, it must lie in a region given by S 2 S u =, ie an empty set, meaning that no real unstable pole in s becomes stable in z through Euler Forward approximation (b) Repeat (a) for the Euler Backward s-to-z approximation z T s (i) a stable pole on the real axis in s-domain becomes unstable in z-domain In z-domain, the unstable poles lie outside the unit circle, which is the region represented by z > Let s represent this region in z-domain by the set Z u = {z : z >, z C} Substituting the approximation for Euler Backward, we get T s > However, we are considering only the real number line in the s-domain, the inequality above can be written as T s < or T s >, = < T s < or < T s <, = T < s < 2 T or < s < T Let s denote this region in the s-domain by set S = {s : < s < 2 T, s T, s R} In short, the Z u gets mapped on to the region S, ie Z u S On the other hand, let s denote the stable region in the s-domain by the set S s = {s : s <, s R} If a stable pole on the real axis in s-domain becomes unstable in z-domain, it must lie in a region given by S S s =, ie an empty set, meaning that no real stable pole in s becomes unstable in z through an Euler Backward approximation (ii) an unstable pole on the real axis in s-domain becomes stable in z-domain In z-domain, the stable poles lie inside the unit circle, which is the region represented by z <
Let s represent this region in z-domain by the set Z s = {z : z <, z C} Substituting the approximation for Euler Forward, we get T s < However, we are considering only the real number line in the s-domain, the inequality above can be written as < T s <, = T s < or T s >, = s > 2 T or s < Let s denote this region in the s-domain by set S 2 = {s : s < or s > 2 T, s R} In short, the Z s gets mapped on to the region S 2, ie Z s S 2 On the other hand, let s denote the unstable region in the s-domain by the set S u = {s : s >, s R} If an unstable pole on the real axis in s-domain becomes stable in z-domain, it must lie in a region given by S 2 S u = {s : s > 2 T, s R} (c) For H(s) = s + s 2, transform poles and zeros to z-domain using each of Euler Forward, Euler Backward and Tustin s z 2 + T s ) 9 ( methods Comment on the change 2 T s in stability of the system for each case, while varying T from to ; for example, using T =, 2, 5, 8, and Also suggest which approximation method best preserves the system s stability characteristics H(s) = s + s 2 9 = s + (s 3)(s + 3), poles: s = ±3, zero: s = Value in s Approximation Mapped value in z for Method T = T = 2 T = 5 T = 8 T = Forward 97 4-5 -4-2 -3 Backward 97 625 4 29 25 Tustin s 97 54 4 - -2 Forward 3 6 25 34 4 3 Backward 3 25-2 -7-5 Tustin s 3 86 7 - -5 Forward 99 8 5 2 - Backward 99 83 67 56 5 Tustin s 99 82 6 43 33
Stability of the system depends upon the position of poles In s-domain, stable region is where Re{s} <, and in z-domain, z < represents the stable region The stable pole at s = 3 becomes unstable in z for T = 8 and T = after an Euler Forward approximation However, the unstable pole at s = 3 becomes stable in z for T = 8 and T = after an Euler Backward approximation For the poles under consideration, Forward Euler method tends to make stable poles unstable for larger values of T ; whereas the Backward Euler method tends to stabilize the unstable poles for larger T On the other hand, with very small values of T, stable or unstable poles in the s-domain are mapped close to the unit circle in the z-domain, and hence tends to cause marginal stability In this example, Tustin s method best preserves the system s original stability characteristics
Problem 3 In the schematic shown in Fig, assume that the mass of the spacecraft plus gas tank, m, is 2 kg and the mass of the probe, m 2, is kg A rotor will float inside the probe and will be forced to follow the probe with a capacitive forcing mechanism The spring constant of the coupling k is 42 6 The viscous damping b is 56 3 (a) Write the equation of motion for the system consisting of masses m and m 2 using the inertial position variables, y and y 2 Figure : Mechanical set-up for Problem 3 The restoring force on the masses due to the spring is directly proportional to the extension in the spring And assuming a simple model, the damping force against the relative motion of masses is directly proportional to the relative velocity between the masses Analyzing all the forces on a mass, we can write net force on the mass = restoring force on the mass due to the spring + damping force + input force Equating the net force to mass acceleration, and plugging in the equations for restoring and damping forces, we obtain the two equations m ÿ = k(y y 2 ) b(ẏ ẏ 2 ) + u, (3) m 2 ÿ 2 = k(y 2 y ) b(ẏ 2 ẏ ) (4) (b) The actual disturbance u is a micrometeorite, and the resulting motion is very small Therefore, rewrite your variables with scaled variables z = 6 y, z 2 = 6 y 2, and v = u Substituting y = 6 z, y 2 = 6 z 2, and u = 3 v, and plugging in the values of m, m 2, k and b, leads to new differential equations z = 2 3 z 28ż + 2 3 z 2 + 28ż 2 + 5v, z 2 = 42 3 z + 56ż 42 3 z 2 56ż 2 (c) Put the equations in state-variable form using the state x = z ż z 2 ż 2 T, the output y = z 2, and the input an impulse u = 3 δ(t) Ns on mass m For u = 3 δ(t), v = δ(t) Hence, ż z ż 2 z 2 = 2 3 28 2 3 28 42 3 56 42 3 56 z ż z 2 ż 2 + 5 δ(t) (d) Using the numerical values, enter the equations of motion into MATLAB in the form ẋ = Fx + Gv, (5) y = Hx + Jv, (6)
Figure 2: Impulse response, the signal the rotor must follow and define the MATLAB system: sysgpb = ss(f,g,h,j) Plot the response of y caused by the impulse with the MATLAB command impulse(sysgpb) This is the signal the rotor must follow (e) Use the MATLAB command p = eig(f) to find out the poles (or roots) of the system and roots z = tzero(f,g,h,j) to find out the zeros of the system poles:, 42 ± 793j zeros: 75 Problem 4 Give the state description matrices in control-canonical form for the following transfer functions: (a) 3s + 2 3s + 2 = /3 s + 2/3 A = 2/3, B =, C = /3, and D = (b) 4s + s 2 + 5s + 4 A = 5 4, B =, C = 4, D = (c) (s + 8)(s 2 + s + 25) s 2 (s + 5)(s 2 + s + 36) A = (s + 8)(s 2 + s + 25) s 2 (s + 5)(s 2 + s + 36) = s3 + 9s 2 + 33s + 2 s 5 + 6s 4 + 4s 3 + 8s 2 6 4 8, B =, C = 9 33 2 T, D =
Problem 5 For the system with state x and described by the state matrices 2 F =, G =, H =, J =, 2 3 find out the transformation T so that if x = Tz, the state matrices describing the dynamics of z are in control canonical form Compute the new matrices A, B, C, and D Such a T will be a 2 2 matrix, with second row t 2 of T given by t 2 = C where C is the controllability matrix, given by So, Now, C = G FG = C = 3 2 2/5 /5 3/5 /5 t 2 = C = 3/5 /5 t = t 2 F = 4/5 3/5 t T 4/5 3/5 = = t 2 3/5 /5 3 = T = 3 4 A = T 2 2 FT = B = T G =, C = HT = 3, D = J =, Problem 6 For the system with state x and described by the state matrices 4 F =, G =, 2 2 find out the steady-state value of the step-response assuming zero initial conditions Method : Having the differential equation, ẋ = Fx + Gu, and taking its Laplace Transform with zero initial conditions, leads to sx(s) = FX(s) + GU(s), = X(s) = (si F) GU(s) s + 4 si F = 2 s + (si F) s + = s 2 + 5s + 6 2 s + 4 (si F) 2 G = s 2 + 5s + 6 2s + 8
Laplace transform of the unit step function is U(s) = s Hence, X(s) = (si F) GU(s) = Using the final-value theorem Steady-state value of x is given by s 2 + 5s + 6 2 2s + 8 lim f(t) = lim sf (s), t s lim x(t) = lim sx(s) = t s 6 2 8 s = s(s 2 + 5s + 6) = /3 4/3 2 2s + 8 Method 2: At a bounded steady-state value x ss, x is not changing with time, which means that ẋ = So, Fx ss + Gu =, Problem 7 = x ss = F 4 Gu = 2 For the system shown in Fig 3: (a) Find out the transfer function from U to Y 2 /3 () = 4/3 Figure 3: Block diagram for Problem 7 At the output, and at the input Other equations are Y = X + X 2 + X 4, (7) (U X 3 )G = X 4, = U = G X 4 + X 3 (8) X = X 4 G 2, (9) X 2 = X H, () X 3 = (X + X 4 )H 2 () Now lets try to express the equations of Y and U solely in terms of X 4 Substituting X from (9) into (), X 3 = (X 4 G 2 + X 4 )H 2, and plugging this expression of into (8), we get U = G X 4 + (X 4 G 2 + X 4 )H 2, U X 4 = G + (G 2 + )H 2 Plugging in X from (9) and X 2 from () into (7), we get Y = X 4 G 2 + X H + X 4,
and now plugging in X from (9), Y = X 4 G 2 + X 4 G 2 H + X 4, Y = G 2 + G 2 H + X 4 Y U = Y ( ) U = G 2 + G 2 H + X 4 X 4 G = G 2H H 2 (H H 2 + H2 + G 2 H H 2 ) + (G 2 + )H 2 G 2 H H 2 (G G 2 H H 2 + H + G 2 H ), Y U = H H 2 + H2 + G 2 H H 2 G G 2 H H 2 + H + G 2 H = Y (s) U(s) = s 2 + 5s + 2s 3 + 8s 2 + s + 5 s 2 + s + (s + 4)s 2 2s 3 (s + 4) + s + (s + 4)s = s 3 + 5s 2 + s 2s 4 + 8s 3 + s 2 + 5s, (b) Write state equations for the system using the state variables indicated From (9), from (), from (), from (8), and from (7), X = X 4 s + 4, = ẋ = 4x + x 4, ẋ 2 = x, ẋ 3 = x + x 4, ẋ 4 = 5x 3 + 5u, Y = x + x 2 + x 4 Let s define the state vector x = x x 2 x 3 x 4 T Now considering ẋ = Fx + Gu, we find out that F = 4 /2, G = y = Hx + Ju, 5, H =, J =
Problem 8 Consider the circuit in Fig 4, with an input voltage source u(t) and an output current y(t) Figure 4: Circuit diagram for Problem 8 (a) Using capacitor voltage and inductor current as state variables, write state and output equations of the system By applying KVL to the three loops in the circuit, we obtain the following three equations ẋ = R L x + u L, (2) ẋ 2 = R 2 C x 2 + u, (3) R 2 C y = x R 2 x 2 + R 2 u (4) Let the state vector x = x form, x 2 T Converting the equations above into the state-space we derive F = R L R 2 C, G = ẋ = Fx + Gu, y = Hx + Ju, L R 2 C, H = R 2, J = R 2 (b) Find out the conditions relating R, R 2, C, and L that render the system uncontrollable If the system is uncontrollable, the controllability matrix R C = G FG = L L 2 R 2 C (CR 2 ) 2 is singular, which means that det(c) = det(c) = L(R 2 C) 2 + R R 2 L 2 C = = L R = R 2 C
(c) Physically interpret the conditions found in (b) in terms of the time constants of the system L R is the time-constant of the inductor, while R 2 C is the capacitor s time-constant When both the time-constants are equal, the system becomes uncontrollable (d) Find out the transfer function of the system The transfer function H(s) = H(sI F) G + J H(sI F) G + J = R 2 s + R L L R2 H(s) = 2C s + R s + + L R 2C R 2 s L R = + 2 s + R s + L R 2C s + R 2C L R 2 C + R 2,