Outdoor altitude stabilization of QuadRotor based on type-2 fuzzy and fuzzy PID

This paper presents a design of altitude stabilization of QuadRotor based on type-2 fuzzy and fuzzy PID. This practical design is implemented outdoor. Barometric and sonar sensor were used in this experiment as an input for the controller YoHe. The throttle signal as a control input was provided by the controller to leveling QuadRotor in particular altitude and known well as altitude stabilization. The parameter of type-2 fuzzy and fuzzy PID was tuned in several heights to get the best control parameter for any height. Type-2 fuzzy produced better result than fuzzy PID but had a slow response in the beginning.


Introduction
Nowadays, research about QuadRotor as a lightweight transportation becomes famous. QuadRotor with Vertical Take-Off and Landing (VTOL) ability, make QuadRotor can cooperate with Automated Guided Vehicle (AGV) in Dynamical Cellular Manufacturing System (DCMS) as a part transporter in ways to keep part into some height level storage.
The QuadRotor has four swings with four propellers and also four motors. The QuadRotor with four propellers has three axes: pitch, roll, and yaw by changing the speed of four propellers [1]. There are main components of the QuadRotor. They are X-frame, four propellers, four brushless dc motors, four Electronic Speed Controller (ESC), flight controller, and battery as energy supply. There are several considerations for choosing a specification of components to adjust to the frame. The RX module connects to flight controller to receive signals from TX remote control. Alternatively, if this is an autonomous QuadRotor, the input of the flight controller is from the sensors, such as an ultrasonic sensor, barometric sensor, or camera. That kind of sensors is usually used for measuring an altitude of the QuadRotor.
Currently, there are commercial QuadRotors such as a Phantom and AR-Drone. They have many features on their platform, i.e. localization using GPS data. AR-Drone is used as a platform to investigate the functional of fuzzy logic for trajectory tracking [2]. In this experiment, they used AR Drone because it already has onboard electronics with low price and also provides support for access with mathematic tools. According to [2], AR-Drone makes it simple to compare two fuzzy logic controller scheme performance for position tracking [3]. They investigated the system of fuzzy logic controller for handling AR-Drone moves efficiently.
There are also some researchers who also investigated QuadRotor field from scratch. They used parts of QuadRotor from the market and assembled it into QuadRotor. From our knowledge, there are two studies focusing on developing QuadRotor from scratch. The first is research about QuadRotor attitude. This research focuses on flight controller development because QuadRotor attitude is an essential control for maneuver. Desa designed hybrid control from the fuzzy controller and PID control for attitude stabilization based on Matlab simulation [4]. Rinaldi et al. compared PID and Linear Quadratic Regulation control performance to get the best control of attitude regulation of QuadRotor. Besides conducting the simulation, they also built a physical prototype for an experimental test, but only for one degree of freedom [5].Overall, LQ Regulation is better than traditional control PID because LQ Regulation has a special ability that can directly calibrate the references tracking error and oversight actions. By using QuadRotor test bed one degree of freedom, Wicaksono also conducted and compared T1-fuzzy (type-1 fuzzy) with T2-Fuzzy (type-2 fuzzy) with an objective to perform autonomous hover when the payload has changed before flight or during flight [6]. They concluded that the control of flight controller needs a calibration first if we put some additional payload like camera.
In 2013, Guerrero developed attitude stabilization using nonlinear control with event-triggering function [7]. They also used the real QuadRotor for experimentation. Gonzales proposed a control scheme for altitude stabilization using motor speed feedback [8]. The basic control here is a PD control but with motor speed feedback analysis as the main input of their control scheme idea.
The second focus on QuadRotor field is altitude stabilization. The altitude stabilization is needed for hover act. This feature will help user who handles a QuadRotor by remote control and also for autonomous QuadRotor. There are some sensors as input to measure the altitude of QuadRotor hover mode, such as ultrasonic sensor, barometric sensor, and camera (image sensor). Pah developed the altitude measurement using a camera. For the experiment environment, he simulated a movement QuadRotor by using moveable platform completed with a Livecam 8-bit RGB and the landscape print out in the paper [9]. In 2013, Fatan developed an adaptive neuro-PID for controlling QuadRotor altitude. PID was tuned by an output of the neural network. First parameters contained a starting constant then were changed by an output of the neural network. In this research, he used a simulation which produced the sinusoidal path that reflected the real condition of QuadRotor [10].
Since 2014, author research has focused on QuadRotor altitude control for subsequent studies based on real applications which are already published in several publications. In previous work, the research started from developing the fuzzy logic scheme for QuadRotor altitude controller. An ultrasonic sensor worked from 1 up to 4 meters only. Experiments were conducted with indoor environment and with the real QuadRotor. The best result of optimizing all parts of fuzzy controller scheme is 7 cm of flight oscillation around the desired height 100 cm or about 7% oscillation (local publications). Because of limitation of the ultrasonic sensor (only up to 4 meters), the barometric sensor MS5611-01BA03 is used as a replacement for an input system. The barometric sensor produces a noise together with data measurement. Analysis of sonar and the barometric sensor for altitude hold mode was published in [11].
Type-2 fuzzy can solve a higher nonlinear system. Type-2 fuzzy has a structure to handle uncertainty and an imprecision better than a type-1 fuzzy (traditional fuzzy).There are some schemes for type-2 fuzzy. In this paper, we developed fast geometric type-2 fuzzy. The best result for QuadRotor altitude lock using a barometric sensor is 16% of oscillation [12]. In order to get the best framework for QuadRotor altitude lock especially in the indoor environment, performance comparison between the fuzzy controller and fuzzy-PID was published. The experiments used same QuadRotor, and battery capacity. The best parameters of each controller and also the same situation were identified during testing [13]. The difference between indoor and outdoor environments lies on wind disturbances. In an outdoor setting, we faced soft wind as disturbance. Three controller schemes had a good performance without disruption. Simulation of disturbance was done by moving the left and right extremely in an indoor environment. The benchmarking of type-1 fuzzy, type-2 fuzzy and fuzzy-PID has resulted that there are critical parameters for handling disturbance. First is the response for getting back to the desired altitude. Second are the minimized oscillations after getting back to the desired altitude. The best result is shown from type1 fuzzy for getting back to the desired altitude. The best result of minimized oscillations is produced from type2 fuzzy scheme [14]. Hence, this paper has two main objectives. First, it provides controllers design: type-2 fuzzy and fuzzy PID controller. Second, it provides the comparison of performance of both controllers. The rest of this paper is organized as follows. In Section 2, we provide a short explanation about QuadRotor system configuration. Then we explain controller design starting from type-2 fuzzy and continue to fuzzy PID in Section 3. Our experimental results and discussions are given in Section 4. Finally, the summary is provided in Section 5.

