1 Introduction

With the rapid development of rail transportation system in recent years, advanced control technology for automatic train operation (ATO) system has attracted considerable attentions, which plays a vital role in ensuring safe, punctual, energy-saving, and comfortable train operation[1]. The ATO system is supposed to automatically control the train speed to follow the designed optimal speed-distance trajectory, by regulating the traction and braking forces. High-precision tracking is an important target of an ATO system, which could guarantee the safety and punctuality. Relatively less adjustment of the control input is another key target, which is considered to be associated with good riding comfort and energy-saving. Consequently, it is necessary to design a precise and practical control algorithm with relatively less adjustment of control input for ATO. However, during the train operation process, the force situations of the train are very complex. For example, the resistance from rail friction, air resistance, payload, slope and curve is varying in different situations which cannot be expressed by precise mathematical expressions. These disturbances increase the difficulty in designing the ATO.

Furthermore, the nonlinearities in basic resistance would influence the train operation significantly as the train speed increases. Also, acquiring the key parameters precisely such as resistance coefficients is difficult in practice, and these coefficients are varying during the train operation. In the early design, proportional integral derivative (PID) control[2,3], fuzzy control[46] and neural network[7] are introduced. However, the control algorithms mentioned above ignore the parametric uncertainties in the dynamic train model, which could give rise to certain control deviation on the train operation.

In the last few years, several researchers undertook various control studies on the external disturbances and dynamic uncertainties during train operation. Terminal iterative learning control (TILC) was developed for controlling the train operation[8, 9]. High-precision velocity tracking can be achieved after multiple iterations using historical data to adjust the parameters of the controller. Note that, the real-time performance is an important factor for control design, which was ignored in [8, 9]. Nonlinear model predictive control (NMPC) was presented in [10], which estimated the model parameters in real time, and dealt with parametric uncertainties via correctly matching the known model library. However, the NMPC method is not practical because precise model parameters are difficult to obtain for the model library. Considering that uncertain aerodynamic drag parameters and the line condition will influence the train’s dynamic behavior, adaptive control is a proper method to deal with the parametric uncertainties and external disturbance in real time, which has been applied to many practical engineering applications, such as the motors control[11], and some other industrial processes[12]. An adaptive control law was designed based on a nonlinear dynamic train model[13, 14], which improved the tracking quality evidently. However, it is a notable disadvantage that the rate of convergence to zero of the tracking error is slow in adaptive control. Once the train is running on the complex line such as numerous ramps and curves, the line resistance becomes a huge disturbance and leads to frequent adjustments of control input. As a result, the normal comfort for passengers would be no longer guaranteed.

Terminal sliding mode control (TSMC) is a finite time stability method[15, 16], which provides faster convergence rate than linear sliding control and realizes controlling the closed-loop system quickly, accurately and efficiently[17, 18]. In light of this, TSMC is particularly suitable for the ATO system. Less adjusting control input could automate operations of trains comfortably, the fast convergence rate could make the system achieve high-precision velocity and position tracking. However, due to the unknown basic resistance coefficient and complex line disturbance, it is impossible to obtain the prior knowledge of the bounds of system uncertainty.

This paper focuses on the control problem of the precise and comfortable train operation. To our best knowledge, adaptive terminal sliding mode control (ATSMC) is a new idea proposed for ATO control method, where a new terminal sliding surface is designed for sliding mode to trap the state trajectory to ensure the stability and robustness. To further ensure the robustness, an adaptive control law is designed for dealing with the system uncertainties. It can be seen that the proposed design can overcome all aforementioned problems. The proposed method can realize exact tracking of the desired speed profile and the position profile with relatively less adjustment of control input.

The rest of the paper is organized as follows. In Section 2, the model of the nonlinear dynamic train system is addressed. The automatic train operation method is then detailed in Section 3. And application of the proposed method with experimental studies are presented in Section 4. Conclusions are given in Section 5.

