You are on page 1of 8

International Conference on Computer, Communications and Information Technology (CCIT 2014)

Modeling and Control of a Simulated Flight of a Mini


Helicopter Using Matlab/Simulink
Mohamed Yacine Chachou, ZhiWen Liu, ZhiGuo Zhou, Abdelali Benchalal, Chemseddine Zerfaoui
School of Information and Communication, Beijing Institute of Technology, China
fkdfkrx@gmail.com, {zwliu & zhiguozhou}@bit.edu.cn, alibench20@yahoo.fr, msouraj@sina.com

Abstract - In this paper, we present modeling and control of a During the last decade, also the design methodologies of
simulated flight of a mini helicopter using matlab/simulink. First, we control laws for UAV helicopters have been developed with
are interested in the analysis of dynamic modeling of helicopters. the aim to stabilize their movement either on a path or around
Indeed, based on the hypotheses established beforehand, we obtain a fixed position. In literature, few well-documented case of a
some simplifications of the model for the cases of low-speed flight
and thus to a stationary flight. Therefore the full model could be
non-linear helicopter model used for controller design [5, 8].
simplified by a three-step approach, to get the mathematical model of In several papers, the design is based on linear models [6, 7].
our mini helicopter. Second, we conceive control laws for the In our study, we first analyze the dynamic modeling of
established dynamic model using several techniques of control. So helicopters. Then, we design some controllers to command the
we start by an open loop control via a joystick, to validate the model. So, a proportional integral derivative controller (PID
response of the model to the inputs commands, given by a user. controller [9]), is developed as a classic control. After that, the
After, we design a PID controller to stabilize the system on a linearizing control is discussed, it represent a non-linear
stationary flight. Then, we try to apply a nonlinear control for the helicopter model control. Finally, an optimal linear control is
helicopter such as the linearizing control. Finally, an optimal linear proposed.
control is designed based on the Kalman observer. The use of this
study is giving a basic simulation platform for mini helicopter, and 2. Modeling the Helicopter
compares different control laws results.
Index Terms - Helicopter modeling, Open Loop control, PID Here, the movement of the helicopter is described. The
Controller, Linearizing control, Optimal Linear control. helicopter is considered as a rigid body, which means that
Newton's law of second order and the Euler equations of
1. Introduction motion of rotation can be applied. And also, because in the
Aerial robotics knows for several years’ considerable dynamic model of the helicopter, the terms of the force and
interest in both private builders and research laboratories. This torque vectors acting on the helicopter are used, therefore, it is
interest is motivated by recent technological advances that necessary to determine them. For this, and Based on the work
make it possible to design efficient systems endowed with real done by [7], a block diagram is provided for obtaining
autonomous navigation capabilities to no prohibitive costs. different quantities Fig. 1. The modeling is done based on the
Unlike to terrestrial mobile robots for which it is often following hypotheses:
possible to be limited to a kinematic model, the control aerial  The helicopter can be treated as a rigid body with the
robots require knowledge of a dynamic model. The effects of total number of rotor rotation;
gravity and aerodynamic forces are the main causes. These  The effect of the air flow induced produced by the main
systems, for which the number of control inputs is less than rotor on the fuselage the helicopter is negligible;
the number of degrees of freedom, expressed by  We are interested in a mode of free flight at low speed
under-actuated. The control mechanism usually provides one and hover;
or two control inputs for the dynamics of translation and two  There is a plane of symmetry along the axis ZX in the
or three control inputs for the rotational dynamics. helicopter. Thus, ;
The main objective, of most of the articles dealing the  There is a plane of symmetry of mass along the YZ axis
problems of modeling a helicopter drone, is to identify a linear
on the helicopter, this implies .
model with 6 degrees of freedom through a recorded during
series of some flight tests or wind tunnel data. Reference [1],
largely covers the theory of helicopter modeling. The author
explains all the details necessary for a helicopter model. Flapping
Force and Rigid
Reference [2], present the rotor dynamics. NASA developed and
Thrust
torque body Θ
in the 80s a helicopter test model [3]. This publication does Equations Equations
Equations
not describe the modeling effort but presents a model that is
used in the simulation environment. Reference [4], presents
one of the first validation of a comprehensive mathematical
model of a standard helicopter. The authors describe the Fig. 1 Block Diagram for the Full Modeling of the Helicopter.
development of a dynamic model for the EH-101. This model
has more than 1,600 distributed parameters. The principal system equations are given:

© 2014. The authors - Published by Atlantis Press 216


Fig. 3 The thrust of the main rotor.

(1)
3. Control and Simulation
Once the full dynamic model is established, we are
interested in the problem of control the helicopter drone. The
helicopter is a complex nonlinear system with several
variables, unstable in some flight ranges, and has a dynamic Fig. 4 Translatory and Angular Velocities.
strongly coupled. In this section we will develop four kinds of
control for the dynamic model developed previously. The first
speaks about the open loop control via a joystick. That is to
say, the orders will be injected by a user; this command allows
us to validate the model. The second is control by PID
(proportional, integral, derivative) in which we will choose the
best gains that allow us to stabilize the helicopter by
stabilizing the Euler angles. The third is a nonlinear controller
which is the Linearizing control; it allows us decoupling our
Fig. 5 Euler Angles and the Position Coordinates.
system. The fourth and final command is the optimal linear
control. It means that our nonlinear system will be controlled
From the graph of the thrust, we note, at the beginning, a
by a linear control obtained after optimization of a
peak of amplitude equal to 160 N, which represents the
performance criterion, and in which we will try to design a
transitional regime. Then the value of this force decreases to
discrete controller that is based on a Kalman observer.
68.67 N, it's the force that compensates the weight. Then,
A. Open Loop Control via a Joystick when we give the instruction to perform a forward horizontal
As mentioned earlier, this command will allow us to see flight, we see that the value begins to grow until it reaches the
more closely the behavior of the model. For this, a simulation value of 70N, this allows the helicopter to gain in altitude.
environment MATLAB / SIMULINK has been developed, Then the value of the thrust fluctuates around 68.67 N because
Fig. 2. This environment consists of three main blocks we tried to stabilize the helicopter. As we did a forward
representatives the dynamic model of the mini helicopter, horizontal flight, the translatory velocities and the position, on
developed in the modeling section. It is also consists of a the x-axis, increase, this by making a pitch with negative value
horizon display to see the orientation of the helicopter in space of . It is confirmed in Fig. 4 (left) and Fig 5. We also note
and a graphical interface for 3D visualization. that the value of the translational velocity and position along
the y-axis increases because of a roll movement and the same
thing following the z axis, we can see and validate these
observations from the final position in the following Figure:

Fig. 6 Final position of the helicopter after a horizontal flight.

As remark, the values of the position and translational


velocity along the z-axis appear decreasing; this is due to the
Fig. 2 Interface for control of the mini helicopter via Joystick.
orientation down of the z-axis.
From this test (a forward horizontal flight), we have been
For the test, we performed a horizontal front flight, and
able to verify the validity of the dynamic model for an input
the obtained results are as follows:

217
command injected by a joystick. Hereafter, we will try to We are interested in the stability of the helicopter in the
develop controls to stabilize the helicopter. context of the Euler angles will be at zero. Hence the need to
tend these destabilizing values, Equation 3, to the reference
B. PID Controller
(zero). So the obtained results are:
We propose in this section to develop a control, to
stabilize the system, based on SISO PID controllers. That is to
say that each input command will be controlled by a PID at a
single input and a single output. Each PID input represents an
Euler angle; therefore we will have at all three (3) controllers,
Fig. 6 and Table I:
TABLE I Inputs and Outputs of each PID
Fig. 8 The Euler Angles for PID Controller.
PID Input Output
PID_phi
PID_théta
PID_psi

The collective control input will be set to the value:


(this is the value that gives us the lift
equal to the weight).

Fig. 9 The Inputs Commands for PID Controller.

Fig. 7 Interface for PID Controller.

As the PID inputs are the Euler angles, the stability will
be attitude stability. The procedure to adapting these three PID
Fig. 10 The Flapping Angles PID Controller.
at the system was difficult due to the coupling between the
state variables; they must be adjusted at the same time. As all
controllers are PID type, therefore, the transfer function for
each one is viewed as follows:

