Interval Type-2 Fuzzy Sliding-Mode Control of Three-Axis Stabilization Gimbal

Aiming at the attitude control problem of three-axis stabilization gimbal, an algorithm combining interval type-2 fuzzy control and sliding-mode control was designed. Firstly, the mathematical model of the three-axis stabilization gimbal actuator was established after analyzing the mechanical structure of the three-axis stabilization gimbal. Then, a sliding-mode controller was designed based on the position ring of the actuator of three-axis stabilization gimbal. An interval type-2 control was used to reduce chattering in sliding-mode control. The switching function and its derivative are taken as the input of fuzzy control, and the rate of change of the approach law is taken as the output of fuzzy control. Fuzzy control can adjust the gain of sliding-mode surface dynamically, enhance the adaptability on external random disturbance, improve the speed of convergence and weaken chattering. The simulation results show that the output of the controller designed in this paper is more stable, and the tracking of the three-axis stabilization gimbal is more rapid and accurate.


I. INTRODUCTION
In recent years, with the rapid development of UAV (Unmanned Aerial Vehicle) technology and the characteristics of low cost, it is more and more widely used in the military, agriculture, film and television, remote sensing, electric power inspection, and other industries. In general, the UAV will carry different loads to accomplish the corresponding tasks, while the loads, such as cameras, often need to be rotated in all directions, which requires a platform to achieve such a function.
The stabilization gimbal is the carrier of the airborne load, which is used to isolate the attitude vibration of UAV, wind resistance, and other disturbances, so as to ensure the stability of the visual axis of the airborne camera. The key to whether the airborne camera of UAV can normally take high-quality images is that the camera's visual axis is stable relative to the ground. However, the control accuracy of the gimbal system is restricted by many nonlinear interference factors in the system. Firstly, the most strict interference factor is the change in load. The structure and function of the three-axis The associate editor coordinating the review of this manuscript and approving it for publication was Haibin Sun . stabilization gimbal determine that the center of gravity of the gimbal is not necessarily the geometric center of the gimbal. At the same time, due to the influence of gravity and other factors, the load of the pitching axis servo system will change as the pitching axis leaves the vertical axis. Secondly, the gimbal is also affected by wind resistance. The speed and direction of the wind resistance depend on the local speed and direction of a wind, as well as the direction and speed of the UAV. In addition, the control system of the gimbal is also affected by a series of disturbance factors, such as sensor noise, inter-axial coupling, friction moment disturbance and so on.
In order to reduce the influence of various interference factors on the stability of the gimbal and improve the accuracy of the gimbal, various classical or intelligent control algorithms have been applied to the control of the stable gimbal. At present, the classical control technology is still in the dominant position in the control of stabilization gimbal. Among the classical control methods, the PID algorithm has the longest history, the most extensive application, good control adaptability, and the algorithm is simple and can be implemented easily in engineering. It is also an algorithm that is widely used in the gimbal control [1]- [3].
The advantages of the PID algorithm are simple and easy to be implemented in engineering, but PID control is limited to a linear time-invariant system. For systems with a large range of type parameters and strong nonlinear, PID control is difficult to meet the control requirements of high precision and fast response. Modern control theory is a control theory based on the state space method. In modern control theory, the analysis and design of the control system are mainly carried out through the description of the state variables of the system. The basic method is the time-domain method. Many modern control methods such as adaptive control [4], [5], robust control [6], [7], optimal control [8], and other methods [9] have been applied in the control of the gimbal. Modern control theory uses different control methods for specific problems of the system, which can improve a certain performance index of the system. However, modern control needs to establish an accurate mathematical model of the controlled object, and the model parameters need a lot of complex fields debugging. Intelligent control is a combination of artificial intelligence and automatic control. Intelligent control mainly studies nonlinear, time-varying, uncertainty, and objects that are difficult to establish an accurate mathematical model. Therefore, some scholars have applied fuzzy control [9], [10], [12], neural network [13], [14], genetic algorithm [15], particle swarm optimization [16], [17], and other methods on the control of the gimbal. Intelligent control algorithm combined with the advantages of artificial intelligence can deal with many complex nonlinear problems. However, the control algorithm is also relatively complex at the same time. For the embedded system used by the gimbal, it is also difficult to achieve better practical results.
Sliding-mode control is a modern control method with high control precision and strong robustness to external interference and parameter perturbation of the system [18], [19]. However, the chattering on the sliding surface of the system limits its practical application on engineering greatly [20]. Fuzzy control is a model-free controller that does not depend on the precise model of the controlled object, and it has a good ability to deal with uncertainty [21]. Compared with type-1 fuzzy control, type-2 fuzzy control has a better ability to deal with uncertainty [22]- [25]. Combining sliding-mode control with fuzzy control, the parameters of sliding-mode control can be adjusted by fuzzy logic adaptively [26], which can reduce chattering and improve the performance of sliding-mode control greatly. In view of the disturbance factors and complex working environment of the three-axis gimbal, the sliding-mode control and the interval type-2 fuzzy control were combined in this paper. In order to compare the different control effects of the fuzzy sliding-mode control with PID control, some simulation experiment was implemented.
The first part of this paper introduces the application and research status of the airborne gimbal, the second part studies the structure of the three-axis gimbal, establishes the mathematical model of three-axis gimbal actuator, the third part designs the interval type-2 fuzzy sliding mode controller, and the fourth part gives the simulation results, the fifth part makes a conclusion of the full text.

