CONTROLLING THE ALTITUDE DYNAMICS OF QUADCOPTER USING ROBUST OUTPUT FEEDBACK CONTROLLER

This paper deals with observer based controlling and stabilization of the nonlinear dynamics of the quadcopter and in order to explore the complex dynamics of the quadcopter, the only altitude of the quadcopter is considered. A nonlinear model of the altitude is extracted from the six DOF model of the quadcopter and the same is linearized. A robust controller is implemented in the design to cater to the nonlinear nature of the quadcopter at hover by using both Sliding mode control and model predictive controller. The soft instrument, observer, is designed here for the state estimation purpose to bring the simulated system more closely to realistic values. Effectiveness of the designed system is ensured by trajectory tracking of the quadcopter. Simulation results presented show that output feedback based controller designed having optimum performance in estimating the states of the targeted system with almost negligible error. Also, the nonlinear controller designed having superior performance as compared to a controller designed with the linearized system.


INTRODUCTION
The current technological and automated era has proved the quadcopter, a class of UAVs as an important contribution towards civilian usages due to their significant properties such as vertical take-off and landing capabilities. Navabi and Mirzaei (2017) proposed that the four-rotor flying vehicles i.e. Quadrotors provide a much easier approach and mechanism to benefit from different helicopter features in different scenarios being either rescue operations, navigation and surveillance or even military missions in harmful and threatening conditions, and so on. Even though, quadcopter being a major invention, a serious challenge is posed when dealing with highly non-linear, under actuated and coupled dynamics of the system. Historical background of Research includes different control algorithms and techniques for improving quadcopter performance and controlling different DOFs (degrees of Freedom). A research study García, López, Lozano and Pégard (2013) analyzed that out of six degrees of freedom of quadcopter, the altitude control is the most demanding problem since altitude parameter appears to be connected with the quadcopter mass and along with attitude angles as well. Different factors, in addition, may lead to disturbances in altitude. The most important causes being rotational dynamics, change in mass, thrust and wind gusts, etc.
In a literature review, different kinds of controllers for controlling different characteristics including linear and non-linear techniques along with simulation works are available. In a paper about Automation and Robotics (Fatan, Sefidgari & Barenji, 2013), an adaptive neuro PID controller involving genetic algorithm was proposed. Wang, Ma, Xia, Weng and Ye (2013) presented the experimental scenarios for altitude control. It adopted a linear Gaussian-based controller and intended to maintain a constant altitude and for estimating the altitude velocity a Kalman filter was designed. Meanwhile, in a paper about Automata presented by Paiva, Soto, Salinas and Ipanaqué (2016), a modified PID controller was designed for regulating the altitude i.e. z-axis of the quad rotor by varying the rotational angles in the presence of disturbances. Adaptive pole placement based self-tuned PID controller was designed by Yang, Cai, Lin and Wang (2013) for controlling the heading and attitude of the quadcopter. Since dealing with disturbances and state estimation is the important characteristic in quadcopter model. Observer design usually forms the basis for output control realization where the controller aims to make the error of estimation negligible or zero. For this contribution, time domain disturbance observer controller is introduced in Aboudonia, Rashad and Badawy (2015). The disturbances were estimated using observer and then integral control was used to compensate for these disturbances. Meanwhile, a high gain state observer was designed by Yayla, Kaya and Kutay (2017) that estimated the system states. The controller used this model to control the attitude and altitude of quadcopter. State feedback controller is used in the design. The designed observer was not implemented in the trajectory tracking of a quadcopter. A linear quadratic optimal controller with linear kalman filter state observer is used for the altitude and attitude controller of the Quadrotor in Kurak and Hodzic (2018). The results obtained depicts the system reaching to reference trajectory with a delay which may be improved. Furthermore, for estimating different variables of UAVs, many types of observers have been used. An, Li, Wang, Wang and Ma (2013) worked to carry out a second order geometric sliding mode observer for altitude parameter but it didn't include any perturbation estimation. While Benallegue, Mokhtari and Fridman (2008) worked on a higher order sliding mode observer estimator considering external disturbances like wind and noise of sensors.
The paper layout is structured as: section 2 involves the basics of quadcopter system model followed by two sub sections that include modeling of the parameter under consideration i.e. altitude modeling and then linearization of the altitude model. Section 3 involves controller design by two important and most widely preferred techniques, sliding mode controller design (SMC) and Model predictive controller (MPC). While section 4 includes the high gain observer HGO design with sliding mode controller since SMC appears to be robust as compared to MPC. HGO is included in this research work to estimate the unmeasured states of the system. Section 5 covers the simulation results for above mentioned different designs. Finally, section 6 sums up the work by presenting the concluding remarks as well as future work statements.

