Design and identification of tilt-motor quadrotor control system

Abstract. Unmanned aerial vehicle (UAV) with four tilt-motors is considered. The quadrotor includes four servomotors, which allow tilting the motors responsible for the thrust force. Additional control input signals enhance the UAVs maneuverability and forward flight speed in comparison with analogous classically designed UAVs. We develop a mathematical model of the tilt-motor quadrotor dynamics, which takes into account all principal forces and torques. On the basis of the mathematical model we design the control loop for a tiltmotor quadrotor. The implemented control algorithm not only allows to independently control position and attitude of the UAV, but also takes into account non-linear actuators constraints. Sensor signals, upon which the closed controlloop relies, are processed with the aid of Extended Kalman Filter. We demonstrate the performance of the model and the control-loop by simulating UAV’s passing an obstacle course. Our numerical experiments are also instrumental in identifying the key parameters of principal parts of the construction.


Introduction
It is beyond dispute that in the last decades engineers and theorists have given much attention to quadcopters' dynamics and control both because of their numerous applications [1] and because these UAVs are a remarkable test-bed allowing to apply and enhance various modeling techniques and controller design approaches. We follow the trend of interest to quadcopters one step further and present a study of a tilt-motor quadcopter [5,6] control system design. The reason behind this modification of a classic quadcopter design is its lack of controllability because of underactuation. This means that a standard quadcopter cannot track arbitrary trajectories in the space of its six degrees of freedom. Standard control loops are differentially flat [4] in four-dimensions only, which may issue in a loss of stability when uncontrolled parameters (pitch and roll angles usually) exceed certain limits due to perturbations.
The solution of this problem can be obtained by increasing the number of control inputs, for example by tilting the rotors with respect to the quadcopter's body or using varyiable-pitch propellers [2,3]. It is demonstrated in [6] that the tilt-rotor model has full controllability over the position/attitude of the main body due to a greater dimension of the control input.
Below we present our study of the controlled dynamics of a quadrotor with tilting rotors. Firstly, we provide the equations to model the system's dynamics. Then, following the approach outlined in [6] we develop the control framework by inverting the dynamical model. Next step is to model the sensors' data to have feedback in the control loop and implement the extended Kalman filter to process the sensors' signals. Finally, we test the control system's Geometrically the UAV has a square shape with motors -rotors with propellers -placed in the vertices of the square with side length L. There is a hub in the center of the square representing the main body of the quadrotor. The rotors are supported by the four beams protruding from the central hub and aligned with the diagonals of the square. Each rotor can be tilted around the beam it is attached to, remaining perpendicular to the beam. We shall denote by i = 1, .., 4 the index of each rotor, and by θ i the rotor's tilt angles. The adjacent propellers have different positive direction of rotation: propellers 1 and 3 rotate counterclockwise, propellers 2 and 4 rotate clockwise, these directions are denoted by d i (d 1 = d 3 = 1, d 2 = d 4 = −1), the propeller rates are denoted byω i . The modeled prototype implements the so called x-configuration.
The UAV's equations of motion are written with respect to the Earth-bound inertial reference frame (we neglect the Earth's rotation for the characteristic times of the UAV operation). All vectors represented in this reference frame are designated by the upper index I. Upper index B denotes the body-frame of the quadrotor, whose axes coincide with the quadrotor body's principal axes of inertia. Upper indices R i denote the four rotors' reference frames.

Model equations
We shall describe the quadrotor's position and attitude by the three coordinates of its center of mass r I , and the attitude quaternion q IB , which relates the quadrotor body-frame to the inertial frame. Kinematic equations governing the behavior of r I and q IB arė where Ω B is the quadrotor's angular velocity written in the body frame. The translational dynamics of the quadrotor of mass M is given by where F I g is the gravity force, F I d is the aerodynamic drag force, and F I t is the thrust force. For brevity, the expressions for these forces are omitted here (see [1] for reference).
The rotational dynamics of the quadrotor body is described by the Euler equation: where τ B is the resultant of all torques acting upon the quadrotor body, J B is the tensor of inertia in principal inertia axes. The torque τ B includes the external torques and the torques applied to the quadrotor body by the four rotors, the expressions for the latter are obtained from the Euler equations for each of the four rotors. Thrust forces and torques, acting upon rotors with respect to the rotors' frames are: where k and b are the propellers' aerodynamic coefficients.
Equations (1), (2), and (3) comprise the closed system of differential equations, which can be used to simulate the dynamics of a quadrotor with tilting rotors.
Differentiating the equations (2) and (3) over time we obtain where A (θ, ω) is rank 6 matrix (whenever the components of ω are not zero), and the system's dynamics can be inverted so that where (6) is projected onto the null-space of A, which lets us use the second term in (6) to satisfy constraints (such as non-zero components of ω or saturation limits for θ i ).
Finally, the controllers for decoupled position and attitude tracking systems are: ...
where ∆q is the vector part of the attitude error quaternion, K ri and K Ωi are diagonal controller gain positive-definite matrices. The exponential convergence of both position and attitude errors to zero is guaranteed by the proper choice of gain coefficients in (7) according to the Routh-Hurwitz criterion.

Saturation constraints
When processing the output of (7) the control system should satisfy certain constraints characteristic for a particular quadrotor configuration. It is common to limit the operational rates of the motors so that |ω i | ≤ω max . The choice of servomotors and other engineering considerations might also limit the tilting angles as |θ max i | ≤ θ max . We shall accept θ max = 90 • . The limits of thrust force and torque for each motor are determined byω max , θ max and aerodynamic coefficients. Geometrically it means that forces and torques, which each motor can exert, belong to certain vector space regions, and their sum yields the subspace of instantly available resultant force and torque. Adding up the available thrust forces for each motor, we obtain the region, which can be approximated by a square pyramid with a spherical cap (see Fig. 1), the pyramid being inscribed in a sphere of radius F max t = 4k (ω max ) 2 . Whenever the output ... r (t) of equations (7) is such thatr(t) + ... r (t)dt takes the would be acceleration out of bounds (i.e. such acceleration can not be achieved by actuators), it is rescaled by η ∈ [0; 1] as shown in Fig. 1. The same scheme is implemented to limit the angular acceleration and, consequently, the control signal in torque.

Sensors and Kalman filter
The control loop described earlier requires feedback signals in r I , q IB ,ṙ I , Ω B ,r I ,Ω B . The first four signals are common requirement for UAV, and these signals can be easily obtained by standard sensors, whereas measurements of linear and angular acceleration are usually noisy and need filtering. To this end we employ the extended Kalman filter (EKF). The dynamical model used in EKF prediction block consists of equations (1), (2), and (3), which describe the dynamics of the state variables x = r I , v I , q IB , Ω B T . The discrete measurements for the correction EKF block are supposed to be obtained at equal time intervals and contain the same variables as in the state vector with known covariance matrix of the observation noise.
Having completed the two-step EKF procedure we estimate the linear and angular accelerations by substituting the obtained state vector estimates into equations (2), and (3).

Simulation setup
Numerical experiments are carried out in Matlab Simulink. Sensors signals are modeled by adding white noise with S NR = 25 to the results of the model equations integration. Values of the model parameters are provided in Table 1.

Propeller parameters identification
The quality of the control system depends -among other things -on the accuracy of the controller model. Test simulations indicated sensitivity of the controller to uncertainties in the values of the coefficients k and b (4). In order to tune these values, which are never known accurately enough, we propose to include k and b as variables into the EKF state vector MATEC Web of Conferences 211, 02013 (2018) https://doi.org/10.1051/matecconf/201821102013 VETOMAC XIV x = (ṙ, Ω, k, b) T and add (r,Ω) T to the measured signals. It turns out that while performing a simple maneuver -takeoff, hover and π 2 yaw rotation -the modified EKF converges to accurate values of k = 9 · 10 −5 N · s 2 · rad −2 and b = 3 · 10 −6 N · m · s 2 · rad −2 from almost any initial guess values. Below are the graphs of one of such numerical experiments with estimates k and b converging to the values used in the model and not "known" to the EKF.

Obstacle course
The flight assignment to test the developed model and control algorithm is passing an obstacle course of four vertical walls in staggered order (Fig. 4). Reference trajectory consists of three parts: straight line before the first wall; curvilinear trajectory to fly around the walls; straight line after the obstacle course, which is parallel to the initial trajectory. Reference in-flight attitude is such that the X-axis of the body-frame is directed along the velocity and the XY plane of the same reference frame is maintained horizontal.
The graph in Fig. 4 portrays the reference (dashed line) and the simulated trajectories of the UAV. It appears that the simulated tracking performance is relatively good.
The attitude of the UAV during the same simulation is presented in Fig. 5 by Euler angles: simulated roll angle (continuous red line), reference roll angle (dashed line), simulated pitch angle (continuous green line), reference pitch angle (dashed line), simulated yaw angle (continuous blue line), reference yaw angle (dashed line). It can be seen that the change in the roll and pitch angle is close to zero while the actual yaw follows the reference yaw value.
To estimate the quality of attitude control the graphs of Fig. 6 show the Euler angle errors during the simulation. The maximum value of attitude error in all three attitude angles is 10 • . This maximum error corresponds to the points in trajectory, where it changes most abruptly. Other -more smooth -sections of the simulated trajectory do not deviate from the desired attitude more than by 5 • .
The author thanks the head of MIPT Advanced Control Systems Lab S.V. Avtaikin for providing facilities and assistance.