Next Article in Journal
IoT Platform for Seafood Farmers and Consumers
Next Article in Special Issue
Decentralized Mesh-Based Model Predictive Control for Swarms of UAVs
Previous Article in Journal
Machine Learning Modelling and Feature Engineering in Seismology Experiment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Velocity Sensor for Real-Time Backstepping Control of a Multirotor Considering Actuator Dynamics

by
Walter Alejandro Mayorga-Macías
1,
Luis Enrique González-Jiménez
1,*,
Marco Antonio Meza-Aguilar
1 and
Luis Fernando Luque-Vega
2
1
Department of Electronics Systems and Computing, Instituto Tecnológico y de Estudios Superiores de Occidente, ITESO AC, Tlaquepaque 45604, Jalisco, Mexico
2
Centro de Investigación, Innovación y Desarrollo Tecnológico CIIDETEC-UVM, Universidad del Valle de México, Tlaquepaque 45601, Jalisco, Mexico
*
Author to whom correspondence should be addressed.
Sensors 2020, 20(15), 4229; https://doi.org/10.3390/s20154229
Submission received: 11 June 2020 / Revised: 15 July 2020 / Accepted: 22 July 2020 / Published: 29 July 2020
(This article belongs to the Special Issue Sensors for Aerial Unmanned Systems)

Abstract

:
A real-time implementation of a control scheme for a multirotor, based on angular velocity sensors for the actuators, is presented. The control scheme is composed of two loops: an inner loop for the actuators and an outer loop for the unmanned aerial vehicle (UAV). The UAV control algorithm is designed by means of the backstepping technique and a robust sliding mode differentiator, and the actuator control strategy is based on a standard proportional-integral-derivative (PID) controller. A robust exact differentiator, based on high order sliding modes, is used to estimate the complex derivatives present in the proposed control law. As the measurements of the propeller’s angular velocities are required for the control law, velocity sensors are mounted in the axles of the rotors to retrieve them and a signal conditioning stage is implemented. In addition, dynamical models for the actuators of the aircraft were calculated by means of transfer functions obtained via experimental measurements in a test bench developed for this purpose. This test bench permits to characterize the parameters of the transfer functions by comparing the forces computed using the nominal parameter to the measured forces. To this end, it is assumed that the loads in the actuators of the vehicle are insignificant during flight. The effectiveness of the proposed sensor, its signal conditioning, and the overall control scheme are validated by means of simulation results and real-time experiments.

1. Introduction

An unmanned aerial vehicle (UAV) is an aircraft with no aircrew, which is replaced by a control computer system and radio-link for remote controllability or autonomous flight. The applications of UAVs cover diverse technology areas from monitoring and surveillance to transportation, which influence research fields as computer vision, mechanical design and automatic control. Moreover, from a control point of view, a UAV is a complex, nonlinear, highly coupled dynamical system with multiple inputs and outputs that is usually disturbed by diverse environmental factors as wind, air density variations, and obstacles. Hence, in order to implement a UAV flight controller in real-time, it is important to first validate the designed control scheme using simulation results and, then, implement it in an electronic embedded system. In particular, multirotors are a type of UAV characterized by easy construction and control.
A great diversity of research works oriented to the control for multirotors can be found in the literature, as shown in [1,2]. The control scheme approaches include classic control schemes as PID (Proportional-Integral-Derivative) [3,4]; LQR (Linear Quadratic Regulator) [5]; and MPC (Model Predictive Control) [6,7], the main feature of which is the ability to predict behavior of the controlled system to react accordingly; nevertheless, its robustness depends on the accuracy of the obtained model of the system, which usually is based on empirical experimentation. Moreover, standard control techniques as backstepping methods have been merged with more advanced control algorithms to add desired control features in the closed loop system as in [8,9,10,11]. Amongst these advanced nonlinear control strategies, the so-called intelligent control schemes based on neural networks [12,13] and fuzzy logic [14,15] have been implemented to provide an extension of linear control techniques for more operating points of the plant, or to include the capacity of generalize the model of a subsystem of the UAV for control purposes. These are attractive approaches for controlling multirotors, however, their implementation is complex and computationally expensive which are undesirable features when a real-time implementation of the control scheme is required. Additionally, another desired characteristic for a multirotor controller is robustness as the vehicle is usually disturbed by external factors during a normal real-time operation. In that regard, the adaptive control approach has been used to robustly control multirotors in different flight modes as in [16,17]. But, when it comes to robustness, the sliding mode theory [18] has demonstrated excellent results for quadrotor controllers as in [9,11,19,20]. Nonetheless, it is usually accompanied by an undesirable phenomenon called chattering, which is characterized by high frequency components in the control signal, affecting negatively the actuators of the controlled system.
On the other hand, the standard instrumentation of multirotors includes a global positioning system (GPS) sensor module to retrieve the position of the vehicle, and an inertial measurement unit (IMU) to obtain the angular and linear velocities of the UAV. However, the angular velocities of the axles of the actuators are usually discarded even when this information could permit to obtain the generated thrust, consumed current, and fault detection in the actuators [21]. This could enable the development of applications for accurate range and endurance estimation, model-based control design, real-time aerodynamic drag estimation and propeller performance tracking. Some works have been oriented to implement sensors to monitor the thrust generation during flight in multirotors using force sensors [22,23,24]; and model-based estimations [25]. Also, the rotors angular velocities can be fused with other sensors signals as in [26] where rotor speeds where merged to the accelerometer’s outputs using a Kalman filter for attitude stabilization of the UAV. In addition, several algorithms have been used for speed control of Brushless Direct Current (BLDC) motors but, amongst them, the PID control features ease implementation and avoids the necessity of modelling the actuator, which tends to be troublesome due to the parameter identification. For instance, in [27,28] a PID algorithm combined with fuzzy control was used for reference tracking of the angular velocity of a BLDC motor. In [29], an adaptive PID control algorithm was designed and in [30] an adaptive fuzzy PID control scheme was used, both for the same purpose. Finally, the PID control has also been combined with more complex intelligent algorithms as deep neural networks. In [31] such a controller was designed for the speed control of a BLDC motor and its stability analysis was presented. In summary, the best performance for a multirotor control scheme is usually obtained by combining control techniques that add up features as disturbance robustness, energy efficiency, transient characteristics, and steady state error. However, as the objective of this work is to present the performance of a control scheme with the inclusion of velocity sensors for the actuators, we aimed to the simplicity and ease embedded implementation of the proposed control strategy. Due to that, in this work, a backstepping controller is proposed for the trajectory tracking of the attitude and altitude of a quadrotor. The overall control scheme considers an inner loop PID controller for the actuators (BLDC motors) of the multirotor and the implementation of velocity sensors for their axles. First, the dynamic model of the UAV and its actuators is obtained. It is worth to note that insignificant loads in the actuators of the vehicle are assumed, i.e., small accelerations of the multirotor and negligible external disturbances during flight. Then, the backstepping control algorithm is designed, and simulations results for the closed loop system are shown. Afterwards, real-time experiments are developed, and their results are documented and discussed. Finally, the conclusions of the presented work are outlined.

