Optimum Path Tracking Control for the Inverse Problem of Vehicle Handling Dynamics Based on the hp-Adaptive Gaussian Pseudospectral Method

We propose a vehicle path-tracking method based on the hp-adaptive Gaussian pseudospectral method (GPM), which tackles the problem of the slow convergence speed of the optimal control of vehicle path tracking. First, we establish a kinematic vehicle model by considering the path constraints and boundary constraints during the process of tracking the described path of a vehicle. Subsequently, finding the minimum error of the lateral distance between the prescribed path and the expected trajectory is set as the performance objective function. Finally, the vehicle path tracking problem is transformed into an optimal control problem. +e optimization algorithm is combined with the sequential quadratic programming algorithm to optimize problems related to the control and state variables and the boundary and path constraints. +e simulated results show that the hp-adaptive GPM can improve the convergence rate of the optimal control problem for vehicle path tracking. +e proposed hp-adaptive pseudospectral method has a higher solving efficiency compared with traditional approaches for the vehicle path-tracking problem. Concurrently, the verification results of a real vehicle test indicate the feasibility of the proposed algorithm for solving the vehicle path tracking problem.+is research provides valuable insight into the design work of lane changes and is an important step towards the design of feedback control laws for path tracking.


Introduction
e emergence of automobiles has resulted in many changes in human lifestyle. e rapid development of the automobile industry coupled with steady improvements of economic standards has tremendously improved human lives, but caused a series of social problems. e strategic position of transportation in urban development is extremely important. A convenient, efficient, and unobstructed transportation system is an indispensable guarantee for sustainable urban development. With the popularization of automobiles, the volume of road traffic is increasing, and the accidents that ensue have become an acute public safety concern globally and a major nuisance in modern society. e road traffic safety situation is very grim, and expectations of vehicle safety for vehicle users and vehicle authorities have steadily increased [1,2].
Path following control is to perpetually restrain the motion of a vehicle along a desired path, while ensuring the driving safety and riding comfort of the vehicle's passengers. e operation control layer in the path tracking controller includes multiple modules and components, such as emergency management and the controls of path tracking, speed tracking, logic components, and various actuators. Among these, path tracking control is the core component [3].
A brief literature review of investigations that studied the path tracking problem is presented in the following. Huang et al. proposed a path planning control algorithm and studied the vehicle collision avoidance problem [4]. Hu et al. proposed an improved A * algorithm to solve the problem of unmanned surface vehicle path planning [5]. Based on the active disturbance rejection control scheme, Xia et al. presented a tracking control method for the lateral motion of an autonomous land vehicle [6]. Based on an extended Kalman filter, Liu et al. designed a state parameter estimator for vehicles [7]. Matthew et al. designed an approach to control the motion of autonomous vehicles (AVs) [8]. Wang et al. proposed a dynamic output-feedback controller to assist human drivers for path tracking [9]. Ji et al. presented a path planning and tracking method for AVs to maintain a collision-free path and perform emergency maneuvers [10]. Vincent et al. attained a novel control framework by collecting data with a professional race car driver. eir experimental results demonstrated the successful tracking of a circular path at the friction limit without a priori friction information [11]. Chen et al. investigated a path following control problem for four-wheel independent-drive electric vehicles with consideration of modeling errors and complex driving scenarios [12]. Liu et al. presented an adaptive control method for a class of uncertain strict-feedback switched nonlinear systems. e significance of their method was verified with numerical simulations [13]. Liu et al. solved the event trigger control problem of an electromagnetic active suspension system based on a neural network [14]. Gao et al. developed an adaptive neural network control scheme for a class of stochastic nonlinear systems with timevarying full state constraints [15]. Tourajizadeh and Gholami performed optimal control of a 3-PRS (prismatic-revolutespherical) robot and extracted its related optimal path accordingly [16]. Kang et al. proposed a novel mixed motion planning and tracking control framework for AVs based on model predictive control (MPC), which was made up of an MPC-based longitudinal motion planning module, feedforward longitudinal motion tracking module, and MPCbased integrated lateral motion planning and tracking module [17]. Mashadia and Majidib proposed a global optimal path planning method for an AV overtaking a moving obstacle by performing a double lane-change maneuver after detecting the obstacle at a proper distance ahead [18]. Jie et al. described motion and boundary constraints with a mathematical model proposed to solve the optimal control problem of path planning for unmanned ground systems, where the time-energy performance indicators were described by the Bolza cost function [19]. An et al. presented a Gaussian process regression-based deformation prediction and compensation method to improve robot motion accuracy [20]. Guo et al. proposed a model predictive controlbased path following method that represented a novel and highly debated control approach for autonomous cars [21]. Zhang et al. presented a trajectory planning and tracking control that could improve the comfort of autonomous driving in the future to meet the requirements of different AV users [22]. Kanchwala et al. used an MPC approach to solve the path tracking problem for AVs [23]. Based on MPC, Regolin et al. proposed a linear controller for tracking a given trajectory [24]. Liu et al. proposed an adaptive control algorithm for path tracking control by considering time delays [25]. Jing et al. designed three different controllers for the reverse motion of a tractor-trailer to solve the tractor-trailer path tracking problem for backwards motion [26]. Zhang et al. designed a novel path tracking controller for ground vehicles [27]. Based on the sliding-mode control and lane detection method, Zhang and Zhu developed a novel tracking control method for intelligent electric vehicles [28]. Sun et al. presented an MPC path tracking controller to reduce lateral tracking deviations for both normal and high-speed conditions [29]. Hu et al. investigated a path tracking control issue that was transformed into a yaw stabilization problem for autonomous ground vehicles [5]. Xu and Peng presented an optimal control algorithm for the path tracking of automated vehicles [30]. To solve the problem of reducing tracking errors, Yu et al. proposed a path tracking controller based on the Fuzzy Pure Pursuit Control with a Front Axle Reference method [31].
Although many researchers are conducting theoretical and applied research, there are still many problems in vehicle path tracking. Although the frequency domain method can be used to solve the vehicle path tracking problem, it has many limitations when applied to transient responses. e time domain method is more sensitive to the boundary conditions and initial value conditions of an automobile's motion. Moreover, its conversion accuracy is not ideal, and its stability and robustness need to be improved. In terms of conversion accuracy, the determination of modal parameters and truncation of higher-order modals will result in model and/or calculation errors. If the convergence and stability of the power series of modal parameters are poor, the series expansion method has obvious shortcomings. e forward problem solution method for inverse systems derived from control theory is greatly restricted due to the harsh conditions of the inverse systems. As the conversion process of the inverse problem presents strong nonlinearity and is very complex in nature, it is very difficult to solve. In the literature studies reviewed above, most researchers neglected the problem of the slow convergence speed for the optimal control of vehicle path tracking. Certain models ignored the effects of kinematic changes of the tire, while some researchers evaded the problem of optimal control of vehicle path tracking with a hybrid algorithm. Other researchers focused on the reduction of optimization costs, whereas others studied nonlinear systems, excluding attempts to further improve the accuracy of these systems. e basic methods for solving optimal control problems are generally divided into two categories, namely, direct and indirect methods. e former method converts the optimal control problem into a Hamilton boundary value problem and then solves it with numerical methods. However, there are certain drawbacks and difficulties in estimating the initial values of the conjugate variables. e advantage of this method is that the solution satisfies the first-order necessary conditions of optimality and has high accuracy. e direct method overcomes the shortcomings of the indirect method, since it does not need to calculate the costate information. However, the accuracy of the solution may be low, since the first-order necessary conditions of optimality cannot be tested owing to a lack of costates. For the optimal control problem with path constraints, it is difficult to adopt an indirect method. A possible solution is to convert the process constraints into equivalent terminal constraints through mathematical transformations. However, several direct methods do not provide principal vector information (i.e., costate information); hence, there is no guarantee that the obtained nonlinear programming solution is applicable to the original optimal control problem. e direct method of parameterizing control variables easily converges to the local optimal solution, which depends on the initial guess value. Considering the global optimization ability of genetic algorithms, several scholars have used them to solve the nonlinear programming (NLP) problem of trajectory optimization. However, genetic algorithms have drawbacks when faced with large volumes of calculations [32,33].
In recent years, the pseudospectral method, a direct method, has been widely used in trajectory optimization owing to its higher accuracy and efficiency [34]. erefore, to solve the problem of the slow convergence rate of the optimal control problem of path planning in inverse vehicle handling dynamics, a path planning method based on the hp-adaptive Gaussian pseudospectral method (GPM) is proposed here. First, by establishing a kinematic vehicle path tracking model with boundary and path constraints, the problem of path planning is transformed into an optimal control problem to find the smallest error between the actual trajectory and the described path as a performance index function. Next, the corresponding boundary constraints according to a variety of operating conditions in the path tracking are set.
ereafter, the hp-adaptive GPM is employed to discretize the optimal control problem, thus solving the problem in combination with sequential quadratic programming (SQP). en, a simulated path planning analysis is performed for different operating conditions, and the solving performance of the hp-adaptive GPM is compared with the alternative pseudospectral methods. Finally, a real test vehicle is used to verify the effectiveness of the proposed method.

