EXPERIMENTAL TESTING OF THE EXTENDED HIGH-GAIN OBSERVER AS A DISTURBANCE ESTIMATOR By Rachel E. Bou Serhal A THESIS Submitted to Michigan State University in partial fulï¬llment of the requirements for the degree of MASTER OF SCIENCE Electrical Engineering 2011 ABSTRACT EXPERIMENTAL TESTING OF THE EXTENDED HIGH-GAIN OBSERVER AS A DISTURBANCE ESTIMATOR By Rachel E. Bou Serhal In recent years, the Extended High-Gain Observer (EHGO) has proven valuable in its use with fully actuated mechanical systems. In this thesis we investigate the performance of the EHGO experimentally. First, we explore its use with underactuated mechanical systems. Using EHGO to estimate and cancel the disturbance in one link of an underactuated system results in adding that disturbance to other links. However, we show that the EHGO can be used to reduce the effect of disturbances in a rotary pendulum system. We also compare the performance of the EHGO as a disturbance estimator in a fully actuated mechanical system with the performance of the sliding-mode observer. We use a DC motor to demonstrate the simplicity of applying the EHGO compared to the complexity of the sliding-mode observer. We then highlight the advantages and drawbacks of using each observer. Overall, our experimental results provide a check, using the EHGO, for control engineers working with underactuated mechanical system that may simplify controller design. These results also underline the ease in implementation of the EHGO and its state of the art performance. To my parents, Lina and Elias. To my siblings, Chadi, Sara and Georges. iii ACKNOWLEDGMENTS I would like to thank my family for being there through the bad times and the good times. In particular I would like to recognize my mother and father for all the support they have given me throughout this journey. I would also like to thank my uncle, Elias Sayah, for always helping me out when I needed him. I also thank my advisor Professor Hassan Khalil for guiding me through my work and showing me how to become a good researcher. I appreciate my friends who have shared this journey with me. Finally, I thank my students for helping me become a good educator. iv You are rewarding a teacher poorly if you remain always a pupil . - Friedrich Nietzsche v TABLE OF CONTENTS LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Background . . . . . . . . . . . . . . . . . 2.1 Observers . . . . . . . . . . . . . . . . 2.1.1 Extended High-Gain Observer . 2.1.2 Sliding Mode Observer . . . . . 2.2 Mechanical Systems . . . . . . . . . . 2.2.1 Rotary Pendulum . . . . . . . . 2.2.2 DC Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 4 7 9 10 14 3 Disturbance Cancellation in the Rotary Pendulum Using Gain Observer . . . . . . . . . . . . . . . . . . . . . . . 3.1 Controller Design . . . . . . . . . . . . . . . . . . . . 3.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Comparison of Extended High-Gain Observer and Sliding-Mode Observer using the DCMCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Observer Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Implementation and Results . . . . . . . . . . . . . . . . . . . . . . . 4.3 Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 34 37 51 Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . . . 59 BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5 vi Extended High. . . . . . . . 18 . . . . . . . . . 18 . . . . . . . . . 22 LIST OF TABLES 2.1 List of symbols and values for ROTPEN . . . . . . . . . . . . . . . . . 12 2.2 List of symbols for the DCMCT . . . . . . . . . . . . . . . . . . . . . 16 2.3 List of symbols and values for the DCMCT . . . . . . . . . . . . . . . 16 vii LIST OF FIGURES 2.1 National Instruments’ ELVIS I Station. For interpretation of the references to color in this and all other ï¬gures, the reader is referred to the electronic version of this thesis. . . . . . . . . . . . . . . . . . . . . . . 10 2.2 ROTPEN trainer developed by Quanser. . . . . . . . . . . . . . . . . . 11 2.3 Free body diagram of the ROTPEN. . . . . . . . . . . . . . . . . . . . 11 2.4 DCMCT trainer developed by Quanser. . . . . . . . . . . . . . . . . . 15 3.1 Estimate of the disturbance in the arm, d2 . . . . . . . . . . . . . . . . 24 3.2 Estimate of the disturbance in the pendulum, d4 . . . . . . . . . . . . . 25 3.3 Estimate of the new disturbance found in the arm angle . . . . . . . . . 25 3.4 θ with no disturbance estimation used . . . . . . . . . . . . . . . . . . 27 3.5 α with no disturbance estimation used . . . . . . . . . . . . . . . . . . 28 3.6 Comparison between ’theta’, the measurement of the arm angle, and ’theta hat’, its estimate using (3.17) . . . . . . . . . . . . . . . . . . . 28 3.7 Comparison between ’theta dot’, the estimated speed of the arm using (3.2), and ’theta dot hat’, the estimate found using (3.17) . . . . . . . . 29 3.8 Comparison between ’alpha’, the measurement of the arm angle, and ’alpha hat’, its estimate using (3.17) . . . . . . . . . . . . . . . . . . . 29 3.9 Comparison between ’alpha dot’, the estimated speed of the arm using (3.2), and ’alpha dot hat’, the estimate found using (3.17) . . . . . . . . 30 3.10 x1 with disturbance cancelation. . . . . . . . . . . . . . . . . . . . . . 31 3.11 x3 with disturbance cancelation. . . . . . . . . . . . . . . . . . . . . . 31 4.1 Response of x1 with only PID control. . . . . . . . . . . . . . . . . . . 38 4.2 Close up of transient response of x1 with only PID control. . . . . . . . 39 viii 4.3 Control with only PID control. . . . . . . . . . . . . . . . . . . . . . . 39 4.4 Response of x1 with de = 5V using only PID control. . . . . . . . . . 40 4.5 Close-up of response of x1 with de = 5V using only PID control. . . . 40 4.6 Control with de = 5V using only PID control. . . . . . . . . . . . . . . 41 4.7 Comparison between x1 and its estimate, x1 using (4.14) . . . . . . . . 42 ˆ 4.8 Comparison between x2 using 4.1 and x2 using (4.14) . . . . . . . . . 43 ˆ 4.9 The response of x1 using EHGO. . . . . . . . . . . . . . . . . . . . . . 43 4.10 A close-up of the transient response of x1 using EHGO. . . . . . . . . 44 4.11 Control using EHGO. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.12 Estimate of the inherent disturbance using EHGO. . . . . . . . . . . . . 45 4.13 Response of x1 with de = 5V using EHGO. . . . . . . . . . . . . . . . 46 4.14 Close-up of transient response of x1 with de = 5V using EHGO. . . . . 47 4.15 Estimate of overall disturbance with de = 5V using EHGO. . . . . . . 48 4.16 Comparison between x1 its estimate, x1 using SMO with constant gains 49 ˆ 4.17 Comparison between x2 using 4.1 and z1 using SMO with constant gains 50 4.18 Response using SMO with constant gains. . . . . . . . . . . . . . . . . 50 4.19 Close-up of response using SMO with constant gains. . . . . . . . . . . 51 4.20 Control using SMO with constant gains. . . . . . . . . . . . . . . . . . 51 4.21 Estimate of inherit disturbance using SMO with constant gains. . . . . . 52 4.22 Comparison between x2 using 4.1 and z1 using SMO with time-varying gains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.23 Response using SMO with time-varying gains. . . . . . . . . . . . . . . 54 4.24 Close-up of transient response using SMO with time-varying gains. . . 55 ix 4.25 Control using SMO with time-varying gains. . . . . . . . . . . . . . . . 55 4.26 Estimate of inherit disturbance using SMO with time-varying gains. . . 56 4.27 Response with de = 5V using SMO with time-varying gains. . . . . . . 56 4.28 Response of x1 with de = 5V using SMO with time-varying gains and second-order low-pass ï¬lters. . . . . . . . . . . . . . . . . . . . . . . . 57 4.29 Close-up of transient response of x1 with de = 5V using SMO with time-varying gains and second-order low-pass ï¬lters. . . . . . . . . . . 57 4.30 Estimate of overall disturbance with de = 5V using SMO with timevarying gains and second-order low-pass ï¬lters. . . . . . . . . . . . . . 58 x CHAPTER 1 Introduction Disturbance estimation techniques such as the sliding mode observer (SMO) [12], the disturbance observer (DOB) [7], and the extended high gain observer (EHGO) [6] have been used in fully actuated mechanical systems to reduce the effect of model errors and unknown disturbances. A survey of disturbance observers in [10] gives a a good record of their use in control design. In this thesis we focus on two observers, EHGO and SMO. We use experimental results to achieve two goals : • Investigate the potential use of EHGO with an underactuated mechanical system • Compare the EHGO and the SMO Although disturbance estimation techniques have shown some promising results in fully actuated systems, their use in underactuated systems has not yet been thoroughly explored. Often in these techniques of disturbance estimation and speciï¬cally the method presented by Freidovich and Khalil in [6], the cancellation of disturbance occurs in the control. However, in underactuated mechanical systems, the same control may appear in more than one link. Thus, cancellation of disturbance in one link adds disturbance to the other. The work done in [11] showed experimental results of distur1 bance estimation and cancellation in an underactuated mechanical system. However, their work differs from the work done in this thesis. They estimate and cancel the disturbance in one of the links, but to deal with added disturbance in the other links, they design a robust yet complicated control law that overcomes them. Their situation presents a worst case scenario. We explore the situation where the added disturbance to the other links actually reduces the already present disturbance. In Chapter 3 we show a case where this occurs in a rotary pendulum system and use a simple controller to achieve the desired response. An interesting control problem in underactuated mechanical systems is gantry control (minimization of pendulum oscillations while the arm tracks a certain reference). Quanser [8] developed a rotary pendulum platform (ROTPEN) for educational purposes. It is an underactuated mechanical system that offers a good exposure to many control problems, including gantry control. Quanser uses linear state feedback to achieve the desired response. However, this technique does not consider any unknown disturbances in the system that may affect the system’s performance. For fully actuated mechanical systems, [6] presented a technique utilizing the EHGO to estimate the disturbance. Their work offered a way to estimate and cancel the disturbance in a system, while promising transient performance recovery and integral action. We investigate gantry control and try to minimize the effect of disturbance by utilizing a variation of the disturbance estimation method presented in [6]. The SMO and the EHGO have both proven to be valuable in disturbance compensation problems [14] [6]. Each observer has a set of design parameters that affect its performance. The choice of these parameters is dependent on and restricted by the experiment performed. The presence of measurement noise affects the performance of the EHGO [13]. The effect of measurement noise could be avoided by a better understand- 2 ing of the sensors used in each experiment [1]. With the SMO we deal with chattering problems from discontinuity [14]. The choice of the parameters involved in designing the SMO require some knowledge of the unknown states and the bound on the disturbance. This is also true for the EHGO but we show in Chapter 4 that the performance of the SMO is more sensitive to a better understanding of these bounds. We use the DC Motor Control Trainer (DCMCT), a fully actuated mechanical system developed by Quanser [9] to compare the performance of each observer in the same experimental environment.We implemented each experiment using National Instrument’s ELVIS station and LabView 7.1 to interface with the ROTPEN and the DCMCT. In this thesis we present a review of each observer and introduce the model for the ROTPEN and the DCMCT in Chapter 2. We then apply the EHGO to the ROTPEN and discuss its use with an underactuated mechanical system in Chapter 3. In Chapter 4 we apply both the SMO and EHGO to the DCMCT and discuss the results of each. In Chapter 5 we summarize the contributions of our work and discuss the future work. 3 CHAPTER 2 Background This chapter provides the background that is required to understand the contributions of this thesis. It is divided into two sections. The ï¬rst section describes the observers designed during our work and the theory behind their use. The second section introduces the mechanical/electro-mechanical systems used during the experiments. 2.1 Observers This section discusses the preliminaries needed for designing the observers used in these experiments. It covers the introduction of the Extended High-Gain Observer and the Sliding Mode Observer. 2.1.1 Extended High-Gain Observer Feedback linearization techniques offered a way for designing feedback control for nonlinear systems using linear control theory [6]. Theoretically, these techniques provide simpler ways of not only achieving stabilization and regulation, but also transient response speciï¬cations. However, in practice, model uncertainty and disturbance limit the 4 realization of what feedback linearization can offer. Consequently, the extended highgain observer (EHGO) was developed to combine the idea of disturbance cancellation with feedback linearization. The design of the EHGO is simple as can be seen in the following discussion. Consider a single-input-single-output nonlinear system in the normal form [6] x = Ax + B[b(x, z, w) + a(x, z, w)u] Ë™ (2.1) z = f0 (x, z, w) Ë™ (2.2) y = Cx (2.3) where A ∈ Rn×n , B ∈ Rn , C ∈ R1×n represent a chain of n integrators, x ∈ Rn and z ∈ Rm are state variables, u ∈ R is the control input, y ∈ R is the measured output, and w ∈ Rl is a bounded disturbance input.The functions a(.), b(.), and f0 (.) are possibly unknown nonlinear functions. Assuming that: • w(t) belongs to a known compact set W ⊂ Rl . • a(.), b(.), and f0 (.) are continuously differentiable with locally Lipschitz derivatives. • There is a radially unbounded function such that ∂(V0 ) (z)f0 (x, z, w) ≤ 0, for z ≥ χ(x, w) ∂z ensures the internal dynamics (2.3) to be bounded-input-bounded-state stable. With assumptions of availability of (x, z, w), and knowledge of the functions a(.) and b(.) feedback linearization u= −b(x, z, w) + v a(x, z, w) 5 (2.4) could have been used to reduce the model to the target system x = Ax + Bv, y = Cx. Ë™ The control v = φ(x) could be chosen as a twice continuously differentiable state feedback control law such thart the closed loop system is locally exponentially stable and globally asymptotically stable. The state feedback controller v can be chosen using any linear control design method such as Linear Quadratic Regulator (LQR) or pole placement. However, unavailability of (x, z, w) and uncertainty in the functions a(.) and b(.) makes this control unrealizable. An EHGO could be used to recover the performance of the target system. The extended system is found by augmenting the chain of integrators in (2.1)-(2.9) with an additional integrator. The EHGO is constructed by designing a high-gain observer to the extended system as Ë™ x = Aˆ + B[ˆ x) + a(ˆ)(u + σ )] + H(ε)(y − C x) ˆ x b(ˆ ˆx ˆ ˆ Ë™ σ = ˆ αn+1 a(ˆ)εn+1 ˆx (y − C x) ˆ (2.5) (2.6) where σ is an estimate of the disturbance, a(.) and ˆ are models of a(.) and b(.) ˆ ˆ b(.) respectively and H(ε) = α1 αn T , ..., n . ε ε The choice of α1 , ..., αn , αn+1 must be made such that sn+1 + α1 sn + ... + αn+1 is Hurwitz. Now, the target system could be reached by choosing the control as u = −ˆ + σ −ˆ x) − φ(ˆ) b(ˆ x a(ˆ) ˆx 6 = ψ(ˆ, σ ). x ˆ However, it is important to saturate the control to protect the system from peaking [6]. The control, thus becomes ψ(ˆ, σ ) x ˆ M u = M sat where M > max −b(x, z, w) + φ(x) a(x, z, w) The performance recovery of the target system can be achieved by pushing ε small enough, such that the error between the trajectories of the actual system and the target system is minimized. In practice, the choice of ε is bounded from below by the level of measurement noise in the system [13]. In summary, for mechanical systems, the EHGO is used to estimate matched disturbances in the system. This estimate is then used in the controller to cancel the disturbance. The controller will also include an output feedback control that will recover the target system’s performance. 2.1.2 Sliding Mode Observer Sliding-mode observers (SMO) are used because they could offer ï¬nite-time convergence, and robustness with respect to uncertainties and the possibility of uncertainty estimation. Unlike high-gain observers, such as the extended high-gain observer, when using SMO’s we need not worry about peaking [3]. Consider a single-input-singleoutput second-order system, of the form x1 = x2 Ë™ (2.7) x2 = a21 x1 + a22 x2 + α(u + d) Ë™ (2.8) y = x1 (2.9) 7 where a21 and a22 are known coefï¬cients of x1 and x2 , d is a bounded disturbance term, α is the control coefï¬cient and u is the control input. The design of the SMO to estimate the unavailable state, x2 and d is as follows [12] Ë™ x1 = x2 + M0 sgn(y − x1 ) ˆ ˆ ˆ Ë™ x2 = a21 x1 + a22 x2 + α[u + M1 sgn(z1 )] ˆ ˆ ˆ (2.10) Ï„1 z1 = −z1 + M0 sgn(y − x1 ) Ë™ ˆ Ï„f zf = −zf + M1 αsgn(z1 ) Ë™ (2.11) where z1 and zf are estimates of x2 and d respectively. M0 and M1 are constant gains deï¬ned by the bounds on x2 and the d. Their choice will be discussed in more detail later in the section. The ï¬lters in (2.11) are ï¬rst order low pass ï¬lters whose time constants Ï„1 and Ï„f are chosen according to system parameters. For now, to better understand the idea behind this method, we investigate the error dynamics. Let η1 = x1 − x1 ˆ (2.12) η 2 = x2 − x2 ˆ therefore η1 = η2 − M0 sgn(η1 ) Ë™ (2.13) η2 = a21 η1 + a22 η2 + d − M1 sgn(z1 ) Ë™ Given that d and x2 are bounded |x2 | < K1 |d| < K2 then we can guarantee that the estimation error will go to zero in ï¬nite time [3] when we choose M0 (t) > K1 M1 (t) > K2 8 (2.14) In sliding-mode the sliding surface is deï¬ned as η1 = η2 = 0. The low frequency behavior yields η1 = η2 = 0 and Ë™ Ë™ η2 = M0 sgn(η1 ) (2.15) d = M1 sgn(z1 ) The idea is that the low frequency component of M0 sgn(η1 ) must equal x2 and the the low frequency component of M1 sgn(z1 ) is an estimate of the disturbance d. Therefore the low-pass ï¬lters (2.11) are designed to appropriately reject the high frequency components and output the estimate of x2 , z1 , and the estimate of d, zf . The value of Ï„1 is chosen such that the the cut off frequency of the ï¬lter is outside of the bandwidth of x2 . On the other hand the choice of Ï„f must be made close to zero [12]. As can be seen the design of the SMO is not as intuitive as the EHGO. The SMO also involves design parameters dependent on some knowledge of the characteristics of the unknown state and disturbance. The SMO technique does, however, provide good estimation without the risk of peaking. Experimental results and comparisons between the SMO and the EHGO will be developed in Chapter 4. 2.2 Mechanical Systems In this section a description of the mechanical systems used for experimentation will be presented. Both systems described are developed by Quanser [8] for educational use in undergraduate laboratories. They are mounted on National Instruments’ ELVIS I station, shown in Fig.2.1. Labview 7.1 is used as an interface with both of these platforms. 9 Figure 2.1: National Instruments’ ELVIS I Station. For interpretation of the references to color in this and all other ï¬gures, the reader is referred to the electronic version of this thesis. 2.2.1 Rotary Pendulum The Rotary Pendulum (ROTPEN) System, shown in Fig.2.2, is a platform developed by Quanser [8]. It is used in undergraduate control labs because of the different control problems it can demonstrate. This system can be used to demonstrate: • Balance control: balancing the pendulum in the inverted position • Swing-up contol: bringing the pendulum from the downward position to the inverted position • Ganty control: minimizing oscillations in the pendulum while the arm tracks a given reference. For the purpose of our work the ROTPEN was used to demonstrate gantry control. The free body diagram of the ROTPEN is shown in Fig.2.3 10 Figure 2.2: ROTPEN trainer developed by Quanser. Figure 2.3: Free body diagram of the ROTPEN. Quanser [8] modeled this system by ¨ θ α ¨ = 1 det(D) Ë™ d22 f1 − d12 f2 + d22 Km (Vm − Kb θ)/Rm Ë™ −d12 f1 + d11 f2 − d12 Km (Vm − Kb θ)/Rm 11 Symbol Numerical Value Unit Mass of the pendulum assembly 0.027 Kg Total length of pendulum 0.191 m lp Length of pendulum center of mass from pivot 0.1524 m r Length of arm pivot to pendulum pivot 0.826 m g Gravitational acceleration constant 9.81 Jeq Equivalent moment of inertia about motor shaft 1.23 × 10−4 m/s2 Kg.m2 Jc Pendulum moment of inertia about its center of mass axis 7.0873 × 10−5 Kg.m2 Jp Pendulum moment of inertia about its center of pivot axis 6.9757 × 10−4 Kg.m2 3.3 Ω Mp Lp Description Rm Km Motor armature resistance Motor torque constant 0.02797 N.m Kb Motor back e.m.f. constant 0.02797 V/(rad/s) Table 2.1: List of symbols and values for ROTPEN where d11 = Je q + Mp r2 cos2 θ d12 = Mp lp r cos θ cos α d22 = Jp det(D) = Jeq Jp + Mp r2 Jc cos2 θ sin2 α > 0 Ë™ f1 = Mp r2 θ2 sin θ cos θ + Mp lp rα2 sin α cos θ Ë™ Ë™ f2 = Mp lp rθ2 sin θ cos α − Mp glp sin α θ is the arm angle and α is the pendulum angle. Setting all the derivatives to zero Ë™ ¨ Ë™ θ=θ=α=α=0 ¨ 12 yields 22 Mp lp rg cos θ cos α = 0 −(Jeq + Mp r2 cos2 θ)Mp glp sin α = 0 The solution is therefore sin α = 0 and the equilibrium points are found at α = αr and θ = θr , where αr and θr are any given reference. For a gantry control problem we choose α = 0 and θ = θr . The linearized system is thus found as ¨ θ α ¨ = 1 ∆ 22 Ë™ Mp lp rgα + Jp Km (Vm − Kb θ)/Rm Ë™ −(Jeq + Mp r2 )Mp glp α − Mp lp rKm (Vm − Kb θ)/Rm where ∆ = Je qJp + Mp r2 Jc . Using the change of variables Ë™ x1 = θ − θr , x2 = θ, x3 = α, x4 = α, u = V m Ë™ the state model is given by x = Ax + Bu Ë™ where     0 0 0 1 0      0 a   b   22 a23 0 , B =  2  A=     0  0 0 0 1     0 a42 a43 0 b4 13 (2.16) 2 a22 = Mp lp rg/∆ a23 = −Jp Km Kb /(∆Rm ) a42 = −(Je q + Mp r2 )Mp glp /∆ a43 = Mp lp rKm Kb /(∆Rm ) b2 = Jp Km /(∆Rm ) b4 = −Mp lp rKm /(∆Rm ) As can be seen from (2.16) the ROTPEN is an underactuated system. There is one control input but two degrees of freedom. Also, notice that the open-loop system is not stable with a pole at the origin. To achieve the desired response a variety of control techniques could be used such as pole placement or Linear Quadratic Regulator (LQR). The exact controllers used in these experiments will be described in Chapter 3. 2.2.2 DC Motor The DC Motor Control Trainer (DCMCT) shown in Fig.2.4, is another platform developed by Quanser [9]. It demonstrates motor control problems such as speed and position control using the National Instruments’ ELVIS I station and LabView7.1. Neglecting the armature inductance and given the relevant parameters shown in Table (2.2.2)(2.2.2), the DCMCT is modeled by [9] Vm (t) − Rm (t)Im (t) − Eemf (t) = 0 (2.17) Eemf (t) = kb wm (t) = kwm (t) (2.18) where 14 Figure 2.4: DCMCT trainer developed by Quanser. and J dwm = Tm (t) = kIm (t). dt (2.19) Substituting (2.18) and (2.19) into (2.17) we reach Vm (t) − Rm (t) J dwm − kwm (t) = 0 k dt (2.20) Using the change of variables Ë™ x1 = θm − θr , x2 = θm = wm (t), u = V m we get x1 = x2 Ë™ x2 = Ë™ k2 k dwm =− x2 + u dt Rm J RmJ Thus the state model representation of the system is     0 1 0 ,B =   A= k k2 0 −R J Rm J m 15 (2.21) (2.22) Symbol Description Unit θm Shaft angular position rad Vm Armature voltage V Im Armature current A Eemf Back-electromotive-force(EMF) V wm Shaft angular speed rad/s Tm Torque produced Nm Table 2.2: List of symbols for the DCMCT Symbol kb k J Rm Description Numerical Value Unit Back EMF Constant .0326 V s/rad Torque constant (k = kb ) Equivalent moment of inertia of the motor shaft and load .0326 1.93 × 10−5 N m/A kg/m2 3.3 Ω Armature resistance Table 2.3: List of symbols and values for the DCMCT 16 For the purposes of this thesis we demonstrate position control. To achieve the desired response many different linear control techniques could be used, such as pole placement or LQR. The goal is to minimize the tracking error between the position of the shaft and the reference given to it. The DCMCT is a fully actuated mechanical system with one control input and one degree of freedom. The exact controllers used for the DCMCT are presented in Chapter 4. 17 CHAPTER 3 Disturbance Cancellation in the Rotary Pendulum Using Extended High-Gain Observer In this chapter we demonstrate the use of the Extended High-Gain Observer (EHGO) with the Rotary Pendulum (ROTPEN). Speciï¬cally we present a case when disturbance cancellation could be useful in an underactuated mechanical system. First the control problem is presented with two different solutions: a controller that utilizes disturbance cancellation and one that does not. Next, we present the experiments performed. This chapter concludes with a comparison of the responses while highlighting the beneï¬ts of disturbance cancellation. 3.1 Controller Design In this section we present the control problem at hand and two different controllers to achieve the desired response. Recall the linearized state model of the ROTPEN is given 18 by  0 0 1 0   0       b   0 a a23 0     22 A=  , B =  2  0  0 0 0 1     b4 0 a42 a43 0 (3.1) 2 a22 = Mp lp rg/∆ a23 = −Jp Km Kb /(∆Rm ) a42 = −(Je q + Mp r2 )Mp glp /∆ a43 = Mp lp rKm Kb /(∆Rm ) b2 = Jp Km /(∆Rm ) b4 = −Mp lp rKm /(∆Rm ) The task here is to achieve Gantry control; a controller where the arm angle, θ, can track a given reference, while minimizing movements in the pendulum angle, α. Speciï¬cally the desired speciï¬cations are as follows: • θ(t) tracks a given reference θr (t) with tp < 1.2s and ts < 2.3s • |α(t)| < 7.5â—¦ and ts < 6s • u = Vm < 5V There are many control laws that can achieve this goal. Quanser suggests a linear state feedback controller. With only the positions of the arm and pendulum available, their speeds are found by passing the measured signals through the ï¬rst order transfer function 50s . s + 50 19 (3.2) The pole of (3.2) is chosen far enough to the left such that it does not affect the system response. The control Ë™ u = −K1 (θ − θr ) − K2 θ − K3 α − K4 α Ë™ (3.3) where K = [K1 K2 K3 K4 ] is found using LQR. Using only a linear controller is satisfactory, but is deï¬cient in compensation of any unknown disturbances in the links. We propose using a ï¬fth order EHGO to overcome this deï¬ciency. Here, we present an adjustment to the method mentioned in section 2.1.1 of Chapter 2. The need for an adjustment arises from the fact that the system is underactuated. For fully actuated systems method [6] suggests estimating the disturbance and then using the estimate in the control to cancel the existing disturbance. However, in underactuated mechanical systems such as the ROTPEN, disturbance may exist in either or both the links. We could use the EHGO to estimate the disturbance and cancel it from one of the two links. This raises a problem. Although cancellation of disturbance occurs in one of the links, it is being added to the other because the same control appears in both links. Let us reconsider the ROTPEN, x1 = x2 Ë™ x2 = a22 x2 + a23 x3 + b2 u + d2 Ë™ x3 = x4 Ë™ x4 = a42 x2 + a43 x3 + b4 u + d4 Ë™ where d2 and d4 are unknown disturbances in the arm and pendulum angle equations respectively. If the disturbance d4 and the coefï¬cients a42 , a43 and b4 had been known 20 exactly, the control u=− 1 (a x + a43 x3 + d4 ) + v b4 42 2 (3.4) could have been chosen to reduce the system to x1 = x2 Ë™ x2 = Ë™ a22 − b2 a42 b4 x2 + a23 − b2 a43 b4 x3 + b2 v + d2 − b2 d4 b4 (3.5) x3 = x4 Ë™ x4 = b4 v Ë™ where v = φ(x) is a linear state feedback controller designed for the system (3.5). This control could be beneï¬cial if the new disturbance in the arm b d2 − 2 d4 < d2 . b4 (3.6) However equation (3.4) is unrealizable because the system parameters and the disturbances are unknown exactly. Next we design a ï¬fth order observer, to estimate the disturbance d4 . To do so we replicate (3.1) and augment it with the disturbance estimator term. However, since a22 , a33 , a42 and a43 are not known exactly, they can be lumped in as disturbances in the arm and pendulum equations as well. The observer will then be α Ë™ ˆ x1 = x2 + 1 (x1 − x1 ) ˆ ε α Ë™ x2 = u + 2 (x1 − x1 ) ˆ ˆ ε2 α Ë™ x3 = x4 + 1 (x3 − x3 ) ˆ ˆ ε α Ë™ x4 = ˆ4 u + σ + 2 (x3 − x3 ) ˆ b ˆ ˆ ε2 (3.7) (3.8) α Ë™ σ = 3 (x3 − x3 ) ˆ ˆ ε3 Here (3.7) is a second order high-gain observer (HGO) used to estimate the arm angle and its derivative. While (3.8) is a third order EHGO, designed using the method in [6], 21 to estimate the pendulum angle, its derivative and the disturbance. The augmented state σ is an estimate of the disturbance d4 in the pendulum angle x3 , and any error in the ˆ nominal right hand side. The control can now be chosen as u=− 1 (−ˆ − φ(ˆ)). σ x ˆ b4 (3.9) where φ(ˆ) is a linear state feedback controller designed for (3.5). We have now shown x two different control schema’s that could be implemented to achieve gantry control. In the next section we present the results of using (3.9) and (3.11) and compare them. 3.2 Results Here, we discuss the results of using each controller. The Q and R weighing matrices are chosen as   11 0 0 0    0 0.8 0 0    Q= ,R = 1  0 0 0 0   0 0 0 12 (3.10) The choice of (3.10) produces controller gains   2.24    1.03    K=   13.56   0.75 and guarantees that the desired specs are met. The control is thus Ë™ u = −2.24(θ − θr ) − 1.03θ − 13.56α − 0.75α Ë™ 22 (3.11) This choice places the eigenvalues of the system at −48.02 −3.58 (3.12) −1.49 ± j4.52 The results of this controller will be presented after the other control technique is presented. Before the disturbance cancelation technique is applied, condition (3.6) must be satisï¬ed. If this condition is not satisï¬ed, the added disturbance would increase the arm’s inherit disturbance and cancellation must not be used. To estimate the disturbance in each link we use a third order observer designed using the method in [6], α Ë™ ˆ x1 = x2 + 1 (x1 − x1 ) ˆ ε α Ë™ x2 = b2 u + 2 (x1 − x1 ) ˆ ˆ ε2 α Ë™ σa = 3 (x1 − x1 ) ˆ ˆ ε3 (3.13) α Ë™ x3 = x4 + 1 (x3 − x3 ) ˆ ˆ ε α Ë™ ˆ x4 = b4 u + 2 (x3 − x3 ) ˆ ε2 α Ë™ σp = 3 (x3 − x3 ) ˆ ˆ ε3 (3.14) We design α1 = 6, α2 = 11, and α3 = 6. This choice assigns the poles of each EHGO at −3/ε, −2/ε, −1/ε. The parameter ε is taken as ε = .02. This is a good choice of ε as it is small enough to closely estimate the the position and speed but also large enough so that there is little to no effect from measurement noise [13]. The state space representation of each observer is thus     −300 0 0 300 0     ˆ ˆ Aθ =  −27500 0 1 Bθ =  27500 38.58     −750000 0 0 750000 0 23 (3.15) Figure 3.1: Estimate of the disturbance in the arm, d2     300 0 −300 0 0     ˆα =  −27500 0 1 Bα =  27500 9.9 ˆ A     −750000 0 0 750000 0 (3.16) We use (3.15) and (3.16) to estimate the disturbance in the arm and the pendulum respectively. The estimate of d2 and any error in the right-hand side is shown in Fig.3.1. The estimate of the disturbance in the pendulum, d4 and any error in the right-hand side is shown in Fig. 3.2. By inspection we can see that (3.6) will be satisï¬ed since d2 < 0 and d4 < 0. However, to show the reduction in the inherit disturbance, the new disturbance in the arm is shown in Fig.3.3. Now that it is veriï¬ed that condition (3.6) is veriï¬ed we proceed to implement the ï¬fth-order observer proposed in (3.7) and (3.8). We use the same values for the parameters as (3.15) and (3.16). This choice assigns the √ poles of (3.8) at −3/ε, −2/ε, −1/ε and the poles of (3.7) at −3± 2 . The state model ε 24 Figure 3.2: Estimate of the disturbance in the pendulum, d4 Figure 3.3: Estimate of the new disturbance found in the arm angle 25 of the observer is thus  −300 1   −27500 0  ˆ  A =  −300 0   −27500 0  −750000 0     1 0 300 0 0 0 0      0 1  27500 38.58 0 0 0     ˆ   ˆ  0 C =  0 0 0 1 0 , B =  300      0  27500 9.9  0 0 1     0 0 750000 0 0 0 0 0 0 0   0 0 0   1 0 0  0 1 0  0 0 1 (3.17) Now that we have estimates of the speed of the arm and the pendulum we can design an output feedback controller for the system in (3.5). We design the poles of the target system to be close to the dominant poles of the closed loop system designed by Quanser in (3.12) Using pole placement and Matlab we design φ(ˆ) from (3.9) to be x φ(ˆ) = 3.3166x1 + 22.4640ˆ2 + 1.1224x3 + .003ˆ4 . x x x (3.18) From (3.9) the ï¬nal control to be implemented is thus u=− 1 (−ˆ − φ(ˆ)) σ x 9.9 (3.19) which places the eigenvalues of the closed loop system at −34.0764 −6.5251 (3.20) −1.3603 ± j3.9599 Recall, that it is important to saturate the control to protect the system from peaking. However, in practice the output states of the observer can be saturated before entering the control. This guarantees that the peaking phenomenon does not occur and allows for a less conservative bound on the control. In this application in particular a bound on the speed of the arm and pendulum was found from observing the output of (3.2). The saturation on σ was done through tuning. We now compare the results of using each ˆ controller. 26 Comaprison The reference to the arm angle is a square signal of amplitude 60â—¦ and frequency of 0.1Hz. To reduce any sharp changes in the reference, it is smoothed using the ï¬rst order low pass ï¬lter 10 . s + 10 The responses using only state feedback without any disturbance reduction are shown in Fig. 3.4 and Fig. 3.5. Fig. 3.4 shows the response of the arm angle θ given the reference and Fig. 3.5 displays the response of the pendulum angle α. When using the EHGO for disturbance estimation and cancellation to make sure the choice of ε is appropriate we compare the estimate of the speeds to those found by Quanser. Fig. 3.6 compares the measured position x1 to the estimated position x1 . Fig. 3.7 displays a comparison ˆ between the speed of the arm found using the ï¬rst order ï¬lter in equation (3.2), and the estimate of the speed found using the EHGO. The comparison between the estimated speeds of the pendulum is shown in Fig.3.9. It can be seen from Fig. 3.6-3.9 that the observer is working well. Figure 3.4: θ with no disturbance estimation used 27 Figure 3.5: α with no disturbance estimation used Figure 3.6: Comparison between ’theta’, the measurement of the arm angle, and ’theta hat’, its estimate using (3.17) Now that we know the observer’s estimates are comparable to those found by Quanser, let us look at the response when disturbance cancellation is utilized. Looking at Fig.3.5 and Fig.3.11 we see that the maximum motion of alpha was reduced by a half 28 Figure 3.7: Comparison between ’theta dot’, the estimated speed of the arm using (3.2), and ’theta dot hat’, the estimate found using (3.17) Figure 3.8: Comparison between ’alpha’, the measurement of the arm angle, and ’alpha hat’, its estimate using (3.17) 29 Figure 3.9: Comparison between ’alpha dot’, the estimated speed of the arm using (3.2), and ’alpha dot hat’, the estimate found using (3.17) when we canceled the disturbance in the pendulum and thus achieving better gantry control. Fig. 3.10 shows the response of the arm angle when the disturbance is canceled. By comparing Fig. 3.4 to Fig. 3.10, we can see that x1 has a smoother response. The rise time and settling time are also reduced. 30 Figure 3.10: x1 with disturbance cancelation. Figure 3.11: x3 with disturbance cancelation. Conclusion In this chapter we discussed the use of the EHGO for disturbance estimation and cancelation in an underactuated mechanical system. We demonstrated the beneï¬ts of using disturbance cancellation in a gantry control problem by applying it on the ROTPEN. 31 Our results showed improvement in system performance and a substantial reduction in the disturbance present in each link. Our experiment raises other questions of interest. For instance, we ran the same experiment but chose to estimate the disturbance in the arm angle instead of the pendulum angle measurement of the ROTPEN. The outcomes showed the same type of results we demonstrated in above. The disturbance in the pendulum angle was reduced as a by product of cancelation of the disturbance in the arm angle. The responses also showed the same enhanced transient performance recovery. This chapter offers a check for control engineers dealing with underactuated mechanical systems in practice. If the condition that the new disturbance is less than the inherit disturbance does not check, then a different control technique must be used. However, if this condition checks, then disturbance cancellation could be done using simpler techniques, such as the EHGO. 32 CHAPTER 4 Comparison of Extended High-Gain Observer and Sliding-Mode Observer using the DCMCT In this chapter the goal is to compare the performance of two disturbance estimators, the Extended High-Gain Observer (EHGO) and the Sliding-Mode Observer (SMO). The application of disturbance estimators on mechanical systems is important in understanding the limitations and dynamics of each observer design. Measurement noise and system speciï¬cations limit the realization of some theoretical requirements. However, observers can be tuned to achieve the best response possible for the speciï¬c conditions. We apply the EHGO and the SMO to the DC Motor Control Trainer (DCMCT) and tune their parameters to achieve the best response observed. The design of each observer will be demonstrated, then the results will be presented for each experiment. This chapter concludes with a comparison of the two observers. 33 4.1 Observer Design In this section we design EHGO and SMO for the DCMCT. Recall from Chapter 2 that the state model form of the DCMCT is given by x1 = x2 Ë™ x2 = − Ë™ k2 k x2 + (u + d) Rm J RmJ where d is the matched inherent disturbance due to uncertainty and unmodeled dynamics. The task here is to achieve position control. We would like x1 to follow a speciï¬c reference with the fastest possible rise-time and lowest steady-state error. First we present the Proportional Integral Derivative (PID) controller designed by Quanser to achieve the desired response. Since x2 is not available Quanser estimates the speed using the ï¬rst-order transfer function 250s . s + 250 (4.1) The pole of (4.1) is chosen far enough to the left such that it does not affect the system response. For a given reference xr the PID control is u = −ki (x1 − xr ) − kp (x1 − xr ) − kd x2 (4.2) where the gains ki , kp , and kd are found by tuning. The inherent disturbance is not very large in the DCMCT and its effect on the transient response may not be so detrimental to the system’s performance. We introduce a matched external disturbance de = 5V to perturb the system’s performance. The system equations thus become x1 = x2 Ë™ x2 = − Ë™ k2 k x2 + (u + d + de ) Rm J RmJ 34 (4.3) As will be seen in Section 4.2, using only PID control is satisfactory but the response could be enhanced when disturbance estimation and cancellation is utilized. Next, we describe the design of the EHGO to use with the DCMCT. Extended High-Gain Observer Design To design an EHGO to estimate the speed, x2 , and any inherent disturbance in the system, we replicate the state equations adding the error terms and augmenting the system with the disturbance term as follows: α Ë™ ˆ x1 = x2 + 1 (x1 − x1 ) ˆ ˆ ε α k k2 Ë™ x2 + ˆ (u + σ ) + 2 (x1 − x1 ) ˆ ˆ x2 = − ˆ Rm J RmJ ε2 α3 Ë™ σ = ˆ (x1 − x1 ) ˆ k ε3 RmJ (4.4) thus, the feedback linearization control is u = −ˆ − σ 1 k2 ( x − Ï…) ˆ k Rm J 2 Rm J (4.5) and the closed loop system is reduced to Ë™ x1 = x2 ˆ ˆ (4.6) Ë™ x2 = Ï… ˆ where Ï… = K x is a linear output feedback controller designed for (4.6). Next, we ˆ design the SMO for the DCMCT. Sliding-Mode Observer Design The design of the SMO is similar to the EHGO in that it is a replication of the plant equations with the added error terms. The sliding-mode observer design and its ï¬lters 35 are Ë™ x1 = x2 + M0 sgn(y − x1 ) ˆ ˆ ˆ k k2 Ë™ x2 + ˆ [u + M1 sgn(z1 )] x2 = ˆ Rm J RmJ Ï„1 z1 = −z1 + M0 sgn(y − x1 ) Ë™ ˆ (4.7) k Ï„f zf = −zf + Ë™ M sgn(z1 ) RmJ 1 (4.8) Similar to the technique in the EHGO the control is chosen as u = −zf − 1 k2 ( z − Ï…) k Rm J 1 Rm J (4.9) where Ï… = K x is a linear output feedback controller designed for (4.6). To ensure that ˆ the estimation error will go to zero we choose M0 > |x2 | (4.10) M1 > |d| The ï¬lter time constants, Ï„1 and Ï„f must be chosen appropriately to capture the desired estimates. The theory behind the choice of the constants M0 and M1 is not very well deï¬ned. The best choice was made through tuning the parameters online during the experiments. In section 4.2 we show that using constant gains for M0 and M1 does not produce the desired results. We suggest using the estimates from the EHGO to drive the terms M0 and M1 . To do so , we implement a third-order EHGO, the same one described in (4.4), to estimate the speed and the disturbance. The choice of M0 and M1 becomes M0 = |ˆ2 | + c1 x (4.11) M1 = |ˆ | + c2 σ where x2 is the estimate of x2 and σ is the estimate of the disturbance found using ˆ ˆ the EHGO. The constants c1 and c2 are chosen to ensure (4.10) is satisï¬ed. Equations 36 (4.7) and (4.8) represent ï¬rst-order low-pass ï¬lters, whose outputs are the estimates of x2 and d respectively. As will be seen in Section 4.2, using ï¬rst-order low-pass ï¬lters is inadequate when we introduce an external disturbance. For a faster roll-off slope we choose to implement second-order low-pass ï¬lters to estimate x2 and d. The secondorder low-pass ï¬lters have the equations z1 = z2 Ë™ Ë™ 2 2Ë™ Ë™ ˆ Ï„1 z2 = −z1 − √ Ï„1 z2 + M0 sgn(y − x1 ) 2 (4.12) zf = zf 2 Ë™ Ë™ 2 k 2Ë™ Ï„f zf 2 = −zf − √ Ï„f zf 2 + M sgn(z1 ) Ë™ RmJ 1 2 The exact choice for these parameters will be discussed in the next section. 4.2 Implementation and Results In this section we show the exact controllers for each experiment. We discuss the reasoning behind the chosen parameters in each case. Then we present the results of each experiment. The state-space representation of DCMCT is A= 0 0 −16.684 1 B= 0 511.8543 (4.13) With no disturbance cancellation, the gains of the PID controller presented in (4.2) were found through tuning to be ki = 2, kd = .025, kp = 2 placing the eigenvalues of the closed-loop system at −1.0295, −14.2275 ± j28.1421. 37 The response of using only PID control is shown in Fig.4.1. For a better view of the transient response a close-up is shown in Fig.4.2. The control is shown in Fig.4.2. The response using only PID is satisfactory has a slow rise-time, no overshoot and steadystate error. We now look at the reponse using only PID when an external matched disturbance de = 5V is introduced. The response of (4.3) using only PID control is shown in Fig.4.4 and a close-up of the Figure 4.1: Response of x1 with only PID control. transient response is shown in Fig. 4.5 respectively. The control is shown in Fig. 4.6. It can be seen that the control effort is increased while the response suffers from a slow rise time and a large steady-state error. Next, we will use the EHGO and the SMO to estimate the inherent disturbance and cancel it, followed by estimation and cancellation of the external disturbance, de . 38 Figure 4.2: Close up of transient response of x1 with only PID control. Figure 4.3: Control with only PID control. 39 Figure 4.4: Response of x1 with de = 5V using only PID control. Figure 4.5: Close-up of response of x1 with de = 5V using only PID control. Extended High-Gain Observer We now implement EHGO to the DCMCT to estimate the inherent disturbance and cancel it in the control. We design α1 = 6, α2 = 11, and α3 = 6. This choice assigns the poles of the EHGO at −3/ε, −2/ε, −1/ε. Here, the parameter ε is taken as ε = .01. 40 Figure 4.6: Control with de = 5V using only PID control. This is a good choice of ε as it is small enough to closely estimate the speed but also large enough so that there is little to no effect from measurement noise [13]. The third order EHGO is     −600 0 0 600 0     ˆ ˆ A =  −11000 −16.684 511.8543 B =  110000 511.8543     −11722.08 0 0 11722.085 0 (4.14) The estimates of x1 and x2 are shown in Fig.4.7 and Fig.4.8 respectively. It can be seen from these ï¬gures that the observer produces good estimates of the states. Now that it can be seen that the estimates from the observer are good we design the control described in (4.15) for the DCMCT. Substituting for the values of each parameter we get u = −ˆ − σ 1 (16.684ˆ2 − Ï…) x 511.8543 (4.15) where Ï… = 994.3995x1 + 28.544ˆ2 x 41 (4.16) Figure 4.7: Comparison between x1 and its estimate, x1 using (4.14) ˆ was designed using pole placement to assign the eigenvalues of the closed loop system at −14.2275 ± j28.1421. The response of x1 when using an EHGO to estimate and cancel the disturbance is shown in Fig. 4.9. For a clearer view, a close-up of the transient response is shown in Fig.4.10. The control and the estimate of the disturbance, σ , are shown in Fig.4.11 and ˆ Fig.4.12 respectively. We can see from Fig.4.1 and Fig.4.9 that disturbance cancellation using the EHGO is beneï¬cial to the response of the DCMCT. We see a faster rise time and a smaller steady-state error than when only using PID control with no disturbance rejection. We are now interested in the performance of the EHGO with a larger disturbance. We introduce the external matched disturbance, de = 5V , to the system and investigate the 42 Figure 4.8: Comparison between x2 using 4.1 and x2 using (4.14) ˆ Figure 4.9: The response of x1 using EHGO. 43 Figure 4.10: A close-up of the transient response of x1 using EHGO. Figure 4.11: Control using EHGO. 44 Figure 4.12: Estimate of the inherent disturbance using EHGO. results. Recall, with the introduction of de the system equations have now become x1 = x2 Ë™ x2 = − Ë™ k2 k x2 + (u + d + de ) Rm J RmJ We will use the same EHGO described in (4.14) and the control in (4.15). The only difference is in the estimated disturbance. The disturbance estimator σ is an estimate of ˆ d + de . The response using an EHGO with an external matched disturbance is shown in Fig.4.13 and a close-up is shown in Fig.4.14. It can be seen that the transient response is better with disturbance cancellation used. We see a lower steady-state error and a faster rise time. The estimate of the disturbance is shown in Fig.4.15, it can be seen that its value is close to the sum on the inherent disturbance,d, estimated in Fig.4.12 and the external matched disturbance de = 5V . Next, we design the SMO for the DCMCT and present the results of its use. Sliding-Mode Observer We now implement the SMO to the DCMCT and observe the response. Recall from 45 Figure 4.13: Response of x1 with de = 5V using EHGO. Section 4.1 the SMO observer equations are given as Ë™ x1 = x2 + M0 sgn(y − x1 ) ˆ ˆ ˆ k2 k x2 = Ë™ x2 + ˆ [u + M1 sgn(z1 )] Rm J RmJ Ï„1 z1 = −z1 + M0 sgn(y − x1 ) Ë™ ˆ Ï„f zf = −zf + Ë™ k M sgn(z1 ) RmJ 1 A good choice for M0 and M1 was hard to ï¬nd using tuning. To get a better idea of how to choose these gains we use the estimates of the speed and the disturbance found using the EHGO to ï¬nd a lower bound on M0 and M1 . Using Fig. 4.8 we choose M0 = 60. From Fig. 4.12 we choose M1 = 5. The choice of the ï¬lter time constants Ï„1 and Ï„f was done through tuning. The best choice we could ï¬nd for the ï¬rst order ï¬lters (4.7) and (4.8) were Ï„1 = .09 and Ï„f = .008. The estimates of the observer with Ï„1 = .09 and Ï„f = .008 and gains M0 = 60 and M1 = 5 are shown in Fig. 4.16 and 46 Figure 4.14: Close-up of transient response of x1 with de = 5V using EHGO. Fig. 4.17. Though the SMO yields a good estimate of x1 , it can be seen from Fig.4.17 that z1 is not a good estimate of the x2 .The response when using constant gains is shown in Fig.4.18. We see a large overshoot and steady-state error. A close of the transient response and the steady state error when the reference goes low is shown in Fig.4.19. The control is shown in Fig.4.20 and the estimated disturbance is shown in Fig. 4.21. Comparing Fig.4.21 and Fig.4.12 we see that the choice of a constant M1 affects the estimate of the inherent disturbance d. The value of d is not constant and the choice of a constant M1 cannot account for the variations in d. Choosing a constant gain is not appropriate when the disturbance is time-varying. We investigate the use of timevarying gains as discussed in Section 4.1. 47 Figure 4.15: Estimate of overall disturbance with de = 5V using EHGO. We now look at the performance of the SMO using time-varying gains for M0 and M1 . The estimate of x2 when using the time-varying gains in (4.11) is shown in Fig.4.22. It can be seen that a better estimate is found using (4.11) for M0 and M1 . The response and a close-up of the transient are shown in Fig.4.23 and Fig.4.24 respectively. We can see that the response using the SMO with time-varying gains had a faster rise time and less steady-state error than when only using a PID controller as Quanser suggests. The control is shown in Fig. 4.25 and the estimate of the inherent disturbance is shown in Fig.4.26. From Fig. 4.25 and Fig.4.26 we can see that the estimate of the disturbance and the control account for the varying values of d. We now investi- gate the performance of the SMO when an external matched disturbance de = 5V is introduced. Note that zf will be an estimate of the sum of the inherent disturbance and de . As discussed in Section 4.1 the use of ï¬rst-order low-pass ï¬lters is inadequate 48 Figure 4.16: Comparison between x1 its estimate, x1 using SMO with constant gains ˆ when de is introduced. The response using ï¬rst-order ï¬lters is shown in Fig.4.27. The effects of the slow response of a ï¬rst-order low-pass ï¬lter could be seen in Fig.4.27. The oscillations in the response are caused by the chattering nature of the SMO. To ï¬x this issue we use the second-order low-pass ï¬lters presented in (4.12) to estimate the overall disturbance and reach a desirable response. Using the same ï¬lter time constants Ï„1 = .09 and Ï„f = .008 we implement the second-order ï¬lters. The response is shown in Fig.4.28 and a close-up of the transient is shown in Fig.4.29. The estimate of the overall disturbance is shown in Fig.4.30. It can be seen that the response has a faster rise time with a little bit of overshoot, and we achieve better steady-state error than with no disturbance cancellation, shown in Fig.4.4. As expected we’ve shown that using the EHGO and the SMO for disturbance cancellation enhances the response of the system. Our main interest, however, is how well each observer performers. In the next section 49 Figure 4.17: Comparison between x2 using 4.1 and z1 using SMO with constant gains Figure 4.18: Response using SMO with constant gains. 50 Figure 4.19: Close-up of response using SMO with constant gains. Figure 4.20: Control using SMO with constant gains. we compare the performances of the SMO and the EHGO in each scenario tested. 4.3 Comparison We start the discussion by comparing the response of the system in each scenario given each observer. When estimating and canceling the inherent disturbance we achieve 51 Figure 4.21: Estimate of inherit disturbance using SMO with constant gains. a better response using the SMO. Comparing Fig.4.10 and Fig.4.24 we see a better steady-state error when using SMO at a cost of a slight overshoot. One of the reasons a larger steady-state error is observed when using the EHGO, is the fact that the parameter ε could not be pushed smaller without seeing the effects of measurement noise. Theoretically we expect the steady-state error to go to zero as ε goes to zero, which is not realizable in application. The rise time and settling time of each response is very similar. In the presence of a larger matched disturbance the response when using the EHGO was more desirable. Comparing Fig.4.14 and Fig.4.29 we see about the same amount of overshoot but a faster settling time when using the EHGO than the SMO. thought the SMO has a smaller steady-state error the settling time is too long. In the presence of only the inherent disturbance and in the presence of an external 52 Figure 4.22: Comparison between x2 using 4.1 and z1 using SMO with time-varying gains. disturbance the estimate of the unknown state and the disturbance was better done using the EHGO. Looking at Fig. 4.8 and Fig.4.22 we can see that the EHGO yields a very good estimate of the unknown state x2 when we compare it to the estimate found by Quanser. The low-pass ï¬ltering done to get the estimate of x2 does not account for any fast changes in x2 . If the cut-off frequency for the low-pass ï¬lter is increased we allow for more chattering in the response. For the SMO, that is the best estimate we could get in our experimental conditions. Finally and most importantly, it must be noted that the responses achieved using the SMO were only as good as they were because we used the estimates found using EHGO. Without a good understanding of the disturbance, for example knowledge of upper and lower bounds or whether or the the disturbance is time-varying, a good estimate cannot 53 Figure 4.23: Response using SMO with time-varying gains. be found using SMO. Even when the EHGO was utilized to drive the terms of the SMO the response was still pretty comparable to that using only the EHGO. It is superfluous to use the EHGO and the SMO together to produce results that are comparable to using only the EHGO. However, we did achieve lower steady state error in Fig.4.24 from utilizing both observers. If having a low steady-state error is necessary the two observers could be implemented together to produce the desired results. 54 Figure 4.24: Close-up of transient response using SMO with time-varying gains. Figure 4.25: Control using SMO with time-varying gains. 55 Figure 4.26: Estimate of inherit disturbance using SMO with time-varying gains. Figure 4.27: Response with de = 5V using SMO with time-varying gains. 56 Figure 4.28: Response of x1 with de = 5V using SMO with time-varying gains and second-order low-pass ï¬lters. Figure 4.29: Close-up of transient response of x1 with de = 5V using SMO with time-varying gains and second-order low-pass ï¬lters. 57 Figure 4.30: Estimate of overall disturbance with de = 5V using SMO with timevarying gains and second-order low-pass ï¬lters. 58 CHAPTER 5 Conclusion and Future Work In our work we investigated the use of the Extended High-Gain Observer (EHGO) with the Rotary Pendulum (ROTPEN), an underactuated mechanical system. The issue with disturbance rejection in underactuated mechanical systems is that cancelling disturbance from one link adds it to the other. We have shown a case where the added disturbance to the other links actually reduces the inherent disturbance. We use EHGO to estimate the disturbance in the pendulum of the ROTPEN and cancel it in the control. The added disturbance from the pendulum actually reduced the inherent disturbance in the arm. We were thus able to implement a simple controller to achieve better results than when no disturbance rejection was utilized. We have presented a check for control engineers working with underactuated mechanical systems. We can use the EHGO to estimate the disturbance in each link and test the possibility of the added disturbance being a reduction in the inherent disturbance. When this possibility checks, the use of a simple controller could be implemented. This idea could be applied to other underactuated mechanical systems and simple control schemes could be applied rather than complicated robust techniques. 59 We have also applied the Sliding-Mode Observer (SMO) and the EHGO to the DC Motor Control Trainer (DCMCT) and tested their performance in different scenarios. We have shown that the SMO is sensitive and needs a lot of tuning for good results. The EHGO, however, was simple with only two tuning parameters. Its implementation is simple and the responses it yielded were very comparable to those when using SMO. Both of these observers show improved results in system performance but the ease of design and implementation of the EHGO makes it a more desirable choice. Finally, our work could be used as a pedagogical tool in undergraduate teaching laboratories. The idea of inherent disturbances, those from unmodeled dynamics and model uncertainties is a very abstract idea. Moreover, the effect of these disturbances may be undesirable to system performance and there presence must be addressed in a teaching laboratory. We used Quanser’s [9] [8] educational platforms to estimate the disturbance and cancel it. Part of our work could be developed into a laboratory project where the students design disturbance observers, either SMO or EHGO, and implement them. The students will then have to tune their designs to achieve the best response possible. This will provide the students with a tangible idea of disturbance as they will be able to see its estimate. The ability to see the estimate will help the students better understand the concept of inherent disturbance because it has been shown that a visual concrete representation will help the students learn [2]. Since the students will have to tune their parameters online to get the best response they will have to use their problem solving skills to better understand the tuning process. In a problem-based learning environment such as this we expect students to have better retention of information [4]. Implementing this in an undergraduate teaching laboratory also provides opportunity to fulï¬ll multiple ABET accreditation outcomes [5] such as : 60 • outcome a: â€an ability to apply knowledge of mathematics, science, and engineering†• outcome b: â€an ability to design and conduct experiments, as well as to analyze and interpret data†• outcome k: â€an ability to use the techniques, skills, and modern engineering tools necessary for engineering practice†Outcome a is satisï¬ed through the design of the observer. Outcome b is realized in the implementation of the experiment and the tuning process of the observers. The use of LabView and the trainers developed by Quanser satisï¬es outcome k. Our work calls for more exploration of the use of disturbance estimators with underactuated mechanical system. It also invokes the comparison of other disturbance estimators so that conclusions on different observers and their use in different circumstances could be drawn. 61 BIBLIOGRAPHY 62 BIBLIOGRAPHY [1] J.H. Ahrens and H.K. Khalil. High-gain observers in the presence of measurement noise: A switched-gain approach. Automatica, 45(4):936–943, 2009. [2] J. Bransford. How people learn: Brain, mind, experience, and school. National Academies Press, 2000. [3] J. Davila, L. Fridman, and A. Levant. Second-order sliding-mode observer for mechanical systems. Automatic Control, IEEE Transactions on, 50(11):1785– 1789, 2005. [4] C. Dym, A. Agogino, O. Eris, D. Frey, and L. Leifer. Engineering design thinking, teaching, and learning. 2005. [5] R.M. Felder and R. Brent. Designing and teaching courses to satisfy the abet engineering criteria. JOURNAL OF ENGINEERING EDUCATION-WASHINGTON-, 92(1):7–26, 2003. [6] L.B. Freidovich and H.K. Khalil. Performance recovery of feedback-linearizationbased designs. Automatic Control, IEEE Transactions on, 53(10):2324–2334, 2008. [7] B.K. Kim and W.K. Chung. Advanced disturbance observer design for mechanical positioning systems. Industrial Electronics, IEEE Transactions on, 50(6):1207– 1216, 2003. [8] Quanser. Qnet gantry laboratory manual. 2004. [9] Quanser. Qnet position control laboratory manual. 2004. [10] A. Radke and Z. Gao. A survey of state and disturbance observers for practitioners. In American Control Conference, 2006, pages 6–pp. IEEE. [11] K. Shibayama, V. Kroumov, and A. Inoue. Robust control of underactuated inverted pendulum system in presence of unknown disturbances. In Modelling, Identiï¬cation and Control (ICMIC), The 2010 International Conference on, pages 349–353. IEEE. [12] V.I. Utkin, J. Guldner, and J. Shi. Sliding mode control in electromechanical systems, volume 9. CRC, 1999. 63 [13] L.K. Vasiljevic and H.K. Khalil. Error bounds in differentiation of noisy signals by high-gain observers. Systems & Control Letters, 57(10):856–862, 2008. [14] K.D. Young, V.I. Utkin, and U. Ozguner. A control engineer’s guide to sliding mode control. Control Systems Technology, IEEE Transactions on, 7(3):328–342, 1999. 64