You are on page 1of 11

DISEÑO DEL SISTEMA DE CONTROL DE UN UAV DE ALA FIJA

PARA VUELO AUTÓNOMO EN EXTERIORES

Autor: González López, Miguel

Director: Zamora Macho, Juan Luis

Entidad Colaboradora: ICAI – Universidad Pontificia Comillas.

Resumen - El objetivo que se plantea en este proyecto es conseguir hallar una


metodología para poder modelar e implantar los controles necesarios a un avión UAV
de ala fija para que éste sea capaz de realizar un vuelo autónomo en exteriores. Al final
del proyecto el avión deberá ser capaz de seguir una trayectoria marcada por el GPS con
el fin de transportar medicinas a áreas en donde el acceso terrestre es imposible.

Index Terms – Avión, UAV, Modelado, Control, Autónomo

INTRODUCCIÓN difícil acceso por la vía terrestre. Es la


fundación ICAI la que tuvo la idea de
Diferentes estudios anteriores ayudar al abastecimiento de
relativos a este tema han conseguido ser medicamentos a estas poblaciones
capaces de crear aviones similares a lo indígenas.
que se quiere conseguir en este proyecto.
La mayoría han llegado a resultados METODOLOGÍA
satisfactorios, ya sea obteniendo las
ecuaciones de modelado considerando el La metodología que se debería
ala fija como un solido rígido siendo seguir para realizar con éxito un control
posible modelar el avión aplicando las robusto y estable para este tipo de aviones
leyes de Newton [ESPI12], o diseñando se divide principalmente en cuatro partes:
un sistema de despegue vertical que - Preparación e instalación previas
permita al avión combinar su velocidad de - Modelado del avión
vuelo con el despegue y aterrizaje en un - Diseño y simulación del control
espacio reducido [PAPA12]. Se cree que - Ensayos
obtener el modelado del avión a través de
ensayos [NOTH06] es la forma más Preparación e instalación previas
rápida y mas funcional de todas.
Se combinarán tanto las La instalación y preparación
referencias anteriores acerca de estudios previas del material necesario para el
similares, como la aplicación de los correcto estudio del proyecto fue vital, ya
conocimientos del autor y del director que sin estas herramientas los datos
acerca del control de sistemas electrónicos medidos y los sistemas que se quieren
y del aeromodelismo para llegar a un implantar serían en balde.
método más rápido y mejor que los En un primer lugar se preparó el
estudiados a día de hoy. avión junto con el microprocesador que se
La razón de querer diseñar este decidió implantar en éste. Se trata del
sistema de control tiene un fin claro; la ArduPilot, un microprocesador basado en
futura implantación de estos controles a Arduino pero con lo elementos necesarios
un avión que sea capaz de llevar de forma para conocer en todo momento el estado
autónoma medicamentos a poblaciones de del UAV. Conectando como entradas las