Mathematical Model for the Vehicle Path Tracking
Problem.
e dynamic process of a vehicle moving along the ground is highly complicated. To describe the vehicle's movement with the utmost accuracy, it is necessary to establish complex differential equations and use multiple state variables to describe its motion. However, to ensure the realtime nature of the tracking algorithm for vehicle path tracking problems, especially in the planning stage, constraint simplification and approximation are important tools. In the following, we describe the vehicle systems from the perspectives of path planning and road tracking control and establish a simplified vehicle dynamics model that reflects the motion characteristics of the vehicle with high accuracy.
Vehicle path tracking and control should be achieved by controlling the vehicle's kinematics or the dynamic system.
is has been described as the path planning and road tracking control of a vehicle and established as a simplified vehicle dynamics model with appropriate control variables (including the steering torque) and accurate dynamic constraints (including the initial and terminal state variables, path constraints to avoid vehicle rollover, and lower and upper limits of the steering torque, z min and z max , resp., constrained by the driver's physiological limits). e motion tracking control performance will improve if the vehicle's kinematics and dynamic constraints can be considered in the tracking phase. Establishing a reasonable vehicle system model is the premise of control, as well as a basis for realizing the path tracking function of the vehicle. erefore, appropriate control variables, including the ones that describe the dynamic constraints accurately, have to be selected to establish the model. e following assumptions have been made for the modeling: (i) e vehicle moves along a flat horizontal plane, and the driving force is not large (ii) e influence of the ground tangential force on the tires' cornering characteristics is not considered (iii) Tire cornering characteristics are considered in the linear range (iv) Steering inertia is considered Based on the previously mentioned theory, the four degrees-of-freedom (4-DOF) vehicle model presented by Liu et al. [35,36] is depicted in Figure 1. e dynamic differential equations of the model are given as e parameters and corresponding definitions can be found in the work of [35].where x and y are the vehicle positions in Earth coordinates. e dynamic differential equation can be obtained according to (1) and (2) as where x(t) and z(t) are the state and input, respectively, which are denoted as

Path Constraint.
Since it is required that vehicle rollover should be avoided, the path constraint is imposed as where T is the track width and S is the stability factor.

State and Control
Constraints. e boundary constraints of the control variable, decided by the driver's physiological limits, are where z min and z max are the lower and upper limit values of the steering torque, respectively.

Optimal Control Object of Path Tracking Problem.
is study requires the vehicle to travel along a described path, ensuring that the error between the trajectory and the described path is minimal. Hence, the cost function is given as where t 0 and t f are the initial and final times, respectively, y d is the reference path, E is the standard threshold of the lateral distance error of y − y d , where E � 0.3 m in this work, and T sw is the standard threshold of the steering torque, taken as

GPM of Solving the Vehicle Path
Tracking Problem e unified form of the general Bolza problem can be described as follows [37]: where x(t) and z(t) are the state and control variables, respectively, t 0 and t f are the start and end times of the optimal control problem, respectively, and φ and C are the equality and inequality constraints, respectively. Next, we propose the nonequidistance GPM. Hence, the above-mentioned Bolza problem should be transformed to a standard optimal control problem by defining the time in the interval [−1, 1]. First, the independent variable can be mapped to the general interval τ ∈ [−1, 1] via affine transformation as [38] τ en, the infinite-dimensional continuous optimal control problem is transformed into a finite-dimensional NLP problem as

Global Interpolation Polynomial Approximation of the State and Control
Variables. e GPM, like all pseudospectral methods, approximates the state using the basis of global polynomial interpolation. ese global polynomials are based on a set of discrete points across the prescribed interval. One of the primary distinctions between different pseudospectral methods is the choice of discrete points used in the NLP formulation. Specifically, for the GPM, we let κ � τ 1 , . . . , τ N be the set of N Legendre-Gauss (LG) points, which correspond to the roots of the N th degree Legendre polynomial. ese LG points lie in the interior of the interval (−1, 1) such that τ 1 , . . . , τ N are strictly increasing. Next, suppose that, for a given value of N, one can create a superset, κ 0 , that appends the point τ 0 � −1 to the set κ, for a total of N + 1 points in the interval [−1, 1). Let x(τ) be the state as a function of the independent variable τ, where τ ∈ [−1, 1], as seen in the transformed continuous Bolza problem. An approximation to the state, X(τ), is formed on the basis of N + 1 Lagrange interpolating polynomials L i (τ)(i � 0, 1, . . . , N) as follows: where L i (τ) (i � 0, 1, . . . , N) is defined as Additionally, the control is approximated using a basis of N Lagrange interpolating polynomials L * i (τ)(i � 0, 1, . . . , N) as where It can be seen from (12) and (14) that 0, 1, . . . , N) and L * i (τ)(i � 0, 1, . . . , N) satisfy the properties:

Discretization of the Dynamic Differential Equations and Control Variables.
To convert the standard Bolza problem to NLP, the derivative of the state variable in the state equation should be discretized as where D ki ∈ R N×(N+1) is an N × (N + 1) state differential matrix, which can be calculated in advance. Hence, the state differential equation can be replaced by the following constraints:

Calculation of the Path and Boundary Constraints as well as the Terminal State Constraint and Approximation of the Performance Index Function.
e path and boundary constraints discretized on the LG collocation points can be obtained by approximating the state and control variables as k � 1, . . . , N), Owing to the existence of terminal state constraints in the optimal control problem, the terminal state should be calculated. According to the Gaussian integral formula, the terminal state can be expressed as where ω k consists of the Gaussian weights. e number of nonlinear constraints and optimization complexity are reduced by converting the terminal nonlinear constraints to linear constraints. e Lagrange term in the performance indicator function should be calculated to get the integral of the function. Hence, the performance indicator function is approximated as 3.4. Establishment of the NLP Problem. e original optimal control Bolza problem can be transformed into a discrete form of an NLP problem. Based on the previously mentioned numerical approximation method, the continuous optimal control problem is discretized by the GPM [39]. e comprehensive expression is given as Mathematical Problems in Engineering

Hp-Adaptive Update Algorithm.
e hp-adaptive pseudospectral method requires that the state variables should be continuous at the connection points within the time domain and the adjacent time domains. is performance can ensure that the obtained path meets the constraints of the vehicle's motion characteristics and can effectively avoid tracking failure of the execution system during the path tracking control process. e hp-adaptive pseudospectral method should be calculated to get the maximum error, ε (s) m , in each time domain, which is then compared with a given threshold, ε. If the maximum error, ε (s) m , is greater than ε, then the division interval number, K, and polynomial order, P, should be increased to improve the approximation accuracy.
In each time domain, [τ 0 , τ f ], according to Legendre-Gauss quadrature formula, the error between the exact value and the approximate value at the sampling point is given as where P i (τ) is the N + 1 order of the Legendre polynomials. According to the orthogonality of the Legendre polynomials in [τ 0 , τ f ] and τ ∈ [−1, 1], when m ≠ n 〈P m , P n 〉 � τ f τ 0 P m (τ)P n (τ)dτ � 0; otherwise, when m � n, en, (23) is obtained as where en, (24) can be obtained as where δ is the error of the decay rate and c is a constant. en, the Lagrange coefficient, a i , can be described as e attenuation rate, σ, of the error can be calculated by combining (24) and (25). en, the attenuation rate, σ, of the error is compared with the set threshold value of the attenuation rate, σ. If σ > σ, it is necessary to increase the polynomial order, P.
According to (24), the maximum error in the time domain can be expressed as Subsequent to increasing the number of collocations in the time domain, the new error is expressed as e number of collocations, to which the polynomial order, P, is increased can be obtained from (26) and (27). If σ < σ, it indicates that the error convergence is slow, and the time domain needs to be redivided. e number of 6 Mathematical Problems in Engineering collocations allocated to the new interval, K, in the same manner as before is e transformed optimal control problem is solved by the SQP method. e SQP algorithm is an optimization algorithm, which determines the direction of each iteration through quadratic planning, and obtains the step length through the value function to approach to the optimal value through multiple iterations. When dealing with nonlinear problems, the SQP algorithm does not depend on the initial values, it has good convergence and self-correction capabilities, and its results are stable and reliable [40].

