Modeling and Simulation of Ship-Borne Weapon Stabilization System Based On Double Position Loop Control

In order to solve the problem of increasing system cost and low control accuracy by adding gyroscope or inertial navigation system, a dual position loop control ship-borne stabilization system is proposed in the paper. The mathematical model is established to analyze the influence of ship rolling factors on the space pointing of single position loop weapon system. On this basis, the control strategy of double position loop is proposed, and the simulation structure and control method of inner position loop and double position loop are described respectively. The simulation results show that the method can isolate the factors of ship rolling, realize the closed-loop stabilization control of weapon system in geodetic coordinate without adding system hardware cost, and have good control effect as well.


Introduction
Shipborne weapons loaded on the ship, due to the influence of waves or wind and other factors, will produce a certain range of swing and shaking, so that the firing line of the weapon system deviates from the original space direction with the swing of the ship. The control system which can isolate the ship's swing factor and keep the firing line pointing in space is called the shipborne weapon stabilization system. The general solution is to increase the rate gyroscope on the basis of the original servo system, or to increase the strap down inertial navigation system in the direction parallel to the firing line [1]. These methods will greatly increase the hardware cost of the system. What's more important is that the system control accuracy is not high due to the drift factors of the gyroscope or inertial navigation system itself, and the high-low azimuth coupling motion cannot be avoided. Without adding servo system hardware, this paper proposes a dual position loop control system for shipborne weapon stabilization, which is based on the existing weapon servo system and the ships own attitude information. The inner position control loop is based on the ship's coordinate system to realize the rapid coordination and tracking of the system in the ship's coordinate system, and the outer position control loop is based on the geodetic coordinate system [2]. The control is used to isolate the ITME 2021 Journal of Physics: Conference Series 2066 (2021) 012107 IOP Publishing doi:10.1088/1742-6596/2066/1/012107 2 factors of ship sway and decouple the position control of high and low azimuth, so as to realize the fast and accurate control of the system in the geodetic coordinate system.

Defining Coordinate System
Due to the influence of wind, wave, current and many other factors on the sea surface, the ship will have a more complex motion. Generally, this motion has six degrees of freedom, namely three directions of translation motion and three directions of swing motion. In the geodetic coordinate system, the translational motion in three directions can be described by its three spatial coordinates, i.e. x, y and z, and the rolling motion in three directions can be described by the ship's attitude angles in three directions, i.e. heading angle, rolling angle and pitching angle [3]. Due to the low velocity of the ship, the distance of translation motion is a small order of magnitude relative to the target distance, so the influence of translation motion on shooting can be ignored, and only the influence of rolling motion is considered, that is, only the influence of heading angle h, rolling angle R and pitch angle P is considered, and the coordinate system is established on this basis [4].
is defined as geodetic coordinate system, in which axis is pointing to north, axis is pointing to East, axis is vertical upward, and geodetic coordinate system is shown in 0 OZ Figure 1. When the bow direction and the north direction do not coincide, and the pitch and roll are both zero, the coordinate system will rotate h clockwise with as the rotation axis to Z O obtain the coordinate system. The coordinate system is called the heading coordinate system, and the heading coordinate system is shown in Figure 2.  and axis is pointing forward to the right side of the ship body. As shown in Figure 3, the OY c transformation from the course coordinate system to the ship body coordinate system can be divided into two steps: first rotating pitch and then rotating roll. The transformation from the ship body coordinate system to the course coordinate system is the inverse transformation of the process, which is rotating roll and then rotating pitch, as shown in Figure 4.

Transformation of Ship Body Coordinate System into Heading Coordinate System
Assume is the azimuth of the firing line in the ship body coordinate system, that is, the angle A C between the projection of the barrel on the deck plane and the bow direction (clockwise around the yaxis is the positive direction), and is the high and low angle of the firing line in the ship body E C coordinate system, that is, the angle between the projection of the barrel on the deck plane and the barrel itself (clockwise around the z-axis is the positive direction), Then the coordinate of the unit vector determined by in the ship body coordinate system is: cos cos cos sin The transformation of ship body coordinate system into course coordinate system is the inverse process of the transformation of course coordinate system into ship body coordinate system, which contains two steps: The first step is rolling transformation: as shown in Fig. 4 Step 2: pitch Transformation: as shown in Fig. 4 , , * , , * sin sin cos cos sin sin cos sin cos cos Therefore, the parameters of the firing line in the heading coordinate system are as follows: The data of firing line in geodetic coordinate system are as follows:

Position Inner Loop Servo System
The high and low azimuth systems of the position inner loop servo system are all realized by the permanent magnet synchronous motor AC servo system [5]. The system adopts the typical three loop control structure of position loop, speed loop and current loop. The structure diagram of the position inner loop servo system is shown in Figure 5.   Figure 6 (a) is the simplified control structure diagram of the position servo system. For the convenience of analysis, the speed loop, current loop, reducer and load are equivalent to a speed inertia link, which is the controlled object. Therefore, the control structure of the system is simplified to a position servo system composed of a position regulator and a controlled object, which is the unit position loop servo system [6]. The dynamic structure diagram of position servo system is shown in Fig. 6 (b). In order to improve the dynamic and static performance of the system, the compound control of feedback and feedforward is adopted.
In a system, the output of the position regulator, that is, the input master command of the speed loop, is -10V~+10V, and the maximum speed of the high and low direction executive motor is , If the small time constant of the high and low system is 0.045s, the small time constant of the azimuth system is 0.052s, the deceleration ratio of the system reducer is 280, and the system output unit is (milliradian), the transfer function of the position regulator of the high and low ( ) C S mrad system is , the transfer function of the speed inertia link is , and the proportional   tracking accuracy, the transfer function of the position regulator of the high and low system is as follows: According to the invariable principle of feedforward disturbance, the transfer function of azimuth feedforward is as follows: The transfer function of azimuth position regulator is as follows: The above is the control algorithm of the high and low azimuth system in the linear region. For the control in the nonlinear region, in order to make the system coordinate the target point with the maximum acceleration, the square root error control method is adopted. Assuming that the maximum acceleration of the system is and the position loop error of the system is , the output of the According to the above calculation, the simulation diagram of system position inner loop is established, as shown in Figure 7. Without adding the influence of ship roll, the step master command of starting time and amplitude is added to the high-low and azimuth systems, and the 1S 500mrad system output is shown in Figure 8 (a). The high-low azimuth error is less than ; the 0.3mrad sinusoidal position master command with amplitude of , center point and 500mrad 500mrad is added to the high-low system, and the amplitude is added to the azimuth system It is the 6.28 T S  sinusoidal position master command of , center point and . The system 500mrad 0mrad 6.28 T S  output is shown in Figure 8 (b). The high and low azimuth errors are less than . The high and 1.5mrad low azimuth system can track the position step master command and sinusoidal master command normally, meeting the design requirements [7].  P_controler_f Add2 Add1 Figure 9. Simulation diagram of ship sway influence The velocity model and feed-forward control model of the altitude and azimuth system are encapsulated. According to the transformation model from the hull coordinate system to the geodetic coordinate system, the altitude angle, azimuth angle, yaw angle, pitch and roll of the system output in the car body coordinate system are taken as the input, and the shooting line direction in the geodetic coordinate system is taken as the output. The S-function is compiled and encapsulated as the transformation function [8]. The simulation model of ship rolling disturbance is established, as shown in Figure 9. The zbbh module in the figure is the S-function function, whose function is to realize the transformation of barrel shooting angle and shooting direction from the ship coordinate system to the geodetic coordinate system according to the three ship attitude factors of yaw angle, pitch and roll [9]. azimuth system, the system output is shown in Figure 10 (a), the high-low and azimuth system error is divergent, and the system cannot track normally; add sine position master command of amplitude , center point and to high-low system, and add amplitude to azimuth 500mrad 500mrad 6.28 T S  system. The output of the system is shown in Figure 10 (b). It can be seen from the figure that the high and low azimuth position output of the system in the geodetic coordinate system seriously deviates from the main command data and needs to be corrected and controlled. Through further simulation and analysis, it can be seen that:  Figure 11. simulation structure diagram of double position loop shooting line stability system (1) Only when the high and low directions are both 0, rolling has no effect on the high and low directions, while when the high and low directions are not 0, pitch and rolling has an effect on the high and low directions. Therefore, the position outer loop based on the geodetic coordinate system should be added to isolate the influence of ship attitude change when the ship body roll and roll is added.

