## 2 Materials and Methods
### Fuzzy Stanley Tracking Control Module Design  
The core idea of the [PERSON] model is to calculate the steering wheel control value by using the tracking deviation of the center of the front wheel. As shown in Figure 9, the Stanley model has a look-ahead point \(p\), and the look-ahead distance \(T(t)\) is set according to the speed of front wheel \(v_{f}(t)\) and gain coefficient \(K\). Its expression is as follows:  
\[T(t)=\frac{v_{f}(t)}{K} \tag{9}\]  
The expected steering angle is composed of two deviation variables: the heading deviation-derived angle \(\delta_{\theta}(t)\) and the lateral deviation-derived angle \(\delta_{e}(t)\). Therefore, the front wheel steering angle is calculated as follows:  
\[\delta(t)=\delta_{\theta}(t)+\delta_{e}(t) \tag{10}\]  
When only considering the steering angle corresponding to the lateral tracking error, the expected angle is in proportion to the lateral deviation. It is derived from the geometric relationship, as follows:  
\[\delta_{e}(t)=\arctan\frac{d_{e}(t)}{T(t)}=\arctan\frac{Kd_{e}(t)}{v_{f}(t)} \tag{11}\]  
where \(d_{e}(t)\) denotes the lateral deviation at time \(t\). When only considering the influence of the heading deviation, the expected angle is identical to the angle difference between the tangent direction of the nearest waypoint and the vehicle heading angle:  
\[\delta_{\theta}(t)=\psi_{e}(t) \tag{12}\]  
Here, \(\psi_{e}(t)\) donates the heading deviation at time \(t\). Considering the lateral deviation and heading deviation simultaneously, the expected front wheel steering angle is obtained as follows:  
\[\delta(t)=\psi_{e}(t)+\arctan\frac{Kd_{e}(t)}{v_{f}(t)} \tag{13}\]  
In the application of whole-field path tracking, due to the variations in the travel speed, soil conditions, and changes in the attitude of the tractor, the constant preview distance \(T(t)\) will unavoidably lead to tracking error fluctuation. Consequently, without altering the  
Figure 9: Schematic diagram of Stanley model.  
vehicle speed, the gain coefficient should be modified to make the SM suitable for straight path switching and short guided trajectories in the presence of a large initial lateral error. In this work, a fuzzy logic control was employed to enhance the adaptability of the SM, named the FSM in this context, which adjusts the gain coefficient adaptively according to the variation in the tracking errors. In the FSM, the \(\psi_{e}\left(t\right)\) and \(d_{e}\left(t\right)\) of the tractor are taken as the input variables, and the output parameter is the gain coefficient \(K\). When the quantization factor is set to 1, the precise deviation value is converted into fuzzy language as follows:  
1. The basic domain of \(d_{e}\left(t\right)\) is [\(-3\) m, \(3\) m], and the quantization level is {\(-3\), \(-1.5\), \(-0.5\), \(0.0\), \(1.5\), \(3\)] = {NP, NM, NS, ZO, PS, PM, PB};
2. The basic domain of \(\psi_{e}\left(t\right)\) is [\(-30^{\circ}\), \(30^{\circ}\)], and the quantization level is {\(-30\), \(-15\), \(-5\), \(0\), \(5\), \(15\), \(30\)] = {NP, NM, NS, ZO, PS, PM, PB};
3. The basic domain of the gain coefficient \(K\) is [0, 1.2], and the quantization level is {0, \(0.3\), \(0.7\), \(1.2\)] = {ZO, PS, PM, PB}.  
According to Equation (13), the influence of \(\psi_{e}\left(t\right)\) and \(d_{e}\left(t\right)\) on the front wheel angle is directional. When the action directions of \(d_{e}\left(t\right)\) and \(\psi_{e}\left(t\right)\) are the same, \(K\) can be appropriately reduced to make the controller more stable. Conversely, when the action directions of \(d_{e}\left(t\right)\) and \(\psi_{e}\left(t\right)\) on the wheel angle are opposite, \(K\) can be appropriately added to accelerate the convergence speed of the controller. More details on the designed fuzzy rules can be found in [26]. The fuzzy rules, optimized through trial and error, are summarized in Table 6. The 3D fuzzy rule response surface of the fuzzy logic control rule is shown in Figure 10, which indicates strong nonlinearity with the input variables.