Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore Chapter 4 Block Diagrams and SFGs

Chapter 4 Block Diagrams and SFGs

Published by falkarimy, 2021-01-20 20:22:44

Description: Chapter 4 Block Diagrams and SFGs

Search

Read the Text Version

CHAPTER 4 Block Diagrams and Signal-Flow Graphs In Chap. 2, we studied the modeling of basic dynamic systems, and later in Chap. 3 we utilized transfer function and state space methods to convert these models from differen- tial equation representation into formats more suitable for control system analysis. In this chapter, we introduce block diagrams as graphical alternatives for modeling control Learning Outcomes systems and their underlying mathematics. After successful completion of this chapter, you will be able to Block diagrams are popular in the study of 1. Utilize block diagrams, its components, and their underlying mathematics control systems because they provide bet- to obtain transfer function of a control system. ter understanding of the composition and 2. Establish a parallel between block diagrams and signal-flow graphs. interconnection of the components of a 3. Utilize signal-flow graphs and Mason’s gain formula to find transfer dynamic system. A signal-flow graph (SFG) may also be used as an alternative graphical function of a control system. representation of a control system model. 4. Obtain the state diagrams, an extension of the SFG to portray state SFGs may be regarded as an alternative equations and differential equations. representation of a block diagram. In this chapter, we utilize the block diagrams and SFGs and the Mason’s gain formula to find the transfer function of the overall control system. Through case studies at the end of the chapter, we apply these techniques to the modeling of various dynamic systems that we already studied in Chaps. 2 and 3. 4-1  BLOCK DIAGRAMS Block diagram modeling together with transfer function models describe the cause-and- effect (input-output) relationships throughout the system. For example, consider a simpli- fied block diagram representation of the heating system in your lecture room, shown in Fig. 4-1, where by setting a desired temperature, also defined as the Block diagrams provide better understanding of the composition input, one can set off the furnace to provide heat to the room. The process is rela- and interconnection of the compo- tively straightforward. The actual room temperature is also known as the output nents of a dynamic system. and is measured by a sensor within the thermostat. A simple electronic circuit within the thermostat compares the actual room temperature to the desired room temperature (comparator). If the room temperature is below the desired temperature, an error voltage will be generated. The error voltage acts as a switch to open the gas valve and turn on the furnace (or the actuator). Opening the windows and the door in the class- room would cause heat loss and, naturally, would disturb the heating process (disturbance). 163

164   Chapter 4.  Block Diagrams and Signal-Flow Graphs Desired Room Heat Loss Actual Room +– Temperature Temperature Thermostat Error Gas Valve Furnace Room Voltage Feedback Figure 4-1  A simplified block diagram representation of a heating system. The room temperature is constantly monitored by the output sensor. The process of sensing the output and comparing it with the input to establish an error signal is known as feed- back. Note that the error voltage here causes the furnace to turn on, and the furnace would finally shut off when the error reaches zero. The block diagram in this case simply shows how the system components are intercon- nected, and no mathematical details are given. If the mathematical and functional relation- ships of all the system elements are known, the block diagram can be used as a tool for the analytic or computer solution of the system. In general, block diagrams can be used to model linear as well as nonlinear systems. For nonlinear systems, the block diagram variables are in time domain, and for linear systems, the Laplace transform variables are used. So in this case, assuming linear models for all system components, the system dynam- ics can be represented, in the Laplace domain, by a transfer function Ti(s) (4-1) To(s) where Ti(s) is the Laplace representation of the Desired Room Temperature and To(s) is the Actual Room Temperature, as shown in Fig. 4-1. Alternatively, we can use signal flow graphs or state diagrams to provide a graphical representation of a control system. These topics are discussed later in this chapter. 4-1-1  Modeling of Typical Elements of Block Diagrams in Control Systems The common elements in block diagrams of most control systems include •  Comparators •  Blocks representing individual component transfer functions, including •  Reference sensor (or input sensor) •  Output sensor •  Actuator •  Controller •  Plant (the component whose variables are to be controlled) •  Input or reference signals1 •  Output signals •  Disturbance signal •  Feedback loops 1See Chap. 7 for the difference between an input or a reference input.

4-1  Block Diagrams    165 Disturbance Input Reference + Controller Actuator + – Plant Output Sensor Vin – Vo Output Sensor Figure 4-2  Block diagram representation of a general control system. Figure 4-2 shows one configuration where these elements are interconnected. You may wish to compare Figs. 4-1 and 4-2 to find the control terminology for each system. As a rule, each block represents an element in the control system, and each element can be modeled by one or more equation. These equations are normally in the Laplace domain (because of ease in manipulation using transfer functions), but the time representation may also be used. Once the block diagram of a system is fully constructed, one can study individual components or the overall system behavior. The key components of a block diagram are discussed next. Comparators One of the important components of a control system is the sensing and the electronic device that acts as a junction point for signal comparisons—otherwise known as a comparator. In general, these devices possess sensors and perform simple mathematical operations such as addition and subtraction (such as the thermostat in Fig. 4-1). Three examples of comparators are illustrated in Fig. 4-3. Note that the addition and subtraction r (t) e(t) = r(t) – y(t) r(t) e(t) = r(t) + y(t) R(s) + E(s) = R(s) – Y(s) R(s) + E(s) = R(s) + Y(s) – + y(t) Y(s) y(t) Y(s) (a) (b) r2(t) R2(s) r1(t) + e(t) = r1(t) + r2(t) – y(t) A comparator R1(s) +_ E(s) = R1(s) + R2(s) – Y(s) performs addition and subtraction y(t) Y(s) (c) Figure 4-3  Block diagram elements of typical sensing devices of control systems. (a) Subtraction. (b) Addition. (c) Addition and subtraction.

166   Chapter 4.  Block Diagrams and Signal-Flow Graphs operations in Fig. 4-3a and b are linear, so the input and output variables of these block diagram elements can be time-domain variables or Laplace-transform variables. Thus, in Fig. 4-3a, the block diagram implies e(t) = r(t)− y(t) (4-2) or E(s) = R(s)−Y(s) (4-3) Blocks As mentioned earlier, blocks represent the equations of the system in time domain or the transfer function of the system in the Laplace domain, as demonstrated in Fig. 4-4. In Laplace domain, the following input-output relationship can be written for the sys- tem in Fig. 4-4: X(s) = G(s)U(s) (4-4) If signal X(s) is the output and signal U(s) denotes the input, the transfer function of the block in Fig. 4-4 is G(s ) = X(s) (4-5) U(s) Typical block elements that appear in the block diagram representation of most control systems include plant, controller, actuator, and sensor. EXAMPLE 4-1-1 Consider the block diagram of a c4a-5sc. aTdheestyrsatnesmferwfiuthncttriaonnsfGer(sf)uonfctthioenosvGer1a(sll) saynsdteGm2(csa)nthbaetoabrteacinoend- nected in series, as shown in Fig. by combining individual block equations. Hence, for variables A(s) and X(s), we have X(s) = A(s)G2(s) A(s) = U(s)G1(s) X(s) = G1(s)G2(s) G(s) = X(s) U(s) Or, G(s) = G1(s)G2(s) (4-6) Using Eq. (4-6), the system in Fig. 4-5 can be represented by the system in Fig. 4-4.  ▲ u (t) g (x, u) x (t) Time domain U (s) G (s) X (s) Laplace domain Figure 4-4  Time and Laplace domain block diagrams.

4-1  Block Diagrams    167 U (s) G1 (s) A (s) G2 (s) X (s) Figure 4-5  Block diagrams G1(s) and G2(s) connected in series—a cascade system. EXAMPLE 4-1-2 Consider a more complicated system of two transfer functions tGhe1(so)vaenradllGsy2(sst)emthactaanrebecoonbntaeicnteedd in parallel, as shown in Fig. 4-6. The transfer function G(s) of by combining individual block equations. Note for the tFwuortbhleorc, knso,tGe 1t(hsa)tasnidgnGa2l(Us)(,sA) 1g(os)esactht raosutghhe ianbpruatn, acnhdpAoi2n(st)PananddAi3s(sr)enaraemtehde outputs, respectively. as follows: as A1(s). Hence, for the overall system, we combine the equations A1(s) = U(s) A2(s) = A1(s)G1(s) A3(s) = A1(s)G2(s) X(s) = A2(s) + A3(s) X(s) = U(s)(G1(s)+ G2(s)) G(s ) = X(s) U(s) Or, G(s) = G1(s)+ G2(s) (4-7) Using Eq. (4-7), the system in Fig. 4-6 can be represented by the system in Fig. 4-4.  ▲ Feedback For a system to be classified as a feedback control system, it is necessary that the controlled variable be fed back and compared with the reference input. After the comparison, an error signal is generated, which is used to actuate the control system. As a result, the actuator is activated in the presence of the error to minimize or eliminate that very error. A necessary component of every feedback control system is an output sensor, which is used to convert the output signal to a quantity that has the same units as the reference input. A feedback control system is also known a closed-loop system. A system may have multiple feedback loops. Figure 4-7 shows the block diagram of a linear feedback control system with a single-feedback loop. The following terminology is defined with reference to the diagram: A1 (s) G1 (s) A2 (s) U (s) P + X (s) + A1 (s) G2 (s) Figure 4-6  Block diagrams G1(s) and G2(s) A3 (s) connected in parallel.

168   Chapter 4.  Block Diagrams and Signal-Flow Graphs r(t), R(s) = reference input (command) y(t), Y(s) = output (controlled variable) b(t), B(s) = feedback signal u(t), U(s) = actuating signal, also known as error signal e(t), E(s) when H(s) = 1. But in most textbooks E(s) is used regardless of value of the feedback transfer function H(s) = feedback transfer function G(s)H(s) = L(s) = loop transfer function G(s) = forward-path transfer function M(s) = Y(s)/R(s) = closed-loop transfer function or system transfer function The closed-loop transfer function M(s) can be expressed as a function of G(s) and H(s). From Fig. 4-7, we write Y(s) = G(s)U(s) (4-8) and B(s) = H(s)Y(s) (4-9) The actuating signal is written as U(s) = R(s)− B(s) (4-10) Substituting Eq. (4-10) into Eq. (4-8) yields Y(s) = G(s)R(s)− G(s)H(s)Y(s) (4-11) Substituting Eq. (4-9) into Eq. (4-7) and then solving for Y(s)/R(s) gives the closed- loop transfer function M(s) = Y(s) = 1 + G(s) (4-12) R(s) G(s)H(s) The feedback system in Fig. 4-7 is said to have a negative feedback loop because the comparator subtracts. When the comparator adds the feedback, it is called positive feed- back, and the transfer function Eq. (4-12) becomes M(s) = Y(s) = 1 − G(s) (4-13) R(s) G(s)H(s) R(s) U(s) G(s) Y(s) u(t) H(s) y(t) r(t) + – b(t) Figure 4-7  Block diagram of a basic negative B(s) feedback control system.

