Modelling and design of flight control for quadcopter in ballistic airdrop mission under wind perturbation

Airdrop mission are often carried for areas that are difficult to reach using land route and do not have the infrastructure for manned aircraft. The benefits of using Unmanned Aerial Vehicle (UAV) for airdrop mission are getting much more attention with the rapid development of unmanned technology since last decade. The purpose of this paper is to develop a mathematical model of a quadcopter to carry out ballistic airdrop mission in a windy environment, modelled in the MATLAB/Simulink software. The quadcopter based on nonlinear dynamics model which is obtained by using Newton-Euler equation, equipped with sensor model, and free-fall payload model. The sensor consists of Inertial Measurement Unit (IMU), barometer, and Global Navigation Satellite System (GNSS). Sensor fusion algorithm is developed to estimate attitude and position of quadcopter using Kalman filter, as well as to estimate the wind speed. A Proportional, Integral, and Derivative (PID) based controller is designed to obtain the attitude and position control of quadcopter using estimated state of quadcopter. Then, the quadcopter will carry out an airdrop mission by following a simple automated waypoint navigated system. The results of the ballistic airdrop show good precision and accuracy in a high speed, but emphasize the importance of validation model.


Introduction
Unmanned Aerial Vehicle (UAV) has been growing rapidly in various aspect [1]. UAV originated from military ground, now UAV has been used in many fields, particularly in cargo dropping. Cargo dropping mission are often carried for areas that are difficult to reach using land route and do not have the infrastructure for manned aircraft. The benefits of using Unmanned Aerial Vehicle (UAV) for airdrop mission are getting much more attention with the rapid development of unmanned technology since last decades. There are two type most popular UAV in the market, especially in cargo dropping is fixed wing and multicopter. In general, fixed wing UAV is more efficient while cruising [2], therefore capable to fly further than any other UAV type [3] but need large area to take-off and landing.
In the other hand, multicopter have worst efficiency in cruising, but advantage of multicopter is capable to take-off and landing in vertical, therefore there is no need large area for take-off and landing, and capable to hover. With those advantage, particularly in cargo dropping, multicopter capable to operate from small area, and higher accuracy for payload dropping [4]. There are many types of multicopter and divided by number of rotors. In this paper, quadcopter is chosen with X-frame due to simplicity and more stable [5]. With cargo dropping mission will operate in rural area, there will be unpredicted environment [6], and need to operate at lower price than current method, which is using a helicopter; therefore, cargo dropping using quadcopter need an adequate control system, and sensor system. This paper deal with simulation cargo dropping using quadcopter with control system and sensor system in MATLAB/Simulink with Control System Toolbox.

Quadcopter
Mathematical dynamic model of the quadcopter is derived and can be used to simulated quadcopter by using simulation programs MATLAB/Simulink version 2018a. Quadcopter has four independently controllable rotor and assemble in cross configuration with two rotors are rotating in clockwise direction while the other two are rotate in anti-clockwise direction, as shown in Figure 1. These rotating rotors create upward thrust force and the difference of their rotating speed cause unbalanced torque applied to the centre of mass, and attitude can be change consequently. By assigning the rotating speed separately, total thrust and torque about body axis frame of the quadcopter can be obtained, thus control attitude and position of quadcopter in three-dimension space could controllable. using Newton-Euler equation in body frame with assumption that the quadcopter is rigid, where ( , , ) is position in body frame, ( , , ) is angular rate, ( , , ) is Euler angle using Z-Y-X rotation, (L, M, N) is moments due to propulsion system, ( , , ) is forces due to aerodynamics drag, ( , , ) is moments of inertia of quadcopter, ( , ) denote cos and sin, respectively, and (g) is gravitational acceleration. Position quadcopter in local horizon frame will develop in Equation 10 to Equation 12 using directional cosines matrix from position quadcopter in body frame and Euler angle.
Controlling quadcopter by changing each rotor thrust is not intuitive, hence propulsion system will be modelled as ratio of thrust and using motor mixing. Motor mixing will calculate each rotor based on attitude reference of quadcopter. The propulsion system is modelled from Equation 13 to Equation 16 where is thrust force and moment ratio of rotor x, is maximum thrust of each rotor, is maximum torque of rotor, is diagonally length from centre of mass to rotor, and is angle from to rotor 1 or rotor 2. Motor mixing is modelled from Equation 17, cmd subscript stand for command.
Aerodynamics drag is derived utilizing drag model [7] and shown in Equation 18. Aerodynamics drag calculated in body frame, and proportional to the square of sum of quadcopter speed in body frame and wind speed in body frame. External wind will be modelled constant and parallel to XY plane earth frame. External wind will transform to body frame in Equation 19 to (18) The quadcopter model is based on DJI M100. The initial parameter of quadcopter is listed in table 1.