1
señales de la emisora recibidas por un Modelado del avión
receptor y como salidas las señales de los
servos (actuadores sobre alerones y timón Antes de poder implantar cualquier
de profundidad), el hardware estaría tipo de control en la realidad, fue
correctamente conectado. Para completar necesario un estudio riguroso acerca del
todos los elementos de hardware modelo físico del avión para ver si éste es
necesarios, un motor brushless, un estable o no para según que tipo de
variador ESC y una batería LiPo fueron controles.
implantados. Se valoró la posibilidad de hallar
En un segundo lugar se tuvo que el modelo dinámico del avión a través de
adaptar el entorno de Matlab y Simulink ecuaciones, momentos de inercia, masa, y
para poder interactuar con el Ardupilot demás elementos. Pero dado que este
correctamente. Una serie de archivos e procedimiento es un tanto tedioso,
instrucciones descargadas de la propia finalmente se opto por estimar un modelo
página de Mathworks, [HUGO12] fueron empírico del avión a partir de ensayos
necesarios para llegar a este fin. A su vez, reales. [NOTH06]
un pequeño programa de comunicación El objeto de este modelado es el de
del puerto llamado Putty se tuvo que hallar una ecuación que permita relacionar
instalar para poder grabar, leer y armar el mando que recibe el avión desde la
datos en el ArduPilot cuando la situación emisora con el efecto que tiene este sobre
así lo requiriese. los ángulos de Euler. Afortunadamente los
Finalmente, fue necesaria la mandos disponibles en un avión afectan
elección de un lugar en donde poder por separado a los ángulos de Euler, por lo
ensayar con el avión y no tener problemas que, en este caso, se estaría hablando de
legales con este tipo de artilugios. Es por un sistema SISO (single input single
esto que se eligió un campo de vuelo output).
situado a las afueras de Madrid en donde Los parámetros que se tuvieron en
se podría realizar cualquier tipo de ensayo cuenta a la hora de modelar el avión
sin ningún tipo de problema o peligro. fueron, por un lado el roll y el mando
[RFAE11] aplicado a los alerones y por otro lado el
pitch y el mando aplicado a la
profundidad. El parámetro de la velocidad
de empuje se dejó con un valor constante
y por último, el mando del timón de cola
que afecta al yaw, no se usó en este
proyecto, ya que no es necesario para el
tipo de trayectorias que se quiere realizar
con éste.
En la memoria del proyecto se
explica con detalle como hallar la función
de transferencia entre el mando que actúa
sobre los alerones y el roll del avión.
Primeramente, se programaron los
bloques necesarios propios de ArduPilot
instalados previamente para guardar los
datos necesarios para la correcta
Ilustración 1: Avión y emisora estimación de la planta. A saber, un
barómetro para medir la altura, una IMU,
un bloque basado en filtros de Kalman
para estimar los ángulos de Euler del

2
avión y mas bloques que permitieron
registrar los datos necesarios para poder
llegar a este fin.
El procedimiento a seguir para
modelar de manera correcta el avión fue el
siguiente:
• Una vez programados los bloques
necesarios para el registro de
datos, implantar otro nuevo bloque
que permitiese almacenar las
variables que deseaban ser
registradas en vuelo en la memoria Ilustración 2: Estimación ángulo roll con Matlab
flash del ArduPilot. Identification Toolbox
• Generar una señal PRBS que se
activase a través de un canal de la
Diseño y simulación del control
emisora para que posteriormente
se pudiese estudiar las variaciones
Una vez estimada la planta, se
en el roll según la cantidad de
procedió a diseñar un control robusto y
mando aplicado.
estable que fuese capaz de aguantar las
• Armar el registro de datos y leer perturbaciones que el avión pudiese sufrir.
los datos a través de la herramienta Se empezó simulando un control
de comunicación serie Putty. proporcional, ya que se pensaba que éste
• Importar los datos a Matlab y, una sería suficiente. A continuación se diseñó
vez seleccionada una muestra lo un control PD usando la velocidad del roll
suficientemente clara y limpia, como acción diferencial para ganar
hacer uso de la herramienta de velocidad de respuesta.
Matlab conocida como Matlab Como herramienta de diseño se
Identification Toolbox. Esta utilizó un GUI para el diseño de controles.
herramienta es capaz de, a través A partir de la planta y diseñando a partir
de una entrada y una salida del margen de ganancia para el control P y
especificada por el usuario, a partir del margen de fase para el control
estimar una planta que relacione PD se obtuvo el diseño que se muestra en
en mayor o menor medida las la ilustración 3 y 4. Una respuesta
variaciones de la salida según una prácticamente perfecta hablando en
entrada determinada. En esta parte términos de control, con un sobrepaso y
del proyecto se tuvieron que unos valores que deberían dan unos
analizar muchas muestras para resultados excelentes.
conseguir estimar una planta lo
suficientemente buena como para
poder diseñar un control y simular
sobre ella.
Una vez estimada en la planta, una
gráfica comparando los valores del ensayo
con los estimados serviría como referencia
para saber como de bien se había Ilustración 3: Diseño control P
calculado el modelo empírico del avión.

