2 MODELING Once the control target is identified, which includes the state variable to be controlled (ex. speed, position, temperature, flow rate, etc), and once the system drives are identified (ex. force, torque, current, voltage, etc), the next and most important step is to develop a mathematical model of the system. The mathematical model is generally an ordinary differential equation describing the behavior of the system states under the action of the drive actuators. In mechanical systems, two approaches to deriving the mathematical model can be used; the Newtonian approach and the energy or Lagrangian approach. The Newtonian approach is based on the use of Newton s second law of motion F = ma (2.1) The energy approach is based on Lagrange s equation of motion, which can be written as ( ) L = Q(t) (2.2) dt q q where L = T V is the Lagrangian, T is the kinetic energy, V is the potential energy, q is the generalized coordinates vector, and Q(t) is the generalized force vector. In the presence of viscous damping, a more generalized form of the Lagrange s equation of motion can be written as ( ) L dt q q + D = Q(t) (2.3) q where D = f ( q 2 ) is the damping dissipative function. Example 2.1 The mathematical model of a mass-spring-damper system in a rectilinear motion under the action of an external force, Fig. 2.1, can be derived using Newton s second law as follows: https://sites.google.com/site/ziyadmasoud/control 9
Figure 2.1: A schematic of a mass-spring-damper system For x measured starting from the equilibrium position of the spring, the free-body diagram of the mass is shown in Fig. 2.2 Figure 2.2: A free-body diagram of a mass-spring-damper system where the spring force is kx and cẋ is the damping force, which is in the direction opposite to the direction of motion such that it poses a resistance to the motion of the mass. Using Newton s second law F = ma (2.4) f (t) kx cẋ = mẍ (2.5) which can be rearranged so that the state variable (x) is on one side and the external forcing terms are on the other side as mẍ + cẋ + kx = f (t) (2.6) Equation (2.6) is an ordinary differential equation that describes the behavior of the state variable x under the action of the driving force f (t) as a function of time. This equation is called the equation of motion of the system or the system model. https://sites.google.com/site/ziyadmasoud/control 10
Example 2.2 The disc shown in Fig. 2.3 is attached to the wall be means of a torsional spring. Figure 2.3: A schematic of a disc-spring system To derive the equation of motion of the disc, we will first draw a free-body-diagram of the disc, Fig. 2.2. Using Newton s second law Figure 2.4: A free-body diagram of a disc-spring system M = Jα (2.7) T k θ θ = J θ (2.8) where J is the polar mass moment of inertia of the disc around the axis of rotation. The equation of motion can be rearranged so that the state variable (θ) is on one side and the external forcing terms are on the other https://sites.google.com/site/ziyadmasoud/control 11
side as J θ + k θ θ = T (2.9) Example 2.3 The system shown in Fig. 2.5 is a two-degrees-of-freedom system. Two equations of motion are required to describe the behavior of the system. Figure 2.5: A schematic of a two-degrees-of-freedom system In this example, we will use the energy approach to derive the equations of motion of the system. The kinetic energy of the system, including the two masses, m 1 and m 2, is T = 1 2 m 1ẋ 2 1 + 1 2 m 2ẋ 2 2 (2.10) The potential energy in the spring is V = 1 2 k(x 1 x 2 ) 2 (2.11) The Lagrangian is L = T V = 1 2 m 1ẋ 2 1 + 1 2 m 2ẋ 2 2 1 2 k(x 1 x 2 ) 2 (2.12) https://sites.google.com/site/ziyadmasoud/control 12
The damping dissipative function, D, in the damper is D = 1 2 c(ẋ 1 ẋ 2 ) 2 (2.13) The generalized coordinates in this example are x 1 and x 2. The equations of motion for the two generalized coordinates are ( ) L + D = Q 1 (t) (2.14) dt ẋ 1 x 1 ẋ ( 1 L d dt ẋ 2 ) L x 2 + D ẋ 2 = Q 2 (t) (2.15) Substituting Eqs. (2.12) and (2.13) into Eqs. (2.14) and (2.15), and setting the generalized forces Q 1 (t) = f (t) and Q 2 (t) = 0, we get the following: L = m 1 ẋ 1 ẋ 1 (2.16) L = m 2 ẋ 2 (2.17) ẋ ( 2 ) = m 1 ẍ 1 (2.18) dt ẋ ( 1 ) = m 2 ẍ 2 (2.19) dt ẋ 2 L = k(x 1 x 2 ) x 1 (2.20) L = k(x 1 x 2 ) x 2 (2.21) D = c(ẋ 1 ẋ 2 ) ẋ 1 (2.22) D = c(ẋ 1 ẋ 2 ) ẋ 2 (2.23) https://sites.google.com/site/ziyadmasoud/control 13
The final equations of motion are m 1 ẍ 1 + cẋ 1 + kx 1 cẋ 2 kx 2 = f (t) (2.24) m 2 ẍ 2 + cẋ 2 + kx 2 cẋ 1 kx 2 = 0 (2.25) Example 2.4 Derive the equations of motion of the following system, Fig. 2.6, using the energy method: Figure 2.6: A schematic of a two-degrees-of-freedom system The kinetic and potential energies of the system, including the two masses, m 1 and m 2 and the two springs, k 1 and k 2, is T = 1 2 m 1ẋ 2 1 + 1 2 m 2ẋ 2 2 (2.26) V = 1 2 k 1x 2 1 + 1 2 k 2x 2 2 (2.27) The Lagrangian is L = T V = 1 2 m 1ẋ 2 1 + 1 2 m 2ẋ 2 2 1 2 k 1x 2 1 1 2 k 2x 2 2 (2.28) https://sites.google.com/site/ziyadmasoud/control 14
The damping dissipative function, D, in the damper is D = 1 2 c(ẋ 1 ẋ 2 ) 2 (2.29) The generalized coordinates in this example are x 1 and x 2. The equations of motion for the two generalized coordinates are ( ) L + D = Q 1 (t) (2.30) dt ẋ 1 x 1 ẋ ( 1 L d dt ẋ 2 ) L x 2 + D ẋ 2 = Q 2 (t) (2.31) Substituting Eqs. (2.28) and (2.29) into Eqs. (2.30) and (2.31), and setting the generalized forces Q 1 (t) = 0 and Q 2 (t) = f (t), we get the following equations of motion: m 1 ẍ 1 + cẋ 1 + k 1 x 1 cẋ 2 = 0 (2.32) m 2 ẍ 2 + cẋ 2 + k 2 x 2 cẋ 1 = f (t) (2.33) Example 2.5 The system shown in Fig. 2.7 is a two degree of freedom system, namely; x(t) and θ(t). Both, the drum M and the rod m have translational and rotational kinetic energies. The kinetics energy of the drum is T M = 1 2 Mv2 + 1 2 J Mω 2 (2.34) where v = ẋ is the velocity of the center of mass of the drum, ω = v/r is the rotational speed of the drum, and J M = 2 1Mr2 is the mass moment of inertia of the drum. Therefore, Eq. (2.34) can be rewritten as T M = 1 2 Mẋ2 + 1 ( )(ẋ ) 1 2 2 2 Mr2 = 3 r 4 Mẋ2 (2.35) https://sites.google.com/site/ziyadmasoud/control 15
Figure 2.7: System model The center of mass of the rod m has two components which are x G = x + 1 l sinθ (2.36) 2 y G = 1 l cosθ (2.37) 2 Therefore, the velocity components of the center of mass of the rod m are v x = ẋ + 1 2 l θ cosθ (2.38) v y = 1 2 l θ sinθ (2.39) The kinetic energy of the rod is T m = 1 2 mv2 m + 1 2 J m θ 2 (2.40) https://sites.google.com/site/ziyadmasoud/control 16
where v 2 m = v 2 x + v 2 y and J m = 1 12 ml2 is the centroidal mass moment of inertia of the rod. Substituting Eqs. (2.38) and (2.39) into Eq. (2.40) and simplifying the expression yields The total kinetic energy of the system becomes T m = 1 2 mẋ2 + 1 2 mẋl θ cosθ + 1 6 ml2 θ 2 (2.41) T = T M + T m = 3 4 Mẋ2 + 1 2 mẋ2 + 1 2 mẋl θ cosθ + 1 6 ml2 θ 2 (2.42) The potential energy of the system includes the elastic potential energy of the spring and the gravitational potential energy of the rod. Using the center of the drum as reference, the total potential energy of the system is V = 1 2 kx2 + mg ( l2 ) cosθ (2.43) Therefore, the Lagrangian of the system, L, is L = T V = 3 4 Mẋ2 + 1 2 mẋ2 + 1 2 mẋl θ cosθ + 1 6 ml2 θ 2 1 2 kx2 + 1 mgl cosθ (2.44) 2 Using Lagrange s equation, the two equations of motion of the system are ( ) dt ẋ ( ) dt θ L x = 0 (2.45) L θ = 0 (2.46) Substituting Eq. (2.44) into Eqs. (2.45) and (2.46) yields the following two nonlinear equations of motion: 3 2 Mẍ + mẍ 1 2 ml sinθ θ 2 + 1 2 ml cosθ θ + kx = 0 (2.47) 1 2 mlẍcosθ + 1 3 ml2 θ + 1 mgl sinθ = 0 2 (2.48) https://sites.google.com/site/ziyadmasoud/control 17
Systems of examples 2.1 and 2.2 can be represented graphically as in Fig. 2.8. Such systems are call single-input/single-output systems (SISO) Figure 2.8: Single-input/single-output system Similarly, the systems of examples 2.3 and 2.4 can be represented graphically as in Fig. 2.9. Those systems are called single-input/multi-output systems (SIMO). Figure 2.9: Single-input/multi-output system Systems with more that one input and one output are called multi-input/multi-output systems (MIMO). 3 LINEARIZATION Accurate models of physical systems are generally nonlinear. However, in this course, our aim is to learn about linear control systems. For this reason, nonlinear systems need to be linearized. Furthermore, Laplace transformation, which is the backbone of the linear control theory, can only be used to solve linear ordinary differential equations which further emphasize the need for system linearization. To linearize a nonlinear equation, Taylor series is the most commonly used approach. https://sites.google.com/site/ziyadmasoud/control 18
3.1 Taylor Series A nonlinear function can be assumed linear within small intervals. For example, the function sin(x) can be assumed linear in the interval [x 0, x 1 ]. The smaller the interval, the better the approximation. For a function f (x), Taylor series can be used to determine the value of the function at some point x in the neighborhood of a point x 0. Taylor series has the form f (x) = f (x 0 ) + f (x 0 )(x x 0 ) + f (x 0 ) 2! (x x 0 ) 2 + f (x 0 ) 3! (x x 0 ) 3 +...... + f (n) (x 0 ) (x x 0 ) n (3.1) n! A linear approximation of a function uses the first two terms in the Taylor series as f (x) = f (x 0 ) + f (x 0 )(x x 0 ) (3.2) Example 3.1 To derive the equation of motion of the simple pendulum shown in Fig. 3.1 using the Newtonian approach, we will first draw a free body diagram of the end mass m. Using the Normal-Tangential coordinate system, the components of the mass acceleration are given by a t = l θ (3.3) a n = l θ 2 (3.4) Applying Newton s second law in the tangential direction F t = ma t (3.5) mgsinθ = ml θ (3.6) https://sites.google.com/site/ziyadmasoud/control 19
Figure 3.1: Simple pendulum model Rearranging Eq. (3.5), the equation of motion becomes θ + g sinθ = 0 (3.7) l The equation of motion, Eq. (3.7), is nonlinear because of the presence of a nonlinear function of the independent variable sinθ. Assuming small oscillations around the equilibrium position, θ 0 = 0, and using Taylor series, the nonlinear term in the equation of motion can be approximated by a linear function. The nonlinear function sinθ can be linearized as follows: f (θ) = f (θ 0 ) + f (θ 0 )(θ θ 0 ) (3.8) f (θ) = sinθ (3.9) f (θ) = cosθ (3.10) Then sinθ = sinθ 0 + cosθ 0 (θ θ 0 ) = sin(0) + cos(0)(θ 0) = θ (3.11) https://sites.google.com/site/ziyadmasoud/control 20
Therefore, the linear equation of motion of the simple pendulum becomes θ + g l θ = 0 (3.12) Using Taylor series, equations (2.47) and (2.48) in example 2.5 can be further linearized for small oscillation angle θ by setting sinθ = θ, cosθ = 1, and ignoring the higher order term sinθ θ 2. The linearized equations of motion become ( ) 3 2 M + m ẍ + 1 2 ml θ + kx = 0 (3.13) ẍ + 2 3 l θ + gθ = 0 (3.14) https://sites.google.com/site/ziyadmasoud/control 21