2 Dynamic train model

2.1 Automatic train control

The architecture of an automatic train control (ATC) system is shown in Fig. 1. The automatic train supervision (ATS) dispatches the information of railway operation plans. When the train is running on the railway line according to the signal system, the ATO system passes the optimal notch to the central control center (CCU) by calculation. The ATO obtains the real-time operating state of the train from the automatic train protection (ATP), including train speed, speed limit, etc. And then the CCU makes logic judgment and passes the corresponding instructions to the traction system or the braking system. The braking system or the traction system will then allocate the matching control force to each carriage of the train according to the real-time information. Thus, the whole process of ATC is realized as described above[19].

Fig. 1
figure 1

ATC system scheme

ATO plays a pivotal role in automatic train control process, which automates operations of trains safely and efficiently. The main function of ATO is to realize the optimization of train operation curve and the real-time train speed control under the protection of ATP[20].The offline optimal operation curve is generated first, then ATO tracks it. Thereby, the labor intensity of the driver is greatly reduced due to the ATO. Namely, ATO ensures comfort, punctuality, accurate stop and energy-saving operation of the rail transportation system.

2.2 Dynamic model of the train

The train operation is a highly nonlinear and uncertain process, so the realization of automatic train operation is a complex nonlinear dynamic control problem. The dynamic model can be expressed as[21]

$$\left\{{\matrix{{\dot x = v} \hfill \cr{\dot v = {{F(t)} \over {M(1 + \gamma)}} - (a + bv + c{v^2}) - g(x)} \hfill \cr}} \right.$$
(1)

where v is the velocity, x is the position. F(t) represents the traction force or braking force. a, b and c are coefficients of the Davis equation, which is the basic resistance relative to rolling mechanical resistance and aero-dynamic drag. M is the vehicle mass, which satisfies that M>0. γ is the rotary mass coefficient, g(x) is the additional resistance that is related to the line, which consists of the ramps, curves and tunnels.

The train suffers from the basic resistance and line additional resistance caused by the environment while running on the line. It is necessary to implement suitable traction or braking force to eliminate the disturbance. Due to the unknown environment, the beforehand experimental parameters a, b and c are untrustworthy, and this will influence the train operation greatly. With the increase of the train speed, the nonlinear impact on system dynamics is increasing significantly, which must be explicitly addressed in control design[13].

The geographical environment of the line also plays a great role in the line additional resistance. It has little effect on the train operation if the line is smooth enough. On the contrary, lots of violent disturbance would be brought about if the line is relatively rough and complex. However, it is unfortunate that mostly the environment of the line is known inaccurately and full of ramps and curves. So the interference caused by the line additional resistance should not be ignored when designing the controller.

In order to precisely analyze the line additional resistance, a rod-shaped homogeneous model is set up as shown in Fig. 2.

Fig. 2
figure 2

Train rod-shaped homogeneous model

The train mass is homogeneously distributed along the train length, the whole train is a rod-shaped homogeneous mass model, which means the train mass per unit length is the same. When computing the additional resistance on the line, the distribution of the train length is considered under the conditions of different lines.

Due to passengers getting on and off, the whole train mass is different in each interval. Considering the parametric uncertainties of the model above, the dynamic train model (1) can be rewritten as

$${M_r}\dot v = u - {M_r}\theta \zeta {(v)^{\rm{T}}}$$
(2)

where M r = M(1 + γ) is the total mass considering the rotating mass. a g = a + g(x) is the sum of the additional resistance and air resistance caused by coefficient a. u = F(t) is the output variable of the controller to be designed, and θ =[a g , b, c], ζ(v) = [1, v, v2]. Now θ and M r are unknown parameters of the model.

As the train is running on the line, it needs to track the desired profile precisely to realize the punctuality and energy saving. So the problem is converted to a tracking problem. A controller needs to be designed to track the desired profile containing the train reference speed and position precisely. Relatively less adjustment of the control input is also a significant factor that ensures the comfort. And the controller should have strong robustness to the disturbance and the parametric uncertainties.

3 Controller design

To achieve automatic train operation perfectly under the uncertain atmosphere, an adaptive terminal sliding mode controller is designed as follows.

3.1 Terminal sliding mode control

First, we define the position tracking error e1 and the speed tracking error e2 as

$$\left\{{\matrix{{{e_1} = x - {x_r}} \hfill \cr{{e_2} = v - {v_r}} \hfill \cr}} \right.$$
(3)

where x r is the desired position and v r is the desired speed. After taking the time derivative of the system above, the new state space model of the tracking error is obtained as

$$\left\{{\matrix{{{{\dot e}_1} = {e_2}} \hfill \cr{{M_r}{{\dot e}_2} = u - {M_r}{{\ddot x}_r} - {M_r}\theta \zeta {{(\dot x)}^{\rm{T}}}.} \hfill \cr}} \right.$$
(4)

Now, the control problem is designing the control law u(t) to achieve the fast convergence of e1= and e2.As the train dynamics model is a second-order system, a first-order sliding mode surface equation is enough to satisfy the requirement because of the sliding mode control of the first-order control characteristic. To this end, a terminal sliding mode function s(t) is defined as

$$s = e_2^w - {k_0}{e_1}$$
(5)

where \(w = {\textstyle{p \over q}},p\) and q are positive odd integers which satisfy \(2 > {\textstyle{p \over q}} > 1,\;{k_0} < 0\) is a constant.

Then, the time derivative of the terminal sliding function s(t) is as

$$\dot s = {w \over {{M_r}}}e_2^{w - 1}(u - {M_r}{\ddot x_r} - {M_r}\theta \zeta {(\dot x)^{\rm{T}}}) - {k_0}{e_2}.$$
(6)

If s(t) is kept at zero, it is obtained that \({e_2} = {({k_0}{e_1})^{{\textstyle{1 \over w}}}}\), which could be transformed into

$${\dot e_1} = {({k_0}{e_1})^{{1 \over w}}}.$$
(7)

Clearly, the solution to the equation above is

$${t_{{\rm{cov}}}} = {{\vert {e_1}(0){\vert ^{1 - {1 \over w}}}} \over {k_0^{{1 \over w}}(1 + {1 \over w})}}$$
(8)

where tcov is the convergence time of the error, which means that the convergence error e2 will decay to zero in a finite time owing to the effect on the surface s(i) = 0. Ultimately, the system is driven onto the sliding surface, and the system could rapidly reach the stable state as set before. It is satisfied that the system could realize the tracking control quickly and precisely.

If s(t) is set to zero, the control input u(t) is designed as

$$u = {{{M_r}{k_0}e_2^{2 - w}} \over w} + {M_r}\theta \zeta {(\dot x)^{\rm{T}}} + {M_r}{\ddot x_r} - k{\mathop{\rm sgn}} (s)$$
(9)

where K > 0, and this is the gain of the sliding mode control switch signal. When s =0, thecontrol u is bounded, and the system will reach the equilibrium point x1 = 0. It is obvious that the derivative of the sliding mode function does not contain the terms of negative powers. So unlike the conventional method, the proposed sliding mode function has the ability to overcome the singularity problem.

To prove the stability of the system, a Lyapunov function is defined as

$$V = {1 \over 2}{M_r}{s^2}.$$
(10)

Taking the derivative of (10), we could obtain

$$\dot V = (we_2^{w - 1}(u - {M_r}\theta \cdot \zeta {(\dot x)^{\rm{T}}} - {M_r}{\ddot x_r}) - {M_r}{k_0}{e_2})s.$$
(11)

Substituting (9) into (11) leads to the derivative of the new Lyapunov function

$$\dot V = {M_r}s\dot s = - Kwe_2^{w - 1}s{\rm{sgn}} (s) = - Kwe_2^{w - 1}\vert s\vert .$$
(12)

Because p and q are positive odd integers which satisfy \(2 > {\textstyle{p \over q}} > 1\) as mentioned above, it follows that

$$e_2^{w - 1} > 0,\quad {e_2} \neq 0.$$
(13)

Due to the situation e2 ≠0, if η > 0, then the Lyapunov stability \(\dot V < - \eta \vert s\vert\) is met. Substituting (13) into (12) yields

$$\dot V = - Kwe_2^{w - 1}\vert s\vert < 0,\quad {e_2} \neq 0.$$
(14)

Thus, every condition where e2 ≠ 0 is satisfied for the Lyapunov stability so that the system could reach the sliding surface s = 0 in a finite time. Considering e2 = 0 and substituting the control law (12) into (1), we obtain

$${\dot e_2} = - {K \over {{M_r}}}{\rm{sgn}}(s).$$
(15)

Admittedly, if s > 0, then \({\dot e_2} = - {K \over {{M_r}}}\), and if s < 0, then \({\dot e_2} = {K \over {{M_r}}}\), respectively. It is obvious that the sliding surface s will keep the same sign before reaching s =0. Consider a vicinity of e2 = 0, and that its boundary is ψ > 0, which satisfies |ψ| >e2. If the trajectory goes from e2 = ψ to e2 = −ψ or from e2 = −ψ to e2 = ψ, s satisfies \(\dot V < - \eta \vert s\vert\), which makes s tend to zero in a finite time. In other situations, |ψ| < e2, it is the same that the sliding surface s = 0 can be reached in a finite time due to (14).

As a result, it is convincing to conclude that any sliding surface s can reach s = 0 in a finite time. Then the system is stable.

However, because the model parameters are uncertain and unmeasurable, we consider the parametric uncertainties in the form of

$$\left\{{\matrix{{\theta = \hat \theta + \Delta \theta} \hfill \cr{{M_r} = {{\hat M}_r} + \Delta {M_r}} \hfill \cr}} \right.$$
(16)

where \(\hat \theta\) is the estimation of parameter θ, \({\hat M_r}\) is the estimation of the total rotating mass M r , Δθ is the estimation error of parameter θ, and ΔM r is the estimation error of parameter M r .

Using (16), the time derivative of the terminal sliding function (6) becomes

$$\dot s = we_2^{w - 1}({u \over {{{\hat M}_r} + \Delta {M_r}}} - (\hat \theta + \Delta \theta)\zeta {(\dot x)^{\rm{T}}} - {\ddot x_r}) - {k_0}{e_2}.$$
(17)

The control input u(t) becomes

$$u = {{{{\hat M}_r}{k_0}e_2^{2 - w}} \over w} + {\hat M_r}\hat \theta \zeta {(v)^{\rm{T}}} + {\hat M_r}{\ddot x_r} - K{\mathop{\rm sgn}} (s).$$
(18)

Using (11), (17) and (18), it is obtained that

$$\matrix{{\dot V = - \Delta {M_r}{k_0}{e_2}s - we_2^{w - 1}s((\Delta {M_r}\Delta \theta + \Delta {M_r}\hat \theta +} \hfill \cr{\quad \;\;{{\hat M}_r}\Delta \hat \theta)\zeta {{(\dot x)}^{\rm{T}}} + K{\mathop{\rm sgn}} (s) + \Delta {M_r}{{\ddot x}_r}).} \hfill \cr}$$
(19)

In order that the Lyapunov stability is satisfied, the parameter K should be kept as

$$\matrix{{K > (\vert \Delta {M_r}\vert \left\vert {\Delta \hat \theta} \right\vert + \vert \Delta {M_r}\vert \left\vert {\hat \theta} \right\vert + {{\hat M}_r}\left\vert {\Delta \hat \theta} \right\vert)\zeta {{(\dot x)}^{\rm{T}}} +} \hfill \cr{\quad \quad \vert \Delta {M_r}\vert \,\;\vert {{\ddot x}_r}\vert + \sigma + {k_0}{w^{- 1}}\vert \Delta {M_r}\vert \left\vert {e_2^{2 - w}} \right\vert} \hfill \cr}$$
(20)

where σ > 0 is the border of the un-modeled, so the system is stable. By adjusting the parameters of sliding mode control switching term, the affection brought by the external disturbance and parametric uncertainty could be eliminated. Parameter uncertainty makes the sliding mode control input more complex, however, the increase of the control input is an only method for the sliding mode control to overcome the system uncertainty. To decrease the complication caused by the model parameter uncertainty, adaptive control of the system is introduced in the next part.

3.2 Adaptivity and stability analysis

The upper bounds of uncertainties and disturbances are unknown due to the train operation, which makes it difficult to choose parameter K. The increase of the switch gain may easily cause the chattering effect. So we introduce an adaptive mechanism to estimate the model parameters, and it could reduce the dependence of the uncertainties and disturbances on the switch gain.

The Lyapunov function (10) is redefined with the system uncertainty in the form of

$$V = 0.5{M_r}{s^2} + \Delta \psi {\Gamma ^{- 1}}{(\Delta \psi)^{\rm{T}}} + \lambda _m^{- 1}\Delta M_r^2$$
(21)

where Γ is a positive definite matrix,

ψ = M r θ, λ a , λ b and λ c are adaptive gain parameters. Then, taking the derivative of the new Lyapunov function yields

$$\matrix{{\dot V = (we_2^{w - 1}(u - \psi \zeta {{(\dot x)}^{\rm{T}}} - {M_r}{{\ddot x}_r}) - {M_r}{k_0}{e_2})s -} \hfill \cr{\quad \quad \dot \hat \psi {\Gamma ^{- 1}}\Delta \psi - \lambda _m^{- 1}\dot \hat M\Delta {M_r}} \hfill \cr}$$
(22)

where \(\hat \psi\) is the estimation of ψψ is the estimation error of \(\psi ,\dot \hat \psi = - \Delta \dot \psi\) and \({\dot \hat M_r} = - \Delta {\dot M_r}\).

Choose the control law u(t) as

$$u = {{{{\hat M}_r}{k_0}e_2^{2 - w}} \over w} + \hat \psi \zeta (\dot x) + {\hat M_r}{\ddot x_r} - K{\mathop{\rm sgn}} (s)$$
(23)

where the parameter adaptive laws are

$$\left\{{\matrix{{{{\dot \hat M}_r} = - {\lambda _m}({{\ddot x}_r}we_2^{w - 1} + {e_2}{k_0})s} \hfill \cr{\dot \hat \psi = - we_2^{w - 1}\Gamma \zeta {{(v)}^{\rm{T}}}s.} \hfill \cr}} \right.$$
(24)

By substituting (23) and (24) into (22), the derivative of the new Lyapunov function becomes

$$\dot V = - Kwe_2^{w - 1}\vert s\vert < 0.$$
(25)

As shown in the above discussion of (13) and (14), the system is stable. By introducing the adaptive laws (24) to the control law (9) which is applied to the nonlinear uncertain system defined by (1), the error converges to zero in a finite time. Although the model parameters are uncertain and the extern disturbance is unknown and changes irregularly, it can track the desired speed and position precisely and quickly.

4 Simulation

In order to verify the correctness of the method proposed in this paper, a vehicle with real parameters and an actual line are selected for simulation. A traditional PID control method, an adaptive control method and the proposed adaptive terminal sliding mode control are compared to illustrate the problem. The main simulation parameters of the train model are shown in Table 1. And the parameters of the proposed controller are shown in Table 2.

Table 1 Train parameters
Table 2 ATSMC parameters

In the simulation, the disturbances caused by the unpredictable basic resistance and the additional resistance are considered during the operation of the train on the line. We consider the uncertain parameters of the basic resistance, Δa = 0.2 sin(0.005t), Δb = 0.004 sin(0.005t), Δc = 0.000067 sin(0.005t). Although the mass of a train is different between stations, it is a constant during an interval, so ΔM = i(t), i ∈ [0, δ], δ is the boundary.

The simulation environment of the line with ramps is shown in Fig. 3, where the curves and ramps have been transformed into additional forces in the numeric form. To alleviate the chattering and make control input smooth, we replace sgn(s) by the saturation function sat(s, ϕ), where ϕ is 1.

Fig. 3
figure 3

Additional force

The desired speed and position are shown in Fig. 4, so the controller should keep tracking both the desired speed profile and the desired position profile accurately.

Fig. 4
figure 4

Desired profile

The adaptive controller and the adaptive terminal sliding controller are better than the traditional PID method in terms of the tracking effect. If the tracking error changes quickly, the control input would also vary tremendously. Then it could bring uncomfortableness to the passengers and make the equipment such as a traction system or a braking system worn seriously, and frequent regulating is not conducive to energy conservation. Therefore, observing the control input is quite important to evaluate the effect of a control method of automatic train operation.

As shown in Fig. 5, the speed error and position error are large in control by traditional PID, and both the errors change fast. The performance of the adaptive control method is shown in Fig. 6. Both speed error and position error are small, and they are almost kept at zero. The adaptive controller tracks the desired profile perfectly, and it is better than PID method. The error of the proposed adaptive terminal sliding control is shown in Fig. 7. It is also seen that the speed error and position error are small, and also almost kept at zero. Therefore, high-precise tracking is realized.

Fig. 5
figure 5

Tracking error using PID

Fig. 6
figure 6

Tracking error using adaptive control

Fig. 7
figure 7

Tracking error using adaptive terminal sliding mode control

As mentioned above, comfort is an important factor to value the performance of the train operation, the controller not only needs to track the desired profile accurately, but also drive the train comfortably. As shown in Fig. 8, the control input of PID changes so much to overcome the disturbance to realize tracking, it would cause uncomfortableness of the passengers in the whole process, and switching too frequently will waste energy. Therefore, it is easy to recognize that the PID control method is poor. The control input of the adaptive controller changes less frequently than that of the PID control. But when we look at some switching points carefully, we could find the adaptive control input changes frequently, and makes some overshoot. In this case, the adaptive control could make the passengers uncomfortable, especially when the control input needs to be changed abruptly, which is also not beneficial for energy saving. The control input of the proposed controller is also shown in Fig. 8. Compared with other controllers, it changes quite smoothly, especially at the switching points and makes a better performance than the adaptive controller.

Fig. 8
figure 8

Control input

5 Conclusions

In this paper, an adaptive terminal sliding mode control method is proposed for train automatic operation with comfort of the passengers. The nonlinear dynamic train model with parametric uncertainties is built, and a rod-shaped homogeneous mass model for analyzing the additional resistance is introduced, owing to the large influence of most complex railway lines. High-precision speed and position tracking with relatively less adjustment of control input has been set for the control target. An adaptive law has been designed to implement the online estimation of the controller parameters. To improve the convergence rate of the tracking error, terminal sliding control is used to realize the control fast. Simulation results have indicated that the proposed method verifies its effect through considering the actual line and comparative analysis. It has proved that the proposed ATO algorithm is the best. The PID control input and its tracking error change frequently, which makes the operation uncomfortable and energy-wasting. The adaptive control makes better performance with a small tracking error. But when the line resistance impacts the train during the operation violently, it will regulate the control input frequently and then bring about uncomfortableness. The proposed ATSMC method could not only make the train tracking error small but also guarantee the comfort of the passengers, although disturbed by resistance of line and uncertainty of model parameters. As for automatic train control, more factors could be taken into consideration such as measurement noise and transmission delay.