4-1  Block Diagrams    169 If G and H are constants, they are also called gains. If H = 1 in Fig. 4-7, the system is said to have a unity feedback loop, and if H = 0, the system is said to be open loop. 4-1-2  Relation between Mathematical Equations and Block Diagrams Consider the second-order prototype system that we have studied in Chaps. 2 and 3: x(t ) + 2ζω n x (t ) + ω 2 x(t ) = ω 2 u(t ) (4-14) n n which has Laplace representation (assuming zero initial conditions x(0) = x(0) = 0): X (s )s 2 + 2ζω X (s )s + ω 2 X (s ) = ω 2 U (s) (4-15) n n n Equation (4-15) consists of constant damping ratio z, constant natural frequency wn, input U(s), and output X(s). If we rearrange Eq. (4-15) to ω 2 U (s ) − 2ζω X (s )s − ω 2 X (s ) = X (s )s 2 (4-16) n n n it can graphically be shown as in Fig. 4-8. iwnittehgTrthraateinnssigfgensr2afXlus(n2scζ)tωtiwonnsicXse(2osζ)rωabnnysdpaωnodsn2tXmω(nus2,)ltrmiepsalpyyeibncegticvboeynly1c,/easin2v,deadsthassehtoshiwgennsiaiglnnXFa(lisgX).(m4s-)a9gy.obinegoibnttaoinbelodcbkys Because the signals X(s) in the right-hand side of Fig. 4-9 are the same, they can be connected, leading to the block diagram representation of the system Eq. (4-16), as shown in Fig. 4-10. If you wish, you can further dissect the block diagram in Fig. 4-10 by factoring out the term 1/s as in Fig. 4-11a to obtain Fig. 4-11b. From Chap. 2, we know that the second-order prototype system in Eq. (4-14) can rep- resent various dynamic systems. If the system studied here, for example, corresponds to the spring-mass-damper seen in Fig. 2-2, then internal variables A(s) and V(s) representing acceleration and velocity of the system, respectively, may also be incorporated in the block diagram model. The best way to see this is by recalling that 1/s is equivalent of integration in Laplace domain. Hence, if A(s) is integrated once, we get V(s), and after integrating V(s), we get the X(s) signal, as shown in Fig. 4-11b. ωn2U(s) + s2 X(s) – 2ζωn2X(s) – Figure 4-8  Graphical representation of Eq. (4-16) using a ωn2X(s) comparator. ωn2U(s) + s2 X(s) 1 X(s) – – s2 2ζωnsX(s) 2ζωns X(s) X(s) ωn2X(s) ωn2 Figure 4-9  Addition of blocks 1/s2, 2ζω nosf, Eanqd. (ω4-n216to). the graphical representation

170   Chapter 4.  Block Diagrams and Signal-Flow Graphs U(s) ωn2 + 1 X(s) –– s2 2ζωns ωn2 Figure 4-10  Block diagram representation 11 of Eq. (4-16) in Laplace domain. ss X(s) 2ζωn s (a) U(s) + A(s) 1 V(s) 1 X(s) ωn2 –– s s 2ζωn ωn2 (b) Figure 4-11  (a) Factorization of 1/s term in the internal feedback loop of Fig. 4-10. (b) Final block diagram representation of Eq. (4-16) in Laplace domain. It is evident that there is no unique way of representing a system model with block dia- grams. We may use different block diagram forms for different purposes. As long as the over- all transfer function of the system is not altered. For example, to obtain the transfer function V(s)/U(s), we may yet rearrange Fig. 4-11 to get V(s) as the system output, as shown in Fig. 4-12. This enables us to determine the behavior of velocity signal with input U(s). U(s) + A(s) 1 V(s) ωn2 –– s Figure 4-12  Block diagram of Eq. (4-16) in Laplace domain with V(s) represented 2ζωn as the output. ωn2 s

4-1  Block Diagrams    171 EXAMPLE 4-1-3 Find the transfer function of the system in Fig. 4-11b and compare that to Eq. (4-15). SOLUTION  tThheecωomn2 bplaorcaktoart, the input and feedback signals in Fig. 4-11b may be moved to the right- hand side of as shown in Fig. 4-13a. This is the same as factorization of 2 as shown below: ω n ω n2U (s ) − ω 2 X (s ) = ω 2 (U (s ) − X(s)) (4-17) n n The factorization operation on Eq. (4-16) results in a simpler block diagram representation of the sys- tem shown in Fig. 4-13b. Note that Figs. 4-11b and 4-13b are equivalent systems. Considering Fig. 4-11b, it is easy to identify the internal feedback loop, which in turn can be simplified using Eq. (4-12), or V(s) 1 1 A1(s) 2ζω n = 2sζω = s + (4-18) s 1 + n After tporew-haantdispsohsotmwnulitnipFliicga.t4io-n14b,ywωhin2cahnudlt1im/s,arteelsypreecstuivletslyi,nthe block diagram of the system is simplified ω 2 n X(s) s(s + 2ζωn ) 2 U(s) = = ω n (4-19) 1 + ω 2 s2 + 2ζω n s + ω 2 n n s(s + 2ζω ) n Equation (4-19) is the transfer function of system Eq. (4-15).  ▲ U(s) + ωn2 A1(s) – U(s) + ωn2 A1(s) + X(s) 1 V(s) 1 X(s) – – (a) s s A(s) 2ζωn (b) Figure 4-13  (a) Factorization of ω 2 . (b) Alternative block diagram representation of Eq. (4-16) in Laplace domain. n U(s) + ωn2 1 X(s) s + 2 ζ ωn s – Figure 4-14  A block diagram 2 representation of ω n . s2 + 2ζω n s + ω 2 n

172   Chapter 4.  Block Diagrams and Signal-Flow Graphs EXAMPLE 4-1-4 Find the velocity transfer function using Fig. 4-12 and compare that to the derivative of Eq. (4-19). SOLUTION  Simplification of the two feedback loops in Fig. 4-12, starting with the internal loop first, we have 1 1+ 2sζωn ω 2 1s n V (s ) = + 1+ 2sζω U (s ) ω 2 1 n ns s V(s ) = ω 2 s (4-20) U(s ) n s2 2ζω 2 + ns + ω n Equation (4-20) is the same as the derivative of Eq. (4-19), which is nothing but multiply- ing Eq. (4-19) by an s term. Try to find the A(s)/U(s) transfer function. Obviously you must get s2X(s)/U(s).  ▲ 4-1-3  Block Diagram Reduction As you might have noticed from the examples in the previous section, the transfer func- tion of a control system may be obtained by manipulation of its block diagram and by its ultimate reduction into one block. For complicated block diagrams, it is often necessary to move a comparator or a branch point to make the block diagram reduction process sim- pler. The two key operations in this case are 1. Moving a branch point from P to Q, as shown in Figs. 4-15a and b. This operation must be done such that the signals Y(s) and B(s) are unaltered. In Fig. 4-15a, we have the following relations: Y(s) = A(s)G2(s) (4-21) B(s) = Y (s )H1(s ) (a) P Y(s) A(s) G2(s) B(s) H1(s) Y(s) (b) Q Figure 4-15  (a) Branch point relocation from point P to (b) point Q. A(s) G2(s) B(s) H1(s) G2(s)

4-1  Block Diagrams    173 In Fig. 4-15b, we have the following relations: Y(s) = A(s)G2(s) (4-22) B(s) = A(s) H1(s) G2(s) But G2(s) = A(s) (4-23) Y(s) ⇒ B(s) = Y(s)H1(s) 2. Moving a comparator, as shown in Figs. 4-16a and b, should also be done such that the output Y(s) is unaltered. In Fig. 4-16a, we have the following relations: Y(s) = A(s)G2(s)+ B(s)H1(s) (4-24) In Fig. 4-16b, we have the following relations: Y1(s) = A(s) + B(s) H1(s) (4-25) G2(s) Y(s) = Y1(s)G2(s) So Y (s) = A(s)G2(s) + B(s) H1(s) G2 (s ) (4-26) G2(s) ⇒ Y(s) = A(s)G2(s)+ B(s)H1(s) (a) G2(s) + A(s) Y(s) + B(s) H1(s) (b) + Y1(s) G2(s) Y(s) A(s) + H1(s) Figure 4-16  (a) Comparator relocation from G2(s) the right-hand side of block G2(s) to (b) the B(s) left-hand side of block G2(s).

174   Chapter 4.  Block Diagrams and Signal-Flow Graphs EXAMPLE 4-1-5 Find the input-output transfer function of the system shown in Fig. 4-17a. SOLUTION  To perform the block diagram reduction, one approach is to move the branch point at cYloo1omtpobs.itnhAiesnglaetrfhteseoufbltlbo,ltcohkcesktGGra22,n,Gsaf3se, rasnhfuodnwGcnt4iaoinsnsFohifogtw.h4ne-fi1inn7bFa.ligsA.yf4stt-ee1rm7tch,aaafttne, drthttheheerneredbduyucectiltoiimonnibnieanctiFonmigg.et4hs-et1rt7iwvdioablfe,ecfeiodrmsbtaebcsky Y (s) = G1G2G3 + G1G4 (4-27) E(s) 1 + G1G2H1 + G1G2G3 + G1G4  ▲ G4 E Y3 G1 Y2 G2 Y1 + + + H1 R – G3 Y + – (a) G4 E Y3 G1 Y2 G2 Y1 + + + G2H1 R – G3 Y + Y – Y R E Y3 G1 (b) G2 G3 + G4 + + G2H1 Y2 – – R E G1 (c) G2 G3 + G4 + 1 + G1 G2H1 Y2 – (d) (Fcig)uCreo4m-1b7i nin(ag)tOheribglioncaklsbGlo1c,kGd2,iaagnrdamG3..((bd))MEolivminingatthinegbrthanecihnnpeorinfeteadtbYa1ctkoltohoepl.eft of block G2.

4-1  Block Diagrams    175 4-1-4  Block Diagrams of Multi-Input Systems: Special Case—Systems with a Disturbance An important case in the study of control systems is when a disturbance signal is present. Disturbance (such as heat loss in the example in Fig. 4-1) usually adversely affects the performance of the control system by placing a burden on the controller/actuator com- ponents. A simple block diagram with two inputs is shown in Fig. 4-18. In this case, one of the inputs, D(s), is known as disturbance, while R(s) is the input. Before designing a proper controller for the system, it is always important to learn the effects of D(s) on the system. We use the method of superposition in modeling a multi-input system. Super Position For linear systems, the overall response of the system under multi-inputs is the summation of the responses due to the individual inputs, that is, in this case, Ytotal = YR |D=0 +YD |R=0 (4-28) When D(s) = 0, the block diagram is simplified (Fig. 4-19) to give the transfer function: Y(s) = 1 + G1 (s )G2 (s ) (4-29) R(s) G1 (s )G2 (s )H1 (s ) When R(s) = 0, the block diagram is rearranged to give (Fig. 4-20): Y(s) = 1 + −G2(s) (s ) (4-30) D(s) G1 (s )G2 (s )H1 R(s) Controller D(s) Plant Y(s) + E(s) G1 – G2 – + Output Sensor H1 Figure 4-18  Block diagram of a system undergoing disturbance. R(s) Y(s) + G1 G2 – H1 Figure 4-19  Block diagram of the system in Fig. 4-18, when D(s) = 0.