3
proporcional de un valor inferior a la que
se obtuvo en simulación por la misma
razón que la anterior aunque, finalmente
se comprobó que el control funcionaba
con una constante muy similar a la
obtenida a partir del modelo empírico del
Ilustración 4: Diseño control PD avión. De estos resultados se comprueba
que el método seguido para modelar el
avión es un éxito y que, con la práctica
Un diagrama de bloques en necesaria, es un proceso relativamente
Simulink se diseñó para comprobar la corto.
respuesta del sistema ante una Una vez comprobado el correcto
perturbación aplicada. Como referencia se funcionamiento para el roll, se diseño de
puso cero grados y se introdujo un escalón la misma manera un control en cascada
en perturbación que simulase la acción del para el ángulo de pitch que tuviese como
viento, tanto con el control P como con el referencia la altura a la que se deseaba
control PD. volar el avión.
Ambos, al no tener acción integral,
constan de un error en régimen RESULTADOS
permanente, pero al ser un valor de muy
pocos grados, se cree que este error no De los ensayos realizados se
será determinante, como se comprobará en registración las variaciones que sufrían
los ensayos. tanto el roll del avión como el mando
sobre los alerones. Se comprobó la
diferencia que había entre las variaciones
de ángulo sin control y con control
proporcional P de valor de la constante
igual a 0.023, valor muy similar al
obtenido en la simulación.
Los resultados mostrados a
continuación reflejan una clara diferencia
entre el vuelo del avión con y sin control.
Ilustración 5: Simulación control P La gráfica naranja muestra las variaciones
de mando, mientras que la azul muestra
las variaciones de roll.

Ilustración 6: Simulación control PD

Ensayos

Durante los ensayos que se Ilustración 7: Resultados ensayo


llevaron a cabo en el proyecto, por
seguridad, se empezó probando con un En la gráfica anterior se puede
control P que actuase sobre el roll del observar la clara diferencia entre la parte
avión. A su vez, se puso una constante izquierda de la gráfica y la derecha. La

4
izquierda pertenece al avión volando sin FUTURAS MEJORAS
control, y la derecha al éste mismo
volando con el control proporcional P. Se Las futuras mejoras hacen
comprueba como cuando el ángulo tiene referencia a la mejora en los sistemas de
un valor distinto de cero, el control actúa control y a la implementación de nuevos
sobre el mando del roll para llevar este a sistemas electrónicos que ayudarán a
cero. llegar al objetivo final, que el avión vuele
de manera completamente autónoma.:
CONCLUSIONES • Mejora de los controles
implementados al roll y al pitch,
A modo de conclusión general se utilizando acción diferencial para
puede decir que se ha conseguido hallar hacerlos más rápidos, y acción
un procedimiento al través del cual integral para quitar el error en
diseñar un control robusto para un avión régimen permanente.
UAV de ala fija. • La implementación de un GPS que
Finalmente se ha conseguido hallar sirva de realimentación última, ya
un modelo empírico del avión sobre el que que aunque los ángulos de pitch y
diseñar un control. Además, este modelo roll estén en las posiciones
se parece mucho con la realidad ya que los deseada, la trayectoria puede verse
valores de las constantes de los controles afectada por la acción del viento,
calculadas de manera teórica, son muy arrastrando el avión.
similares a los implantados finalmente en • A su vez, el GPS servirá para que
el avión, por lo que se puede considerar el avión siga una trayectoria
un éxito el procedimiento seguido. determinada y se le marquen unos
Los controles aplicados finalmente puntos determinados por los que
son todos controles proporcionales, pero éste tendrá que pasar, para llegar al
como se ha comprobado de manera teórica destino deseado.
se cree que la implementación de
controles mas complejos mejorará el REFERENCIAS
comportamiento del avión aunque se
desconoce si esta mejora será significativa [PAPA12] Christos Papachristos.
aplicada en la realidad, ya que como se ha Modeling and Control
podido comprobar, el control proporcional Simulation of an unmanned
funciona de una manera muy satisfactoria. tilt tri-rotor aerial vehicle.
Esto es debido a que el avión es un University of Patras, 2012.
sistema bastante estable, que tiende a
sustentarse por si mismo y, esto ayuda a [RFAE11] Real Federación
los sistemas electrónicos a controlarlo aeronáutica española.
mejor. Reglamentación para la
Finalmente el objetivo de práctica del
implantar un GPS para terminar por aeromodelismo. Comisión
completo el proyecto se considera una técnica nacional de
ambición a largo plazo ya que conseguir aeromodelismo, 2011.
lo que se ha conseguido hasta el día de
hoy ha supuesto un gran avance y, futuros [ESPI12] Tadeo Espinoza, Alejandro
proyectos culminarán este curioso y Dzul, Miguel Llama.
llamativo proyecto. Linear and nonlinear
controllers applied to fixed-
wing UAV. Instituto

