# Target Points Tracking Control for Autonomous Cleaning Vehicle Based on the LSTM Network
## 3 Proposed Trajectory Tracking Control Algorithm
### Determination of the Foresight Distance  
In practical application, an autonomous vehicle have to work on different curvature paths, so it needs a very robust tracking controller. Motivated by the pure pursuit algorithm [25; 26; 27], a key parameter of this algorithm, foresight distance, are used, which has been widely applied in the field of target points tracking. It simulates the vision of the driver during the driving and has the bionic characteristics.  
The preview ability is very significant for target points tracking, but to select the foresight distance as a linear function of vehicle velocity is evidently not a good choice [28]. On the one hand, a shorter foresight distance provides a smaller tracking error for a vehicle, but its stability is affected. On the other hand, a longer foresight distance provides a smoother tracking performance, but it may cause cut corners disaster while executing turns. Therefore, the trade-off between stability and tracking performance is a thorny matter. As a result, a method to improve the tracking performance by preview distance based controller is proposed in this paper.  
Figure 2: (**a**) The chain structure of Long Short-Term Memory. It takes the output of a LSTM cell at previous time step as the input of the LSTM cell at current time step and forms a multilayer LSTM; (**b**) Details of the information transfer process. The memory cell is like a conveyor belt, which directly passing through the whole cell.  
In order to closely approximate the continuous path, we divide the reference path into uniform points with index numbers, so the denser discretization of the path is realized. In this paper, the method of selecting the preview point is to draw a circle with radius \(L_{d}\) centered on rear axle of the vehicle, as indicated in Figure 3. \(L_{d}\) is the foresight distance obtained by the fuzzy control according to the real-time situation of the vehicle. A double-input and single-output structure is adopted, in which the inputs of the fuzzy controller are the current velocity \(v\) and the yaw rate \(\omega\) of the vehicle, and the output is an appropriate target foresight distance \(L_{d}\).  
To take the fuzzy set of speed grades as {Z, PS, PM, PB, PL}, its domain are [0, 1.0]. The fuzzy set of yaw rate grades is {NB, NM, NS, Z, PS, PM, PB}, its domain are [-90, 90], where B is Big; N is Negative; M is Middle; S is Small; Z is Zero; P is Positive; L is Large. To take the typical triangle function as the membership functions, and the fuzzy control rules will affect the outputs.  
When designing the fuzzy control rules, the following principles are considered: (1) If the absolute value of \(\omega\) is smaller, the \(L_{d}\) is larger; If the absolute value of \(\omega\) is larger, the \(L_{d}\) is smaller. (2) Under the condition of satisfying the system stability, if the v of the vehicle is slower, the \(L_{d}\) is smaller. If the v is faster, the \(L_{d}\) is larger. The basic field of foresight distance \(L_{d}\) is [0.1, 1.3] (/m) and the quantization level is {0.1, 0.4, 0.7, 1.0, 1.3] = {S, SM, M, ML, L} of fuzzy control, as shown in Table 1. After that, the output from any input or combination of input fuzzy sets can be determined. Here, the \"and\" rule is used between two inputs. It is obvious that foresight distance, driving velocity, and the yaw rate are coordinated.  
Based on the above method, the appropriate foresight distance can be determined according to different conditions in the process of goal points tracking.