Switched Linear Control of a Model Helicopter H.Y Sutarto*, Agus Budiyono† *
Department of Aeronautics and Aerospace Engineering, Institut Teknologi Bandung Jl. Ganesha 10 Bandung 40132, Indonesia, Email:
[email protected] † Department of Aeronautics and Aerospace Engineering, Institut Teknologi Bandung Jl. Ganesha 10 Bandung 40132, Indonesia, Email:
[email protected] Abstract—A mini scale helicopter poses a difficult control problem due to its complex dynamics. Compared to its full-size counterparts, the model helicopter exhibits not only increased sensitivity to control inputs and disturbances, but also higher bandwidth of its dynamics. We specifically investigate the control for transition dynamics between hover and cruise by formulating the phenomena as a hybrid system. We consider piecewise quadratic Lyapunov-like functions that leads to linear matrix inequalities (LMIs) characterization for performance analysis and controller synthesis. State jumps of the controller responding to switched of plant dynamics are exploited to improve control performance. The transition control performance is demonstrated by SIMULINK and STATEFLOW and compared to that of LQR approach. Keywords—Hybrid systems, switched linear control, LMI, autonomous aerial vehicles
I.
INTRODUCTION
Autonomous flight control systems for helicopters present significant challenges due to their highly nonlinear and unstable nature. Helicopter is a nonlinear complex system comprising many modes in its flight trajectories where each mode has different characteristics. The presence of strong cross couplings and nonlinearities causes helicopters difficult to control. A conventional approach to the control synthesis is to linearize the nonlinear model in order to have a simple linear model for each mode. When wider region of flight envelope is considered, this approach leads to a switching problem representing a change from one mode to another mode. In general, a switched system is a hybrid dynamical system consisting of a family of continuous-time subsystems and a rule that governs the switching between them [1],[2]. These discrete switches of the continuous dynamics often have great influence on their performance. Because of their increasing practical importance, switched systems have been receiving more and more attention recently. This paper is concerned with a synthesis of switched control systems for model helicopter excited with external switches that bring changes of dynamics from hover to cruise by satisfying some constraint in the trajectories. We consider
1-4244-0342-1/06/$20.00 ©2006 IEEE
Endra Joelianto+ and Go Tiauw Hiong§+ +
Department of Engineering Physics, Institut Teknologi Bandung Jl. Ganesha 10 Bandung 40132, Indonesia, Email: Email:
[email protected] §School of Mechanical and Aerospace Engineering, Nanyang Technological University 50 Nanyang Avenue, Singapore 639798, Email:
[email protected] piecewise quadratic Lyapunov-like functions that leads to linear matrix inequalities (LMIs) for performance analysis and controller synthesis. State jumps of the controller responding to switched of plant dynamics are exploited to improve control performance. The transition performance is demonstrated and evaluated by SIMULINK and STATEFLOW. II.
DYNAMICS MODEL
The Yamaha R-50 helicopter nonlinear dynamics model has been developed at Carnegie Mellon Robotics Institute. The basic linearized equations of motion for a model helicopter dynamics are derived from the Newton-Euler equations for a rigid body that has six degrees of freedom to move in space. The external forces, consisting of aerodynamic and gravitational forces, are represented in a stability derivative form. Following [3], the equations of motion of the model helicopter are derived as follows for the fuselage and coupled rotor-fly-bar dynamics: -Fuselage: .
u = (− w0 q + v 0 r ) − gθ + X u u + X a a .
v = (− u 0 r + w0 p ) − gφ + Yv v + Y .
w = (− v0 p + u 0 q ) + Z w w + Z col δ col .
(1)
p = Lu u + Lv v + Lb b .
q = M uu + M vv + M a a r = N r r + N ped (δ ped − r fb ) .
.
r fb = K r r − K rfb r fb
- Rotor-fly-bar: .
τ f b = −b − τ f p + Ba a + Blatδ lat + Bd d + Blonδ lon .
τ f a = −a − τ f q + Abb + Alatδ lat + Ac c + Alonδ lon .
(2)
τ s d = −d − τ s p + Dlatδ lat .
τ s c = −c − τ s q + Clonδ lon
ICARCV 2006
• u• X 0 v u • 0 Yv p Lv q• Lu • Mu Mv φ 0 • 0 θ 0 0 0 τ f a• = 0 τ 0 0 f b• 0 • 0 w Nv r• 0 • 0 0 r fb 0 0 τ • sc 0 0 τ • s d 0 0 0 0 0 0 0 0 0 0 0 0 + Alat Alon Blat Blon 0 0 0 0 0 0 0 C lon 0 Dlat
Xa
0
0
0
0
g
−g 0
0
Yb
0
0
0
0
0
0
0
Lb
Lw
0
0
0
0
0
0
Ma
0
Mw
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
−τ f 0
0
0
Ab
0
0
0
0
0
−1 Ba
0
0
0
0
0
0
Za
−1 Zb
Zw
Zr
0
Np
0
0
0
0
0
Nw
Nr
N rfb
0 0
0
0 0
0 0
0 0
0 0
0 0
Kr 0
K rfb 0
0
0
0
0
0
0
0
0
0
0
0
0
0
−τ f 0
−τ s 0 Y ped 0 0 0 0 0 0 0 N ped 0 0 0
−τs 0
0 u 0 0 v 0 0 p 0 0 q 0 0 φ 0 0 θ Ac 0 τ fa 0 Bd τ fb 0 0 w 0 0 r 0 0 r fb − 1 0 τ sc 0 − 1 τ sd 0
0 0 0 M col 0 δ 0 lat δ 0 lon δ 0 ped δ Z col col N col 0 0 0 Figure 1. Parameterized state-space model
The full state space model of the R-50 dynamics is obtained by collecting all differential equations including equation (1)– (2) in matrix form: •
x = Fx + Gu
(3)
Where x is the state vector and u is the input vector. The system matrix F contains the stability derivatives; the input matrix G contains the input derivatives. The full state space
system is depicted in Figure 1.The dynamics of Yamaha R-50 helicopter is recast as a linear hybrid system model representing typical helicopter behavior consisting of two modes which are hover and cruise. Helicopter exhibits dynamic response differently in hover flight than it does in cruise flight. In the parameterized model, these differences do not significantly affect the model structure. The identified model parameters for hover and cruise-flight conditions are shown in [3]. The model will be used to elaborate the performance of switched linear control.
In the modeling stage, the trade-off between accuracy and simplicity is important. To design a high bandwidth control system, the effects of the rotor-fuselage coupling, for instance, must be accounted for explicitly. Meanwhile, a practical and insightful controller synthesis necessitates a simple enough model. In this model, the average trim condition for the cruise –flight experiments is u0=49.2 ft/sec, v0=-11 ft/sec, and w0=0 ft/sec. The accuracy of the identified linear model is excellent for large attitudes and large excursions from the nominal operating conditions. For examples, the helicopter reaches bank angles up to 40 degrees and pitch attitude up to 20 degrees. The cruise-flight experiments covered a range from 30 to 60 ft/sec. [3]. Typical helicopter flight mode is composed of (1) take-off, (2) hover, (3) ascent (4) descent (5) forward flight (6) bank-to-turn (7) pirouette (8) land. From this perspective, a flight scenario of a helicopter can be understood as a sequential combination of some of these modes. A flight scenario is used in this simulation comprises a hover and a forward flight mode. The hover mode is the most essential flight mode to be accomplished by the autopilot system because almost all flight scenarios go through the hover mode. The hover indicates the state where helicopter stays in the air with negligible speed and heading change and also all the loops in flight control loop are activated to stay at the given coordinate while tracking the reference heading. III.
HYBRID SIMULATION
A switched system is a hybrid dynamical system consisting of a family of continuous-time subsystems and a rule that governs the switching between them. These discrete switches of the continuous dynamics often have great influence on their performance. Stressing point in the scenario is how to handle the transition phenomena by the switched control and to evaluate the performance by the hybrid model simulation tools such as Stateflow from Matlab. Stateflow has the capability to generate events and to monitor invariant sets of continuous dynamics. This capability enables the interaction of discrete and continuous dynamics and makes the correct simulation of hybrid systems possible. Stateflow is a development tool and graphical design which works seamlessly with Simulink. Stateflow is a suitable environment for logical modeling used to control and evaluate a physical plant modeled in Simulink. Stateflow can model and simulate complicated dynamical system clearly and concisely by using finite state machine, flow diagram notations and state-transition diagram in one roof. In this simulation, the simplest flight scenario is chosen in order to focus only on the switching phenomena. At this stage, time is selected as the switching variable. In this flight mode switches, we investigate the performance change due to switching/discrete event that causes state jumps from hover to cruise by satisfying some constraint in the trajectories. The switched control is proposed to compensate the decreasing performance.
IV.
LINEAR SWITCHED SYSTEMS
As a result of the development in the area of convex optimization, we can now solve very rapidly many convex optimization problems for which no traditional “analytic” or “closed-form” solutions exist. Indeed, the solution of many convex optimization problems can now be computed in a time which is comparable to the time required to evaluate a “closed-form” solution for a similar problem. This fact, in our opinion, has far-reaching implications for engineers; it changes our fundamental notion of what we should consider as a solution to a problem. In the past, a “solution to problem” generally meant a “closed-form” or “analytic” solution. Recently, this concept of “solution” should be extended to include many forms of convex optimization that involve Linear Matrix Inequalities (LMIs). The critical challenge in practical hybrid system applications is finding appropriate Lyapunov functions that satisfy the stability conditions. Unfortunately, no general methods are available. However, for switched linear systems, there is an LMI problem formulation for constructing a set of quadratic Lyapunov-like functions. Existence of a solution to the LMI problem is a sufficient condition for hybrid system stability. A real advantage here is that LMI problems admit efficient and reliable numerical solutions with standard packages [4]. This main objective this paper is concerned with the synthesis of switched control system excited with external switches. Based on class of discontinuous Lyapunov-like functions, we conduct performance analysis of H ∞ -type cost for linear switched system. In the synthesis problem to derive an output feedback switching controller with guaranteed H ∞ type cost, we employ state jumps of the controller to improve stability and H ∞ type control performance. A.
Stability Analysis Let x(t ) ∈ R be the system state and x(t 0 ) = x0 n
be initial value. For each k, the state x(t ) is continuous in
t ∈ [t k , t k +1 ) and satisfies the following state equation •
x (t ) = Ai x(t ) + Bi w(t ), x (t k ) = x k
(4)
where w(t ) is a function of some adequate class. The initial value x k +1 for each interval is given by
( )
x k +1 = E hi x t k−=1 , h = i(k + 1)
(5)
( )
where k ≥ 0 and x s := lim t ↑ s x(t ) .The equation (5) represents possible state jumps of the system, which occur if E hi ≠ I . In equation (4)-(5), the state x(t ) : t ∈ 0, ∞ ) is −
[
uniquely determined up to {i (k )}k =0 , {t k }k =0 w(t ) and x0 . The above class of switched systems is a linear version of systems considered in [5]. Below we consider the function (6) switched Lyapunov function of piecewise quadratic form: ∞
∞
vi ( x ) = x T Pi x
Following the description of the paper [6],[7], we give an (7) with upper-bound for the optimal H 2 -type cost numerically tractable LMI conditions and give the LMI characterization as follow: ∧
P i ≥ 0, i ∈ I , α > 0, µ > 0,αTD > ln µ
(6)
∧ ∧T ∧ Q i = − A i − A∧ i − 2α P i Ci ∧
where Pi is a positive definite symmetric matrix. The
a = min i λ min (Pi ) and b = max i λ max (Pi ) and the above proposition is stated in terms of matrix inequalities for Lyapunov functions of piecewise quadratic form can be seen in [6] and then we only consider performance analysis for an H 2 type cost of linear switched systems. Let z (t ) = C i x (t ), t ∈ [t k , t k +1 ), i = i (k )
and
consider
− 2αTD R i = γe ∧ I Bi ∧
the
following H 2 -type cost:
γ * = inf γ
∧
S hi
in such that
1 2
(7)
∞ ∫ z (t ) 2 dt ≤ γ w0 , ∀w0 ∈ R m 0
∧ V Pi = i I
Consider a feedback control system under the external switching law. We represent the plant dynamics by • Bi1 Bi 2 x(t ) x(t ) Ai z (t ) = C i1 0 Di12 w(t ) (8) 0 u (t ) y (t ) C i 2 Di 21 n
input, u (t ) ∈ R
m1
p1
controlled output and y (t ) ∈ R is the measured output. The state jump of the plant is represented by
( )
x(t k +1 ) = E hi x t k−+1 , h = i(k + 1) .
The controller is given by (9): • c A c B c x c (t ) i x (t ) = ic 0 C u (t ) i y (t ) where x (t ) ∈ R
nc
c
c 0
∧
C i = [C i1Vi + Di12 Fi (9)
( ),
by x (t k +1 ) = E x t c hi
c
(12)
(13)
(14)
Ai + Bi 2 H i C i 2 Wi Ai + Gi C i 2
C i1 + Di12 H i C i 2 ]
∧ E hi E hiVi E hi = Z hi Wh E hi
(15)
(16)
(17)
(18)
is the state of the controller with initial
value x (t 0 ) = x . Denote the state jumps of the controller c
I Wi
∧ Bi1 + Bi 2 H i D Bi = Wi Bi1 + Gi Di 21
is the
p2
c
∧T E hi > 0, (h, i ) ∈ S ∧ µ Ph
∧ AiVi + Bi 2 Fi A= Li
is the external
is the control input, z (t ) ∈ R
m2
∧T B i > 0, i ∈ I ∧ Pi
(11)
where:
B. Synthesis via Linear Matrix Inequalities (LMIs).
where x(t ) ∈ R is the state, w(t ) ∈ R
∧ = µ∧ P i E hi
∧T C i > 0, i ∈ I γI
(10)
− k +1
h = i (k + 1)
Remark: Even though the state of the plant is continuous and never jumps, jumps of the controller’s state can give better performance of the closed loop system.
The bilinear matrix inequalities (BMI) (26)-(29) of the paper [6],[7] hold for some feasible controller if and only if the LMIs (10)-(13) has a solution p where p = {Vi ,Wi , Fi , Gi , H i , Li , Z jk ; i ∈ I , ( j, k ) ∈ S }, one of the solution to the BMIs is given by:
Dic c Bi
Cic I = Aic Bi 2
E hic = −Wh−1 (Z hi − WhVi )S i−1
V Pi = i Si cl
V.
Fi I − Ci 2Vi S i−1 Li − Wi AiVi 0 S i−1
0 H i − Wi −1 Gi
(19)
−1
Si , S i
S i = Vi − Wi
−1
(20)
AN AUTOMATIC MODE SEQUENCING EXAMPLE
simulation, we apply deterministic function such as lateral constant wind.
x• (t ) Ai z (t ) = C i1 ( ) y t C i 2
Bi1 0 Di 21
According to (8): Bi 2 = B and Bi1 = [A(:,1) where:
Bi 2 x(t ) Di12 w(t ) 0 u (t )
(24)
A(:,3) ].
A(:,2)
z (t ) = [u v w Φ θ ψ ] y (t ) = x(t ) for the state feedback case and y (t ) = z (t ) for T
We demonstrate the stability of our switched linear control system with two flight modes used by model helicopter: hover and cruise modes. The flight scenario is given in the Figure 2.
Figure 2. Flight Scenario
A simple flight scenario is chosen in order to focus only on the switching phenomena. The cruise mode is selected as the initial flight mode with longitudinal speed of u0=49.2 ft/sec. After 10 sec, the flight mode changes to stop over and turn 90 deg in hover mode. The entire hover mode is executed in 10 sec and then is switched to cruise mode at the same cruise speed. Helicopter flight dynamic model have 14 states consisting of states as in Figure 1 and yaw angle ψ and also 4 inputs:
[
X = u v w p q r Φ θ ψ r fb a b c d
[
U = δ lat δ lon δ ped δ col
]
]
T
and
T
To include turbulence effects, the linear system can be written as: •
(21)
X = AX + BtU t
where the matrix input and the input vector respectively becomes:
Bt = [B A(:,1) A(:,2)
[
U t = U u g v g wg
A(:,3)]
(22)
T
(23)
]
We have thus obtained a linear model where inputs u g , v g , wg can be deterministic functions of time, to describe wind, or random variable that can be generated in time domain to match statistical properties of turbulence models. In this
the output feedback case.
The simulation results are shown in Error! Reference source not found. through Figure 15. The results show performance comparison among LQR synthesis, state and output feedback switched control. LQR is designed based on choosing or tuning the matrix Q and R in the cost function in order to achieve an optimal performance. This problem can be formalized by defining a performance index of the form : ∞
min
u∈A 2 [0, ∞ )
∫ [x (t )Qx(t ) + u (t )Ru (t )]dt T
T
(25)
0
QT = Q ≥ 0, RT = R > 0 Here Q is a matrix that penalizes the deviation of the states x from the desired operating point, while R penalizes the control effort. Thus (24) represents a trade-off between regulation performance and control effort. The details of this approach can be found in [8],[9]. In the LQR synthesis, the following weight parameters have been chosen: Q=I17, R=I4 and η = 5 . Meanwhile, the switched linear control (SLC) is designed based on setting α , µ as shown in section 4.1. In this approach, the choice of the parameters α , µ is governed by (6) and (7). The parameters were obtained by using trial error method. Equation (5) represents the explicit handling of switching phenomena not appearing in the LQR approach. This step leads to the optimization objective given by (7) which ultimately gives rise to the LMI characterization. By setting α = 0.5, µ = 127.352 and Td=10, we minimized γ (7) via standard LMI solver LMI Control Toolbox.
Collective Control Input
Directional Control Input
30
10 LQR Output SLC State SLC
20
LQR Output SLC State SLC
5
10
deg
deg
0 0
-5 -10
-10
-20
-30
0
5
10
15
20
25
-15
30
0
5
10
Time (Second)
15
20
25
30
Time (Second)
Figure 3 Collective Control Input
Figure 6 Directional Control Input
Cyclic Lateral Control Input
Speed u 70
30 LQR Output SLC State SLC
20
60 50 40
ft/sec
deg
10
0
-10
30 20 10 LQG Output SLC State SLC
0 -20
-10 -30
0
5
10
15
20
25
-20
30
Time (Second)
0
5
10
15
20
25
30
Time (Second)
Figure 4 Cyclic Lateral Control Input
Figure 7 Longitudinal Velocity
Cyclic Longitudinal Control Input
Speed v
30
10
LQR Output SLC State SLC
20
0 -10 -20
10
ft/sec
deg
-30
0
-40 -50
-10
-60 LQR Output SLC State SLC
-70
-20 -80
-30
-90
0
5
10
15
20
Time (Second) Figure 5 Cyclic Longitudinal Control Input
25
30
0
5
10
15
20
Time (Second) Figure 8 Lateral Velocity
25
30
Speed w
Heading
25
100 LQR Output SLC State SLC
20
80 15
60
deg
ft/sec
10 5
40
0
20 -5
LQR Output SLC State SLC
-10 -15
0
5
10
15
20
25
0
30
-20
Time (Second)
0
5
10
15
20
25
30
Time (Second)
Figure 9 Vertical Velocity
Figure 12 Heading
psi
P
10 60
LQR Output SLC State SLC
8 40
6 4
deg/s
deg
20
2 0 -2
-20
LQR Output SLC State SLC
-4
-40
-6 -8
0
5
10
15
20
25
0
-60
30
Time (Second)
0
5
10
15
20
25
30
Time (Second)
Figure 10 Roll
Figure 13 Roll Rate
Theta
q
5
30
LQR Output SLC State SLC
4 3
LQR Output SLC State SLC
20
2
10
deg/s
deg
1 0 -1 -2
0
-10
-20
-3 -30
-4 -5
0
5
10
15
Time (Second) Figure 11 Pitching
20
25
30
-40
0
5
10
15
Time (Second) Figure 14 Pitch Rate
20
25
30
leads to linear matrix inequalities (LMIs) characterization. The transition control performance has been demonstrated by SIMULINK and STATEFLOW and comparison LQR approach is shown. The SLC method accounts for state jumps explicitly and demonstrates a better transition control performance compared to LQR. In the area of control theory, the parameter of the SLC controller is presently achieved by using trial and error technique. The development of systematic method to obtain parameters for the SLC control approach is considered as the next viable improvement of the current work. Further work will also include the integration of the position controller which involves navigation feedback. Some additional research is needed to make the approach more effective in meeting practical flight control design constraints.
r 80 LQR Output SLC State SLC
60
deg/s
40
20
0
-20
-40
-60
0
5
10
15
20
25
30
Time (Second) Figure 15 Yaw Rate
ACKNOWLEDGEMENT
In the real flight situation, both state and input variables have a constraint in the allowable space or invariant set. State constraint is imposed on the jumps of state when switching condition occurred and is judged qualitatively based on physical interpretation. The limitation of the control inputs for helicopter is governed by the maximum allowable deflection of its control surfaces. The control input limits for this study are: − 30 0 ≤ δ lat ≤ 30 0 − 30 0 ≤ δ long ≤ 30 0 − 30 0 ≤ δ ped ≤ 30 0 − 30 ≤ δ col ≤ 30 0
REFERENCES [1] [2]
(26)
[3]
0
Switching compensation with these LQR synthesized controllers could stabilize the switched systems under switching as shown in Figure 3- Figure 15. It is evident that the LQR controller have poor performance on switching condition especially at lateral and vertical speed, roll and roll rate response even though other state and input command responses is comparable to response of SLC switched control. SLC showed particularly a better performance compared to LQR at the switching condition. In the simulation, the hovering helicopter is commanded to maintain an initial position despite a lateral step wind gust at t = 15 s for 2 seconds. All controllers reject the constant wind disturbance and successfully maintain hover flight.
VI.
The first author would like to acknowledge the comments from and discussion with Dr. Stephen Prajna of CDS-Caltech.
CONCLUDING REMARKS
In this paper we showed a performance design and application of H 2 -type cost for helicopter linear switched systems. We investigate the control for transition dynamics between hover and cruise by recasting the phenomena as a hybrid system. In approaching the solution to the hybrid control problem, we consider piecewise quadratic Lyapunov-like functions that
[4] [5] [6]
[7] [8] [9]
M.S. Branicky, V.S. Borkar and S.K. Mitter, ”A Unified Framework for Hybrid Control: Model and Optimal Control”, IEEE Trans on Automatic Control, Vol. 43, pp. 31-45, 1998. E. Joelianto,”Linear Impulsive Differential Equations for Hybrid Systems Modeling”, Proc. European Control Conference (ECC), Cambridge-UK, 2003. Bernard Mettler, Mark.B.Tischler and Takeo Kanade,” System Identification Modeling of a Small Scale Unmanned Rotorcraft for Flight Control Design”,Journal of The American Helicopter Society Vol 47,pp 50-62,Jan 2002. Pascal Gahinet et.al, ”LMI Control Toolbox”, Mathworks E.Joelianto and D.Williamson, ”Stability of Impulsive Dynamical System”, Proc of 37th IEEE CDC, pp 3717-3722 (1998). Izumi Masubuchi and Makoto Tsutsui, ”On Design of Controllers for Linear Switched Systems with Guarantedd H2 Type Cost”,14th International Symposium on Mathematical Theory of Network and System (2000). Izumi Masubuchi, Atsumi Ohara and Nobuhide Suda,” LMI-Based Controller Synthesis: A Unified Formulation And Solution”, International Journal of Robust and Nonlinear Control 8,669-686 (1998). A. Budiyono, S.S Wibowo,”Optimal Tracking Controller Design for A Small Scale Helicopter”, Submitted to Proceeding Bandung Institute of Technology (2005). H.Y Sutarto, A.Budiyono and S.S.Wibowo, ”LQG Optimal Tracking Controller Design for a Model Helicopter (In Indonesian Language)”,Proc of National Symposium on Aeronautical Science, Sept 2005