### Transcription

Copyright F.L. Lewis 1998All rights reservedUpdated: Monday, May 20, 2019Cut out version- no dynamics for ball balance and gantry craneSOME REPRESENTATIVE DYNAMICAL SYSTEMSWe discuss modeling of dynamical systems. Several interesting systems are discussedthat are representative of different classes of dynamics.Modeling Physical SystemsThe nonlinear state-space equation isx f ( x, u )y h ( x, u )with x(t ) R n the internal state, u (t ) R m the control input, and y (t ) R p themeasured output. If we can find a mathematical model of this form for a system, thencomputer simulation is very easy and feedback controller design is facilitated. To findthe state equations for a given system, several techniques can be used. In electroniccircuit analysis, for instance, KVL and KCL directly give the state-space form. Anequivalent technique based on flow conservation is used in the analysis of hydraulicsystems.For the analysis of mechanical systems we can use Hamilton's equations ofmotion or Lagrange's equation of motiond L L F,dt q qwith q (t ) the generalized position vector, q (t ) the generalized velocity vector, and F(t)the generalized force vector. The Lagrangian is L K-U, the kinetic energy minus thepotential energy.The linear state-space equations are given byx Ax Buy Cx Du1

where A is the system or plant matrix, B is the control input matrix, C is the output ormeasurement matrix, and D is the direct feed matrix. This linear form is very convenientfor the design of feedback control systems.The linear state-space form is obtained directly from a physical analysis if thesystem is inherently linear. If the system is nonlinear, then the state equations arenonlinear. In this case, an approximate linearized system description may be obtained bycomputing the Jacobian matrices h f f h., B ( x, u ) , C ( x, u ) , D ( x, u ) u x u xThese are evaluated at a nominal set point (x,u) to obtain constant system matricesA,B,C,D, yielding a linear time-invariant state description which is approximately validfor small excursions about the nominal point.A( x, u ) 2

INVERTED PENDULUMThe inverted pendulum on a cart is representative of a class of systems thatincludes stabilization of a rocket during launch, etc. The position of the cart is p, theangle of the rod is θ, the force input to the cart is f, the cart mass is M, the mass of thebob is m, and the length of the rod is L. The coordinates of the bob are (p2,z2).p2mgθfLz2MpInverted PendulumWe want to use Lagrange's equation. The kinetic energy of the cart is1K 1 Mp 2 .2The kinetic energy of the bob is1K 2 m( p 22 z 22 )2wherep 2 p L sin θ , z 2 L cosθso thatp 2 p Lθ cosθ , z 2 Lθ sin θ .Therefore, the total kinetic energy is11K K 1 K 2 Mp 2 m( p 2 2 p θ L cosθ L2θ 2 ) .22The potential energy is due to the bob and isU mgz 2 mgL cosθ .3

The Lagrangian isL K U 11( M m) p 2 mLp θ cosθ mL2θ 2 mgL cosθ .22The generalized coordinates are selected as q [q1 q 2 ] T [ p θ ] T so thatLagrange's equations ared L L fdt p p.d L L 0dt θ θSubstituting for L and performing the partial differentiation yields( M m) p mLθ cosθ mLθ 2 sin θ f.mL p cosθ mL2θ mgL sin θ 0Lagrange Equation FormDefine matrices and vectors to write this in the Lagrange equation form as M m mL cosθ p mLθ 2 sin θ f . mL cosθmL2 θ mgL sin θ This is a mechanical system in typical Lagrangian form, with the inertia matrixmultiplying the acceleration vector. The term mLθ 2 sin θ is a centripetal term andmgL sin θ is a gravity term.State-Space FormTo write these equations in state-space form, first invert the inertia matrix and simplify toobtainmg sin θ cosθ mLθ 2 sin θ f p m cos 2 θ ( M m). 2 sin θ cosθ f cosθθθ ( )sin MmgmLθ mL cos 2 θ ( M m) LTNow, the state may be defined as x [x x x x ] p p θ θ T and the input1234[as u f. Then the nonlinear state equation may be written as4]

x2 2 mg sin x3 cos x3 mLx 4 sin x3 u m cos 2 x3 ( M m) f ( x, u ) .x x4 2 ( M m) g sin x3 mLx 4 sin x3 cos x3 u cos x3 mL cos 2 x3 ( M m) LGiven this nonlinear state equation, it is very easy to simulate the inverted pendulumbehavior on a digital computer.We now want to linearize this and obtain the linear state equation. The nominalpoint is x 0, where the rod is upright. One could find Jacobians, but it is easier to usethe approximations, valid near the origin, sin x3 x3 , cos x3 1 . In addition, all squaredstate components are very small and so set equal to zero. This yields the linear stateequation x2 00 0 mgx u 0 1 mg3 1 0 00 MM x x M u Ax Bu . 00010x 1 4 ( M m) g000 () Mmgxu 3MLML ML The output equation depends on the measurements taken, which depends on thesensors available. Assuming measurements of cart position and rod angle, the outputequation is p 1 0 0 0 y x h ( x, u ) . θ 0 0 1 0 The cart position may be measured by placing an optical encoder on one of the wheels,and the rod angle by placing an encoder at the rod pivot point. It is difficult to measurethe velocities p ,θ , but this might be achieved by placing tachometers on a wheel and atthe rod pivot point. Then, the output equation will change.Given the linear state-space equations, a controller can be designed to keep therod upright. Though the controller is designed using the linear state equations, theperformance of the controller should be simulated in a closed-loop system using the fullnonlinear dynamics x f ( x, u ) .5

