{'fraction_non_alphanumeric': 0.03232181950863537, 'fraction_numerical': 0.014260520554609584, 'mean_word_length': 4.456038487060385, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Lane‐changing trajectory planning method for automated vehicles under various road line‐types

This study proposes a lane-changing trajectory planning method for automated vehicles under various road line-types. The method uses the polynomial regression model to describe the road line-types, and then a non-linear optimisation model is constructed to generate the lane-changing trajectory based on the road polynomial functions. The process of connecting the lane-changing manoeuvre with the car-following manoeuvre is discussed in this study, which ensures the ride comfort of the ego vehicle after the lane-changing manoeuvre. Moreover, considering that the lag vehicle on the target lane may be affected by the lane-changing manoeuvre, the situation that the lag vehicle maintains the car-following manoeuvre with the ego vehicle is taken into account in the authors' model. Another small innovation is that they have designed a simple and effective method to find the suitable initial guess for the proposed non-linear optimisation model. The simulation results show that the lane-changing trajectory generated by the proposed model is smooth and continuous, and the automated vehicle can avoid potential collisions efficiently during the lane-changing process. In emergent conditions, the proposed model can also plan the corrected trajectory to ensure safety.


Introduction
According to the traffic reports, about 90% of accidents are caused by human error [1], and the unreasonable lane-changing manoeuvre is one of the main factors. In New Zealand, 12.6% of traffic accidents result from lane-changing [2]; in Canada, 9.8% of crashes are caused by lane-changing [3]; and in the USA, lanechanging manoeuvres account for a total accidents of 8% [4]. The automated lane-changing system is a good solution to ensure the traffic safety, alleviate the congestion and improve the road capacity [5,6].
The automated lane-changing system consists of four parts: surrounding traffic states collecting, decision making, trajectory planning and trajectory tracking. Surrounding traffic states collecting is to obtain the vehicles and environment information (positions, speeds, accelerations and road line-types) by using the advanced sensors and high-precision maps. On the basis of such information, the decision-making module will make a suitable decision to keep current lane or change lane. Once the lanechanging intention is generated, trajectory planning module will provide a feasible trajectory. Moreover, the trajectory-tracking module will control the ego vehicle to track the reference trajectory. Among the four subparts, trajectory planning module is tightly integrated with traffic environment and has become a vital component in the field of intelligent transportation system. This study focuses on the trajectory planning module of automated lanechanging system.
In the real design, the geometric line-types of roads are composed of straight lines and curves [7,8]. As for straight roads, researchers have proposed various models to generate lanechanging trajectories [9][10][11]. As for curved roads, many lanechanging trajectory planning models were also developed [12,13]. However, these previous studies usually were applied to a specific road line-type. In our research, the polynomial regression model is used to describe the roads information, and this method ensures that the planned lane-changing trajectory is suitable for various road line-types.
According to the relevant literatures, the techniques of lanechanging trajectory planning can be roughly divided into four categories: the incremental search planner, the geometric curve planner, the artificial potential field (APF) planner and the neural network planner. For the incremental search planner, Yang et al. [14] applied the Dijkstra algorithm to determine the shortest lanechanging path, but this method was only suitable for static environments. Lan and Cairano [15] presented a lane-changing trajectory planning model based on the rapidly exploring random tree algorithm. This algorithm could quickly find a collision-free trajectory. Ziegler and Stiller [16] divided the space into multiple grids and used A* algorithm to search for the optimal lanechanging trajectory.
The geometric curve planner is the most widely employed technique in lane-changing trajectory planning. This planner not only takes the safety and comfort constraints into account, but also is applicable to the moving obstacles environment. Wan et al. [17] showed a trajectory planning strategy based on the trapezoidal acceleration curve, which ensured that the curvatures of the initial point and end point were not too large. Chen et al. [18] developed a modified Bezier trajectory planning model by adjusting the position of the control point. Funke and Gerdes [19] employed the clothoid curve to describe the continuous and smooth lanechanging trajectory. Luo et al. [9] adopted the quantic polynomial curve to plan the trajectory. Following the trajectory generated by the geometric curve planner, the ego vehicle could complete the lane-changing manoeuvre as soon as possible while satisfying the safety constraint.
The APF planner has been applied in the field of lane-changing trajectory planning in recent years. This method plans the motion trajectory of the ego vehicle by calculating the resultant force of repulsion and gravity. For example, Huang et al. [20] used the APF algorithm to generate a collision-free lane-changing trajectory based on the known final position. Moreover, the neural network planner is also a good solution for the lane-changing trajectory planning problem. Xie et al. [21] established a neural network model, whose parameters were trained through Next Generation Simulation (NGSIM) data. When inputting the current traffic states, the model could predict the lane-changing trajectory automatically.
Various trajectory planning techniques have their own performance characteristics. However, several common

IET Smart Cities
This is an open access article published by the IET under the Creative Commons Attribution -NonCommercial License (http://creativecommons.org/licenses/by-nc/3.0/) 1 disadvantages exist in the above studies. First, according to the real roads design [7,8], the geometric line-types of the roads are composed of straight lines, transition curves and circular curves. The previous models usually planned the lane-changing trajectories on straight or curved roads without considering the combination of multiple road line-types, which was inconsistent with the realworld traffic environment. Second, most conventional planners only focused on the lane-changing manoeuvre while the process of connecting the lane-changing manoeuvre with the car-following manoeuvre was ignored. Third, in previous studies, only one or two vehicles around the ego vehicle were taken into account or the speeds of surrounding vehicles were constants.
Starting from the limitations of these studies, this paper proposes a lane-changing trajectory planning method that can be applied in various road line-types. The main advantages of our method over conventional planners are highlighted as follows: (i) In this study, according to the coordinates of the sample data points on the roads, the road functions can be approximated directly by the polynomial regression model. This method is not required to know the geometric design of roads and is not restricted by the road line-types.
(ii) In this study, the process of connecting the lane-changing manoeuvre with the car-following manoeuvre is discussed. To ensure that the ego vehicle switches to the car-following manoeuvre safely and comfortably, the final acceleration of the ego vehicle should be equal to the acceleration derived from the carfollowing model. (iii) In the real-world traffic, the lag vehicle on the target lane may be affected by the lane-changing manoeuvre. Therefore, in this study, we consider that the lag vehicle should maintain the carfollowing manoeuvre with the ego vehicle during the lanechanging process.

Curve function representation of roads
In real-world traffic, the geometric line-types of the roads usually are composed of straight lines, transition curves and circular curves, as shown in Fig. 1. The curvatures of different road sections are different. To ensure that the planned lane-changing trajectory is applied to both straight and curved roads, a novel approach is proposed to describe the roads line-types.
With the help of high-precision maps, the geographic information of the sample data points on the roads can be obtained, including the longitudinal position X, the lateral position Y and the curve distance S initiating from the origin of road to the position of sample points. The geographic information is stored offline. When a lane-changing intention is generated, according to the current position of the ego vehicle, a certain range of sample points is used as candidate points to approximate the surrounding road curves automatically.
Previous studies [22][23][24] have confirmed that polynomial regression models can be used to approximate road curves very well. On the basis of these studies, we also adopt the polynomial functions to represent road information Y X , Y * X , X S and X * S , where Y X and X S are the curve functions of the current lane and Y * X and X * S are the curve functions of the target lane. The parameters of these functions are calculated through the leastsquares method. This method is not required to know the geometric shapes of roads and the types of curves. When the ego vehicle finishes the lane-changing manoeuvre at moment T, we assume that the traffic states of the ego vehicle at T should satisfy three conditions. First, the ego vehicle should reach to the centreline of the target lane. Second, the speed direction of the ego vehicle should be consistent with the tangential direction of the final position. Third, the planned acceleration of the ego vehicle should be equal to the acceleration calculated by the carfollowing model.

Description of trajectory planning problem
To model the lane-changing trajectory, a suitable function should be selected. Here, the quintic polynomial based on time is employed. This type of curve has the advantage of a quartic order smoothness [11,25], which means the positions, speeds, accelerations and jerks of the ego vehicle are continuous and smooth. The specific polynomial functions are as follows: x 0 t = a 0 + a 1 t + a 2 t 2 + a 3 t 3 + a 4 t 4 + a 5 t 5 (1) where x 0 t and y 0 t represent the longitudinal and lateral positions of the ego vehicle at t, respectively; a 0 , …, a 5 and b 0 , …, b 5 are the polynomial parameters. About 12 unknown parameters need to be determined in (1) and (2). Since the current traffic states of the ego vehicle can be collected through the onboard sensing system, it is easy to solve the values of a 0 , a 1 , a 2 , b 0 , b 1 and b 2 , as shown in (3). The current moment is defined as t = 0 To obtain the complete lane-changing trajectory functions, the parameters a 3 , a 4 , a 5 , b 3 , b 4 , b 5 and total lane-changing time t f also need to be calculated. Therefore, we treat these unknown variables as free variables and then establish a non-linear optimisation model to solve the lane-changing trajectory. In the following sections, we will describe the non-linear optimisation model in detail, including the safety constraints, comfort constraints and objective function.

Safety constraints
To avoid the potential collisions, the ego vehicle should maintain a safe distance from surrounding vehicles during lane-changing process. However, the definition of a safe distance between vehicles is different in various studies, and it mainly depends on the selection of the vehicle model. An appropriate vehicle model for our model is necessary. Early studies [26,27] have regarded the vehicle as a particle to simplify the calculation process, while the size of vehicle was ignored. Then, some researchers [28,29] have used a circle wrapped around the vehicle to build the vehicle model, which treated the length of the vehicle as the diameter of circle, as shown in Fig. 3a. In this kind of vehicle model, the lateral space is too large and may even exceed the lane width. Furthermore, some studies [30,31] have simplified the vehicle as an elliptical shape, as shown in Fig. 3b. This method can reduce the lateral space of the vehicle model, but the collision control points are difficult to determine.
On the basis of the above geometric characteristics analysis of various vehicle models, we adopt a vehicle model that divides the vehicle into several circles [32]. As shown in Fig. 3c, the radius of the smallest overlapping circles that completely cover the vehicle is selected as the radius of the circles, and the centre points of these circles are located on the longitudinal axis of the vehicle. Therefore, the portion enclosed by circles can represent the area of the entire vehicle. As for the exact positions of centre points of circles, we can first calculate the radius of the circle approximately according to the vehicle width. Then, the number of circles is calculated using the geometric method according to the vehicle length. Finally, the exact positions of centres of circles can be obtained. Here, the radius of the circle is obtained based on the critical state, in which the ego vehicle avoids the potential collisions from other vehicles. In real-world lane-changing manoeuvres, the radius of the circles covering the vehicle can be appropriately increased according to the driver's psychological expected distance between two vehicles, so that the security zone is expanded. It should be noted that since the size of the vehicle is known, the parameters of vehicle model could be obtained offline and need not be corrected in real time during trajectory planning. This type of vehicle model can accurately simulate the size of the vehicle and the distance between vehicles can be calculated easily.
The mechanism of collision-avoidance algorithm is presented in Fig. 4. In this figure, the vehicle is composed of five circles with diameter m and k is used to denote the index of circle. When the lane-changing manoeuvre is implemented in real word, the number of circles and radius of the circle should be determined by the size of the vehicle and the driver's psychological expected distance.
We first discuss the collision-avoidance constraint between the ego vehicle and vehicle 1. The Euclidean distance between these two vehicles should be greater than the diameter m at t i , as shown below: where x 1, i 1 and y 1, i 1 denote the longitudinal and lateral positions of the first circle centre of vehicle 1 at t i , respectively, whose values can be solved from x 1, i , y 1, i . Once s 1, i is known, x 1, i and y 1, i can be obtained by the road functions X s 1, i and Y x 1, i , respectively. s 1, i is the curve distance between the position of vehicle 1 and the origin of the current lane at t i . The value of s 1, i is calculated as shown below: where s 1, 0 is the curve distance between the current position of vehicle 1 and the origin of the current lane; v 1, 0 is the current speed of vehicle 1; and a 1, 0 is the current acceleration of vehicle 1. Equation (6) is the collision-avoidance constraint between the ego vehicle and vehicle 2. We consider that the Euclidean distance between the centres of these two vehicles should be greater than the diagonal length h of the vehicle In (6), x 2, i and y 2, i are the longitudinal and lateral positions of vehicle 2 at t i . We can get the values of x 2, i and y 2, i from the road functions X * s 2, i and Y * x 2, i . Here, s 2, i is calculated as follows: where s 2, 0 is the current curve distance; v 2, 0 is the current speed of vehicle 2; a 2, i is the acceleration of vehicle 2 at t i ; j 2 is the jerk of vehicle 2 that is constant; and we set −3 m/s 3 < j 2 < 3 m/s 3 . Similarly, (8) ensures that the Euclidean distance between the ego vehicle and vehicle 3 is greater than the diagonal length h of the vehicle. We use x 3, i and y 3, i to represent the longitudinal and lateral positions of vehicle 3 at t i . The values are derived from the road functions X * s 3, i and Y * x 3, i We consider that once constraints (4), (6) and (8) are met, the ego vehicle will avoid the potential collisions with surrounding vehicles during lane-changing process. In these constraints, m is used to denote the diameter of circle and h is used to denote the diagonal length of vehicle. Since the size of the vehicle is known, the values of these parameters can be calculated offline. The parameters values of different types of vehicles are different.

Acceleration constraints by the car-following model
As the proposed method focuses on automatically planning the optimal lane-changing trajectory for an intelligent vehicle, we consider that the ego vehicle will shift from the lane-changing manoeuvre to the car-following manoeuvre at t f . To maintain ride comfort and safety after the lane-changing manoeuvre, the final acceleration of the ego vehicle a 0, f should trend toward the carfollowing acceleration c v 0, f , v 3, f , Δs , as shown below: where v 0, f and v 3, f are the final speeds of the ego vehicle and vehicle 3, respectively; Δs is the distance between the ego vehicle and vehicle 3 at t f . The values of Δs and v 3, f are calculated as (10) and (11). We put this car-following constraint into the proposed non-linear optimisation model, and the generated lane-changing trajectory for automated vehicles can meet this requirement: We choose the linear dynamic model [33] as the underlying carfollowing model. In our study, since the ego vehicle follows behind vehicle 3 at the end of the lane-changing process, the car-following acceleration of the ego vehicle c v 0, f , v 3, f , Δs can be given as: There are three pre-specified parameters in the above car-following model. Here, w 1 and w 2 denote the variation rate of the distance gap and the variation rate of the speed gap between the ego vehicle and vehicle 3, respectively; Δs * denotes the ideal distance gap between the ego vehicle and vehicle 3. The function of the three parameters is to help the ego vehicle reach the equilibrium condition as soon as possible by adjusting its acceleration. Following Pariota et al. [33], the parameters in the model are set as w 1 = 0.0343, w 2 = 0.948 and Δs * = 30. Moreover, in the real-world traffic, vehicle 2 may be affected by the lane-changing manoeuvre. Therefore, we consider that vehicle 2 should maintain the car-following manoeuvre with the ego vehicle during the lane-changing process. The constraint is as follows: where a 2, i is the acceleration of vehicle 2 at t i , c v 2, i , v 0, i , Δs 2, 0 is the acceleration calculated from the car-following model at t i .

Ride comfort constraints
To guarantee a comfortable lane-changing manoeuvre, the speeds v 0 x t i , v 0 y t i , accelerations a 0 x t i , a 0 y t i and jerks j 0 x t i , j 0 y t i of the ego vehicle should be set in certain boundaries, as shown below: The kinematic constraint of lane-changing manoeuvre is also considered. The final speed direction of the ego vehicle should be consistent with the tangent direction of the target position, as shown below: v where v 0 x t f and v 0 y t f represent the longitudinal and lateral speeds of the ego vehicle at t f , respectively; Y * X is the target lane function; and x 0, f is the longitudinal position of the ego vehicle at t f .

Objective function
In real-world traffic environment, the ego vehicle tends to finish the lane-changing manoeuvre as soon as possible while satisfying comfort requirements. Therefore, the efficiency and comfort should be considered simultaneously on finding the optimal lane-changing trajectory. On the basis of these two factors, we have constructed the objective function, as shown below: where a 0 x t and a 0 y t are the longitudinal and lateral accelerations of the ego vehicle, respectively; j 0 x t and j 0 y t are the longitudinal and lateral jerks of the ego vehicle, respectively; and t f is the total lane-changing time.
During lane-changing process, the passengers will feel comfortable when the accelerations and jerks of the ego vehicle are small, so a 0 x t , a 0 y t , j 0 x t , j 0 y t are used to reflect the comfort in (21). On the other hand, the total time of lane-changing t f can represent the efficiency. Short time indicates high efficiency.

Lane-changing trajectory planning based on the nonlinear model
After receiving the lane-changing decision, our proposed trajectory planning model will work. The steps are as follows: there is no feasible solution, the current lane will continue to be used, and the planner will iterate the above three steps until a feasible lane-changing trajectory is planned.
Remarks: In this paper, we aim at planning the lane-changing trajectories for intelligent vehicles in dynamic traffic environment, while the decision-making module and trajectory-tracking module are not within the research scope. When the ego vehicle makes a lane-changing decision, the proposed trajectory planning model will work. If a feasible solution is found, we consider that the lanechanging manoeuvre can be carried out; otherwise, the current lane will continue to be used.

Solution techniques
We adopt the sequence quadratic programming (SQP) algorithm to solve this non-linear optimisation model. Previous studies [34][35][36] prove that SQP algorithm can find the feasible solution for the nonlinear problem well. However, an arbitrary initial guess may result in long solving time. For this, we have designed a simple and effective way to find a suitable initial guess.
In the proposed lane-changing trajectory planning model, the parameters a 3 , a 4 , a 5 , b 3 , b 4 , b 5 and the total lane-changing time t f need to be optimised. Therefore, we first use the ã 3 , ã 4 , ã 5 , b 3 , b 4 , b 5 and t~f to denote the values of initial guess, and then the following equations can be constructed: x 0, f = a 0 + a 1 t~f + a 2 t~f 2 + ã 3 t~f 3 + ã 4 t~f 4 + ã 5 t~f v 0, f x = a 1 + 2a 2 t~f + 3ã 3 t~f 2 + 4ã 4 t~f 3 + 5ã 5 t~f 4 (24) v 0, f y = b 1 + 2b 2 t~f + 3b 3 t~f 2 + 4b 4 t~f 3 + 5b 5 t~f a 0, f y = 2b 2 + 6b 3 t~f + 12b 4 t~f Here, we assume that the speed of the ego vehicle v 0, f is equal to the speed of vehicle 3 v 3, f at t f . For (24) and (25), we can obtain v 0, f x and v 0, f y based on v 0, f . Similarly, we pre-specify the value of Δs, where Δs is the curve distance between vehicle 3 and the ego vehicle at t f . Then, the final acceleration of the ego vehicle a 0, f can be derived from c v 0, f , v 3, f , Δs . For (26) and (27), a 0, f x and a 0, f y are determined based on a 0, f . Since Δs has been pre-specified, we can obtain x 0, f and Y x 0, f directly through (22) and (23).
After determining x 0, f , Y x 0, f , v 0, f x , v 0, f y , a 0, f x and a 0, f y , the suitable initial solution ã 3 , ã 4 , ã 5 , b 3 , b 4 , b 5 , and t~f can be found by solving (22)- (27). The solution method is the Newton method, which has the fast convergence and high efficiency.

Simulation and discussion
In this section, the proposed lane-changing trajectory planning model is validated. The simulation platform is based on MATLAB.
To confirm the affectivity of the proposed model, we describe two typical scenarios, i.e. the ego vehicle changes lane at high speed and the ego vehicle changes lane at low speed. According to the previous studies [9,11,37], it can be concluded that the initial speed of the ego vehicle is usually set between 15 and 25 m/s. In this study, we randomly generate 100 lane-changing scenarios with the initial speed of the ego vehicle between 15 and 25 m/s. The results show that among the lane-changing scenarios, where the feasible trajectories can be found, the lowest vehicle speed is ∼18 m/s and the highest vehicle speed is ∼23 m/s. Therefore, in the following two lane-changing simulation experiments, we suppose that 23 m/s is a high speed and 18 m/s is a low speed. Table 1 presents the parameters of the two lane-changing scenarios, including the initial traffic states of the ego vehicle and the surrounding vehicles (positions, speeds and accelerations), the lower and upper boundaries for traffic states and the constant quantities of the model. Using the traffic information as the input variables, the planner can automatically plan the feasible and safe lane-changing trajectories for the two lane-changing scenarios. The experimental vehicle is a typical B-class hatchback and this study assumes that the sizes of the experimental vehicles are same. In the following section, the two lane-changing simulation experiments will be described in detail. For each experiment, three aspects of the simulation results are represented, including the motion of vehicles, the comparison between the proposed model and the traditional model, and the variations of the traffic states of the ego vehicle during the lane-changing process.

Lane-changing at high speed
In this scenario, the ego vehicle changes lane at a speed of 23 m/s. Through inputting the relevant parameters of Table 1, the safe and comfortable lane-changing trajectory can be planned. The simulation results indicate that the lane-changing longitudinal distance x 0, f is 147 m, the lane-changing time t f is 7.44 s, and the total planning time is 0.083 s with the i5 processor. The trajectories of vehicles in this scenarios are shown in Fig. 5.
It can be seen from Fig. 5 that the ego vehicle does not collide with the surrounding vehicles during the lane-changing process. Therefore, we can confirm that the planned trajectory by the proposed model is safe. Fig. 6 presents the real-time distance of the ego vehicle and surrounding vehicles during lane-changing process. Here, the distance denotes the driving distance from the origin point to the current position, where the initial position of the ego vehicle is defined as the origin point. From Fig. 6, it can be seen that there is no intersection point of the distance profile of the ego vehicle and the distance profiles of other vehicles, which indicates that the ego vehicle does not collide with other vehicles. The distance profiles of vehicle 1 and vehicle 3 almost coincide at the beginning of the lane-changing. However, these two vehicles will not collide with each other, since vehicle 1 and vehicle 3 are not in the same lane.
The conventional quantic polynomial model is a classic method to deal with the lane-changing trajectory planning problem. By inputting the initial traffic states of relevant vehicles, the conventional model can automatically plan the lane-changing trajectory. We employ this conventional method to be as the competitor. The initial traffic states of the vehicles in the conventional model are the same as these in the proposed model, so as to explore the difference between the lane-changing trajectories generated by the two models. The trajectory generated by the conventional planner is shown in Fig. 7. Since both vehicles 2 and 3 maintain a safe distance from the ego vehicle in the scenario, where the lane-changing trajectory is generated using the conventional planner, for clarity, only the trajectories of the ego vehicle and vehicle 1 are shown in Fig. 7. From Fig. 7, it can be seen that ego vehicle collides with vehicle 1 at 3.2 and 4.0 s, so that the planned trajectory by the competitor is not ideal.
Furthermore, the stability of the ego vehicle in lane-changing is tested. Figs. 8a Table 2. These parameters indicate that the ego vehicle can track the planned lane-changing trajectory safety, smoothly and efficiently.
The above comparisons and verifications prove that the proposed trajectory model can be applied in a high-speed environment.

Lane-changing at low speed
In this scenario, the ego vehicle changes lane at a speed of 18 m/s. On the basis of the relevant parameters of Table 1, the planner can automatically plan the feasible and safe lane-changing trajectory. From the simulation results, it can be concluded that the final longitudinal distance x 0, f is 72 m, the lane-changing time t f is 4.57 s and the solution is solved within 0.12 s by an i5 processor. Fig. 9 presents the trajectories of vehicles, as follows.
In Fig. 9, there are no collisions between the ego vehicle and other vehicles in lane-changing, which indicates that the proposed planning strategy is valid.
The real-time distance of the relevant vehicles during lanechanging process is shown in Fig. 10. The distance profile of the ego vehicle and the distance profiles of other vehicles have no intersection point, which proves that the ego vehicle does not collide with other vehicles.  Next, the same conventional planner is adopted for comparison. We set that the input variables of the conventional model are the same as these in the proposed model. On the basis of this, the difference between the lane-changing trajectories generated by the two models can be explored. The experiment result is illustrated in Fig. 11. Since the ego vehicle does not collide with vehicle 2 in the scenario, where the lane-changing trajectory is generated using the  conventional planner, for clarity, only the trajectories of the ego vehicle, vehicle 1 and vehicle 3 are shown in Fig. 11. As shown in Fig. 11, the ego vehicle collides with vehicle 1 at 2.5 s, with vehicle 3 at 3.5 s. Although the ego vehicle can reach the target position by the conventional quantic polynomial model, the safety of the planned trajectory may not be guaranteed. Fig. 12 presents the lane-changing performance of vehicle in this scenario. In Figs. 12a-d, the lateral and longitudinal speeds and accelerations of the ego vehicle are both continuous and smooth. Table 3 indicates that variations of the trajectory performance parameters are small. By analysing these motion characteristics, we conclude that the ego vehicle is stable when it tracks the planned lane-changing trajectory in a low-speed environment.

Trajectory correction scenario
If the surrounding traffic environment is in emergent condition and not suitable for continuing changing lanes, the ego vehicle will return to the original lane and the trajectory will be corrected. The corrected trajectory is still planned with the proposed trajectory planning model and the original lane is used as the target lane. In this scenario, vehicle 3 suddenly brakes in an emergency at 2.5 s. The ego vehicle perceives that the distance between itself and vehicle 3 will become very short and there may be a potential collision. Therefore, the lane-changing trajectory is corrected. The simulation results show that the final longitudinal distance x 0, f is 136 m and the total driving time is 6.65 s. Solution is found within 0.172 s by the i5 processor. The trajectories of vehicles in this scenario are shown in Fig. 13. During the corrected trajectory planning process, we assume that vehicle 2 follows the lead vehicle politely, so that the motion of vehicle 2 after correcting the lanechanging trajectory (i.e. 2.5 s later) is not discussed. In Fig. 13, the corrected trajectory planned by the proposed model backs to the original lane successfully. During the process, the ego vehicle does not collide with the surrounding vehicles. It is concluded that the proposed method is effective to the traffic condition, in which the lane-changing process is interrupted.
Furthermore, the real-time distance of the relevant vehicles is shown in Fig. 14. From this figure, it can be observed that vehicle 3 breaks suddenly at 2.5 s, and its speed decreases sharply. If the ego vehicle does not correct the trajectory, it is likely to collide with vehicle 3.

Conclusions
In this paper, we propose a lane-changing trajectory planning method that can be applied to the various road line-types. The method first uses the polynomial regression model to represent the road curve, and then a non-linear optimisation model is constructed to generate the lane-changing trajectory based on the road curve functions. Compared to the traditional model, the proposed nonlinear model combines the car-following manoeuvre with the lanechanging manoeuvre, which is consistent with the real traffic environment. Moreover, to improve the efficiency of the solution, a novel approach for finding the suitable initial guess is proposed. The simulation results demonstrate that the traffic state profiles generated by the proposed model are smooth and continuous, and the automated vehicle can avoid potential collisions efficiently during the lane-changing process. In the future, we will focus on other modules of the automated lane-changing system for building a complete lane-changing model.