2. UAV’S Dynamical Model

A graphical representation of the multirotor considered in this work is depicted in Figure 1. The position of the vehicle is defined by its Cartesian coordinates ( x , y , z ) which corresponds to the translation vector between the origins of and inertial reference system x E , y E , z E and a coordinated system x B , y B , z B fixed to the centre of gravity of the UAV. Therefore, the orientation of the vehicle is defined by the Euler angles between these two coordinate systems: roll ( ϕ ), pitch ( θ ) and yaw ( ψ ). Defining a state vector as X = [ ϕ , ϕ ˙ , θ , θ ˙ , ψ , ψ ˙ , z , z ˙ , x , x ˙ , y , y ˙ ] T , the state space representation of the vehicle can be obtained as:
X ˙ = x 2 f 2 + b 2 U 1 x 4 f 4 + b 4 U 2 x 6 f 6 + b 6 U 3 x 8 f 8 + b 8 U 4 x 10 b 10 U 1 x 12 b 12 U 1
where f 2 = g , f 4 = x 4 x 6 I y I z I x J r I x x 4 Ω , f 6 = x 2 x 6 I z I x I y + J r I y x 2 Ω , f 8 = x 2 x 4 I x I y I z , b 2 = c 1 c 3 m , b 4 = l I x , b 6 = l I y , b 8 = l I z , b 10 = c 1 s 3 c 5 + s 1 s 5 m , b 12 = c 1 s 3 s 5 s 1 c 5 m ; with I x , I y , and I z as the moments of inertia of the multi-rotor frame body, J r the total inertia, g as the gravity acceleration, m as the total mass of the aircraft, Ω = ω 2 + ω 4 ω 1 ω 3 , ω i as the angular velocity of the ith rotor of the vehicle, c i = cos x i , s i = sin x i , and X = [ x 1 , , x 12 ] T . The variables U 1 , U 2 , U 3 , and U 4 are given by
U 1 U 2 U 3 U 4 = M ω 1 2 ω 2 2 ω 3 2 ω 4 2
where
M = b b b b p p p p q q q q d d d d
with b = C T ρ D 4 as the thrust factor, p as the thrust factor seen from the x axis, q as the thrust factor seen from the y axis, and d = ( C D ρ A ) / 2 as the drag factor of the propellers, where C T is the thrust coefficient, ρ is the air density, D is the propeller diameter, C D is the drag coefficient, and A is the cross-section of movement.

2.1. Actuators Dynamical Model

The actuators of the vehicle correspond to brushless DC (BLDC) motors that are controlled in open loop by electronic speed controllers (ESC) by means of suitable pulse-width modulation (PWM) signals generated by the electronic control unit. The dynamical model of this type of motor consist of a set of 5 ordinary differential equations and diverse parameters as electrical resistance and inductance, inertia, friction and back EMF (electro-mechanical force). In order to avoid the cumbersome characterization of these parameters, we propose to obtain their approximated transfer functions in an experimental manner, defining the duty cycle of the PWM signal and the rotor’s angular velocity as its input and output, respectively. The methodology consists of introducing a test input signal to the real motor and measuring the generated angular velocity. The test input signal was defined as a step signal of 100 % of duty cycle at t 1 = 120 ms, and 50 % of duty cycle at t 2 = 3950 ms. The experimental measurements are shown in Figure 2.
Then, this data is used to obtain an estimated transfer function by means of the System Identification Toolbox from Matlab [32]. Several pole-zero configurations were tried and the best result, with 95 . 6 % accuracy, corresponded to the estimated transfer function G m ( s ) defined as:
G m ( s ) = 716 . 6 s 2 + 1 . 377 × 10 5 s + 7066 s 2 + 11 . 16 s + 0 . 4724

2.2. Dynamical Parameter Characterization