QuadRotor system configuration
Our QuadRotor used in this research was built from scratch. We used Whirlwind FY450 as a frame, four brushless motors Sunny Sky X2212 with 980kV, four blades 10 x 4.7 were propellers installed on BLDC motors, and we also used ZTW Spider 30A as an Electronic Speed Controller (ESC). For flight controller, we used low-cost flight controller KK2.0. Due to space limitation, we did not present the detailed wiring and block connection in this paper.

Controller design
With the type-2 fuzzy control structure, we guessed and made a hypothesis about the performance of type-2 fuzzy that it will handle uncertainty phenomenon in an outdoor environment better than fuzzy PID, but type-2 fuzzy has more calculation process than fuzzy PID that might make type-2 fuzzy worse than fuzzy PID especially for real-time processing. So, in this paper we designed a type-2 fuzzy and fuzzy PID separately, then tuned until the best performance could be reached, and compared the oscillation error and the responses after getting the disturbances.
We created a YoHe board for realizing our control design which was programmed using C++ language. The YoHe board recognized the height or altitude of QuadRotor time by time using the sonar sensor SRF-05 and the barometric sensors BMP085. The controller board produced a PWM signal as an output to the KK2.0 flight controller. For altitude stabilization purpose, we only controlled the throttle signal. In other words, we manipulated and processed the throttle signal from TX remote control before going to the flight controller. There is a stick/button in TX remote control to activate and deactivated auto mode (altitude stabilization mode).

