Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Copyright © IFAC 2007

Symp. Cost Oriented Automation, La Habana, Cuba, February 2007

DEFINITION AND MODELLING OF THE COMMUNICATION ARCHITECTURE FOR THE


CONTROL OF A HELICOPTER-DRONE

Ján Galdun*,**, Rony Ghostine***, Jean-Marc Thiriet*, Ján Liguš**, Ján Sarnovský**

* Laboratoire d’Automatique de Grenoble (LAG UMR 5528 CNRS-INPG-UJF)


BP 46, F-38402 Saint Martin d’Hères Cedex
jan.galdun@tuke.sk, jean-marc.thiriet@ujf-grenoble.fr

** Department of Cybernetics and Artificial Intelligence, Technical University of Košice,


Letná 9, SK-04012 Košice
jan.galdun@tuke.sk, jan.ligus@tuke.sk, jan.sarnovsky@tuke.sk

*** Centre de Recherche en Automatique de Nancy (CNRS UMR 7039)


Institut National Polytechnique de Lorraine
2 avenue de la Forêt-de-Haye, 54516 Vandoeuvre, France,
rony.ghostine@ensem.inpl-nancy.fr

Abstract: This paper presents a laboratory mini-helicopter model and its


implementation and simulation as a networked control system. A model of the mini-
helicopter, together with the choice of a communication architecture, is proposed.
Simulations are effected to study the mentioned system as a networked control
system in consideration of network delays, etc. Proposed simulations are achieved
thanks to the TrueTime framework which is a Matlab / Simulink based toolbox. This
toolbox provides several types of networks which are briefly described in the paper.
The mentioned system is simulated by using two types of networks – CAN and
Ethernet wire network. Results show differences in quantitative deviations among
simulations of the mini-helicopter as system without network and with network.
Copyright © 2007 IFAC

Keywords: Networked control system, TrueTime, CAN, Ethernet, communication


architecture.

1. INTRODUCTION embedded system based on the MaRTE OS


environment.
Distributed control systems are a very important part
of the automation control field because they support The paper is organized as follows. In the first section
the implementation of complex control systems and is presented background of this research which
also can offer a better diagnostic than the system involves previous work. In the next part is described
with the same or better control results (depend on the the mini-helicopter real model structure and its parts.
control algorithm and other aspects). A lot of In the third part we briefly present the mathematical
advantages of these systems are the main reason for model of the system prepared by (Castillo, et al.
their application from laboratories up to the industry 2004) which is realised by using Matlab / Simulink.
field. In the other part we present the mini-helicopter
system as a networked control system prepared by
In this paper we would like to present a laboratory using the TrueTime toolbox; in this part we propose
mini-helicopter model and its simulation as a to add a network in the model of Castillo, Dzul and
networked control system by using the TrueTime Lozano. In the last part of this paper are presented
Matlab / Simulink based toolbox (Anderson, et al., results of the simulation. Some problems are shown
2005; Cervin, et al., 2003). The mentioned with the application of distributed control system or
laboratory model is composed of two basic parts – a networked control system.
mobile mini-helicopter model which consists of
sensors, actuators and a communication interface and In further text we write about the mini-helicopter
a static control base which could encapsulate the model by using different words such as helicopter-
control or diagnosis algorithm and a communication drone, helicopter model, rotorcraft and model with
interface. The static control base represents an the same meaning.
2. RESEARCH BACKGROUND Other parts:
- Four propellers,
Current research on mini-helicopter model is - four branches – arranged in a cross,
motivated by the fact that is necessary to find the - electronics – placed in the middle of the cross,
type of the network which is suitable for control the - others.
real-time helicopter system.
Detailed basic physical characteristics of the mini-
Castillo, Dzul and Lozano (2004) were proposed helicopter model are shown in the table 1. This table
controller to control mini-helicopter based on describes weight and size of the helicopter’s parts
Lyapunov analysis. Guenard, Hamel and Moreau and the distances between them. Figure 1 shown
(2005) were proposed intuitive control strategy with abovementioned discussed real mini-helicopter
using non-linear controller which was developed too. model.
Another type of the controller and the control scheme
for mini-helicopter altitude stabilisation was In the case of the static control base, this part of the
proposed by Tayebi and McGivlray (2006). Proposed whole system is based on the MaRTE OS
controllers are designed as a part of the system environment which is a real-time kernel for
without network. embedded application (Lozano, et al., 2004; Castillo,
et al., 2004). This real-time kernel provides C and
Need for implementation the network into the Ada language interfaces. These interfaces allow
proposed control system is required for control mini- development mixed C-Ada applications for control
helicopter with using PC. It means displacement and diagnostic of the mini-helicopter model.
controller hardware from helicopter’s body directly
to the PC.
Table 1: Basic physical characteristic of the Mini-
Implementation the network into the current control Helicopter laboratory model
scheme opens the space for research on the field of
the networked control systems or distributed control Mini-Helicopter’s part / distances Weight / size
systems. Innovated control scheme up to networked
control system could to add advantages proposed by Helicopter (excluding batteries) 320 g
this type of the control into the current control
Batteries 200 g
system.
Maximum length 74 cm
Diameter of rotors 29 cm
3. MINI-HELICOPTER REAL MODEL Height 11 cm
DESCRIPTION Distance between motor and
20.5 cm
center of gravity
As was mentioned above, the whole control system
is composed of the mobile helicopter model and its
control part – a static control base (PC). This
embedded system is interconnected with a 3-D
Tracker system (Polhemus) to measure the helicopter
position and orientation. The communication
between Polhemus and PC is at the moment realised
by an RS 232 communication interface, but we plan
to implement communication network, this point is
discussed further.