To determine completely the dynamic model of the quadrotor defined by Equations (1)–(3), the mechanical and electric parameters of the UAV must be characterized. The mechanical part of these parameters was obtained by means of a 3D model of the system designed in a computer-aided design (CAD) software [33], which is shown in Figure 3.
From this model, nominal values for the inertia terms I x , I y , I z , the mass m, and length l were defined. On the other hand, the terms b and d are related to the drag and thrust forces generated by the propellers, these forces are depicted in Figure 4.
In addition, these parameters are defined by the following formulas:
b = C T ρ n 2 D 4
d = C D ρ A v 2 2
where D is the propeller diameter in meters, n is the propeller/motor speed in rev/s, ρ is the air density in kg/m 3 , C T the thrust coefficient, A is the cross-section of the movement in m 2 , v is the drone velocity in m / s , and C D is the drag coefficient. The terms ρ , D, and A are assumed constant and approximated by nominal values. The terms n and v are measured by the UAV sensors and, in particular, the propeller velocity n sensor will be explained in detail in a following section. The remainder terms C D and C T are indicated as nominal values by some research works as in [9] where a thrust coefficient of 2 . 98 × 10 3 and a drag coefficient of 1 . 14 × 10 7 are presented, but there is no explanation or methodology to obtain these values, which is very important when it comes to motor control. Due to the fact that the cross-section area A facing the direction of movement of the drone is very difficult to calculate during flight, a fixed drag coefficient is proposed as 43 × 10 3 . This value was adjusted experimentally during flight tests to obtain the best closed-loop performance. The thrust coefficient was obtained experimentally by means of a bench and a scale to create characteristic curves for the parameter. The overall test bench is shown in Figure 5. Its working principle is based on manually varying the propeller velocities and measuring the generated thrust by means of the scale. Figure 6 shows the obtained characteristic curve for n C T . From this, a C T value is proposed based on a minimal root mean squared error (RMSE) of the obtained curve and its correspondent function. In order to validate the obtained parameter, a comparison between the behavior generated by the manufacturer value, the proposed value and the measurements is presented in Figure 7. With a proposed C T = 0 . 0817445 , a minimal RMSE of 0.077301668 N (0.7882576369 g f ) is obtained. Compared to the measured values, this is relatively small with respect to the thrust force difference. Finally, this experimentally adjusted value for C T was used in this work, and the nominal value used in [9] for the drag coefficient C D was defined, as no experimental measurements related to this parameter were obtained.

3. Controller Design

The control proposal is composed of two controllers: the UAV controller and the actuator controller. The input for the UAV controller is a reference vector X r that includes the altitude (z) and the Euler’s angles ( ϕ , θ , ψ ) of the multirotor, and its outputs are references values for the angular velocities of the actuators (or the propellers). The actuator controller is composed by four PID controllers, which receives the desired angular velocity and defines a correspondent PWM value as the input of the motor. This inner control loop is the same for all the four motors of the UAV. The overall control scheme is shown in Figure 8 and the UAV and actuator controller are defined in the following subsections.

3.1. UAV Controller

The control objective is the reference tracking for the orientation ( x 1 = ϕ , x 3 = θ , x 5 = ψ ) and the altitude ( x 7 = z ) of the UAV. Hence, it is assumed that the references variables x 1 r , x 3 r , x 5 r and x 7 r are known, as well as their derivatives. Then, in order to obtain a concise controller design procedure, four different sub-systems from Equation (1) are defined as:
x ˙ i = x i + 1 x ˙ i + 1 = f i + 1 + b i + 1 U ( i + 1 ) / 2 ,           for   i = 1 , 3 , 5 , 7
The error variables for these subsystems are given by z i = x i r x i , and their dynamics yields:
z ˙ i = x ˙ i r x ˙ i = x ˙ i r x i + 1
After that, a Lyapunov’s function is designed as V i = 1 2 z i 2 and its derivative results of the form:
V ˙ i = z i z ˙ i = z i ( x ˙ i r x i + 1 )
Then, the term x i + 1 is proposed as a virtual control term, which is designed as:
x i + 1 * = x ˙ i r + k i z i , k i < 0
which will allow us to define the error variable for the next block. The term x i + 1 * is the desired value for x i + 1 , so, the error variable z i + 1 is defined as z i + 1 = x i + 1 * x i + 1 which can be used to re-shape the Equation (8) as V ˙ i = z i ( x ˙ i r x i + 1 * + z i + 1 ) = k i z i 2 + z i z i + 1 . Now, the dynamics for z i + 1 results of the form:
z ˙ i + 1 = x ˙ i + 1 * x ˙ i + 1 = x ¨ i r + k i ( x ˙ i r x i + 1 ) f i + 1 b i + 1 U ( i + 1 ) / 2
where the control term U ( i + 1 ) / 2 will be designed for the convergence of Equation (10). To this end, the candidate Lyapunov’s function V i + 1 = V i + 1 2 z i + 1 2 is proposed, the derivative of which is given by:
V ˙ i + 1 =   k i z i 2 + z i z i + 1 + z i + 1 z ˙ i + 1   =   k i z i 2 + z i z i + 1 + z i + 1 [ x ¨ i r f i + 1 + k i ( x ˙ i r x i + 1 ) b i + 1 U ( i + 1 ) / 2 ]
and the control term U ( i + 1 ) / 2 is designed as:
U ( i + 1 ) / 2 = b i + 1 1 [ x ¨ i r f i + 1 + k i ( x ˙ i r x i + 1 ) + z i + k i + 1 z i + 1 ]
with k i + 1 < 0 . Using Equation (12), the term V ˙ i + 1 yields:
V ˙ i + 1 = k i z i 2 k i + 1 z i + 1 2
which fulfils V ˙ i + 1 0 and the convergence of z i and z i + 1 to zero is assured. Hence, the control objective is achieved.

3.2. Levant’s Differentiator