Airdrop Payload
Airdrop is a method to deliver a cargo by dropping from aircraft while still on the air and can be used to deliver payload to remote area. There are three types of airdrop, free-drop, high-velocity, and lowvelocity [10]. This research will be focused on free-drop type to save payload weight by not using parachute or any device to slow the motion of free-fall payload. Quadcopter is suitable for dropping using airdrop type due to capability of quadcopter to hover.
Payload mathematical model is derived from [10] where payload modelled as free-falling object with aerodynamics drag and assuming the moment from drag is be small enough to ignore. Payload model is in Equation 22.
Where ( , , ) is position payload in earth frame, ( , , ) is cross section area of payload and is payload aerodynamics drag. Payload position will follow quadcopter position until release flag is true. Payload geometry used model adapted from [11] and listed in Table 2   Table 2. Geometry specification of the payload [10] Parameter Inertia of payload will assume as negligible due to smaller size than quadcopter and aerodynamics drag coefficient assume as 0.8 due to shape of payload resemble of cuboid.

Sensor
In this section, sensor model and state estimator of quadcopter is developed to estimate state of quadcopter. Sensor is necessary to estimate the vehicle state, i.e. its altitude and attitude. The most common sensor on board a quadcopter is Inertial Measurement Unit (IMU), Barometer and Global Navigation Satellite System (GNSS). IMU include a 3-axis accelerometer, gyroscope, and magnetometer. IMU modelled as analog device, where sensing state is converted to 16-bit data using simple gain and is called as an Analog-to-Digital Converter (ADC). Output from ADC then interpreted to measurement data using the invert gain of ADC and both gain will eliminate each other but with added random measurement noise. Data rate of all sensor but GNSS is 100 Hz and GNSS is 10 Hz. Sensor specification and modules are shown in Table 3.

Accelerometer
Accelerometer in a IMU is an electromechanical device that measure linear acceleration in body frame due to external forces and static acceleration by sensing changes in capacitance. Placement of acceleration is crucial, due to there will be centripetal forces if the accelerometer is not on centre of gravity. Accelerometer is described by the following Equation 23. where (̃,̃,̃) is acceleration measurement by accelerometer in body frame, ℎ is rotation matrix from earth frame to body frame and is measurement noise of accelerometer. Acceleration measurement is measuring acceleration of motion and gravity acceleration in body frame. Accelerometer data will be being used to estimate position, attitude of quadcopter, and external wind velocity.

Gyroscope
Gyroscope is similar to accelerometer that is an electromechanical device but measuring angular velocity of an object. Gyroscope is the most relevant for air vehicle navigation and control, along with accelerometer [7]. Gyroscope is described by the following equation below.
[̃̃] = [ ] + where (̃,̃,) is gyroscope measurement by IMU and is measurement noise of gyroscope. Data form gyroscope will be used for estimate position and attitude of quadcopter.

Magnetometer
Magnetometer is a sensor that can measure the Earth magnetic field vector. Magnetometer is used to estimate the magnetic field by following equation below where ( , , ) is Earth magnetic field vector, (̃,̃,̃) is magnetic measurement from the magnetometer, and is measurement noise of magnetometer. Earth magnetic is different for each location on earth and will be assume constant, due to small movement in Earth position.

