1. Introduction even be lucky and find a way to transform the problem of interest into one that is globally linear; we explain this later using again the pendulum as an example In many other cases, however, a genuinely nonlinear approach is needed, and much research effort during the past few years has been directed toward that goal. In this text, when we develop the basic definitions and results for the linear theory we will always do so with an eye toward extensions to nonlinear obal. results An Exercise As remarked earlier, proportional control (1. 3) by itself is inadequate for the original nonlinear model. Using again =8-T, the closed-loop equatio p(t)-sin(t)+ap(t)=0 (1.10) The next exercise claims that solutions of this equation typically will not ap proach zero, no matter how the feedback gain a is picked Exercise 1.2.1 Assume that a is any fixed real number, and consider the("en- ergy")function of two real variables COSa 1+(ax2+y2) (1.11) Show that V((t),p(t) is constant along the solutions of (1.10). Using that v(a, O)is an analytic function and therefore that its zero at z=0 is isolated conclude that there are initial conditions of the type P(0)=E,(0)=0, with e arbitrarily small, for which the corresponding solution of (1.10) does not satisfy that p(t)→0andp(t)→0ast→∝ 1. 3 Digital Control The actual physical implementation of (1.6)need not concern us here, but some remarks are in order. Assuming again that the values p(t)and p(t), or equiva- lently g(t)and 0(t), can be measured, it is necessary to take a linear combina- tion of these in order to determine the torque u(t) that the motor must apply Such combinations are readily carried out by circuits built out of devices called perational amplifiers. Alternatively, the damping term can be separately im- plemented directly through the use of an appropriate device(a"dashpot"), and he torque is then made proportional to p(t) A more modern alternative, attractive especially for larger systems, is to convert position and velocity to digital form and to use a computer to calcu- late the necessary controls. Still using the linearized inverted pendulum as an illustration, we now describe some of the mathematical problems that this leads
6 1. Introduction even be lucky and find a way to transform the problem of interest into one that is globally linear; we explain this later using again the pendulum as an example. In many other cases, however, a genuinely nonlinear approach is needed, and much research effort during the past few years has been directed toward that goal. In this text, when we develop the basic definitions and results for the linear theory we will always do so with an eye toward extensions to nonlinear, global, results. An Exercise As remarked earlier, proportional control (1.3) by itself is inadequate for the original nonlinear model. Using again ϕ = θ − π, the closed-loop equation becomes ϕ¨(t) − sin ϕ(t) + αϕ(t)=0 . (1.10) The next exercise claims that solutions of this equation typically will not approach zero, no matter how the feedback gain α is picked. Exercise 1.2.1 Assume that α is any fixed real number, and consider the (“energy”) function of two real variables V (x,y) := cos x − 1 + 1 2 (αx2 + y2). (1.11) Show that V (ϕ(t), ϕ˙(t)) is constant along the solutions of (1.10). Using that V (x, 0) is an analytic function and therefore that its zero at x = 0 is isolated, conclude that there are initial conditions of the type ϕ(0) = ε, ϕ˙(0) = 0, with ε arbitrarily small, for which the corresponding solution of (1.10) does not satisfy that ϕ(t) → 0 and ˙ϕ(t) → 0 as t → ∞. ✷ 1.3 Digital Control The actual physical implementation of (1.6) need not concern us here, but some remarks are in order. Assuming again that the values ϕ(t) and ˙ϕ(t), or equivalently θ(t) and ˙ θ(t), can be measured, it is necessary to take a linear combination of these in order to determine the torque u(t) that the motor must apply. Such combinations are readily carried out by circuits built out of devices called operational amplifiers. Alternatively, the damping term can be separately implemented directly through the use of an appropriate device (a “dashpot”), and the torque is then made proportional to ϕ(t). A more modern alternative, attractive especially for larger systems, is to convert position and velocity to digital form and to use a computer to calculate the necessary controls. Still using the linearized inverted pendulum as an illustration, we now describe some of the mathematical problems that this leads to
1.3. Digital Control A typical approach to computer control is based on the sample-and-hold technique, which can be described as follows. The values p(t)and (t)are measured only at discrete instants or sampling times The control law is updated by a program at each time t= ko on the basis of the sampled values (ko) and p(kd). The output of this program, a value Uk is then fed into the system as a control (held constant at that value) during the interval [ k6, k8 +d v4 a4+ Figure 1.3: Sampled control For simplicity we assume here that the computation of uk can be done quickly relative to the length o of the sampling intervals; otherwise, the model must be modified to account for the extra delay. To calculate the effect of applying the constant control u(t)≡ Uk if t∈[ko,k+6 (1.12) we solve the differential equation(1. 2)with this function u. By differentiation one can verify that the general solution is, for tE 6, ko+d p()=y(k60+5(0)+e-k6+(k6)-92(k6)+。-t+k6 vk,(1.13) (k6)+9(k6)+-k6-y(k6)- e-t+kd (1.14) hus, applying the constant control u gives rise to new values for p(k8 +8 and p(kd+d at the end of the interval via the formula (k6+6) p(k6+6) Buk
1.3. Digital Control 7 A typical approach to computer control is based on the sample-and-hold technique, which can be described as follows. The values ϕ(t) and ˙ϕ(t) are measured only at discrete instants or sampling times 0, δ, 2δ, 3δ,...,kδ,... The control law is updated by a program at each time t = kδ on the basis of the sampled values ϕ(kδ) and ˙ϕ(kδ). The output of this program, a value vk, is then fed into the system as a control (held constant at that value) during the interval [kδ,kδ + δ]. v v v v v 0 1 2 3 4 u(t) t u δ 2345 δδδδ Figure 1.3: Sampled control. For simplicity we assume here that the computation of vk can be done quickly relative to the length δ of the sampling intervals; otherwise, the model must be modified to account for the extra delay. To calculate the effect of applying the constant control u(t) ≡ vk if t ∈ [kδ,kδ + δ] (1.12) we solve the differential equation (1.2) with this function u. By differentiation one can verify that the general solution is, for t ∈ [kδ,kδ + δ], ϕ(t) = ϕ(kδ)+ ˙ϕ(kδ) + vk 2 et−kδ + ϕ(kδ) − ϕ˙(kδ) + vk 2 e−t+kδ − vk , (1.13) so ϕ˙(t) = ϕ(kδ)+ ˙ϕ(kδ) + vk 2 et−kδ − ϕ(kδ) − ϕ˙(kδ) + vk 2 e−t+kδ . (1.14) Thus, applying the constant control u gives rise to new values for ϕ(kδ +δ) and ϕ˙(kδ + δ) at the end of the interval via the formula ϕ(kδ + δ) ϕ˙(kδ + δ) = A ϕ(kδ) ϕ˙(kδ) + Bvk , (1.15)
coho sinh d A sinhs cosh (1.16) inh d In other words, if we let ao, Tl,... denote the sequence of two dimensional g2(k6 p(k6) then Ek satisfies the recursion (1.18) me now that we wish to program our computer to calculate the constant ol values vk to be applied during any interval via a linear transformation of the measured values of position and velocity at the start of the interval. Here F is just a row vector (1, f2) that gives the coefficients of a linear combination of these measured values. Formally we are in a situation analogous to the PD control(1.6), except that we now assume that the measurements are being made only at discrete times and that a constant control will be applied on each intervaL. Substituting(1. 19) into the difference equation(1. 18), there results the new difference equation k+1=(A+ BF). k nce for any Tk+2=(A+BF)2ck it follows that, if one finds gains f, and f2 with the property that the matrix A+ BF is nilpotent, that is (A+BF)2=0 then we would have a controller with the property that after two sampling steps necessarily Ik+2=0. That is, both y and c vanish after these two steps, and he system remains at rest after that. This is the objective that we wanted to achieve all along. We now show that this choice of gains is always possible Consider the characteristic polynomial det(2I-A-BF)= 22+(2 cosh8-f2 sinh -fi cosh+ f1)z f1 cosh+1+f1+f2 sinh 8 It follows from the Cayley-Hamilton Theorem that condition(1. 22) will hold provided that this polynomial reduces to just z. So we need to solve for th
8 1. Introduction where A = cosh δ sinh δ sinh δ cosh δ (1.16) and B = cosh δ − 1 sinh δ . (1.17) In other words, if we let x0,x1,... denote the sequence of two dimensional vectors xk := ϕ(kδ) ϕ˙(kδ) , then {xk} satisfies the recursion xk+1 = Axk + Bvk . (1.18) Assume now that we wish to program our computer to calculate the constant control values vk to be applied during any interval via a linear transformation vk := Fxk (1.19) of the measured values of position and velocity at the start of the interval. Here F is just a row vector (f1,f2) that gives the coefficients of a linear combination of these measured values. Formally we are in a situation analogous to the PD control (1.6), except that we now assume that the measurements are being made only at discrete times and that a constant control will be applied on each interval. Substituting (1.19) into the difference equation (1.18), there results the new difference equation xk+1 = (A + BF)xk . (1.20) Since for any k xk+2 = (A + BF) 2xk , (1.21) it follows that, if one finds gains f1 and f2 with the property that the matrix A + BF is nilpotent, that is, (A + BF) 2 = 0 , (1.22) then we would have a controller with the property that after two sampling steps necessarily xk+2 = 0. That is, both ϕ and ˙ϕ vanish after these two steps, and the system remains at rest after that. This is the objective that we wanted to achieve all along. We now show that this choice of gains is always possible. Consider the characteristic polynomial det(zI − A − BF) = z2 + (−2cosh δ − f2 sinh δ − f1 cosh δ + f1)z − f1 cosh δ +1+ f1 + f2 sinh δ . (1.23) It follows from the Cayley-Hamilton Theorem that condition (1.22) will hold provided that this polynomial reduces to just z2. So we need to solve for the