# Trajectory Tracking of Autonomous Vehicle Using Clothoid Curve
## 3 Tracking Control Method Using Clothoid Curve
### Preview Point Selection  
The state of the vehicle after the control system communication delay time \(t_{1}\) is obtained through prediction calculation, and the predicted vehicle position is taken as the starting point of the planned control path. The selection of the end point of the planned control path (also known as the preview point) will affect the deviation between the planned control path and the reference path (as shown in Figure 4). The closer the preview point is selected, the smaller the area enclosed by the planned control path and the reference path is, that is, the smaller the overall deviation of the trajectory tracking process. However, if the tracking control path is too short, the curvature and curvature change rate of the calculated clothoid curve might be too large, which will exceed the control range of the vehicle steering wheel angle and angular velocity, or cause the steering wheel angle to change dramatically, thus affecting the vehicle stability. Therefore, this paper proposes to design a preview point scanning interval. In this interval, the point that is closest to the predicted vehicle position and can satisfy the vehicle's control non-integrity, safety, and stability constraints is found as the preview point to calculate the clothoid curve. Figure 3: Schematic diagram of vehicle position prediction. The point closest to the predicted vehicle position on the reference path is selected as the first point on the preview point interval. The last point on the preview point interval is calculated from the speed and the bending degree of the target curve. The specific de termination method is shown in Algorithm 2. ```
1\(s\_length=s\_init\)
2 if\(s\_length<3*speed\)then
3\(s\_length=3*speed\)
4 end
5 caculate length from startPoint to endPoint of referencePath named \(ss\)
6 if\(s\_length>ss\)then
7\(s\_length=ss\)
8 end
9 caculate average curvature of points within \(referencePath\_length/2\) named \(avg\_curvature\)
10 if\(avg\_curvature>cur\_limit\)then
11\(s\_length=s\_length/(avg\_curvature/cur\_limit)\)
12 end
13 for\(pointIteration=startPoint,startPoint+1,...,lastPoint\)of\(referencePath\)do
14 if\((length(startPoint\to pointIteration)>s\_length\)then
15 endPoint = pointIteration
16 break
17 end
18 else
19 if\(pointIteration\) is the last point of \(referencePath\)then
20 endPoint = pointIteration
21 end
22
23 end

Figure 4: Influence of the selection of preview point on the calculation deviation of control path. Set the initial value of the preview point selection interval length as _s_init_, then _s_length_ is adjusted according to the vehicle speed and the curvature and length of the reference path. Next, set the point closest to the predicted vehicle position found on the reference curve as the start point, and search along the reference path to find the point whose distance to the start point is closest with _s_length_ as the last point of the preview point selection interval. After determining the preview point selection interval, calculate the clothoid curve from far to near points within the interval, and check whether the parameters of the curve obtained meet the constraints. The curve that can meet the constraints and its end point is closest to the predicted vehicle position is the optimal planned control path. ### Constraints

The autonomous vehicle platform with Ackerman steering is used in the test of this paper. The motion constraints for the test platform include the maximum curvature and the maximum curvature change rate. In addition, the length of the planned control path designed by the clothoid curve should be long enough; otherwise, direction jitter will occur in the continuous control process. #### 3.5.1 Curvature Constraint

The maximum curvature constraint is discussed in two cases: stationary or low-speed state and normal running state. When the vehicle is stationary or moving at a very low speed, the maximum front wheel angle parameter is used to calculate its motion curvature constraint.