(2)

Table II gives us a statement on the gain values used for


attitude stabilization. These values are obtained by trial and
error of the fact that the system is a multi input and output Fig. 11 The Main Rotor Thrust PID Controller.
(MIMO), and the control strategy is to associate for each
input, one output variable, it means a decoupled control.

TABLE II Gain Values for PID Controllers

PID
PID_phi 12.32 0.0006 0.72
PID_théta -8.153 0.00937 -0.654
PID_psi 7.4 0.001 4.36
Fig. 12 Translatory and Angular Velocities PID Controller.

Now we will try to stabilize the helicopter after we have From Fig. 7, we see the convergence of Euler angles to
imposed an initialization error on Euler angles, Equation 3, zero which means that the three PID controllers, allow the
(see the position of the helicopter and the display horizon in system stability in the attitude. This can be confirmed by
Fig. 6). figures: angular velocities, the flapping angles, the main rotor
thrust and the commands inputs. Because, when the control
(3) inputs converge to zero, they will automatically engage the
convergence of the longitudinal and lateral flapping angles to

218
zero. It means we will not have angular velocity along the
lateral and longitudinal directions, and even the angular
velocity, r, along the z-axis will be zero because the control on
the pedals is also zero. All this makes the Euler angles
converge on the position of stability in attitude which is zero.
At the same time the thrust converges to the value 68.67 N to
offset the weight and the helicopter remains stable on the Fig. 18 Second Test Translatory and Angular Velocities.
altitude. Lacking doesn’t take into consideration the control
depending on the position and orientation of that system, the From the obtained results we can confirm the functioning
translation velocity is not really converges to the zero of three controllers for the attitude stabilization. But it is
reference. certain that there is no stability in the translational velocity to
A second test is performed by taking the same initial zero value. This problem can be solved by adding such
values Equation 3 but with a negative sign. (See the position position controller, for example the fuzzy controller.
of the helicopter and the display horizon in Fig. 13). This test To see the influence of gains to the convergence time of
is done to validate the correct operation of PID controllers. the system, a third test is scheduled, where we use the
The results are as follows: following values gains:

TABLE III Other Gain Values for PID Controllers

PID
PID_phi 13.32 0.6 1.325
PID_théta -12.135 0.01 -2.654
PID_psi 7.4 0.001 4.36

Fig. 13 Illustration of the initial position of the helicopter.

Fig. 19 The Euler angles for other gain values.

Fig. 14 Second Test Euler Angles. Since the control concerns the attitude, we will compare
the convergence of Euler angles for the two cases, it means
between the result of Fig. 14 and that of Fig. 19. For the first
case we see that the angle converges to the reference in time
equal to 0.2043 (s), set a time of 0.4412 (s) and during
1.3322 (s). In the second case, converges in 0.395(s), in
0.762(s) and in 1.3054(s). So a priori the gain values given
in Table 2 allow rapid convergence but when we see the shape
of this convergence we see that there is appearance of
Fig. 15 Second Test Commands Inputs. oscillations, while for the shape of convergence achieved by
the gain values given in Table 3, there are no oscillations. So
there is a tradeoff between the convergence time and the
appearance of oscillations.
The results achieved by the attitude control using three
standard PID controllers SISO are satisfactory since we have a
stable system. Furthermore, we confirmed the existence of a
compromise between having a minimum convergence time
Fig. 16 Second Test Flapping Angles. and the appearance of oscillations. But this command does not
allow stability around a point, inter alia, a stationary flight.
C. Linearizing control
After establishing a Classic Control on the system, we
will see in what follows the development of a nonlinear
control for the helicopter, it concerns the linearizing control.
The idea of linearizing control is to find a new basis for
Fig. 17 Second Test Main Rotor Thrust. writing equations of the system (this basis is in the state space)

219
such that the state equations become completely or partially (5)
linear. Thus we can synthesize the control law in the linear
Unfortunately, the model of the helicopter has size
space and return to the original space. Based on the approach
(number of states) n = 13 and:
followed in [8], to apply the linearizing control on the model
of the helicopter, simplifications must be taken into account (6)
namely the limitation to a hovering flight, consequently:
 The translatory and angular Velocities will be zero;