Type-2 fuzzy controller
First of all, we introduce the type-2 fuzzy control process as seen in Figure 1. There are two ways to decide the desired height. It can run manually through the program or get the last height before the auto mode turn ON. So, while auto mode is ON, the controller will keep the altitude of QuadRotor closely possible with the desired height. From many schemes of type-2 fuzzy, fast geometric defuzzification method is suitable for real-time applications without losing many features. A type-1 fuzzy or traditional fuzzy only has a 1-dimentional degree of the membership function. However, type-2 fuzzy has a 2-dimentional degree of the membership function. The clear explanation is seen in Figure 3 and Figure 4.We know the basic of fast geometric defuzzification which divides the membership function areas into five areas. Detailed calculation of type-2 fuzzy defuzzification can be figured from [15], [12]. In Figure 5, we can see one of an output fuzzy set looks.Before deciding a value of each membership functions of type-2 fuzzy, the behavior of QuadRotor learned through controlling QuadRotor using R/C and analysis of the flight data. With our expertise, we decided rule tables and initial values of two Inputs Membership Function (IMFs) and values of an Output Membership Function (OMF). We only focused on both of IMF and OMF in the optimization process. The optimal rules tables is shown in Figure 6 and the final values of Error IMF, Delta Error IMF, and OMF is shown in Figure 7

Fuzzy PID controller
PID controller was designed in the previous work. The big difficulty of PID controller is on parameter tuning process, and also one set of PID parameters (Kp, Ki, and Kd) only suits for one or two levels of altitude. Those problems raised the idea to combine PID controller with fuzzy that can have ability for automatic tuning while the altitude changes. The structure of fuzzy PID control process is shown in Figure 2. Fuzzy PID has two IMFs: Error IMF ( Figure 10) and Delta Error IMF (Figure 11). With the purpose of fuzzy PID mentioned above, the OMF of this controller has three OMFs: OMF for Delta Kp, Delta Ki, and Delta Kdas seen in Figure 12, Figure 13, and Figure 14.            Figure 13. OMF for Delta Ki. Figure 14. OMF for Delta Kd.

Experimental results and discussion
We chose the location for our experiments outdoor ( Figure 15) starting from 01:00 pm until 04:00 pm.
In these hours, we were able to obtain a medium wind speed. We used QuadRotor as shown in Figure  16. In this paper, because of space limitation, we provided only one experiment for several levels of altitude. Type-2 fuzzy results are illustrated in Figure 17, Figure 19, and Figure 21 for 250 cm, 300 cm, and 350 cm height, respectively. Then results of fuzzy PID are shown in Figure 18, Figure 20, and Figure 22 also for three height levels same with type-2 fuzzy.      We obtained oscillation around 40-50 cm for type-2 fuzzy and 90-110 cm for fuzzy PID. If we compare one to another in the same altitude, the oscillation due to fuzzy PID controller is greater almost two times as type-2 fuzzy. If we apply a moving average line for both controllers, we can see that the fuzzy PID controller responses always follow the Barometric sensor. However, type-2 fuzzy could solve the fluctuating values of the measurement.

Conclusion
Firstly, type-2 fuzzy and fuzzy PID controller design can be applied on non-commercial QuadRotor in an outdoor environment. Secondly, from several experiments results, we can conclude that type-2 fuzzy can handle well the fluctuating Barometric sensor values, which is in line with our hypothesis. Therefore, type-2 fuzzy which has three-dimensional membership functions is suitable for an outdoor application.