# Path Tracking of Agricultural Vehicles Based on 4 WIS-4 WID Structure and Fuzzy Control
## 2 Materials and Methods
### Design of Fuzzy Controller
#### 2.3.3 Validation of the Model  
A comparative study of the tracking accuracy and the convergence efficiency between the traditional pure pursuit (TPP) model and the fuzzy control pursuit (FCP) model is simulated in MATLAB 2018. For the simulation, both methods adopt the identical structure of the prototype vehicle, equivalent look-ahead distance (1.5 m), the same initial state (\(d\) = 0 m, \(\theta\) = 90\({}^{\circ}\)), and velocity (0.5 ms\({}^{-1}\)). Trials of the path tracking were evaluated in terms of average deviation, steady-state deviation, stability distance, and settling time. Average deviation refers to the average value of all lateral deviations throughout the whole process of the test in millimeters. Stability distance refers to the longitudinal distance the prototype traveled when the value of lateral deviation coverage was from maximum to \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Variables**} & \multirow{2}{*}{\(\mathbf{d}\)} & \multicolumn{5}{c}{\(\mathbf{\theta}\)} \\ \cline{3-6}  & & **NB** & **NS** & **O** & **PS** & **PB** \\ \hline \multirow{5}{*}{\(\alpha\)} & NB & B & B & B & O & O \\  & NS & B & B & S & O & O \\  & O & B & B & O & B & B \\  & PS & O & O & S & B & B \\  & PB & O & O & B & B & B \\  & NB & PS & PS & PB & PS & PS \\  & NS & PO & PO & PM & PO & PO \\  & O & PO & PO & PB & PO & PO \\  & PS & PO & PO & PM & PO & PO \\  & PB & PS & PS & PB & PS & PS \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Fuzzy controller rules. Figure 6: (**A**) Membership function of input variables. (**a**) Lateral deviation \(d\) (m), (**b**) Heading deviation \(\theta\) (deg); (**B**) Membership function of output variables. (**c**) Steering radius \(R\) (m), (**d**) Steering angle \(\alpha\) (deg). within \(\pm 0.1\) m for the first time (and the heading deviation converges to \(\pm 9^{\circ}\)) in millimeters. Settling time refers to the time required for the prototype vehicle to reach the steady state from the initial state in seconds. The steady-state deviation is the mean value of the lateral deviation of all data points after the prototype vehicle reaches the steady state in millimeters. Average and steady-state deviations are critical indicators to evaluate path-tracking accuracy. Stability distance and settling time reflect the speed of the path tracking and the convergence efficiency. The simulation results are shown in Figures 8 and 9 and Table 2.  
Figure 8 and Table 2 shows that due to the TPP model's limitation, the steering center's steering radius is always perpendicular to the vehicle's longitudinal axis. The lateral deviation first expands and gradually decreases in the adjustment process; therefore, the average deviation value is significant. The FCP, on the other hand, obtains even higher accuracy and convergence efficiency due to the flexible position of the steering center. The \(d\)-\(\theta\) diagrams of vehicle adjustment using two models are visualized in Figure 9, showing that the distance from the initial state to the desired steady state is much shorter, and the route is much straighter for FCP than TPP. Figure 10 shows the whole process of prototype vehicle adjustment in a graphic way. It can be seen that FCP takes advantage of the 4 WIS-4 WID structure, which makes the lateral deviation and heading deviation converge simultaneously, thus significantly improving the efficiency. Figure 8: Comparison of the simulation trajectories of the two path-tracking methods. Figure 7: Query table. (a) Query table of \(\alpha\), (b) Query table of \(R\). Figure 10: Vehicle adjustment process. (**a**) Prototype position adjustment diagram of FCP, (**b**) Prototype position adjustment diagram of TPP.