This implies the existence of an internal dynamic. To
 The blade flapping can be neglected;
ensure the stability of the system, we check the stability of the
 The equations for generating the thrust become
four unobservable states by studying the zero dynamics [8].
dependent only of the collective command; To examine the stability of the system, a simulation
environment was created, the output states of the system are
 The vector product ( ) can be neglected in the
initialized by the following values:
dynamics of fuselage (rigid body).
Relying on these simplifications, it can be seen that the
dynamics of rotary wing (block thrust and flapping) is
(7)
effectively decoupled from the rest of the dynamics. We can
divide the model into two parts effectively decoupled, part that
contains the generation of thrust and flapping and another part These values introduce an error on the reference, since we
that contains the dynamics of a rigid body and the creation of seeks the stability of the system, the state vector must be zero.
the force and torque. The decoupled model will be as follows: The closed loop system should reduce the initial values, to the
maximum. The results of the simulation are as follows:
Flapping
Force and Rigid
and
torque body Θ
Thrust
Equations Equations
Equations

Fig. 20 Decoupled Helicopter Model.


Fig. 21 The Outputs of the Controlled System (Observable State).
So we will look at both blocks which contain the dynamic
(state feedback), so the model is chosen to contain only the At first glance of the Fig. 21, simulated outputs appear to
rigid fuselage dynamics and the dynamics of force and torque, be stabilized, which presupposes that the control task was
therefore , , and are regarded as inputs. The successful. However, the states of the zero dynamic, Fig. 22,
model becomes: show that the unobservable part of the system is far from
stable.

Fig. 22 The Zeros Dynamics (Unobservable State).

(4)
The purpose of the flight control is to design a helicopter Fig. 23 The Flapping Angles.
autopilot of reduced model, so that the translational velocities
and yaw angle follow a desired reference,
it means that error ( )
converges asymptotically to zero. Therefore, we take as output
function . This output function is interesting
because it allows monitor path. With this option, the
calculation of the relative degrees gives:
Fig. 24 The Thrust of Main and Secondary Rotors.

220
We note that the variation of the flapping angle is control applied to the model of the helicopter is not possible.
inversely proportional to the pitch angle . Furthermore, The study showed that the zeros dynamics is not
cannot be larger because of the structural limitations, such as asymptotically stable and consists at periodic orbits around 0.
the elasticity of the blade and the hinge saturation of swash Therefore, the standard helicopter is not a minimum-phase
plate. The thrust of the tail rotor converges to zero after 0.6 system due to the existence of the coupling between the
(s). It’s the time taken by the yaw angle to also achieve rolling moment (resp. pitch) and lateral acceleration (resp.
stability. The thrust of the main rotor stabilizes after 0.4 (s) longitudinal).
around the value 68.67 (N) corresponding to the value of the
D. Optimal linear control
aerodynamic force to offset the weight (mg).
Based on the study done by [7], the general objective of
To prove that the observed dynamics of the linearizing
this control is to find an optimal control that minimizes a
control system is stable even from the point of view, input
criterion which depends on the adopted orientation. The study
limitations (saturation), we introduce these limitations under
of this approach contains two directions, the first orientation is
the form of saturation of hinges flapping with ±0.25 (rad) a minimum energy while the second seeks to minimize the
and we use the same initial conditions, we obtain the results: convergence time of the system.
First, we describe the design of a controller based on the
optimal linear control which stabilizes the helicopter about an
operating point and we estimate the operating range of state,
based on the knowledge of the system open loop characteristic
for the maximum state and input values can be used as starting
point. For indeed, as illustrated in Fig. 29 open loop system
Fig. 25 The Outputs of the Controlled System in the Case of the Saturation initialized at the operating point is not stable.
of Hinges Flapping.

Fig. 29 Open Loop System Initialized at the Operating Point.


Fig. 26 The Zeros Dynamics in the Case of the Saturation of Hinges
Flapping.
The goal with the first design stage is stabilization rather
than optimizing performance, so the weighing will be
performed on the following order of priority:
 Reduce the overshoot; attitude stabilization; and getting