Barometer
Barometer is a sensor that can measure atmospheric pressure. Measurement data from barometer can be used to determining relative height using hypsometric equation, where increasing altitude will decrease atmospheric pressure. Equation that estimates relative altitude takes the following form below where ̃ is estimate altitude on Earth frame, R is air specific gas constant, T is temperature in reference altitude, ℎ 0 is reference altitude, 0 is reference atmospheric pressure, 1 is measurement atmospheric pressure, and is measurement noise of barometer. Reference altitude is chosen at take-off point.

Global Navigation Satellite System (GNSS)
GNSS is a satellite navigation system that provide geo-spatial position, but GNSS modules have lower update rate. GNSS can be used to determine absolute position quadcopter in Earth frame. Typical GNSS modules have lower vertical accuracy than horizontal accuracy, therefore barometer is used to altitude estimation. GNSS modules is described by the following equation where (̃ ̃ ) is horizontal position output from GNSS modules in Earth frame, and is measurement noise of GNSS modules.

Attitude estimation
Attitude estimation of quadcopter will be based on Attitude and Heading Reference System (AHRS) from [12], where using Kalman filter to estimate Euler angle from IMU. AHRS algorithm combine gyroscope data to traditional attitude determination to lessen oscillation of estimation and drifting from using gyroscope measurement. AHRS will provide optimal sensor fusion to estimate correct vehicle attitude.
AHRS algorithm will fusion measurement sensor data with Kalman filter to estimate Euler angle. AHRS contain six state of quadcopter which is roll, pitch, yaw, drift roll, drift pitch, and drift yaw (, , , , , ) . State vector is initialized before Kalman filter begins to operate, which is assume quadcopter not rotating and at level. AHRS algorithm is represent at Equation 28, where A is state matrix to ensure the angle from previous estimation and removes impact of the drift from angle prediction, and B is distribution matrix with allows for multiplication of gyroscope measurement by the time difference from previous measurement.
where 3 3 is identity matrix with size 3x3 and 0 3 3 is zero matrix with size 3x3. In measurement vector only Euler angle is used due to drift Euler angle is cannot be obtain from the sensor. Measurement vector input is estimate using traditional attitude determination, where using accelerometer and magnetometer to estimate Euler angle. Equation below is represented measurement matrix of AHRS.

Position estimation
Position estimation will fusion Inertia Navigation System (INS) and GNSS using Kalman filter. INS calculate position by dead-reckoning the position and velocity object without external references but will suffer from drift issue. By providing GNSS data and combining information using Kalman filter, the error in position estimation are stable. INS can be short fallback, if GNSS is unavailable. Position estimation model is adapted from [13]. Kalman filter state is position and velocity quadcopter in Earth frame (̂,̂,̂,̂̇,̂̇,̂̇), with input as acceleration in Earth frame without gravitational acceleration. Position estimation Kalman filter is represent in Equation 30, where A is state matrix that integrated previous state matrix into current state, and B is input model where integrated acceleration from acceleration into estimated state.

Airspeed estimation
Airspeed estimation of quadcopter can be calculated using accelerometer and derived from [7]. When quadcopter stay while in hover, total thrust can be estimated by Euler angle. By calculated equilibrium forces with estimated total thrust, aerodynamics drag can be estimated and is correlated to airspeed. Total thrust estimation derived from translation dynamics of quadcopter in Equation 34, by assuming quadcopter not moving at Z axis Earth frame, so the aerodynamics drag in is negligible where ̂ is estimated total thrust in body frame, and Euler angle is estimated earlier from AHRS algorithm. Subsequently, total thrust is used for estimated aerodynamics drag by using translation dynamics of quadcopter. Estimated wind speed is represent at Equation 35 to Equation 37 ̂= √2 −(sin sin cos − cos sin )̂−̃̈ (36) Where (̃̈,̈,̈) is acceleration measurement with transformation to Earth frame.

