Download as pdf
Download as pdf
You are on page 1of 25
SYSTEM MODELING IN THE TIME DOMAIN 2.1: What is a model? Why do we need one? = We use the term model to refer to a set of mathematical equations used to represent a physical system, relating the system's output ignal to its input signal. = A model is required in order to: 1, Understand system behavior (analysis). 2. Design a controller (synthesis) KEY POINT: It is necessary to understand how the system works naturally in order to know how to be able to change how it works using a feedback controller. = Developing a reasonable mathematical model is the most important part of the entire analysis. * Itis also often the most difficult, amounting to ~ 80 %-90 % of the effort in designing a controller. = There are two basic approaches to modeling: 1. Analytic system modeling—we focus on these methods. 2. Empirical system identification. (In practice, there is always an ‘empirical component to system modeling: * Itis important to realize that no model is ever exact! Inaccuracies arise because of 1. Unknown parameter values, or 2. Unmodeted dynamics (to make simpler model), * There is always a tradeotf between simplicity and accuracy: + Its often possible to improve the accuracy of a mathematical ‘model by increasing its complexity + Simpitication often means ignoring some inherent physical properties + eg. ignore nonlinearities in linear, lumped:-parameter models. «In general, i's desirable to start witha simplified model to get a "general fee." increasing complexity only ifthe controlled system does not meet performance requirements «+ Simpitications often ignore some high-frequency behaviors, hich requires that the controllers must operate with slower transient-response requirements in order to be robust KEY POINT: “All models are wrong, but some are useful” (George E. P. Box, statistician.) ay, EXAMPLE: Consider a 1.0, 2WV resistor. + Ohms Law (model says: v(t) =0)-R be ho * Apply 1. What happens? + 1 Act current is predicted to flow. + Power dissipated = V?/R = 1W. + Model should be accurate = Now apply 10V. +10 of current is predicted to flow. + Power dissipated = V"/R = 100W! > Mode! will no longer be accurate. > True behavior depends on input signal level—nonlinear. > Model is accurate only in certain range of input-signal values. = Ohm's law is definitely useful, but it is wrong" in the sense that it ‘applies only under certain conditions, and even then is an averaged version of what is truly happening at the microscopic scale. LT systems * This example shows that itis important to know the properties of your model, as well as the model itselt. 11 claimed that the resistor exhibited “nonlinear” behavior, In some sense, * In the next sections, we look at two critical properties of systems: + Whether the system is “linear” (or not), + Whether the system is “time invariant” (or not). ' This course teaches methods to control inear-time-invariant (LT!) systems. ' Again, none exist! But, many are “close enough” for the techniques developed here to work very well * Also, we'll look at ways of linearizing equations in Topic 2.7. System properties of linearity and time invariance TIME INVARIANT: The first system property that we look at is that of time invariance, A system is either time-varying or time-invariant, not both. A time-invariant system does not change its fundamental behavior over different periods of time. Its parameter values are constant = A time invariant system satisfies the property (for any x(1), r) x(t 1) y= 1) when x(1) + y(0). = We can test a system for this property using ideas from the figure. ne) xt) vit =) v2) A time-invariant system will have y2(#) = yi(¢ — r) for all xy(r) and + To test for time-invariance, we must * Input x, (2) to the system and measure the output >) f Input x2(0) = xi(1 ~ £) to the system and measure »2(1). # I y:@) = 1G — 2) forall possible delays + and signals x(x), then the system is time-invariant. EXAMPLE : For example, consider a square-law system y(+) = (x(¢) * Input x) to the system and measure (1): y(t) = (ad? *# Input x(t the system and measure yo(): yx) = (0) # But, m6) = mh 0), 80 920 = (lt — NF = = 0. + Since this relationship holds forall: and al (1), the square-iaw system is time-invariant EXAMPLE: Let us examine a “delay operator” (The delay operators a fundamental building-block of cigital-signal-processing systems and, digital control systems). ‘The output ofa delay is equal tothe input, but shifted a constant amount 2 seconds: y(t) =s(1— 2), 420. ‘Input 1(1) to the system and measure yy(0): y(t) = x(t — 2), ‘Input 23(1 to the system and measure y2(1): 361) = (t=), But, (1) = nt 0), 80 yal) = MF =) = r= 0). ‘= Since this relationship holds forall and all (1), the delay operator Is time-invariant EXAMPLE: Let us examine a ‘time compressor" whose output is equal to its input, but "squashed" in time:y() = x(kr) + Input 1 (1 tothe system and measure yy (1): (1) = s1(k0. ‘Input x:( to the system and measure y2(0): y(t) sxa(kt). = But nt) = (1), 80 nih — 2) A xilkt ke) = y(t), = Therefore, the compressor is time-varying. nO no 2 =40—0, nea LINea\ : The second property that we look at is linearity. = For linear systems, if x1(1) H+ yi(r) and x2(0) > y2(r), then AS) = Ax + Bx) > ys) = avi) + By), for any such x1(7), x21), & B. = We can test a system for this property using ideas from the figure. ye a si ste ve 2 ya) pow 2) 2 oa, TEST: To test for linearity, we must * Input x(¢) to the system and measure the output »1 (0). # Input x9(¢) to the system and measure y2(0). Input xs) = exit) + fxa(F) to the system and measure ys). salt) = ayy) + Byr(t) for all possible @ and fi values, and x(t) and x2(7), then the system is linear. EXAMPLE: Is the following system, described by the differential equation H(t) + ty) = x(), linear?! = Input x1 (2) and output is 9169: $1) +) = <6), = Input x2(0 and output is y2(1): $21) + 120) = 20), # Input xa(0) = ax (t) + Bratt) and measure yx(1). Salt) + ty) = al): but, xx(1) = axi(1) + fart), So = ax) + Ba) = 42) + O10) + BGO) + 12) $a) + ryt a = GO + Ay) + Cay + yA) By examining both sides of this equation, we realize that ys) = ayi() + Ayx(). Therefore, the system is linear. * Note, the “dot” decoration on a variable indicates a time derivative. That is, (6) = dy()/(), and 80 forth, EXAMPLE: Irying this on the square-law system, ® Input x,(¢) and output is y,(): y:() = (29)? # Input x2(0) and output is yo(r): y2(0) = (2(0))?. = Input x3(¢) = ax) (t) + Bx2(t) and measure y3(r). yalt) = G3)? = (axi(t) + prr()y = @(xy(1))? + 2apxy(aralt) + Pal)” Fala? + Party). # So, the square-law system is not linear (it is a nonlinear system). KEY POINT: If a system is LTI, then it has an impulse response. This entirely characterizes the system's dynamics. The Laplace transform of the impulse response is the transfer function. Working with the transfer function eliminates the need to mess around with trying to solve complicated differential equations. 29> SYN ATHES OF MECHANICA SYSIEMS (rans tatton: = We now begin to review some basic physics as a refresher to developing models of dynamic systems. = We'll focus on mechanical and electrical systems, but will mention some others too ‘Translational motion = Newton's second law, applied to translational motion, states: Dr ama = That is, the vector sum of forces = mass of object times inertial acceleration. = “Free-body diagrams” are a too! to apply this law. EXAMPLE: Cruise control model = Write the equations of motion for the speed and forward motion of a car assuming that the engine imparts a forward force of u(r) 1. Assume rotational inertia of wheels is negligible. 2. Assume that friction is proportional to car’s speed (viscous friction) Drama ar) u(t) — BEC) = mee) no ae “eo on, sO +250) = ff the variable or interest !s speed (v(t) = x(7)), not position, u@) = Notice that the differential equation has “output variables” on the left of "=", and “input variables” on the right IMPORTANT POINT: All of our models of dynamical systems will be differential equations involving the input (e.9., (7) and Its derivatives and the output (¢.g., »(r)) and its derivatives. No other signals (intermediate variables) are allowed in our solutions. EXAMPLE: Car suspension. Each wheel in a car suspension system has a tire, shock absorber and spring. Write the one-dimensional (vertical) equations of motion for the car body and wheel. 6a + Boa pow ky > = "Quarter-car mode!” feo TT reas Stace ro Inertial Reference = Free-body diagram: KO) —#O) bE) — 40D) 1 vo Be Kul) — PY KO) =O) BG) = 40D) = The force from the spring is proportional to its stretch. The force from the shock absorber is proportional to the rate-of-change of its stretch. Drama bY) — £0) + ke VO) — XO) — kw OD) — 1) = mm F(t) ks (x) — x) — BOO) — 4) = noii(r) = Re-arrange: kw kO+ 200 =H) + Sow = voy + xe mre b ; 50 + 26@ —2«) + How — xo =0 Implementation in Simulink = Simulink is a component of MATLAB that is very useful for simulating dynamic systems using a block-diagram approach. = Consider the cruise-control model, where we wish to control vehicle velocity: u(t) = To implement this model in Simulink, we re-write the equation to have only the highest derivative term on the left-hand-side ut) b v0), 0) + 20m) = 6a) = We wire up a diagram like: a-a 6 8 @- dO wb = o- 10 lor st] +> awe E oar = If the appropriate parameters are entered in the MATLAB workspace for m and b, then this will simulate the car's dynamics. Important components for mechanical-transiational systems: 1. Mass 2. Spring 7 F (8) = Ka) ~ 2) ‘3. Damper P (8) = bE) — 2) 3 of mechanical systems (rotational) = Newton's second law, applied to rotational motion, states: DM asa or ta = That is, the vector sum of moments = moment of inertia times angular acceleration. (“moment"="torque”) EXAMPLE: Satellites require attitude control so that sensors, antennas, etc., are properly pointed. Let's consider one axis of rotation. os moment FAD) +d, 80, Food = JO) Fd 5a) s Gas jot SSe2/et Note: Output of system 917) tegrates torques twice—“double-integrator plant.” EXAMPLE: A torsional pendulum is used, for example, in clocks enclosed in glass domes. A similar device is the read-write head on a hard-disk drive: | ‘ : “Springiness* of suspension wire DM =s60 Jt) = c(t) — BOG) — kA) ra) b k BO) + FOO + FAW = =F Implementation in Simulink = The same basic principle applies to implementing this system in Simulink as well, except now we have a second-derivative term. = No problem! Again, we re-write the equation to have only the highest derivative term on the left-hand-side I =O Fa — how = We wire up a diagram like: = If the appropriate parameters are entered in the MATLAB workspace for J, b, and k, then this will simulate the pendulum’s dynamics. Important components for mechanical rotational systems: 1. Inertia 2. Spring FN) = KO) — A) 3. Damper x(t) = b(t) — 6202) ‘Summary of Developing Models for Rigid Bodies: 1 Assign variables such as x(t) and 0(1) that are both necessary and sufficient to describe and arbitrary position of the object. Draw a free-body diagram of each component, and indicate alll forces acting on each body and the accelerations of the center of mass with respect to an inertial reference. Apply Newton's laws: 3) F = ma, 0M = Ja Combine the equations to eliminate internal forces. . The final form must be in terms of ONLY the input to the system and its derivatives, and the output of the system and its derivatives. = Kirchhoff's Law's: + Current Law (KCL): The algebraic sum of currents entering a node equals the algebraic sum of currents leaving the node. + Voltage Law (KVL): The algebraic sum of all voltages taken around a closed path in a circuit is zero. = "Node analysis” is a tool to apply these laws. (/.¢., select one node as reference (e.g., ground) and assume all other voltages are unknown. Write equations for the unknowns using KCL. KVL must be used for voltage sources.) EXAMPLE: Bridged-T circuit. G + Select reference = @: SKVL at: nf?) = 0) SOHO) m=O Cog eye PKCL ato: = ar en.) <0 ekot at: 29H" 4 cxeonq —on4D) =O bat) — volt) + RCH — 69D) =O bal) + R2C2a(D = 6) vo@) — lea) + R2C2@a) — bo) Ri fos) + R22 Gat) — 6 Re C1 a) + R2C2Ga@) — HyG))1 = 0 1 = os@) Loa) + R2C2 Galt) — BoD ba@)) a6 R2 (Wu) Ri (os) + R2C2Ga@) — 61 Ri RoC (6st) + RoC 1=0. (By REC C2) Ba) + (RIC2 + Ry) R2C2 + Ri R2Cy) Gal) + CR2) Oa) Bao) + CRO) CR RIC LCD) + (REC2 Ry RAC EXAMPLE: Op-amp circuit kee fe —F oi) eT L.. 1 = XO a) f * Bo) pot) — Rai (4) — oo) 0.0) gti) _ vee) ar 2 or ar Rado) 1a) ‘dr 1p, He to RiCb.) = — R26) — 11) er.) (as C — ov, we get an inverting amp! Important components for electrical systems: 1. Resistor v4 ; fo icy 2, Capacitor ve) oe 4. Voltage source vie) 0 1 5. Current source “Oho wo nay = 9 7.0) 6. Operational a(t) FAN i= 0 Amplifier toy Fools) a, DAY = Aglogle) — 029) aS Ay > so 2.6: Dynamics of electro-mechanical systems (etc) = These are systems that convert energy from electrical to mechanical. EXAMPLE: DC generator. = Assume generator is driven at constant speed. = Generator has field windings (input), and rotor/armature windings (outpur), ep) = Ry + 1 AO e/ (2) is input, f(r) is eutput we = Kp K depends on generator structure Kis o(ry/de = angular velocity ~ ost. # =tlux, proportional to iy (4). we) = Rg) + D4 Zyigted. ent) 1 np, (18 EBL. lO = rik 4.0) is input, ¢, (6) is output Tra pref a EXAMPLE: DC motor (servo-motor). Fee eee ee en * Indirectly generates translational motion. isl) Ra be aa.) eof a beh armature Toad = Mechanical resistance of load is translated into an electrical “resistance” called the back e.m.t. ret) = K@, as with generator. mealt) 8 r(0) = Kei) Ke = Combining these equations of motion, recall Newton: Dae JG) = el) = HHO = Ky ight) ~ Be) = Assume (FOR NOW ONLY) electrical response is faster than mechanical. L, ~0 bina Kk, (2 = nfo et) - nae) ra ye Keke) gay — Ke ey) + (b+) Oe = reat back e.mf. indistinguishable from friction! namics of heat flow/ dynamics of fluid flow. = These two subjects will not be covered here. Refer to texts on thermodynamics or fluid-dynamics. Transformers and gears * Ideally, both of these devices simply scale their input value. Me _ i2 Transformer : r Geass: + 2 System identification (SYS ID) = When we generate models of system dynamics, we are performing “system identifications” = When we use known properties from physics and knowledge of the system's structure (as we have done here) we are performing “white box system ID” «Ifthe system is very complex, or if the physics are not well understood, we need to use input/output data to generate a system model: “black-box system ID” 2.7: Linearization and analogous svstems, = We will study how to control linear systems. = Linear systems are rare = We can “linearize” a non-linear system—the controller designed for linearized model will work en the true nonlinear system (but not as wll as a controller designed directly for the non-linear system.) EXAMPLE: NONLINEAR rotational pendulum Moment of inertia: J Dom = 2800) F(t) — mal sin(OGyy a4), 24) 9 fee ; yoy 8 re tes Fanaa — + Ifmotion is “smath,’ sin ((#)) ~ OC) (9+ S00) = £2 near. T a preview of linearization. KEY POINT: We can convert any differential equation into a first order input wector, 1 vector differential equation: lif the system is linear, this will be of the form: =A¥4 Bn; Aand Bare constant matrices EXAMPLE: Torsional pendulum revisited (pg. 2-13) ede) 6 k Biqey + Fhe) + Focy or | 2 ]_fe@ walt) bay » k roy Bt) + Sx ate) + Say(e) =O [20 ]-Lin [28 ]+Le Jo = So. our model of the torsional pendulum is linear. EXAMPLE: Rotational pendulum revisited (py. 2-22) £ ay +t st _fow : ae 2 lf © —E sot) = Not linear because we cannot make a constant A matrix ‘Smail.signal linearization = Uses a Taylor-series expansion of the differential equation around some operating condition. (Equilibrium value whore So = 0 = Flam, tea))- etx =x tox x9 = operating state ug + du 49 = nominal control value. f= flxn). ‘= Taylor-serles expansion: ig +4 ~ Flay,uy) + AX + Bou plus higher-order terms ‘= Subtract out equilibrium (nominal) solution; ax = Adr + Bou, which is Iingar. This is exactly how we linearized the rotational pendulum before, with r) = (th =0. "For rotational pendulum, miH(e) + mel sin()) = eC) + COMPUTE: r(r) = mel sin(@(r)) + uC), + THEN: m8 (¢) = u(t), no mattor how largo (+) becomes! + Sometimes used in robotics and airplane flight cont, but very computationally intensive. Analogous systems ‘= The linearized ditferential equations of many very diferent physical systems appear identical ‘= One would suppose they behave in similar ways (dynamic response) ‘and can be controlled with similar controllers. Mechanical Translational | m.i(r) + bi (¢) + kx(t) = w(t) Mechanical Rotational | Jd(r) + 5A(r) + k(t) = er) Satellite JA) = fry d DC Motor (for ZL, = 0) 10) + (0+ z Ht) 010) = eal Generator (Lal a(t) + (L (Ra t+ Re) + LaR yp éalt)+ Ry(Ra + Ry) = (eRe) = These are all of the form X(t) + ay k(t) + agx(t) = Ayii(t) + bye (r) + bou(ty which is called a second-order form. = Therefore, we have seen very specific examples of a very general class of system. If we learn how to control the general class, we can apply this knowledge to specific systems

You might also like