SYSTEM MODEL
Quadcopter, as the name, suggests consists of four rotors that are usually arranged at the corners of the body. Figure 1 depicts the basic structure of a quadrotor system composed of four motor-driven propellers. Entire system model has quad i.e. four inputs and six outputs hence considered as six DOF and second order under the actuated system, exhibiting highly non-linear characteristics when being flown at high speed and the system usually gets affected by all kinds of disturbances and parameter changes during flight operation (Alexis, Nikolakopoulos & Tzes, 2011). To come up with proper controlling techniques and state estimation and for simplifications, this research work is confined to only altitude parameter consideration.

QUADCOPTER ALTITUDE MODELING
Quadcopter altitude modeling requires the altitude parameter to be decoupled from the system model for stabilizing at hovering point. Foe decoupling, it requires first to have a complete state space vector of the system that mentions all the linear and angular velocities and quadcopter's position in space as well. After the detailed computations carried out in Bushra, Memon, Nighat and Chowdhry (2018), Ganga and Dharmana (2017), Khuwaja, et al. (2018), the state vector of the system in general form and the state space representation of quadcopter system is mentioned in (1) and (2) respectively.
Focusing the parameter under consideration, the above formulated mathematical model is de-coupled for hovering as mentioned earlier. This point demands a researcher to assume a few assumptions in order to have a stable hover. The aerodynamic moments and forces are considered negligible since there seems to be no any aero-dynamical lifting surfaces (Bushra, et al., 2018;Ganga & Dharmana, 2017;Khuwaja, et al., 2018).
Keeping in view the same assumptions shown below mathematically, the complicated system of quadcopter mentioned in (11) in (Bushra, et al., 2018) gets reduced as given in (3).
The above equation helps in designing the controllers in a bit easier way. It also adds in analyzing the robustness of the system.

LINEARIZATION
Since the scope of this research is restricted to altitude model of the quadcopter and this model is taken as a single input single output system with a control input ∪ 1q ( ) . Input/Output relation in such type of system can be expressed as: Taylor series expansion is normally utilized for such nonlinear systems for a small region of operation and research for quadcopter controller design is limited to this small region for flight operation (Selfridge & Tao, 2014). This nonlinear system is made linearized so that makes it compatible to be used in designing the linear controllers for quadcopter and here in this research the linear model predictive controller. This altitude system can be represented as a linearizable SISO system given as: An arbitrary value of all states are used in the linearized system given in (5) where the states in A Q system matrix are the partial derivative with respect to state variable while in the B Q input matrix, the entries are the partial derivative with respect to input and these are given as:

CONTROLLER DESIGN
The two important approaches, Sliding mode controller (SMC) and Model predictive controller approach (MPC) are to be incorporated in this research work in order to have a stabilized altitude controller for the system under consideration. Leading to the results of both approaches, the one showing the robustness would be further processed for observer design to estimate states of the quadcopter model.

SLIDING MODE CONTROLLER DESIGN
SMC approach makes the basis in developing and controlling the non-linear dynamics of different systems. For stabilizing the system, SMC is applied here for heading feature of the quadcopter. SMC usually comprises of two phases for its implementation. The first phase also called the "reaching phase" involves the selection of a hypersurface or a manifold that is also considered as the sliding surface. When system trajectory is confined to this surface, it exhibits the desired behavior. In the second phase, multiple discontinuous feedback gains are found such that the system trajectory intersects and stays stable on the manifold.
Since SMC aims the system to track desired reference trajectories, the error state vector error for altitude parameter may be represented as given in (6), where dq z is the desired altitude of the quadcopter.
The sliding surface for the system may be described as in (7), where q e is the error term that denotes the difference of quadcopter altitude to its desired altitude. q q q s e ce = +  Since the design of SMC requires a sliding surface or manifold to be described as mentioned earlier hence the sliding surface can be described as given in (8).
To ensure system stability, conditions need to be determined. Following the derivative of (10) yields (11).
Where the design parameter factor λ needs to be positive. (11) ensures that the system trajectories are converged towards sliding manifold in a finite time period. By referring Tripathi, Behera and Verma (2015), the overall output generated by the SMC controller after being implemented for the quadcopter altitude can be expressed as given in (12).