Simulated Results.
For the simulations, the calculation parameters are shown in Table 1. Figure 2, where s 0 � s 1 � s 2 � s 4 � 2u, s 3 � u, s 5 � 5u, ands 6 � 3u. Figure 3 shows the results of the lateral distance of tracking the double lane change road for u � 108 km/h. e figure shows that the lateral distance of the vehicle and the tracked path are in good agreement throughout the tracking process.

Double Lane Change Road. e described path is the double lane change road shown in
Additional simulated results are shown in Figure 4 for u � 108 km/h. From Figure 4, it can be seen that the absolute difference of the tracking path and the actual lateral displacement is negligible, indicating that the tracking performance controlled by the proposed method of the vehicle is good during tracking of the described path. Figure 4 also shows that the steering torque produces amplitudes at longitudinal distances of 60, 100, 150, and 195 m, indicating that the manipulation burden of the driver is slightly heavier at each turn of the double lane change road. Further, it can be seen from Figure 4 that the steering rate produces amplitudes at longitudinal distances of 85 and 180 m, indicating that the busyness degree of the driver is greater between the first and second turns as well as during the third and fourth turns of the double lane change road when tracking the described path. Figure 5 shows the results of the lateral distance of tracking the double lane change road for u � 90 km/h. e figure shows that, throughout the tracking process, the lateral distance of the vehicle and the tracked path are in good agreement.
Simulated results are shown in Figure 6 for u � 90 km/h. It can be seen from Figure 6 that the absolute difference of the tracking path and the actual lateral displacement is negligible, indicating that the tracking performance controlled by the proposed method for the vehicle is good during tracking of the described path. It can also be seen from the figure that, during the entire process of tracking the double lane change road, the curves of the vehicle responses, including the steering torque and steering rate, are similar to that of the vehicle at 108 km/h. However, the amplitudes of the steering torque and the steering rate are larger when compared with the condition for u � 108 km/h. is is due to the vehicle's larger speed, whereby the driver must manipulate the steering wheel more to track the desired path accurately.