Controller Design
Quadcopter system input signal to each rotor by using motor mixing, where each rotor rotation speed can be controlled independently. Single Input Single Output (SISO) controller is designed using where is proportional gain, is integrator gain, is derivative gain, and N is derivative filter. Since quadcopter is a system with degree of freedom higher than control available, controller design will use two loops, which is inner loop, and outer loop. Inner loop will feedback Euler angle of quadcopter and outer loop will feedback position of quadcopter. With quadcopter dynamics control in body frame, there will be a transformation to change Earth frame in outer loop to Body frame. This control loop is derived from [14] and [15] and is illustrated in Figure 2.
Quadcopter model shows that the open loop system has double integrator, where there are no zeros and two poles at origin. Due to double integrator, using constant gain only change poles to up and down, therefore feedback quadcopter will need different form from constant gain.
Design Requirement and Objective (DRO) of PID value derive from the mission of quadcopter, which is dropping payload. Quadcopter need to stable in position only when dropping payload, so PID value is achieve by feedback the open loop system with PID in Laplace domain until control performance of the quadcopter near or matches the DRO mission and it is in Table 4. The DRO is overshoot under 30%, 2 second or faster rise time and 10 second or faster settling time.

Mission profile
With quadcopter will run autonomously to deliver airdrop without human input, mission profile and autonomous system is created. Because payload will drop ballistic at specific altitude, wind perturbation can interfere dropping point and increasing possibility of missing or broken payload, therefor using wind estimation is needed to increase accuracy dropping. Mission profile of quadcopter to ballistic airdrop is divided into 6, which are: a) Take-off : Take-off to desired altitude b) Cruise : Fly toward target at desired altitude c) Hover : Hover for a few second to estimate wind speed at target with desired altitude d) Correction : Fly to correction location for quadcopter to compensation wind speed e) Drop and Cruise : Airdrop is drop and quadcopter fly to origin position at desired altitude f) Landing : Reduce altitude at constant speed In simulation, mission profile is run sequentially with if statement and using waypoint model as reference. In mission 1 to 3 and 5 to 6, final position is not really mater to accuracy payload, so if the error position is under 2.5m from the target, quadcopter will run next mission. With mission 4, which is correction, dropping accuracy is crucial, so final position before dropping is set to under 1m and absolute velocity under 0.1m/s.

Results and Discussions
Simulation is conducted using MATLAB/Simulink R2018a using ode45 as solver, zero order hold for discrete and estimation every 100 ms. Model in Simulink is shown in Figure 3. Simulation will conduct and will focus to attitude quadcopter while releasing payload, full mission, and accuracy of airdrop.

Attitude quadcopter
When quadcopter release payload, there will be a movement due to different weight in quadcopter. With configuration of payload of 1.245 kg, wind speed of 20 m/s and releasing payload at 5 second, simulation result is shown in Figure 4. It shows that sensor estimation and control design works, quadcopter can hover, but with some oscillation at attitude. After releasing payload, quadcopter altitude increasing by 2 m, drift by the wind at 0.8m, and pitch angle increase by 0.1 rad. With lower mass, quadcopter need to increase angle to hover at same position due to lower thrust produce to stay level.

Full airdrop mission
Airdrop is simulated using speed wind from of 20m/s, payload of 1.245kg, origin at (0,0,0)m, and target airdrop is (50,20,0)m. Trajectory of quadcopter and payload is shown in Figure 5 and Figure 6.

Accuracy of airdrop
To find out the accuracy of the system payload dropping, the full airdrop mission will be simulated 40 times with same conditions as the previous mission but with moving the dropping location to (50,0,0)m and vary wind speed to a single axis. Wind speed, location and origin is straight; therefore, accuracy of each axis can be determined. Result of the simulation of 40 times is shown in Fig. 7. The result of simulation shows that payload dropping is quite accurate, with mean error of 0.57m, standard deviation of 0.371, and maximum error of 1.62m. Accuracy and precision with low wind is lower than with high wind, due to wind speed estimation is works worse with low wind [7].

Conclusion
This paper presented that with adequate sensor and control systems, regular quadcopter capable to airdrop payload using MATLAB/Simulink R2018a. Sensor systems consist of IMU, barometer, GNSS modules, airspeed estimation, attitude estimation, and position estimation. Control systems consist of UAV feedback using PID, and waypoint model derive from airdrop mission profile. Result of cargo dropping shows that the quadcopter capable to do cargo dropping in wind condition, there is no indication of control failure, both in windy conditions and without wind. Accuracy and precision of cargo dropping shows that quite good, with payload fell within a radius of less than 1.9 m after dropped at altitude of 30 m in various wind.