Control of Naval Gun Loading Device Based on Fuzzy Sliding Mode Controller

A fuzzy sliding mode controller was designed to solve uncertainty problems such as nonlinear sea wave disturbance and parameter time variant in the working process of a naval gun loading device. On the basis of building a system dynamics model for this device, the universal approximation property of the fuzzy system was used to realize the adaptive approximation of control parameters, and the Lyapunov analytical method was used to export the fuzzy adaptive laws to prove the stability of this method. Simulation results show that the comprehensive control performance of this control strategy is superior to the control effect of PID method. Specifically, it is able to remain the system with a stability performance under sea wave disturbance and parameter variant, and provides strong capabilities of resisting disturbance and tracking positions.


Introduction
A loading device system is an important part of a naval gun loading system. It is mainly used to quickly and accurately send ammunition to the designated position for the convenience of ammunition loading in the next step. The loading device is composed of permanent magnet synchronous motor (PMSM), ball screws, synchronous drive gearbox, etc. PMSMs have been widely applied in industries, aerospace and military fields by virtue of its advantages such as reliable operation, simple structure, high power factor, large output torque and small loss [1] . In consideration of the sea wave disturbance in six directions of degree of freedom and the time-varying parameters, the system should also be equipped with high reliability and high-precision positioning capabilities in the course of motion [2] . The motion state of the naval gun loading device system in the course of motion and its fast and accurate positioning capability have significant influence on the subsequent loading. However, a precise mathematical model is difficult to be established for the servo system due to the change of parameters. Thus, an ideal control effect for this type of control object is difficult to be achieved by traditional control methods.
In the working process of the loading device, the parameters of its internal parts such as loading moment, damping coefficient and rotational inertia will also vary with changes in the type of ammunition, lubrication conditions and sea conditions. Sliding mode variable structure control is a kind of control method for nonlinear uncertain systems [3] . Since the sliding mode surface can be designed as required, and is independent of parameter variations of the system and disturbances outside the system, the sliding mode variable structure control has been applied in engineering systems in recent years. The sliding mode variable structure control needs to switch controlled variables constantly to change the system structure; however, switching of control variables between multiple modes will cause buffeting [4] .
Literature [5] designed a simplified sliding mode controller to realize the controllable velocity and smooth movement at the position proximity section of the position servo system of a piston-type pressure simulation device. The results show that this controller can realize velocity control and position 2 orientation by simply switching the quantity of state of the sliding mode surface. The experimental results show that the performance of the controller meets the engineering specification, and the design of the position servo system of the device is valid. Literature [6] proposed a position control scheme for AC servo system based on the fuzzy sliding mode controller, which uses fuzzy reasoning to modify the size of switching control items in sliding mode control law in real time. The final simulation results show the validity of this algorithm. Literature [7] designed a fuzzy sliding mode variable structure controller based on adaptive laws for position servo system of a CNC machine tool, and compared the simulation results with PID control and ordinary sliding mode control respectively. The results prove that the method has a strong disturbance resistant capability while possessing both dynamic and static properties. Literature [8] designed a fuzzy sliding mode variable structure controller to solve the buffeting and slow response of traditional sliding mode control in linear servo system. The final simulation results show that the controller can weaken the buffeting generated by the sliding mode's switching control and accelerate the system response.
In this study, a fuzzy sliding mode controller is designed for the trajectory tracking of a naval gun loading device. The simulation results show that the controller performs better in terms of tracking control than the traditional PID control, and thus the system robustness is enhanced.

System dynamics model
The equivalent simplified model is adopted for the system for the convenience of analysis. The simplified model structure is shown in Figure 1. Regardless of the dynamics of the current loop, the device system is driven by PMSM, and subject to the control of the d-axis stator current id=0. The motor output torque is defined as T m =k t u i (1) Where, k t =P n Ψ f is the motor torque coefficient (N.m/A), k t >0; P n is the number of pole-pairs of the motor; Ψ f is the rotor flux; u i =i q means the q-axis current is considered as the control input current. Thus, the system dynamics equation of the naval gun loading device can be written as: dw dt -T -Bw (2) Where, J is the equivalent rotational inertia converted by the entire system to the motor shaft (kg.m 2 ); w is the angular velocity of the motor rotor (rad/s), w=θ; in α dw dt θ , α is the angular acceleration of motor rotor (rad/s), θ is the actual angular displacement of motor rotor (rad); T d is the loading and environmental disturbance moment (N.m); B is the equivalent damping coefficient of the whole system.
The simultaneous Eq. (1) and (2) can lead to the final system dynamics equation: In this study, PMSM is controlled by inputting the u control current to complete the tracking of the angular position after the preset trajectory planning θ d by the actual angular displacement of motor rotor θ. The control requirements include tracking the given angular position trajectory in time within the given error; having good stability and dynamic property in the course of motion; controlling buffeting within a small range as far as possible. Compared with common sliding mode controller, its buffeting reduces; its error of target dynamic tracking angle that is equivalent to the motor shaft via indicators should not be greater than ±0.8rad; its tracking angular error under steady state should not be greater than ±0.5rad.

Controller design
First of all, the angular displacement error of the naval gun loading device's servo system is defined as: e= θ d -θ (4) The function s of sliding mode surface is defined as: s=ce + (5) It is also stipulated that c＞0, which means parameter selection ensures that the polynomial p+c satisfies Hurwitz's condition.
Eq. (3), (4) and (5) The equivalent control law is designed as Where, u e is the equivalent control item; 0 t 0 t J =J/k ;B =B/k . The switching control item is designed as: s u =ηsgn(s)+λs (8) Where, u s is the switching control item; η is the switching coefficient, η>0; η means the rate at which the system state approaches the sliding mode surface s=0; too small rate will lead to a slow approach velocity, and too large rate will lead to severe buffeting. λ is the exponential coefficient, λ>0; The existence of λ allows the system state to quickly approach the sliding mode surface when s is large. sgn(s) is the sign function, which is written as: 1, s>0 sgn(s)= 0, s=0 In order to eliminate the effect of buffeting as much as possible, a new saturation function is adopted to replace the sign function sgn(s). The new saturation function can be expressed as: Where, Δ is a constant greater than 0. Thus, by combining Eq. (7), (8) and (10), the system controller output can be written as: Thus, according to sliding mode control theory, the servo control system is stable in the sense of Lyapunov, and the position tracking error will eventually tend to 0 along the sliding mode surface.
Buffeting is an important problem in sliding mode control, and the selection of the switching coefficient η in the control items has a great impact on the output. A too small value of η will lead to a slow approach velocity towards the sliding mode surface. A Too large value of ηwill lead to buffeting on the sliding mode surface. Fuzzy logic rules do not depend on the model of controlled object, so its capacity can be utilized to simulate the control experience of human to realize a high-performance control. In this study, the fuzzy logic mode was used to adjust the value of η.
In order to realize a high-performance control, when the sliding mode function is far away from the sliding mode surface, the value of η should be increased to improve the approach velocity. However, when the sliding mode function approximates the sliding mode surface, the value of η should be reduced to reduce the approach velocity. Thus, the fuzzy rules are shown as follows: If ss＞0, η increases If ss＜0, η reduces By the above fuzzy rules, a fuzzy system regarding the relationship between ss and Δη can be designed. ss is designated as the input, and Δη as the output. ss  ss  NB, NM, Z, PM, PB are the fuzzy states of variables; NB --negative big; NM --negative medium; Z --zero; PM --positive medium; PB --positive big. Fuzzy rules are designed as follows: The centroid method is used to solve ambiguity, obtaining the fuzzy system output Δη as follows: Where, μ i (0≤ μi ≤1) is the membership of fuzzy input on each fuzzy subset; c i is the regulating parameter of fuzzy output Δη. ss  The final membership functions of fuzzy inputs and outputs are shown in Fig. 2. Based on the above analysis and considering η+Δη>T d0 , the servo control system is stable in the sense of the new control law, and the position tracking error will eventually tend to 0.

Simulation validation analysis
The designed fuzzy sliding mode controller is used for the position control of the servo system in the naval gun loading device, as shown in Fig. 3. Fig.3 Block diagram of fuzzy sliding mode controller for servo system of naval gun loading device A simulation model is created on the Matlab/Simulink software to verify the control performance of the designed algorithm and compare the control performance of the designed fuzzy sliding mode controller with that of the PID controller. The control performance can be clearly obserbed Through the error comparison between the simulation results and the supposed theoretical track.
The supposed theoretical track is shown in Fig. 4. With a purpose of better simulating the real sea conditions, a random sea wave disturbance moment model is built based on relevant ship design parameters using the P-M wave spectrum density function, and the effect of wave impact on the servo system of the naval gun loading device under specific sea conditions is obtained. The variations of the moment equivalent to the transmission shaft within 600s are shown in Fig. 5. In practice, time variation is commonly seen in actual parameters. We assume the equivalent damping coefficient of the system is subject to uncertainty. We assign e0 B 1 sin 0.25πt , and B is the original value.
The PID control output u i1 for comparison is: Its parameter is selected as: k p =170, k i =10, k d =10 Combined with sea wave disturbance and time-varying parameters, simulation is conducted on PID controller and designed fuzzy sliding mode controller under the zero initial condition. The obtained angle error, angular velocity error and control input signals are shown in Fig. 6, Fig. 7   The simulation results show that the fuzzy sliding-mode controller has better steady-state and dynamic control effect than PID controller under given parameters and disturbance. Fig. 6 shows that angle tracking performance of the fuzzy sliding mode controller is higher than that of PID controller. Its maximum angular tracking error is -0.061rad, and the error tends to be 0 and keeps stable about 1.3s later. The maximum angular tracking error of PID controller is -0.486rad, and tends to be 0 about 1.5s later. Moreover, the angular displacement tracking velocity of the fuzzy sliding mode controller is obviously faster than the PID controller. It can be seen from the figure that the adjustment time used by the former to reach the steady state is about 0.15s less than the latter. Fig. 7 shows that the angular velocity tracking of the designed fuzzy sliding mode controller is preciser than the PID controller. Specifically, the maximum tracking error of the fuzzy sliding mode controller is 2.805rad*s^-1, while that of the PID controller is -4.382rad*s^-1. Moreover, the angular velocity tracking of the fuzzy sliding mode controller is obviously faster than the PID controller. It can be seen from the figure that the adjustment time used by the former to reach the steady state is about 0.3s less than the latter. Fig. 8 shows that the curve of control output iq obtained by the designed fuzzy sliding mode controller is smoother than the curve of current loop control output iq obtained by the PID controller. After reaching the steady state, the fluctuation range of current amplitude is ≤±1A, which is smaller than the current amplityde fluctuation of PID controller after raching the steady state. This is conducive to reducing operating problems such as the heating of PMSM, making the designed controller applicable for engineering applications.

Conclusions
In this study, considering the current control status of such controlled object, a naval gun loading device controller based on the fuzzy sliding mode control was designed by based on the structure and movement characteristics of servo system of a naval gun loading device. Furthermore, the effect of strong sea wave disturbance and time-varying parameter on the system control precision by this method under specific sea conditions was analyzed, and the precise positioning control of servo system of the naval gun loading device was simulated. The following conclusions are obtained: 1) The designed fuzzy sliding mode controller is insensitive to system interference and parameter variation, and its precise position tracking function makes it able to closely track the given motion trajectory.
2) The dynamic error and steady-state error of the system converge within a small range, which meets the performance indicators and provides guarantee for the subsequent ammunition loading.
3) The control output current of the system is more stable than the PID controller; the current fluctuation is reduced, which is beneficial to the normal operation of the motor and increases its service life.
4) The simulation results show that the sliding mode controller has better performance than the PID controller, which can provide reference for the control of other devices in the naval gun system.