Feedback and Control Systems SYSTEM MODELING At the end of this chapter, the students shall be able to: 2.1 Discuss the two methods of modeling dynamic systems. 2.2 (a) Find the Laplace transform of a given function in time domain, and obtain the time domain function given its Laplace transform; (b) Solve differential equations using Laplace transform methods. 2.3 (a) Write a transfer function associated with a given differential equation and vice versa; (b) Solve the output of a system with a given differential equation or transfer function for a given input. 2.4 Obtain transfer functions for single and multiple loops, passive and active (op-amp) electrical networks. 2.5 Determine the transfer function of translational, rotational and translational-rotational mechanical systems, including systems with gears. 2.6 Obtain transfer function relating the output displacement to the input voltage of electromechanical systems. 2.7 Define terms associated with state-space modeling of systems and enumerate steps in obtaining the state-space representation of a system. 2.8 Obtain the state-space model of electrical and mechanical systems. 2.9 Convert a transfer function into state-space representation and vice versa. 2.1 Introduction Intended Learning Outcome: Discuss the two methods of modeling dynamic systems. In the previous discussion, the analysis and design sequence that included obtaining the system’s schematic and demonstrated this step for a position control system. The next step is to develop mathematical models from schematics of physical systems. Two methods will be discussed: (1) transfer functions in the frequency domain and (2) state equations in the time domain. It should be remembered that in any case, the first step in developing a mathematical model is to apply the fundamental physical laws of science and engineering. When electric networks are being modeled, Ohm’s law and Kirchhoff’s laws are applied initially. For mechanical systems, Newton’s laws will be used. System Modeling Page 1 Feedback and Control Systems From previous courses, it is seen that a differential equation can describe the relationship between the input and the output of the system. The form of the differential equation and its coefficients are a formulation or description of the system. Although the differential equation relates the system to its input and output, it is not a satisfying representation from a system perspective. It is much preferred that a mathematical representation such as shown in figure 2.1(a) where the input, output and the system are distinct and separate parts. Also, a representation where several interconnected subsystems like the cascade connection of figure 2.1(b) can also be conveniently written as a single system like that of figure 2.1(a). It is then preferred that a single mathematical function, called the transfer function, will represent the system. Figure 2.1. Block diagram representation of a system, showing the relationship between the input r(t) and the output c(t) Note in figure 2.1, rሺtሻ represents the reference input while cሺtሻ represents the controlled variable. A major advantage of frequency-domain modeling is that they rapidly provide stability and transient response information. Thus, we can immediately see the effects of varying system parameters until an acceptable design is met. The primary disadvantage of this approach, also called the classical approach is its limited applicability. It can be applied only to linear, time-invariant systems or systems that can be approximated as such. With an increasing design scope, the modern or time-domain approach of modeling systems is devised. The state-space approach is a unified method for modeling, analyzing, and designing a wide range of system. It can model nonlinear systems and systems with nonzero initial conditions. Time-varying systems and systems with multiple inputs and multiple outputs can be compactly represented in state-space model which is similar to the form of single input, single output systems. System Modeling Page 2 Feedback and Control Systems The time-domain approach can also be used for the same class of systems modeled by classical approach. This alternate model gives the control systems designer another perspective from which to create the design. The main drawback of the time-domain approach is its lack of intuition compared to the classical approach. A few calculations must be made before the physical interpretation of the model becomes apparent. 2.2 The Laplace Transform: A Review Intended Learning Outcomes: (a) Find the Laplace transform of a given function in time domain, and obtain the time domain function given its Laplace transform; (b) Solve differential equations using Laplace transform methods. The Laplace transform satisfies the requirements for the convenient mathematical representation of systems using the transfer function as discussed previously. Furthermore, the Laplace transform makes the relationships between systems algebraic. The Laplace transform is defined as ஶ ℒ ሾfሺtሻሿ = Fሺsሻ = න fሺtሻeିୱ୲ dt ష (2.1) where s = σ + jω, a complex variable. The function fሺtሻ is in t-domain (or time domain) and has a Laplace transform Fሺsሻ in s-domain (or the complex frequency domain) if the integral of Equation 2.1 exists. The inverse Laplace transform, is defined as where ℒ ିଵ ሾFሺsሻሿ = fሺtሻuሺtሻ = u ሺ tሻ = ቄ 0, 1, 1 ା୨ஶ න Fሺsሻeିୱ୲ ds j2π ି୨ஶ t < 0 t>0 (2.2) (2.3) called the unit step function. Multiplication of a function with a unit step function yields a function that is zero for negative values of t. System Modeling Page 3 Feedback and Control Systems Tables 2.1 and 2.2 summarize the Laplace transform of commonly used functions and the properties of the Laplace transform, respectively. System Modeling Page 4 Feedback and Control Systems Find the Laplace transform of the function fሺtሻ = eିୟ୲ cosሺωt + θሻ Example 2.1 ሺs + aሻ cos θ − ω sin θ ሺs + aሻଶ + ωଶ Answer: Example 2.2 Find the inverse Laplace transform of Fሺsሻ = ୱሺୱାଶሻሺୱାଷሻమ. Answer: ଵ fሺtሻ = 5 40 10 − 5eିଶ୲ + eିଷ୲ + teିଷ୲ 9 9 3 Example 2.3 Solve the differential equation dଶ y dy + 12 + 32y = 32uሺtሻ ଶ dt dt using Laplace transform when all the initial conditions are zero. Answer: yሺtሻ = ሾ1 + eି଼୲ − 2eିସ୲ ሿuሺtሻ 1. Find the Laplace transform of the function fሺtሻ = 3teିଶ୲ sinሺ4t + 60° ሻ. Drill Problem 2.1 a. fሺtሻ = sinhଶ at 2. Find the Laplace transform of the following functions System Modeling Page 5 Feedback and Control Systems b. fሺtሻ = t cos 5t c. fሺtሻ = sinସ t 3. Determine the inverse Laplace transform of the following functions in s-domain. a. Fሺsሻ = s2 −4s−12. 2s−56 b. Fሺsሻ = ሺୱାଷሻሺୱାସሻሺୱమ ൫ୱమ ାଷୱାଵ൯ሺୱାହሻ ାଶୱାଵሻ c. Fሺsሻ = ሺୱା଼ሻሺୱమ ା଼ୱାଷሻሺୱమାହୱାሻ ୱయ ାସୱమ ାଶୱା 4. What is the time domain function that has Fሺsሻ = s2൫s2 + ω2 ൯ as its Laplace transform? 1 a. y ᇱᇱ − y ᇱ − 6y = 0, with initial conditions yሺ0ሻ = 6 and y ᇱ ሺ0ሻ = 13. 5. Determine the solution of the following differential equations using Laplace transform. b. y ᇱᇱ − 4y ᇱ + 4y = 0, with initial conditions yሺ0ሻ = 2.1 and y ᇱ ሺ0ሻ = 3.9. c. y ᇱᇱ + ky ᇱ − 2k ଶ y = 0, with initial conditions yሺ0ሻ = 2 and y ᇱ ሺ0ሻ = 2k. 2.3. The Transfer Function Intended Learning Outcomes: (a) Write a transfer function associated with a given differential equation and vice versa; (b) Solve the output of a system with a given differential equation or transfer function for a given input. The Laplace transform, as stated before, can be used to establish algebraic input-system-output relationship as depicted in figure 2.1(a). Furthermore, it will allow algebraic combination of mathematical representations of subsystems to yield a total system representation. For an nth-order, linear, time-invariant differential equation, a୬ d୬ cሺtሻ d୬ିଵ cሺtሻ d ୫ r ሺ tሻ d୫ିଵ rሺtሻ ሺ ሻ + a + ⋯ + a c t = b + b + ⋯ + b rሺtሻ ୬ିଵ ୫ ୫ିଵ dt ୬ dt ୬ିଵ dt ୫ dt ୫ିଵ System Modeling (2.4) Page 6 Feedback and Control Systems where cሺtሻ is the output, rሺtሻ is the input, and a୧ ’s, b୧ ’s and the form of the differential equation େሺୱሻ represents the system. Taking the Laplace transform of equation 2.4, and solving for the ratio of ୖሺୱሻ with zero initial conditions yield Cሺsሻ b୫ s୫ + b୫ିଵ s୫ିଵ + ⋯ + b ሺ ሻ =G s = Rሺsሻ a୬ s୬ + a୬ିଵ s୬ିଵ + ⋯ + a (2.5) with Gሺsሻ, called the system’s transfer function, evaluated at zero initial conditions. Thus, a system can now be represented by a block diagram as seen in figure 2.2. Figure 2.2. System representation using transfer function From here, it can be seen that equation 2.5 can be used to determine the output when the system’s transfer function and the input are known, as Cሺsሻ = RሺsሻGሺsሻ (2.6) Example 2.4 dcሺtሻ + 2cሺtሻ = rሺtሻ dt Find the transfer function of the system represented by the differential equation assuming zero initial conditions. Then find the system response to a step input rሺtሻ = uሺtሻ. Answer: The transfer function is Gሺsሻ = and the system response for the specified input is cሺtሻ = System Modeling 1 s+2 1 1 ିଶ୲ − e 2 2 Page 7 Feedback and Control Systems 1. Find the transfer function Gሺsሻ = Cሺsሻ/Rሺsሻ corresponding to the differential equation Drill Problems 2.2 dଶ c dc dଶ r dr dଷ c + 3 + 7 + 5c = + 4 + 3r ଷ ଶ ଶ dt dt dt dt dt 2. A system is described by the following differential equation dଷ y dଶ y dy dଷ x dଶ x dx + 3 + 5 + y = + 4 + 6 + 8x ଷ ଶ ଷ ଶ dt dt dt dt dt dt ଢ଼ሺୱሻ Find the expression for the transfer function ଡ଼ሺୱሻ. 3. Find the differential equation corresponding to the transfer functions a. Gሺsሻ = ୖሺୱሻ = ୱమ ାୱାଶ େሺୱሻ ଶୱାଵ b. Gሺsሻ = ୖሺୱሻ = ୱమ ାହୱାଵ େሺୱሻ c. Gሺsሻ = ୖሺୱሻ = ሺୱାଵሻሺୱାଵଵሻ େሺୱሻ ଵହ d. Gሺsሻ = ୖሺୱሻ = ୱయ ାଵଵୱమ ାଵଶୱାଵ଼ େሺୱሻ ୱାଷ 4. For each of the systems described by the transfer functions in number 3, find the response of the system to a step input. 5. Find the ramp response for a system whose transfer function is s Gሺsሻ = ሺs + 4ሻሺs + 8ሻ In general, a physical system than can be represented by a linear, time-invariant differential equation can be modeled as a transfer function. The subsequent sections will demonstrate the use of the transfer functions to model electrical networks, mechanical systems, and electro-mechanical systems. System Modeling Page 8 Feedback and Control Systems 2.4 Electrical Network Transfer Functions Intended Learning Outcome: Obtain transfer functions for single and multiple loops, passive and active (opamp) electrical networks. Passive Networks. In this section, mathematical models of electric circuits including passive networks and operational amplifiers will be obtained. Equivalent circuits for the electric networks will first consist of resistors, inductors and capacitors. Table 2.3 summarizes the components and the relationships between voltage and current and between voltage and charge under zero initial conditions. As stated before, the first step in formulating the mathematical model of a system is to use fundamental laws governing the system. Since the systems being modeled in this section are electrical networks, Ohm’s Law and Kirchhoff’s Laws will be used. Find the transfer function relating the capacitor voltage Vେ ሺsሻ to the input voltage Vሺsሻ for the circuit Example 2.5 shown below. Answer: System Modeling Page 9 Feedback and Control Systems Vେ ሺsሻ େ Gሺsሻ = = ୖ ሺ ሻ ଶ V s s + s+ ଵ Example 2.6 Determine the transfer function Hଵ ሺsሻ = ి ሺୱሻ ሺୱሻ ୍మ ሺୱሻ ሺୱሻ ଵ େ using mesh analysis. Obtain the transfer function Hଶ ሺsሻ = for the network shown below using nodal analysis. Answers: Hଵ ሺsሻ = Iଶ ሺsሻ LCsଶ = Vሺsሻ ሺRଵ + R ଶ ሻLCsଶ + ሺRଵ R ଶ C + Lሻs + Rଵ భ మ s Vେ ሺsሻ େ Hଶ ሺsሻ = = ୋ ୋ ାେ ୋ Vሺsሻ ሺGଵ + Gଶ ሻs ଶ + భ మ s+ మ ୋ ୋ System Modeling େ େ Page 10 Feedback and Control Systems From the foregoing examples, a technique in which mesh equations can be written can be developed. For two loop electrical network as shown in example 2.6, the mesh equations can be written as Sum of Sum of impedances ሺ ሻ ൩ I s = applied voltages൩ common to ଶ the two meshes around mesh 1 Sum of Sum of impedances Sum of impedances ൩ Iଵ ሺsሻ + ቂ ቃ Iଶ ሺsሻ = applied voltages൩ − common to around mesh 2 the two meshes around mesh 2 Sum of impedances ቂ ቃ Iଵ ሺsሻ − around mesh 1 (2.7a) (2.7b) This technique can be expanded to three-loop electrical network. The use of the technique is illustrated in the following example. Example 2.7 Write, but do not solve, the mesh equations for the network shown below Answer: System Modeling Page 11 Feedback and Control Systems Find the transfer function Gሺsሻ = V ሺsሻ/Vሺsሻ for the circuit shown below. Solve the problem in two ways Example 2.8 – mesh analysis and nodal analysis. Answer: Gሺsሻ = V ሺsሻ sଶ + 2s + 1 = Vሺsሻ sଶ + 5s + 2 Operational Amplifiers. An operational amplifier is an electronic amplifier used as a basic building block to implement transfer functions. It has the following characteristics: • • • • Differential input vଶ ሺtሻ − vଵ ሺtሻ High input impedance, Z୧ = ∞ (ideal) Low output impedance, Z୭ = 0 (ideal) High constant gain amplification, A = ∞ (ideal) The output of the operational amplifier v୭ ሺtሻ is v୭ ሺtሻ = A൫vଶ ሺtሻ − vଵ ሺtሻ൯ System Modeling (2.8) Page 12 Feedback and Control Systems Figure 2.3. Operational amplifier Example 2.9 Determine the transfer function ሺୱሻ ሺୱሻ for each of the op-amp configurations shown below. Assume that the op-amp has ideal characteristics. (a) Answers: a. b. ሺୱሻ ሺୱሻ ሺୱሻ ሺୱሻ (b) = − మ ሺୱሻ, an inverting amplifier ሺୱሻ భ = 1 + మ ሺୱሻ, a non-inverting amplifier ሺୱሻ భ Example 2.10 Find the transfer function System Modeling ሺୱሻ ሺୱሻ for the circuit given below. Page 13 Feedback and Control Systems V୭ ሺsሻ sଶ + 45.95s + 22.55 = −1.232 V୧ ሺsሻ s Answer: Example 2.11 Find the transfer function Answer: Drill Problems 2.3 ሺୱሻ ሺୱሻ for the op-amp configuration shown below: V୭ ሺsሻ Rଵ R ଶ Cଵ Cଶ sଶ + ሺR ଶ Cଶ + R ଶ Cଵ + Rଵ Cଵ ሻs + 1 = V୧ ሺsሻ Rଵ R ଶ Cଵ Cଶ sଶ + ሺR ଶ Cଶ + Rଵ Cଵ ሻs + 1 1. Find the transfer function Gሺsሻ = System Modeling ሺୱሻ ሺୱሻ for each of the networks shown below: Page 14 Feedback and Control Systems 2. Find the transfer function Gሺsሻ = ై ሺୱሻ ሺୱሻ for each of the networks shown below: 3. Using mesh and nodal analysis, find the transfer function Gሺsሻ = below: ሺୱሻ ሺୱሻ for each of the networks shown 4. For each of the operational amplifiers shown, find the transfer function Gሺsሻ = 5. Determine the transfer function Gሺsሻ = System Modeling ሺୱሻ ሺୱሻ ሺୱሻ ሺୱሻ . for each of the networks shown below: Page 15 Feedback and Control Systems 2.5 Mechanical System Transfer Function Intended Learning Outcome: Determine the transfer function of translational, rotational and translationalrotational mechanical systems, including systems with gears. In the previous section, the transfer function for electrical networks was obtained. In this section, transfer function for translational and rotational mechanical systems will be obtained. It will be evident later on that the transfer functions of both systems are mathematically indistinguishable. Hence, an electrical network can be interfaced to a mechanical system by cascading their transfer functions provided that one system is not loaded by the other. Translational Mechanical Systems. Table 2.4 below shows the components of mechanical systems and relationships between force, velocity and displacement. In mechanical systems there are three components: • • • Spring, with the spring constant K as the parameter Viscous damper, with the coefficient of friction f୴ as the parameter Mass, M as its parameter These components can be compared to the passive electrical components: • Capacitor • Resistor • Inductor System Modeling Page 16 Feedback and Control Systems Comparing Tables 2.3 and 2.4, the following analogy between the mechanical and electrical systems can be formulated. • The capacitor and inductor of the electrical system are energy-storage devices, whereas for mechanical system, these are analogous to the spring and the mass. • Both the resistor of the electrical system and viscous damper of the mechanical system dissipate energy. • The mechanical force is analogous to electrical voltage and the mechanical velocity is analogous to electrical current. • Summing forces in terms of velocity is analogous to summing voltages written in terms of current and the resulting mechanical differential equations are analogous to mesh equations. Example 2.12 ଡ଼ሺୱሻ Find the transfer function ሺୱሻ for the system shown below. System Modeling Page 17 Feedback and Control Systems Answer: Gሺsሻ = Xሺsሻ 1 = ଶ Fሺsሻ Ms + f୴ s + K Many mechanical systems are similar to multiple-loop and multiple-node electrical networks, where more than one simultaneous differential equation is required to describe the system. In mechanical systems, the number of equations of motion required is equal to the number of linearly independent motions. Linear independence implies that a point of motion in a system can still move if all other points of motion are held still; the number of these linearly independent motions is called the degrees of freedom of the system. For mechanical systems with multiple degrees of freedom, use superposition: for each free-body diagram, hold all other points of motion still and find the forces acting on the body only due to its own motion. Do this for all of the bodies and the result will be a system of simultaneous equation of motion. Example 2.13 Find the transfer function Answer: where ଡ଼మ ሺୱሻ ሺୱሻ for the system shown below. Gሺsሻ = D=ቤ Xଶ ሺsሻ f୴య ሺsሻ = Fሺsሻ D ൣMଵ s ଶ + ൫f୴భ + f୴య ൯s + ሺKଵ + K ଶ ሻ൧ System Modeling −൫f୴య s + K ଶ ൯ −൫f୴య s + K ଶ ൯ ቤ ൣMଶ sଶ + ൫f୴మ + f୴య ൯s + ሺK ଶ + K ଷ ሻ൧ Page 18 Feedback and Control Systems The method by which the equation in each degree of freedom is obtained similar to the one done with electrical networks, as Sum of impedances Sum of impedances Sum of applied ൨ Xଵ ሺsሻ − ൨ Xଶ ሺsሻ = ൨ connected to the motion at xଵ between xଵ and xଶ forces at xଵ Sum of impedances Sum of impedances Sum of applied ൨ X ሺsሻ + ൨ X ሺsሻ = ൨ − between xଵ and xଶ ଵ connected to the motion at xଶ ଶ forces at xଵ (2.9a) (2.9b) This can also be expanded to systems with multiple degrees of freedom, as illustrated in the example below. Example 2.14 Write, but do not solve, the equations of motions for the mechanical network below. Answer: System Modeling Page 19 Feedback and Control Systems Find the transfer function Gሺsሻ = Xଶ ሺsሻ/Fሺsሻ for the translational mechanical system shown below. Example 2.15 Answer: Drill Problems 2.4 Gሺsሻ = 1. Find the transfer function Gሺsሻ = ଡ଼మሺୱሻ ሺୱሻ sሺsଷ 3s + 1 + 7sଶ + 5s + 1ሻ for the translational mechanical system shown below. 2. Find the transfer function Gሺsሻ = Xଶ ሺsሻ/Fሺsሻ for the translational mechanical network shown below. System Modeling Page 20 Feedback and Control Systems 3. Find the transfer function Gሺsሻ = Xଷ ሺsሻ/Fሺsሻ for the translational mechanical system shown below. 4. Find the transfer function Gଵ ሺsሻ = ଡ଼య ሺୱሻ ሺୱሻ for the translational mechanical system shown below. 5. Write, but do not solve, the equations of motion for the translational mechanical system shown below Rotational Mechanical Systems. The rotational mechanical systems are handled the same way as translational mechanical systems, except that the torque replaces force and angular displacement replaces translational displacement. The mechanical components for rotational systems are the same as those for System Modeling Page 21 Feedback and Control Systems translational systems, except that the components undergo rotation instead of translation. Table 2.5 shows the components along with the relationships between torque, angular velocity and angular displacement. For rotational systems, the mass is replaced by inertia, and its parameter, called the moment of inertia, J. The concept of degrees of freedom carries over to rotational systems, except that we test a point of motion by rotating it while holding still all other points of motion. Writing the equations of motion for rotational systems is similar to writing them for translational systems; the only difference is that the free-body diagram consists of torques rather than forces. Find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ for rotational systems shown. Example 2.16 Answer: where System Modeling Gሺsሻ = θଶ ሺsሻ K = Tሺsሻ D ሺJ sଶ + Dଵ s + Kሻ D= ฬ ଵ −K −K ฬ ሺJଵ sଶ + Dଵ s + Kሻ Page 22 Feedback and Control Systems Notice that the above system has that now well-known form Sum of impedances Sum of impedances Sum of applied ൨ θ ሺsሻ − ൨ θ ሺsሻ = ൨ connected to the motion at θଵ ଵ between θଵ and θଶ ଶ torques at θଵ Sum of impedances Sum of impedances Sum of applied ൨ θ ሺsሻ + ൨ θ ሺsሻ = ൨ − between θଵ and θଶ ଵ connected to the motion at θଶ ଶ torques at θଶ (2.10a) (2.10b) Example 2.17 Write, but do not solve, the Laplace transform of the equations of motion for the system shown below. Answer: Find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ for the rotational mechanical system shown below. Example 2.18 Answer: System Modeling Gሺsሻ = 1 2sଶ + s + 1 Page 23 Feedback and Control Systems Systems with Gears. Gears provide mechanical advantage to rotational systems. Gears allow a system to match the driving torque and the load – a trade-off between speed and torque. The linearized interaction between gears is seen in figure 2.4. Figure 2.4. A gear system An input gear with radius rଵ and Nଵ teeth is rotated through angle θଵ ሺtሻ due to a torque Tଵ ሺtሻ. An output gear with radius rଶ and Nଶ teeth responds by rotating through angle θଶ ሺtሻ and delivering a torque Tଶ ሺtሻ. The distance traveled along each gear’s circumference is the same, thus or rଵ θଵ = rଶ θଶ (2.11) θଶ rଵ Nଵ = = θଵ rଶ Nଶ (2.12) since the ratio of the number of teeth along the circumference is in the same proportion as the ratio of the radii. Thus, the ratio of the angular displacement of the gears is inversely proportional to the ratio of the number of teeth. For the input and output torques, assuming that the gears are lossless (they neither absorb nor store energy), Tଶ θଵ Nଶ = = Tଵ θଶ Nଵ (2.13) Figure 2.5. Transfer functions for angular displacement and torques in lossless gears. System Modeling Page 24 Feedback and Control Systems Rotational mechanical impedances can be reflected through gear trains by multiplying the mechanical impedance by the ratio ଶ Number of teeth of gear on the ܖܗܑܜ܉ܖܑܜܛ܍܌shaft ൲ ൮ Number of teeth of gear on the ܍܋ܚܝܗܛshaft Example 2.19 Represent the rotational mechanical system shown to an equivalent system without gears. Answer: Find the transfer function Gሺsሻ = θଶ ሺsሻ/Tଵ ሺsሻ for the system shown below Example 2.20 Answer: System Modeling Gሺsሻ = θଶ ሺsሻ Nଶ /Nଵ = ଶ Tଵ ሺsሻ Jୣ s + Dୣ s + K ୣ Page 25 Feedback and Control Systems where Nଶ ଶ Jୣ = Jଵ ൬ ൰ + Jଶ Nଵ Dୣ = Dଵ ൬ Nଶ ଶ ൰ + Dଶ Nଵ Kୣ = Kଶ In order to eliminate gears with large radii, a gear train is used to implement large gear ratios by cascading smaller gear ratios. Also, gears may exhibit inertia and damping. Handling of cases when the gears are non-ideal is illustrated in the next example. Find the transfer function Gሺsሻ = θଵ ሺsሻ/Tଵ ሺsሻ for the system shown below. Example 2.21 Answer: where and System Modeling Gሺsሻ = 1 θଵ ሺsሻ = ଶ Tଵ ሺsሻ Jୣ s + Dୣ s Jୣ = Jଵ + ሺJଶ + Jଷ ሻ ൬ Nଵ ଶ Nଵ Nଷ ଶ ൰ + ሺJସ + Jହ ሻ ൬ ൰ Nଶ Nଶ Nସ Nଵ ଶ Dୣ = Dଵ + Dଶ ൬ ൰ Nଶ Page 26 Feedback and Control Systems Find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ for the rotational mechanical system with gears shown in Example 2.22 the figure below. Answer: Gሺsሻ = sଶ 1/2 +s+1 Example 2.23 Gሺsሻ = Xሺsሻ/Tሺsሻ For the combined translational and rotational mechanical system shown below, find the transfer function Answer: System Modeling Xሺsሻ 8 = ଶ Tሺsሻ 59s + 13s + 6 Page 27 Feedback and Control Systems 1. For each of the rotational mechanical systems shown below, determine the transfer function Gሺsሻ = Drill Problems 2.5 θଵ ሺsሻ/Tሺsሻ. 2. For the rotational mechanical system shown below, find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ. 3. Find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ for the rotational mechanical system shown in the figure below. 4. For the rotational mechanical system shown, find the transfer function Gሺsሻ = θଶ ሺsሻ/Tሺsሻ System Modeling Page 28 Feedback and Control Systems function Gሺsሻ = Xሺsሻ/Tሺsሻ. 5. Given the combined translational and rotational system shown in the figure below, find the transfer 2.6 Electromechanical System Transfer Function Intended Learning Outcome: Obtain transfer function relating the output displacement to the input voltage of electromechanical systems. A motor is an electromechanical component that yields a displacement output for a voltage input, that is, a mechanical output generated by an electrical input. The transfer function for the armature-controlled dc servomotor will be derived. Its schematic and block diagram is shown in the figure below. Figure 2.6. The schematic and block diagram representation of a DC motor. electromagnet called the fixed field. A rotating circuit, called the armature, through which the current iୟ ሺtሻ In the above figure, a magnetic field is developed by stationary permanent magnets or a stationary flows, passes through this magnetic field at right angles and feels a force F = Bℓiୟ ሺtሻ, where B is the System Modeling Page 29 Feedback and Control Systems magnetic field strength and ℓ is the length of the conductor. The resulting torque turns the rotor, the rotating member of the motor. There is another phenomenon that occurs in the motor: A conductor moving at right angles to a magnetic field generates a voltage at the terminals of the conductor, equal to e = Bℓv, where e is the voltage and v is the velocity of the conductor normal to the magnetic field. Since the current-carrying armature is rotating in a magnetic field, its voltage is proportional to speed. Thus, vୠ ሺtሻ = K ୠ dθ୫ ሺtሻ dt (2.13) wherevୠ ሺtሻ is the back electromotive force, K ୠ is the back emf constant (in volt-second/radian) and ୢౣ ሺ୲ሻ ୢ୲ = ω୫ ሺtሻ is the angular velocity of the motor. Taking Laplace transform, Vୠ ሺsሻ = K ୠ sθ୫ ሺsሻ (2.14) The relationship between the armature current and, iୟ ሺtሻ, the applied armature voltage, eୟ ሺtሻ and the back emf vୠ ሺtሻ is found by writing a loop equation around the Laplace transformed armature circuit. R ୟ Iୟ ሺsሻ + Lୟ sIୟ ሺsሻ + Vୠ ሺsሻ = Eୟ ሺsሻ (2.15) The torque developed by the motor is proportional to the armature current; T୫ ሺsሻ = K ୲ Iୟ ሺsሻ (2.16) whereK ୲ is the motor torque constant (in Newton-meters/ampere), which depends on the motor and magnetic field characteristics. Solving equation 2.16 in terms of the armature current and substituting this and the back emf of Equation 2.14 to equation 2.15, ሺR ୟ + Lୟ sሻT୫ ሺsሻ + K ୠ sθ୫ ሺsሻ = Eୟ ሺsሻ K୲ System Modeling (2.17) Page 30 Feedback and Control Systems To solve for the transfer function of the motor Gሺsሻ = θ୫ ሺsሻ/Eୟ ሺsሻ, an expression for T୫ in terms of θ୫ ሺsሻ must be obtained. The equivalent mechanical loading on a motor is shown in a figure below. Figure 2.7. Equivalent mechanical loading on a DC motor. J୫ is the equivalent inertia at the armature and includes both the armature inertia and the load inertia reflected to the armature. D୫ is the equivalent viscous damping at the armature and includes both the armature viscous damping and the load viscous damping reflected to the armature. From figure 2.7, T୫ ሺsሻ = ሺJ୫ sଶ + D୫ sሻθ୫ ሺsሻ (2.18) Substituting this to equation 2.17 and assuming the armature inductance Lୟ is small compared to the armature resistance R ୟ which is very usual for a DC motor, the transfer function of the motor is solved as Gሺsሻ = θ୫ ሺsሻ K ୲ /ሺR ୟ J୫ ሻ = Eୟ ሺsሻ s ቂs + ଵ ቀD + ౪ౘ ቁቃ ౣ Note that equation 2.19 is of the form Gሺsሻ = ୫ K s ሺs + αሻ ୖ (2.19) (2.20) To find the constants J୫ and D୫ , refer to figure 2.8, with a motor with inertia Jୟ and damping Dୟ at the armature driving a load consisting of inertia J and damping D . System Modeling Page 31 Feedback and Control Systems Figure 2.8. DC motor driving a rotational load If all of the inertias and damping values are known, the load inertia and load damping can be reflected back to the armature as some equivalent inertia and damping to be added to armature inertia and armature damping. Thus, Nଵ ଶ J୫ = Jୟ + J ൬ ൰ Nଶ D୫ = Dୟ + D ൬ Nଵ ଶ ൰ Nଶ (2.21a) (2.21b) The electrical constants of the motor can be obtained through a dynamometer test of the motor, where a dynamometer measures the torque and speed of a motor under the condition of a constant applied voltage. It can be shown that the relationship between motor torque T୫ when a voltage eୟ is applied and the motor speed ω୫ is T୫ = − Kୠ K୲ K୲ ω୫ + eୟ Rୟ Rୟ (2.22) which is linear. The y-intercept is called the stall torque and is the torque of the motor when the angular velocity is zero. Thus, Tୱ୲ୟ୪୪ = K୲ e Rୟ ୟ (2.23) The x-intercept is called the no-load speed and is the angular velocity of the motor at zero torque. Thus, System Modeling Page 32 Feedback and Control Systems ω୬୭ି୪୭ୟୢ = eୟ Kୠ (2.24) Thus if Tୱ୲ୟ୪୪ and the ω୬୭ି୪୭ୟୢ is known, through the dynamometer test, the electrical constants can be found as K ୲ Tୱ୲ୟ୪୪ = Rୟ eୟ and Kୠ = eୟ ω୬୭ି୪୭ୟୢ (2.25) (2.26) The figure bellow shows the plot as a result of dynamometer test. Figure 2.9. Torque-speed curves with an armature voltage as a parameter Given the system and torque-speed curve below respectively, find the transfer function Gሺsሻ = Example 2.24 θ ሺsሻ/Eୟ ሺsሻ. System Modeling Page 33 Feedback and Control Systems Answer: Gሺsሻ = θ ሺsሻ 0.0417 = Eୟ ሺsሻ sሺs + 1.667ሻ Find the transfer functionGሺsሻ = θ ሺsሻ/Eୟ ሺsሻ for the motor and the load shown below. The torque-speed Example 2.25 curve is given by T୫ = −8ω୫ + 200 when the input voltage is 100 volts. Answer: System Modeling Gሺsሻ = 1/20 sሾs + ሺ15/2ሻሿ Page 34 Feedback and Control Systems 1. For the motor, load, and torque-speed curve shown, find the transfer function Gሺsሻ = θ ሺsሻ/Eୟ ሺsሻ. Drill Problems 2.6 inertia. Find the transfer function Gሺsሻ = θଶ ሺsሻ/Eୟ ሺsሻ. 2. The motor whose torque-speed characteristics and the load drives are shown. Some of the gears have 3. A dc motor 55 N-m of torque at a speed of 600 rad/s when 12 volts are applied. It stalls out at this s/rad, respectively, find the transfer function Gሺsሻ = θ ሺsሻ/Eୟ ሺsሻ of this motor if it drives an inertia voltage with 100 N-m of torque. If the inertia and damping of the armature are 7 kg-m2 and 3 N-m- load of 105 kg-m2 through a gear train as shown below. System Modeling Page 35 Feedback and Control Systems 4. In this chapter, the transfer function of a dc motor relating the angular displacement output to armature input voltage. Often, we want to control the output torque rather than the displacement. Derive the transfer function of the motor that relates output torque to input armature voltage. 5. Find the transfer function Gሺsሻ = Xሺsሻ/Eୟ ሺsሻ for the system shown below. 2.7. The General State-Space Representation and Application Intended Learning Outcome: Define terms associated with state-space modeling of systems and enumerate steps in obtaining the state-space representation of a system. In previous articles, the frequency-domain, or the classical technique of modeling physical systems was discussed. This approach is based on converting a system’s differential equation to a transfer function, thus generating a mathematical model of the system that algebraically relates the representation of the output to System Modeling Page 36 Feedback and Control Systems a representation of the input. Replacing a differential equation with an algebraic equation not only simplifies the representation of individual subsystems but also simplifies modeling interconnected subsystems. This section presents a method by which an alternative to transfer functions in modeling dynamic systems is presented; the method is called state-space modeling. It can be used for the same class of systems that the transfer functions can model. The discussions presented here are on the introductory level; advanced techniques for state-space modeling is beyond the scope of this course. Also, since state-space representations of systems are expressed as matrices, the student may want to review matrices and linear algebra. The following are the steps in writing a state-space model for physical systems: 1. Select a particular subset of all possible system variables and call the variables in this subset state variables. 2. For an nth-order system, write n simultaneous, first-order differential equations in terms of the state variables. These systems of simultaneous differential equations are called state equations. 3. If the initial condition of all the state variables at t as well as the system input for t ≥ t is known, the simultaneous differential equations for the state variables can be solved for t ≥ t . 4. The state variables with the system’s input will be algebraically combined and all of the other system variables for t ≥ t will be found. The algebraic equations that will arise are called the output equations. 5. The state equations and the output equations of the system are its state-space representation or state-space model. The application of such process is demonstrated using an RL and an RLC circuit. Example 2.26 Find a possible state-space representation for the RL circuit shown below. Follow the steps enumerated above. System Modeling Page 37 Feedback and Control Systems Example 2.27 Find a possible state-space representation for the RLC circuit shown below. If the system is linear, the state and output equations can be written in vector-matrix form. But before the general state-space representation is presented, some definitions are in order. • A linear combination of n variables, x୧ , for i = 1 to n is given by the following sum, S, S = k ୬ x୬ + k ୬ିଵ x୬ିଵ + ⋯ + Kଵ xଵ where each K ୧ is a constant. • A set of variables is said to be linearly independent if none of the variables can be written as a linear combination of the others. • A system variable is any variable that responds to an input or initial condition in a system. • The state variables are the smallest set of linearly independent system variables such that the • determine the value of all system variables for all t ≥ t . A state vector is a vector whose elements are the state variables. • The state equations are a set of n simultaneous, first order differential equations with n variables values of the members of the set at time t along with known forcing functions completely • The state space is the n-dimensional space whose axes are the state variables. • The output equation is the algebraic equation that expresses the output variables of a system as where the n variables to be solved are the state variables. linear combinations of the state variables and the inputs. The general state-space representation of a linear system is given as ܠሶ = ܠۯ+ ۰ܝ System Modeling (2.27a) Page 38 Feedback and Control Systems = ܡ۱ ܠ+ ۲ܝ (2.27b) for t ≥ t and initial conditions, ܠሺt ሻ, where: = ܠstate vector ܠሶ = ܠ܌ ܜ܌ = derivatives of the state vectors with respect to time =ܡoutput vector = ܝinput or control vector = ۯsystem matrix ۰ = input matrix ۱= output matrix ۲ = feedforward matrix The state equation is given by equation 2.27a and the vector ܠ, the state vector, contains the state variables. As discussed previously, if the initial conditions of the state variables and the input vector ܝare known, this equation can be solved for the state variables. Equation 2.27b, the output equation, can be used to solve for other system variables. The choice of state variables for a given system is not unique. However, they must satisfy the following requirements: 1. They must be linearly independent. 2. The minimum number of state variables to completely describe the system is equal to the order of the differential equation representing the system. Although the rule specifies the minimum number of state variables to be identified, the number can exceed this minimum as long as all the chosen state variables are linearly independent. In some cases, this can simplify the writing of state equations and output equations. System Modeling Page 39 Feedback and Control Systems Example 2.28 Write the state-space representation of the systems in examples 2.26 and 2.27 in vector matrix form. Answers: For the RL network, the state equation is di R = − i + v ሺ tሻ dt L and an output equation is vୖ ሺtሻ = Riሺtሻ Thus, letting xሶ = ቂୢ୲ቃ , x = ሾiሿ , A = ቂ− ቃ , B = ሾ1ሿ , y = ሾvୖ ሿ , C = ሾRሿ , D = ሾ0ሿ , and u = vሺtሻ . ୢ୧ ୖ R xሶ = − ൨ x + vሺtሻ L Therefore y = ሾRሿx For the RLC network, the state equations are dq =i dt di 1 R 1 =− q− i+ v dt LC L L 1 v ሺtሻ = − q − Ri + v C and an output equation is Thus, letting ܠሶ = dq/dt q 0 1 0 ൨, = ܠቂ ቃ, = ۯ ൨, ۰ = ൨, y = v , ۱ = ሾ−1/C −Rሿ, t −1/LC −R/L 1/L di/dt D = ሾ1ሿ, u = v. Therefore System Modeling dq/dt 0 1 q 0 ൨= ൨ቂ ቃ + ൨v −1/LC −R/L t 1/L di/dt Page 40 Feedback and Control Systems q v = ሾ−1/C −Rሿ ቂ ቃ + v t 2.8 State-Space Representation of Electrical and Mechanical Systems Intended Learning Outcome: Obtain the state-space model of electrical and mechanical systems. This section discusses the methods by which electrical and mechanical systems will be modeled through state-space. In the previous section, it is stated that the choice of state variables are arbitrary. This section describes a systematic technique by which these state variables can be selected. The approach is done as follows: 1. Write a simple derivative equation for each energy-storage element and solve for each derivative term as a linear combination of any of the system variables and input that are present in the equation. 2. Select the differentiated variable as a state variable. 3. Express all other system variables in the equations in terms of the state variables and the input. 4. The output variables are written as linear combinations of the state variables and the input. These steps will be demonstrated for electrical and mechanical systems through the following examples. Example 2.29 Find a state-space representation of the network shown below if the output is the current through the resistor. Answer: System Modeling Page 41 Feedback and Control Systems For mechanical systems, it is more convenient to obtain the state-equations directly from the equations of motion rather than from the energy-storage elements. Thus, in mechanical systems, the position and velocity of each point of linearly independent motions are selected as state variables. The procedure is illustrated in the following example. Example 2.30 Find the state and output equations of the translational mechanical system shown below Answers: xଵ 1 = ܠ = ܡቂx ቃ = ቂ 0 ଶ 0 0 xଵ 0 0ቃ vଵ 1 0 x v Find the state-space representation of the electrical network shown. The output is v୭ ሺtሻ. Example 2.31 Answers: System Modeling Page 42 Feedback and Control Systems Represent the translational mechanical system shown below in state-space, where xଷ ሺtሻ is the output. Example 2.32 Answers: 1. Represent the electrical network shown in the figure below in state-space, where v୭ ሺtሻ is the output. Drill Problems 2.7 2. Find the state-space representation of the network shown below if the output is v୭ ሺtሻ. System Modeling Page 43 Feedback and Control Systems 3. Represent the system shown below in state-space where the output is xଷ ሺtሻ. 4. Represent the rotational mechanical system shown below in state-space where θଵ ሺtሻ is the output. 5. Represent the system shown below in state-space where the output is θ ሺtሻ. 2.9 The Transfer Function and the State-Space Relationship Intended Learning Outcome: Convert a transfer function into state-space representation and vice versa. To convert a transfer function into state-space representation, state variables must be chosen. One choice would be that of phase variables, that is, each subsequent state variable is defined to be the derivative of the previous state variable. System Modeling Page 44 Feedback and Control Systems Consider the differential equation d୬ y d୬ିଵ y dy + a + ⋯ + aଵ + a y = b u ୬ିଵ ୬ ୬ିଵ dt dt dt (2.28) A convenient way to choose state variables is to choose the output, yሺtሻ and its ሺn − 1ሻ derivatives. Choosing the state variables, x୧ , xଵ = y xଶ = xଷ = ⋮ Differentiating both sides yields dy dt dଶ y dt ଶ d୬ିଵ y x୬ = ୬ିଵ dt xሶ ଵ = dy = xଶ dx xሶ ଷ = dଷ y = xସ dx ଷ dଶ y xሶ ଶ = ଶ = xଷ dx xሶ ୬ିଵ = ⋮ d୬ିଵ y = x୬ dx ୬ିଵ xሶ ୬ = −a xଵ − aଵ xଶ − ⋯ − a୬ିଵ x୬ + b u System Modeling Page 45 Feedback and Control Systems In vector-matrix form, (2.28) and the output equation is (2.29) Thus, to convert a transfer function into state equations, convert the transfer function to a differential equation by cross-multiplication and taking the inverse Laplace transform, assuming zero initial conditions. Then the differential equation is represented in state-space in phase-variable form. Example 2.33 Cሺsሻ 24 = ଷ Rሺsሻ s + 9sଶ + 26s + 24 Find the state-space representation in phase-variable form for the transfer function Gሺsሻ = Answer: System Modeling Page 46 Feedback and Control Systems Generating an equivalent block diagram based on the phase variable form of the state-space representation of the previous example will yield which means that the output is generated by integrators and constant-gain blocks. The previous example has a constant numerator. The next example illustrates the procedure when the numerator is a polynomial of lower degree than the denominator. Example 2.34 Find the state-space representation of the transfer function Answer: System Modeling Gሺsሻ = s ଶ + 7s + 2 sଷ + 9sଶ + 26s + 24 Page 47 Feedback and Control Systems In the previous example, it can be seen that the denominator yields the state equations, while the numerator yields the output equation. A similar equivalent block diagram can also be obtained for this example, illustrating how the state-space representation is implemented using block diagrams, as in Example 2.35 Find the state equations and the output equation for the phase-variable representation of the transfer function Gሺsሻ = sଶ 2s + 1 + 7s + 9 Answer: To convert a state-space representation into its equivalent transfer function, given the state and output equations, ܠሶ = ܠۯ+ ۰ܝ = ܡ۱ ܠ+ ۲ܝ System Modeling (2.30a) (2.30b) Page 48 Feedback and Control Systems Take the Laplace transform, assuming zero initial conditions, s܆ሺsሻ = ܆ۯሺsሻ + ۰܃ሺsሻ ܇ሺsሻ = ۱܆ሺsሻ + ۲܃ሺsሻ For the first equation, solving for ܆ሺsሻ, Substituting this to the second equation ܆ሺsሻ = ሺs۷ − ۯሻି ۰܃ሺsሻ ܇ሺsሻ = ሾ۱ሺs۷ − ۯሻି ۰ + ۲ሿ܃ሺsሻ (2.31) in which the quantity ۱ሺs۷ − ۯሻି ۰ + ۲ is called the transfer function matrix since it relates the output ܇ሺsሻ to the input ܃ሺsሻ. However, if the input and the output are scalars, then Gሺsሻ = Y ሺsሻ = ۱ሺs۷ − ۯሻି ۰ + ۲ Uሺsሻ (2.32) Note that this equation evaluates an inverse of a matrix. A review on how to evaluate this must be done by the student. One method is by ሺs۷ − ۯሻି = The method is illustrated in the following examples. adjሺs۷ − ۯሻ det ሺs۷ − ۯሻ Example 2.36 Given the system defined as Find the transfer function Gሺsሻ = Yሺsሻ/Uሺsሻ. System Modeling Page 49 Feedback and Control Systems Answer: Gሺsሻ = 10ሺsଶ + 3s + 2ሻ s ଷ + 3sଶ + 2s + 1 Example 2.37 Convert the state and output equations to transfer function. Answer: Gሺsሻ = 3s + 5 sଶ + 4s + 6 Drill Problems 2.8 1. Find the state-space representation in phase-variable form for the system shown below. 2. Write the state equations and the output equation for the phase-variable representation. 3. Represent the transfer function in state-space. Give the answer in vector-matrix form. Gሺsሻ = s ଶ + 3s + 8 ሺs + 1ሻሺsଶ + 5s + 5ሻ 4. Find the transfer function Gሺsሻ = Yሺsሻ/Rሺsሻ for the following system represented in state-space. System Modeling Page 50 Feedback and Control Systems 5. Determine the transfer function Gሺsሻ = Yሺsሻ/Rሺsሻ equivalent to the state and output equations shown below. References: N. Nise. (2011). Control Systems Engineering 6th Edition. United States of America: John Wiley & Sons. R. Dorf& R. Bishop. (2011). Modern Control Systems 12th Edition. New Jersey: Prentice Hall. System Modeling Page 51