## 2 Materials and Methods
### Control System Design
#### 2.3.3 Fuzzy PID Control Algorithm and Matlab/Simulink Simulation  
Fuzzification, fuzzy inference, and defuzzification are used to acquire real-time updated PID parameters, which are then applied to the PID controller to accomplish the control function of the controlled object [32]. PID parameters may be self-tuned by adjusting the size of the fuzzy PID control parameters based on the system's reaction to external disturbances, thereby boosting the system's dynamic responsiveness and its resilience. Figure 10 shows the schematic diagram of fuzzy PID control strategy. According to the harvester driving experience, when the lateral deviation of the touching pair of rows mechanism and corn reference rows is large, it means that the harvester has a greater tendency to shift, then the harvester needs to move a greater distance in the opposite direction in a shorter time, at this time, it will increase the steering wheel angle of the harvester, so that the harvester can quickly reach the target path, in order to reduce the corn falling loss caused by heavy cutting or missing cutting; As a consequence, when the lateral deviation is large, it is imperative to prevent excessive steering wheel adjustment from overshooting the system; at the same time, when the forward speed of the harvester is large, too sharp a turn of the harvester will lead to overturning and danger, and it is also necessary to avoid excessive steering wheel angle. A fuzzy PID adaptive control system model has been developed based on the above analysis in order to test the feasibility of the proposed control strategy [35]. Figure 10: Fuzzy PID controller schematic. Firstly, the fuzzy controller is established in MATLAB's fuzzy toolbox, the quantization domain and fuzzy subset of the input and output variables are determined, respectively [36], the affiliation function is determined, the fuzzy control rules are added, and finally the specific values at different inputs are observed through the observer simulation, as shown in Figure 11.  
A fuzzy PID simulation model which includes the fuzzy control module, the PID module, the transfer function from the control system, and state update modules is developed in MATLAB/Simulink in order to verify the feasibility of the automatic alignment system, as shown in Figure 12.  
A simulation test determined that turning the harvester steering wheel to the right will yield positive results, while turning to the left will yield negative results. A deflection of the right touch bar to the right will yield positive results, while a deflection of the left touch bar will yield negative results; in the reference row of corn, the stalk deflection was positive for the right side and negative for the left. Assuming the travel speed of the corn harvester is 0.5 m/s, the harvester conducts a simulation test after 6 s of travel, when the corn row is deflected to the right from the reference row and returns to the reference row at 8 s. Currently, the corn stalks are 0.2 m away from the reference row. The simulation results are shown in Figure 13. Observed from the simulation results, the automatic row alignment  
Figure 11: Fuzzy controller design. Figure 12: Simulation model of automatic alignment system. system was adjusted twice during the whole harvester walking process, and the steering wheel was able to adjust quickly and with a short reaction time when the touch-to-row deflected. A maximum deflection angle of 12.3\({}^{\circ}\) was experienced when the harvester's right touch lever was deflected. Similarly, during normal travel, when the touch-to-row mechanism detected that the left side of the row deflected when the corn stalk returned to the reference row, the harvester deflection angle then deflected to the left, and the system made fine adjustment, while the system judged according to the signal from the steering wheel angle detection device and controlled the body back to the right, and this process shows no noticeable oscillation.