Stable Hovering Flight for a Small Unmanned Helicopter Using Fuzzy Control

Stable hover flight control for small unmanned helicopter under light air turbulent environment is presented. Intelligent fuzzy logic is chosen because it is a nonlinear control technique based on expert knowledge and is capable of handling sensor created noise and contradictory inputs commonly encountered in flight control. The fuzzy nonlinear control utilizes these distinct qualities for attitude, height, and position control. These multiple controls are developed using two-loop control structure by first designing an inner-loop controller for attitude angles and height and then by establishing outer-loop controller for helicopter position. The nonlinear small unmanned helicopter model used comes from X-Plane simulator. A simulation platform consisting of MATLAB/Simulink and X-Plane© flight simulator was introduced to implement the proposed controls. The main objective of this research is to design computationally intelligent control laws for hovering and to test and analyze this autopilot for small unmanned helicopter model on X-Plane under ideal and mild turbulent condition. Proposed fuzzy flight controls are validated using an XPlane helicoptermodel before being embedded on actual helicopter. To show the effectiveness of the proposed fuzzy controlmethod and its ability to cope with the external uncertainties, results are compared with a classical PD controller. Simulated results show that two-loop fuzzy controllers have a good ability to establish stable hovering for a class of unmanned rotorcraft in the presence of light turbulent environment.


Introduction
Unmanned aerial vehicles (UAVs), particularly small unmanned helicopters, are gaining more interest from worldwide researchers due to their hovering ability and vertical takeoff and landing (VTOL) capability [1].Demand for these capabilities has increased, especially in military and civil applications, which, in turn, results in greater demands on automated control systems [2].Miniature helicopters come with various advantages such as small size, light weight, and low cost.However, they are under actuated, strongly coupled, and they have unmodeled dynamics and highly nonlinear systems [3,4].All these characteristics create significant challenges for flight control design including trajectory control and attitude control.Another major problem rarely addressed by researchers is that of the presence of wind.Wind turbulence can create large thrust variations to the helicopter, which create a challenge to maintaining a constant height.Generally, an unmanned helicopter is controlled by a remote pilot or it is autonomous according to the preprogrammed flight plans created by sophisticated dynamic automation systems.A large number of effective flight control methods have been reported for small unmanned helicopter including robust adaptive control [5][6][7],  ∞ control [8][9][10], state-dependent Riccati equation control [11], sliding mode control (SMC) [12], trajectory tracking control [13], back stepping control [14,15], fuzzy logic control [16,17], and neural network control [18,19].Among these methods, fuzzy logic control has received significant attention from researchers because of its ability to handle nonlinearities [6,20].Recently, fuzzy control has been successfully proposed for control and navigation of Mathematical Problems in Engineering miniature VTOLs [21] and fixed wing UAVs [22].Hybrid intelligent control systems were used for minihelicopter [23], addressing the stabilization of the helicopter without requiring Takagi-Sugeno methodology.Fuzzy control was used for landing systems along with autonomous flight using MATLAB and Aerosim aeronautical simulation block set [24].A work on design of a fuzzy gain scheduled attitude/altitude controller for the unmanned helicopter under wind and gusts environment was reported in [16].Flight testing of UAVS in real environment has always been expensive due to high aviation fuel costs.Additionally, new emerging technologies require extensive flight testing; therefore, real environment testing is too expensive and uneconomical.A viable alternative is to test the flight systems in a simulation-based environment.A commercially available flight simulator "X-Plane" can be used as an engineering tool to test and validate flight characteristics of fixed and rotary wing UAVs.Due to its built-in capability of communicating flight parameters, it has been widely used for modeling and control of UAVs [25][26][27].
In this paper, Mamdani-based fuzzy control is proposed for small unmanned helicopter at hovering under turbulent environment, which is the most important, complicated, and sensitive flight mode.Hovering refers to the ability to hold position, height, and heading during constant flight mode; therefore, helicopter control systems require guaranteed stability at first to hold the helicopter.In order to control the hover state, the control system is synthesized by applying pilot expertise in its simplest form by means of two-loop (inner-loop and outer-loop) fuzzy control.Innerloop design contains pitch, roll, and yaw angles and height control while outer-loop constitutes the position control.In addition, external disturbance such as air turbulence is taken into account within the system model.The small Rapter-30 V2 helicopter is selected to test this proposed fuzzy control scheme comes from X-Plane simulator.It is the most realistic flight simulator in the flight aviation domain.Additionally, another main purpose of this research is to demonstrate the possibility of modifying and testing this intelligent flight control in a fast and easy way using an appropriate flight simulator tool such as X-Plane.
The paper is organized as follows.Section 2 describes the dynamical model of small unmanned helicopter.Section 3 discusses the simulation platform consisting of flight simulator X-Plane and MATLAB.Section 4 details proposed fuzzy laws for inner-and outer-loop control.Section 5 presents the simulation results.Finally, Section 6 outlined conclusion and future research work.

