Nonlinear Systems Control Using a Subset Stabilization Approach Except where reference is made to the work of others, the work described in this dissertation is my own or was done in collaboration with my advisory committee. This dissertation does not include proprietary or classified information. Adam T. Simmons Certificate of Approval: Jitendra K. Tugnait Professor Department of Electrical and Computer Engineering A. Scottedward Hodel, Chair Associate Professor Department of Electrical and Computer Engineering John Y. Hung Associate Professor Department of Electrical and Computer Engineering Stephen L. McFarland Acting Dean Graduate School Nonlinear Systems Control Using a Subset Stabilization Approach Adam T. Simmons A Dissertation Submitted to the Graduate Faculty of Auburn University in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy Auburn, Alabama May 11, 2006 Nonlinear Systems Control Using a Subset Stabilization Approach Adam T. Simmons Permission is granted to Auburn University to make copies of this dissertation at its discretion, upon the request of individuals or institutions and at their expense. The author reserves all publication rights. Signature of Author Date of Graduation iii Vita Adam Terry Simmons was born March 10, 1978, the second child of D. Terry and Beth Simmons. In his hometown, Rome, Georgia, he attended St. Mary?s Catholic School through the third grade. From fourth grade until High School Graduation, he attended Pepperell Pub- lic Schools located in Lindale, Georgia. At Pepperell, Adam graduated with Honors and an Advanced Technical/Science degree. After graduating from High School, he attended his grandfather?s alma mater, Mercer University, a small Baptist University located in Macon Georgia. At Mercer he was a member of Phi Delta Theta, placed on the Freshman Advisory Board and given membership to several Honor Societies (i.e. Order of Omega, Phi Sigma Tau). After graduating from Mercer with a B.S. in Engineering, he worked in a small software firm for 6 months, after which he decided to attend Auburn University to continue his education. iv Dissertation Abstract Nonlinear Systems Control Using a Subset Stabilization Approach Adam T. Simmons Doctor of Philosophy, May 11, 2006 (M.S., Auburn University, 2003) (B.S., Mercer University, 2001) 95 Typed Pages Directed by A. Scottedward Hodel Numerous problems in nonlinear control systems are difficult or impossible to solve with commonly proposed methods of design. For such systems, we propose a two-loop control strat- egy that we call the subset stabilization approach (SSA), that combines the strengths of non- linear control design with the flexibility of robust control design. We present several control system examples for which standard control system techniques either fail or perform poorly with respect to regions of convergence. We then apply our proposed method to these systems and compare results. These simulation examples establish that the SSA method provides a relatively simple but powerful method for the design of nonlinear control systems. Further, these observations are bolstered by a theoretical analysis that establishes the principles upon with the success of the SSA is based. v Acknowledgments I must first give my thanks to Jesus Christ for all that He has done and will continue to do in my life. My undying gratitude and love go to my parents, Terry and Beth Simmons for their financial and emotional support throughout my life. Without their religious guidance and continuous love, I would not be the person I am today. I would like to thank my committee. They have been patient and helpful. I especially would like to thank Dr. A. Scottedward Hodel, my graduate advisor and mentor; his vast experience and knowledge, along with a truly devout religious character were instrumental in my completion of this research. His understanding over the past 5 years has been limitless and he has my profound gratitude. Dr. John Y. Hung also deserves my thanks due to his constant push for me to approach problems in unique ways, and this research would not have existed without the persistence of such a teacher, researcher and mentor. The completion of my degree would have been infinitely more difficult without the prayers, support and advice of my sister, Tracy, and her husband, Chris Small. Finally, good friends provided much needed prayers, encouragement and accountability, like Rob Daily, Matthew Hollimon, Kim Jackson, Joe Jacobs, Karen Miller, Jill Moore, Will & Kim Travis and others. This work was funded by a NASA Graduate Student Research Fellowship from NASA- NGT8-52904. vi Style manual or journal used Journal of Approximation Theory (together with the style known as ?aums?). Bibliograpy follows van Leunen?s A Handbook for Scholars. Computer software used The document preparation package TEX (specifically LATEX) together with the departmental style-file auphd.sty. vii Table of Contents List of Figures x 1 Introduction 1 2 Nonlinear Control 2 2.1 Lyapunov Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Input-Output Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Input-State Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.4 Integrator Backstepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3 Ball On Beam Example 20 3.1 Review of the Linear control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 Lyapunov Control Design Method . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Input-Output Linearization Method . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 Input-State Linearization Method . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.5 Underlying Issue: Poorly Defined Relative degree . . . . . . . . . . . . . . . . . . 26 3.6 Dynamic Analysis of the Ball On Beam System . . . . . . . . . . . . . . . . . . . 27 3.7 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4 New Subset Stabilization Approach (SSA) Control Design 33 4.1 Subset Stabilization Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Five Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.1 System 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.2.2 System 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.2.3 System 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2.4 System 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.2.5 System 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3 Theoretical analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5 Conclusions 55 5.1 Design Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2 SSA for Nonlinear Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6 Future Work 57 6.1 Experimental Validation of the Ball-on-beam Control Effort . . . . . . . . . . . . 57 6.1.1 Subset Stabilization Approach to [21] . . . . . . . . . . . . . . . . . . . . 59 6.1.2 Comparison of State Equations and Control Solution . . . . . . . . . . . . 61 6.2 Analytical Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 viii Bibliography 64 Appendices 66 A Five Systems Examples,Code: 67 B Code for Five System Phase Portrait 76 C Ball On Beam Example Code/Diagrams 79 C.1 Block Diagram For Ball-on-beam Model . . . . . . . . . . . . . . . . . . . . . . . 79 C.2 S-Function for Nonlinear Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 C.3 Feedback M File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 ix List of Figures 2.1 Inner loop of input-output linearizing control, and equivalent model . . . . . . . 8 2.2 Input-output relationship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3 Inner loop of input-state linearizing control, and equivalent model . . . . . . . . 11 2.4 Integrator Backstepping Example Block Diagram . . . . . . . . . . . . . . . . . . 17 2.5 Integrator Backstepping Example Block Diagram, Part 2 . . . . . . . . . . . . . . 18 3.1 Ball on Beam Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Comparison of a Modified System with the Original System . . . . . . . . . . . . 28 3.3 Block Diagram of Simplified ball-on-beam System . . . . . . . . . . . . . . . . . 28 3.4 Stability of x3 and x4 confirmed . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.5 x1 Response with nonlinear control, unl . . . . . . . . . . . . . . . . . . . . . . . 30 3.6 x3 and x4 Responses with nonlinear control, unl . . . . . . . . . . . . . . . . . . . 31 3.7 x1 Response with unl and u = ?Kx control inputs . . . . . . . . . . . . . . . . . 32 3.8 x1 Response with unl and Hauser?s control inputs . . . . . . . . . . . . . . . . . . 32 4.1 Example System 1: State responses to LQR feedback and SSA control . . . . . . 38 4.2 Example System 2: State responses to LQR feedback and SSA control . . . . . . 40 4.3 Example System 3: State responses to LQR feedback and SSA control . . . . . . 43 4.4 Example System 4: State responses to LQR feedback and SSA control . . . . . . 45 4.5 Example 5 (ball-on-beam control): State responses to LQR feedback and SSA control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.6 Subset Stabilization Approach Block Diagram . . . . . . . . . . . . . . . . . . . . 49 x 4.7 Subspace stabilized system phase portrait. The integer parameter n in equation (4.15) is varied from 0 (a) to 1 (b) to 2 (c). Observe that with increased values of n the phase portrait tends to more closely approach the null subset manifold x2 = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.8 Region of Convergence, Comparison of SSA-based control and LQR control ef- forts for System 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 6.1 Uran and Jezernik Ball on Beam Apparatus . . . . . . . . . . . . . . . . . . . . . 58 6.2 Uran and Jezernik System Simulation with SSA control Solution . . . . . . . . . 61 xi Chapter 1 Introduction All engineering disciplines model the dynamics of complex systems through mathematical equations. These models represent a system through a set of either linear or nonlinear dif- ferential equations. Linear models approximate simple dynamic characteristics and are widely used in undergraduate engineering classes. Conversely, nonlinear models approximate complex dynamic characteristics. In either representation, using the most accurate model of a system will provide the most complete understanding of that system; system understanding is the cornerstone of control systems engineering. Control of nonlinear systems has found increased usage within industrial electronics appli- cations such as robotics, electric motors, and power electronics. Some of the most well-known techniques include Lyapunov stability design [13], input-output linearization [11], input-state linearization [2], and integrator backstepping [1]. For some nonlinear models these techniques are either excessively difficult to apply or result in an infinite control effort at specific operating points, i.e. singularities. These techniques are further limited by structural model requirements. In this dissertation we present a brief overview of nonlinear control techniques, several example control systems, and a new approach to nonlinear systems control. In Chapter 2 four traditional nonlinear control techniques are reviewed: Lyapunov control design, input-output linearization, input-state Linearization, and integrator backstepping. A well-known example, the ball-on-beam system, is presented in Chapter 3. In Chapter 4, five other example systems are used to present a new two-loop control strategy that we call the subset stabilization approach (SSA). Finally, conclusions and future work are presented in Chapters 5 and 6, respectively. 1 Chapter 2 Nonlinear Control In this chapter we provide background related to nonlinear systems and nonlinear systems control. We present four common nonlinear control techniques: Lyapunov control design, input- output linearization, input-state linearization, and integrator backstepping. Nonlinear control techniques are typically used to achieve better closed loop system properties, e.g., region of stability, performance, robustness, etc., than that achievable through the use of linear control techniques. Linear control design techniques do not directly address the nonlinearities of a plant, and good performance is restricted to a region about the nominal design condition. Nonlinear techniques utilize more mathematical information about the modeled plant and, therefore, provide a control solution with a larger region of asymptotic stability. Our analysis will require the following definitions. Definition 1 We say that a point ?x ? IRn is an equilibrium point of the system ?x = f(x) if f(?x) = 0. Without loss of generality, we assume the equilibrium point ?x is at the origin. Definition 2 We say that ?x is a stable (attractive) equilibrium point for ?x = f(?x) if, for each small value of epsilon1 > 0 there is a ? = ?(epsilon1) > 0 such that ||?x|| < ? ? ||x(t)|| < epsilon1,?t ? 0. We can further say ?x is asymptotically stable if it is stable and the value of ? is chosen such that ||?x|| 0 in D?{0} and ?V(x) ? 0 in D Then ?x = 0 is a stable equilibrium point of the system ?x = f(x). Moreover, if ?V(x) < 0 in D?{0} then ?x = 0 is an asymptotically stable equilibrium point of ?x = f(x). 3 A proof of Theorem 1 is given in [6]. Consider the system ?x = f(x,u) where x represents the states and u is a control input and suppose it is desired to regulate the state x to a target value ?x. Lyapunov stability theory can be applied to the design of a control u = g(x) as follows. We select a candidate Lyapunov function,i.e., V(x) to be a scalar-valued positive definite function of the state vector x. A common choice is the total energy of the system state, e.g. V(x) = xTx. The derivative ?V(x) of V(x(t)) with respect to t is given by ?V(x) = (?xV)f(x,u) (2.1) or represented as a Lie Derivative ?V(x) = LfV Lyapunov-based control design involves the selection of a feedback control u = g(x) that will guarantee a negative definite time derivative (2.1) in a region containing the desired equilibrium point ?x. Example 1 Consider the system ?x1 = x1x2 +x22 ?x2 = x21 +u (2.2) We select the Lyapunov function V(x1,x2) = 12 parenleftbigx21 +x22parenrightbig which has the corresponding derivative with respect to time ?V(x1,x2, ?x1, ?x2) = x1 ?x1 +x2 ?x2 where ?x2 is a function of the control input u and the states x1 and x2. ?V(x1,x2,u) = 2x21x2 +x1x22 +x2u 4 We select the control input u to guarantee ?V(x1,x2) is negative definite, hence stable using Lyapunov?s definitions. One possible choice is u = ?2x21 ?x1x2 ?x21x2 ?x2 resulting in negative definite function ?V(x1,x2) = ?x21x22 ?x22. This gives a closed loop stable system using Lyapunov?s definition of stability, in the introduction of this chapter. 2.2 Input-Output Linearization Input-output linearization is a feedback control method where the result is a direct and simple relation between a system?s output and control input. Input-output linearization is used for time-delayed single input single output nonlinear system?s control [11]. Singh et al used input-output linearization to develop adaptive flight controls [17, 16] and more recently, input-output linearization is being used to develop state observers for nonlinear systems [5, 22]. Consider a nonlinear system ?x = f(x,u) (2.3a) y = h(x) (2.3b) Input-Output linearization attempts to linearize the input-output relationship 2.3a at the expense of producing nonlinear output functions. For example, consider a system described by ?x1 = x22 ?x2 = ?x1 +u y = x1 5 with an output y = x1. A change of variables z1 = x1, z2 = x22 and the selection of a feedback control u = x1 ? v2x2 yields closed loop dynamics ?z1 = z1 (2.4a) ?z2 = v (2.4b) y = ?z2 (2.4c) The state transformation from x to z produces linear state equations but the output mea- surement (2.4c) is now a nonlinear function of the state. As a result, traditional linear control approaches cannot be applied to this revised system. A generalized input-output linearization for single-input-single-output (SISO) systems is described below. Consider the SISO plant ?x = f(x) +g(x)u (2.5) y = h(x) (2.6) with state vector x? IRn, scalar input u, and scalar plant output y. Input-output linearization decomposes the inputuinto a nonlinear inner loop controlu(x,v) = ?(x)+?(x)v that creates a linear dynamic relationship between the outputyand a user defined inputv[6, 19]. Performance of the input-output linearized system is controlled by linear feedback system design methods applied to the new input v. The new linear model state variables are the output y of (2.6) and its derivatives diydti, i = 1,??? ,n?1. Because of this structure, input-output linearization is well suited for tracking control problems. 6 A general form of input-output linearization follows below. Differentiate the system output function (2.6) until the plant input u appears explicitly in the final differentiation. The general form for the ith time derivative of the output can be expressed using Lie derivative notation y(i) = L(i)f h+(LgL(i?1)f h)u (2.7) The ith time derivative of the output y does not have any explicit dependence on the plant input u for a system with relative degree r, where i 1.92 m. 30 0 10 20 30 40 50 60?4 ?2 0 2 4 6 8 time radians and rad/sec Initial Condition of 100 meters, with control ?nl angle,state x3 angular velocity,state x4 Max Angle = 0.4889pi Figure 3.6: x3 and x4 Responses with nonlinear control, unl 3.7 Concluding Remarks The ball-on-beam example system, discussed in this chapter, has a poorly defined relative degree. Well-known nonlinear methods fail when the relative degree is uncertain or changing. This problem was tackled by designing a nonlinear control component that directly addresses the state variables that affect the system?s relative degree and with the relative degree addressed, an outer loop linear controller became significantly more effective. With these observations, a new approach to nonlinear control design has been outlined. In the following chapter, five more examples will be discussed and used as catalyst in outlining this new control design approach. 31 0 1 2 3 4 5 6 7 8?0.4 ?0.2 0 0.2 0.4 0.6 0.8 1 1.2 Position with ?nl and ?=?Kx time meters ? ?nl Figure 3.7: x1 Response with unl and u = ?Kx control inputs 0 2 4 6 8 10 12 14?0.5 0 0.5 1 1.5 2 2.5 Ball Position, SSA and Hauser Compared time,s p,position (m) Hauser Control SSA Control Figure 3.8: x1 Response with unl and Hauser?s control inputs 32 Chapter 4 New Subset Stabilization Approach (SSA) Control Design In this chapter, five example systems will supplement the ball-on-beam example in the previous chapter. For the purposes of this dissertation, the approach used in the ball-on-beam example will be referred to as a Subset Stabilization Approach (SSA). This approach provided a control effort, designed through nonlinear and linear methods, that stabilized the ball-on-beam nonlinear plant well beyond standard linear techniques. Additionally, the new SSA control was able to provide a feasible control effort where traditional nonlinear control techniques could not. To take a more in depth look at SSA control within the aspects of nonlinear systems, we will examine five different nonlinear system examples. In each example, the traditional nonlinear approaches discussed in Chapter 2 fail to provide a feasible solution, or do not provide a stabilizing control effort. In each example system, a standard linear control technique will be applied and compared with the new SSA. 4.1 Subset Stabilization Approach The proposed SSA control combines the benefits of larger stability region offered by non- linear control design with the simplicity and design ease of the linear systems approach. The SSA was born out of two observations of many practical nonlinear problems: ? System nonlinearities are often a function of a subset of the full state vector. (Robotic systems are a notable exception to this observation, but rigid robot dynamics are well structured and can be controlled by all of the existing nonlinear methods.) ? In situations where existing nonlinear methods fail, a subset of the state variables con- tribute to structural problems that result in control singularity or loss of controllability. 33 The SSA nonlinear control approach reduces the effects of variables that contribute to either nonlinearities or structural problems. Steps in the SSA nonlinear design approach are: 1. Partition the state vector into two sets of variables x = ? ?? z w ? ?? where the variablesw are those contributing to the dominant nonlinearities of the system. In some systems certain variables trigger control singularity, or impact system structure; these variables would be included in the set of variables w. The system model can be expressed in the form ?z = A1z+A2w+B1u+f1(z,w,u) (4.1) ?w = A3z+A4w+B2u+f2(z,w,u) (4.2) Here Ai, i = 1,...,4 and Bj, j = 1,2 are linear matrices of appropriate dimension, and functions fk(z,w,u), k = 1,2| represent the nonlinearities of the system. 2. Choose a candidate Lyapunov function V(w), a positive definite function of the subset of variables w. 3. Design an inner loop control ulyp so that the time derivative ?V(w) is negative definite in w. 4. Apply the control u = ulyp + v to the system 4.1 to stabilize the w-dynamics, and to introduce a new input variable v for outer loop control. The partially stabilized system is less sensitive to the nonlinear terms fk(z,w,u) associated with w. 5. Design an outer loop control v using linear system methods to stabilizes either (1) the linearization of the uncompensated plant 4.1, or (2) a linearization of the plant with the 34 inner loop control ulyp. Past experience has been successful by applying linear quadratic regulator (LQR) methods with either technique. 6. The composite SSA control is given by u = ulyp +v = ulyp +uLQR (4.3) Local asymptotic stability is guaranteed by standard Lyapunov stability techniques and Linear techniques around an operating point. 4.2 Five Case Studies In this section, five example plants are studied to illustrate the challenges of standard nonlinear control methods and the utility of the SSA control design method. A comparison of the resulting state responses is presented for each example system. 4.2.1 System 1 Consider the system ?x1 = x2 +tanh(u) ?x2 = x1 +x22 +u (4.4) y = x1 A Lyapunov design based on a Lyapunov function V(x1,x2) = 12(x21 +x22) (4.5) 35 is examined first. The derivative of V is given by ?V(x1,x2,u) = 2x1x2 +x32 +x1 tanh(u) +x2u. Notice that the expression is not an affine function in u. Therefore, an input that yields a negative definite ?V is not determined easily and a stabilizing feedback control cannot be found in a straightforward manner by Lyapunov?s design method and using the Lyapunov function (4.5). Though tuning with trail and error using different Lyapunov functions could possibly improve these results. But, for this Chapter, Lyapunov?s design method will be standardized to include the energy like function (4.5). Next, consider the input-output linearization approach. The system 4.4 has relative degree r = 1, so the input u appears explicitly in the first derivative of the output y: ?y = ?x1 = x2 +tanh(u) Applying the nonlinear input u = arctanh(v?x2) yields a first-order linear input-output dynamic model ?y = v to which a linear design is easily determined and stabilizes the result. The nonlinear control u approaches infinity, however, near the condition |v ? x2| = 1, due to the domain of the hyperbolic arctangent, |v?x2| < 1. Therefore, the nonlinear solution is localized around the v?x2 = 0. For input-state linearization, a transformation must exist T(x) that will allow a linear relationship between the input and the states. For T(x) to exist, the ad field for (4.4) must 36 be full rank. Do to structure of the system,non-affine structure, input-state linearization is not a feasible solution for control. The system?s structure also prohibits the use of integrator backstepping due because it is not in strict feedback form. To design a SSA controller, the model (4.4) is first examined for nonlinear terms. The dominant state nonlinearity is the quadratic term x22 in second state equation. The presence of this term overwhelms any linear control law as x2 deviates from zero. Therefore, a nonlinear control can be designed to stabilize x2, and consequently reduce the effect of the nonlinear term x22. Heuristically, the plant with nonlinear inner loop control will behave more like a linearized model that can be used to design a stabilizing linear control law. Choose the Lyapunov function V(x2) = 12x22. Then ?V(x2) = x2 ?x2 = x1x2 +x32 +x2u Choose the inner loop control ulyp = ?x1 ?x22 ?x2 to guarantee stability of the variable x2. Apply the control ulyp +v to the original plant (4.4). The first term is the inner loop control, and the second term v is a new input for outer loop control. The resulting model is ?x1 = x2 +tanh(u) ?x2 = ?x2 +v 37 Where the outer loop control v is designed using LQR methods; the gains used are K =bracketleftbigg 0.3162 0.3162 bracketrightbigg 1. The SSA control is given by the following equations. u = ulyp ?Kx. A comparison of the state responses for LQR control and the SSA control is seen in Fig. 4.1. This response is seen on the edge of stability for the LQR gains. If the initial condition of Figure 4.1: Example System 1: State responses to LQR feedback and SSA control x2(0) is increased slightly, then the LQR gains do not provide a stable feedback control law. However, SSA control provides stability well beyond the initial condition, x2(0) ? 1.05. 1Operating point x = 0 and weights Q = I2?2,R = 10 38 4.2.2 System 2 The second case study examines the second-order plant modeled by ?x1 = x1 +x2 +x22 ?x2 = x1 +x22 +u (4.6) y = x1 Again, Lyapunov control design based on the Lyapunov function V(x) = 12(x21 +x22) yields a undesirable control law. u = ?x21x?12 ?2x1 ?x1x2 ?x22 The control law has a singularity at x2 = 0, so the plant input u goes to infinity as the state approaches the equilibrium point x = 0. This case study has a relative degree of n = 2, implying the input will explicitly appear in the second derivative of the output equation. The input-output linearizing control designed around System 2 yields the control law u = ?2x1 +x2 +2x 22 +2x1x2 +2x32 2x2 +1 which has a singularity atx2 = ?0.5, and is only locally valid around the operating point x = 0. For input-state linearization, the system is written as ?x = f(x) +g(x)u, where g(x) = ? ?? 0 1 ? ?? and f(x) = ? ?? x1 +x2 +x22 x1 +x22 ? ?? and the ad field [g(x) adfg] = ? ?? 0 ?1?2x2 1 ?2x2 ? ?? (4.7) 39 must have full rank for all values ofx1,2, orrank = 2: ?x ? IR2. Clearly, from (4.7), a state pair along the line (x1,x2) = (IR,?0.5) produces a low rank ad field (rank< 2). Therefore, system 2 does not satisfy a necessary and sufficient condition for the existence of a transformation matrix T(x) to exist. Finally, similar to System 1, System 2 does not have the correct structure to perform integrator backstepping control design. This leads to the use of a SSA control design. The SSA control design method will focus on the nonlinear function, x22. Following the example design process for System 1 yields the inner loop control ulyp = ?x1 ?x22 ?x2. The LQR gains are K = bracketleftbigg 4.1669 2.0714 bracketrightbigg , and the SSA control is given by u = ulyp +uLQR = ?x1 ?x22 ?x2 ?Kx (4.8) A comparison of the state responses for simple LQR control and the SSA control is seen in Fig. 4.2. As in System 1, Figure 4.1, the system?s state response is plotted on the edge of a Figure 4.2: Example System 2: State responses to LQR feedback and SSA control 40 stable state region (x1(0),x2(0)) = (0.125,0). If the LQR designed control were to be simulated past the shown initial condition, then it would become unstable, and the states would go to ?. The SSA control stabilizes System 2 beyond this initial condition and provides a faster settling time at the current initial condition (x1(0),x2(0)). 4.2.3 System 3 Consider the second-order plant model ?x1 = sin(x2) ?x2 = u (4.9) y = x1 which has an equilibrium point at the originx1(0),x2(0) = (0,0). Lyapunov-based design based on the Lyapunov function V(x1,x2) = 12(x21 +x22) yields the control u = ?x1 sin(x2)x 2 with a singularity along the state space line (x1,x2) = (IR,0) which contains the origin. This control is not a valid solution for control around the origin. Input-output linearization control design produces the control u = vcos(x 2) As with the Lyapunov control solution, this solution u has a singularity at the origin. For input-state linearization, the ad field for the plant (4.9) is given as bracketleftbigg g(x) adfg bracketrightbigg = ? ?? 0 ?cos(x2) 1 0 ? ?? (4.10) 41 The ad field (4.10) loses full rank when x2 satisfies cos(x2) = 0. As for backstepping, the plant model is in strict feedback form, so backstepping is a feasible approach, but produces a control with singularity under the condition 1?x21 = 0, or (x1,x2) = (1,IR). The SSA approach is now considered as a control solution design method. The plant nonlinearity is only a function of the variable x2, so the nonlinear aspect of the SSA control is designed to stabilize the state x2. The Lyapunov function V(x2) = 12x22 is chosen and yields a control ulyp = ?x2 The linear portion of SSA control is designed by LQR methods to yield state feedback gain K = bracketleftbigg 0.3162 0.3162 bracketrightbigg . The complete SSA control is totally linear in this case example: u = ulyp +uLQR = ?x2 ?Kx A comparison of state responses is in Fig. 4.3. The linear control fails to compensate for nonlinear effects of x2, as seen in a comparison of the SSA and linear responses in Figure 4.3. 4.2.4 System 4 Consider a third-order plant modeled by ?x1 = x2 ?x2 = x2 +sin(x3) (4.11) ?x3 = u y = x1 42 Figure 4.3: Example System 3: State responses to LQR feedback and SSA control Using the same Lyapunov energy functionV(x) = 12 parenleftbigx21 +x22 +x23parenrightbig, the Lyapunov-based design produces the control u = ?x1x2 +x 22 +x2 sin(x3) x3 The Lyapunov control is similar to the Lyapunov control in the previous three systems; the control produces a singularity along the plane (x1,x2,x3) = (IR,IR,0). System 3 has a relative degree of r = 3 and the input-output linearizing control design yields u = ?x2 +sin(x3)cos(x 3) Again, the input-output linearization standard design technique produce a control law with singularities along the plane (x1,x2,x3) = (IR,IR,0). Therefore, the equilibrium point is not stabilized with either Lyapunov or input-output linearization design. Similar to the earlier example systems, the ad field of the System 4 (4.11) is not full rank for specific conditions (sin(x3) = 0 which includes the origin). 43 For this example, the SSA control design method stabilizes the variablex3, included in most of the nonlinear aspects of System 4. An inner loop control that stabilizes x3 by Lyapunov?s control design method is given as ulyp = ?x3 and applying ulyp to the plant yields the new model. ?x1 = x2 ?x2 = x2 +sin(x3) ?x3 = ?x3 +v The optimized LQR gains that stabilize the response about the origin and minimize the LQR cost function with Q,R weights are given by K = bracketleftbigg 0.3162 4.9487 2.3162 bracketrightbigg . The SSA control?s final form is given by u = ?x3 ?Kx The responses of the three state variables are shown in Fig. 4.4 with the initial conditions (x1,x2,x3)o = (3.75,0,0). The SSA control approach is able to compensate for nonlinearities related tox3, as seen in Figure 4.4. The linear controlKLQR allows for must higher oscillations, and will eventually go unstable at higher initial conditions x1(0) > 3.75. 4.2.5 System 5 The ball-on-beam example was given in the previous chapter, Chapter 3. To better under- stand the improvements of the SSA control, a simplified version of the ball-on-beam dynamics 44 Figure 4.4: Example System 4: State responses to LQR feedback and SSA control are modeled by the following fourth order system ?x1 = x2 ?x2 = x1x24 +sin(x3) ?x3 = x4 (4.12) ?x4 = u y = x1 As in the previous chapter, the plant output y is the ball position along the beam and the beam angle is the state variable x3. Standard Lyapunov design based on V(x) = 12xTPx, with P = I4?4, yields the control law u = ?x1x2 +x1x2x 24 +x2 sin(x3) +x3x4 x4 45 with a singularity along the state space region (x1,x2,x3,x4) = (IR,IR,IR,0), including the origin. Input-output linearization yields the control law u = ?x4x2 +cos(x3)x 1 and, as in the Lyapunov designed control, the control u blow up at the origin, x4 = 0. Hauser et al. show the ball-on-beam problem cannot be controlled by input-state linearization because the necessary conditions for state transformation are not satisfied [4], and is verified in Section 3.4. Integrator backstepping is not a feasible control design approach because the model (4.12) is not in strict feedback form. It is obvious, sin(x3) and the x24 are the main nonlinear terms. Therefore, in SSA control, a nonlinear inner loop is designed to stabilize the variables x3 and x4. The Lyapunov function V(x3,x4) = 12(x23+x24) is used to design the SSA?s inner loop control ofx3 andx4. The resulting nonlinear inner loop control is given by ulyp = ?x4 ?x4x23 ?x3 Applying the inner loop control law u = ulyp +v to the plant yields ?x1 = x2 ?x2 = x1x24 +sin(x3) ?x3 = x4 ?x4 = ?x4 ?x4x23 ?x3 +v 46 and LQR gains are designed for the outer loop control variable v, with the equilibrium point as the origin. The final form of the SSA control is given by u = ulyp +v = ?x4 ?x4x23 ?x3 ?Kx A plot of the state variable responses is shown in Fig. 4.5. and the nonlinearities compensated Figure 4.5: Example 5 (ball-on-beam control): State responses to LQR feedback and SSA control for with SSA control are easily identified in the LQR state variable responses. As in Chapter 3, the SSA control approach allows for a larger stability region for LQR control designed, after an inner loop stabilization routine is applied to x3 and x4. 47 4.3 Theoretical analysis In this section we present an analysis of the subset stabilization approach for the control of a nonlinear system. This analysis builds upon observations made in Chapter 3 and Sections 4.2.1- 4.2.5 in which the SSA compares very favorably to other non hierarchical control approaches in a number of examples. We here bolster these anecdotal examples with theoretical observations that justify the use of the SSA under specific conditions. In particular, we establish that the SSA, in a simplistic sense, acts to decrease the impact of the system nonlinearities so that a robust control law designed about a given operating point may in fact extend its region of convergence in closed loop operation. While any robust control law design approach could be used, we here present our analysis in terms of the SSA as a companion to LQR control design. While the examples presented in the previous sections establish evidence of the utility of our SSA control design method, they do not address the question of why the SSA method occurs at all. We now present a theoretical analysis of the SSA method and provide another example to illustrate the method. Our analysis will use the following definitions. Definition 10 Suppose that there exists a control input u(z,w) such that, for the correspond- ing closed loop system ?z = A11z+A11w+f11(w)+f12(z,w) +f13(u(z,w)) ?w = A11z+A11w+f21(z) +f22(z,w)+f23(u(z,w)) there is a Lyapunov function on the state subset w; that is, there exists a function V(w) > 0 such that ddtV(w(t)) < 0 for the system in closed loop with u(z,w). Then we say that the open-loop system (4.13a)-(4.13b) satisfies the the subspace stabilizability condition. Definition 11 Consider a system S that satisfies the subset stabilizability condition. The null subset manifold of S is the set of points ? ?? z w ? ??? IRn+m where w = 0. 48 Now, consider a system in the general form ?z = A11z+A12w+f11(w) +f12(z,w)+f13(u) (4.13a) ?w = A21z+A22w+f21(z) +f22(z,w) +f23(u) (4.13b) the state vectors are z ? IRn and w ? IRm. The system is controlled by a SSA-based control design, as shown in Figure 4.6. Let Figure 4.6: Subset Stabilization Approach Block Diagram ulyp(z,w) = ?ulyp(z,w) +u2(wn1,...,wnm) be a Lyapunov designed control effort where ?ulyp(z,w) drives the system to the null subset manifold w = 0, n is an integer, and u2 is selected so that (1) an increase in n increases the rate of convergence of w to the null subset manifold, i.e., ?V(w,n + 1) ? ?V(w,n) for all n, and (2) ?wu2|w=0 = 0. We interpret the action of the SSA inner loop control law ulyp in a fashion similar to variable structure control, where state trajectories are often divided into a reaching phase and a manifold tracking phase. In the case of SSA control, the closed loop system may be considered to be in a reaching state when the system state is distant from the 49 null space manifold, which can be characterized either in terms of bardblwbardbl or in terms of the relative magnitudes of the inner loop control command ulyp and the outer loop control command ulqr. Given an appropriate choice of system states inw, once the state trajectory is ?near? to the null subset manifold, the effects of the system nonlinearities may be greatly reduced. This leads to two key observations regarding the success of SSA control in contrast to other control methods: 1. While effects of the nonlinearities in the underlying system may be reduced, they are not entirely canceled. This stands in contrast to both linear robust control, which describes linearities primarily in terms of norm bounds and the small gain theorem, and to nonlinear control, which uses a precise model of system nonlinearities in the selection of its control commands. 2. The use of an outer-loop robust control law is strengthened because a properly selected null subset manifold and SSA inner loop control law effectively limits the gain of undesirable nonlinearities that exist in the open-loop system. As a result, we may consider the SSA closed loop system to be in a ?reaching? phase while its states are outside of the region of convergence of the outer loop law, and consider the system to be in a ?surface tracking phase? when its states are in the region of convergence of the outer loop law. We illustrate these principles and the tuning of the integer parameter n in the auxiliary input u2 in the following example Example 6 SSA Bounded Subset Example Consider System 2 from Section 4.2.2 ?x1 = x1 +x2 +x22 (4.14a) ?x2 = x1 +x22 +u (4.14b) A subset of the state space x? IR2 is chosen x2 ? IR1 and is bounded with a Lyapunov control designed input ulyp. As in section 4.2.2, we use a Lyapunov function V(x2) = 12x22 to design a 50 nonlinear feedback control for the dynamics of the state x2. We define a set of parameterized subset stabilizing control inputs as u = ?x1 ?x22 ?x2 ?x2n+12 (4.15) where n is an integer that is used to adjust the ?gain? of the subspace stabilization control law u(z,w) for large values of x2. Phase portraits based on simulation results of the subset stabilized system are shown in Figure 4.7(a). 2 The null subset manifold x2 = 0 is easily seen as x2(t) ? 0 as t ? ?. An increase of the exponent integer parameter n in (4.15) will increase the control effort u for large deviations x2 from the desired null space manifold. By consequence, the impact of the nonlinearities involving x2 are decreased once the state trajectories come near to the null subset manifold. As seen in Figure 4.7(b) and Figure 4.7(c) the corresponding state trajectories lead the subset stabilized phase portraits to a smaller deviation from the null subspace manifold. The phase portraits clearly illustrate that only the state x2 is regulated by the SSA controller (4.15). We now examine the effects of the SSA control law in closed loop with the outer loop LQR controller (see figure 4.6. The region of convergence (ROC) refers to the a region of state space, ROC ? IR2, where the system ?x = f(x) converges to the origin as t ? ?. An increase in the ROC area is a valid quantitative method to compare the SSA controller in figure 4.6 and a traditional linear LQR control solution. The traditional linear control solution uses an LQR optimization and the weights Q and R (4.16). Q = ? ?? 1 0 0 1 ? ?? and R = 10 (4.16) The required linear model for the LQR optimization is based on a linearization of the nonlinear model (4.14a)-(4.14a) evaluated at the origin. The resulting control effort for LQR linear control 2a plot of the trajectory of x1(t) with respect to the trajectory of x2(t). 51 ?1.5 ?1 ?0.5 0 0.5 1 1.5 ?2 ?1.5 ?1 ?0.5 0 0.5 1 1.5 2 Phase Portrait, SSA with ulin = 0, ulyp = ?x1?x22?x2 x1 x 2 = initial condition [x1(0),x2(0)] (a) u = ?x1 ?x22 ?x2 ?1.5 ?1 ?0.5 0 0.5 1 1.5 ?2 ?1.5 ?1 ?0.5 0 0.5 1 1.5 2 Phase Portrait, SSA with ulin = 0, ulyp = ?x1?x22?x2?x23 x1 x 2 = initial condition [x1(0),x2(0)] (b) u = ?x1 ?x22 ?x2 ?x32 ?1.5 ?1 ?0.5 0 0.5 1 1.5 ?2 ?1.5 ?1 ?0.5 0 0.5 1 1.5 2 Phase Portrait, SSA with ulin = 0, ulyp = ?x1?x22?x2?x25 x1 x 2 = initial condition [x1(0),x2(0)] (c) u = ?x1 ?x22 ?x2 ?x52 Figure 4.7: Subspace stabilized system phase portrait. The integer parameter n in equation (4.15) is varied from 0 (a) to 1 (b) to 2 (c). Observe that with increased values of n the phase portrait tends to more closely approach the null subset manifold x2 = 0. 52 is a negative linear feedback with gain K. K = bracketleftbigg 5.3956 3.3002 bracketrightbigg The SSA controller was designed with the SSA control law 4.15 in closed loop with an outer loop LQR controller designed with the same matrices (4.16) and a different linearization. Two versions of SSA control design are compared, n = 0 and n = 2. Observe in Figure 4.8(a) that the area of the region of convergence (blue) of the SSA-based solution is comparable to slightly greater than the area of the region of convergence corresponding to the simple linear LQR approach (red). Notice further in Figure 4.8(b) that the region of convergence significantly increases with the SSA control law parameter n. ?3 ?2.5 ?2 ?1.5 ?1 ?0.5 0 0.5?7 ?6 ?5 ?4 ?3 ?2 ?1 0 1 2 x1 x 2 u = ?x1?x22?2x2?K*[x1;x2] SSA?Based Solution n=0 Linear (a) uSSA = ?x1 ?x22 ?2x2 + v ?3 ?2.5 ?2 ?1.5 ?1 ?0.5 0 0.5?7 ?6 ?5 ?4 ?3 ?2 ?1 0 1 2 x1 x 2 u = ?x1?x22?x2?x23?K*[x1;x2] SSA?based Solution n=1 LQR Solution (b) uSSA = ?x1 ?x22 ?x2 ?x32 + v Figure 4.8: Region of Convergence, Comparison of SSA-based control and LQR control efforts for System 2 53 4.4 Conclusion Five case studies are presented in the previous chapter in which existing well-known nonlin- ear control design methods produced either control solutions with singularities or were unable to produce any feasible control solution. In engineering practice, standard nonlinear control design methods may not be mathematically tractable, or may result in control laws with sin- gularities, or the design processes cannot be completed due to system structural deficiencies. A SSA nonlinear design proves effective in all of these specific system examples. An inner loop nonlinear control is first designed to stabilize a subset of the plant?s state variables. Only those variables contributing to significant plant nonlinearities are stabilized by the inner loop control. The inner loop control law also introduces a new control variable for outer loop con- trol. An outer loop control designed by usual linear system methods completes the SSA control law. The SSA control design approach combines the simplicity of linear design methods with the improved region of stability of nonlinear design methods, yet avoids the pitfalls of some standard nonlinear control design methods. 54 Chapter 5 Conclusions In this chapter a description of conclusions drawn for the Subset Stabilization Approach (SSA) are discussed. The major advantages of SSA control design are re-iterated and major design considerations are discussed. A final argument is given for using SSA control design and in which situations SSA should be used. 5.1 Design Advantages The Subset Stabilization Approach design approach has a direct application to a large group of systems and has proven itself usefulness for several specific nonlinear system examples, i.e. the ball-on-beam example in Chapter 3 and the five other example systems in Section 4.2. In each example, the traditional nonlinear design approaches failed to provide a valid control effort or were structurally inapplicable. The linear control method provided control efforts that were stable within small regions around the given operating point. The SSA-based control solutions were able to increase the region of convergence volume for the linear control effort and ,in the ball-on-beam example, provide a seemingly globally stable control. SSA-based control solutions were not unique and provided tuning possibility, as discussed in Section 4.3. The system in Example 6 ?x1 = x1 +x2 +x22 ?x2 = x1 +x22 +u 55 was simulated with multiple control solutions u = ?x1 ?x22 ?x2 ?x2n+12 ?K ? ?? x1 x2 ? ?? where n = 0 and n = 1 were chosen. As n increased, the control input magnitude increased for large values of x2 and the system responded faster. As with input-output linearization, input-state linearization, Integrator backstepping, and Lyapunov control design the response of the system may be changed by the choice of the Lyapunov function used for the design procedure,i.e. the energy function in example 6. 5.2 SSA for Nonlinear Control The SSA successfully provided a control solution where traditional nonlinear control meth- ods failed and improved the region of convergence for traditional linear control method solutions. In Section 4.3 theory for SSA was given in which a bounded subset of states for the entire state space provided advantages for traditional linear control solutions. The SSA control design tech- nique gives a clear method for solving nonlinear control problems where traditional nonlinear methods fail, and improves linear design solutions for the same systems. 56 Chapter 6 Future Work In this chapter a clear description of subsequent future work will be discussed. In previ- ous chapters, a subset stabilization approach (SSA) control design was introduced. Questions related to the advantages of this approach and theoretical explanations where answered for spe- cific examples. Although SSA clearly provides advantages, i.e. the ball-on-beam problem, these advantages are not fully explored through stability and realworld implementation. The SSA designed control effort found in Chapter 3 should be validated with a real world experiment and the stability requirements for a generalized SSA designed control should be analytically examined. 6.1 Experimental Validation of the Ball-on-beam Control Effort In chapter 3 a SSA-based control design solution was tested on Matlab Simulink model/s- function. Dr. Uran and Dr. Jezernik in Slovenia have built a ?ball?-on-beam system and implemented their approach for ?ball?-on-beam control. Uran and Jezernik?s Ball and Beam like mechanism replaces the ball by a cart which slides ?frictionless? on the beam, as in Figure 6.1 [21]. The Ball-on-beam mechanism above is under actuated, like the Ball-on-beam mechanism presented in Chapter 3. The first degree of freedom is present in the angle of a beam which is actuated by an electric direct drive motor. The second degree of freedom is represented by the cart sliding on the beam which is actuated by the movement of the beam. With states defined as x1 = r, x2 = ?r, x3 = ?, and x4 = ??, the dynamics for the ball-on-beam system, in figure 6.1 57 Figure 6.1: Uran and Jezernik Ball on Beam Apparatus are given. parenleftbigm vr2 +IY Y P parenrightbig ??+2m vr?r ??+mvgrcos(?) = M? mv?r?mvr ??2 +mvgsin(?) = 0 The variable r is the ball position, ? is the angle of the beam, mv is a mass of the ball, IY Y P is inertia of the beam, g is the gravity constant and M? is an input torque. In Uran and Jezernik?s ball-on-beam like mechanism the ball(cart) position r , the angle of the beam ?, as well as the ball(cart) position speed and the beam angle speed are measured through various sensors. Using the predefined states x1 = r, x2 = ?r, x3 = ?, and x4 = ??. Uran and Jezernik?s ball-on-beam dynamics equations become parenleftbigm vx21 +IY Y P parenrightbig ?x 4 + 2mvx1x2x4 +mvgx1 cos(x3) = M? mv ?x2 ?mvx1x24 +mvgsin(x3) = 0 58 and are written as a set of simple state equations using the nonlinear invertible transformation M? = mvgx1 cos(x3) +2mvx1x2x4 +vIY Y P +vmvx21. ?x1 = x2 ?x2 = x1x24 ?gsin(x3) ?x3 = x4 ?x4 = v We are communicating with Dr. Uran to implement and compare the subset stabilization approach with Uran and Jezernik?s control solution presented in [21]. In the following sections, the SSA control solution is formulate and structurally compared with Uran and Jezernik?s control solution. 6.1.1 Subset Stabilization Approach to [21] The equations presented in [21] are used for the following design. The Lyapunov design is chosen around the angle of the beam x3 and the angular rate of the beam x4, V(x3,x4) = 1 2 parenleftbigx2 3 +x24 parenrightbig. The derivative of V(x 3,x4) with respect to time is given below. ?V = x3x4 +x4v We chose the following control effort ulyp = ?x3 ?x4 ?x23x4 59 and supplemented it with a user defined input w. ?x1 = x2 (6.1) ?x2 = x1x24 ?gsin(x3) ?x3 = x4 ?x4 = ?x3 ?x4 ?x23x4 +w The system is linearized using the state matrices A = ? ?? ?? ?? ?? ?? 0 1 0 0 0 0 ?g 0 0 0 0 1 0 0 ?1 ?1 ? ?? ?? ?? ?? ?? ,B = ? ?? ?? ?? ?? ?? 0 0 0 1 ? ?? ?? ?? ?? ?? and the LQR command in Matlab. The following gains were used (Q=eye(4) and R=10). K = bracketleftbigg 0.3162 0.7335 5.7938 2.5620 bracketrightbigg The invertible transformation used to simplify the dynamics of ?x4 were applied to the control effort, and the control input is shown below. M? = mvgx1 cos(x3) +2mvx1x2x4 +vIY Y P +vmvx21 v = ?x3 ?x4 ?x23x4 +w w = ?K ? ?? ?? ?? ?? ?? x1 x2 x3 x4 ? ?? ?? ?? ?? ?? 60 0 5 10 15 20 25 30 35 40?0.5 0 0.5 1 Uran and Jezernik System Simulation With SSA Control Solution time x 1 ,x 2 ,x 3 ,x 4 Ball Position Ball Rate Beam Position Beam Angular Rate Figure 6.2: Uran and Jezernik System Simulation with SSA control Solution Uran and Jezernik provided the following parametric values. Beam Length = 0.8 m mv = 3.15 kg IY Y P = 1.248 kgm2 Stiction of Beam = 1.3 Nm Stiction of Cart = 4.86 N Coulomb Friction ? 30% of stiction A Matlab Simulink simulation provided the following state responses. 6.1.2 Comparison of State Equations and Control Solution The state equations used for Uran and Jezernik?s paper and this dissertation, chapter 3, are very similar. In fact, they are identical with Iball ? 0. 61 Uran/Jezernik Equations ?x1 = x2 ?x2 = x1x24 ?gsin(x3) ?x3 = x4 ?x4 = M??2mvx1x2x4?mvgx1 cos(x3)(m vx21+IYYP) Chapter 3 Equations ?x1 = x2 ?x2 = Cr parenleftbigmx1x24 +mgsin(x3)parenrightbig ?x3 = x4 ?x4 = ??Cdx4+gmx1 cos(x3)(mx2 1+Ibeam+Iball) where Cr = parenleftBig m+ Iballr2 parenrightBig?1 Uran and Jezernik used two cascaded computed torque controllers M?,UJ given by the following two equations. M?,UJ = parenleftbigmvr2 +IY Y Pparenrightbig ??z +2mvr?r ??+mvgrcos(?) ??z = KpP (?z ??)?KvP ?? ?z = arcsin bracketleftbigg ?1 mvg parenleftbigm v?rz ?mvr ??2 parenrightbigbracketrightbigg ?rz = ?r+KvV (?rz ? ?r) +KpV (rz ?r) The SSA control solution M?,SSA uses a cascaded Lyapunov control ulyp, LQR gain control w = ?Kx, and an invertible transformation. M?,SSA = parenleftbigmvr2 +IY Y Pparenrightbig ulyp +2mvr?r ??+mvgrcos(?) ulyp = ??? ????2 ??+w w = ?K ? ?? ?? ?? ?? ?? r ?r ? ?? ? ?? ?? ?? ?? ?? K = bracketleftbigg 0.3162 0.7335 5.7938 2.5620 bracketrightbigg 62 The two control laws are very similar in their structure and require the same state feedback variables. The differential dynamics introduced in Uran and Jezernik?s control are a major difference between the two control solutions. We are working together with Dr. Uran and Dr. Jezernik to implement the SSA-based control solution in Slovenia. After the control is implemented, a comparison will be made with the SSA-based design approach and Uran and Jezernik?s design approach. This work should provide great insight into the robustness of the SSA control solution for the ball-on-beam system. 6.2 Analytical Stability The SSA-based nonlinear design proves effective in all the examples discussed in this dis- sertation. We presented theoretical analysis in section 4.3 and provided an example to illustrate the SSA method. These results still fail to answer analytical questions which are posed in the SSA-based control solution. Is there an optimal SSA-based design method which will guaran- tee the ?reaching? phase of the control to converge to the ?tracking? phase of the control, as discussed in section 4.3? SSA-based control acts to decrease the impact of the system non- linearities so that a robust control law designed about a given operating point may extend its region of convergence in closed loop operation, but is this extension of the region of convergence guaranteed? Even with these questions unanswered, the SSA-based design approach provides a clear method for designing control solutions. 63 Bibliography [1] Jay Farrell, Manu Sharma, and Marios Polycarpou. Backstepping-based flight control with adaptive function approximation. Journal of Guidance, Control and Dynamics, 28(6):1089? 1101, November-December 2005. [2] Moacir Rosado Filho and Celso Jose Munaro. A design methodology of tracking controllers for magnetic levitation systems. In IEEE, editor, Proceedings of the 2001 IEEE Interna- tional Conference on Control Applications, pages 47?51, Mexico City, Mexico, September 2001. IEEE, IEEE. [3] Yi Guo, David J. Hill, and Zhong-Ping Jiang. Global nonlinear control of the ball and beam system. In Proceedings of the 35th Conference on Decision and Control, number 3, pages 2818?2823, Kobe, Japan, December 1996. IEEE, IEEE. [4] John Hauser, Shankar Sastry, and Peter Kokotovic. Nonlinear control via approximate input-output linearization: The ball and beam example. IEEE Transactions on Automatic Control, 37(3):392?398, March 1992. [5] Nam H. Jo and Jin H. Seo. Input output linearization approach to state observer design for nonlinear system. IEEE Transactions on Automatic Control, 45(12):2388?2394, December 2000. [6] Hassan K. Khalil. Nonlinear Systems, volume 1. Prentice Hall, Upper Saddle River, NJ 07458, 2nd edition, 1996. [7] N. Kidane and H. Nakamura Y. Yamashita H. Nishitani. Stabilizability analysis and controller design for a nonlinear system with an input constraint. In Preceedings of SICE 2003 Annual Conference, volume 2, pages 1419?1422. IEEE, IEEE, August 2003. [8] Douglas A. Lawrence. A general approach to input-output pseudolineairzation for nonlinear systems. IEEE Transactions on Automatic Control, 43(10):1497?1501, October 1998. [9] Douglas A. Lawrence. Input-output pseudolinearization on controlled invariant submani- folds. In Proceedings of the American Control Conference, pages 555?560, Anchorage, AK, May 2002. IEEE, IEEE. [10] Douglas A. Lawrence and Wilson J. Rugh. Input-output pseudolinearization. IEEE Trans- actions on Automatic Control, 39(11):2207?2218, November 1994. [11] Luis A. Marquez Martinez and Claude H. Moog. Input output feedback linearization of nonlinear time-delay systems. In Proceedings of the 42nd IEEE Conference on Decision and Control, pages 4557?4563, Hawaii, December 2003. IEEE, IEEE. 64 [12] F. Mazenc, R.E. Mahony, and R. Lozano. Forwarding control of scale model autonomous helicopter: a lyapunov control design. In Proceedings of the 42nd IEEE Conference on Decision and Control, pages 3960?3966, Hawaii, December 2003. IEEE, IEEE. [13] K.D. Mease, S. Bharadwaj, and S. Iravanchy. Timescale analysis for nonlinear dynamical systems. Journal of Guidance, Control, and Dynamics, 26(2):318?330, March-April 2003. [14] Toshiyuki Ohtsuka and Hironori A. Fujii. Design of stabilizing control laws for mechan- ical systems based on lyapunov?s method. Journal of Guidance, Control, and Dynamics, 19(1):172?180, January - February 1996. [15] Shyh-Pyng Shue, M. E. Sawan, and Kamran Rokhsaz. Optimal feedback control of a nonlinear system - wing rock example. Journal of Guidance, Control, and Dynamics, 19(1):166?171, January-February 1996. [16] Sahjendra N. Singh and Marc Steinberg. Adaptive control of feedback linearizable nonlinear systems with application to flight control. Journal of Guidance, Control and Dynamics, 19(4):871?877, July-August 1996. [17] Sahjendra N. Singh, Marc Stienberg, and Robert D. DiGirolamo. Nonlinear predictive control feedback linearizable systems and flight control system design. Journal of Guidance, Control, and Dynamics, 18(5):1023 ? 1028, September - October 1995. [18] Hebertt Sira-Ramirez. On the control of the ?ball and beam? system: A trajectory planning approach. In Proceedings of 39th IEEE conference on Decision and Control, number 4, pages 4042?4047, Sydney, Australia, December 2000. IEEE, IEEE. [19] Jean-Jacques E. Slotine and Weiping Li. Applied Nonlinear Control, volume 1. Prentice Hall, Upper Saddle River, New Jersey, 1991. [20] T. Urakubo. Discontinuous feedback stabilization of a class of nonholonomic systems based on lyapunov control. In Proceedings of the Fifth International Workshop on Robot Motion and Control, 2005, pages 91?96, Kobe Univ., Japan, June 2005. IEEE. [21] Suzana Uran and Karel Jezernik. Computed torque method for a ball and beam. In 11th International Workshop on Robotics in Alpe-Adria-Danube Region RAAD, pages 347?352, Balatonf?ured, Hungary, June 2002. RAAD. [22] X. Xia, C.H. Moog, and R. Pothin. Extended output injection and output feedback input output linearization. In Electronic Letters, volume 38, pages 200?202. IEEE, February 2002. 65 Appendices 66 Appendix A Five Systems Examples,Code: function [tspan,xL,xH] = SimAllSys1_5(sys,x1i,x2i); % Batch Calculation for all the System?s in Chapter 3 % [] = SimAllSys1_5(); % %sys = 2; x1i = -2.5; x2i = 2; plotit = 0; warning off tspan = [0:0.01:30]?; switch(sys) case 1 %x1i = 1;x2i = 0; [tL1,xL1] = ode45(@sys1L,[tspan],[x1i x2i]); [tH1,xH1] = ode45(@sys1H,[tspan],[x1i x2i]); if(plotit),figure(1) for ii=1:max(size(xH1,2),size(xL1,2)) subplot(max(size(xH1,2),size(xL1,2)),1,ii) plot(tspan(1:length(xH1)),xH1(:,ii),... tspan(1:length(xL1)),xL1(:,ii)) if(ii==1),title(?system 1?),end legend(?hybrid?,?linear?) ylabel(sprintf(?x_%1d?,ii)) 67 end,pause(0.1) [qq,gg] = find(xH1<=0.02*x1i); [hh,gg] = find(xL1<=0.02*x1i); if(~(length(qq)<1)) fprintf(?Hybrid settling time = %1.2f sec\n?,tH1(qq(1))) fprintf(?Linear settling time = %1.2f sec\n?,tL1(hh(1))) end end xL = xL1; xH = xH1; case 2 %x1i = 0.124;x2i = 0; [tL2,xL2] = ode23tb(@sys2L,[tspan],[x1i x2i]); [tH2,xH2] = ode23tb(@sys2H2,[tspan],[x1i x2i]); if(plotit),figure(2) for ii=1:max(size(xH2,2),size(xL2,2)) subplot(max(size(xH2,2),size(xL2,2)),1,ii) plot(tspan(1:length(xH2)),xH2(:,ii),... tspan(1:length(xL2)),xL2(:,ii)) if(ii==1),title(?system 2?),end legend(?hybrid?,?linear?) ylabel(sprintf(?x_%1d?,ii)) end,pause(0.1) [qq,gg] = find(xH2<=0.02*x1i); [hh,gg] = find(xL2<=0.02*x1i); if(~(length(qq)<1)) 68 fprintf(?Hybrid settling time = %1.2f sec\n?,tH2(qq(1))) fprintf(?Linear settling time = %1.2f sec\n?,tL2(hh(1))) end end xL = xL2; xH = xH2; case 3 %x1i = 0.1;x2i = 0; [tL3,xL3] = ode45(@sys3L,[tspan],[x1i x2i]); [tH3,xH3] = ode45(@sys3H,[tspan],[x1i x2i]); if(plotit),figure(3) for ii=1:max(size(xH3,2),size(xL3,2)) subplot(max(size(xH3,2),size(xL3,2)),1,ii) plot(tspan(1:length(xH3)),xH3(:,ii),... tspan(1:length(xL3)),xL3(:,ii)) if(ii==1),title(?system 3?),end legend(?hybrid?,?linear?) ylabel(sprintf(?x_%1d?,ii)) end,pause(0.1) [qq,gg] = find(xH3<=0.02*x1i); [hh,gg] = find(xL3<=0.02*x1i); fprintf(?Hybrid settling time = %1.2f sec\n?,tH3(qq(1))) fprintf(?Linear settling time = %1.2f sec\n?,tL3(hh(1))) end xL = xL3; xH = xH3; case 4 69 %x1i = 5;x2i = 0; x3i = 0; [tL4,xL4] = ode45(@sys4L,[tspan],[x1i x2i x3i]); [tH4,xH4] = ode45(@sys4H,[tspan],[x1i x2i x3i]); if(plotit),figure(4) for ii=1:max(size(xH4,2),size(xL4,2)) subplot(max(size(xH4,2),size(xL4,2)),1,ii) plot(tspan(1:length(xH4)),xH4(:,ii),... tspan(1:length(xL4)),xL4(:,ii)) if(ii==1),title(?system 4?),end legend(?hybrid?,?linear?) ylabel(sprintf(?x_%1d?,ii)) end,pause(0.1) [qq,gg] = find(xH4<=0.02*x1i); [hh,gg] = find(xL4<=0.02*x1i); fprintf(?Hybrid settling time = %1.2f sec\n?,tH4(qq(1))) fprintf(?Linear settling time = %1.2f sec\n?,tL4(hh(1))) end xL = xL4; xH = xH4; case 5 %x1i = 6;x2i = 0; x3i = 0;x4i = 0; [tL5,xL5] = ode45(@sys5L,[tspan],[x1i x2i x3i x4i]); [tH5,xH5] = ode45(@sys5H,[tspan],[x1i x2i x3i x4i]); if(plotit),figure(5) for ii=1:max(size(xH5,2),size(xL5,2)) 70 subplot(max(size(xH5,2),size(xL5,2)),1,ii) plot(tspan(1:length(xH5)),xH5(:,ii),... tspan(1:length(xL5)),xL5(:,ii)) if(ii==1),title(?system 5?),end legend(?hybrid?,?linear?) ylabel(sprintf(?x_%1d?,ii)) end,pause(0.1) [qq,gg] = find(xH5<=0.02*x1i); [hh,gg] = find(xL5<=0.02*x1i); fprintf(?Hybrid settling time = %1.2f sec\n?,tH5(qq(1))) fprintf(?Linear settling time = %1.2f sec\n?,tL5(hh(1))) end xL = xL5; xH = xH5; end %figure(1),hold on,plot(xH2(:,1),xH2(:,2),?b?) figure(1),hold on,plot(xL2(:,1),xL2(:,2),?g?) %************************** SYSTEMS function dx = sys1H(t,x) x1 = x(1); x2 = x(2); Kh = [0.3162 0.2538]; u = -x1 - x2^2 - x2 - Kh*[x1;x2]; dx(1,1) = x2 + tanh(u); dx(2,1) = x1 + x2^2 + u; 71 function dx = sys1L(t,x) x1 = x(1); x2 = x(2); K = [1.0477 1.0477]; u = - K*[x1;x2]; dx(1,1) = x2 + tanh(u); dx(2,1) = x1 + x2^2 + u; %************************** 2 function dx = sys2H(t,x) x1 = x(1); x2 = x(2); Kh = [4.1669 2.0714]; u = -x1-x2^2-x2;%-Kh*[x1;x2]; %-x1^2*x2 extra dx(1,1) = x1 + x2 +x2^2; dx(2,1) = x1 + x2^2 + u; function dx = sys2H2(t,x) x1 = x(1); x2 = x(2); Kh = [4.1669 2.0714]; u = -x1-x2^2-x2-x2^5;%-Kh*[x1;x2]; %-x1^2*x2 extra dx(1,1) = x1 + x2 +x2^2; dx(2,1) = x1 + x2^2 + u; function dx = sys2L(t,x) x1 = x(1); x2 = x(2); K = [5.3956 3.3002]; u = - K*[x1;x2]; 72 dx(1,1) = x1 + x2 +x2^2; dx(2,1) = x1 + x2^2 + u; %************************** 3 function dx = sys3H(t,x) x1 = x(1); x2 = x(2); Kh = [0.3162 0.3162]; u = -x2 - Kh*[x1;x2]; dx(1,1) = sin(x2); dx(2,1) = u; function dx = sys3L(t,x) x1 = x(1); x2 = x(2); K = [0.3162 0.8558]; u = - K*[x1;x2]; dx(1,1) = sin(x2); dx(2,1) = u; %************************** 4 function dx = sys4H(t,x) x1 = x(1); x2 = x(2); x3 = x(3); Kh = [0.3162 4.9487 2.3162]; u = - x3 - Kh*[x1;x2;x3]; dx(1,1) = x2; dx(2,1) = x2 + sin(x3); dx(3,1) = u; 73 function dx = sys4L(t,x) x1 = x(1); x2 = x(2); x3 = x(3); K = [0.3162 4.0279 2.8558]; u = - K*[x1;x2;x3]; dx(1,1) = x2; dx(2,1) = x2 + sin(x3); dx(3,1) = u; %************************** 5 function dx = sys5H(t,x) x1 = x(1); x2 = x(2); x3 = x(3); x4 = x(4); Kh = [0.3162 1.2440 1.2889 0.9178]; u = -x4 - x4*x3^2 - x3 - Kh*[x1;x2;x3;x4]; dx(1,1) = x2; dx(2,1) = x2*x4^2 + sin(x3); dx(3,1) = x4; dx(4,1) = u; function dx = sys5L(t,x) x1 = x(1); x2 = x(2); x3 = x(3); x4 = x(4); K = [0.3162 1.1969 2.1070 2.0770]; u = - K*[x1;x2;x3;x4]; dx(1,1) = x2; dx(2,1) = x2*x4^2 + sin(x3); dx(3,1) = x4; 74 dx(4,1) = u; 75 Appendix B Code for Five System Phase Portrait % State Space Portrait for 5 different systems % % if(~exist(?LinearVal?)&~exist(?HybridVal?)),LinearVal = 0; HybridVal = 0;end figurenum = 20; x2HvecROC = [];x1HvecROC = []; x2LvecROC = [];x1HvecROC = []; plotit = 0; plotPP = 1; % plot phase portrait skipitH=0;skipitL=0; ii = 0; jjH=1;jjL=1; PPL = 0.1; %for system 2, keep below 0.1 pp box, others =0.5 for sys = [2]; figurenum = figurenum+1; for x1i = [-0.6:0.1:0.2]; for x2i = [-2,2]; %-0.5:0.1:0.5 [tspan,xL,xH] = SimAllSys1_5(sys,x1i,x2i); if(size(xH,1)<2|size(xH,2)<2),skipitH=1;xH=zeros(2,2); end if(size(xL,1)<2|size(xL,2)<2),skipitL=1;xL=zeros(2,2); 76 end ii = ii+1; x1vector(ii) = x1i; x2vector(ii) = x2i; v1vectorH(ii) = xH(2,1)-xH(1,1); v2vectorH(ii) = xH(2,2)-xH(1,2); v1vectorL(ii) = xL(2,1)-xL(1,1); v2vectorL(ii) = xL(2,2)-xL(1,2); if(plotPP),figure(100+figurenum),plot(x1i,x2i,?b.?) plot(x1i,x2i,?b.?), hold on, plot(xH(:,1),xH(:,2),?b?),title(?hybrid?), hold on, figure(200+figurenum) plot(x1i,x2i,?b.?), hold on, plot(xL(:,1),xL(:,2),?r:?), title(?linear?), hold on, pause(0.01) end if(abs(xH(size(xH,1),1))<=PPL & .. abs(xH(size(xH,1),2))<=PPL & ~skipitH), HybridVal = HybridVal + 1; end if(abs(xL(size(xL,1),1))<=PPL & .. abs(xL(size(xL,1),2))<=PPL & ~skipitL), LinearVal = LinearVal + 1; end if(abs(xH(size(xH,1),1))<=PPL & .. abs(xH(size(xH,1),2))<=PPL & plotit & ~skipitH) figure(figurenum) plot(x1i,x2i,?bx?), hold on, pause(0.01) x1HvecROC(jjH) = x1i; x2HvecROC(jjH) = x2i; 77 jjH = jjH+1; end if(abs(xL(size(xL,1),1))<=PPL & .. abs(xL(size(xL,1),2))<=PPL & plotit & ~skipitL) figure(figurenum) plot(x1i,x2i,?ko?), hold on, pause(0.01) x1LvecROC(jjL) = x1i; x2LvecROC(jjL) = x2i; jjL=jjL+1; end end clc fprintf(?Hybrid Value = %f?,HybridVal) fprintf(?\nLinear Value = %f?,LinearVal) skipitH=0;skipitL=0; end end quiver(x1vector,x2vector,v1vectorH,v2vectorH,?b?), hold on quiver(x1vector,x2vector,v1vectorL,v2vectorL,?r?) 78 Appendix C Ball On Beam Example Code/Diagrams C.1 Block Diagram For Ball-on-beam Model 79 C.2 S-Function for Nonlinear Plant function [sys,x0,str,ts] = nonlinearplant(t,x,u,flag,a,b) % s-function [sys,x0,str,ts] = nonlinearplant(t,x,u,flag, .. % Makes the input memory % % switch flag, case 0, [sys,x0,str,ts]=mdlInitializeSizes(a,b); case 1, sys=mdlDerivatives(t,x,u); case 2, sys=mdlUpdate(t,x,u); case 3, sys=mdlOutputs(t,x,u); case 4, sys=mdlGetTimeOfNextVarHit(t,x,u); case 9, sys=mdlTerminate(t,x,u); otherwise error([?Unhandled flag = ?,num2str(flag)]); end function [sys,x0,str,ts]=mdlInitializeSizes(a,b); sizes = simsizes; sizes.NumContStates = 4; sizes.NumDiscStates = 0; %+ny; % weights of NN are the % states plus DeltaWstates % (nx*nx = p) sizes.NumOutputs = 4; %+ny; sizes.NumInputs = 1; %+ny; sizes.DirFeedthrough = 1; 80 sizes.NumSampleTimes = 1; % at least one sample time is needed sys = simsizes(sizes); x0 = [a b 0 0]; % [zeros(mdem*nx+ny,1)]; % initial conditions str = []; % str is always an empty matrix ts = [0]; % initialize the array of sample times return function sys=mdlDerivatives(t,x,u); L = 1; % Length of Beam gg = 9.81; % gravitational constant mass = 0.067; % mass of the ball rr = 0.0127; % radius of the ball Iball = 0.4*mass*rr^2; % moment of inertia of the ball Ibeam = (1/12)*2*mass*L^2; % moment of inertia of the beam Cd = 10; % friction coefficient at the pivot sys(1,1) = x(2); sys(2,1) = (mass + Iball/rr^2)^(-1) * (mass*x(1)*x(4)*x(4) + ... mass*gg*sin(x(3))); sys(3,1) = x(4); sys(4,1) = (Ibeam + Iball + mass*x(1)*x(1))^(-1) * ... (u - Cd*x(4) + mass*gg*x(1)*cos(x(3))); return 81 function sys=mdlUpdate(t,x,u); sys = []; return function y=mdlOutputs(t,x,u); % output neural network output vector and weights C = eye(4); y = C*x; return % %================================================== % mdlGetTimeOfNextVarHit %=================================================== % function sys=mdlGetTimeOfNextVarHit(t,x,u) sampleTime = 1; % Example, set the next sys = t + sampleTime; % end mdlGetTimeOfNextVarHit % %====================================================== % mdlTerminate % Perform any end of simulation tasks. %====================================================== 82 % function sys=mdlTerminate(t,x,u) sys = []; % end mdlTerminate C.3 Feedback M File function u = feedback(input,method) global K K = [1.0741 0.6168 1.6836 0.3164]; Klin = [1.3867 1.8617 16.1673 0.0230]; % Linear Gain Khyb = [0.3162 0.7815 4.6581 2.2274]; % Hybrid Gain x1 = input(1); x2 = input(2); x3 = input(3); x4 = input(4); g = 9.81; c1 = (5/7); c2 = (g)*c1; c3 = (22/5)*0.0127^2; m = 0.05; k1 = (180/pi); k2 = (180/pi); 83 % Control Efforts switch lower(method) case {?linear?} u = -Klin*[x1;x2;x3;x4]; case {?hybrid?} y = -Khyb*[x1;x2;x3;x4]; v = -x4-x4*x3^2-x3 + y; u = 10.*x4-.6573*x1*cos(x3)+.1117e-1*v+.6700e-1*v*x1^2; case {?inputoutput?} v = -1/2*(x4*x2+g*cos(x3))*(sign(x1))*(1/max(x1,1)); u = - (9.81)*x1*cos(x3)*m+k1*(v)*m*c3 + k2*v*m*x1^2; case {?lyapunov?} v = max(min(-x4*x2*c1*x1-1/x4*x2*g*c1*sin(x3)... -x3,100),-100); %max(min(-x2*(x1+c1*x1*x4^2+g*c1*sin(x3))/x4,100),-100); u = - (9.81)*x1*cos(x3)*m+k1*(v)*m*c3 + k2*v*m*x1^2; otherwise error(?Specify a case: linear,hybrid,inputoutput, or hybridks?) end 84