176   Chapter 4.  Block Diagrams and Signal-Flow Graphs D(s) – Y(s) G1 + G2 – D(s) – H1 Y(s) (a) G1 – G1H1 (b) Figure 4-20  Block diagram of the system in Fig. 4-18, when R(s) = 0. As a result, from Eq. (4-28) to Eq. (4-32), we ultimately get Ytotal = Y(s) R(s ) + Y(s) D(s) R(s) D(s) D=0 R=0 (4-31) Y (s) = 1 G1G2 R(s) + 1 + −G2 D (s) + G1G2H1 G1G2H1 Observations and nYDtheReg=a0ctoihvnaetvresoigltlhneerinssiagtmnheeal,ndauennmdoe,mraaistnoaartrooersfsuYDilft,Rt=iht0eashddovisewtrussretblhyaanatcftfehecestigsdnitshatleugrpboeaernsfoctreomstihagnencafeol roiwnftatehrrde- Y The with pR aDth=0. feres system. Naturally, to compensate, there will be a higher burden on the controller. 4-1-5  Block Diagrams and Transfer Functions of Multivariable Systems In this section, we illustrate the block diagram and matrix representations (see App. A) of multivariable systems. Two block diagram representations of a multivariable system with p inputs and q outputs are shown in Figs. 4-21a and b. In Fig. 4-21a, the individual input and output signals are designated, whereas in the block diagram of Fig. 4-21b, the multiplicity of the inputs and outputs is denoted by vectors. The case of Fig. 4-21b is preferable in practice because of its simplicity. Figure 4-22 shows the block diagram of a multivariable feedback control system. The transfer function relationships of the system are expressed in vector-matrix form (see App. A): Y(s) = G(s)U(s) (4-32)

4-1  Block Diagrams    177 r1(t) y1(t) r2(t) y2(t) MULTIVARIABLE yq(t) SYSTEM rp(t) (a) r(t) MULTIVARIABLE y(t) SYSTEM Figure 4-21  Block diagram representations of (b) a multivariable system. R(s) U(s) G(s) Y(s) + B(s) H(s) Figure 4-22  Block diagram of a multivariable feed­ – back control system. U(s) = R (s)− B (s) (4-33) B(s) = H (s)Y(s) (4-34) where Y(s) is the q ×1 output vector; U(s), R(s), and B(s) are all p ×1 vectors; and G(s) and H(s) are q × p and p × q transfer-function matrices, respectively. Substituting Eq. (4-11) into Eq. (4-10) and then from Eq. (4-10) to Eq. (4-9), we get Y(s) = G(s)R(s)− G(s)H (s)Y(s) (4-35) Solving for Y(s) from Eq. (4-12) gives Y(s) = [I + G(s)H (s)]−1G(s)R(s) (4-36) provided that I + G(s)H (s) is nonsingular. The closed-loop transfer matrix is defined as M(s) = [I + G(s)H(s)]−1G(s) (4-37) Then Eq. (4-14) is written as Y(s) = M(s)R(s) (4-38)

178   Chapter 4.  Block Diagrams and Signal-Flow Graphs EXAMPLE 4-1-6 Consider that the forward-path transfer function matrix and the feedback-path transfer function matrix of the system shown in Fig. 4-22 are 1 −1   s  G(s)  s +1 1  (s )  1 0  (4-39) =  2  H =  0 1  s+2       respectively. The closed-loop transfer function matrix of the system is given by Eq. (4-15), and is evaluated as follows:  1+ 1 −1  s+2 −1   + s  s +1 s  G(s)H (s)  s 1    (4-40) I + =  1  =  2 s+3 +   2 1 +   s 2 s+2    The closed-loop transfer function matrix is  s+3 1  1 − 1    s  (s) =[I G(s)H(s)]−1 G(s) 1  s+2 s  s +1  (4-41) M + = ∆  −2 s+2  2 1  where s +1    s+2     Thus, ∆ = s+2 s + 3 + 2 = s2 + 5s + 2 (4-42) s +1 s + 2 s s(s +1)  3s2 + 9s + 4 − 1   s(s +1)(s + 2) s  M(s) = s(s +1)   (4-43) s2 + 5s + 2  2 3s + 2   s(s +1)     ▲ 4-2  SIGNAL-FLOW GRAPHS A SFG may be regarded as an alternative representation of a block diagram. The SFG was introduced by S. J. Mason [2, 3] for the cause-and-effect (input-output) representation of linear systems that are modeled by algebraic equations. An SFG may be defined as a graphi- cal means of portraying the input-output relationships among the variables of a set of linear algebraic equations. The relation between block diagrams and SFGs are tabulated for four important cases, as shown in Fig. 4-23. Considering Fig. 4-23b, when constructing an SFG, junction points, or nodes, are used to represent variables—in this case U(s) is the input variable and Y(s) is the output variable. The nodes are connected by line segments called branches, In an SFG, signals can transmit according to the cause-and-effect equations. The branches have associated branch through a branch only in the gains and directions—in this case the branch represents the transfer function direction of the arrow. G(s). A signal can transmit through a branch only in the direction of the arrow.

Transfer Function Block Diagram 4-2  Signal-Flow Graphs    179 (a) One block System Signal Flow Diagram R(s) G(s) Y(s) (b) Y(s) = G(s) R(s) R(s) G(s) Y(s) Cascade (c) (d) R(s) G1(s) A(s) G2(s) Y(s) R(s) G1(s) A(s) G2(s) Y(s) Y(s) = G1(s) G2(s) R(s) Parallel (e) (f) Y(s) = G1(s) + G2(s) A1(s) G1(s) A2(s) + Y(s) G1(s) R(s) G2(s) R(s) P + R(s) Y(s) A1(s) Y(s) = A2(s)+A3(s) A1(s) G2(s) A3(s) Feedback (g) (h) Y(s) = G(s) R(s) E(s) Y(s) 1 G(s) 1 R(s) 1 + G(s) H(s) +– G(s) R(s) E(s) –H(s) Y(s) Y(s) B(s) H(s) Figure 4-23  Block diagrams and their SFG equivalent representations. (a) Input-output representation in block diagram form. (b) Equivalent input-output representation in SFG form. (c) A cascade block diagram representation. (d ) Equivalent cascade SFG representation. (e) A parallel block diagram representation. ( f  ) Equivalent parallel SFG representation. ( g) A negative feedback block diagram representation. (h) Equivalent negative feedback SFG representation. In general, the construction of the SFG is basically a matter of following through the input- output relations of each variable in terms of itself and the others. As a result, in Fig. 4-23b, the SFG represents the transfer function: Y(s) = G(s) (4-44) U(s) where U(s) is the input, Y(s) is the output, and G(s) is the gain, or transmittance, between the two variables. The branch between the input node and the output node should be inter- preted as a unilateral amplifier with gain G(s), so when a signal of one unit is applied at the input U(s), a signal of strength G(s)U(s) is delivered at node Y(s). Although algebraically Eq. (4-44) can be written as U(s) = G1(s)Y(s) (4-45)

180   Chapter 4.  Block Diagrams and Signal-Flow Graphs the SFG of Fig. 4-23b does not imply this relationship. If Eq. (4-45) is valid as a cause-and- effect equation, a new SFG should be drawn with Y(s) as the input and U(s) as the output. Comparing Fig. 4-23c with Fig. 4-23d, or Fig. 4-23e with Fig. 4-23g, it is easy to see that the nodes in SFGs represent the variables in the block diagrams—that is, input, output, and intermediate variables such as A(s). The nodes are then connected through branches with gainsTthheaSt FreGprreespernetsetnhteattrioannsofefrcfausncacdtieonansdGp1(asr)aallnedl fGor2(ms)s, respectively. and the feedback system, shown in Figs. 4-23e and f, are discussed in more detail in the next section. 4-2-1  SFG Algebra Let us outline the following manipulation rules and algebra for the SFGs: 1. The value of the variable represented by a node is equal to the sum of all the signals entering the node. For the SFG of Fig. 4-24, the vbarlaunecohfesy;1 is equal to the sum of the signals transmitted through all the incoming that is, y1 = a21 y2 + a31 y3 + a41 y4 + a51 y5 (4-46) 2. The value of the variable represented by a node is transmitted through all branches leaving the node. In the SFG of Fig. 4-24, we have y6 = a17 y1 y7 = a17 y1 (4-47) y8 = a18 y1 3. Parallel branches in the same direction connecting two nodes can be replaced by a single branch with gain equal to the sum of the gains of the parallel branches. An example of this case is illustrated in Figs. 4-23f and 4-25. 4. A series (cascade) connection of unidirectional branches, as shown in Fig. 4-23d or 4-26, can be replaced by a single branch with gain equal to the product of the branch gains. y3 y2 a31 a41 y4 y5 a21 a18 a51 y1 y8 a16 a17 Figure 4-24  Node as a summing point and as a trans­ mitting point. y6 y7

4-2  Signal-Flow Graphs    181 a b y1 c y2 a+b+c y1 y2 Figure 4-25  Signal-flow graph with parallel paths replaced by one with a single branch. a12 a23 a34 y1 y2 y3 y4 a12a23a34 y1 y4 Figure 4-26  Signal-flow graph with cascade unidirectional branches replaced by a single branch. 5. A feedback system as shown in Fig. 4-23g is subject to the following algebraic equations: E(s) = R(s)− H(s)Y(s) (4-48) and Y(s) = G(s)E(s) (4-49)   Substituting Eq. (4-49) into Eq. (4-48), while eliminating the intermediate vari- able E(s), we get Y(s) = G(s)R(s)− G(s)H(s)Y(s) (4-50) Solving for Y(s)/R(s), we get the closed-loop transfer function M(s) = Y(s) = 1 + G(s) (4-51) R(s) G(s)H(s) EXAMPLE 4-2-1 Convert the block diagram in Fig. 4-27a to an SFG format. SOLUTION  First identify all balsoschkodwiangirnamFivga. r4i-a2b7lebs.—Nionteththisactaistei,sRim, Ep,oYr3t,aYn2t, tYo1,calenadrlYy.iNdeenxtti,faystshoe- ciate each variable to a node, input and output nodes R and Y, respectively, as shown in Fig. 4-27b. Use branches to interconnect the nodes while ensuring the branch directions match the signal directions in the block diagram. Label each branch with the appropriate gain corresponding to a transfer function in Fig. 4-27a. Make sure to incorporate the negative feedback signs into the gains (i.e., −G1 (s ), − G2 (s), and − 1)—see Fig. 4-27c.  ▲

