Explicit solution of the ODEs describing the 3 DOF Control Moment Gyroscope
M. van Berkel DCT 2008.104
Traineeship report
Coach(es): dr. N. Sakamoto
Supervisor: Prof. dr. H. Nijmeijer
Technische Universiteit Eindhoven Department Mechanical Engineering Dynamics and Control Group
Eindhoven, October, 2008 Contents
Contents 3
1 Introduction 4
2 Theory of Hamiltonian and Integrable systems 5 2.1 Lagrangian and Hamiltonian ...... 5 2.2 Liouville integrability ...... 6 2.3 Cyclic coordinates and conserved quantities ...... 6 2.4 Poisson bracket ...... 6
3 Control Moment Gyroscope 7 3.1 Description of the Control Moment Gyroscope ...... 7 3.2 Lagrangian ...... 8 3.3 Hamiltonian and conjugate momenta ...... 9 3.4 CMG’s first integrals ...... 9 3.5 Solution in Integral form ...... 9
4 Dynamics of the CMG-system 11 4.1 Equilibrium points of the unperturbed system ...... 11 4.2 Libration ...... 12 4.3 Rotation ...... 14 4.4 Transition from libration to rotation ...... 14 4.5 Change of motion ...... 15 4.6 Special case of the equilibrium point ...... 15 4.7 Summary of the different kind of motions ...... 16
5 Construction of the solution 17 5.1 Constant q2 ...... 17 5.2 Libration of q2 ...... 18 5.3 Total rotation of q2 ...... 19 5.4 Special cases of q2 ...... 20 5.5 Result ...... 22
6 Optimal control of the CMG 24 6.1 Optimal Control problem ...... 24 6.2 Linear Optimal Control ...... 25 6.3 Nonlinear Sub-Optimal Control ...... 26
7 Conclusions and Recommendations 28
Bibliography 30
List of symbols 31
2 Contents
A Analytic solution for special cases 32 A.1 Solution for the case p1 = 0 ...... 32 A.2 Solution for the case p1 = 0 and p4 = 0 ...... 33
B Analysis of f(q2) 34 B.1 Denominator > 0 ...... 34 B.2 Extrema of f(q2) ...... 34 Max 35 B.3 Maximum q2 coincides with a zero if |2a| > |b| ...... Min 36 B.4 Minimum q2 coincides with a zero if |2a| > |b| ...... Min Max 36 B.5 Extrema q2 and q2 coincide with a zero if |2a| < |b| ......
C Numerical values used for the different parameters and simulations 37
3 Chapter 1
Introduction
In the control of many dynamical systems optimal control plays a important role. Many techniques have already been developed to solve these kind of problems. Next to this many extensions have been developed for instance LQR/LQG and H∞-control. Compared to linear optimal control, non- linear optimal control is still rarely applied. This is because most of the existing techniques are only successful when using some simple nonlinearities, even then it is still difficult and often time consuming to apply. However for highly nonlinear systems, optimal linear controllers do not work properly and as a consequence nonlinear optimal control needs to be applied. Therefore in [6] a method is proposed to find an approximation for the stabilizing solution of the Hamilton-Jacobi equation . The proposed method is based on the Hamiltonian perturbation theory. The idea behind this theory is to split the system into two parts, the uncontrolled system and the remaining terms (control). The remaining parts can be treated as a perturbation on the original system. The unper- turbed system (without control) needs to be integrable to solve it. With this solution the Hamilton equations can be substantially reduced making it possible to build an approximated nonlinear (sub-)optimal controller. This theory has already been shown to work for some simple nonlinear problems. However to show that the theory also works for more complicated problems a more difficult nonlinear setup has been chosen to design a nonlinear optimal controller by using this theory. The eventual goal is not only to show it to work in simulation but also that it is possible to use feedback to stabilize a real setup. This is the Control Moment Gyroscope system (CMG). Its normal function is the attitude control of spacecrafts. However in this case the control problem will be different. The CMG is a nonholonomic system. This will often lead to problems regarding to control. However in our case some of these properties can be exploited like the existence of cyclic coordinates. In this report the focus will lie on finding a solution of the restricted CMG without control. The solution can be used to synthesize the controller. First a small outline of this theory is given in Chapter 2. After this it will be shown that the system fulfills the necessary conditions to integrate it. Then the solution will be represented in integral form. This is done in Chapter 3. With the help of this solution, the different regimes of motion and equilibrium points are explained (Chapter 4). This is also needed to construct a solution for control purposes from the solution in integral form . After this it will be shown how to construct the solution and some of the results will be compared to the solutions found with ODE-solvers. Finally the perturbation theory can be used to derive a sub-optimal nonlinear feedback controller. How to do this is explained in Chapter 6.
4 Chapter 2
Theory of Hamiltonian and Integrable systems
Before a start can be made with solving the Control Moment Gyroscope system some theory needs to be introduced. Within the theory the system has to be split up in an uncontrolled part and a controlled part. A requirement is that the uncontrolled part is integrable. In this chapter some of the necessary theory about the Hamiltonian and integrability will be treated. This part is mainly based on the theory described in [2] and [3]. However there are many other books that treat these subjects.
2.1 Lagrangian and Hamiltonian
The starting point in general in studying and working with dynamics is the Lagrangian L.A different way to describe the dynamics of a system is the Hamiltonian representation. The main difference is that the Lagrangian equations of motion are expressed in second or- der differential equations, where the Hamiltonian equations of motion are expressed as first order equations. The consequence of this is that the number of equations is doubled with respect to the Lagrangian representation. This also means that the number of independent variables is dou- bled. In general the Lagrangian is already known therefore it is most common to transform the Lagrangian to the Hamiltonian. The Lagrangian depends on the independent variables qi and q˙i.
L = L (q1, q2, ..., qn, q˙1, q˙2, ..., q˙n) (2.1)
Whereas the Hamiltonian is a function of newly introduced independent coordinates pi and of qi. These pi are called conjugate momenta and are a function of qi and q˙i. These new coordinates pi together with the qi are called canonical variables. This means that the Hamiltonian has following form: H = H (q1, q2, ..., qn, p1, p2, ..., pn, ) (2.2) The conjugate momenta are defined as:
∂L(qi, q˙i) pi (q, q˙) = (2.3) ∂q˙j The Lagrangian L (q, q˙) can now be transformed to the Hamiltonian H (q, p). Using some algebraic operations on the conjugate momenta q˙i can be expressed as function of q and p,(q˙ (q, p)). The systematic transformation from the Lagrangian to the Hamiltonian representation is done with the help of the Legendre transformation: X H (q, p) = q˙i (q, p) pi − L (q, q˙ (q, p)) (2.4) i With this knowledge of H (q, p) also Hamiltonian equations of motions can be derived (2.5).
5 2.2. Liouville integrability
∂H ∂H q˙i = , p˙i = − , i = (1, ..., n) (2.5) ∂pi ∂qi Within this Hamiltonian formulation many extensions can be made in different directions.
2.2 Liouville integrability
In the last section the Lagrangian has been transformed to the Hamiltonian formulation. In this section the notion of integrability is introduced. Within the literature [2], [3] there are many forms of definitions given for Liouville integrability. However commonly following definition is used: A Hamiltonian system is completely integrable in the sense of Liouville if all constants of motion are in involution [2]. Another definition in [2] is: Two functions are in involution if their Poisson bracket is zero. The system needs to be integrable to solve it. Therefore the involution of the constants of motion needs to be checked to be sure it is integrable. A constant of motion is a quantity that is conserved throughout the motion. Another term often used for this is first integral. A constant of motion or first integral can be expressed as follows:
f (q1, q2, .., qn, q˙1, q˙2, .., q˙n) = constant (2.6) To be able to integrate a system all the first integrals (constants of motion) need to be found like the definition says. In reality the number of first integrals that need to be found is n, the degrees of freedom (2.5). In general the Hamiltonian is also a constant of motion because it is the conserved total energy of the system. Another way to find first integrals is with the help of cyclic coordinates.
2.3 Cyclic coordinates and conserved quantities
The easiest way to find first integrals is with the help of cyclic coordinates. A cyclic coordinate is defined as a coordinate qj that does not enter the Hamiltonian function (the same holds for the Lagrangian). In other words H or L are not a function of qj, however H can still be a function of q˙j. The nice property of this is that its belonging conjugate momentum pj is a constant of motion. This can be easily shown as follows: d ∂L ∂L d ∂L d − = = pj = 0 (2.7) dt ∂q˙i ∂qj dt ∂q˙i dt A different constant of motion is the total angular momentum. If the needed number of first integrals has been found, then it is necessary to check if they are in involution.
2.4 Poisson bracket
Two functions u(q, p) and v(q, p) are in involution if their Poisson bracket is zero, as was earlier stated. The Poisson bracket is defined as follows:
∂u ∂v ∂u ∂v (2.8) [u, v]q,p = − ∂qi ∂pi ∂pi ∂qi To check if the Hamiltonian system is integrable all combinations of the first integrals with each other and with the Hamiltonian need to vanish. The Poisson bracket of a first integral and the Hamiltonian is always zero, otherwise it would not be a first integral. This is because:
∂H ∂f ∂H ∂f ∂f ∂f df (2.9) [H, f]q,p = − =p ˙i +q ˙i = ∂qi ∂pi ∂pi ∂qi ∂pi ∂qi dt df If f is a first integral of H then dt ≡ 0. This theory will be used to check integrability of the Control Moment Gyroscope.
6 Chapter 3
Control Moment Gyroscope
In the last chapter the theory about integrable systems has been introduced. In this chapter this theory is used to try to solve the Control Moment Gyroscope system. Therefore first the systems model will be introduced. After this the Lagrangian and the Hamiltonian will be derived. Then the constants of motion are derived and they are used to find the solution of the system in integral form.
3.1 Description of the Control Moment Gyroscope
In figure 3.1 a schematic representation of the CMG can be seen.
Figure 3.1: Schematic representation Control Moment Gyroscope [4]
The CMG system consists of four gimbals respectively A, B, C and D. Within these gimbals there are four axis fixed. These are ai, bi, ci and di with unity vectors i = 1, 2, 3. At the base of the CMG a reference frame N is defined with orthogonal unit vectors Ni (i = 1, 2, 3). In this system there are four angles that can rotate. These are q1 in d2 direction, q2 in c1 direction, q3 in b2 direction and q4 in n3 direction. The angular velocities ωi are defined in the same directions as qi (i = 1, 2, 3, 4). These are also represented in figure 3.1. All centers of mass are situated at the center of disc D. The body’s D and C can be directly actuated through T1 and T2 (see figure 3.1). Body D can be actuated in d2 direction this corresponds to the rotation angle q1. Body C can be actuated in c1 direction that corresponds to the rotation angle q2.
7 3.2. Lagrangian
All angles qi (i = 1, 2, 3, 4) are observable because these angles are measured by encoders. The th elements Ix, Jx, Kx (x = A, B, C, D) are the scalar moments of inertia about the k (k= 1,2,3) direction respectively in bodies A, B, C, and D. Only the moments of inertia are considered and not the products of inertia. The zero positions resemble the positions as seen in figure 3.1 (qi = 0). On the real setup there is the possibility to lock b2 respectively q3. This opportunity will be used, so q3 is locked in zero position. This means no motion around this angle is possible anymore and thereby reducing the system to three degrees of freedom. In many articles and papers like [4] and [5], also a description of the Control Moment Gyroscope can be found.
3.2 Lagrangian
In case of the CMG the Lagrangian equals the kinetic energy because the potential energy is zero. For instance the gravity can be neglected in the system. Now the Lagrangian of the system without control can be calculated and is given: 1 L = J ω 2 + (I + I ) ω 2 + J − J cos2 (q ) ω2 + J ω ω sin (q ) (3.1) 2 d 1 c d 2 2 1 2 4 d 1 4 2 in which
J1 = Jc + Jd − Kc − Id and J2 = Ka + Jc + Jd + Kb with J1 < Jd < J2 (3.2) From the Lagrangian and the non-conservative forces, Lagrange’s equations can be derived. For completeness also the non-conservative quantities are added.
Jd(ω˙ 1 + ω˙ 4 sin (q2) + ω2ω4 cos (q2)) = T1 (3.3)
1 (I + I )ω ˙ − J ω2 sin (2q ) − J ω ω cos (q ) = T (3.4) c d 2 2 1 4 2 d 1 4 2 2