Slalom Road.
e next described path is the slalom road, as shown in Figure 7, where s 0 � L � 2u, s � 3u. Figure 8 shows the results of the lateral distance of tracking the slalom road for u � 90 km/h. From the figure, it can be seen that, throughout the tracking process, the lateral distance of the vehicle and the tracked path are in good agreement.
Simulated results of tracking along the slalom road are shown in Figure 9 for u � 90 km/h. From Figure 9, it can be seen that the absolute error of the tracking described path is negligible. e results indicate that the tracking performance of the vehicle controlled by the proposed method is better during the tracking of the described path. From Figure 9, we can also find the steering torque produces amplitudes at longitudinal distances of 90, 120, 180, 240, 280, and 340 m, indicating that the driver is slightly more burdened at these times. Further, it can be seen from Figure 9 that the steering rate produces amplitudes at longitudinal distances of 90, 120, 180, 240, 280, and 340 m, indicating that the busyness degree of the driver is greater at these times. Figure 10 shows the results of the lateral distance of tracking the slalom road for u � 72 km/h. From the figure, it can be ascertained that, throughout the tracking process, the lateral distance of the vehicle and the tracked path are in good agreement.
Simulated results of tracking along the slalom road are shown in Figure 11 for u � 72 km/h. From Figure 11, it can be seen that the absolute difference between the tracking path and actual lateral displacement is negligible, indicating that the tracking performance controlled by the proposed method of the vehicle is good during tracking of the described path. It can also be seen that, during the entire process, the response of the vehicle is consistent with the trend seen at 108 km/h. However, as the vehicle speed reduces, the amplitude of each result decreases, since when the vehicle speed decreases, the driver must increasingly turn the steering wheel to track the desired path better.