5
Tecnológico de la Laguna,
2012. [HUGO12] François Hugon. How to
Guide: ArduPilot 2.0
[NOTH06] A. Noth. Dynamic Simulink Blockset. Embry-
Modeling of Fixed-Wing Riddle Aeronautical
UAV. Swiss Federal University, 2012
Institute of Technology
Zurich, 2006.

6
CONTROL SYSTEM DESIGN OF A FIXED WING UAV FOR
AUTONOMOUS OUTDOORS FLIGHTS

Author: González López, Miguel

Director: Zamora Macho, Juan Luis

Collaborator entity: ICAI – Universidad Pontificia Comillas.

SUMMARY – The main purpose of this project is to find a methodology for being
able to model and implement the necessary controls to a fixed wing UAV plane so that
it can fly in an autonomous way outdoors. At the end of the project the plane should be
able to follow a GPS path in order to transport medicines to areas where terrestrial
access is impossible.

Index Terms – Plane, UAV, Modelling, Control, Autonomous

INTRODUCTION
METHODOLOGY
Different previous studies related
to this matter have been able to create The methodology that should be followed
similar planes to the one that we want to for being able to design a strong and
obtain with this project. Most of them stable control to this king of planes is
have reached satisfactory results, by divided in for main parts:
calculating the modelling equations - Previous preparations and
considering he fixed wing as a solid rigid, installations
opening the possibility modelating the - Plane modelling
plane by using the Newton laws [ESPI12], - Control design and simulation
or designing a vertical landing system - Tests
where the flying speed and the possibility
of landing in smalls places could be Previous preparations and installations
combined [PAPA12]. It is believed that
modelating the plane with real test Previous preparations and
[NOTH06] is the fastest and more installations of the necessary material
functional way of all of them. were vital to work properly. Without these
Previous references on similar preparations, measured data and design
researchs and the knowledge of the author system would have been implemented in
and director on control of electronic the wrong way.
systems and aeromodelism, would be The first thing to be prepared was
combined to find a faster and better the plane with the microprocessor used in
method to the ones existing now a days. this project. The one used was the
The reason for designing the Ardupilot, a microprocessor based on
control system has a clear purpose; the Arduino but with the necessary elements
future implementation of this kind of to know in every moment the plane
controls to a plane that could be able to conditions. Connecting the RC channels
transport medicines in and autonomous as inputs (received from a receiver) and
way to settlements where terrestrial access the signals of the servos as outputs
is almost impossible. ICAI foundation is (actuators on the ailerons and elevator) the
the one who had the idea of helping on the hardware would be connected correctly.
provision of medicines to these villages. To complete all the required hardware