MODEL PREDICTIVE CONTROL DESIGN
The model predictive controller is usually designed to forecast the control input so that the system under consideration may be effectively and optimally controlled (Qin & Badgwell, 2003). Linear MPC is designed and implemented here for the linearized model of quadcopter altitude. Designed controller's objective is to solve the optimization problem for quadcopter altitude under operation at some desired value which may be given as (Memon, Chowdhry & Aamir, 2016): where S q ≥ 0 is weighting matrix and defined as The dimensions of S q matrix are equivalent to the number of state variables and Α q is diagonal matrix and used here as the tuning parameter in order to improve the closed loop response. The state vector used in the optimization is given as:

OUTPUT FEEDBACK CONTROL
This portion incorporates the use of high gain observer (HGO) for estimating and controlling the unmeasured states of quadcopter model. An observer takes the input and output under consideration and produces the estimated states of the system. Therefore observability of the system under consideration needs to be tested. Since this paper focuses only on altitude parameters, the linearized altitude system is already depicted in (5). It requires the system to be observable. The generalized formula for finding observability rank is evaluated as under.
Evaluating according to the above details, the system is found to be observable with rank=2= n. High gain observer design adds to make the observer robust to uncertainties in modeling the non-linear systems. It also ensures that the state feedback control performance is recovered when the observer gain is sufficiently high. High gain observer Structure for external states is expressed in (14).
The gains are obtained as: Where γ is the design parameter chosen a very small value, such that it reduces the estimation error in states as it tends to zero.
The proposed high gain sliding mode observer based output feedback control is suggested as in (15).

SIMULATIONS
Nonlinear dynamics of quad copter for altitude parameter are simulated. Open loop response of the said system is highly unstable as analyzed from the literature available as well as from simulating the said system. The system under consideration is simulated using both Model Predictive controller and sliding mode controller with parameters given in Table 1. Performance of the system for both of these controllers is presented in Figure 2 and Figure 3.   Since both of these controllers are able to follow the reference trajectories without any distortion which ensures the controlling and stabilization of altitude parameter of quad copter under flight operation. Furthermore, the response generated by the SMC controller is much better in terms of speed, overshoots and delay as well as in minimizing the error as it is explained in Figure 3. It can also be depicted that SMC controller given in (12) is more robust and able to stabilize the quadcopter altitude more quickly as compared to the MPC controller.  In order to realize the system towards reality, the high gain observer is utilized so as to incorporate the unmeasured states of the system. Altitude control designed in (15) comprises of SMC controller and high gain observer controller applied to the nonlinear altitude model. Simulations for measured and estimated states using observer are presented in Figure 4 and Figure 5 for some arbitrary trajectory and fixed value of altitude of 5m. Since observer based design is implemented with the SMC controller only due to its much better performance.
It is clearly observed from the response that designed observer based system is estimating the system states efficiently with almost negligible error. States estimation is effective and efficient not only for some fixed value of altitude but also with any arbitrary trajectory given as concluded from Figure 5 and Figure 4 respectively.

CONCLUSION AND FUTURE WORK
Altitude parameter of the quadcopter is analyzed by decoupling it from the six DOF nonlinear model. The same is linearized in order to design and implement the control design using Model predictive controller. The same nonlinear model is then used with the sliding mode controller design. Performance of both these controllers is analyzed for the altitude parameter stabilization and controlling revealed that performance of SMC is much better as compared to MPC in terms of robustness, reaching the final value quickly and exhibiting negligible overshoots. The model under consideration is then controlled using High gain observer with the controller having better performance in order to estimate the unmeasured states of the system. Simulation results depicted that system states are measured effectively with negligible error. Future work may also be carried out in terms of improving the performance with observer using the MPC controller and the system shall be analyzed by introducing different disturbances model in the presence of an observer.