regular movement.
 Reduce the steady-state error on translatory velocities.
Considering these criteria, the results are as follows:

Fig. 27 The Thrust of Main and Tail rotors in the Case of the Saturation of
Hinges Flapping.

Fig. 30 Translatory velocities and Euler Angles for the First Design Stage of
Optimal Control.
Fig. 28 The flapping Angles in the Case of the Saturation of Hinges
Flapping.

Comparing the states of the closed loop system with


saturation and states without saturation system, it can be seen
that the outputs are decreasing for both systems until
reaching the saturation level, after; the closed-loop system
is destabilized for the case of saturation on the hinges Fig. 31 Inputs Commands for the First Design Stage of Optimal Control.
flapping. Also, the thrust of the main and secondary rotor are
destabilized. Therefore we conclude that the exact linearizing

221
So far, during the controller design, complete information
about the state are assumed, which is not the case in reality.
Available sensors are three: accelerometers, three gyroscopes
and a compass. This means that it is only possible to measure
7 of 11 statements. The flapping angles and two Euler
angles and are not directly measurable states and they
must be estimated. So, in fourth, step, we design a Kalman
Fig. 32 Flapping Angles and Angular Velocities for the First Design Stage observer that estimates not only the four absent states, but also
of Optimal Control.
do the evaluation of each of the 11 states [7]. After adjustment
From these simulations, we confirmed that the helicopter of Kalman Observer parameters, we obtained the following
is stabilized with small errors on the translatory velocities. results:
Comparing to [7], we have also find that the lateral velocity is
dominant with approximately 1.4 m/s steady-state error, due to
the thrust of the tail rotor. We will treat this problem in that
follows.
Second, to address the problem cited above, we may do
the modeling of known disturbances. The errors on the
translatory velocities are caused by errors of linearization Fig. 35 Translatory Velocities Estimation (Kalman Observer).
which are not included in the controller design. However, it is
possible to adjust these errors by introducing a model of
disturbances in the control law [7]. By simulating the closed
loop system with and without perturbation state, the obtained
results are:

Fig. 36 Euler Angles Estimation (Kalman Observer).

Fig. 33 Translatory Velocities after adjustment


(Known Disturbances Modeling).
Fig. 37 Angular Velocities Estimation (Kalman Observer).
Where: a constant of perturbation.
Third, by introducing integral action in the controller, it is
possible to eliminate the remaining errors. In addition, this
improvement will also be adapted to the effects of all other
external disturbances, constant, applied to nonlinear system
[7]. The results are:
Fig. 38 Flapping Angles Estimation (Kalman Observer).

Fig. 34 The Translatory Velocities after adjustment (Integral Action).

Where: a constant which toggles between an integral Fig. 39 Interface used for the whole optimal control.
or proportional action.
From Fig. 34 (a) we see that when the perturbation is The results show a good estimation of the states. The
small we cannot see the effect of the integral action in the observer follows more exactly states of the system, except the
stabilization of the system. But when this perturbation flapping angles. That due to limitations of the linear model
becomes large, Fig. 34 (b, c), then the model with integral they are considered acceptable. The introduction of the
action is anyway stable. Merely, it's the value of that observer causes some side effects that are oscillations in the
makes the convergence will be fast or slow.

