A method to solve the problem of low precision of micro stabilized platform caused by frame coupling - Based on Fuzzy PID

. Aiming at the problem of low control efficiency of small stable platform due to frame coupling, an intelligent control algorithm (fuzzy-PID) combining fuzzy controller with traditional PID is designed. The fuzzy PID controller is added to the position closed loop of the stable platform control system, and the motor position signal is collected and analyzed. Compared with the traditional PID control algorithm, the fuzzy PID control algorithm has the advantages of small overshoot, high control precision and strong anti-interference ability. The simulation test in Simulink environment shows that the overshoot of the system is reduced under the algorithm (cid:2) , which can be controlled within 1% and the adjusting time t is controlled within 0.5s, which can realize the stable control of the yaw angle, pitch angle and roll angle of the stabilized platform.


Introduction
Attitude control is the most important part of the stable platform control system, and the motor position control accuracy will directly affect the stable platform's attitude control accuracy, which is related to the stable platform's operating quality [1] . In reality, the control system is not an ideal linear system model, and it is difficult to complete the establishment of mathematical model. Traditional PID algorithms mostly rely on empirical adjustment methods for debugging, and the control parameter correction effect is not ideal. For complex nonlinear systems, the fuzzy control intelligent algorithm can realize fast tuning of control parameters [2] .
Aiming at the problem of low control accuracy of the micro-small stable platform due to frame coupling, this paper proposes a fuzzy control algorithm that can quickly overcome external interference and self-frame coupling errors to achieve the purpose of highprecision control.

Overall design 2.1 Operating principle of stabilized platform
The control system of the micro three-axis stable platform is composed of two parts: the attitude detection unit and the attitude calculation and control unit. The principle block diagram of the control system is shown in Figure 1. The attitude detection unit has built-in complementary filtering and Kalman filtering algorithms, which can realize multi-sensor high-precision data fusion, and convert the original data of the gyroscope and accelerometer into the Euler angles in the inertial system, namely the pitch angle, roll angle and heading angle. The fuzzy PID control algorithm is added to the attitude calculation and control unit to make the platform stable. STM32 is used as the main controller of the attitude detection unit. Its main function is to collect nine axis raw data of inertial devices such as three-axis MEMS gyroscope ADXR620, three-axis accelerometer ADXL203 and three-axis magnetometer HM5089, and to carry out analog-to-digital signal conversion and data processing through ADC.
The attitude calculation and power control unit takes the attitude angle as the input, uses the fuzzy PID algorithm to calculate the angle control increment, and transmits the angle value to the digital steering gear through RS485 bus. After the steering gear rotates reversely, the stable platform returns to the initial position, so as to realize the self stability function of the platform.

Motor model establishment
According to the working principle of the stable platform, each part is simplified into the form of transfer function, and the principle block diagram as shown in Figure 2 is obtained. Among them, p G is the correction function of position loop fuzzy PID controller, v G is the correction function of speed loop PID controller, pwm K is the amplification factor of driver, The angular rate of the gyroscope is used as the feedback of the velocity loop, and the attitude angle output by the inertial measurement unit provides the motor target position for the position loop. The servo DC motor is selected as the system power, and the transfer function is: where: a R and a L are the resistance and inductance of motor armature circuit respectively; d s dt , as the operator in the formula.

Three-axis frame coupling analysis
The analysis of the frame coupling problem of the stabilized platform and the optimization design of the control system based on Fuzzy PID are the main problems to be solved in this paper [3] . The motion of the stabilized platform is affected by the coupling of the inner frame, the middle frame and the outer frame. Next, through the establishment of vector equation of angular velocity of carrier and frame to analyze the influence factors of carrier motion. Firstly, in the inertial coordinate system, the formula (2) is the vector equation of carrier angular velocity placed on the inner frame: In the same way, the angular velocity vector equations of the outer frame, middle frame and inner frame of the stable platform are respectively.
The angular velocity of the outer frame, middle frame, and inner frame of the stable platform is composed of the angular component in the carrier coordinate system and the rotational angular velocity in its own coordinate system. Let ( ) respectively. The rotational angular velocity of the outer frame, middle frame and inner frame in its own coordinate system can be derived: where: R t are the coordinate system rotation transformation matrix. Through the above analysis, it can be concluded that the coupling between the threeaxis stable platform shaft system has a great influence on the accuracy of the control system. In order to solve the problem of low control accuracy caused by frame coupling, a fuzzy PID controller is established to realize rapid and real-time correction of PID control parameters. Improve the control accuracy of the three-axis stable platform. Figure 3 shows the overall control block diagram of the miniature three-axis stabilized platform. The gyroscope provides angular rate information and feeds it back to the speed controller to correct and stabilize the platform's interference signal. At the same time, the output angle rate of the gyroscope is integrated once to obtain the angle information, which is fed back to the position controller to form a position-speed double closed-loop control system.

Data fuzzification and rule design
The fuzzy PID controller can improve the control precision of the position loop in the stable platform operation process. The closed-loop system error e and its error rate ec are the input variables, and the three parameters p K , i K and d K of PID are the output variables. Considering that the control target is the motor position signal, the universe of error e and error rate ec is taken as > @ (1) When e is larger and ec is larger, in order to make the system have better tracking performance, increase the ratio coefficient p K , the system response speed is accelerated, thus reducing the position error; (2) When e decreases gradually, the integral coefficient i K is increased, and the integral plays a role in reducing the steady-state error of motor position; (3) When ec changes greatly, the purpose of reducing ec value can be achieved by adding differential coefficient d K [4] . The input signal can be fuzzed by using the nonlinear transformation method shown in equation (5)  The input signal has strong random measurement noise. In order to reduce the influence of random measurement noise on the fuzzy controller, the triangular membership function can be selected as the membership design rule of fuzzy PID controller. Its function is expressed as: After the triangular membership function is selected, 49 control rules are established to detect and calculate the output signal of the control system in real time, and obtain the fuzzy set ' U of the output.
where in u is the fuzzy set of input signal; out u is the fuzzy set of output signals; R has 49 fuzzy control rules.

Output variable clarity
The control input e and its change rate ec at each sampling time are fuzzified, and the corresponding fuzzy outputs p K , i K and d K can be obtained through fuzzy reasoning and clarification. Taking p K as an example, the centroid method is used to calculate the clear value of the fuzzy set ' U of the output variable.
It can be seen that p K , i K and d K are transformed from constant to variable after being processed by fuzzy PID controller, which has the characteristics of real-time correction and regulation.

System debugging and analysis
The fuzzy PID control algorithm is added to the control board program of the micro threeaxis stable platform, and the control performance of the fuzzy PID control algorithm is compared with that of the classical PID control algorithm. Inner frame motor 60 for the target position, the two control algorithms are debugged to the optimal state. The motor position data is collected and processed, and the curve of motor position changing with time is obtained as shown in Figure 4. It can be obtained from Figure 4 that when the stable platform receives the same control signal, the time it takes for the motor position to reach the target position of 60° is: the adjustment time t is 0.75 s using the classical PID algorithm, and the time t is adjusted using the fuzzy PID control algorithm 0.41s. Compared with the classical PID algorithm, the fuzzy PID control algorithm optimizes the transition time by 54%. Under the classic PID algorithm, the system overshoot V is 28%. Under the fuzzy PID control algorithm, the system overshoot V is 0.5%.
The experiment shows that fuzzy PID parameter control algorithm can make the stable platform motor position reach the target value in the fastest time, the system overshoot can be controlled within 0.5%, and the adjustment time can be controlled within 1s.

Conclusion
A fuzzy PID parameter control algorithm is designed to improve the stability of the control system of the micro three-axis stabilized platform. The experiment proves that the fuzzy PID parameter control algorithm has better dynamic performance and anti-interference ability than the classic PID algorithm, and can effectively resist the external interference signal and the frame coupling influence of the three-axis stable platform itself.