Keywords

1 Introduction

Parking a tractor-trailer vehicle (TTV) is different from parking a single tractor or a single vehicle in that a trailer is steered via hitch angle when driving backward. For the reason, reverse driving of a TTV heavily depends on the driver’s skill level and an unskilled driver has a hard time parking a TTV [1]. To solve the problem, various path planning and path tracking algorithms for automatic parking of TTVs have been proposed to date [2,3,4]. In addition to hitch angle steering characteristics, reversing control of a TTV has various difficulties such as high nonlinearity of the system, constraint on control input and state resulting from mechanical factors [5].

To cope with the difficulties, several methods such as adaptive neuro-fuzzy inference system (ANFIS) [6] or model predictive control (MPC) [7,8,9] have been applied to date. However, those methods require a large amount of computation time and, as a result, are hard to be implemented in a real TTV [10]. For the reason, it is necessary to develop a system for the purpose of reducing excessive computational cost and conducting path planning and path tracking control that matches with actual parking scenarios for a TTV. For the purpose, nonlinear model predictive control (NMPC) and linear quadratic regulator (LQR) are adopted as a path planner and path tracking controller or path tracker, respectively, in this paper. To validate the proposed system, simulation via MATLAB/Simulink and TruckSim is conducted.

2 Design of Automated Parking System

2.1 Kinematic Model for Tractor-Trailer Vehicle

Figure 1 shows the kinematic model of a TTV [11]. The angle \(\alpha\) denotes front steering angle for the tractor and the angles β and θ denote the global yaw angles of the tractor and trailer, respectively. Because parking scenarios for a TTV are usually conducted in low speed, under the assumption that there are no tire slips, the kinematic model for a TTV can be obtained as Eq. (1), where v is the longitudinal velocity.

$$\left[ {\begin{array}{*{20}c} {\dot{x}} \\ {\dot{y}} \\ {\dot{\theta }} \\ {\dot{\beta }} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {v\cos \beta \left( {1 - {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h b}}\right.\kern-0pt} \!\lower0.7ex\hbox{$b$}} \cdot \tan \beta \tan \alpha } \right)\cos \theta } \\ {v\cos \beta \left( {1 - {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h a}}\right.\kern-0pt} \!\lower0.7ex\hbox{$a$}} \cdot \tan \beta \tan \alpha } \right)\sin \theta } \\ {v\left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 b}}\right.\kern-0pt} \!\lower0.7ex\hbox{$b$}} \cdot \sin \beta + {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h {ab}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${ab}$}} \cdot \cos \beta \tan \alpha } \right)} \\ {v\left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 a}}\right.\kern-0pt} \!\lower0.7ex\hbox{$a$}} \cdot \tan \alpha - {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 b}}\right.\kern-0pt} \!\lower0.7ex\hbox{$b$}}\sin \beta - {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h {ab}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${ab}$}} \cdot \cos \beta \tan \alpha } \right)} \\ \end{array} } \right]$$
(1)
Fig. 1.
figure 1

Kinematic model of tractor-trailer vehicle

2.2 Design of Path Planner with NMPC

In this paper, the path planner is designed with NMPC [12]. With the kinematic model given in Eq. (1), NMPC solves a trajectory optimization problem. The longitudinal velocity, v, and steering angle, θ, are set to be both control inputs and regulated output at the same time. To consider the restrictions on states and regulated outputs, several constraints are derived from a geometry of a TTV and collision avoidance objective.

In the previous work, MPC has been widely adopted as a path tracker [13]. However, it requires a large amount of computation time. For the reason, it is not easy to implement MPC in a real TTV. Instead of MPC, LQR is adopted as a path tracker to reduce the computation time for real-time application [14]. For LQR in path tracking stage, additional considerations are required in planning stage. More specifically, additional strict constraint on hitch angle is applied in NMPC in order to minimize the possibility of jackknifing and cost function, which is needed to reduce transition of driving directiion.

To define a parking scenario, initial and target states of TTV and global positions of obstacles are required. By applying NMPC in a constrained circumstance, an optimal state sequence, i.e., optimized path and pose from initial state to final state, is obtained as a result.

2.3 Design of Path Tracker with LQR

By setting the lateral error \(e\), the trailer yaw error θe, and the hitch angle error βe as the error state from the kinematic model Eq. (1), the error dynamics is derived as Eq. (2), where κref is the curvature of the reference path and βref is the reference hitch angle. In Eq. (2), the steering angle α is the control input.