7
elements, a DC brushless motor, an ESC, option chosen. It was thought that it would
and a LiPo battery were implemented. be a much more faster method. [NOTH06]
Secondly, Matlab and Simulink The goal of this modelling is to
needed to be adapted to interact with the find an equation that relates the signal
Ardupilot. Certain files and instructions received from the radio and the effect that
downloaded from the Mathworks website this amount of signal has on the Euler
[HUGO12] were necessary to reach this angles. Fortunately the signals that could
objective. Moreover, A small program of be modified affect independently to the
serial communications called Putty had to Euler angles, so in this case we would be
be installed in order to record, read and talking about a SISO system (single input
arm data on the ArduPilot when required. single output).
Finally, the selection of the correct The parameters that were
place for testing the plane was necessary considered while modelling that plane
in order to avoid legal issues. For this were, on the one side, the roll angles and
reason a flying path destinated to the amount of movement applied to the
aeromodelism was chosen. Situated on the ailerons, and on the other side, the pitch
outskirts of Madrid, this place would be angle and the amount of movement
the perfect option for testing the plane applied to the elevator. The speed
without having any problems. parameter was considered a constant value
that could keep the plane flying peacefully
and finally the yaw angle was not used in
the project because the rudder is not
necessary for the kind of movements that
the planes is required to do to follow the
established path.
In the project memory, it is
explained in detail how to estimate the
transfer function between the quantity of
movement applied to the ailerons and the
effect that this has of the roll angle.
First of all, the required blocks
from ArduPilot were programed in order
to record the necessary data to estimate
the plant. This is, a barometer to measure
the altitude, an IMU (inertial measurement
Illustration 8: Plane and emitter unit) and a block based on Kalman filters
Plane Modelling so that the Euler angles could be
approximated, and more blocks that
Before implementing any control allowed registering the required data to
to the plane in the real life, a rigorous reach the objective.
study of the physical model of the plane The procedure that should be
was necessary in order to check the followed to model the plane in a correct
stability of the open and close loop way is:
system. • Once the blocks needed are
The possibility of calculating the correctly programed, implement a
dynamic model using equations, inertial new block to record and save data
moments, mass, etc was taken into to the ArduPilot flash memory.
account. But, knowing that this procedure • Generate a PRBS signal activated
is a mess, finally estimating an empirical with a RC channel from the radio
modelling with real life tests was the to study the variations of the roll

8
angles with a determined quantity Design and simulation of the control
of movement applied to the
ailerons. Once the plant is estimated, the
• Arm data recording and read next step was to design a strong and stable
recorded data using the serial control capable of resisting the
communication tool Putty. disturbances that the plane could have.
• Import data to Matlab and select a At the beginning a proportional
clear and clean sample. Once control was designed. It was believed that
selected, use the Matlab tool called this kind of control would be enough for
Matlab Identification Toolbox. the plane to fly in a smooth way. How
This tool is able to estimate, in a ever, right after, a PD control using the
better or worse way, a transfer roll speed was designed in order to
function between and input and an improve the speed of the response.
output given by the user. In order The design tool used in this project
to obtain a transfer function very was a GUI for control design. Just
similar to the real model of the importing the plant and designing for gain
plane, lots of samples were margin in the case of the proportional
analysed in this part of the project. control and phase margin in the case of
The reason for this is that, the PD control the response seen on
obtaining a good model of the illustrations 3 and 4 was obtained. An
plane, would permit the design of almost perfect response, talking on terms
a better control, much more similar of control, with a damping factor and
to reality. constant values that should give excellent
Once the plant is estimated, a results.
graphic comparing the test values and
the ones estimated would help us to
know if the plant estimated have
similarities. A value around 50 would
be a good estimated plant.

Illustration 10: Design of P control

Ilustración 11: Desing of PD control

Illustration 9: Roll estimation with Matlab A block diagram was designed


Identification Toolbox
using Simulink to check the time response
of the system facing a disturbance. The
reference was set up to zero degrees and a
step on disturbance was introduced