182   Chapter 4.  Block Diagrams and Signal-Flow Graphs R E Y3 G1 Y2 G4 + + + + G2 Y1 G3 +Y – – – H2 H1 (a) R E Y3 Y2 Y1 Y Y (b) G4 1 1 G1 G2 G3 1 RE Y3 Y2 Y1 Y Y –H1 –H2 –1 (c) Figure 4-27  (a) Block diagram of a control system. (b) Signal nodes. (c) Equivalent signal-flow graph. EXAMPLE 4-2-2 As an example on the construction of an SFG, consider the following set of algebraic equations: y2 = a12 y1 + a32 y3 y3 = a23 y2 + a43 y4 (4-52) y4 = a24 y2 + a34 y3 + a44 y4 y5 = a25 y2 + a45 y4 The SFG for these equations is constructed, step by step, in Fig. 4-28.  ▲ 4-2-2  Definitions of SFG Terms In addition to the branches and nodes defined earlier for the SFG, the following terms are useful for the purpose of identification and execution of the SFG algebra. Input Node (Source) An input node is a node that has only outgoing branches (example: node U(s) in Fig. 4-23b).

4-2  Signal-Flow Graphs    183 a32 a12 y3 y4 y5 y1 y2 (a) y2 = a12y1 + a32y3 a32 a43 y5 a12 a23 y1 y2 y3 y4 (b) y2 = a12y1 + a32y3 y3 = a23y2 + a43y4 a32 a43 a44 y5 a12 a23 a34 y1 y2 y3 y4 a24 (c) y2 = a12y1 + a32y3 y3 = a23y2 + a43y4 y4 = a24y2 + a34y3 + a44y4 a32 a43 a44 a12 a23 a34 a45 y1 y2 y3 y4 y5 a24 a25 (d) Complete signal-flow graph Figure 4-28  Step-by-step construction of the signal-flow graph in Eq. (4-52). Output Node (Sink) An output node is a node that has only incoming branches (example: node Y(s) in Fig. 4-23b). However, this condition is not always readily met by an output node. For instance, the SFG in Fig. 4-29a does not have a node that satisfies the condition of an output node. ttbIainothsrematytsnhh2ea,ceeyhanomsborweisdogihetdniohsniefwadciuelenundeseisqitSnaytuFroaFgyGttaiihtgiooone.nf4rsfieFnr-.g2oiIpgna9mu.rbtgd4..teh-TTyn2e2hoe9eaerbmanx,slidaa,tsh/mkwtoieeneergyecypq2an3ruanooanascdmteioeoodauuynkutt2seprpteuuaoytnti2asynn=anoonpyeddopw2eenla,siinnenwtdodpoedutfyseotiin3mnayd=lo3sp.dotylNhye3deoaocerteofsiefincafgeenanncdetSatdhcstFteeaaGtddat, An input node has only outgoing branches. An output node has only incoming branches. an output by the procedure just illustrated. However, we cannot convert a noninput node into an input node by reversing the branch direction of the procedure described for output ncoondveesr. tFiotrinintostaanncien,pnuotdneoyd2eobf ythaeddSFinGg in Fig. 4-29a is not an input node. If we attempt to an incoming branch with unity gain from another identical node yn2,otwhereSaFdGs of Fig. 4-30 would result. The equation that portrays the relation- ship at node y2 y2 = y2 + a12 y1 + a32 y3 (4-53) which is different from the original equation given in Fig. 4-29a.

184   Chapter 4.  Block Diagrams and Signal-Flow Graphs a12 a23 y1 y2 y3 a32 (a) Original signal-flow graph y2 1 y3 1 y3 a12 a23 y1 y2 a32 (b) Modified signal-flow graph Figure 4-29  Modification of a signal-flow graph so that y2 and y3 satisfy the condition as output nodes. y2 1 a12 a23 y1 y2 y3 a32 Figure4-30  Erroneous way to make node y2 an input node. Path A path is any collection of a continuous succession of branches traversed in the same direction. The definition of a path is entirely general, since it does not prevent any node from being traversed more than once. Therefore, as simple as the SFG of Fig. 4-29a is, it may have numerous paths just by traversing the branches a23 and a32 continuously. Forward Path A forward path is a path that starts at an input node and ends at an output node and along node is traversed more than once. For example, in the SFG of Fig. 4-28d, pya1 tihs which no node, and the rest of the nodes are all possible output nodes. The forward the input bfbfooonaerrtcewwwkcaaetorreoddnntyppay3aai1(ntttahhshnssrtdhbobeeueyttg2bwwhireseateenshnnicemhyyb1ep1rasalaynnfnrddtcohyhmye34:w.cOySoi1tinnmhtenogieclyaaco2irtnniltnytoa,agit4ynh3b4)ser.(rtaTthenhheacreorhbeurrbeagtahenhdtrcweethhereeeesfsonhbfrrortwoauhmnaledrcdtyhwt1rpwtoyoaittntyhoho2stddgboeeaetsyiten.3wr,Tmaaehne2i4endn)reeyath1ntaehadrneeotdthtthwweyeno5or. Path Gain The product of the branch gains encountered in traversing a path is called the path gain. For example, the path gain for the path y1 − y2 − y3 − y4 in Fig. 4-28d is a12a23a34 . The SFG gain formula can only Loop be applied between an input node A loop is a path that originates and terminates on the same node and along which and an output node. no other node is encountered more than once. For example, there are four D is the same regardless of which loops in the SFG of Fig. 4-28d. These are shown in Fig. 4-31. output node is chosen.

4-2  Signal-Flow Graphs    185 a32 a43 a44 y2 a23 y3 y3 a34 y4 y4 a32 a43 y2 y3 y4 a24 Figure 4-31  Four loops in the signal-flow graph of Fig. 4-28d. Forward-Path Gain The forward-path gain is the path gain of a forward path. Loop Gain loop. For example, the loop gain the The loop gain is the path of loop in Fig. 4-31 is a24a43a32. gain of a y2 − y4 − y3 − y2 Two parts of an SFG are non- Nontouching Loops touching if they do not share a Two parts of an SFG are nontouching if they do not share a common node. For common node. example, the loops and of the SFG in Fig. 4-28d are non- touching loops. y2 − y3 − y2 y4 − y4 4-2-3  Gain Formula for SFG Given an SFG or block diagram, the task of solving for the input-output relations by alge- braic manipulation could be quite tedious. Fortunately, there is a general gain formula avail- able that allows the determination of the input-output relations of an SFG by inspection. Given an SFG with N forward paths and loops, the gain between the input node and output node yout is [3] K yin ∑ M = yout = N Mk∆k (4-54) yin k=1 ∆ where input-node variable yin = output-node variable yout = gain obnfeuttmwheebeeknrthoyiffnofaornwrdwaraydroudtppatahths sbbetewtweeenenyiyninananddyoyuotut M = total N = gain Mk = ∆ = 1− Li1 + Lj2 − Lk3 + (4-55) ∑ ∑ ∑ i=1 j=1 k=1 or ∆ = 1− (sum of the gains of all individual loops) + (sum of products of gains of all possible combinations of two nontouching loops) - (sum of products of gains of all possible combinations of three nontouching loops) + (sum of products of gains of all possible combinations of four nontouching loops) − ∆k = the ∆ for that part of the SFG that is nontouching with the kth forward path.

186   Chapter 4.  Block Diagrams and Signal-Flow Graphs The gain formula in Eq. (4-54) may seem formidable to use at first glance. However, Δ annudmΔbek raroef the only terms in the formula that could be complicated if the SFG has a large loops and nontouching loops. Care must be taken when applying the gain formula to ensure that it is applied between an input node and an output node. EXAMPLE 4-2-3 Consider that the closed-loop transfer function Y(s)/R(s) of the SFG in Fig. 4-23f is to be determined by use of the gain formula, Eq. (4-54). The following results are obtained by inspection of the SFG: 1. There is only one forward path between R(s) and Y(s), and the forward-path gain is M1 = G(s) (4-56) 2. There is only one loop; the loop gain is L11 = −G(s)H(s) (4-57) 3. There are no nontouching loops since the forward path is in touch with the loop L11. Thus, ∆1 = 1, and ∆ = 1− L11 = 1+ G(s)H(s) (4-58) Using Eq. (4-54), the closed-loop transfer function is written as Y(s) = M1∆1 = G(s) (4-59) R(s) ∆ 1+ G(s)H(s) which agrees with Eq. (4-12) or (4-51).  ▲ EXAMPLE 4-2-4 Consider the SFG shown in Fig. 4-28d. Let us first determine the gain between y1 and y5 using the gain formula. The three forward paths between y1 and y5 and the forward-path gains are Forward path Gain M1 = a12a23a34a45 y1 − y2 − y3 − y4 − y5 M2 = a12a25 y1 − y2 − y5 M3 = a12a24a45 y1 − y2 − y4 − y5 The four loops of the SFG are shown in Fig. 4-28. The loop gains are Loop Gain y2 − y3 − y2 L11 = a23a32 y3 − y4 − y3 L21 = a34a43 y2 − y4 − y3 − y2 L31 = a24a43a32 y4 − y4 L41 = a44

4-2  Signal-Flow Graphs    187 There are two nontouching loops; that is, y2 − y3 − y2 and y4 − y4 Thus, the product of the gains of the two nontouching loops is L12 = a23a32a44 (4-60) not All the loops are in touch with TfohrewsearlodoppasthasreMy13 a−nyd4M−3y. 3Tahnuds,y∆41−=y∆4.3T=h1u.sT, wo of the loops are in touch with forward path M2. ∆2 = 1− a34a43 − a44 (4-61) Substituting these quantities into Eq. (4-54), we have y5 = M1∆1 + M2∆2 + M3∆3 y1 ∆ (a12a23a34a45 ) + (a12a25 )(1 − a34a43 − a44 ) + a12a24a45 (4-62) 1 − (a23a32 + a34a43 + a24a32a43 + a44 ) + a23a32a44 = where ∆ = 1 − (L11 + L21 + L31 + L41 ) + L12 (4-63) = 1 − (a23a32 + a34a43 + a24a32a43 + a44 ) + a23a32a44 The reader should verify that choosing y2 as the output, y2 = a12(1 − a34a43 − a44 ) (4-64) y1 ∆ where Δ is given in Eq. (4-63).  ▲ EXAMPLE 4-2-5 We can convert the block diagram in Fig. 4-32a to an SFG format in Fig. 4-32c, by first associating all block deniasgurraimngvtahreiabbrleasnyc1h–dyi7retoctaionnosdme aastcihn Fig. 4-32b. Next using branches we interconnect the nodes while the signal directions in the block diagram. Then we label each branch with the appropriate gain corresponding to a transfer function in Fig. 4-32a. Make sure to incorporate the negative feedback signs into the gains (i.e., −H1(s), − H2 (s), − H3(s), and − H4 (s))— see Fig. 4-32c. The two forward paths between y1 and y7 and the forward-path gains are Forward path Gain y1 − y2 − y3 − y4 − y5 − y6 − y7 M1 = G1G2G3G4 y1 − y2 − y3 − y6 − y7 M2 = G1G5 The four loops of the SFG are shown in Fig. 4-32. The loop gains are Loop Gain y2 − y3 − y2 L11 = −G1H1 y4 − y5 − y4 L21 = −G3H2 y2 − y3 − y4 − y5 − y2 L31 = −G1G2G3H3 y6 − y7 − y6 L41 = −H4