The terms x ˙ i r and x ¨ i r of the control term Equation (12) are not defined. To avoid cumbersome computations for these expressions, a robust exact differentiator, proposed by Levant in [34,35], is used. The main problem with usual differentiator designs is the combination of exactness and robustness with respect to possible measurement errors and input noise. Moreover, if the input signal present disturbances, the differentiator’s output will be also disturbed. To overcome this, Levant’s differentiator provides the square of the maxima of the measured input signal from the base signal, reducing the rate error that can be present in the output [36], by means of a sliding mode control term. The Equations of the second order differentiator, used in this work, are given by
z ˙ 0 = λ 2 | z 0 f ( t ) | 2 / 3 sign z 0 f ( t ) + z 1 z ˙ 1 = λ 1 | z 1 v 0 | 1 / 2 sign z 1 v 0 + z 2 z ˙ 2 = λ 0 sign z 2 v 1
where f ( t ) is the input signal, z i is the estimation of the ith derivative of f ( t ) , and λ 0 , λ 1 , λ 2 are differentiators parameters to be tuned. Hence, it can be used to obtain x ˙ i r and x ¨ i r with f ( t ) = x i r .

3.3. Actuator Controller

The UAV controller generates the desired values for U 1 , U 2 , U 3 , and U 4 . Afterwards, the desired values for the actuators’ velocities ω 1 r , ω 2 r , ω 3 r , and ω 4 r can be obtained from Equation (2) as:
ω 1 r 2 ω 2 r 2 ω 3 r 2 ω 4 r 2 = M 1 U 1 U 2 U 3 U 4 .
From here, the error variables for the actuators’ controllers are defined as:
e i = ω i r ω i , i = 1 , 2 , 3 , 4 .
Finally, the equation of the PID controllers are defined as:
P W M i = k P i e i + k I i e i d t + k D i e i ˙
where the control gains k P i , k I i , and k D i are tuned heuristically. The P W M i signals correspond to the duty cycles of the ESC for each motor. It is worth to note that, as the motors can only rotate in one direction, the P W M i values are bounded by the interval [ 0 , 100 ] % .

4. Experimental Setup

The UAV used for the experiments is composed of a quadrotor QAV250 frame with MT2204-2300KV brushless motors and 6030 propellers. Each motor is driven by a 2-4S 12A electronic speed controller (ESC) with an 11.1 V 2200 mAh Lithium-Polymer battery as a power supply. The main control board of the vehice is a PIXHAWK PX4 2.4.6 which is an STM32F427 microcontroller based board that uses an STM32F100 as a failsafe system. It includes an L3GD20H 3-axis gyroscope sensor, an LSM303D 3-axis accelerometer, an MPU6000 inertial measurement unit (IMU), and an MS5611 barometer. The board provides 1 ADC channel, 1 CAN port, 1 I2C port, 5 UART ports, and supports up to 14 pulse protocol outputs. In order to implement the proposed controller for the real-time experiments, it is necessary to obtain measurements of the rotors angular velocities; nonetheless, there are no available ports in the main board. Hence, a daughter board that allows capturing of the rotors sensors signals was included. It is based on an ATMEGA328/P microcontroller, which is capable of running at a frequency of 16 MHz, has 8 ADC channels available with up to 10-bit precision, and a universal synchronous and asynchronous receiver-transmitter (USART). As a result, it can be used to sense up to 8 analog sensors and transmit the data through serial communication to the main board.

4.1. Angular Velocity Sensor for the UAV Rotors

As part of the inner loop controller for the motors, a sensor for the propeller’s velocities must be designed. Since the motors used in this work do not have any type of encoder, an intermittent black and white band is attached to the motor case acting as encoder. Additionally, CNY70 reflective sensors are used for capturing the light intensity change in the band when the motor is rotating, generating a pulse frequency that feeds a pin voltage level change interrupt in a daughter board. The interconnection between the reflective sensor, the motor and the daughter board are presented in Figure 9.
This daughter board is proposed to provide modularity to the firmware development and to implement the digital conditioning of the signals generated by the reflective sensors. The signal generated by the reflective sensors triggers an interruption in the daughter board. This interruption is time tracked with a timer and five different captures are obtained. The first capture takes a false pulse that was observed and is taken in the middle of a pulse generated (not at the rising or falling edge), and then the next four pulses are timer captured, having two complete periods observed, which are averaged to obtain better accuracy. The encoder black and white band attached has 40 alternating stripes within a motor revolution. To avoid overlap in the different interruption’s tasks, an interrupt scheduler routine is designed to assign execution status to the different sensing tasks. In that way, only one interruption is running at a time, avoiding the interrupt miss for the speed period capturing, which is extremely time sensitive.

4.2. Velocity Sensor’s Signal Conditioning

Due to the switching nature of the velocity sensor and the noisy characteristics of its optical transducer, the retrieved measurements presented undesired high frequency fluctuations. Hence, a digital filtering stage was designed in the daughter board. Two different proposals were implemented: a moving average (MA) filter and an exponentially weighted moving average (EWMA) filter. The first is a finite impulse response filter which consists in obtaining the average value of the last m samples of the measured signal according to the following Equation:
y k = i = k m k x i k m
where x k is the current sample of the measured signal and y k is the current output of the filter. The latter filter is a recursive or infinite impulse response filter which is implemented by the following Equation:
y k = y k 1 + α ( x k y k 1 )
where α is the constant weight assigned to the filter. The performance comparison between both filters provided a solid ground to choose the more promising filter. The EWMA exposes a smaller RMSE (root-mean-square error) and provides smoother output behaviour as the input data becomes gradually less influential as it ages. On the other hand, MA treats each of the samples equally during the output computing but these are regarded as soon as the samples fall off the end of the number of elements considered in the filter. Therefore, the EWMA filter was selected to be used in this work.