The helicopter model is composed of the following


parts:

Sensors:
- Three magnetometers – measure the intensity of
the local magnetic field, Fig 1. Mini-helicopter real model
- three gyrometers – measure angular speed of the
helicopter, The next section of the paper proposes a short
- three accelerometers – acceleration measuring, description of the mini-helicopter mathematical
- sensors for measuring the angular velocity of model.
each rotor,
- six ultrasonic sensors – used to measure the
distance from any obstacle and define the position of 3.1 Mathematical model.
the helicopter.
In this part of the paper we briefly present the
Actuators: mathematic model proposed by Castillo, Dzul and
- Four motors. Lozano (Castillo, et al., 2005) and adapted by
(Guerrero Castellanos, et al. 2005). To obtain a
mathematical model was used a Lagrangian
approach. The generalized coordinates for the With defining generalized moments τ on the η
rotorcraft are: variables
q = (x, y, z,ψ ,θ , φ ) , ⎛τ ψ ⎞
⎜ ⎟
τ ≅ ⎜τ θ ⎟,
where x, y and z denote the position of the centre of
⎜τ ⎟
mass of the rotorcraft and angles ψ, θ and φ ⎝ φ ⎠
represent Euler angles (yaw, pitch and roll angles)
which denote the orientation of the rotorcraft. These the Coriolis-Centripetal vector
coordinates are divided into translational and
rotational coordinates:
ξ = ( x, y, z ) , η = (ψ ,θ , φ ) .

V (η ,η& ) = ⎜⎜ J& −
1 ∂ T
(
2 ∂η
η& J )⎞⎟⎟η& = −C (η ,η& )η& ,
⎝ ⎠
The translational kinetic energy of the rotorcraft is:
and with other mathematical modifications was
m
Ttrans ≅ ξ& T ξ& , obtained this model:
2 ⎛ − sin θ ⎞ ⎛ 0 ⎞
⎜ ⎟ ⎜ ⎟
mξ&& = u ⎜ cos θ sin φ ⎟ + ⎜ 0 ⎟
where m denotes the mass of the rotorcraft. The ⎜ cos θ cos φ ⎟ ⎜ − mg ⎟
rotational kinetic energy is: ⎝ ⎠ ⎝ ⎠
1
Trot ≅ η& T Jη& , J η&& = −C (η ,η& )η& + τ
2

where matrix J represents the inertia matrix. And 3.2 TrueTime toolbox application
potential energy is given by:
U = mgz . The replacement of the classic control structure by a
networked control structure is a first step to add
Thus the Lagrangian is: network interface into the Matlab / Simulink
.
simulation (Anderson, et al., 2005; Cervin, et al.,
L(q, q ) = Ttrans + Trot − U
. 2003). Both parts of the system, helicopter and base,
m 1 are modelled by using classical Simulink blocks
= ξ& T Jξ& + η& T Jη& − mgz
2 2 whereas the TrueTime library provides specific
blocks for the network interface modelling. This
The model of the rotorcraft dynamics is obtained library is developed in C++ language. All the
from the Euler-Lagrange equations with external developed files are compiled in Matlab by using an
generalized force: external C++ compiler.
d ∂L ∂L
− =F, The controller (static base) communicates via
dt ∂ q.
∂q network with sensors and actuators which are placed
on the moveable part of the whole system – mini-
helicopter. Controller receives 9 signals from the
where F = (Fξ, τ) and Fξ is the translational force
helicopter sensors which are used by the control
applied to rotorcraft due to the control inputs. Small
algorithm to compute actuating value for each one
body forces are ignored and thus:
propeller drive (actuator). Structure of the described
⎛0⎞ system modelled by TrueTime is shown in the figure
⎜ ⎟ 2.
Fˆ = ⎜ 0 ⎟ ,
⎜u ⎟ TrueTime provide few types of networks which can
⎝ ⎠
be used for simulation of the NCS. These networks
are divided into two categories – wire and wireless
where control input u = f1 + f2 + f3 + f4 and f1 = kiωi
networks. Provided wire network by TrueTime are:
where ki > 0 is constant and ωi is the angular speed
- Ethernet (CSMA / CD)
of the i-th motor. Then
- CAN (CSMA / AMP)
Fξ = RFˆ , - Round Robin (Token Bus)
where R is the transformation matrix representing the - TDMA (Time Division Multiple Access)
orientation of the helicopter (for cos was used c and - FDMA (Frequency Division Multiple Access)
for sin was used s). - Switched Ethernet