II. MATHEMATICAL MODEL
The three-axis airborne stabilization gimbal is composed of three mutually perpendicular mechanical structures with three degrees of freedom. The three-axis airborne stabilization gimbal is a three-degree of freedom system composed of yaw axis, roll axis, and pitch axis. The yaw axis is the outer frame connected to the UAV; the roll axis is the middle frame, connecting the top and the bottom; the pitch axis is the inner frame used to mount the aerial camera. The structure of the three-axis airborne stabilization gimbal is shown in Figure 1. In Figure 1, the intersection of the three axes is the center of gravity of the three-axis airborne stabilization gimbal, which is used to fix the aerial camera. The center of gravity position is also used to mount MEMS sensors to capture the aerial camera's spatial attitude. The yaw axis is connected to the UAV through the base, and the pitching axis is directly fixed to the aerial camera. The pitch axis disturbance has the greatest impact on the aerial camera, followed by the rolling axis, and the yaw axis is the smallest. In order to minimize the impact of the UAV's shaking on the aerial camera, rubber shock absorbers were added between the base and the UAV.
When the attitude of the gimbal changes, the motor at the rotating joint will drive the frame of the gimbal to rotate, so as to offset the attitude change of the gimbal and make the visual axis of the camera and other equipment always pointing in the desired direction. This is the working principle of the gimbal.
The actuator used in the design of the gimbal is a brushless DC motor. In order to control the brushless DC motor more accurately, we need to establish a mathematical model of the brushless DC motor (BLDCM).
The structure of the brushless DC motor is the same as that of the PMSM, but the permanent magnet of the brushless DC motor is mounted on the rotor. Therefore, the dynamic characteristics of the rotor are different from that of a permanent VOLUME 8, 2020 magnet synchronous motor. The armature winding model of the brushless DC motor is shown in Figure 2 below.
In order to facilitate the research, the following assumptions are made for the brushless DC motor: 1. There is no damping winding on the rotor. The resistance and inductance of the three-phase stator winding are equal and distribute in a symmetrical starlike shape.
2. The magnetic circuit of the motor is not saturated. The distribution of the air gap magnetic field is sinusoidal and all harmonics is ignored. The distribution of induced electromotive force is also sinusoidal.
3. The equivalent excitation current of the permanent magnet is constant and does not change. The loss of the iron core and the tooth groove effect are ignored. No eddy current loss, hysteresis loss and armature reaction, temperature and frequency do not affect the motor parameters.
In the static three-phase coordinate system, the stator terminal voltage equation of brushless DC motor is: where µ a , µ b , µ c is the three-phase terminal voltage, i a , i b , i c is the three-phase stator current, R is the stator resistance of the three-phase winding A, B and C, L is the inductance of the three-phase winding, M is the mutual inductance of the three-phase winding, and E is the reverse electromotive force of the three-phase winding.
Assuming that the structural characteristics of the threephase windings are the same, the following relation can be obtained: By substituting equation (2) into equation (1) and ignoring mutual inductance, equation (3) can be obtained: Convert equation (3) to vector form: The above equation can be solved by using any numerical solution method (such as Runge-Kutta method). The solution of the reverse electromotive force can be obtained from the following equation: where, k e is the opposing electromotive force coefficient. The solution equation of electromagnetic moment is: where, k t is the electromagnetic torque coefficient. The sum moment generated by the three-phase winding is: Here, the value of T can be obtained from the following equation: Mechanical motion equation of rotor is: where, T L is the load torque, B is the damping coefficient of the motor, and J is the moment of inertia. Generally, the damping coefficient of brushless DC motor is relatively small and can be ignored. The above equation can be abbreviated as: Brushless DC motor also has the following inherent relationship: where ω is the electrical angular velocity, ω m is the mechanical Angle, and p is the logarithm of the pole of the motor. The circuit principle of three-phase brushless DC motor is shown in Figure3. Each phase of the three-phase circuit structure is 120 degrees apart. Because the three-phase circuit is described by a mathematical model with the sine function, it is not good for our system analysis and control, we need to simplify the mathematical model. The key to simplifying the mathematical model is to simplify the magnetic linkage relation of the motor. The principle of mutual equivalence between different motor models is that the magnetomotive force generated in different coordinate systems is exactly the same [27]. First, the model of the simplest DC motor is analyzed. In the figure below, the stator winding is on-axis d, the magnetomotive force is Fs, the rotor permanent magnet is onaxis q, and the magnetomotive force is F. The magnetomotive force varies by 90 • and the rotor rotates. Due to the action of the brush, the permanent magnetic of the rotor is always limited to the q-axis, which is equivalent to the effect of a static winding on the q-axis. While the three-phase stator winding, if the sinusoidal current with the three-phase frequency as, the resultant magnetomotive force generated is the rotating magnetomotive force F, the rotational angular velocity is ω. If the two-phase sinusoidal current with a phase difference of 90 • is applied to the two-phase static winding, and the two-phase rotating winding is applied to the DC, the same magnetomotive force F can be generated. Therefore, the model shown in the following three figures is equivalent.
Based on the above equivalent principle, the three-phase sinusoidal current can be simplified to a direct flow i q in a rotating coordinate system. In the case of constant amplitude transformation and i d = 0, we can get the equation u q = (R + L d /dt)i q + e q . Therefore, the mathematical model of the brushless DC motor can be simplified as the following figure:

III. DESIGN OF CONTROLLER
The three-axis gimbal actuator is the brushless DC motor, and we design the sliding-mode controller based on the position loop. Angle and angular velocity are selected as state quantities, and the mathematical model is written as state space as follows: The expected position of the system is defined as θ r , the position error is e = θ r -θ, the angular velocity error isė = θ r −θ , and the acceleration error isë =θ r −θ. according to the mathematical model, we get the following equation: Design switch function: Its derivative is: In order to ensure that the system can converge to the sliding surface in a limited time, the approach rate adopted in this paper is the exponential approach law, as shown in the following equation:ṡ = −εsgn(s) − ks (16) where sgn is the sign function and sgn(s) = s/(s + 5). VOLUME 8, 2020 Combine (15) and (16): By substitutingẋ 2 = − K T K e JR x 2 + K T JR u in the state space expression into the above equation, the design result of the sliding-mode variable structure controller is obtained as follows: where, J = 3.84 × 10 −3 N · m · s 2 , R=8.24 , K T = 2.167V /rad·s −1 , K E = 0.197V /rad·s −1 . J , R, K T , K E are the parameters of DYS-4108-130T BLDC motor. The Lyapunov method was used to analyze the stability of the system, and the function of the Lyapunov method was constructed: Take the derivative and combine equation (16), the following equation can be obtained: where, ε, k is the parameter to be designed, whose values are all greater than zero. It can be seen from the above formula that when the system state trajectory reaches the sliding mode surface s(x) = 0,V < 0 is always true. According to Lyapunov stability criterion, the whole system is globally asymptotically stable, and the system state trajectory can reach the sliding-mode surface in a limited time.
The sliding-mode controller of the gimbal has been designed here, but the chattering phenomenon still exists in the sliding-mode control, which affects the practical engineering application of the control method [28], [29]. Chattering is one of the most common obstacles in the application of sliding-mode control [30]. Chattering in sliding-mode systems is usually caused by unmodeled dynamics with a small time constant, which is often neglected in the application of ideal model and finite sampling rate digital controllers, resulting in discretized chattering. Theoretically, the ideal sliding-mode means an infinite switching frequency. Since the control is constant in the sampling interval, the switching frequency cannot exceed the sampling frequency, which also results in chattering. From the control engineer's point of view, chattering is undesirable because it often leads to inaccurate control, high circuit heat loss, and high wear and tears on moving mechanical parts. In addition, chattering may stimulate unmodeled higher-order dynamics, which may lead to unpredictable instability. Therefore, in order to apply sliding-mode control into engineering practice, the chattering problem must be eliminated.
In this paper, a type-2 fuzzy system is used to solve the chattering problem of sliding-mode control. Type-2 fuzzy system is a hot topic in recent years. Compared with type-1 fuzzy system, type-2 fuzzy system has many advantages. The membership function of type-1 fuzzy controller is a type-1 fuzzy set, which cannot directly deal with the uncertainty of rules. However, this kind of uncertainty can be dealt with by type-2 fuzzy logic, because type-2 fuzzy logic can model the fuzziness and unreliability of information, providing a better ability to deal with language uncertainty [31]. In control applications, high uncertainty means that there is noise in the control process, mainly due to changes in the application environment or information transmission (such as a feedback process in the control loop). Of course, there is always a degree of uncertainty in the system, but if the degree of uncertainty is low, then type-1 fuzzy logic may be sufficient to handle it. However, in many practical situations, noise or complex and changeable environment often have high uncertainty, and type-2 fuzzy logic can better deal with this kind of uncertainty. The concept of type-2 fuzzy set is introduced by Zadeh, which is an extension of the concept of general fuzzy set (type-1 fuzzy set), that is, the membership degree of type-2 fuzzy set itself is fuzzy [32]- [34].
In order to reduce the influence of chattering, the interval two fuzzy logic system is selected to adjust the approach rate of sliding mode control to make the control signal smooth.
In the exponential approach rate, ε represents the rate at which the system state approaches the switching surface. And the magnitude of ε is proportional to the velocity of the approaching motion. The ε is bigger, the speed will be higher when the moving point reaches the switching surface, and the chattering will be greater. On the contrary, the ε is smaller, the approach speed is the slower, and the chattering is smaller. Fuzzy logic is used to adjust the size of parameter ε adaptively. When the state trajectory is far from the sliding-mode surface, the value of ε increases, so the system approach the sliding-mode surface more quickly. When the state trajectory approaches the sliding-mode surface, the value of ε is reduced, thus reducing the chattering caused.
After the combination of sliding-mode variable structure control and fuzzy control, the system structure is shown in the figure7. The input of the fuzzy controller is selected as the switching function s and its derivativeṡ. After passing through the fuzzy logic system, the rate of change of the approach rate gain of the sliding mode controller is generated. Fuzzy control system is a system based on knowledge and rules. Its core component is the knowledge base on IF-THEN rules. Fuzzy control algorithm is an intelligent control algorithm based on fuzzy set theory, fuzzy language variables and fuzzy logic inference. It imitates human beings' thought employing fuzzy sets, fuzzy relations, and fuzzy inference. It can make logical judgment, comprehensive inference, and deal with and solve problems that are difficult to be solved effectively by conventional methods. Fuzzy control algorithm absorbs the characteristics of fuzziness in human thought. The components of fuzzy control system mainly include fuzzifier, rules, inference and defuzzifier [35], [36]. In adition, the type-2 fuzzy system adopts the type-2 fuzzy set, and the system also includes type reducer. The structure of the type-2 fuzzy system is shown in the figure 8 [37], [38]. The T-S interval type-2 fuzzy controller is selected for the fuzzy controller, that is, the front parameter of the fuzzy system is the interval type-2 fuzzy set, and the back parameter is the real number. The input of the fuzzy controller is S and its derivativeṡ, assuming that the values mapped to the theoretical domain of the interval type-2 fuzzy set are S and S, then For the input variables, two interval type-2 fuzzy sets are defined, which are ''positive (P)'' and ''negative (N)'' respectively, and their membership functions are shown in the figure 9. The upper bound and lower bound membership functions of the input variables s are respectively: The upper bound and lower bound membership functions of the input variables S are respectively: where, α 1 , α 2 , α 3 , α 4 , β 1 , β 2 , β 3 , β 4 is an adjustable parameter. After debugging, the parameter selected in this paper is: The back parameter of the fuzzy system is defined as a real number, and when the back parameter is positive (P), ε = α; When the back parameter is zero (Z), ε = 0; When the back parameter is negative (P), ε = −α. Here, α is the parameter to be designed.
At this point, the corresponding fuzzy rules are designed as follows: KM algorithm is selected as the descending algorithm of interval type-2 fuzzy system. The fuzzy system output ε is the gain variable of the approach rate of sliding-mode control to adaptively adjust the parameters of the sliding-mode controller.
KM is an iterative algorithm and also the most basic typereduction method. The KM iterative type reduction method can obtain the most accurate type-reduction result under the current fuzzy inference. The result of type-reduction of interval two fuzzy sets is a fuzzy set of type one. The key point of the type-reduction is to find the boundary points VOLUME 8, 2020 of the type-1 fuzzy set of the result of type-reduction. The KM type-reduction method realizes this process by iterative algorithm [39].
The final result of type-reduction of interval type-2 fuzzy sets is defined as real interval [c l , c r ]. The calculation formulas of the two endpoints are as follows [40]: where,f (x i ) and f (x i ) are respectively the upper and lower limits of the membership function. L and R are the left and right switching points obtained by KM algorithm respectively.
The process of calculating c l by KM algorithm is shown as follows: (a) Take x i (i = 1 . . . , N) in order from smallest to largest. Similarly, the upper and lower limits of the membership function of x i are also arranged in the corresponding order.
(b) Initialize: Calculate: (c) From 1 to N, look for L so that X L , y < X L+1 is true. (d) Calculate: (e) If y = y , the algorithm ends, c l = y . Otherwise, set y = y and go to step (c).
The calculation process of c r is similar to that of c l . The method is to change the upper and lower membership functions of the corresponding part.

IV. THE SIMULATION RESULTS
Firstly, according to the control input designed by (20), the parameters of the sliding-mode controller finally designed by simulation test are C = 200, K = 100, ε = 10. In order to compare the control effect of sliding-mode control and PID control, a classical PID controller is designed. The parameters of PID controller are Kp=18, Ki=1, Kd=0.5. The input u of controller is limited to ±12.
The simulation results in figure 10 shows the simulation results that both PID and sliding-mode control can respond to the step signal at a faster speed. In addition, it can also be seen from the debugging process of the simulation experiment that PID control has a certain contradiction between the response speed of system and overshoot, so it is difficult to achieve the control performance of fast response and no overshoot at the same time.
Considering the uncertainty of the model, parameter perturbation and external disturbance, the robustness of the system is verified. Firstly, the system was kept in the initial state, and the random interference moment within the range of -0.5∼ 0.5Nm was added to the system. The simulation results are shown in Figure 11.  It can be seen from the simulation results that the slidingmode control can better restrain the influence of torque disturbance on the system. Compared with PID control, the position error of the system is smaller and the system has stronger robustness with external interference.
In addition to external interference, system model parameters will change over time due to aging of system components and load changes.
In order to verify the robustness of the controller designed with the change of system parameters, the moment of inertia of the actuator was set as twice as the original. The position error simulation results are shown in Figure 12 after testing the control effect of the controller. From the simulation results, we can see that when the moment of inertia of the motor is set to 2 times of the initial value, the position error of PID control increases obviously, while the position error of sliding-mode control basically remains unchanged. Therefore, sliding-mode control can suppress the influence of parameter perturbation on the system.
The reference input of the given expected angle is sinusoidal signal, with amplitude A=0.5 and frequency of 1Hz. The control simulation results of the whole position loop are shown in Figure 13 to 15.  , we can see that the position response curve of sliding-mode control is closer to the expected position curve, and the position error is smaller. However, the state trajectory is not very smooth in some areas, there will be some mutation leading to chattering. In addition, compared with PID control, the control output of sliding-mode control is also larger.
To solve the chattering phenomenon of sliding-mode control, the interval fuzzy-2 controller is used to adjust its parameters. The control effect of traditional sliding-mode control and interval type-2 fuzzy sliding mode control is compared. The results are shown in Figure 16 to 17.   In order to verify its effect, first, the reference input was set as a sinusoidal tracking signal with a fixed amplitude of A=0.5rad and a frequency of 1Hz.
It can be seen from the simulation results of tracking sinusoidal signal that compared with the traditional sliding -mode control, the interval type-2 fuzzy sliding-mode controller still has better tracking performance and keeps a small tracking error, but the chattering effect of its control rate is obviously reduced.
To verify the suppression effect of the controller designed with external disturbance and parameter perturbation, we add −0.5∼0.5Nm random disturbance moment to the system VOLUME 8, 2020   The results show that the position error of the interval type-2 fuzzy sliding-mode control and the traditional fuzzy control is small after the addition of the random disturbing moment, and the position error of the interval type-2 fuzzy controller is basically consistent before and after the change of system parameters.

V. CONCLUSION
Aiming at the attitude control problem of three-axis stabilization gimbal, the mathematical model of three-axis gimbal actuator was established in this paper. Then, a sliding-mode controller is designed based on the position ring of the three-axis stabilization gimbal actuator. Aiming at the chattering phenomenon in sliding-mode control, the interval type-2 fuzzy control is combined with sliding-mode control to adjust the gain of sliding-mode surface dynamically. The simulation results show that the sliding-mode control method has better robustness on external interference and system parameter perturbation than the PID control method. Interval type-2 fuzzy control can adjust the parameters of sliding-mode controller adaptably and suppress chattering of sliding-mode control.