Dynamical Model of Small Unmanned Helicopter
The nonlinear model used for small helicopter is a physical model based on [28].Newton's second law and Euler equations of motion of rotation are applied to helicopter model because it is considered as a rigid body.It is also important to determine force and torque vectors which are acting upon it.Therefore, the whole motion profile of a helicopter model can be derived from the six degrees of motions equations.Three of them are translational motions and other three are assigned to rotational movement.The helicopter model shown in Figure 1 includes specific forces, velocities, angles, and related reference frames.This paper assumed some suppositions in order to simplify and derive the final form of equations of motion.These are given as follows.
(i) The inertial cross product is negligible.
(ii) The effect of the main rotor induced air flow on the fuselage is negligible.
(iii) There is always uniform and steady inflow at the main rotor.
(iv) Air density is assumed to be constant in hovering mode.
(v) Rotor blade distortions are neglected during the computation of rotor thrust.
(vi) No twist is considered on the main rotor blades.
(viii) Planes of symmetry exist for mass along the -axis, this implies   = 0.
Small helicopter mathematical model is described in [28] and is divided into different submodels which interact with each other because of heavy dynamical coupling.These small submodels can be divided into two categories; one is helicopter controls and other refers to helicopter body dynamics as shown in Figure 2.

Helicopter Control Surfaces.
A helicopter has four control inputs to control attitude and movement.The first aileron servo control input ( lat ) controls the lateral cyclic pitch on the main rotor which results in roll motion that makes the helicopter moves in the lateral direction.The second elevator servo input ( long ) controls the longitudinal cyclic pitch on the main rotor which results in pitch motion that makes the helicopter moves in the longitudinal direction.The third collective pitch ( coll ) controls the collective pitch on the main rotor which results in heave motion that makes the helicopter moves in the vertical direction.Finally the rudder servo input ( ped ) controls the collective pitch on the tail rotor which results in yaw motion as shown in Figure 3.