4.3. Overall Controller Implementation

The global designed embedded control scheme was implemented in the main board of the vehicle using the model based approach as in [37,38]. It is characterized as a closed-loop controller where the control laws are computed based on the measured states of the vehicle as depicted in Figure 8. The stages of the implemented control strategy are described in the Algorithm 1. All the simulation and real-time experiments were carried out using the controller implementation described in this method.
Algorithm 1: Overall Controller Execution.
Sensors 20 04229 i001

5. Results

The control proposal was implemented in simulation and real-time experiments considering the same control and system parameters aiming to analyse the results, which are presented in this section.

5.1. Simulation Results

The parameters used for the simulation experiments are listed in Table 1. These correspond to the parameters obtained by the methodology described in the previous sections. The control objective is to track the Euler angles ( ϕ , θ , ψ ) and the altitude (z) of the multirotor vehicle.
The resulting trajectory of the UAV position describes a square path as depicted in Figure 10. It is worth to note that, as a stabilize flight mode is considered, the references received by the overall control scheme are for the attitude ( ϕ r , θ r and ψ r ) and altitude ( z r ) of the vehicle. Hence, the square shaped position depicted in Figure 10 is a direct result of the definition for ϕ r , θ r and ψ r . The labels t 1 , t 2 , t 3 and t 4 indicate the instants where the trajectory reaches the corners of the square. For easy correlation, these timestamps are also indicated in Figure 11, Figure 12 and Figure 13 by means of vertical blue dashed lines. This is a direct result of the reference defined for the attitude of the UAV which is shown in Figure 11. Moreover, the references for the three angles are depicted as well. The tracking performance is satisfactory as the proposed control scheme obtains the convergence of the error variables to a small vicinity to zero.
Figure 12 depicts the generated Cartesian coordinates of the vehicle during the simulation, and for the case of the attitude signal the reference is also presented. The convergence of the altitude to its reference in a finite time can be noted. Furthermore, the angular velocities of the propellers, and their references, are shown in Figure 13. This behavior validates the effectiveness of the PID controllers for the actuators of the vehicle in the inner loop, as the tracking performance is satisfactory. Moreover, the references for the propeller’s velocities are within the range of commercial motors for drones, which indicates the applicability of the proposed control scheme in a real vehicle.

5.2. Experimental Results

The results of the real-time experiments are depicted in the following figures. The roll, pitch, and yaw angles of the vehicle and their references are shown in Figure 14, Figure 15 and Figure 16, respectively. It can be noted that the tracking performance is satisfactory as the convergence of the attitude of the vehicle follows the desired values. Also, a noise component is present in all the measured variables which is normal due to the normal behaviour of the vehicle in flight. On the other hand, the altitude of the vehicle and its desired value are depicted in Figure 17. Its convergence to the reference value can be appreciated as the tracking error variable converges to a small vicinity to zero in a finite time. Finally, a video recording of the real-time experiment can be found in [39] where the performance of the overall control scheme is presented. It is important to mention that the period corresponding to the Figure 14, Figure 15, Figure 16 and Figure 17 corresponds to the period from 0:41 to 1:41 of the reported video.

6. Discussion

The proposed control scheme for a UAV based on rotor velocity sensors establishes a solid foundation for developing research related to robust control design, implementation and testing. Also, the developed instrumentation permits to approach real-time thrust computation and wind estimation. On the other hand, although the backstepping technique is widely used and applied in the automatic control field, this work allows to define a comparative reference for more robust and innovative control strategies such as sliding modes, neural networks and adaptive controllers. Moreover, the UAV can be easily adapted to function as a test bench for educational and research purposes related to the design and testing of new control algorithms for multirotors. Finally, the next steps for this research work are related to the design and implementation of robust control schemes based on sliding modes and adaptive control. Also, we are currently exploring fault tolerant controllers which will use the information from the actuators angular velocities and current consumption to detect a failure and reconfigure the controller according to the identified fault.

7. Materials and Methods

The manuscript describes the overall structure of the control scheme and the interconnection of the components of the UAV. The proposed angular velocity sensor for the rotors is graphically described in detail so any interested researcher can replicate its implementation. Regarding the software, all the code is available at the repository in [40].

8. Conclusions

A control scheme for the trajectory tracking of the attitude and altitude of a multirotor was presented and its effectiveness was demonstrated by means of simulation and real-time experiments. The control strategy is based on the measurements of the angular velocities of the actuators which are open-loop driven BLDC motors. The overall controller consists of two control loops: an outer control loop for the UAV and an inner control loop for the actuators. The UAV controller is designed using the backstepping methodology which assures the closed loop stability of the system. It receives the references for the attitude (Euler angles) and altitude (height) to generate the necessary angular velocities of the actuators to assure the tracking of these references by the vehicle. The actuator control loop receives these necessary angular velocities for the actuators and generates the necessary PWM signals for the BLDC motors to perform the tracking of these angular velocities. This controller is designed based on the PID scheme, which was heuristically tuned to obtain the desired performance.
The simulation results were obtained considering approximated transfer functions for the motors, which were calculated experimentally by means of a proposed test bench. For the real-time experiments, a simple and effective encoder design was implemented based on reflective sensors and a striped band. This is necessary as commercial UAVs do not usually include encoders in the actuator’s axles. Moreover, a conditioning stage for the output of the reflective and the altitude sensors was implemented based on the exponentially weighted moving average (EWMA) filter. The simulation and real-time experiments were satisfactory as the control objectives were fulfilled.

Author Contributions