9
simulating the effect of the wind using that, with the necessary practice, it is not a
both P and PD controls. very long process.
Both, while not having integer Once checked the correct running
action, have a steady state error, but as on the roll angle, a cascade control was
seen on the plots of illustrations 5 and 6, it designed for the pitch angle, having the
is a very small error that would not affect altitude as the reference to reach.
significantly to the flight of the plane.
This would be confirmed with the plane RESULTS
tests.
From the tests, the variations on
the roll angles and the quantity of
movement applied to the ailerons were
registered. The differences between the
plane flying without control and with a
proportional control of constant value
0.023 were checked. This value is very
similar to the one obtained on simulation.
The results showed in illustration 7
reflect a big difference between the plane
Illustration 12: P control simulation flying without and with control. The
orange plot shows the quantity of
movement applied to the ailerons and the
blue one shows the variations on the roll
angle.

Illustration 13: PD control simulation

Tests

During the tests that were done in Illustration 14: Tests results
this project, looking into security, the first
control tested was the proportional one
In the graphic showed before it can
that would actuate over the roll angle. At
be seen the clear difference between the
the same time, the proportional constant
right part and the left part of the
was set with a lower value than the one
illustration. The left part belongs to the
obtained in the simulations for the same
plane flying without control, and the right
reason as the one before. But finally it was
part belongs to the plane flying with a
verified that the control worked perfectly
proportional control P. It is verified that,
with a very similar value than the one
when the plane has a roll angle different
obtained theoretically with the empiric from zero, the control actuates on the
model estimated. From the results it is
ailerons to bring this value to zero again.
confirmed that the method followed to
model the plane is a complete success and

10
CONCLUSIONS The reason for this is that although
the pitch and roll could be in the
In the mode of a general desired positions, the wind cans
conclusion it can be said that a very good push the plane, moving it from its
procedure to model and design a control original trajectory.
for a fixed wing UAV plane has been • Moreover, the GPS would be used
founded. by the plane to follow the
Finally an empiric model of the trajectory established in advance,
plane has been estimated. This model is to reach the desired destiny.
good enough to design a control that is
very similar to the one applied on real life. REFERENCES
So this procedure studied can be
considered as a very good success. [PAPA12] Christos Papachristos.
The controls applied finally are all Modelling and Control
proportional, but as verified theoretically Simulation of an unmanned
it is believed that the implementation of a tilt tri-rotor aerial vehicle.
more sophisticated control would improve University of Patras, 2012.
the planes behaviour but, what is it not
clear is that this change in the behaviour [RFAE11] Real Federación
might not be significant in real life. The aeronáutica española.
reason for saying this is that the Reglamentación para la
proportional control has worked to so práctica del
satisfactory, that it is difficult to improve aeromodelismo. Comisión
it. As the plane is a very stable system that técnica nacional de
tends to float on it own, this could help the aeromodelismo, 2011.
electronic systems to control it with less
complex controls. [ESPI12] Tadeo Espinoza, Alejandro
The objective of implementing a Dzul, Miguel Llama.
GPS to finish completely this project is Linear and nonlinear
considered a long-term ambition that can controllers applied to fixed-
be finished in future studies. The goal that wing UAV. Instituto
this project has reached has supposed a Tecnológico de la Laguna,
huge step on this curious and remarkable 2012.
project.
[NOTH06] A. Noth. Dynamic
FUTURE IMPROVEMENTS Modeling of Fixed-Wing
UAV. Swiss Federal
The future improvements are Institute of Technology
related to the upgrade on the control Zurich, 2006.
systems and the implementations of new
electronic devices that could help to reach [HUGO12] François Hugon. How to
the final objective, letting the plane to fly Guide: ArduPilot 2.0
in a complete autonomous way: Simulink Blockset. Embry-
• Improvement of the controls Riddle Aeronautical
applied to the roll and pitch angle, University, 2012
using differential action to make
them faster, and integral action to
remove steady state errors.
• The implementation of a GPS as
the last feedback of the control.

11

You might also like