Main Rotor
Model.The primary source of forces and moments generation on the helicopter is due to rotation of main rotor and which usually consists of two blades and one hub.When it rotates, the blade and air-relative motion produces air power, while the hub is used to connect the blade and rotational axis.Based on classical momentum theory, thrust, induced velocity can be given as follows [29]: ( The description of all variables is given in nomenclature.
Moment equations are given as The flapping dynamic equations of the main rotor are expressed in [30] as (3)

Tail Rotor Model.
The tail rotor is used to compensate the torque about -axis by producing a counter side force and to help in course correction.The helicopter is equipped with a gyroscope which controls tail rotor blade pitch needed to maintain angular velocity () at zero as well as adjust the thrust of tail rotor so that the helicopter does not rotate about the -axis.As a result, the helicopter is only able to yaw by using the pedal input controlling the tail rotor.The tail rotor model is given in Figure 4. Consider (5)

Vertical Fin Model.
The vertical fin model describes the force which is produced by tail rotor around the -axis of the system and affects the behavior of helicopter body according to [31].Consider 2.6.Rigid Body Dynamics and Attitude Kinematics.Consider

Simulation Platform
The simulation platform is implemented using MATLAB and X-Plane, a commercially available flight simulator developed by Laminar Research.In this work X-Plane is used to provide the model of small unmanned helicopter control and to simulate its dynamics.Two computers are used for this simulation platform and communication is done through a UDP (user datagram protocol) data communication bus as shown in Figure 5.

X-Plane Flight
Simulator.X-Plane flight simulator was chosen because it is certified by the Federal Aviation Administration (FAA) to train pilots [32] and its aircraft models are extremely accurate which ensures the simulation with high degree of accuracy as an actual flight.Apart from its realistic flight simulation capability, X-Plane also incorporates additional useful features which make it an ideal choice for experimenting and validating UAVs.It has plane marker tool which uses engineering method known as blade element theory, allows the division of aircraft model into small elements and then finds the forces acting on each element several times per second [33].The control algorithm is developed and stored in Simulink.During each sampling  period, the control algorithm receives signals from X-Plane and outputs the control commands to X-Plane through the UDP connection.Figure 6 depicts the X-Plane input/output data window used to perform a simulation and allows the user to adjust the update rate from 1 to 99 packets per second in UDP rate.The communication speed between software is 40 packets/second were selected for this work.The UDP packet size and type depend on the amount of data being exported.Generally, the pattern of data packets being sent by X-Plane is of the following format: the first four bytes indicate the type of packet i-e "DATA, " the fifth byte is used for an internal policy, the next incoming four bytes represent what type of parameter is being sent to Simulink, and the following four bytes represent the value in single-precision float [34].A pattern of data packet is shown in Figure 7.

MATLAB/Simulink
. MATLAB has user graphical environment and a libraries set that allow users to design, simulate, implement, and test a variety of time-varying systems relating to controls, communications, and signal/video/image processing areas.Simulink is integrated with MATLAB, which provides instant access to an extensive range of tools used to develop algorithms, analyze and visualize simulations, customize the modeling environment, and define the signal and parameters of data tested [35].
In this simulation platform, the MATLAB /Simulink is used as software which is responsible for processing the UDP data to and from X-Plane and controls the system for processing of data simulation.Figure 8 shows how MATLAB /Simulink and X-Plane are interconnected for this hovering control system.

Fuzzy Control Design
The proposed fuzzy system for hovering mode under light air turbulent environment is composed of two-loops, i-e innerloop and outer-loop, responsible for attitude, height, and position control, respectively.First, attitude angles are used as feedback information in order to keep the helicopter stable.Second, after achieving stability through attitude angles, a height fuzzy controller is designed to control the altitude of the helicopter with high holding ability.Finally, based upon positional feedback information, an outer-loop position fuzzy controller is designed.The fuzzy inference system (FIS) for hovering mode is shown in ( 16) and an overall fuzzy control structure is depicted in Figure 9. Consider  Assume that the helicopter is working clockwise and its operation phenomena are based on the experiences of a human pilot [36,37].Consider the following.
(i) While the helicopter pitching angle is negative, increase the longitudinal cycle variable which is responsible for making the pitch angle positive so that balanced attitude can be achieved.
(ii) While the helicopter fuselage is deflecting towards the left, increase latitudinal cycle variable pitch positively to balance the attitude.
(iii) While increasing the collective positively, the pedal will also be increased positively to keep the yaw balanced.
(iv) While the helicopter vertical position and velocity are negative, increase collective variable to hold the helicopter at desired height.

Inner-Loop Control.
Inner-loop control constitutes of attitude and height Mamdani fuzzy control for small helicopter flight and is further divided into three angles controller i-e pitch, roll, and yaw control.Attitude angular velocity and -position are considered to be input while cyclic pitch (longitudinal and lateral both), tail rotor pitch, and collective pitch are an output of the inner-loop control.The inner-loop control structure is depicted in Figure 10.Lat.

Pitch Fuzzy Control.
The pitch fuzzy controller is mainly concerned with the longitudinal cyclic pitch as an output and pitch angle error (  ) and pitch rate () as input is shown in Figure 11 where  1 and  2 are input quantifying factors and   is the output scaling factor.The inputs and output of pitch control are divided into seven, five, and nine fuzzy intervals, respectively, as shown in Figure 12 to ensure the control sensitivity and stability.Gaussian MF is selected due to its higher smoothness level than triangular MF for input and output variables.The associated rules are given in the appendix.
The other two roll and yaw fuzzy controls are designed in a same way and their detailed rule description is available in the appendix.

Height Fuzzy Control.
For height fuzzy control, it is assumed that main rotor speed has constant value; therefore the collective control corresponds to the error of vertical position () and vertical rate ().The height input and output MF are shown in Figure 13 and rules are given in the appendix.

Outer-Loop Control.
The outer-loop includes longitudinal and lateral position control of small unmanned helicopter.The control is mainly handled by main rotor longitudinal cyclic pitch and lateral cyclic pitch movement.The horizontal and vertical position fuzzy controller generates a desired attitude angle (  ,   ), which is further used as input to attitude fuzzy controller, in order to achieve stability.Longitudinal positional error (  ,   ) and velocity (, V) is the input for the controller and desired pitch and roll angle is the output.Again Gaussian MF is selected for both input and output and rules are formulated on a heuristic basis.Finally, two fuzzy controllers are designed according to signs definition depicted in Figure 14, which effectively determines the desired values for the pitch and roll angle.Figure 15 shows the proposed outer-loop control architecture.

Longitudinal Position Control.
Given -position as a reference, this longitudinal control infers the desired pitch  angle (  ) using the error of -position and translational velocity ().The input and output MF are shown in Figure 16 and twenty-five analogous fuzzy rules used to determine the desired pitch angle are given in the appendix.The interpretation of first rule is if the error in the position is negative and its rate of change is also negative then it means that a positive pitch angle is causing the helicopter to move away from the desired position therefore a relatively large negative pitch angle is required to slow down the longitudinal motion, reverse the velocity, and reduce the error in position.
All rules are explained in this way.

Lateral Position Control.
Given -position as a reference, the lateral control infers the desired roll angle (  ) using the error of -position and translational velocity (V).The input, output MF and analogous fuzzy rules are used to determine the desired roll angle and are given in the appendix.The first rule can be interpreted as follows: if the error of -position is negative and its derivative is also negative it means that negative roll angle is causing the helicopter to move away from the desired position therefore a relatively large positive roll angle is required to slow down the lateral motion and as a result the velocity is reversed and causes a reduction in the position error.All other rules are interpreted in a similar fashion.

Simulation Results
The unmanned helicopter model used in the simulation platform is the Raptor-30 V2 RC helicopter.The Raptor-30 V2 is a highly maneuverable helicopter weighing 3 kg.The fuselage length is 1,150 mm and its width is approximately 140 mm.MATLAB and X-Plane are operated on two computers and the IP addresses and port numbers used for sending and receiving packets are 10.108.29.17 and 10.108.28.65 and 49000 and 49001, respectively.The overall flight control system implemented in Simulink, using the UDP interface that communicates with X-Plane, is shown in Figures 17(a) and 17(b).In the simulation, first the system was test under the ideal weather condition without wind and randomness and then a light turbulent weather of 10 knots (4.5 m/s) wind speed, 2 knots (0.9 m/s) shear speed, and level 3 turbulence was introduced.The details of the ideal and light turbulent weather conditions are shown in Figures 18(a The mean and standard deviations of the positions are (1.57+ 04, 749.63, −1.811 + 04) and (48.49, 55.02, 215.6630) cm, respectively, for ideal weather.The corresponding mean and standard deviations of hovering heading are (2.49,−0.28, 161.1) and (1.2, 1.26, 5.26) deg.The fuzzy control is able to control the Raptor-30 V2 unmanned helicopter to hover on this specific height as shown in Figure 19.
The mean and standard deviations of the positions are (1.52 + 04, 104.18, −1.831 + 04) and (42.49, 37.35, 217.6630) cm, respectively, for light turbulent weather.Fuzzy control is able to control the Raptor-30 V2 unmanned helicopter to hover and it is robust to operate in the real environment as shown in Figure 20.
When helicopter model hovers, the main rotors rotate and generate a moment which causes the rotation of body around the -axis.This moment is counteracted through the tail rotor by producing a force in the -axis (negative direction).This action accelerates the helicopter in the same direction, thus increasing the velocity in the same direction and causes the blades to flap positive lateral.When the   x ( c m ) y (c m ) lateral flapping becomes positive, this results in longitudinal flapping which becomes negative because of the crosscoupling.The lateral flapping also makes the helicopter rotate about the -axis ( becomes positive) and causes the velocity along -axis to become positive (V becomes positive).The negative longitudinal flapping causes the helicopter body to rotate negatively about -axis ( becomes negative) and thereby giving a positive translational velocity along -axis ( becomes positive).Figure 21 depicts this situation and Figure 22 shows the surface inputs to the helicopter model.As mentioned above, this fuzzy control scheme is tested using the X-Plane flight simulator model, which requires six degrees for its hover at initial levels.
Figure 23 portrays the fuzzy control response for attitude angles used in tracking the reference trajectories.Pitch and roll angles are oscillating in order to maintain these tracking signals.The oscillation of the yaw angle is due to the coupling between two inputs (collective and pedal).Figure 24 depicts the performance of proposed fuzzy two-loop controller with conventional PD control under light turbulent weather condition.The conventional PD performance observed significantly inferior compared to the fuzzy control.The flight results indicate that the fuzzy controller exhibits satisfactory behavior in the presence of light air turbulence.
Figure 25 shows a visual presentation of the X-Plane Rapter-30 V2 hovering using simple and robust fuzzy control.
Comment 1.It should be highlighted that the originality of this research work is the design of simple and efficient control systems for a small unmanned helicopter model Rapter-30 V2 using X-Plane flight simulator at hover.The simulation platform implements two computers with an autopilot system applied by the X-Plane model which is similar to a real rotorcraft, thus minimizing the damage risks and increasing the flexibility for on the spot design changes.Simplicity is achieved through SISO Mamdani controller         design.The Mamdani fuzzy approach is selected here instead of Takagi-Sugeno approach, because it permits the inclusion of experimental knowledge for the controller synthesis, which is available from the flight of the miniature helicopter by a human pilot.

Conclusion
This paper attempts to introduce a dynamical model of a small scale unmanned helicopter in detail.Using an expert knowledge and pilot-based experience, a stable inner-loop and outer-loop fuzzy control for attitude, height, and position were designed to control the direction, height, and translational motion of the small unmanned helicopter.The flight control system is implemented in MATLAB/Simulink in one computer and X-Plane helicopter model on second computer to investigate the performance of fuzzy control at hovering.The communication between two computers is done by UDP using Ethernet connection.To show the effectiveness of proposed two-loop controller, light turbulent weather was introduced.Simulation results clearly shown that proposed fuzzy control successfully achieved hovering control under ideal and mild turbulent weather.The satisfactory performance of fuzzy control compared to conventional PD design was attributed to the attenuated cross-coupling effects amongst the Raptor-30 V2 dynamics.The proposed controller was able to control the small Raptor-30 V2 at desired height while keeping stable direction.The simulation results shows that the unmanned helicopter tracks an imposed trajectory with good overall performance.The implementation of intense weather condition is the next objective of work.

Figure 13 :
Figure 13: Input and output Gaussian MF of height fuzzy control.

Figure 14 :
Figure 14: Signs definition of variables used in lateral and longitudinal motion.

Figure 16 :
Figure 16: Input and output Gaussian MF of longitudinal fuzzy control.

Figure 17 :
Figure 17: Overall system architecture in Simulink.

Figure 18 :
Figure 18: (a) Ideal weather settings in X-Plane; (b) light turbulent weather settings in X-Plane.

Figure 20 :
Figure 20: Hovering test result of the fuzzy control under light turbulent weather condition.

Figure 24 :
Figure 24: Hovering maneuver: reference position trajectory (black solid line) and actual position trajectory of the fuzzy (red solid line), PD (blue dashed line) controller with respect to the inertial axis.

Figure 26 :
Figure 26: Roll input and output MF.

Figure 28 :
Figure 28: Lateral position input and output MF.
Figure 19: Hovering test result of the fuzzy control under the ideal weather condition.