222
velocities and the inputs commands. The reason for this can be World Academy of Science, Engineering and Technology 2, vol. 3, no 3,
p. 1, 2007.
found in the fact that the observer estimates the flapping
[6] S. Carlos Mario Vélez, T. Andrés Agudelo, Colibri: a rapid prototyping
angles from the linear model. We can remedy to this methodology for the control of unmanned aerial vehicles, EAFIT
phenomenon by doing a tuning of the Controller [7]. University, June 15th, 2007.
The optimal linear control gives good results for the [7] Hald, B. Ulrik, et al, “Autonomous helicopter-modelling and control,”
Report, Aalborg University 2005.
stability of the system around an operating point as long as
[8] Pettersen, Roger, E. Mustafic, and M. Fogh, “Nonlinear control approach
tuning the Controller is done. to helicopter autonomy,” Master Thesis, Aalborg University, 2005.
[9] M. S. Svenstrup, K.Winther, “Autonomous hover of an electric
4. Conclusions helicopter,” Master Thesis, September 2006 - June 2007.
The work presented in this report has, initially focused on, Appendix
obtaining a 6 DOF (Degree Of Freedom) nonlinear general
TABLE IV Characteristics of the Helicopter
model of a helicopter drone. Then, the model was used to free
flight at low speed, and also for the design of control laws to R=0.77 [m] Rotor radius
=0.415/2 [m] Radius (rotor center at beginning pallet)
stabilize it in stationary flight mode and offset the force of
=0 [m]. Distance center of mass to main rotor y-axis
gravity and the dynamic effects of the two rotors. =0 [m] Distance center of mass to main rotor x-axis
The model was developed by using the Newton-Euler =0.1 [m] Distance center of mass to main rotor z-axis
formalism. This model is considered complete, because, it =0 [m] Distance center of mass to tail rotor z-axis
takes into account of the dynamics of main rotor, namely the =0.6 [m] Distance center of mass to tail rotor x-axis
blade flapping and estimation of thrust depending on the
I= [Kg. ] The inertia matrix
induced velocity. However, it is not a general model since it
does not take into consideration the case where the helicopter Rotor angular velocity
is subjected to a gust of wind, the effect of the soil and Air density
especially the deflection in the blade. The model thus a=6 [1/rad] Polar slope (constant)
e=0 [m] The hinge
established, has been validated in simulation by applying four c=0.07 [m] Length of the cord
kinds of control, open loop control via a joystick, a PID A= Rotor disk surface
control, nonlinear control (the linearizing control) and an B=2 Number of blades
optimal linear control. m=7 [Kg] Helicopter weight
The open loop control was used to validate the dynamic g=9.81 [m/ ] Gravity
analysis model. The next step has been devoted to the = . [N.m] Static moment
stabilization of the model around an operating point that is to = . [Kg. ] Inertia moment
say, obtaining a stationary flight. According to the obtained
= .0[m] Main-rotor hinge offset
results, PID control provides good stability in attitude with a
fast convergence. But with regard to stability around an Blade lock number
operating point, it isn’t assured, because the translational [m] Distance
velocity does not converge to the zero reference. Regarding Distance (rotor center, beginning pallet)
the exact linearizing control, it has been shown that the Initial inclination
dynamics of zeros was not stable despite the convergence of =0.2 Linkage gain swashplate
observable states of the system. In addition, considering the =0.8 Linkage gain rotor control
limitations of the inputs (saturation), it was demonstrated that The first component Fourier series
=0.0464[rad]
development of the pitch angle
even observable states become destabilized. We conclude that
the exact linearizing control is not applicable to helicopter Thrust coefficient
model. Finally, the optimal linear control gave the best results
for the stability in stationary flight. Coefficient of ratio (main rotor thrust and
drag)
Acknowledgment The initial drag of main rotor
V= Vector of translatory velocities
We would like to acknowledge the significant Θ= Vector of Euler angles
contribution of AMRANE. F. ω=[p,q,r] Vector of angular velocities
[m] Position of the helicopter in earth landmark
References Thrust of the main rotor
[1] W. Johnson, Helicopter Theory, Dover Publications inc, 1994. Thrust of the tail rotor
[2] Leishman, J. Gordon, Principles of Helicopter Aerodynamics, Cambridge Lateral flapping angle
University Press, 2006. Longitudinal flapping angle
[3] Heffley, K. Robert, and M. A. Mnich, Minimum-Complexity Helicopter F=[ ] [N] Force vector
Simulation Math Model, National aeronautics and space administration, [N.m] Torque Vector
Ames Research Center, 1988. Lateral input control
[4] A. Gee, T. Clarke, and P. Taylor, “A large scale helicopter model and its Longitudinal input control
validation,” European Control conference ECC’99, Karlsruhe, Germany, Collective input control
1999.
Pedal input control
[5] H.Ifassiouen, M. Guisser, and H. Medromi, “Robust nonlinear control of
a miniature autonomous helicopter using sliding mode control structure,”

223

You might also like