Chapter 3 - Solved Problems Solved Problem 3.. A nonlinear system has an input-output model given by dy(t) + ( + 0.2y(t))y(t) = u(t) + 0.2u(t) 3 () 3.. Compute the operating point(s) for u Q = 2. (assume it is an equilibrium point) 3..2 Obtain a linearized model for each of the operating points above. Solutions to Solved Problem 3. Solved Problem 3.2. A nonlinear system is described in state space form by the model ẋ (t) = x (t) 2 + x 2 (t) + 3u(t) (2) ẋ 2 (t) = 2x (t)x 2 (t) (3) y(t) = x (t) (4) Obtain a linearized model around the equilibrium point (u Q, y Q ) = (2, 0). Solutions to Solved Problem 3.2 Solved Problem 3.3. Consider a discrete time system with input u[k] and output y[k], having an inputoutput model given by y[k] + 0.4y[k ] = u[k 2] (5) Choose state variables and build a state space model Solutions to Solved Problem 3.3 Solved Problem 3.4. The input-output model for a nonlinear system is given by dy(t) + f(y) = 2u(t) (6) where f(y) is the nonlinear function appearing in the figure. Build a linearized model for the equilibrium point determined by u Q = 3. Solutions to Solved Problem 3.4 f(y) 0 2 Solved Problem 3.5. Consider the electric network shown in Figure
C 2 L R 4 C 3 + v f5 Figure : Electric network 3.5. Without using any equations, discuss how many states the system has. 3.5.2 Build a state space model. Solutions to Solved Problem 3.5 Solved Problem 3.6. Consider a single tank of constant cross-sectional area A. The flow of water from the tank is governed by the relationship where h is the height of liquid in the tank and K is a constant. Assume that the flow of liquid into the tank is a control variable, u. 3.6. Write down the equation governing the height of liquid in the tank. 3.6.2 Linearize the model about a nominal height of h = h. f out = K h (7) 3.6.3 Repeat part (i) and (ii) for a tank where the cross sectional area increases with height i.e., A = ch. Solutions to Solved Problem 3.6 Solved Problem 3.7. Consider a ball in a frictionless cone which is being rotated as shown in Figure 2. Write down the equations of motion of the ball in the vertical plane. Figure 2: Cone Solutions to Solved Problem 3.7 2
Figure 3: Two Tanks Solved Problem 3.8. Contributed by - James Welsh, University of Newcastle, Australia. Consider the two tanks system shown in Figure 3: Q & Q 2 are steady state flows H & H 2 are steady state heights (head) R & R 2 are value resistances All lower case variables are considered to be small quantities. Find a state space model for the system using h and h 2 as the state variables and with q i and q 2i as the inputs. Solutions to Solved Problem 3.8 Solved Problem 3.9. Contributed by - Alvaro Liendo, Universidad Tecnica Federico Santa Maria, Chile. Build a linear model around the equilibrium point defined by u Q = 6 for the system: d 2 y(t) 2 Solutions to Solved Problem 3.9 + y(t) dy(t) + y 3 (t) y(t) = 2 du(t) + u 2 (t) (8) Solved Problem 3.0. Contributed by - Alvaro Liendo, Universidad Tecnica Federico Santa Maria, Chile. Build a state space model for the system with input u(t) and output y(t) and having a model given by the differential equation: Solutions to Solved Problem 3.0 d 2 y(t) 2 + 3 dy(t) + y(t) = 2u(t) (9) Solved Problem 3.. Contributed by - Alvaro Liendo, Universidad Tecnica Federico Santa Maria, Chile. Build a state space model for the system with input u(t) and output y(t) and having a model given by the differential equation d 2 y(t) 2 + 3 dy(t) + y(t) = 2 du(t) (0) 3
Solutions to Solved Problem 3. 4
Chapter 3 - Solutions to Solved Problems Solution 3.. 3.. The operating point (u Q, y Q ) must satisfy ( + 0.2y Q )y Q = u(t) + 0.2u 3 Q = 0.2y 2 Q + y Q 3.6 = 0 () This yields two operating points, P and P 2 given by (2, 7.4244) and (2, 2.4244) respectively. 3..2 To obtain the linearized models we can proceed in many ways. For instance, we can apply the method outlined in section 3.0. To do that we define the state as x(t) = y(t). We thus have x Q = y Q and ẋ(t) = f(x(t), u(t)) = x(t) 0.2x(t) 2 + u(t) + 0.2u(t) 3 (2) y(t) = g(x(t), u(t)) = x(t) (3) If we define x(t) = x Q + x(t), u(t) = u Q + u(t), then d x(t) = f x x=xq u=u Q x(t) + f u u(t) = ( 0.4x Q ) x(t) + ( + 0.6u Q ) u(t) (4) x=xq u=u Q y(t) = x(t) (5) We can also express this in input-output form as For the two operating points described above, we have + ( + 0.4y Q ) y(t) = ( + 0.6u Q ) u(t) (6) P : P 2 :.9698 y(t) = 2.2 u(t) (7) +.9698 y(t) = 2.2 u(t) (8) Solution 3.2. We first need to compute the state, (x Q, x 2Q ), corresponding to the equilibrium point. We notice that x Q = y Q = 0, and from the first state equation we have that 0 = x 2Q + 3u Q = x 2Q = 3u Q = 6 (9) The reader can readily verify that these values also satisfy the second state equation at the equilibrium point. We next express the state and plant input, output as 5
x (t) = x Q + x (t); x 2 (t) = x 2Q + x 2 (t) (20) u(t) = u Q + u(t); y(t) = y Q + y(t) (2) and we finally use the method presented in section 3.0 of the book, leading to d x (t) = 2x Q x (t) + x 2 (t) + 3 u(t) = x 2 (t) + 3 u(t) (22) d x 2 (t) = 2x 2Q x (t) 2x Q x 2 (t) = 2 x (t) (23) y(t) = x (t) (24) Solution 3.3. The interesting aspect of this problem is the two unit delay on the input. The state variables must include all information we require to know at time k = k o such that, given the input u[k], for all k k o, we are able to compute y[k], for all k > k o. From the system equation we have y[k o + ] = u[k o ] 0.4y[k o ] (25) y[k o + 2] = u[k o ] 0.4y[k o + ] (26) We see that we require to know y[k o ], and u[k o ] to predict the future response. We thus choose and we notice that x [k] = y[k]; x 2 [k] = u[k ]; (27) x [k + ] = y[k + ] = u[k ] 0.4y[k] = x 2 [k] 0.4x [k] (28) x 2 [k + ] = u[k] (29) y[k] = x [k] (30) Setting the above in matrix form, we finally obtain [ ] x [k + ] = x 2 [k + ] y[k] = [ [ 0.4 0 0 ] [ ] x [k] x 2 [k] ] 0 ] [ x [k] x 2 [k] [ 0 + u[k] (3) ] (32) Solution 3.4. The linearized model has the form + df(y) dy y(t) = 2 u(t) (33) Q 6
where y(t) = y Q + y(t) and u(t) = u Q + u(t) We thus need to compute the derivative of f(y) at the equilibrium point. This is done graphically as shown below f(y Q ) f(y) Q We note that, at an equilibrium point, f(y Q ) = 2u Q. Thus, in our particular example, f(y Q ) = 6. With this value we find the operating point. The slope of the tangent at that point is the derivative of f(y) at Q, and is approximately equal to.9. Hence the linearized model is given by 0 2 y Q +.9 y(t) = 2 u(t) (34) Solution 3.5. 3.5. The number of states required for the system is equal to the number of initial conditions we can arbitrarily set in the network. In this case, the number is three: an initial current in inductor L and the initial voltages on C and C 2. The reader may note that the answer can be different if we allow some singular cases. For instance, if we make R 4 = 0, then the number of states required will be only two, since then the voltage in C 3 will always be equal to the source voltage and hence it can not be set arbitrarily. 3.5.2 To build the state space model we choose as state variables the electric signals i (t), v 2 (t) and v 3 (t) which are shown in the network schematic shown in Figure 4. i (t) i 4 (t) v 2 (t) v (t) v 3 (t) i 2 (t) i 3 (t) v 4 (t) v 5 (t) Figure 4: Electric network skeleton Applying Kirchoff s laws and component laws we obtain v 5 (t) = v f5 (t) = v 4 (t) + v 3 (t) = R 4 i 4 (t) + v 3 (t) (35) i 4 (t) = i (t) i 3 (t) = i (t) C 3 dv 3 (t) v 2 (t) = v (t) + v 3 (t) = L di (t) i (t) = i 2 (t) = C 2 dv 2 (t) (36) + v 3 (t) (37) We also notice that the system input is the voltage of the independent voltage source, v f5 (t). Rearranging the previous equations we finally obtain (38) 7
di (t) = v 2 (t) v 3 (t) L L (39) dv 2 (t) = i (t) C 2 (40) dv 3 (t) = i (t) v 3 (t) + v f5 (t) C 3 R 4 C 3 R 4 C 3 (4) Solution 3.6. 3.6. The volume of liquid in the tank is V = Ah (42) The rate of change of liquid in the tank is or dv = u f out (43) A dh = u K h (44) dh = K A h A u (45) 3.6.2 If h = h, then u = K h for a steady height. Let h = h h, ũ = u u. Then linearizing (44) we obtain A d(h + h) = u + ũ K h + h (46) u + ũ K h K 2 (h ) 2 h (47) Hence d h K A2 h h Aũ (48) 3.6.3 Here V = Ah = ch 2 (49) 8
Hence dv = u f out (50) c dh2 = u K h (5) 2ch dh = u K h (52) dh = K 2c h + u 2ch (53) Linearizing about h gives u = K h as before (54) (Note that this is reasonable since we have to balance the outflow by the inflow). Also d h K 2c h + K 4c (h ) 3 u 2 h 2ch [ K = 4c (h ) 3 u ] 2 2c (h ) 2 h ũ 2ch u 2c (h ) 2 h (55) ũ 2ch (56) Solution 3.7. We assume that the cone makes an angle θ with the horizontal plane. Also, assume that the diameter of the base of the cone is d o. Also let h denote the height of the ball. Then resolving the forces on the ball tangential to the wall, we have Differentiation with respect to time gives { mg cos θ = m cot[h + d } o tan θ] ω 2 sin θ (57) 2 csc[[h + d o 2 tan θ]2 ω 2 sin θḣ + cot[h + d o tan θ]2ω ω sin θ = 0 (58) 2 Solution 3.8. Because we are only interested in small variations, we can assume that flow through the valves is linearly related to the difference in head. The equations for Tank then become: A dh = q i q o (59) q o = h h 2 R (60) 9
The corresponding equations for Tank 2 are Substituting 60 into 59 A 2 dh 2 = q o + q 2i q 2o (6) q 2o = h 2 R 2 (62) dh = ( q i h ) h 2 A R (63) Substituting 60 and 62 into 6 dh 2 We now define the state variables as = ( h h 2 + q 2i h ) 2 A 2 R R 2 (64) x = h (65) x 2 = h 2 (66) We then write 63 and 64 respectively as x = x + x 2 + q i (67) R A R A A ( + ) x 2 + q 2i (68) R A 2 R 2 A 2 A 2 x 2 = x R A 2 In summary, the state space model is [ ] x x 2 ] [ h h 2 = = [ R A ( R A R A 2 [ 0 0 ] [ ] x x 2 R A 2 + ] [x ) R 2A 2 x 2 ] + [ ] [ ] A 0 qi 0 A 2 q 2i (69) (70) Solution 3.9. At equilibrium dn y(t) n equation reduces to and dn y(t) n are zero. Hence at the equilibrium point, the differential y 3 Q y Q = u 2 Q (7) This leads to (u Q, y Q ) = ( 6, 2). The other 2 solutions of the third degree equation are complex numbers. 0
The linearized model is obtained using a first order Taylor series approximation, which is as follows: f(x(t), y(t)) f(x Q, y Q ) + f x x=xq y=y Q Considering u(t) = u Q + u(t) and y(t) = y Q + y(t), we obtain Thus x + f y y (72) x=xq y=y Q y(t) dy(t) y Q (73) y 3 (t) 3yQ y(t) 2 + yq 3 (74) u 2 (t) 2u Q u(t) + u 2 Q (75) d 2 y(t) 2 + y Q + 3y 2 Q y(t) + y 3 Q y(t) y Q = 2 d u(t) Using equation (7) and the value of u Q and y Q the linear model is d 2 y(t) 2 2 + 2 y(t) y(t) = 2 d u(t) + 2u Q u(t) + u 2 Q (76) + 2 6 u(t) (77) Solution 3.0. Consider the states x (t) = dy(t) and x 2 (t) = y(t). We then have the differential equation Thus a suitable state space model is given by ẋ (t) + 3x (t) + x 2 (t) = 2u(t) (78) ẋ (t) = 3x (t) x 2 (t) + 2u(t) (79) ẋ 2 (t) = x (t) (80) y(t) = x 2 (t) (8) Solution 3.. Consider the states ẋ 2 (t) = x (t) and x (t) = y(t) With these states, the differential equation can be written ẍ (t) + 3ẋ (t) + x (t) = 2 u(t) = ẍ (t) + 3ẋ (t) + ẋ 2 (t) = 2 u(t) Thus a suitable state space model is = ẋ (t) + 3x (t) + x 2 (t) = 2u(t) (82) ẋ (t) = 3x (t) x 2 (t) + 2u(t) (83) ẋ 2 (t) = x (t) (84) y(t) = x (t) (85)