Model of Two Position Loop Control Stabilization System and Its Response to Ship Roll Disturbance
The double position loop firing line stabilization system takes the position loop of the high and low azimuth servo system in the ship coordinate system as the inner position loop, and the position loop in the geodetic coordinate system as the outer position loop, so as to realize the closed-loop control of the barrel firing angle in the geodetic coordinate system. This control method can not only isolate the ship's roll and roll interference, but also realize the high and low azimuth in the turret coordinate system The decoupling control of the channel makes the barrel coordinate to the target point in the shortest time. The simulation structure diagram of two position loop firing line stabilization system is shown in Figure 11. . master command and error curve of two position loop stability system under ship shaking condition In the figure, P_controler_g1 is the inner loop regulator of high and low system position qiankui_g is the inner loop feedforward regulator of high and low system, P_ controler_ g2 is the outer loop regulator of high and low system position; P_ controler_ f1 is the position inner loop regulator of azimuth system qiankui_f is the inner loop feedforward regulator of azimuth system, P_ controler_ f2 is the position outer loop regulator of azimuth system. High low system position outer loop regulator P_controler_g1 is to realize the precise position control of the barrel firing angle in the hull coordinate system P_controler_g2 is to realize the precise position control of the shooting angle of the barrel in the geodetic coordinate system P_controler_f1 is to realize the precise position control of the barrel shooting in the hull coordinate system, and the position outer loop regulator P of the azimuth system P_controler_f2 is to realize the precise position control of barrel shooting in geodetic coordinate system. Because the high-low system and the azimuth system can independently complete their own position control in the geodetic coordinate system, the azimuth disturbance caused by pitch or roll can be overcome by the position outer loop of the azimuth system, so the azimuth system remains stationary in the geodetic coordinate system; when the azimuth gun is adjusted in the geodetic coordinate system alone, the azimuth disturbance caused by pitch or roll can be eliminated. The highlow disturbance caused by pitching or rolling can be overcome by the outer position loop of the high- low system, so the high-low system remains stationary in the geodetic coordinate system. After adopting the double position loop control, the mutual coupling of pitch and roll in the geodetic coordinates between the high and low system and the azimuth system is avoided, and the decoupling control is realized.
The pitch and roll of the ship are added according to the 5-level sea state swing parameters, and the step master command of starting time and amplitude is added to the high-low and 1S 500mrad azimuth systems under the double position loop control. The system output is shown in Figure 12 (a). The high-low and azimuth errors are less than , which can realize the isolation of the roll 3mrad disturbance and track the target normally, meeting the system requirements; add the sinusoidal position command with amplitude of , center point and to the high and 500mrad 500mrad 6.28 T S  low system, and add the sinusoidal position command with amplitude of , center point 500mrad and to the azimuth system. The system output is shown in Figure 12 (b), and the 0mrad 6.28 T S  high and low azimuth errors are less than , which can realize the isolation of roll and roll 3mrad disturbance, and can track the target normally, meeting the system requirements.

Conclusions
Based on the two position loop control of shipborne weapon stabilization system, the mathematical model of the transformation between ship coordinate system and geodetic coordinate system is established. On this basis, the interference of ship swing factor on the unit servo system is analyzed, and the two position loop control stabilization system is constructed. The position inner loop and position outer loop are designed respectively. The simulation results show that the method can effectively isolate the ship. The interference caused by the swing motion can realize the closed-loop stability of the weapon shooting line in the geodetic coordinate system. At the same time, the system does not need to add additional hardware costs such as gyroscope, so it is convenient to realize and has good control accuracy.