# Study on Path Planning Method for Imitating the Lane-Changing Operation of Excellent Drivers
## 3 Fitting of the Test Path  
Function fitting refers to search a curve expression by adjusting some undetermined coefficients in this function to minimize the difference between the function and the known set of coordinate points \((x_{i},y_{i})\). According to above process, the coordinates of the ideal path in the geographical coordinate system have been obtained. For the convenience of calculation, only the two-dimensional coordinate \((x_{g},y_{g})\) is needed to be fitted without considering the vertical motion. Figure 4 is a schematic diagram of the lane-changing path. It is necessary to satisfy the requirement of curvature continuity of the path curve to ensure the vehicle moves smoothly. Once the shape of the curve is known, the curvature-continuous fitting function should be determined. An easement curve is a curve of continuous curvature, usually set between a straight line and a circular curve or between two circular curves with different radius. There will be no mutation of the curvature of the path curve. Therefore, it can improve the comfort and stability of the vehicle considerably. There are usually two types of transition curves: clothoid and  
Figure 4: The schematic diagram of the lane-changing path. cubic parabola. In engineering practice, the swirl curve is obtained by the method of point selection and lofting. However, it is difficult to accurately fit the swirl curve, as its mathematical equation is too complicated, which will lead to high computation cost. The expression of polynomial curve is succinct, and all derivatives are continuous. It can accurately fit the driving path under different operation conditions by changing the coefficients of each item. In this paper, the polynomial curve is adopted as the lane-changing path. Polynomial equations are set as follows:  
\[y=a_{n}x^{n}+a_{n-1}x^{n-1}+\cdots+a_{1}x+a_{0} \tag{4}\]  
\[k=\frac{y^{\prime\prime}}{\left(1+y^{2}\right)^{\frac{3}{2}}} \tag{5}\]  
where \(y^{\prime}\) is the first derivative and \(y^{\prime\prime}\) is the second derivative of the polynomial curve. \(k\) is the curvature of a point on the curve. The center of the mass of vehicle at the beginning of lane-changing is set as the origin of the coordinate system for simplifying the system with proposer assumptions. Thus, the polynomial constant term is zero. According to the analysis of lane changing operation, it is known that, at the initial and final state of the lane-changing operation, the vehicle's heading direction should be parallel to the lane line and the steering angle shall be zero. To make the unmanned vehicle able to travel straight along the lane, it is required that the steering wheel angular speed be zero when the lane-changing operation ends. Therefore, the first derivative and the second derivative of the polynomial curve at the initial point and the final point are zero. The final point of lane-changing is set as (\(x_{f}\), \(y_{f}\)) and \(y_{f}\) is the lane width of the current driving road. Thus, the position of the vehicle is at the middle of the lane when lane-changing is completed. While the initial and final positions of lane-changing are determined, the trajectory selected by different types of drivers will also be different, which has impact on the riding comfort of the lane-changing process. Therefore, it is necessary to consider the intermediate state of the vehicle during lane-changing path planning. It is noticed that the entire lane-changing process can be divided into three phases: collision avoidance, rotation and adjustment [30]. It can be seen that the steering wheel angular speed during the obstacle avoidance and the rotation phase are faster than that during the adjustment phase by analyzing the steering wheel angular speed during the lane-changing process. Therefore, the vehicle position state (\(x_{m}\), \(y_{m}\)) at the end of the rotation phase is adopted as the intermediate state constraint of the lane-changing operation.