Evaluation of the Calculation Accuracy.
To compare the optimization performance effects of different pseudospectral methods, the path tracking problem was solved here using both the hp-adaptive GPM and the GPM ( [35]). e optimization results are shown in Table 2. It can be seen from the table that, under the same accuracy conditions, the numbers of collocations and intervals of the hp-adaptive GPM are fewer than those of the GPM, which indicates that the proposed hp-adaptive GPM has a higher solving efficiency for the vehicle path tracking problem. Moment of inertia around the z axis 1800 a (m) Distances of front axle from the center of gravity Distances of rear axle from the center of gravity 1.195 k 1 (N.rad −1 ) Synthesized stiffness of front tire 60042 k 2 (N.rad −1 ) Synthesized stiffness of rear tire 109295 i Transmission ratio of the steering system 20 μ Coefficient of friction 0.8 Moment of inertia of the steering system 16.38 Synthesized cornering stiffness 0 ξ 1 /m Front wheel aligning arm of force 0.021 h g (m) Height of the center gravity 0.53     of 1% was used to measure the steering wheel angle. e above-mentioned apparatus is shown in Figure 12 and the test vehicle is shown in Figure 13. Vehicle tests of tracking along a double lane change road and slalom road were carried out. Since the required vehicle speed of the test was high, a professional driver was hired to manipulate the test vehicle. e test procedure was carried out as follows, and a comparison of the simulation and test values is shown in Figure 14.   Figure 9: Simulated results of the absolute error of the tracking path, actual lateral displacement, steering torque, steering rate, and lateral acceleration along the slalom road (u � 90 km/h).
Step 1: arrange stakes, as shown in Figure 2, and paint the prescribed path on the ground according to the double lane change test road.
Step 2: equip the related apparatus shown in Figure 12, and power them up so they warm to normal operating temperature.
Step 3: record the real travelling trajectory in the form of water traces: that is, a water injector that can spray water towards the ground to record the real travelling trajectory was installed on the center of the front axle. With an initial velocity of 80 km/h, the tested vehicle traveled along the test road without touching any part of the stakes. Simultaneously, the time history curves of the measured variables were recorded.
Step 4: repeat the process in step 3 twelve times.
It can be seen from Figure 14 that, at the beginning, the test value lags behind the simulated value, owing to failure in considering delays in the driver's response and steeringwheel manipulation in the simulations. Further, the errors between the simulated values and test values are because of each of the driver's subjective feelings and driving skills being different, which leads to each driver's response being different. Furthermore, there are certain errors in the test equipment. Concurrently, the model shown here is a linear  Hp-adaptive GPM GPM (d) Figure 11: Simulated results of the absolute error of the tracking path, actual lateral displacement, steering torque, steering rate, and lateral acceleration along the slalom road (u � 72 km/h). 4-DOF vehicle model, where other nonlinear factors, such as suspension, tires, and steering, are ignored. However, the simulated and experiment values have similar trends, which verify the correctness and feasibility of the proposed method.
In general, comparison of the results found here with those obtained with traditional methods indicates that the calculation accuracy of the hybrid optimization algorithm is better. e ability of tracking the desired reference path of the vehicle is shown in Figure 15. e figure shows that the vehicle is able to track the desired reference path well.

Conclusions
To study the optimum path tracking control for the inverse problem of vehicle handling dynamics, the paper proposed an optimization based on the hp-adaptive GPM to identify the steering torque for a vehicle tracking the desired path. e path tracking problem was transformed into an optimal control problem solved by SQP method. Simulated and real vehicle test results showed that the proposed method can successfully solve the problem of steering torque input. A vehicle can track a given path that is well controlled by the hp-adaptive GPM. Moreover, it can be concluded that when the vehicle speed decreases, the magnitudes of the absolute errors of the lateral distance and the steering wheel angle, and the magnitude of the steering rate, increase. Further, the proposed hp-adaptive GPM has a higher solving efficiency compared with GPM for the vehicle path tracking problem.
It is believed that, in the near future, the vehicle manipulation input obtained when following a given path can provide a certain guiding role for the driver's manipulation process during the process of changing lanes.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper. e first author gratefully acknowledges the support agency.