⎛ cψcθ sψsθ − sθ ⎞ Offered wireless networks are follows:


⎜ ⎟ - WLAN (802.11 b/g)
R = ⎜ cψsθsφ − sψcφ sψsθsφ + cψsφ cθsφ ⎟ - ZigBee (802.15.4)
⎜ cψsθcφ + sψsφ sψsθcφ − cψsφ cθcφ ⎟⎠

The network interconnects 15 nodes. 9 sensors which rate is not sufficient to transfer required information
send actual system output values to the controller and within sample period T.
other 4 nodes (actuators) which receive actuating
value from the controller. Each node is represented Nodes connected to Ethernet network use CSMA/CD
by TrueTime kernel (Anderson, et al., 2005) which arbitration (Carrier Sense Multiple Access with
encapsulates D/A, A/D converter, receiver, sender, Collision Detection). When the network is occupied
etc… by data transmission then another node will start with
data sending after the first finished. When a collision
In simulation we used CAN and Ethernet network occurs (two messages are being started within 1
model (Pekhteryev, et al., 2005; Kumar, 2001). CAN microsecond) then the sender will back off for a time
and Ethernet networks were chosen to show defined by:
differences in quality of the control between network
which is determined for control applications and min _frame_size
network developed for wide fields of applications. tbackoff = ×R,
data_rate
TrueTime Matlab / Simulink model
where R = rand(0, 2K-1) (discrete uniform
Mini-helicopter distribution) and K is the number of collision in a
row. After waiting the node will try to send data
Sensors
again.
N Static control base
E
T
4. SIMULATIONS
W Controller
Model
O The orientation of the helicopter in the space is
R described by Euler angles (yaw, pitch and roll
K
angles) or quaternion. Mentioned quaternion
Actuators represents state of the system. The main aim of the
control is to obtain required system state q = [q0, q1,
q2, q3] = [1 0 0 0] which can be considered as a
stable position of the system. This quaternion
Fig. 2. Structure of the networked control system. represents the attitude of the model (Guenard, et al.,
2005) (Tanwani, et al., 2006) and describes
CAN network uses CSMA/AMP arbitration (Carrier helicopter’s orientation in the space.
Sense Multiple Access with Arbitration on Message
Priority). If the network is busy, the sender waits First provided simulation of the system was realised
until the network is free. If a collision occurred (two without network, as a classic control structure, to
transmissions are being started within 1 demonstrate the required behaviour of the system (as
microsecond), the message with the highest priority a reference). This simulation is shown in the figure 3.
will continue its transmission. When two messages We can see that the system has obtained the desired
with the same priority are sent simultaneously an state after two seconds of simulations.
arbitrary will choose first one to continue its
transmission. However, the networked control Other two simulations were realised with two
system which is discussed in this paper is composed different networks i.e. CAN and Ethernet network. In
of nodes with different priorities. The same the case of CAN network was used 1 Mbit/s bit rate
”philosophy” is used in the real networked control in comparison with 10 Mbit/s bit rate of the Ethernet
systems where CAN network is used. network. This bit rate was chosen because results of
the simulations with lower bit rate were insufficient
CAN arbitration system does not cause the delays in (see figure 6). Thus, to obtain a better result it was
the network but only when amount of transmitted necessary to increase the data rate up to 10 Mbit/s.
datum is acceptable by network’s data rate. To
determine whether CAN data rate could be sufficient Thus three simulations were provided i.e. system
we can use very simple equations: without network, with CAN network (1 Mbit/s) and
with Ethernet network (10 Mbit/s). The results of the
1 simulation were very similar. Hence only two
8 Ad nN
T , elements of the quaternion q = [q0, q1, q2, q3] were
s= compared with different data rate. This comparison is
br
shown in the figures 4 and figure 5, where are
compared curves which represent element q0 and q2
where Ad is amount of data which could be sent by
of quaternion q. The curves were obtained as output
each node in bytes (8 – represent bits per byte), T
the simulation with two different networks: CAN (1
sample period each of the node, nN is number of
Mbit/s) and Ethernet (10 Mbit/s). In the case of the
nodes and br is bit rate of the network in bit per
simulations with network, thus networked control
second. When s is lower than 1 network bit rate
system simulation, similar results were obtained
could be sufficient to transfer all required
when CAN control network was used. Obtained
informations from all nodes within sample period T.
curves are almost the same shape as in the case of the
If it be to the contrary (more than 1) than network bit
simulation without network.
This result confirms that CAN network is designed
Finally a simulation of the system with Ethernet for transfer small amount of data in small time
network is presented, with the same bite rate as the intervals (Balogh et al., 2001). In combination with
CAN network (1 Mbit/s). Obtained insufficient result arbitration the medium access method by message
is shown in figure 4. As it was mentioned before, to priority are informations transmitted without delays
obtain a better result it was necessary to increase the but only when amount of transmitted data does not
data rate up to 10 Mbit/s which is a usual value for exceed network’s data rate. We can see that medium
Ethernet networks. Figures 4 and 5 show that after access method and combination other parameters of
increasing the data rate the system has reached the the system (sample period, bit rate, etc.) has
required state q. significant influence to system behaviour (Lian, et
al., 2002). Hence CAN network is able to work with
All simulations were provided with sample period lower bit rate as Ethernet, however with comparable
T = 0.01s. Thus, each node of the network (sensors, results. In the figures 4 and 5 we can see different
controller, etc.) sends the required data within the delays. These different delays are caused by two
mentioned sample period T. different networks and their different medium access
method.
1.2
0.08
Without network
1 0.07 CAN 1Mb/s
q0 Eth 10Mb/s
0.06
0.8 q1
0.05
q2
0.6 0.04
q3
q