Conceptualization, W.A.M.-M., L.E.G.-J. and M.A.M.-A.; Formal analysis, L.E.G.-J. and L.F.L.-V.; Investigation, W.A.M.-M., L.E.G.-J. and M.A.M.-A.; Methodology, W.A.M.-M., M.A.M.-A. and L.F.L.-V.; Project administration, Luis Enrique González-Jiménez; Software, Walter Alejandro Mayorga-Macías; Supervision, L.E.G.-J., M.A.M.-A. and L.F.L.-V.; Validation, W.A.M.-M. and M.A.M.-A.; Writing–original draft, W.A.M.-M. and L.E.G.-J.; Writing–review and editing, L.F.L.-V. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Mexican National Council of Science and Technology (CONACYT) under grants 261774 and 724127.

Acknowledgments

We thank the engineering colleagues Guilhem Jouhet and Marco Antonio López Vidaurri who collaborated in the development of this research.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
3DThree Dimensional
BLDCBrushless Direct Current
CADComputer-Aided Design
EMFElectro-Mechanical Force
ESCElectronic Speed Controller
GPSGlobal Positioning System
IMUInertial Measurement Unit
LQRLinear Quadratic Regulator
MPCModel Predictive Control
PIDProportional-Integral-Derivative
PWMPulse-Width Modulation
RMSERoot Mean Squared Error
UAVUnmanned Aerial Vehicle

References

  1. Kim, J.; Gadsden, S.; Wilkerson, S. A Comprehensive Survey of Control Strategies for Autonomous Quadrotors. Can. J. Electr. Comput. Eng. 2020, 43, 3–16. [Google Scholar]
  2. Rubí, B.; Pérez, R.; Morcego, B. A Survey of Path Following Control Strategies for UAVs Focused on Quadrotors. J. Intell. Robot. Syst. 2020, 98, 241–265. [Google Scholar] [CrossRef] [Green Version]
  3. Li, J.; Li, Y. Dynamic analysis and PID control for a quadrotor. In Proceedings of the 2011 IEEE International Conference on Mechatronics and Automation, Beijing, China, 7–10 August 2011; pp. 573–578. [Google Scholar]
  4. Surya, Y.; Pitowarno, E. Robust adaptive proportional derivative-active force control for unmanned hexacopter. In Proceedings of the 2016 International Electronics Symposium (IES), Denpasar, Indonesia, 29–30 September 2016; pp. 1–6. [Google Scholar]
  5. Kukreti, S.; Kumar, M.; Cohen, K. Genetically tuned Lqr based path following for UAVs under wind disturbance. In Proceedings of the 2016 International Conference on Unmanned Aircraft Systems (ICUAS), Arlington, VA, USA, 7–10 June 2016; pp. 267–274. [Google Scholar]
  6. Alexis, K.; Papachristos, C.; Siegwart, R.; Tzes, A. Robust model predictive flight control of unmanned rotorcrafts. J. Intell. Robot. Syst. 2016, 81, 443–469. [Google Scholar] [CrossRef]
  7. Bangura, M.; Mahony, R. Real-time model predictive control for quadrotors. IFAC Proc. Vol. 2014, 47, 11773–11780. [Google Scholar] [CrossRef]
  8. Bouabdallah, S.; Siegwart, R. Backstepping and sliding-mode techniques applied to an indoor micro quadrotor. In Proceedings of the 2005 IEEE International Conference on Robotics and Automation, Barcelona, Spain, 18–22 April 2005; pp. 2247–2252. [Google Scholar]
  9. Arellano-Muro, C.; Luque-Vega, L.; Castillo-Toledo, B.; Loukianov, A. Backstepping control with sliding mode estimation for hexacopter. In Proceedings of the 2013 10th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City, Mexico, 30 September–4 October 2013; pp. 31–36. [Google Scholar]
  10. Lippiello, V.; Ruggiero, F.; Serra, D. Emergency landing for a quadrotor in case of a propeller failure: A backstepping approach. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Chicago, IL, USA, 14–18 September 2014; pp. 4782–4788. [Google Scholar]
  11. Toledo, M.; Sanchez, E.; Alanis, A.; Flórez, J.; Perez-Cisneros, M. Real-Time Integral Backstepping with Sliding Mode Control for a Quadrotor UAV. IFAC-PapersOnLine 2018, 51, 549–554. [Google Scholar] [CrossRef]
  12. Dierks, T.; Jagannathan, S. Output feedback control of a quadrotor UAV using neural networks. IEEE Trans. Neural Netw. 2010, 21, 50–66. [Google Scholar] [CrossRef] [PubMed]
  13. Rosales, C.; Rossomando, C.; Soria, C.; Carelli, R. Neural control of a Quadrotor: A state-observer based approach. In Proceedings of the 2018 International Conference on Unmanned Aircraft Systems (ICUAS), Dallas, TX, USA, 12–15 June 2018; pp. 647–653. [Google Scholar]
  14. Lee, H.; Kim, H.J. Robust control of a quadrotor using takagi-sugeno fuzzy model and an lmi approach. In Proceedings of the International Conference on Control, Automation and Systems, Seoul, Korea, 22–25 October 2014; pp. 370–374. [Google Scholar]
  15. Santos, M.; López, V.; Morata, F. Intelligent fuzzy controller of a quadrotor. In Proceedings of the 2010 IEEE International Conference on Intelligent Systems and Knowledge Engineering, Hangzhou, China, 15–16 November 2010; pp. 141–146. [Google Scholar]
  16. Zhou, B.; Satyavada, H.; Baldi, S. Adaptive path following for unmanned aerial vehicles in time-varying unknown wind environments. In Proceedings of the 2017 American Control Conference (ACC), Seattle, WA, USA, 24–26 May 2017; pp. 1127–1132. [Google Scholar]
  17. Lou, W.; Guo, X. Adaptive trajectory tracking control using reinforcement learning for quadrotor. Int. J. Adv. Robot. Syst. 2016, 13, 1–10. [Google Scholar] [CrossRef] [Green Version]
  18. Utkin, V.; Guldner, J.; Shi, J. Sliding Mode Control in Electro-Mechanical Systems, 2nd ed.; CRC Press: Boca Raton, FL, USA, 2009. [Google Scholar]
  19. Basci, A.; Can, K.; Orman, K.; Derdiyok, A. Trajectory tracking control of a four rotor unmanned aerial vehicle based on continuous sliding mode controller. Elektron. Elektrotechnika 2017, 23, 12–19. [Google Scholar] [CrossRef]
  20. Wang, Y.; Wang, X.; Zhao, S.; Shen, L. Vector field based sliding mode control of curved path following for miniature unmanned aerial vehicles in winds. J. Syst. Sci. Complex. 2018, 31, 302–324. [Google Scholar] [CrossRef]
  21. Coates, E.; Wenz, A.; Gryte, K.; Johansen, T. Propulsion System Modeling for Small Fixed-Wing UAVs. In Proceedings of the 2019 International Conference on Unmanned Aircraft Systems (ICUAS), Atlanta, GA, USA, 11–14 June 2019; pp. 748–757. [Google Scholar]
  22. Davis, E.; Pounds, P. Direct Sensing of Thrust and Velocity for a Quadrotor Rotor Array. IEEE Robot. Autom. Lett. 2017, 2, 1360–1366. [Google Scholar] [CrossRef]
  23. Bronz, M.; de Marina, H.G.; Hattenberger, G. In-Flight Thrust Measurement using On-Board Force Sensor. In Proceedings of the AIAA Atmospheric Flight Mechanics Conference, Grapevine, TX, USA, 9–13 January 2017; pp. 1–11. [Google Scholar]
  24. Gong, A.; Maunder, H.; Verstraete, D. Development of an in-flight thrust measurement system for UAVs. In Proceedings of the 53rd AIAA/SAE/ASEE Joint Propulsion Conference, Atlanta, GA, USA, 10–12 July 2017; pp. 1–10. [Google Scholar]
  25. Safi’i, I.; Nurohman, C.; Hardy, D.; Rifianto, O.; Muhammad, H. Thrust modelling for a small UAV. AIP Conf. Proc. 2020, 2226, 030015. [Google Scholar]
  26. González-Hernández, I. Attitude stabilization of a Quad-rotor UAV based on rotor speed sensing with accelerometer data estimation via Kalman filtering. In Proceedings of the 31st Chinese Control Conference, Hefei, China, 25–27 July 2012; pp. 5123–5128. [Google Scholar]
  27. Parvathy, T.; Abraham, P. Fast response antiwindup self tuning fuzzy PID speed control of brushless DC motor drive. AIP Conf. Proc. 2020, 2222, 040014. [Google Scholar]
  28. Jaya, A.; Purwanto, E.; Fauziah, M.; Murdianto, F.; Prabowo, G.; Rusli, G. Design of PID-fuzzy for speed control of brushless DC motor in dynamic electric vehicle to improve steady-state performance. In Proceedings of the 2017 International Electronics Symposium on Engineering Technology and Applications (IES-ETA), Surabaya, Indonesia, 26–27 September 2017; pp. 179–184. [Google Scholar]
  29. Rif’an, M.; Yusivar, F.; Putro, B. Adaptive PID controller based on additional error of an inversed-control signal for improved performance of brushless DC motor. In Proceedings of the 2017 15th International Conference on Quality in Research, Nusa Dua, Indonesia, 24–27 July 2017; pp. 315–320. [Google Scholar]
  30. Kandiban, R.; Arulmozhiyal, R. Speed control of BLDC motor using adaptive fuzzy PID controller. Procedia Eng. 2012, 38, 306–313. [Google Scholar] [CrossRef] [Green Version]
  31. Gobinath, S.; Madheswaran, M. Deep perceptron neural network with fuzzy PID controller for speed control and stability analysis of BLDC motor. Soft Comput. 2020, 24, 10161–10180. [Google Scholar] [CrossRef]
  32. MATLAB, version 9.6.0.1072779 (R2019a); The MathWorks Inc.: Natick, MA, USA, 2019.
  33. GRABCAD COMMUNITY. ZMR250 Quadcopter Frame (rev. 2015). Available online: https://grabcad.com/library/zmr250-quadcopter-frame-1 (accessed on 21 August 2019).
  34. Levant, A. Higher-order sliding modes, differentiation and output-feedback control. Int. J. Control. 2003, 76, 924–941. [Google Scholar] [CrossRef]
  35. Levant, A. Robust exact differentiation via sliding mode technique. Automatica 1998, 34, 379–384. [Google Scholar] [CrossRef]
  36. Milosavljević, Č.; Peruničić, B.; Veselić, B. A new real differentiator with low-pass filter in control loop. Electronics 2010, 14, 27–32. [Google Scholar]
  37. Forrai, A. Embedded Control System Design: A Model Based Approach, 1st ed.; Springer: Berlin, Germany, 2013. [Google Scholar]
  38. Lozano, R. Unmanned Aerial Vehicles: Embedded Control, 1st ed.; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2010. [Google Scholar]
  39. Video Recording of the Real Time Experimental Results. Available online: https://youtu.be/RdDv3WunO1Y (accessed on 20 June 2020).
  40. Project’s Embedded Code Repository. Available online: https://drive.google.com/folderview?id=1YXmv2AeCgNLX_RdopMzKAezgqCmBPBDX (accessed on 27 March 2020).
Figure 1. The unmanned aerial vehicle’s (UAV’s) configuration and related variables.
Figure 1. The unmanned aerial vehicle’s (UAV’s) configuration and related variables.
Sensors 20 04229 g001
Figure 2. Step response of the actuators for transfer function characterization.
Figure 2. Step response of the actuators for transfer function characterization.
Sensors 20 04229 g002
Figure 3. Top (top-left), isometric (top-right) and front (bottom) views of the 3D model of the quadrotor obtained in a Computer-Aided Design (CAD) software.
Figure 3. Top (top-left), isometric (top-right) and front (bottom) views of the 3D model of the quadrotor obtained in a Computer-Aided Design (CAD) software.
Sensors 20 04229 g003
Figure 4. Force vectors produced by the propellers.
Figure 4. Force vectors produced by the propellers.
Sensors 20 04229 g004
Figure 5. Thrust force test-bench for obtaining the thrust coefficient.
Figure 5. Thrust force test-bench for obtaining the thrust coefficient.
Sensors 20 04229 g005
Figure 6. Thrust coefficient graph based on EMAX MT2204 2300KV motor thrust force measurements.
Figure 6. Thrust coefficient graph based on EMAX MT2204 2300KV motor thrust force measurements.
Sensors 20 04229 g006
Figure 7. Thrust force graph from the thrust coefficient at different motor speeds using the measured coefficient, the motor manufacturer coefficient, and the proposed coefficient.
Figure 7. Thrust force graph from the thrust coefficient at different motor speeds using the measured coefficient, the motor manufacturer coefficient, and the proposed coefficient.
Sensors 20 04229 g007
Figure 8. Overall proposed control scheme. Two control loops are depicted: the inner loop for the actuators and the outer loop for the UAV.
Figure 8. Overall proposed control scheme. Two control loops are depicted: the inner loop for the actuators and the outer loop for the UAV.
Sensors 20 04229 g008
Figure 9. Propeller’s velocity sensor implementation based on a CNY70 reflective sensor.
Figure 9. Propeller’s velocity sensor implementation based on a CNY70 reflective sensor.
Sensors 20 04229 g009
Figure 10. Position of the vehicle resulting from the attitude and altitude reference tracking.
Figure 10. Position of the vehicle resulting from the attitude and altitude reference tracking.
Sensors 20 04229 g010
Figure 11. Euler angles of the multirotor and their references.
Figure 11. Euler angles of the multirotor and their references.
Sensors 20 04229 g011
Figure 12. Cartesian coordinates of the position of the multirotor. Only the altitude z is tracking its reference z r .
Figure 12. Cartesian coordinates of the position of the multirotor. Only the altitude z is tracking its reference z r .
Sensors 20 04229 g012
Figure 13. Commanded propellers velocities and their references.
Figure 13. Commanded propellers velocities and their references.
Sensors 20 04229 g013
Figure 14. Roll angle (dashed) and its reference (solid) during the real-time experiment.
Figure 14. Roll angle (dashed) and its reference (solid) during the real-time experiment.
Sensors 20 04229 g014
Figure 15. Pitch angle (dashed) and its reference (solid) during the real-time experiment.
Figure 15. Pitch angle (dashed) and its reference (solid) during the real-time experiment.
Sensors 20 04229 g015
Figure 16. Yaw angle (dashed) and its reference (solid) during the real-time experiment.
Figure 16. Yaw angle (dashed) and its reference (solid) during the real-time experiment.
Sensors 20 04229 g016
Figure 17. Altitude z (dashed) and its reference z r (solid) during the real-time experiment.
Figure 17. Altitude z (dashed) and its reference z r (solid) during the real-time experiment.
Sensors 20 04229 g017
Table 1. Multirotor parameters.
Table 1. Multirotor parameters.
ParameterDescriptionValue
mMass of the vehicle0.85 kg
gGravity force9.80665 m/s 2
lArm length0.1272 m
C T Thrust coefficient81.7445 × 10 3
C D Drag coefficient45 × 10 3
I x Moment of inertia in the x-axis2.14571 × 10 3 m 2
I y Moment of inertia in the y-axis3.28887 × 10 3 m 2
I z Moment of inertia in the z-axis4.94533 × 10 3 m 2
k e Back EMF constant6.4 × 10 4
k τ Torque constant0.432140018
R a Motor inertia resistance0.05 Ω
B m Coefficient of viscous friction341.336 × 10 6
J m Rotor inertia1.47106 × 10 5 kg·m 2
L m Inductance0.012 H

Share and Cite

MDPI and ACS Style

Mayorga-Macías, W.A.; González-Jiménez, L.E.; Meza-Aguilar, M.A.; Luque-Vega, L.F. Velocity Sensor for Real-Time Backstepping Control of a Multirotor Considering Actuator Dynamics. Sensors 2020, 20, 4229. https://doi.org/10.3390/s20154229

AMA Style

Mayorga-Macías WA, González-Jiménez LE, Meza-Aguilar MA, Luque-Vega LF. Velocity Sensor for Real-Time Backstepping Control of a Multirotor Considering Actuator Dynamics. Sensors. 2020; 20(15):4229. https://doi.org/10.3390/s20154229

Chicago/Turabian Style

Mayorga-Macías, Walter Alejandro, Luis Enrique González-Jiménez, Marco Antonio Meza-Aguilar, and Luis Fernando Luque-Vega. 2020. "Velocity Sensor for Real-Time Backstepping Control of a Multirotor Considering Actuator Dynamics" Sensors 20, no. 15: 4229. https://doi.org/10.3390/s20154229

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop