## 3 Methodology
#### 3.2.1 Analysis of the Impact of Sea-Surface Disturbance
By applying the Laplace transform to both sides of the differential equations and eliminating intermediate variables, we derived the system's transfer function, as follows:  
\[H(s)=\frac{\theta(s)}{v(s)}\mathrm{=}\frac{k_{b}}{LJs^{3}+\left(Lk_{f}+R \right)s^{2}+\left(Rk_{f}+{k_{b}}^{2}\right)s} \tag{12}\]  
Through the analysis of the electro-optical tracking system principles and the modeling of the controlled motor, we designed a Fuzzy PID control system for the rotating dual-grating two-dimensional scanning model based on inertial navigation feedforward technology. The control system block diagram is shown in Figure 8. The image-processing unit obtains the off-axis displacement information and calculates the azimuth and elevation angles of the scanning trajectory. The inertial measurement unit measures the platform's posture information. The required rotation angles of the gratings are calculated using the rotating dual-grating two-dimensional scanning model. The desired position of the grating, r(k), is used as the target input. The position loop Fuzzy PID controller and the velocity loop PID controller process this input, with the position and rotational speed information of the grating being fed back to the position and velocity loops by the encoder, respectively. At the same time, the inertial navigation information f(k) is fed forward to the outer position loop. Finally, the control system completes the closed loop, and the output corresponds to the actual position y(k) achieved by the grating. Figure 9 shows the block diagram of the Fuzzy PID controller. The expression for the parameters of the Fuzzy PID controller is given by Equation (13), as follows:  
\[\left\{ \begin{array}{l}K_{p}={K_{p}}^{\prime}+\Delta K_{p}\\ K_{i}={K_{i}}^{\prime}+\Delta K_{i}\\ K_{d}={K_{d}}^{\prime}+\Delta K_{d}\end{array} \right., \tag{13}\]  
The terms \({K_{p}}^{\prime}\), \({K_{i}}^{\prime}\), and \({K_{d}}^{\prime}\) represent the initial values of the proportional, integral, and derivative components, respectively, while \(\Delta K_{p}\), \(\Delta K_{i}\), and \(\Delta K_{d}\) denote the adaptive variations of the proportional, integral, and derivative components. In this paper, the Mamdani fuzzy system is employed; this system addresses uncertainty and vagueness through four processes: fuzzification, rule evaluation, inference calculation, and defuzzification. The Mamdani fuzzy system quantifies uncertainty using membership functions, effectively handling real-world issues such as sensor noise and ambiguous linguistic descriptions. Experimental results indicate that even with a noise intensity of 20%, the Mamdani system maintains a control accuracy of over 92%. First, the input was fuzzified and the two inputs of the fuzzy controller, e and ec, were quantized using a quantization function, mapping them to a real value within the fuzzy domain. Here, e and ec, respectively, represent the difference between the actual and desired rotational angles of the rotating dual grating and its rate of change over time. Fuzzy subsets and membership functions were selected, and the membership degrees of the real values belonging to each subset were calculated, transforming the original precise quantities into fuzzy values, which were then represented by the corresponding fuzzy sets. When the number of linguistic variables in the fuzzy subsets is small, the control  
Figure 8: Overall block diagram of the control system. Figure 9: Fuzzy PID controller structure block diagram. rules become coarse, leading to poor control performance. When the number of linguistic variables in the fuzzy subsets is large, control performance improves, but the control rules become more complex. In this study, the number of linguistic variables was set to five, which balances the precision and stability of the rotating dual grating electro-optical tracking system. The fuzzy subsets for the inputs and outputs were defined as {NB, NS, ZO, PS, PB}.