1 Introduction

Thanks to the breakthroughs on sensing technologies and internet of things, intelligent vehicles have attracted considerable attentions nowadays [1,2,3]. Lane changing is a kind of basic driving operation after the intelligent vehicle merge into the traffic flow. The prerequisite of intelligent vehicle lane changing is the design of lane changing path [4]. The design of lane changing decides whether the intelligent vehicle can operate safely, smoothly and fast during lane changing process, while the research on lane changing path has great meaning in improving traffic flux, reducing vehicle delay and jam [5]. The purpose of designing lane changing path is to provide a virtual path for the vehicle to transfer safely and smoothly from the current lane to the target lane. Focus of consideration lies on (1) the lateral acceleration of the vehicle when it drives along the designed path must meet with the safe driving condition, and (2) no jump movement on the moving direction of the vehicle is allowed during the lane changing process [6, 7] (Fig. 1).

Fig. 1
figure 1

The lane changing method of the boss intelligent vehicle

The lane changing models for intelligent vehicle mainly are: constant-speed shift lane changing path, circular lane changing path, sine-function lane changing path, etc. During the DAPPA intelligent vehicle contest held in America, the intelligent vehicle ‘Boss’ from the Carnegie Mellon University and the intelligent vehicle ‘Junior’ from the Stanford University had both demonstrated fine autonomous lane changing control ability of their own. The lane changing method of the intelligent vehicle ‘Boss’ was developed based on the car-following state [8]. If the current speed and following distance of the car are not met to the target values, the intelligent vehicle will change the lane under safe conditions. The lane changing method of the ‘Junior’ intelligent vehicle was as follows [9]: (1) when the vehicle runs after a running vehicle, it will not change lane, but to follow the vehicle before it; (2) when the vehicle in the front appears to be an obstacle, the vehicle will first detect the edge of the obstacle vehicle by utilizing A* algorithm and design a path to avoid the obstacle vehicle, then the intelligent vehicle will use its maximum allowed speed to finish lane changing once the path is determined, based on the vehicle’s position error model; (3) the intelligent vehicle will consider returning to its original lane when any driving vehicle in the target lane poses a safety threat to the lane changing process, as shown in Fig. 2.

Fig. 2
figure 2

The lane changing method of the junior intelligent vehicle

Furthermore, the model predictive control (MPC) [10] and nonlinear MPC [11] were used for lane changing control. The adaptive safe-distance lane changing model was developed for intelligent vehicles [12]. In [13], a novel lane changing path was designed based on the sine function by introducing the hyperbolic tangent function. A second-stage design was then conducted by utilizing the fourth-order B sampling interpolation technique. The design showed acceptable results in simulation testing. The lane changing process was considered to have four periods, swing-angle, approaching, angle-enclosure and adjusting in [14]. Three parameters were introduced in the modeling process: front-wheel steering angle, swing-angel duration time and enclosure heading angle. The vehicle movements predicted by the model appears to be a complete match to the lane changing operations in real pilot-drive lane changing process.

This paper proposes a novel lane changing method based on design principle concluded from the combined knowledge of (1) problems in design of lane changing path, such as jump in path curvature at the beginning and the end of the path, the existence of step-wise jump points along the moving direction of the vehicle; (2) several classic problems in free lane changing model research. The proposed model is applied in simulation and experimental testing and has demonstrated expected effect.

2 Design and analytical solution of the lane changing path

Firstly, this paper gives a brief summary to the design principle of lane changing path based on the literature review above:

  1. 1.

    Utilizing the outstanding smoothness of sine function based lane changing path;

  2. 2.

    Utilizing the characteristic of the linear function in constant-speed shift lane changing path, which can demonstrate the ‘approaching’ period proposed in [14] to some extent;

  3. 3.

    Further improve or resolve the condition of step-wise jump in the lateral acceleration along the moving direction of the vehicle.

Secondly, this paper construct lane changing function based on the path of sine function, as shown in Fig. 3. In Fig. 3, a coordinate system is established with the starting point of the lane changing process being its origin, yd and Ld are the lateral displacement and longitudinal displacement of the vehicle in the lane changing process, respectively. The sine function lane changing path and the constant-speed lane changing path are defined as:

$$ \left\{ {\begin{array}{*{20}c} {Y(x) = \frac{{y_{d} }}{2}\left\{ {1 - \cos \left( {\frac{x}{{L_{d} }}\pi } \right)} \right\}} \\ {Y(x) = \frac{{y_{d} }}{{L_{d} }}x} \\ \end{array} } \right. $$
(1)
Fig. 3
figure 3

Sine function lane changing path

Combining the feature of the two methods, this paper construct a novel lane changing function called X-Sin as:

$$ \left\{ \begin{aligned} Y(x) = \frac{{y_{d} }}{2\pi }\left[ {\frac{2\pi }{{L_{d} }}x - \sin \left( {\frac{2\pi }{{L_{d} }}x} \right)} \right]\;,\;\;x \in [0,L_{d} ] \hfill \\ L_{d} = V\sqrt {\frac{{2\pi y_{d} }}{{a_{\hbox{max} } }}} \hfill \\ t_{\text{d}} = \frac{{L_{d} }}{V}{ = }\sqrt {\frac{{2\pi y_{d} }}{{a_{\hbox{max} } }}} \hfill \\ \end{aligned} \right. $$
(2)

where amax is the maximum lateral acceleration and amax = V2Kmax. And Kmax is the maximum of the lane changing path curvature which can be calculated as

$$ K = \frac{{|\ddot{Y}(x)|}}{{\left[ {1 + \dot{Y}(x)^{2} } \right]^{3/2} }} $$

The first-order derivative and the second-order derivative of are Y(x), as shown in Fig. 4:

Fig. 4
figure 4

X-Sin function lane changing path

$$ \left\{ {\begin{array}{*{20}c} {\dot{Y}(x) = \frac{{y_{d} }}{2\pi }\left[ {\frac{2\pi }{{L_{d} }} - \frac{2\pi }{{L_{d} }}\cos \left( {\frac{2\pi }{{L_{d} }}x} \right)} \right]\;,\;\;x \in [0,L_{d} ]} \\ {\ddot{Y}(x) = \frac{{2\pi y_{d} }}{{L_{d}^{2} }}\sin \left( {\frac{2\pi }{{L_{d} }}x} \right)\;,\;\;x \in [0,L_{d} ]} \\ \end{array} } \right. $$
(3)

Therefore, the X-Sin lane changing function constructed in this paper has the following characteristic: (1). The X-Sin lane changing function and its first-order and second-order derivatives are all continuous and differentiable; (2). The X-Sin function has limits in the boundary of \( \;x \in [0,L_{d} ] \) where \( \dot{Y}(0) = 0 \) and \( \ddot{Y}(L_{d} ) = 0 \); (3). The path is smooth and has no sharp or jump point, as shown in Fig. 4. Besides, the X-Sin lane changing path has advantage in two aspects:

  1. 1.

    Solved the problem of the nonzero curvature at the terminal points of the lane changing path. Avoided the trouble brought up by second-stage design. In [14] and [15], the methods proposed had second-stage design on the sine function path using third-order B sampling interpolation function and had the problem of zero-point at the terminal points of the lane changing path.

  2. 2.

    Near the point \( x = L_{d} /2 \), the X-Sin lane changing function basically expressed the characteristic of linear function, demonstrated the approaching process during lane changing process which is consistent with the intent of lane changing function design.

3 Tracking control of lane changing path

3.1 Vehicle position error model

This paper uses N as vehicle datum point and its pre-aiming point Nc (a point on the lane changing path) as reference point, as shown in Fig. 5. Define the vehicle’s true position vector P(t) as:

$$ P(t) = \left[ \begin{aligned} y(t) \hfill \\ \phi (t) \hfill \\ \end{aligned} \right] $$
(4)

where ϕ(t) is the heading angle and y(t) is the lateral displacement.

Fig. 5
figure 5

Schematic of vehicle position error

Then, the error between the vehicle’s true position and reference position can be expressed by Pe:

$$ P_{e} = \left[ \begin{aligned} e_{l} \hfill \\ e_{\phi } \hfill \\ \end{aligned} \right]{ = }\left[ {\begin{array}{*{20}c} {(y(t) - y_{c} )\cos (\phi (t) - \phi_{c} )} \\ {\phi (t) - \phi_{c} } \\ \end{array} } \right] $$
(5)

As the heading angle ϕ(t) of the vehicle during lane changing process is normally less than \( {\pi \mathord{\left/ {\vphantom {\pi 6}} \right. \kern-0pt} 6} \), eϕ ≈ sin(eϕ), we can get:

$$ \left\{ {\begin{array}{*{20}c} {\dot{e}_{l} = v_{N} e_{\phi } - v_{N} \tan \theta (t)} \\ {\dot{e}_{\phi } = \frac{{v_{N} }}{d}\tan \theta (t)} \\ \end{array} } \right. $$

Establish the vehicle position error model as follows:

$$ \left[ {\begin{array}{*{20}c} {\dot{e}_{l} } \\ {\dot{e}_{\phi } } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 0 & {v_{N} } \\ 0 & 0 \\ \end{array} } \right]\left[ \begin{aligned} e_{l} \hfill \\ e_{\phi } \hfill \\ \end{aligned} \right] + \left[ \begin{aligned} - v_{N} \hfill \\ \frac{{v_{N} }}{d} \hfill \\ \end{aligned} \right]\tan \phi (t) $$
(6)

where vN is the velocity of the vehicle, d is the axle-base between the front-wheel and the rear-wheel. The equation can be rewritten in a generic way as:

$$ {\dot{\mathbf{X}}} = A{\mathbf{X}} + B{\mathbf{U}} $$
(7)

where \( {\mathbf{X}}{ = }\left[ \begin{aligned} e_{l} \hfill \\ e_{\phi } \hfill \\ \end{aligned} \right],A = \left[ {\begin{array}{*{20}c} 0 & {v_{N} } \\ 0 & 0 \\ \end{array} } \right],B = \left[ \begin{aligned} - v_{N} \hfill \\ \frac{{v_{N} }}{d} \hfill \\ \end{aligned} \right],{\mathbf{U}} = \tan \phi (t) \)

3.2 Tracking controller

Based on the generic expression of the vehicle’s position error model, set the cost function as:

$$ J = \int_{0}^{\infty } { [{\mathbf{X}}^{{\mathbf{T}}} (t )Q{\mathbf{X}} (t ) + {\mathbf{U}}^{T} (t )R{\mathbf{U}} (t ) ]} dt $$
(8)

And the optimum gain of control is:

$$ {\mathbf{U}}^{*} (t) = - K^{*} {\mathbf{X}}^{*} (t) $$
(9)

where \( K^{*} = R^{ - 1} B^{T} P \) and P is the orthogonal symmetrical solution of the following Riccati equation.

$$ - \,PA - A^{T} P + PBR^{ - 1} B^{T} P - Q = 0 $$
(10)

Here we define

$$ Q = \left[ {\begin{array}{*{20}c} {q_{11} } & 0 \\ 0 & {q_{22} } \\ \end{array} } \right],R = r,P = \left[ {\begin{array}{*{20}c} {p_{11} } & {p_{12} } \\ {p_{21} } & {p_{22} } \\ \end{array} } \right] $$
(11)

Substitute Q, R and P into Eq. (10) and get:

$$ \begin{aligned} - \left[ {\begin{array}{*{20}c} {p_{11} } & {p_{12} } \\ {p_{21} } & {p_{22} } \\ \end{array} } \right].\left[ {\begin{array}{*{20}c} 0 & {v_{N} } \\ 0 & 0 \\ \end{array} } \right] - \left[ {\begin{array}{*{20}c} 0 & 0 \\ {v_{N} } & 0 \\ \end{array} } \right].\left[ {\begin{array}{*{20}c} {p_{11} } & {p_{12} } \\ {p_{21} } & {p_{22} } \\ \end{array} } \right] \hfill \\ { + }\left[ {\begin{array}{*{20}c} {p_{11} } & {p_{12} } \\ {p_{21} } & {p_{22} } \\ \end{array} } \right].\left[ \begin{aligned} - v_{N} \hfill \\ \frac{{v_{N} }}{d} \hfill \\ \end{aligned} \right]\frac{1}{r}\left[ {\begin{array}{*{20}c} { - v_{N} } & {\frac{{v_{N} }}{d}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {p_{11} } & {p_{12} } \\ {p_{21} } & {p_{22} } \\ \end{array} } \right] \hfill \\ \_\left[ {\begin{array}{*{20}c} {q_{11} } & 0 \\ 0 & {q_{22} } \\ \end{array} } \right] \hfill \\ = \left[ {\begin{array}{*{20}c} 0 & 0 \\ 0 & 0 \\ \end{array} } \right] \hfill \\ \end{aligned} $$
(12)

Since matrix P is a symmetric matrix, p12 = p21. Re-arrange Eq. (12) and get the solving equations for P as:

$$ \left\{ \begin{aligned} p_{11}^{2} - \frac{{p_{12}^{2} }}{{d^{2} }} = \frac{{q_{11} r}}{{v_{N} }} \hfill \\ p_{12} - \frac{{p_{12}^{2} }}{{d.p_{11} }} - \frac{{p_{22} }}{d} - \frac{{p_{22} p_{12} }}{{d^{2} .p_{11} }} = \frac{r}{{v_{N} }} \hfill \\ \frac{{v_{N} }}{r}\left( {p_{12}^{2} - \frac{{p_{22}^{2} }}{{d^{2} }}} \right) - 2p_{12} = \frac{{q_{22} }}{{v_{N} }} \hfill \\ \end{aligned} \right. $$
(13)

4 Free lane changing control simulation and experiments

To validate the effectiveness of the proposed X-Sin lane changing path function and the tracking ability of the designed controller, MATLAB simulation and real-vehicle lane changing experiment were conducted.

4.1 X-Sin lane changing model simulation

Since the velocity of the intelligent vehicle is constantly varying when the vehicle actually merges into traffic on highway, the value of \( L_{d} \) is indefinite. In order to ensure the safety of the vehicle during high-speed driving, amax of the vehicle is limited within 1 m/s2 in this research. Figure 6 shows the relationship between the longitudinal distance of the intelligent vehicle, Ld, and the vehicle’s velocity, V, the maximum lateral acceleration, amax.

Fig. 6
figure 6

X-Sin lane change path function characteristic

Suppose the current velocity is 50 km/h, i.e., V ≈ 13.89 m/s. Referring to the GB standard, set \( y_{d} \) to 3.75 m. Substitute the quantities into Eq. (2) and get Ld ≈ 67.42 m,td ≈ 4.85 s. Meanwhile, assuming that V = 25 m/s, set Ld = 100 m, we can obtain that the maximum lateral acceleration during lane changing is about 0.147 g, and it is in accord with the requirements of the simulation test in the literature [10], and the tracking at the beginning of the lane change trajectory is smooth, and with no curvature mutation. Let the vehicle velocity varies between 50 km/h and 20 km/h, the required longitudinal distance for lane changing of that velocity range is shown in Table 1.

Table 1 Relationship between vehicle velocity and longitudinal distance under X-sin lane changing path design

4.2 Tracking control simulation

Set the initial state of the vehicle as [y(0), ϕ(t)] = [0.2, 0], reference velocity as 25 m/s, position error [ye, ϕe] = [0.5, 0]. Based on the proposed X-Sin Lane Changing path function, the effect of designed tracking controller is shown in Fig. 7. Figure 7a is a comparison of the expected lane changing path and the true lane changing path. Figure 7b shows the variation of the expected heading angle and the true heading angle. Figure 7c demonstrates the relationship between the lateral displacement, the longitudinal displacement and the heading angle during the lane changing tracking process.

Fig. 7
figure 7

X-Sin lane changing tracking control diagram

It can be observed from Fig. 7 that the proposed tracking controller has fast and steady tracking ability. The intelligent vehicle achieves the tracking effect of the X-Sin lane changing path with the help of this controller, which provides a good simulation-basis for real-vehicle experimental testing.

4.3 Real-vehicle experimental testing

The JJUV-3 Intelligent Vehicle developed by Army Military Transportation University is used as the real-vehicle testing platform in the experiment of this paper. Regarding the hardware components, the JJUV-3 uses three industrial control machines as its core and it also consists three cameras, three single-line laser radar, one four-line laser radar, one MMW radar, one GPS/inertial-guidance and related shifting, accelerating, braking executors. The VS2008 C# is adopted to develop the vehicle’s decision controlling platform and it is shown in Fig. 8.

Fig. 8
figure 8

JJUV-3 intelligent vehicle platform

Two X-Sin lane changing control experiments with average speed of 22 and 37.55 km/h were conducted, as shown in Fig. 9. The lateral displacement (relative to pre-aiming point) and the heading angle are provided by visual information. The Cartesian coordinate constructed using this information and the driving distance can well describe the true lane changing path of the vehicle. After multiple time experiments and data recording, the intelligent vehicle’s lane changing path and driving state transition are shown in Fig. 10 and Fig. 11, respectively.

Fig. 9
figure 9

Lane changing experiments

Fig. 10
figure 10

X-sin lane changing tracking control experimental results in 22 km/h average speed experiment

Fig. 11
figure 11

X-sin lane changing tracking control experimental results in 35 km/h average speed experiment

It can be observed from Figs. 10 and 11 that the true lateral displacement and the expected lateral displacement of the intelligent vehicle during X-Sin function lane changing control almost match. When the average velocity is 22 km/h, the error of the lateral displacement is within 0.1 m. When the average velocity is 37.55 km/h, the error of lateral displacement is within 0.4 m. Those results indicate that the tracking controller designed above is basically reliable. Besides, it can be observed from vehicle driving state variation curve, its trend is almost consistent with the X-Sin function curve: (1) the longitudinal in the vehicle driving state variation curve almost increases linearly with time; (2) The heading angle can almost reflect the vehicle’s position variation during the lane changing process that it increases slowly first and then decreases slowly. Some points in the figures with large shift in magnitude are the error-detection points in visual data processing and they can be neglected in experimental analysis. Table 2 compares the intelligent vehicle’s true longitudinal lane changing distance and its expected longitudinal lane changing distance under difference driving velocities.

Table 2 Longitudinal lane changing distance under different velocities

Comparing Tables 1 and 2, it can be concluded that the true longitudinal distance, the expected distance and the distance calculated by the model for intelligent vehicle lane changing are almost consistent. However, experimental error over 5% exists in some of the experiments due to the varying vehicle velocity during the lane changing processes.

5 Conclusions

This paper proposes a novel lane changing path based on the X-Sin function which is designed based on sine-function lane changing path by introducing linear constraints. The required longitudinal distance \( L_{d} \), for lane changing is calculated using the vehicle velocity \( V \), the maximum lateral acceleration \( a_{\hbox{max} } \) and the width of road \( y_{d} \). The proposed lane changing path not only ensures that the lane changing path is smooth and free of jump in curvature, but also improves the adaptivity in lane changing path construction. The controller designed based on the quadratic form optimum control realized fast and steady lane changing path tracking. The effectiveness and the steadiness of the lane changing path function and its tracking controller are validated by MATLAB simulation and real-vehicle experiments. Further research will be focused on solving the lane changing path optimization and robust-control under the condition that the lane has an obvious curvature.