188   Chapter 4.  Block Diagrams and Signal-Flow Graphs G5 y1 y2 y3 y4 y5 ++ y6 y7 +– – G1 G2 + – G3 G4 – H1 H2 H4 H3 (a) y1 y2 y3 y4 y5 y6 y7 (b) G5 –H4 1 G1 G2 G3 G4 1 y1 y2 y3 y4 y5 y6 y7 –H1 –H2 –H3 (c) Figure 4-32  (a) Block diagram of a control system. (b) Signal nodes representing the variables. (c) Equivalent signal-flow graph. The three following loops are nontouching (4-65) y2 − y3 − y2 , y4 − y5 − y4 and y6 − y7 − y6 Thus, the products of the gains of two of the three nontouching loops are (4-66) L12 = G1G3H1H2 , L22 = G1H1H4 and L32 = G3H2H4 (4-67) Also the following two loops are nontouching y2 − y3 − y4 − y5 − y2 and y6 − y7 − y6 Thus, the product of the gains of the nontouching loops is L42 = G1G2G3H3H4 Further, the product of the three nontouching loop gains is L13 = −G1G3H1H2H4

4-2  Signal-Flow Graphs    189 Hence, ∆ = 1 + G1H1 + G3H2 + G1G2G3H3 + H4 (4-68) + G1G3H1H2 + G1H1H4 + G3H2 H4 + G1G2G3H3H4 + G1G3H1H2 H4 with All the loops are in touch with forward paths M1. Thus, ∆1 = 1. Loop y4 − y5 − y4 is not in touch forward path M2. Thus, ∆2 = 1+ G3H2 (4-69) Substituting these quantities into Eq. (4-54), we have y6 = y7 M1∆1 + M2 ∆2 = G1G2G3G4 + G1G5 (1 + G3H2 ) (4-70) y1 y1 ∆ ∆ The following input-output relations may also be obtained by use of the gain formula: y2 = 1+ G3H2 + H4 + G3H2 H4 (4-71) y1 ∆ y4 = G1G2 (1+ H4 ) (4-72) y1 ∆  ▲ 4-2-4  Application of the Gain Formula between Output Nodes and Noninput Nodes It was pointed out earlier that the gain formula can only be applied between a pair of input and output nodes. Often, it is of interest to find the relation between an output-node vari- able and a noninput-node variable. For example, in the SFG of Fig. 4-32, it may be of interest to find the relation y7 /y2, which represents the dependence of upon y2; the latter is not an input. y7 We can show that, by including an input node, the gain formula can still be applied to find the gain between a noninput node and an output node. Linept uytin, be an input and be an output node of an SFG. The gain, yout /y2, where y2 is not an may be written aysout yout = yout = ΣM ∆k k from yinto yout (4-73) y2 yin ∆ y2 yin ΣM ∆k k from yinto y2 ∆ Because Δ is independent of the inputs and the outputs, the last equation is written as y = ΣM ∆out k k from yinto yout (4-74) y ΣM ∆2 k k from yinto y2 Notice that Δ does not appear in the last equation. EXAMPLE 4-2-6 From the SFG in Fig. 4-32, the gain between y2 and y7 is written as y7 = y7 /y1 = G1G2G3G4 + G1G5(1 + G3H2 ) (4-75) y2 y2 /y1 1+ G3H2 + H4 + G3H2H4  ▲

190   Chapter 4.  Block Diagrams and Signal-Flow Graphs EXAMPLE 4-2-7 Consider the block diagram shown in Fig. 4-27a. The equivalent SFG of the system is shown in Fig. 4-27c. Notice that since a node on the SFG is interpreted as the summing point of all incoming signals to the node, the negative feedback on the block diagram is represented by assigning negative gains to the feedback paths on the SFG. First, we can identify the forward paths and loops in the system and their corresponding gains. That is, Forward path Gain M1 = G1G2G3 R − E − Y3 − Y2 − Y1 − Y M2 = G1G4 R − E − Y3 − Y2 − Y The four loops of the SFG are shown in Fig. 4-28. The loop gains are Loop Gain y2 − y3 − y2 L11 = −G1G2H1 y4 − y5 − y4 L21 = −G2G3H2 L31 = −G1G2G3 y2 − y3 − y4 − y5 − y2 y6 − y7 − y6 L41 = −G1G4 Note that all loops touch. Hence, the closed-loop transfer function of the system is obtained by applying Eq. (4-54) to either the block diagram or the SFG in Fig. 4-27. That is, Y(s) = G1G2G3 + G1G4 (4-76) where R(s) ∆ ∆ = 1+ G1G2H1 + G2G3H2 + G1G2G3 + G4H2 + G1G4 (4-77) Similarly, E(s ) = 1 + G1G2 H1 + G2G3 H 2 + G4 H2 (4-78) R(s ) ∆ (4-79) Y(s ) = 1 + G1G2G3 + G1G4 G4 H E(s ) G1G2 H1 + G2G3H2 + 2 The last expression is obtained using Eq. (4-74).  ▲ 4-2-5  Simplified Gain Formula From Example 4-2-7, we can see that all loops and forward paths are touching in this case. As a general rule, if there are no nontouching loops and forward paths t(hee.gn.,Eyq2.−(4y-35−4)yt2aakneds ys4iminplEexralmoopkl,ea4s-s2h-3o)winn the block diagram or SFG of the system, y 4fa−r next. a ∑ M = yout = Forward Path Gains (4-80) yin 1− Loop Gains

4-2  Signal-Flow Graphs    191 EXAMPLE 4-2-8 For Example 4-2-5, where there are nontouching loops, as seen in Fig. 4-33, the simplified gain formula can be used by eliminating the nontouching loops after some block diagram manipulations. The two forward paths between y1 and y7 and the forward-path gains are now Forward path Gain M1 = G1G2G6G4G7 y1 − y2 − y3 − y4 − y5 − y6 − y7 M2 = G1G5G7 y1 − y2 − y3 − y6 − y7 The two touching loops of the SFG are shown in Fig. 4-33. The loop gains are Loop Gain y2 − y3 − y2 L11 = −G1H1 y2 − y3 − y4 − y5 − y2 L21 = −G1G2G6H3 Note in this case G6 = 1+ G3 and G7 = 1 (4-81) G3H2 1+ H4 G5 y1 y2 G1 y3 G2 y4 G6 y5 ++ y6 G7 y7 +– – G4 + H1 H3 (a) y1 y2 y3 y4 y5 y6 y7 (b) 1 G5 y1 G1 G2 G6 G4 G7 y2 y3 y4 y5 y6 y7 –H1 –H3 (c) Figure 4-33  (a) Modified block diagram of the control system in Fig. 4-32 to eliminate the nontouching loops. (b) Signal nodes representing the variables. (c) Equivalent signal-flow graph.