BALL BALANCERThe inverted pendulum can be viewed as a two-degrees-of-freedom robot armwith a prismatic (e.g. extensible) joint followed by a revolute (e.g. rotational) joint. It hasonly one actuator-- on the prismatic link. The ball balancing on a pivoted beam can beviewed as a robot arm with a revolute link followed by a prismatic link, also having onlyone actuator-- on the revolute link. This is in some sense a dual system to the invertedpendulum. The ball balancer is representative of a large class of systems in industrial andmilitary applications. The position of the ball is p, the angle of the beam is θ, the torqueinput to the beam is f, the inertia of the beam is J, and the mass of the ball is m.mpθgfJBall BalancerThe state may be selected as x [x1u f.x2x36[x4 ] pTp θ θ ]Tand the input as

GANTRY CRANEThe gantry crane is a load suspended by a wire rope from a moving trolley. Thehorizontal position of the load is p, the angle of the wire is θ, the force input to the trolleyis f, the mass of the trolley is M, and the mass of the load is m, and the length of the wirerope is L. Assume that the wire rope is stiff so that it does not flex or bend.The state may be selected as x [x1u f.x2x37[x4 ] pTp θ θ ]Tand the input as

MOTOR WITH COMPLIANT COUPLINGMotor drives with compliant coupling to a load occur throughout industrialapplications. Also in this class are flexible-joint robot arms, where the actuators arecoupled to the robot arm links through joint gearing which has some compliance.The mechanical equations are found to be of the formJ mθ m bmθ m b(θ m θ L ) k (θ m θ L ) k m i,J θ b(θ θ ) k (θ θ ) 0LLmLmLwhere subscript 'm' refers to the motor, subscript 'L' refers to the load, J is inertia, bm isthe rotor equivalent damping constant, km is the motor torque constant, and the armaturecurrent i functions as a control input to the mechanical subsystem. The coupling shafthas spring constant k and damping b. The electrical subsystem dynamics must also betaken into account. The dynamics for an armature-coupled DC motor are described byLi Ri k m 'θ m u ,with L the armature winding leakage inductance, R the armature resistance, km' the backemf constant, and control input u(t) the armature voltage. The system is linear.8

[Selecting the state as x [x1 x 2 x3 x 4 x5 ] i θ m ω m θ L ω Langular velocity, one may write the state equation as R km '00 0 1 L L L 0100 0 0 b k m k (b bm ) kx x u .Jm JmJmJm Jm 0 0 0 0001 k b kb 0 0 JJJJLLLL T]T, with ω θ theAssuming that the output of interest is the load angle, one has the output equationy [0 0 0 1 0]x Cx .Rigid Coupling ShaftAdding the two mechanical subsystem equations together yieldsJ mθ m J Lθ L bmθ m k m i .If the coupling shaft is rigid, then k ,θ L θ m . Thus, the mechanical subsystembecomes( J m J L )θ m bmθ m k m i .Defining the total moment of inertia as J J m J L and the state as x [i ω m ] T onenow has the state equation km ' R1LL x L u .x bm km0 J J9

The following simulation is taken from F.L. Lewis, Applied Optimal Control andEstimation, Prentice-Hall, New Jersey, 1992 (copyright held by F.L. Lewis)10

11

12

FLEXIBLE/VIBRATIONAL SYSTEMSMotor drives with compliant coupling include robotic systems which haveflexible joints. Another class of robotic systems are those which have flexible links, suchas lightweight arms for fast assembly. In this class are also included many large-scalesystems with vibrational modes.θrqfJruFlexible-Link Pointing SystemThe mechanical equations of a representative system with one link and oneflexible mode are found to be of the formJ rθ r brθ r b(θ r q f ) k (θ r q f ) k r u,J f q f b(θ r q f ) k (θ r q f ) 0where subscript 'r' refers to the rigid dynamics, and subscript 'f' refers to the flexiblemode. The rigid mode angle is θ r , the amplitude of the flexible mode is q f , and thetorque input to the link is u(t). Other variables are defined similarly to the case ofcompliant coupling just discussed. The system is linear. Electrical actuator dynamics areneglected here.[]TSelecting the state as x [x1 x 2 x3 x 4 ] θ r ω r q f q f T , with ω θ theangular velocity, one may write the state equation as100 0 0 bb ()bkk r kr JJrJrJr r x J r u Ax Bu .x 0001 0 b k k k 0 JfJ f Jf J fThis has the same form as the mechanical subsystem of the motor with compliantcoupling.13

The output of interest is the rigid rod angle, so that one has the output equationy [1 0 0 0]x Cx .If the rod angle and the mode amplitude are both measured, then the output equation is 1 0 0 0 y x Cx . 0 0 1 0 The mode amplitude may be measured using, for instance, a strain gauge mounted on thebeam.Analysis and simulation show that this system has significantly different behaviorthan the flexible-joint case just discussed. In some sense the systems are duals of eachother. Note that in the flexible-link case, the input and output are coupled to the sameposition/velocity state pair, while in the flexible-joint case they are coupled to differentposition/velocity pairs.Sample time plots of the motion of the flexible link system are in the figure.Shown are an acceleration/deceleration torque input, the link tip position and velocity,and the amplitudes of the first and second flexible modes.14

Comparison of Flexible-Joint and Flexible-Link SystemsThe motor with compliant coupling is an example of a so-called flexible-joint system.Flexible/vibrational systems are examples of the so-called flexible-link systems. Thesesystems have similarities but represent two different control design problems, as shownin the oint SystemFlexible-link System15

the state equations for a given system, several techniques can be used. In electronic circuit analysis, for instance, KVL and KCL directly give the state-space form. An equivalent technique based on flow conservation is used in the analysis of hydraulic systems. For the analysis