$$\left[ {\begin{array}{*{20}c} {\dot{e}} \\ {\mathop {\theta_{e} }\limits^{.} } \\ {\mathop {\beta_{e} }\limits^{.} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {v\cos \beta \left( {1 - {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h a}}\right.\kern-0pt} \!\lower0.7ex\hbox{$a$}} \cdot \tan \beta \tan \alpha } \right)\sin \theta_{e} } \\ {v\left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 b}}\right.\kern-0pt} \!\lower0.7ex\hbox{$b$}} \cdot \sin \beta + {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h {ab}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${ab}$}} \cdot \cos \beta \tan \alpha - {\raise0.7ex\hbox{${\kappa_{ref} \cos \theta_{e} }$} \!\mathord{\left/ {\vphantom {{\kappa_{ref} \cos \theta_{e} } {\left( {1 - \dot{e}\kappa_{ref} } \right)}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\left( {1 - \dot{e}\kappa_{ref} } \right)}$}}} \right)} \\ {v\left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 a}}\right.\kern-0pt} \!\lower0.7ex\hbox{$a$}} \cdot \tan \alpha - {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 b}}\right.\kern-0pt} \!\lower0.7ex\hbox{$b$}} \cdot \sin \beta - {\raise0.7ex\hbox{$h$} \!\mathord{\left/ {\vphantom {h {ab}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${ab}$}} \cdot \cos \beta \tan \alpha } \right) - {\mathop \beta \limits^{.}}_{ref} } \\ \end{array} } \right]$$
(2)

Under constant speed assumption and small-angle approximation, the error model Eq. (2) is linearized around an equilibrium point or an origin. With the linearized model, LQR path tracker is designed [15].

The LQ cost function J is defined as Eq. (3) with the weights ρi, which are determined by Bryson’s rule [16]. In Eq. (3), the maximum allowable values on each error state were selected by considering the fact that hitch angle tracking performance is critical for preventing jackknife. Afterwards, with the selected weights and linearized model, the controller gain \({K}_{LQR}\) was calculated by solving a corresponding Riccati equation.

$$J = \int_{0}^{\infty } {\left( {\rho_{1} e^{2} + \rho_{2} \theta_{e}^{2} + \rho_{3} \beta_{e}^{2} + \rho_{4} \alpha^{2} } \right)} dt$$
(3)

2.4 Design of Path Tracker with NMPC

As a baseline, NMPC path tracker is designed to compare with the proposed LQR one in terms of the performance and computation time. The designed NMPC path tracker has identical constraint and cost function from NMPC path planner.

3 Simulation of Automated Parking System

3.1 Simulation Environment

To validate the proposed APS, simulation was conducted in a co-simulation environment with MATLAB/Simulink and TruckSim. Both of path planner and trackers were implemented on MATLAB/Simulink. As a plant model, 2-axle tractor 1-axle trailer model with fifth wheel hitching was selected from TruckSim. The vehicle speed was set to 18 km/h in both of forward and backward directions. The tire-road friction coefficient was set to 0.85, which means dry asphalt road surface.

3.2 Result of NMPC Path Planner

Figure 2a shows the initial and final states of the parking scenario for NMPC. From these states, optimal state sequence is obtained from NMPC path planner. As shown in Fig. 2b, optimal state sequence was obtained without jackknifing.

Fig. 2.
figure 2

Initial and final states for NMPC and optimal path from NMPC

3.3 Results of NMPC and LQR Path Trackers

Simulation results of NMPC and LQR path trackers are shown in Fig. 3. As shown in Fig. 3, NMPC path tracker shows satisfactory performance without obstacle collision within 0.37 m of lateral offset, 0.6° of trailer yaw error and 1.4° of hitch angle error. LQR path tracker shows also satisfactory performance within 0.12 m of lateral offset, 1.1° of trailer yaw error and 1.6° of hitch angle error.

Fig. 3.
figure 3

Trajectories of TTV from NMPC and LQR path trackers

The lateral offset, the trailer yaw and hitch errors are given in Fig. 4. As shown in Fig. 4, LQR path tracker followed the reference path with smaller lateral offset but larger yaw and hitch errors compared to NMPC path tracker. This is caused by the fact that the plant model used for designing LQR path tracker is linearized at the equilibrium point, i.e., the origin. On the contrary, NMPC path tracker linearizes the given plant model at each sequence.

Fig. 4.
figure 4

Simulation results of NMPC and LQR path trackers.

3.4 Comparison of Computation Time Between NMPC and LQR

To compare the computation times of the LQR and NMPC path trackers, the computation time per simulation loop was logged during the simulation. From the simulation results, the computation time of NMPC path tracker is much larger than that of LQR path tracker. For instance, NMPC path tracker requires 93 ms on average per 1 ms simulation loop calculation (SLC). On the contrary, LQR path tracker requires 0.12 ms on average per 1 ms SLC. From these results, it was shown that LQR path tracker is much faster than NMPC one. For the reason, LQR is recommended as a path tracker for a TTV, instead of MPC or NMPC.

4 Conclusion

In this paper, the automatic parking system for a tractor-trailer vehicle was proposed with NMPC path planner and LQR path tracker. The kinetic model was selected as a vehicle one for a tractor-trailer vehicle. To validate the proposed APS, simulation on MATLAB/Simulink and TruckSim was conducted. The performance and computation time of LQR and NMPC path trackers was compared. From the simulation results, it was shown that NMPC and LQR path trackers show equivalent performance and that the proposed APS with LQR path tracker can park the tractor-trailer vehicle with smaller error and much smaller computational cost, compared to NMPC.