q2 0.03
0.4
0.02

0.2 0.01

0
0
-0.01

-0.2 -0.02
0 1 2 3 4 5 0.8 1 1.2 1.4 1.6 1.8 2
time [s] time [s]

Fig. 3. System behaviour without network. Fig. 5. Comparison of the curves q2.

1.005 1
q0
0.8
1 q1
0.6 q2

0.995 q3
Without network 0.4
CAN 1Mb/s
0.2
0.99 Eth 10Mb/s
0
q

0.985
q0

-0.2

0.98 -0.4

-0.6
0.975
-0.8
0.97
-1
0 1 2 3 4 5
time [s]
0.965
0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
time [s] Fig. 6. Ethernet network with a data rate of 1 Mbit/s.
Fig. 4. Comparison of the curves q0. As we can see, the simulation result of the Ethernet
network (shown in figure 6) was insufficient when
the network data rate was 1 Mbit/s. A solution of this
5. RESULTS problem was found when data rate was increased up
Provided simulations show that differences among to 10 Mbit/s. The reason for the insufficient result
system output obtained by simulation without with 1 Mbit/s network data rate can found in the
network, with 1 Mbit/s CAN network and with 10 medium access method (arbitrary system) too. The
Mbit/s Ethernet network are very small (figure 4 and occurrence of the collisions on the network depends
5). Thus, in the case of both networks with on some characteristics of the NCS such as the
mentioned data rates were obtained results which do number of nodes connected to the network, on the
not disturb the required quality of the control (in network data rate, on the synchronisation among the
comparison with simulation results without network). nodes, on the sampling period, etc (Balogh et al.,
2001). The probability of collisions increases if the
above characteristics are not correctly tuned. When ACKNOWLEDGEMENTS
the mentioned aspects such as data rate, number of The authors wish to thank colleagues and students
nodes, sample period are not optimally tuned the from Grenoble: Małgorzata Sztokfisz, Aneel Kumar
system can be destabilised (Lian, et al., 2002) as in Tanwani, Guillermo Fermi, Sylviane Gentil, Suzanne
the figure 6. We can see that a low bit rate in Lesecq.
combination with a small sampling period for each
node represents a NCS with none optimally tuned REFERENCES
parameters.
Anderson, M., Henriksson, D., Cervin, A., (2005)
In the model of the presented networked control TrueTime 1.3 – Reference Manual, Lung Institute of
Technology.
system we suppose that all connected nodes are Balogh, R., Bélai, I., Dorner,J., Drahoš, P., (2001)
synchronized. This synchronisation increases the Priemyselné komunikácie, STU Bratislava, ISBN 80-
probability of the collisions because each node send 227-1600-6
sampled or computed data with the same sample Castillo, P., Dzul, A., Lozano, R., (2004). Real-Time
period in the same time. Thus, when the system is Stabilisation and Tracking of a Four Rotor Mini-
synchronized and the sample period of each node is Rotorcraft, IEEE Transaction on control systems
0.01s, as in mini-helicopter simulation, then the technology, Vol 12, No. 4, p. 510 – 516.
probability of collisions as well as the delays is Cervin, A., Henriksson, D., Lincoln, B., Eker, J., Arzen,
rapidly increasing. In the case of the simulation with K.,E., (2003) How Does Control Timing Affect
Performance? Analysis and Simulation of Timing
Ethernet network with 1 Mbit/s data rate all of Using Jitterbug and TrueTime, IEEE Control Systems
mentioned conditions (low bit rate, a lot of nodes, Magazine, Vol 23, No. 3, p. 16 – 30.
small sample period, etc.) is occurred hence the Cheong SO, J.K (2003). Delay Modelling And Controller
system was destabilized. The simulation result show design for networked Control systems. Master of
that Ethernet network is more suitable for application applied thesis. Department of Electrical and Computer
where they are not sent a lot of data in the short time Engineering University of Toronto.
intervals. Hence conditions which are required by Guenard, N., Hamel, T., Moreau, V., (2005) Dynamic
networked control systems are not suitable for its modeling and intuitive control strategy for an “X4-
application. flyer”, International Conference on Control and
Automation, 26-29 June 2005, Vol 1, p.141 - 146.
Guerrero Castellanos J.F, S. Lesecq, N. Marchand, and
On the basis of obtained results we can suppose that J.Delamare (2005) A low-cost air data attitude
sending a lot of data in short time intervals via heading reference system for the tourism airplane
network with insufficient data rate, can cause applications. IEEE Sensors.
network delays which can make the system unstable. Kumar P.R., (2001) New Technological Vistas for Systems
Hence it is necessary to take care of the network type and Control: The Example of Wireless Networks,
determined for application in the conditions of the IEEE Control System Magazine.
networked control systems. Lian, F., L., Moyne, J., R., Tilbury, D., M., (2002)
Network design consideration for distributed control
systems, IEEE Trans. on Control Systems Technology,
Vol. 10, no. 2, pp. 297–307, 2002.Barger, P., J.M.
6. CONCLUSIONS Thiriet, M. Robert (2003). Safety analysis and
reliability estimation of a networked control system
The aim of this work is to study Networked Control In: SAFEPROCESS 2003, Washington, D.C, USA.
Systems, and more precisely to see on performance
Ligušova J., Thiriet J.M., Liguš J., Barger P, Effect of
parameters of the control network. We are Elements Initialization in Synchronous Networked
particularly interested in the influence of these control System to Control Quality, RAMS/IEEE
parameters to stability and reliability of the system. conference 2004 (Annual Reliability and
This approach with using provided simulations is Maintainability Symposium), Los Angeles, January
necessary for realization the real networked control 2004.
structure of the mini-helicopter model. Lozano, R., Castillo, P., Garcia, P., Dzul, A., (2004)
Robust prediction-based control for unstable delay
This paper is a contribution to the study of the systems: Application to the yaw control of a mini-
helicopter, Automatica, Vol. 40, p. 603 - 612.
influence of the network parameters to stability and
Pekhteryev, G. Sahinoglu, Z. Orlik, P. Bhatti, G.,
quality of the control realized for networked control (2005) Image Transmission over IEEE 802.15.4 and
system. Results show difference between using the ZigBee, Networks Circuits and Systems. IEEE
network developed especially for control and the International Symposium, Vol 4, p. 3539 - 3542
network determined for widely use in common Rufino, J. and P. Verissimo (1995), A study on the
distributed systems where short time delays are inaccessibility characteristics of the controller area
ignored. We can also see that relation between network, Proceeding of the 2nd International CAN
network rate and quality of the control is very close. Conference .
Simulations show that other parameters have Tanwani, A. K., Galdun, J., Thiriet, J-M., Lesecq, S.,
Gentil, S. Modelling of an experimental networked
influence to performance characteristic of the drone with consideration of faults, submitted to
networked control systems too. ECC’07.
Tayebi, A., McGilvray, S., (2006) Attitude Stabilization of
a VTOL Quadrotor Aircraft, IEEE Transactions on
control systems technology, Vol. 14, No. 3, p. 562 -
571

You might also like