A Simulator for Robust Attitude Control of Cubesat Deploying Satellites Giovanni Mattei, George Georgiou, Angelo Pignatelli, Salvatore Monaco Abstract The paper deals with the development and testing of a simulator of a robust attitude controller for a mothership satellite whose aim is to release Cubesats in low Earth orbits. The simulator is conceived in Matlab-Simulink c, while the controller is based on the quaternion attitude representation. The objective is to achieve point-to-point and slow tracking maneuvers, robustly with respect to sampling and delay on the control inputs. The performance of the proposed controller is tested through several simulations of different perturbed scenarios. Introduction In this work we develop a simulator in Matlab-Simulink c to validate and test a robust attitude controller intended to be used on-board of Cubesats deploying satellites, often referred to as motherships, whose aim is to release Cubesats in low Earth orbits (LEO). The controller is based on the quaternion attitude representation and it has to produce reference commands to reaction wheels which are conceived for Cubesats, thus having tight torque and momentum saturation limits. The controller should achieve point-to-point and slow tracking maneuvers robustly with respect to disregarded actuator dynamics, for instance the electrical dynamics of the dc motor drives of the wheels. Quaternion attitude representation was first introduced in [1], while nonlinear control of spacecraft has a long Sapienza - University of Rome, Italy, mattei@dis.uniroma1.it Sapienza - University of Rome, Italy, ggeorg@dis.uniroma1.it -, Italy, ing@angelopignatelli.it Sapienza - University of Rome, Italy, salvatore.monaco@uniroma1.it
story. Geometric methods were presented in [2, 3, 4] and [5], adaptive and passivity-based solutions were proposed in [6, 7, 8] and experimental results were shown in [9]. We propose simple proportional-derivative (PD) control laws exploiting the quaternion attitude representation to globally asymptotically stabilize the nonlinear spacecraft dynamics. Such control laws are easy to implement on the smaller on-board computers of Cubesats, which have limited computational capabilities and memory and should represent an efficient paradigm for future attitude control systems (ACS) of motherships. A sampling dependent extension of the PD control law allows to obtain another degree of robustness against large sampling periods of the control input, whose main effect is to delay the control intervention on system dynamics causing instability. Such extension is carried out by means of a corrector term constructed using the results on sampled-data nonlinear control presented in [10]. Single-rate and multi-rate applications of these results have been proposed in [11], [12] and [13]. Dynamic model In this section, we briefly recall the mathematical model of a rigid spacecraft actuated by three reaction wheels, which for simplicity we consider aligned with the body axes. For more details about the derivation of such model, the reader is referred to [5] and [11]. The kinematics of a rigid body can be described using the redundant and non-singular representation of Euler parameters, or unit quaternions [1], given by q 0 = cos Φ 2 and subject to the constraint q 1 q = q 2 = ε sin Φ 2 q 3 (1) q 2 0 + q T q = 1 (2) The equations (1) represent a transformation from the so-called axis-angle representation, where the attitude is given by a rotation Φ around the Euler axis ε. The kinematics of the spacecraft expressed in an inertial frame is thus given by ( ) q0 = 1 q 2 QT (q 0, q)ω (3)
where Q(q 0, q) = ( q, q 0 I + S(q)), (4) I is the identity matrix, ω is the angular velocity of the spacecraft with respect to the inertial frame expressed in the body frame, and the operator S( ), which applies to three-dimensional vectors x, is the skew-symmetric matrix 0 x 3 x 2 S(x) = x 3 0 x 1. (5) x 2 x 1 0 The dynamic equations of the rigid spacecraft with reaction wheels are given by [14] ω = J 1 S(ω) (J t ω + J r Ω) J 1 u r Ω = Jr 1 u r ω (6) where Ω is the angular velocity of the reaction wheels, u r is the torque applied, J is the inertia matrix of the main body, J r is that of the reaction wheels and J t is their sum, J t = J + J r. In the simulation model of the spacecraft, we also take into account the presence of the fast electrical dynamics characterizing the dc motor drives producing the actual torque u r to the reaction wheels. The control input u of the overall dynamics is thus filtered by the first-order dynamics u r = 1 τ u r + u. (7) The simulation model also considers the control input as the outcome of a process of sampling and zero-order holding (ZOH). This is done to reproduce the effect of a control law elaborated by a digital on-board computer, which updates every T c s, sampling period. Controller design We consider the problem of designing an attitude controller to achieve rest-to-rest and slow tracking maneuvers, robustly with respect to the electrical actuator dynamics, disregarded in control design. We specifically require the controller being robsut against high sampling times of the control input. The objective of the robust controller is to bring the attitude to a neighborhood of the desired quaternion obtaining practical robust global asymptotic stability (P-RUGAS, see [15] for details), mean-
ing that such neighborhood may be rendered arbitrarily small by suitably tuning the robust part of the controller. Stabilization Since the quaternion (q 0, q) describes the attitude of the satellite with respect to an inertial reference frame, it can be seen as the attitude error of the satellite with respect to a desired reference frame, which for simplicity we consider to be coincident with the inertial frame. As a consequence, the desired attitude is given by the quaternion origin (q r0, q r ) = (1, 0), so the control problem is reduced to a stabilization problem. The solution of such problem consists on a simple proportional-derivative controller on the quaternion and angular velocity of the system (1)-(6). In fact, as shown in [8], consider the Lyapunov function V = k p [ (1 q0 ) 2 + q T q ] + 1 2 ωt Jω + 1 2 (J tω + J r Ω) T (J t ω + J r Ω). (8) To simplify the analysis, let us introduce the new variable ξ = J t ω + J r Ω, whose time derivative is ξ = S(ω)ξ. Therefore, with k p > 0, the derivative of V along the trajectories of (1)-(6) takes the form V = ω T (k p q u r ) ξ T S(ω)ξ = ω T (k p q u r ) (9) where we have used the following property of skew-symmetric matrices for x, y vectors in R 3 : As a consequence, the choice x T S(x)y = x T S(y)x = 0. (10) u r = k p q + k d ω (11) ensure the convergence of (q 0, q) to the quaternion origin (q r0, q r ) = (1, 0) and of ω to zero thanks to the La Salle theorem. Moreover, Ω(t) is bounded and does not go to zero, as expected. Regulation In the more general case in which the reference quaternion is not the origin, but a constant attitude (q r0, q r ) corresponding to a desired restto-rest maneuver, the control law keeps the form of a PD controller, this
time proportional to the quaternion error ( ) ( e0 q0 q = T ) ( ) qr0. (12) e q q 0 I S(q) The quaternion error kinematics takes the form (see [8] for the details) ) (ė0 = 1 ė 2 QT (e 0, e)ω e (13) where ω e = ω ω r. The term ω r is proportional to the time derivative of the desired quaternion through the expression ( ) ω r = 2(q 0 I + S(q))(q r0 I + S(q r )) T qr0 Q(q r0, q r ), (14) q r where Q is defined as in (4). Since in this case the desired attitude quaternion is constant, the term ω r is zero and the error kinematics reduces to ) (ė0 = 1 ė 2 QT (e 0, e)ω. (15) The result, analogous to that of the stabilization case, is thus obtained by considering the Lyapunov function V = k p [ (1 e0 ) 2 + e T e ] + 1 2 ωt Jω + 1 2 ξt ξ (16) whose derivative along the trajectories of the system (15)-(6) is made negative semi-definite by choosing q r u r = k p e + k d ω (17) and global asymptotic stability of the desired equilibrium (q r0, q r ) is again guaranteed by the La Salle theorem, ensuring also lim t ω(t) = 0 and boundedness of Ω(t). Slow tracking In the slow-tracking case we assume a slowly varying desired attitude (q r0, q r ), such that ( q r0, q r ) 0, with negligible second time-derivative, which for simplicity we consider equal to zero: ( q r0, q r ) = 0. This time, the quaternion error kinematics is governed by (13), since the term ω r is nonzero. The angular velocity error dynamics is given by ω e = ω ω r = ω,
because ω r is zero due to the assumption that ( q r0, q r ) = 0 [16]. Using the same weak CLF (16) of the regulation case, we obtain V (e 0, e, ω, Ω) 0 with the control law u = k p e + k d ω e. (18) GAS of the desired trajectory (q r0, q r ) is guaranteed by the La Salle theorem: lim t ω(t) = 0 plus boundedness of Ω(t). Sampled-data corrected control law Note that the results obtained so far concerning global asymptotic stabilization are ideal, in the sense that they do not consider a sampled-data control input, nor the presence of the electrical dynamics driving the reaction wheels. However, it can be shown that practical - robust global asymptotic stability can be achieved if we consider a sampling dependent extension of the control laws introduced. Let us consider the single rate sampled-data equivalent model in the multi-input decoupled case [12], reproducing, at the sampling instants, the solution of (13) when the control variables u i (t) are kept constant over time periods of length δ, namely u i (t + τ) = u i (t) = u ik for 0 τ < δ, t = kδ, k 0, positive integer, with i = 1,..., p x i(k+1) = F δ i (x ik, u ik ) = e δ( f i +u ik ḡ) x ik. (19) We propose a kinematic corrector term to take into account the sampleddata implementation, exploiting the truncated Input-to-Lyapunov matching solution [17]. The first part of the controller is simply the emulated control law u d0 = u(e, ω e ) (ek,ω ek ) = (k p e + k d ω e ) (ek,ω ek ) (20) i.e. the continuous time controller u(e, ω e ) evaluated at the sampling instants kδ. The solution map with corrector term is the truncation at the first order in δ of the series expansion u d = u(x) + δ 2! u(x) + δ2 3! ü(x) + i 3 = u d0 + δ 2! u d1 + δ2 3! u d2 + i 3 δ i (i + 1)! ui (x) δ i (i + 1)! u di (21)
which for the spacecraft error kinematics gives u d = u d0 + k c δ 2 u d1 u d1 = u(e) ek = k p ė ek. (22) The stability obtained with this control law is practical, in the sense that the domain of convergence may be reduced by suitably tuning k p, k d and k c. Moreover, it is also robust since it explicitly deals with the presence of sampling and does not depend on system parameters, i.e. the corrector term is purely kinematic. Simulation environment To simulate the complete spacecraft dynamics, we used a block representation in Simulink c with embedded Matlab functions c to reproduce the spacecraft nonlinear behavior and the controller expression. In the Figure 1: Simulation diagram in Simulink c. simulation diagram, depicted in Fig.1, the spacecraft dynamics is in red, actuator dynamics in green, the sensor blocks, to be implemented in future works, are in light blue. The controller, in blue, closes the feedback loop and it is fed by the state of the system and by the reference generator, in orange. At right, in white, a visualization block containing the scopes where it is possible to observe the outputs of the simulations in real-time. We consider a spacecraft of mass m = 15 kg, with general geometry and full inertia tensor (kg m 2 ) 0.6 0.01 0.01 J = 0.01 0.58 0.009 0.01 0.00873 0.57
The actuators are a set of three CubeSat-conceived reaction wheels with the following limits, dimensions and time constants τ of the electrical drives. Table 1: Reaction wheels parameters max speed 6500 RPM max torque 6 mn m momentum 15 mn m s mass 115 g volume 43 43 18 mm τ 0.01 s Simulation results We consider a nominal scenario in which the input is sampled with sampling time T c = 0.1 s, typical of the relatively fast and reliable on-board computers of motherships, and a perturbed scenario at the higher sampling time of T c = 0.8 s. In both these cases, the initial conditions for the angular velocities of the main body are chosen to be 1 /s, to emulate, for instance the end of a detumbling phase with a steady-state error, in order to evaluate the robustness of the controller. The reaction wheels start at rest, thus Ω(0) = 0, and the initial attitude of the spacecraft is the quaternion origin. Nominal scenario T c = 0.1 s In the nominal scenario, we test the continuous-time controllers (17) and (18) designed to achieve regulation and slow-tracking maneuvers. At first, we simply demand rotations from 0 to 60 on the three axes, without a particular trajectory to follow (regulation). The gains of the control law (17) are chosen to be k p = 0.5 and k d = 5. Convergence time is about 50 s on the second axis, while it is doubled on the first and third axes (Fig. (2)-(3)-(4)-(5)) In the slow-tracking case, we demand rotations from 0 to 60 on the three axes, this time following an exponential reference trajectory which brings the zero attitude, expressed in rotation angles roll-pitch-yaw (φ - θ - ψ), to the desired one in 600 s. The gains of the control law (18) are chosen to be k p = 0.05 and k d = 0.5. Convergence time is about 300 s
φ(t), θ(t), ψ(t) rotation an- Figure 2: gles. Figure 3: q 0 (t), q(t) quaternions. Figure 4: u r (t) applied torques. Figure 5: ω(t) angular velocity of the main body. on all the three axes. Since this time the convergence starts in-track with the initial attitude conditions, the transient torques amplitudes are diminished by a factor two (Fig. (6)-(7)-(8)-(9)). Perturbed scenario T c = 0.8 s In the perturbed scenario, we consider the 0 to 60 maneuver of the regulation case, which has shown to put more in stress the reaction wheels, since they need to produce a higher transient torque. We compare the emulated controller, which is simply the continuous-time controller (17) evaluated at the sampling instants, with the robust sampling-corrected controller (22), that takes into account the presence of the sampling time of the on-board computer. The emulated controller cannot achieve the maneuver, since a nonnegligible steady state oscillation persists around the desired attitude values (Fig. (10)-(11)-(12)-(13)). On the contrary, the corrected controller works fine, ensuring the convergence to a small neighborhood of the desired attitude, thus P-RUGAS of the corresponding equilibrium (Fig. (14)-(15)-(16)-(17)).
φ(t), θ(t), ψ(t) rotation an- Figure 6: gles. Figure 7: q 0 (t), q(t) quaternions. Figure 8: u r (t) applied torques. Figure 9: ω(t) angular velocity of the main body. Figure 10: φ(t), θ(t), ψ(t) rotation angles. Figure 11: q 0 (t), q(t) quaternions. Figure 12: u r (t) applied torques. Figure 13: ω(t) angular velocity of the main body.
Figure 14: φ(t), θ(t), ψ(t) rotation angles. Figure 15: q 0 (t), q(t) quaternions. Figure 16: u r (t) applied torques. Figure 17: ω(t) angular velocity of the main body. Conclusions In this paper, we have developed a robust attitude controller for CubeSat deploying satellites actuated through CubeSat conceived reaction wheels. We have proposed easy-to-implement, intrinsically robust, proportionalderivative control laws to achieve rest-to-rest and slow tracking maneuvers. The control laws are based on the unit quaternion attitude representation and ensure global asymptotic stability of the closed-loop system. We have introduced a sampling dependent corrector term to improve performance at higher-than-nominal sampling times. Simulation results have shown the effectiveness of the proposed controllers at different sampling times. References [1] Ickes, B.P., 1970. A New Method for Performing Digital Control System Attitude Computations Using Quaternions AIAA Journal, Vol. 8, No. 1, pages 13-17. [2] Crouch, P.E., 1984. Spacecraft attitude control and stabilization: Applications of geometric control theory to rigid body models. Automatic
Control, IEEE Transactions on, 29(4), pp.321-331. [3] Dwyer, T.W., 1984. Exact nonlinear control of large angle rotational maneuvers. Automatic Control, IEEE Transactions on, 29(9), pp.769-774. [4] Aeyels, D., 1985. Stabilization by smooth feedback of the angular velocity of a rigid body. Systems & control letters, 6(1), pp.59-63. [5] Monaco, S. and Stornelli, S., 1985. A Nonlinear Feedback Control Law for Attitude Control, Algebraic and Geometric Methods in Nonlinear Control Theory, Edited by M. Hazewinkel and M. Fliess, Reidel, Dordrecht, Holland, pages 573-595. [6] Georgiou, G., Di Gennaro, S., Monaco, S. and Normand-Cyrot, D., 1991. On the nonlinear adaptive control of a flexible spacecraft. In Proceedings of the 1st ESA conference on spacecraft guidance, navigation and control systems, ESA SP-323. Noordwijk, The Netherlands (pp. 509-514). [7] Tsiotras, P., 1995, December. A passivity approach to attitude stabilization using nonredundant kinematic parameterizations. In Decision and Control, 1995., Proceedings of the 34th IEEE Conference on (Vol. 1, pp. 515-520). IEEE. [8] Di Gennaro, S., 2003. Passive attitude control of flexible spacecraft from quaternion measurements. Journal of optimization theory and applications, 116(1), pp.41-60. [9] Di Gennaro, S., Monaco, S., Normand Cyrot, D. and Pignatelli, A., 1997, February. Digital controllers for attitude manoeuvring: Experimental results. In Spacecraft Guidance, Navigation and Control Systems (Vol. 381, p. 439). [10] Monaco, S. and Normand-Cyrot, D., 2001. Issues on nonlinear digital control. European Journal of Control, 7(2), pp.160-177. [11] Di Gennaro, S., Monaco, S. and Normand-Cyrot, D., 1999. Nonlinear digital scheme for attitude tracking. Journal of guidance, control, and dynamics, 22(3), pp.467-477. [12] Mattei, G., Monaco, S. and Normand-Cyrot, D., 2015. Robust Nonlinear Attitude Stabilization of a Spacecraft through Digital Implementation of an Immersion & Invariance Stabilizer. IFAC Proceedings of the 1st MICNON Conference (PapersOnLine), 48(11), pp.4-9.
[13] Mattei, G., Di Giamberardino, P., Monaco, S. and Dorothe, N.C., 2014. Lyapunov Based Attitude Stabilization of an Underactuated Spacecraft with Flexibilities. In DYCOSS 2014 (p. 140703). [14] Di Gennaro, S., Monaco, S., 2007. Appunti di Modellistica e Controllo di Strutture Spaziali. [15] Mattei, G., Monaco, S., 2014. Nonlinear Autopilot Design for an Asymmetric Missile Using Robust Backstepping Control. Journal of Guidance, Control, and Dynamics 37.5: 1462-1476. [16] Di Gennaro, S., 2002. Output attitude tracking for flexible spacecraft. Automatica, 38(10), 1719-1726. [17] Monaco, S., Normand-Cyrot, D., and Tiefensee, F., 2010, June. Sampled-data redesign of stabilizing feedback. In American Control Conference (ACC), 2010 (pp. 1805-1810). IEEE.