## 3 Methodology
### Experimental Design  
To verify the scanning performance of the rotating dual-grating electro-optical tracking system, a scanning experiment was conducted using the electro-optical platform shown in Figure 11. Beam deflection was achieved through the diffraction characteristics of the dual gratings. The two gratings were coaxially aligned and independently placed, with a servo motor driving the dual gratings to rotate. The encoder displayed the motor's angular position as the feedback signal for the control system. After the incident beam passed through the dual-grating system, it underwent beam deflection, with the deflection angle calculated using the forward and reverse solution models. The emitted beam was then focused by an off-axis optical antenna and received by a camera. The image processing unit processed the image data from the camera to determine the target off-axis displacement. The inertial measurement unit was mounted on the platform to provide feedback on the platform's position, attitude, and other information. The servo control system selected the STM32F407 microcontroller (Zerong Technology Co., Ltd., Shenzhen, China) as the motion-control master unit (based on the ARM Cortex-M4 core; with a clock frequency of 168 MHz; flash memory of 1 MB; RAM of 192 KB; voltage range of 1.8-3.6 V; ADC/DAC configuration included 3 \(\times\) 12 bit ADCs (24 channels, 2.4 MSPS)/2 \(\times\) 12 bit DACs; timer configuration included 14 timers (including twi advanced control timers supporting PWM)). The motor (Aifurui Mechanical Transmission Equipment Co., Ltd., Tianjin, China) selection and parameters are shown in Table 5. The encoder (Changguang Qiheng Sensing Technology Co., Ltd., Changchun, China) selection and parameters are shown in Table 6. The system had a sampling frequency of 1000 Hz, and the camera operated at a frame rate of 100 frame/s with an angular resolution of 15.625 \(\upmu\)rad. The lifting platform was employed to achieve optical axis alignment, while the swing table (Ruixin Technology Co., Ltd., Suzhou, China) was utilized to simulate sea surface disturbances. The model was created using the C programming language on the Microsoft Windows 10 64 bit operating system for software development. The calibration of experimental instruments (including zero calibration, span calibration, and multi-point calibration) was performed through the recording and analysis of experimental data to maintain the credibility of experimental results.  
Figure 11: Model of the experimental system.  
To validate the effectiveness of the Fuzzy PID control system for the rotating dual-grating two-dimensional scanning model based on inertial navigation feedforward technology, a comparison was made with the traditional dual-loop control system that does not incorporate inertial navigation feedforward technology and uses the PID control algorithm. Setting up the rotating dual-grating experimental platform allowed a spiral trajectory scan to be performed, and the actual scanned trajectory data were collected. The data were then compared with the desired trajectory data obtained from the calculation module, resulting in the scanning error curve.