192   Chapter 4.  Block Diagrams and Signal-Flow Graphs Hence, ∆ = 1+ G1H1 + G3H2 + G1G2G3H3 + H4 As a result, + G1G3H1H2 + G1H1H4 + G3H2H4 + G1G2G3H3H4 + G1G3H1H2H4 (4-82) Y(s) = G1G2G3 + G1G4 (4-83 R(s) ∆ ▲ 4-3  STATE DIAGRAM In this section, we introduce the state diagram, which is an extension of the SFG to por- tray state equations and differential equations. A state diagram is constructed following all the rules of the SFG using the Laplace-transformed state equations. The basic ele- ments of a state diagram are similar to the conventional SFG, except for the integration operation. Let the variables x1(t) and x2(t) be related by the first-order differentiation: dx1 (t ) = x 2 (t ) (4-84) dt Integrating both sides of the last equation with respect to t from the initial time t0, we get ∫ t (τ ) + x1(t0 ) (4-85) x1(t) = t0 x2 dτ Because the SFG algebra does not handle integration in the time domain, we must take the Laplace transform on both sides of Eq. (4-85). We have (s )  t (τ  x1(t0 ) X2(s)  t0 )  x1(t0 ) (4-86)  t0  s s  0  s ∫ ∫ X1 =  x2 ) dτ + = − x 2 (τ dτ + tion Because the past history of the integrator is represented Ebyq.x(14(t-08)6, )anbdectohme esstate transi- is assumed to start at τ = t0, x2(τ) = 0 for 0 < τ < t0. Thus, X1(s) = X2(s) + x1(t0 ) τ ≥ t0 (4-87) s s Equation (4-83) is now algebraic and can be represented by an SFG, as shown in Fig. 4-34, where the output of s−1 times the input, plus the x1(t0)/s. An alternative SFG the integrator is equal to Eq. (4-87) is shown in Fig. initial condition with fewer elements for 4-35. X1(t0) 1 1 s–1 Figure 4-34  Signal-flow graph representation of X2(s) X1(s) X1(s) =[X2(s)/s]+[x1(t0 )/s] .

4-3  State Diagram    193 x1(st0) 1 s–1 Figure 4-35  San alternative signal-flow graph representation of X2(s) X1(s) X1(s) =[X2(s)/s]+[x1(t0 )/s] . 4-3-1  From Differential Equations to State Diagrams When a linear system is described by a high-order differential equation, a state diagram can be constructed from these equations, although a direct approach is not always the most convenient. Consider the following differential equation: d n y(t ) + an d n−1 y(t ) +  + a2 dy(t ) + a1 y(t ) = r (t ) (4-88) dt n dt n−1 dt To construct a state diagram using this equation, we rearrange the equation as d n y(t ) = −an d n−1 y(t ) −  − a2 dy(t ) − a1 y(t ) + r(t ) (4-89) dt n dt n−1 dt The process is highlighted next. 1. The nodes representing R(s),snY(s),sn−1Y(s),,sY(s), and Y(s) are arranged from left to right, as shown in Fig. 4-36a. 2. Because siY(s) corresponds to diy(t)/dti, i = 0, 1, 2, …, n, in the Laplace domain, the nodes in Fig. 4-36a are connected by branches to portray Eq. (4-85), resulting in Fig. 4-36b. 3. Finally, the integrator branches with gains of s−1 are inserted, and the initial condi- tions are added to the outputs of the integrators, according to the basic scheme in Fig. 4-35. The complete state diagram is drawn as shown in Fig. 4-36c. The outputs of aorfestdaetfeinveadriaabs ltehseosntacteetvhaersiatabtleesd, ixa1g,rxa2m, …is,dxrna. wThni.s is usually the The outputs of the integrators the integrators in the state diagram are usually natural choice defined as the state variable. When the differential equation has derivatives of the input on the right side, the problem of drawing the state diagram directly is not as straightforward as just illustrated. We will show that, in general, it is more convenient to obtain the transfer function from the differential equation first and then arrive at the state diagram through decomposition (Sec. 8-10). EXAMPLE 4-3-1 Consider the differential equation d2 y(t) + 3 dy(t) + 2 y(t) = r (t ) (4-90) dt 2 dt Equating the highest-ordered term of the last equation to the rest of the terms, we have d2 y(t) = −3 dy(t ) − 2 y(t)+ r(t) (4-91) dt 2 dt

194   Chapter 4.  Block Diagrams and Signal-Flow Graphs R snY sn–1Y sn–2Y sY Y sY Y (a) 1 sn–1Y sn–2Y R snY –an –an–1 –a2 –a1 (b) y(n–1s)(t0) y(n–2s)(t0) y(1)s(t0) y(st0) 11 1 1 1 1 s–1 s–1 s–1 Y x1 R snY –an sn–1Y sn–2Y sY Y xn xn–1 x2 –an–1 –a2 –a1 (c) Figure 4-36  State-diagram representation of the differential equation of Eq. (4-89). Following the procedure just outlined, the state diagram of the system is drawn as shown in Fig. 4-37. The state variables x1 and x2 are assigned as shown.  ▲ 4-3-2  From State Diagrams to Transfer Functions The transfer function between an input and an output is obtained from the state diagram by using the gain formula and setting all other inputs and initial states to zero. The following example shows how the transfer function is obtained directly from a state diagram. y(1s)(t0) y(st0) 1 1 1 s–1 x2 x1 1 Y R s2Y sY Y –3 –2 Figure 4-37  State diagram for Eq. (4-89).

4-3  State Diagram    195 EXAMPLE 4-3-2 Consider the state diagram of Fig. 4-37. The transfer function between R(s) and Y(s) is obtained by applying the gain formula between these two nodes and setting the initial states to zero. We have Y(s) = s2 + 1 + 2 (4-92) R(s) 3s  ▲ 4-3-3  From State Diagrams to State and Output Equations The state equations and the output equations can be obtained directly from the state dia- gram by using the SFG gain formula. The general form of a state equation and the output equation for a linear system is described in Chap. 3 and presented here. State equation: dx(t ) = ax(t ) + br (t ) (4-93) dt Output equation: y(t) = cx(t)+ dr(t) (4-94) where x(t) is the state variable; r(t) is the input; y(t) is the output; and a, b, c, and d are con- stant coefficients. Based on the general form of the state and output equations, the following procedure of deriving the state and output equations from the state diagram are outlined: 1. Delete the initial states and the integrator branches with gains s−1 from the state diagram, since the state and output equations do not contain the Laplace operator s or the initial states. 2. For the state equations, regard the nodes that represent the derivatives of the state variables as output nodes, since these variables appear on the left-hand side of the state equations. The output y(t) in the output equation is naturally an output node variable. 3. Regard the state variables and the inputs as input variables on the state diagram, since these variables are found on the right-hand side of the state and output equations. 4. Apply the SFG gain formula to the state diagram. EXAMPLE 4-3-3 Figure 4-38 shows the state diagram of Fig. 4-37 with the integrator branches and the initial states ealnimd ainpaptleydin. gUtshineggdaixn1(fto)/rdmt ualnadbdetxw2(et)e/ndtthaesstehneooduetsp,utthenostdaetse aenqduaxt1i(otn),sxa2r(et)o, batnadinre(dt)aass input nodes, dx1(t ) = x 2 (t ) (4-95) dt dx 2 (t ) = −2 x1 (t ) − 3x 2 (t ) + r(t ) (4-96) dt the Applying the gain formula with x1(t), x2(t), and r(t) as input nodes and y(t) as the output node, output equation is written as y(t) = x1(t) (4-97)

196   Chapter 4.  Block Diagrams and Signal-Flow Graphs 1 1 y r x.2 –3 xx.21 x1 –2 Figure 4-38  State diagram of Fig. 4-37 with the initial states and the integrator branches left out. Note that for the complete state diagram, shown AinpFpilgy.in4g-3t7hewgitahint0foasrmthuelaintiotitahl etismtaet.eTdhieagoruatmpuitns of the integrators are assigned as state variables. Fig. 4-37, with X1(s) and X2(s) as output nodes and x1(t0), x2(t0), and R(s) as input nodes, we have X1(s) = s−1(1 + 3s−1 ) x1(t0 )+ s −2 x 2 (t0 )+ s −2 R(s) (4-98) ∆ ∆ ∆ X2(s) = −2s −2 x1(t0 )+ s −1 x 2 (t0 )+ s −1 R(s) (4-99) where ∆ ∆ ∆ ∆ = 1+ 3s−1 + 2s−2 (4-100) After simplification, Eqs. (4-98) and (4-99) are presented in vector-matrix form:  X1(s)  = 1 s+3 1   x1(t0 )  + 1 1  R(s) (4-101)  X2(s)   −2 s   x2(t0 )   s    (s + 1)(s + 2)     (s + 1)(s + 2)   Note that Eq. (4-100) may also be obtained by taking the Laplace transform of Eqs. (4-95) and (4-96). For zero initial conditions, and since Y(s) = X1(s), the output-input transfer function is Y(s) = s2 + 1 + 2 (4-102) which is the same as Eq. (4-88).  ▲ R(s) 3s EXAMPLE 4-3-4 As another example on the determination of the state equations from the state diagram, consider the state diagram shown in Fig. 4-39a. This example will also emphasize the importance of applying the gain formula. Figure 4-39b shows the state diagram with the initial states and the integrator branches deleted. Notice that, in this case, the state diagram in Fig. 4-39b still contains a loop. By applying the gain formula to the state diagram in Fig. t4h-e39sbtawteitehquxa1t(ito)n, xs 2a(rte),oabntadinxe3d(t ) as output-node variables and r(t), x1(t), x2(t), and x3(t) as input nodes, as follows in vector-matrix form:  dx1 (t )   dt     0 1 0   x1 (t )   0   dx 2 (t )   −(a2 + a3 ) −a1 1 − a0a2   x 2 (t )   0  dt  =  1 + a0a3 0 1 + a0a3   x 3 (t )  +  1  r(t ) (4-103)          dx 3 (t )   0 0      dt    The output equation is y(t ) = 1 + 1 x1(t ) + 1 a0 x 3 (t ) (4-104) a0a3 + a0a3  ▲

4-4  Case Studies    197 a0 x3(st0) x2(st0) x1(st0) 1 1 s–1 x1.1 s–1 1 11 1 s–1 1 1 yy r x.3 x3 x.2 –a1 x2 x1 –a2 –a3 (a) a0 1 1 1 x1 1 11 r x.3 x3 x.2 –a1 x2 x1 yy –a2 –a3 (b) Figure 4-39  (a) State diagram. (b) State diagram in part (a) with all initial states and integrators left out. 4-4  CASE STUDIES EXAMPLE 4-4-1 Consider the mass-spring-damper system shown in Fig. 4-40a. The linear motion concerned is in the horizontal direction. The free-body diagram of the system is shown in Fig. 4-40b. Following the procedure outlined in Sec. 2-1-1, the equation of motion may be written into an input-output form as y(t ) + B y(t ) + K y(t) = 1 f (t) (4-105) M M M y(t) y(t) f(t) K Ky(t) M f(t) B dy(t) M dt (b) B (a) Figure 4-40  (a) Mass-spring-friction system. (b) Free-body diagram.

198   Chapter 4.  Block Diagrams and Signal-Flow Graphs where y(t) is the output, f (t) is considered the input, and y (t ) =  dy(t ) and y(t ) =  d 2 y(t )  repre- M dt  dt 2  sent velocity and acceleration, respectively. For zero initial conditions, the transfer function between Y(s) and F(s) is obtained by taking the Laplace transform on both sides of Eq. (4-105): Y (s ) s2 + B s + K  = F(s) (4-106) Hence, M M M Y(s) = Ms 2 1 + K (4-107) F(s) + Bs The same result is obtained by applying the gain formula to the block diagram, which is shown in Fig. 4-41. Equation (4-105) may also be represented in the space state form x(t) = Ax(t)+ Bu(t) (4-107) where  x1 (t )  (4-108) x(t) =  x 2 (t )  and   The output equation is u(t) = f (t) (4-109) M y(t) = x1(t) (4-110) So Eq. (4-107) is rewritten as  x1   0 1   x1  f (t) (4-111)  x2     x2 +   =  − K − B    M  M M  The state Eq. (4-111) may also be written as a set of first-order differential equations: dx1(t ) = x 2 (t ) dt dx2(t) = − 1 (4-112) dt K x1(t) − B x2(t) + M f (t) M M y(t) = x1(t) F(s) 1 1 1 Y(s) –– M s s B K Figure 4-41  Block diagram representation of mass-spring-damper system of Eq. (4-106).

4-4  Case Studies    199 For zero initial conditions, the transfer function between Y(s) and F(s) is obtained by taking the Laplace transform on both sides of Eq. (4-112): sX1(s) = X2(s) sX 2 (s ) = − B X2 (s) − K X1 (s ) + 1 F(s) (4-113) resulting in M M M Y(s) = X1(s) Y(s) = Ms 2 1 + K (4-114) F(s) + Bs The block diagram associated with Eq. (4-113) is shown in Fig. 4-42. Note that this block dia- gram may also be obtained directly from the block diagram in Fig. 4-41 by factoring out the 1/M term. The transfer function in Eq. (4-114) may also be obtained by applying the gain formula to the block diagram in Fig. 4-42. For nonzero initial conditions, Eq. (4-112) has a different Laplace transform representation that may be written as sX1(s) − x1(0) = X2(s) sX 2 (s ) − x 2 (0) = − B X2 (s) − K X1 (s ) + 1 F(s) (4-115) M M M Y(s) = X1(s) The corresponding SFG representation for Eq. (4-115) is shown in in Fig. 4-43. F(s) 1 –– 1 X2(s) 1 Y(s) = X1(s) M s s B M K M Figure 4-42  Block diagram representation of mass-spring-damper system of shown in Fig. 4-41. x2(st0) x1(st0) 1 1 1 s–1 s–1 1 M y = x1 f(t) x.2 –B/M y. = x2 y x.1 –K/M Figure 4-43  SFG representation of mass-spring-damper system of Eq. (4-115) with nonzero initial conditions x1(t0) and x2(t0).

200   Chapter 4.  Block Diagrams and Signal-Flow Graphs Upon simplifying Eq. (4-115) or by applying the gain formula to the SFG representations of the system, the output becomes Y (s) = Ms 2 1 + K F(s)+ Ms 2 Ms + K x1(t0 )+ Ms 2 M + K x2(t0 ) (4-116) + Bs + Bs + Bs Toolbox 4-4-1 ▲ Time domain step response for Eq. (4-114) is calculated using MATLAB for K = 1, M = 1, B = 1: K=1; M=1; B=1; t=0 : 0.02: 30; num = [1]; den = [M B K]; G = tf(num, den); y1 = step (G, t); plot(t, y1); xlabel(‘Time (Second)’) ; ylabel (‘Step Response’) title (‘Response of the system in Eq. (4-114) to step input’) The step response of the system in Eq. (4-114) is shown in Fig. 4-44. 1.4 1.2 1 Step Response 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 Time (Second) Figure 4-44  Time response of Eq. (4-114) for a unit step input.

4-4  Case Studies    201 EXAMPLE 4-4-2 Consider the system shown in Fig. 4-45a. Because the spring is deformed when it is subject to a force df (ita)g,rtawmosdoifspthlaecseymsteenmtsa, rye1 sahnodwyn2,inmFuisgt. be assigned to the end points of the spring. The free-body 4-45b. The force equations are f (t) = K[y1(t)− y2(t)] (4-117) − K[ y2 (t ) − y1(t )]− B dy 2 (t ) = M d 2 y2(t ) (4-118) dt dt 2 These equations are rearranged in input-output form as d 2 y2(t ) + B dy2(t) + K y2(t) = K y1 (t ) (4-119) dt 2 M dt M M For zero initial conditions, the transfer function between Y1(s) and F2(s) is obtained by taking the Laplace transform on both sides of Eq. (4-118): Y1(s) = Ms 2 K K (4-120) Y2 (s ) + Bs + For state representation, the equations may be rearranged as y1(t) = y2(t) + 1 f (t) (4-121) K d2 y2(t) dt 2 = − B dy 2 (t ) + K [y1(t) − y 2 (t )] M dt M The transfer function in Eq. (4-120) may also be obtained by applying the gain formula to the block diagram representation of the system, which is from Eq. (4-121) and is shown in Fig. 4-46. Note that in Fig. 4-46, F(s), FYo1r(sz)e, rXo1(ins)i,tiYal2(cso),nadnitdioXns2(,st)haerteraLnaspflearcfeutnrcatniosfnoromf Es qo.f(f4 (-t1)2, 1y)1(its),thxe1(ts)a,my2e(ta)s, and xo2f(Et)q, .r(e4sp-1e1c9ti)v.eBlyy. using the last two equations, the state variables are defined as x1(t ) (t ) and that ) = dy2(t)/dt, and t state equations are therefore written as = y2 x 2 (t dx1(t ) = x 2 (t ) dt dx 2 (t ) 1 dt =− B x2(t) + M f (t) (4-122) M y2(t) = x1(t) y2(t) y1(t) M f(t) BK (a) y2(t) y1(t) f(t) B dy2(t) M dt K[y2(t) – y1(t)] K (b) Figure 4-45  Mechanical system for Example 4-4-2. (a) Mass-spring-damper system. (b) Free-body diagram.

202   Chapter 4.  Block Diagrams and Signal-Flow Graphs 1K s–1 K M s–1 y2 = x2 f(t) y1 y2 –B/M y2 = x1 F(s) 1 Y1(s) K (a) –K/M 1 Y2(s) K + M –– 1 s 1 s B M K M (b) Figure 4-46  Mass-spring-damper system of Eq. (4-121). (a) The signal-flow graph representation. (b) Block diagram representation. EXAMPLE 4-4-3 Figure 4-47a shows the diagram of a motor coupled to an inertial load through a shaft with a spring constant K. A nonrigid coupling between two mechanical components in a control system often causes torsional resonances that can be transmitted to all parts of the system. The system variables and parameters are defined as follows: Tm(t) = motor torque Bm = motor viscous-friction coefficient K = spring constant of the shaft θm(t) = motor displacement ωm(t) = motor velocity Tm K LOAD MOTOR (a) JL Jm, Bm θm θL Bmωm + K(θm – θL) K(θm – θL) LOAD K θL JL MOTOR Jm, Tm, θm Figure 4-47  (a) Motor-load system. (b) Free-body diagram. (b)

4-4  Case Studies    203 Jm = motor inertia θL(t) = load displacement ω L(t) = load velocity JL = load inertia The free-body diagrams of the system are shown in Fig. 4-47b. The torque equations of the sys- tem are d 2θm (t ) = − Bm dθm (t ) − K [θm(t) −θL(t)]+ 1 Tm (t ) (4-123) dt 2 Jm dt Jm Jm K[θm(t) −θL(t)]= JL d2θL (t) (4-124) dt 2 be thrIneethstiastceavsaer, itahbelessy.sCteamrecsohnotuaildnsbtehtraekeeennienrgcyo-nsstotrruacgteinelgetmheensttsatiendJmia, gJLr,aamndanKd. Thus, there should assigning the state variables so that a minimum number of the latter are incorporated. Equations (4-123) and (4-124) are rearranged as d 2θm (t ) = − Bm dθm (t ) − K [θm(t) −θL(t)]+ 1 Tm (t ) (4-125) dt 2 Jm dt Jm Jm d2θL (t) = K [θm(t)−θL(t)] (4-126) dt 2 JL The state variables in this case are defined as x1(t) = θm(t) −θL (t), x2(t) = dθL (t)/dt, and x3(t) = dθm(t)/dt. The state equations are dx1(t ) = x 3 (t ) − x 2 (t ) dt dx 2 (t ) dt = K x1 (t ) (4-127) JL dx 3 (t ) = − K x1(t) − Bm x 3 (t ) + 1 Tm (t ) dt Jm Jm Jm The SFG representation is shown in Fig. 4-48.  ▲ 1 1 s–1 –1 s–1 Jm s–1 Tm θm θm = x3 θL θL = x2 θm – θL θm – θL = x1 –Bm/Jm K/JL –K/Jm Figure 4-48  Rotational system of Eq. (4-123) signal-flow graph representation.

204   Chapter 4.  Block Diagrams and Signal-Flow Graphs EXAMPLE 4-4-4 Let us consider the RLC network shown in Fig. 4-49a. Using the voltage law e(t) = eR + eL + ec (4-128) where eR = voltage across the resistor R eL = voltage across the inductor L ec = voltage across the capacitor C Then e(t ) = +ec (t ) + Ri(t ) + L di(t ) (4-129) dt Taking a derivative of Eq. (4-129) with respect to time, and using the relation for current in C: C dec (t ) = i(t ) (4-130) dt RL + i(t) + e(t) C – ec(t) – (a) i(0) ec(0) ss 1 11 1 L s–1 C s–1 e(t) ii ec ec – R L – 1 L (b) E(s) 1 1 i(0) ec(0) Ec (s) L s s s + 1+ Cs –– R L 1 L (c) Figure 4-49  RLC network. (a) Electrical schematics. (b) Signal-flow graph representation. (c) Block diagram representation.

4-4  Case Studies    205 we get the equation of the RLC network as L d 2i(t ) + R di(t ) + i(t ) = de(t ) (4-131) dt 2 dt C dt A practical approach is to assign the current in the inductor L, i(t), and the voltage across the cdairpeacctiltyorreCla,teecd(tt)o, as the state variables. The reason for this choice is because the state variables are the energy-storage element of a system. The inductor stores kinetic energy, and the capacitor stores electric ppaosttehnitsitaol reyn(evrigay.thBeyinasitsiiaglnsitnagteis()t)anadndtheec(pt)reassensttaatendvafruitaubrleess,tawteeshoafvtehae complete description of the network. The state equations for the network in Fig. 4-49b are written by first equating the current in C and the voltage across L in terms of the state variables and the applied voltage e(t). In vector-matrix form, the equations of the system are expressed as  dec (t)  0 1   0   dt  −1   1  di(t )   C   ec (t)   L  e(t ) (4-132)   =  L −R   i(t )  +    dt       L   This format is also known as the state form if we set  x1 (t )  ec (t)  (4-133)  x 2 (t ) = i(t )      Then  0 1   0   −1   1  x1 = C  x1  +  L  e(t ) (4-134)  x2   L −R   x2         L The transfer functions of the system are obtained by applying the gain formula to the SFG or block diagram of the system in Fig. 4-49c when all the initial states are set to zero. Ec (s) = 1 + ( R (1/LC )s −2 )s −2 = 1 + 1 LCs 2 (4-135) E(s) /L)s−1 + (1/LC RCs + I(s) = 1 + (1/L )s −1 / LC )s −2 = 1 + Cs LCs 2 (4-136) E(s) (R/L)s−1 + (1 RCs + Toolbox 4-4-2 Time domain unit step responses using Eqs. (4-135) and (4-136) are shown using MATLAB for R = 1, L = 1, and C = 1: R=1; L=1; C=1; t=0 : 0.02 : 30 ; num1 = [1]; den1 = [L*C R*C 1]; num2 = [C 0]; den2 = [L*C R*C 1]; G1 = tf(num1, den1);

206   Chapter 4.  Block Diagrams and Signal-Flow Graphs G2 = tf(num2, den2); y1 = step(G1, t); y2 = step(G2, t); plot(t,y1); hold on plot (t, y2, ‘--’); xlabel(‘Time’) ylabel(‘Output’) Eq. The results are shown in Fig. 4-50 where unit step responses fo▲r ec (t ) and i(t ) are obtained from (4-135) and i(t) using Eq. (4-136) for R = 1, L = 1, and C = 1.  EXAMPLE 4-4-5 As another example of writing the state equations of an electric network, consider the network shown itTnhheeFcisugta.rtr4ee-ne5tq1suaoa. ftAitohcncesoiorndfditunhcgetontorestt,whio1e(rtkf)oaarrneegdooiib2n(ttga)i,ndaeirsdecubasyssswiiogrnnit,eindthgaesthvseotalvttoaeglvteaagraeicasrboalcsersso,tsahssetshcheaopiwnadnciuticontroF, riesgc(.atn4)-,d5at1nhade. currents in the capacitor in terms of the three state variables. The state equations are L1 di1(t ) = − R1i1 (t ) − ec (t ) + e(t ) (4-137) dt L2 di2 (t ) = − R2i2 (t ) + ec (t ) (4-138) dt C dec (t ) = i1 (t ) − i2 (t ) (4-139) dt In vector-matrix form, the state equations are written as  − R1 0 −1   L1 L1   x1  0 − R2 1    1   x2 L2 L2  x1      =   x2  +  L1  e(t ) (4-140)   −1 0  x3   0     C    0  x3   1       C  awstnahdteerEse,(sixs)1,sr=heois1pw(ten)c,tiixnv2eF=lyig,i2.a(r4te)-,5w1arnbi.tdtTexnh3ef=rtoeracm(nts)tf.heTerhsfetuansteicgtdnioiaanlg-sfrlabomewtwdeiaegnrIa1m(s)oafnthdeEn(se)t,wIo2(rsk),awnidthEo(us)t,tahnedinEitc(ias)l I1(s) = L2Cs 2 + R2Cs +1 (4-141) E(s) ∆ where I2(s) = 1 (4-142) E(s) ∆ Ec (s) = L2s + R2 (4-143) E(s) ∆ ∆ = L1L2Cs3 + (R1L2 + R2L1 )Cs2 + (L1 + L2 + R1R2C)s + R1 + R2 (4-144) The the unit step responses are shown in Fig. 4-52.

4-4  Case Studies    207 1.2 1 ec(t) 0.8 0.6 Output 0.4 0.2 i(t) 0 –0.2 5 10 15 20 25 30 0 Time (sec) Figure 4-50  RLC network time domain unit step responses for ec(t) using Eq. (4-135) and i(t) using Eq. (4-136) for R = 1, L = 1, and C = 1. + R1 L1 L2 i1(t) i2(t) e(t) R2 – + C –ec(t) (a) –1/C 1 s–1 1 s–1 1 s–1 L1 C ec L2 i2 e(t) i1 i1 ec –R1/L1 –R2/L2 i2 –1/L1 (b) Figure 4-51  Network of Example 4-4-5. (a) Electrical schematic. (b) SFG representation.

208   Chapter 4.  Block Diagrams and Signal-Flow Graphs 0.7 ec(t) 0.6 0.5 Output 0.4 i1(t) 0.3 0.2 i2(t) 0.1 0 0 5 10 15 20 25 30 Time Figure 4-52  Example 4-4-5 network time domain unit step responses for =i1(1t,)anudsinCg=E1q.. (4-141), i2(t) using Eq. (4-142) and ec(t) using Eq. (4-143) for R1 = 1, R2 = 1, L1 = 1, L2 Toolbox 4-4-3 Time domain unit step responses using Eqs. (4-141) to (4-143) are shown using MATLAB for R1 = 1, R2 = 1, L1 = 1, L2 = 1, and C = 1: R1=1; R2=1; L1=1; L2=1; C=1; t=0 : 0.02 : 30 ; num1 = [L2*C R2*C 1]; num2 = [1]; num3 = [L2 R2]; den = [L1*L2*C R1*L2*C+R2*L1*C L1+L2+R1*R2*C R1+R2]; G1 = tf(num1, den); G2 = tf(num2, den); G3 = tf(num3, den); y1 = step(G1, t); y2 = step(G2, t); y3 = step(G3, t); plot(t, y1); hold on plot(t, y2, ‘--’); hold on plot(t, y3, ‘-.’); xlabel(‘Time’) ylabel(‘Output’) ▲

4-5  MATLAB Tools    209 R(s) G1(s) G2(s) Y(s) R(s) (a) Y(s) R(s) Y(s) G1(s) + + – + G2(s) (b) G(s) H(s) (c) Figure 4-53  Basic block diagrams used for Example 4-3-1. 4-5  MATLAB TOOLS There is no specific software developed for this chapter. Although the MATLAB Controls Toolbox offers functions for finding the transfer functions from a given block diagram, it was felt that students may master this subject without referring to a computer. For simple operations, however, MATLAB may be used, as shown in the following example. EXAMPLE 4-5-1 Consider the following transfer functions, which correspond to the block diagrams shown in Fig. 4-53. G1(s) = s 1 , G2 (s) = s +1 , G(s) = 1 1) , H(s) = 10 (4-145) +1 s +2 s(s + Use MATLAB to find the transfer function Y(s)/R(s) for each case. The results are as follows. Toolbox 4-5-1 Case (a): Use MATLAB to find G1 ∗G2. Y(s) = s2 s +1 2 = (s 1 2) R(s) + 3s + + Approach 1 Approach 2 >> clear all >> clear all >> s = tf(‘s’); >> G1=tf([1],[1 1]) >> G1=1/(s+1) G1 = G1 = 1 1 ---- ----

210   Chapter 4.  Block Diagrams and Signal-Flow Graphs s + 1 s+1 >> G2=(s+1)/(s+2) >> G2=tf([1 1],[1 2]) G2 = G2 = s + 1 s+1 ----- ----- s + 2 s+2 >> YR=G1*G2 >> YR=G1*G2 YR = YR = s + 1 s+1 ------------- ------------- s^2 + 3 s + 2 s^2 + 3 s + 2 >> YR_simple=minreal(YR) >> YR_simple=minreal(YR) YR_simple= YR_simple= 1 1 ----- ----- s + 2 s+2 Use “minreal(YR)” for pole zero cancellation, if necessary. Alternatively use “YR=series(G1,G2)” instead of “YR=G1*G2”. Case (b): Use MATLAB to find G1 + G2. Y(s) = s2 2s + 3 2 = 2(s +1.5) R(s) + 3s + (s +1)(s + 2) Approach 1 Approach 2 >> clear all >> clear all >> s = tf(‘s’); >> G1=tf([1],[1 1]) >> G1=1/(s+1) Transfer function: Transfer function: 1 1 ----- ----- s + 1 s+1 >> G2=(s+1)/(s+2) >> G2=tf([1 1],[1 2]) Transfer function: Transfer function: s + 1 s+1 ----- ----- s + 2 s+2 >> YR=G1+G2 >> YR=G1+G2 Transfer function: Transfer function: s^2 + 3 s + 3 s^2 + 3 s + 3 ------------- ------------- s^2 + 3 s + 2 s^2 + 3 s + 2 >> YR=parallel(G1,G2) >> YR=parallel(G1,G2) Transfer function: Transfer function: s^2 + 3 s + 3 s^2 + 3 s + 3 ------------- ------------- s^2 + 3 s + 2 s^2 + 3 s + 2 Use “minreal(YR)” for pole zero cancellation, if necessary. Alternatively use “YR=parallel(G1,G2)” instead of “YR=G1+G2”. Use “zpk(YR)” to obtain the Use “zero(YR)” to obtain Use “pole(YR)” to obtain real zero/pole/Gain format: transfer function zeros: transfer function poles: >> zpk(YR) >> zero(YR) >> pole(YR) Zero/pole/gain: ans = ans = (s^2 + 3s + 3) --------------- -1.5000 + 0.8660i -2 (s+2) (s+1) -1.5000 - 0.8660i -1

4-6 Summary   211 Toolbox 4-5-2 G 1+ GH Case (c): Use MATLAB to find the closed-loop feedback function . Y(s) = s2 + 1 R(s) s +10 Approach 1 Approach 2 >> clear YR >> clear all >> s = tf(‘s’); >> G=tf([1],[1,1,0]) >> G=1/(s*(s+1)) Transfer function: Transfer function: 1 1 ------- ------- s^2 + s s^2 + s >> H=10 >> H=10 H = H= 10 10 >> YR=G/(1+G*H) >> YR=G/(1+G*H) Transfer function: Transfer function: s^2 + s s^2 + s --------------------------- --------------------------- s^4 + 2 s^3 + 11 s^2 + 10 s s^4 + 2 s^3 + 11 s^2 + 10 s >> YR_simple=minreal(YR) >> YR_simple=minreal(YR) Transfer function: Transfer function: 1 1 ------------ ------------ s^2 + s + 10 s^2 + s + 10 Use “minreal (YR)” for pole zero cancellation, if necessary. Alternatively use: Use “pole(YR)” to obtain transfer function poles: >> YR=feedback(G,H) >> pole(YR) Transfer function: ans = 1 -0.5000 + 3.1225i ------------ -0.5000 - 3.1225i s^2 + s + 10 ▲ 4-6 SUMMARY This chapter was devoted to the mathematical modeling of physical systems. Transfer functions, block diagrams, and signal-flow graphs were defined. The block diagram representation was shown to be a versatile method of portraying linear and nonlinear systems. A powerful method of representing the interrelationships between the signals of a linear system is the SFG. When applied properly, an SFG allows the derivation of the transfer functions between input and output variables of a linear system using the gain formula. A state diagram is an SFG that is applied to dynamic systems that are represented by differential equations. At the end of the chapter, various practical examples were given, which complete the modeling aspects of dynamic and control systems already studied in Chaps. 2 and 3. MATLAB was also used to calculate transfer functions and time responses of simple block diagram systems.

212   Chapter 4.  Block Diagrams and Signal-Flow Graphs REFERENCES Block Diagrams and Signal-Flow Graphs 1.  T. D. Graybeal, “Block Diagram Network Transformation,” Elec. Eng., Vol. 70, pp. 985–990 1951. 2.  S. J. Mason, “Feedback Theory—Some Properties of Signal Flow Graphs,” Proc. IRE, Vol. 41, No. 9, pp. 1144–1156, Sep. 1953. 3.  S. J. Mason, “Feedback Theory—Further Properties of Signal Flow Graphs,” Proc. IRE, Vol. 44, No. 7, pp. 920–926, July 1956. 4.  L. P. A. Robichaud, M. Boisvert, and J. Robert, Signal Flow Graphs and Applications, Prentice Hall, Englewood Cliffs, NJ, 1962. 5.  B. C. Kuo, Linear Networks and Systems, McGraw-Hill, New York, 1967. State-Variable Analysis of Electric Networks 6. B. C. Kuo, Linear Circuits and Systems, McGraw-Hill, New York, 1967. PROBLEMS PROBLEMS FOR SEC. 4-1 4-1.  Consider the block diagram shown in Fig. 4P-1. X– E Kp Y – s(s + p) KDs Figure 4P-1 Find: (a) The loop transfer function. (b) The forward path transfer function. (c) The error transfer function. (d) The feedback transfer function. (e) The closed loop transfer function. 4-2.  Reduce the block diagram shown in Fig. 4P-2 to unity feedback form and find the system characteristic equation. X+ 1 1 Y – (s + 2) s 1 (s + 1) Figure 4P-2


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook