Modeling of Quadrotor Roll Loop using Frequency Identification Method

Abstract—Model estimation is an important step in quadrotor control design because model uncertainties can cause unstable behavior especially with non-robust control methods. In this paper, a modeling approach of a quadrotor prototype has been proposed. First an initial dynamic model of quadrotor UAV based on Euler-Lagrange formalism was developed. Then the roll system has been estimated using closed loop identification method and frequency domain analysis. An experimental tests has been performed for the roll system to validate the estimated dynamic model.


I. INTRODUCTION
Quadrotor is a Vertical Take-Off and Landing VTOL aircraft consists on two arms on four rotors placed on the extremities of its arms as is shown in Fig. 1. Quadrotor motion is controlled through motors speed variation. In fact changing simultaneously the speed of all motors with the same average produces vertical motion. Rotation around y B axis (Pitch) is provided by adjusting speed of motor (1) or (3), which results a forward/backward motion. Roll motion is a rotation around x B axis obtained by varying motor (2) or (4) speeds, thus a right/left translation motion is acquired. Rotation around z B axis (Yaw) is given by changing velocity of motor (1) and (3) against (2) and (4). Modelling of quadrotor UAV has attracted a lot of interest and there are several methods proposed in literature. In fact mathematical model of the quadrotor UAV was developed [1] and [2] using Newton-Euler and Lagrange formalism resulting a six degree of freedom DOF equations system describing quadrotor motion. Whereas in [3] quaternion method was used to get the quadrotor model. In [4] a non linear model was developed using Euler-Lagrange formalism, then the unknown model parameters has been identified using mathematical calculations and experimental tests. The quadrotor system was described with an ARMAX model obtained by the closed loop identification method [5]. Authors in [6] have used Black-box approach for a variable-pitch quadrotor identification was also developed and explained. In [7] a non linear dynamic model of a quadrotor UAV was detailed by considering the aerodynamic effects into account, to cover a wide flight regime not only hovering position. [8] used the Prediction Error Method PEM with blak box model approach to identify Linenar Time Invariant LTI model exploring experimental flight data. In [9] identification of linear parametric model of quadrotor UAV is developed using frequency domain method. [10] developed system identification of translation for a cost open-source quadrotor prototype MikroKopter. This paper presents an identification method to estimate dynamic model of quadrotor roll loop basing on initial double integration model. This paper is organized as follows: Mathematical modeling of quadrotor attitude is elaborated in Section II. Section III describes Sunbird quadrotor prototype. Section IV presents the frequency identification method for quadrotor roll loop. Simulation results and discussion is shown in Section V. Finally, conclusion and future work are given in Section VI.

II. MATHEMATICAL MODELLING
This section describes the quadrotor mathematical model developed using Euler-Lagrange formalism.
Denoting q the generalized coordinates of the quadrotor q = (x, y, z, φ, θ, ψ) ∈ 6 (1) where ξ = (x, y, z) is the positions of the quadrotor center of mass relative to the fixed inertial frame E, the orientation of the quadrotor are expressed by ϑ = (φ, θ, ψ), where φ is the roll angle around the x B axis, θ is the pitch angle around the y B axis and ψ is the yaw angle around the z B axis. The where sθ = sin(θ) and cθ = cos(θ).

Lagrangian equation is defined as follow
where E c and E p are respectively the potential and kinetic energy.
where I is the inertia matrix, m is the total mass of the quadrotor and g is the gravity acceleration.
Euler-Lagrange formulas is where F is the force of translation, τ is the total torque. Let's start with the rotational dynamic of the quadrotor. where τ is the total torques produced by quadrotor system. We can write where τ 1 is the roll, pitch and yaw torques produced by the quadrotor motors τ 2 is the gyroscopic effects given by where Ω i is the angular speed of the i th motor, b is the thrust coefficient, d is the drag coefficient, l is the distance between the motors and the quadrotor center of gravity and I rotor is the rotor inertia moment.
The generalized moments are Where I is the inertia matrix: The rotational dynamic equations can deduced from (4), (5) and (7) where (U 1 , U 2 , U 3 , U 4 ) are the model inputs which given by the following expressions In order to reduce complexity of calculus, gyroscopic effects and moments of inertia terms can be neglected in the motion (8). Thus the roll To estimate moment of inertia, the quadrotor can be decomposed into several parts (Arm, Battery, Card, Rotors). Then using the formulas (14) the inertia moment of each part relative to his axis can be calculated. After that by applying the Huygens-Steiner theorem (15) we can get the moment of inertia of each part through the quadrotor center of gravity. The quadrotor moment of inertia is given by the sum of the moment of each parts.
Denoting G(s) as the dynamic model of the roll axis

III. SUNBIRD QUADROTOR PROTOTYPE
In this paper a quadrotor prototype is used as a test platform named Sunbird Shown in Fig. 2. Sunbird is a home-made quadrotor platform designed at MACS research laboratory.
Sunbird quadrotor is composed as follows: • Arduino DUE card used as flight controller. It based on a 32-bit ARM core micro-controller with 54 digital input/output, 2 analog output and 12 analog inputs. • FlySky 2.4 Ghz 4 channels Radio Control Transmitter and Receiver used to remotely control the quadrotor.
• Rotor composed with Hextronik DT750 brushless DC motor, 10×4.5 propellers and Electronic Speed Controller ESC 30A operating with Pulse Width Modulation (PWM) signal generated by Arduino Due card.
• Ultrasonic sensor HC-SR 05 for altitude measuring with a 4.5 meter of measurement range.
• Measurement Processing Unit MPU6050 is also used to estimate attitude. MPU-6050 is a six axis IMU sensor containing 3 axis gyroscope ITG 3200 giving the angular velocities and 3 axis accelerometer ADXL 345 measuring linear accelerations. Arduino Due board receives data from MPU-6050 via I2C-bus. Then a complementary filter is used to attenuate high frequency signals affecting accelerometer like vibration and compensates the drifts affecting gyroscope measurements. The composition of quadrotor prototype is described in Fig. 3.

IV. ROLL SYSTEM FREQUENCY IDENTIFICATION
In this section we interested on roll system modeling using the closed loop identification method. It is based on frequency domain analysis in order to estimate the process model.
The roll system described in (13) is unstable, hence the necessity of a control loop.

A. Control loop identification
A Proportional Integral Derivative controller was used to ensure the roll loop stability. The PID control loop used in this section was described in Fig. 4. The PID controller is described by the following expression: where (k p , k i , k d ) are respectively the proportional, integral and derivative factors. The control system is based on reverse model technique. In fact the control signals was used to calculate the desired motors speed (Ω d1 , Ω d2 , Ω d3 , Ω d4 ) from (12).
Then using the desired motor speed, we can deduce the PWM signal. The relation between PWM and motor speed was experimentally estimated. Fig. 5 illustrates the relation of PWM signal over the motor speed, which can be expressed by the following second order equation using "polyf it" Matlab function where a 2 = 1.2093 10 −5 , a 1 = 6.5776 10 −2 and a 0 = 948.2.

B. Frequency Identification
The The closed loop system in Fig. 4 was excited by a varied sine setpoint with a magnitude of 5 • and a frequency between 10 −2 , 10 2 Hz. The PID control loop is implemented in the Arduino due card operating with a sample time of 0.01 second. The quadrotor was placed on a test bench ensuring rotation around the roll axis with minimum friction effects shown in Fig. 6.   can be seen, for low frequency the input and the output signals are quietly non phases and gains are observed. However for frequency around 1Hz the output amplitude increases locally then decreases for a highest frequencies, and a lag behavior is also observed. From several sine responses, the phase and magnitude can be measured for a each frequency. Then the Bode diagram can be plotted. Bode plot of the quadrotor proposed control loop is shown in Fig. 10. Basing on bode plot in Fig. 10 the closed loop transfer function can be calculated. From the Bode diagram the closed loop system can be estimated as a second order system with resonance. Denoting F (s) the control loop transfer function described in Fig. 4.
where ω n is the normal frequencies and ξ is the damping factor. Denoting Q the resonance factor of the closed loop system which can be described by the following expression: Thus www.ijacsa.thesai.org We can write also The damping factor ξ is given by solving the second order differential equation (23). We denotes ω r as the resonance frequency. Equation (24) describes the relation between the resonance ω r and normal frequencies ω n .
We obtained the following normal frequency and damping factor: The transfer function control loop can be written as where C(s) is the PID controller and G(s) is the process model transfer function.
Replacing C(s) and F (s) with their expression we can write Thus the open loop roll model is following third order transfer function The deduced process model is a third order transfer function system Fig. 11.
Step responses of estimated dynamic model and experimental prototype.

V. RESULTS AND DISCUSSION
To evaluate the performances of the proposed identification method. The quadrotor has been placed in a PID control loop to compare the real prototype responses and simulations of the estimated process model. Fig. 11 illustrates the experimental simulation step responses of the roll system. We can remark that both of these responses are very close, and the rise and settling time are nearly the same.
In addition the quadrotor roll axis was tested with sine response. Fig. 12 shows the measured response and simulation of the identified dynamic model for sine setpoint. We can see that the responses are approximately superposed. Basing on these results we can judge the validity of estimated process model by the proposed identification method.

VI. CONCLUSION
In this work the frequency identification method is proposed to estimate the quadrotor roll model. A non linear model is firstly developed using Euler-Lagrange formalism. Then the proposed identification method is applied to Sunbird quadrotor prototype using a PID control loop. Frequency domain analysis is then used for roll loop model. Finally, a comparison of experimental and simulated results in order to validate the estimated model. For the future work, the other quadrotor components (θ, ψ, x, y, z) should be estimated using the frequency identification to validate the effectiveness of this method in quadrotor system full modeling.