PosterPDF Available

Software-in-the-loop simulation for improving flight control system design: a quadrotor case study

Authors:

Abstract

Simulation is a standard approach used for designing complex systems like the flight controller in multi-rotor vehicles. In this paper we illustrate how the software-in-the-loop (SIL) methodology allows to detect and manage instabilities of a quadrotor control system that otherwise might not arise when considering only Matlab/Simulink simulations discovering issues that a model-in-the-loop (MIL) simulation does not necessarily detect. The paper aims to give the reader a practical and concrete evidence of such considerations through the case study of a micro quadrotor.
29.8637
“poster”
2019/9/6
page 1
i
i
i
i
i
i
i
i
Software-in-the-loop simulation for improving flight control system
design: a quadrotor case study
Giuseppe Silano, Pasquale Oppido and Luigi Iannelli
1. Motivation
Multi-rotor aircraft are a fast-growing field of robotics and nowadays are rapidly
increasing in popularity also out of the scientific community. However, designing
autopilots for UAVs (Unmanned Aerial Vehicles) is a challenging task, which
involves multiple interconnected aspects. Therefore, having tools able to show what
it happens when some new applications are going to be developed in unknown or
critical situations is more and more important.
Goal: Showing how the use of the SIL (software-in-the-loop) techniques allows to
understand the behavior of flight control systems discovering issues that model-in-
the-loop (MIL) simulation approaches do not necessarily detect, even if carried out
through a multi-physics co-simulation approach.
2. Case Study
The case study here considered is the stabilizing controller discussed in [1] that in
our case study it has been designed by considering the Parrot Bebop 2 quadrotor.
MIL
Matlab/Simulink
SIL
ROS/Gazebo
Controller Design Controller Validation
A detailed aircraft model was used in a twofold way: firstly, for tuning the con-
troller gains (obtained as the solution of an optimization problem), and then for
validating the flight control system by comparing MIL simulation results (the flight
control system implemented as a Simulink model) with those obtained through SIL
simulations (the flight control system implemented as an executable object code in
ROS/Gazebo).
3. Flight Control System
With the aim of illustrating a control design methodology exploiting the SIL simu-
lation, a common cascade control architecture was used.
Outer loop
controller
Inner loop
controller
Control
Mixer
Aircraft
+
Motors
ξr
ψr
ψr
uT
ϕr
θr
uϕ,uθ
uψ
ξd
ref
1,ref
2
ref
3,ref
4
ξd
ηd
ηd
Figure 1:The control scheme. Subscript dindicates the drone variables and r
indicates references to controllers.
The position controller (the outer loop controller) uses the measured drone position
ξdto compute the thrust (uT) and the attitude (ϕrand θr) that should have the
drone in order to reach the desired position ξrwith the desired heading (yaw angle)
orientation ψr. The attitude controller (the inner loop controller) uses the measured
drone attitude ηdto compute the model inputs uϕ,uθand uψthat should be
actuated to achieve the desired attitude (ϕr,θrand ψr). The control mixer inverts
the controller outputs obtaining the commanded motor velocities ref
i, later used as
inputs for the aircraft dynamical model (it considers also the rotors dynamics).
Controller equations: The drone position in the world frame is controlled through
the virtual inputs
uq=αq
µq
˙
eqβq
µ2
q
eqm, q ∈ {x, y, z}
where µq>0,βq<0and αq= 1 βq>0are controller parameters to be
appropriately chosen and eqare the components of the position tracking errors.
While, the inner controller determines the virtual inputs uϕ,uθand uψto regulate
the drone attitude according to the following control laws:
uϕ=Ix αϕ
µϕ
˙
eϕβϕ
µ2
ϕ
eϕeθeψ
µθµψIyIz
Ix!, uθ=Iyαθ
µθ
˙
eθβθ
µ2
θ
eθeϕeψ
µϕµψIzIx
Iy,
uψ=Iz αψ
µψ
˙
eψβψ
µ2
ψ
eψeϕeθ
µϕµθIxIy
Iz!,
where I=diag(Ix, Iy, Iz)is the inertia matrix of the vehicle w.r.t. its principal axis.
Finally, according to [1, eqs. (40)–(41)], the MATLAB/Simulink platform was used
to minimize in a numerical way the integral of the squared error (ISE)
ISE(µk, βk),1
tftiZtf
tikeη(t)k2+keξ(t)k2dt
w.r.t. the control parameters µk,βk,k∈ {x, y, z, ϕ, θ, ψ}taking into account also
motor dynamics, saturation constraints and controller discretization
4. Numerical Results
When moving from the control design based on the nominal model to the actual
implementation, several issues should be addressed:
First, the control architecture. In our case it is based on control loops that
are nothing but PD (Proportional-Derivative). For such class of controllers,
a classical way of dealing with the time derivative of controller error is to
differentiate only the output signal;
Then, the controller discretization. As a common rule in cascade structures
the inner loops need to be regulated at a rate faster than the outer. In our
case, the attitude controller runs at 200 Hz while the position controller runs
at 100 Hz.
Finally, the hardware constraints and software implementation. The
controller has to clip the desired rotor velocity so that 0ref
imax.
Furthermore, software aspects such as synchronization, overflow, tasks com-
munication have to be managed paying attention to maintain the controller
behavior.
SIL Simulation: The SIL simulation has been carried out by the ROS (Robot Op-
erating System) middleware using Gazebo and the ROS package RotorS as robotic
simulators. The considered architecture was used to understand how the system
behaves when moving from MATLAB to Gazebo (see Fig. 2) and if the stability is
still hold.
0 5 10 15 20 25 30
4.6
5
5.4
5.8
6.2
Time [s]
Thurst [N]
(a) The total thrust uTrequested by the controller: numerical
experiment in MATLAB/Simulink.
0 0.1 0.2 0.3
10
8
6
4
2
0
2
Time [s]
Force [N]
(b) Signal uZ: numerical experiment in Gazebo.
Figure 2:The uTand uzsignals obtained doing the same experiment in MAT-
LAB/Simulink and Gazebo, respectively.
By looking at first tenths of second of simulations it comes out that the uzcontrol
signal assumes negative values much below mg =4.9 N, see Fig. 2(b). That
is an important issue since uz<mg uz+mg < 0but (see [3]), that means
uz+mg =uTcθdcϕd<0. Of course, it is not possible to apply a thrust that gives
the desired uzand such specific situation is well known in literature to bring the
system to instability [2].
Conclusions: Thus, considering the approach proposed in [2] and the naive clipping
of rotor velocities (see [3]), it is possible to make the flight control work exploiting
the advantages offered by the use of SIL methodologies in detecting instabilities
that might not arise during classical MIL simulations. We published the software as
open source available at the link https://github.com/gsilano/BebopS.
References
[1] Bouzid, Y., Siguerdidjane, H. and Bestaoui, Y., “Nonlinear internal model con-
trol applied to VTOL multi-rotors UAV,” Mechatronics, vol. 47, pp. 49–66,
2017.
[2] T. Nguyen, I. Prodan, and L. Lef`evre, “Flat trajectory design and tracking
with saturation guarantees: a nano-drone application,” International Journal of
Control, pp. 1–14, 2018.
[3] G. Silano, P. Oppido, and L. Iannelli, “Software-in-the-loop simulation for im-
proving flight control system design: a quadrotor case study”, IEEE Interna-
tional Conference on Systems, Man and Cybernetics, 2019.
Universit`a degli Studi del Sannio
Dipartimento di Ingegneria, Benevento.
Web: https://www.ding.unisannio.it
E-mail: {giuseppe.silano, pasquale.oppido, luigi.iannelli}@unisannnio.it
Article
Multi-rotor Unmanned Aerial Vehicles (UAVs), although originally designed and developed for defence and military purposes, in the last ten years have gained momentum, especially for civilian applications, such as search and rescue, surveying and mapping, and agricultural crops and monitoring. Thanks to their hovering and Vertical Take-Off and Landing (VTOL) capabilities and the capacity to carry out tasks with complete autonomy, they are now a standard platform for both research and industrial uses. However, while the flight control architecture is well established in the literature, there are still many challenges in designing autonomous guidance and navigation systems to make the UAV able to work in constrained and cluttered environments or also indoors. Therefore, the main motivation of this work is to provide a comprehensive and exhaustive literature review on the numerous methods and approaches to address path-planning problems for multi-rotor UAVs. In particular, the inclusion of a review of the related research in the context of Precision Agriculture (PA) provides a unified and accessible presentation for researchers who are initiating their endeavours in this subject.
Article
Full-text available
Precision agriculture (PA) research aims to design decision systems based on agricultural site control and management. These systems consist of observing fields and measuring metrics to optimize yields and investments while preserving resources. The corresponding applications can be found on large agricultural areas based on satellites, unmanned aerial vehicles (UAVs), and sol robots. All these applications based on various algorithms that are complex in terms of processing time. If these algorithms are evaluated offline on work-stations or desktops, this is not the case for algorithms that need to be embedded and should operate and help make real-time decisions. We, therefore, need an advanced study using hardware-software co-design approach to design decision systems to embed different algorithms, including sensor data acquisition and processing units. In this work, we propose a review in processing information tools-based embedded systems in PA algorithms with different applications: weed detection, numerical counting, monitoring of plant indexes, and disease detection. This review has been based on more than 100 papers to extract useful information on the different techniques used and the information processing systems. The elaborated study presents the various tools, databases, and systems in order to extract the advantages and disadvantages of system and application.
Chapter
This paper deals with the description of a drone management system for long-term missions called DronePort. First, the issue of long-term missions and possible approaches are outlined. Further, the individual components of proposed system, both hardware, and software are introduced. The DronePort system relies on battery swapping. By storing the battery in a battery compartment, the system is not strictly designed for one type of drone, but with simple modification, it is capable of maintaining a flight of various Vertical Take-Off and Landing (VTOL) drones. Afterward, more attention is paid to the simulation environment, which will greatly facilitate the development of the entire system. The simulation includes both drones equipped with a down-facing camera and a DronePort landing platform, which is fitted with an ArUco marker for precise landing. Next, the DronePort Traffic Control system is presented, which is tasked with communicating with the drones, scheduling battery swapping, and planning trajectories for the flight to and from the DronePort landing platform. The system uses the standard MAVLink protocol for communication, enabling use with a variety of MAVLink compatible drones. Finally, an example of collision-free trajectory planning considering battery capacity is presented. Trajectory was found in terms of Chebyshev pseudospectral optimal control.
Conference Paper
Full-text available
An application of stereo thermal vision to perform preliminary inspection operations of electrical power lines by a particular class of small Unmanned Aerial Vehicles (UAVs), aka Micro Unmanned Aerial Vehicles (MAVs), is presented in this paper. The proposed hardware and software setup allows the detection of overheated power equipment, one of the major causes of power outages. The stereo vision complements the GPS information by finely detecting the potential source of damage while also providing a measure of the harm extension. The reduced sizes and the light weight of the vehicle enable to survey areas otherwise difficult to access with standard UAVs. Gazebo simulations and real flight experiments demonstrate the feasibility and effectiveness of the proposed setup.
Conference Paper
Full-text available
A novel prizewinner algorithm designed for a path following problem within the Unmanned Aerial Vehicle (UAV) field is presented in this paper. The proposed approach exploits the advantages offered by the pure pursuing algorithm to set up an intuitive and simple control framework. A path for a quad-rotor UAV is obtained by using downward facing camera images implementing an Image-Based Visual Servoing (IBVS) approach. Numerical simulations in MATLAB ® together with the MathWorks ™ Virtual Reality (VR) toolbox demonstrate the validity and the effectiveness of the proposed solution. The code is released as open-source making it possible to go through any part of the system and to replicate the obtained results.
Conference Paper
Full-text available
Multi-rotor Unmanned Aerial Vehicles (UAVs) need to tilt in order to move; this modifies the UAV’s antenna orientation. We consider the scenario where a multi-rotor UAV serves as a communication relay between a Base Station (BS)and another UAV. We propose a framework to generate feasible trajectories for the multi-rotor UAV relay while considering its motion dynamics and the motion-induced changes of the antenna orientation. The UAV relay’s trajectory is optimized to maximize the end-to-end number of bits transmitted. Numerical simulations in MATLAB and Gazebo show the benefits of accounting for the antenna orientation variations due to the UAV tilt.
Conference Paper
Full-text available
This paper presents a multi-layer software architecture to perform cooperative missions with a fleet of quad-rotors providing support in electrical power line inspection operations. The proposed software framework guarantees the compliance with safety requirements between drones and human workers while ensuring that the mission is carried out successfully. Besides, cognitive capabilities are integrated in the multi-vehicle system in order to reply to unforeseen events and external disturbances. The feasibility and effectiveness of the proposed architecture are demonstrated by means of realistic simulations.
Thesis
Aerial robotics is a fast-growing field of robotics and in particular multi-rotor aircraft are rapidly increasing in popularity also out of the scientific community. However, designing autopilots for these vehicles is a challenging task, which involves multiple interconnected aspects. Hence, having tools able to show what happens when some new applications are going to be developed in unknown or critical situations is more and more important for the whole design process. The aim of this thesis is to show the role and the effectiveness of robotics simulators in flight control system design for multi-rotor aircraft (especially, quad-rotors) proposing a Software-in-the-loop (SIL) methodology. In particular, it will be explained, by using rather complex examples, how a SIL approach allows to detect and to manage instabilities that otherwise might not arise when considering the only MATLAB/Simulink simulations. On the other hand, such instabilities may not be just related to the complexity, accuracy, or detailed modeling of the simulated plant, but rather they may appear due to peculiar features of the final realization and, in particular, the software that will implement the control strategy. Indeed, aspects like synchronization, overflow, task communication, are all managed by libraries or tools available during the control design phase, and yet they are specific of the final code implementation. From such a perspective, SIL simulation has to be considered a valuable tool for discovering, in an earlier phase of the usual V-model process, those issues that Model-in-the-loop (MIL) simulation does not necessarily detect. At the same time, a SIL simulation, obtained by using realistic and detailed simulators give the opportunity of validating in an easy way the effects of modifying the control strategy for complex missions. That represents quite often the easiest way to tune the flight control system and to check its validity. Although advantages of such methodology are reasonable for the scientific community from a very general viewpoint, illustrative case studies can be of interest in particular if declined to the specific application.
Article
Full-text available
This paper deals with the problem of trajectory planning and tracking of a quadcopter system based on the property of differential flatness. Firstly, B-splines characterizations of the flat output allow for optimal trajectory generation subject to waypoints constraints, thrust and angles constraints while minimizing the trajectory length. Secondly, the proposed tracking control strategy combines feedback linearization and nested saturation control via flatness. The control strategy provides bounded inputs (thrust, roll and pitch angles) while ensuring the overall stability of the tracking error dynamics. The control parameters are chosen based on the information of the a priori given reference trajectory. Moreover, conditions for the existence of these parameters are presented. The effectiveness of the trajectory planning and the tracking control design are analyzed and validated through simulation and experiments results over a real nano quadcopter platform, the Crazyflie 2.0.
Conference Paper
Simulation is a standard approach used for designing complex systems like the flight controller in multi-rotor vehicles. In this paper we illustrate how the software-in-the-loop (SIL) methodology allows to detect and manage instabilities of a quadrotor control system that otherwise might not arise when considering only Matlab/Simulink simulations. The use of the SIL technique allows to understand the behavior of the flight control system by comparing and evaluating different scenarios, with a details level quite close to reality. At the same time, it is possible to discover issues that a model-in-the-loop (MIL) simulation does not necessarily detect, even if carried out through a multi-physics co-simulation approach. The paper aims to give the reader a practical and concrete evidence of such considerations through the case study of a micro quadrotor.
Article
This paper describes a novel Nonlinear Internal Model Control (NLIMC) approach. We show that if we change, in a new manner, the control based on flatness property in order to get a closed loop structure, we can raise the performance and the robustness level with regards to structured or unstructured disturbances. The control performance is evaluated through a Vertical Take-Off and Landing (VTOL) Unmanned Aerial Vehicle (UAV) where numerical simulations are performed demonstrating the effectiveness of this novel controller form. The obtained results are confirmed by series of experimental tests showing also the robustness level of this technique in presence of wind.