Explicit model predictive control for linear time-variant systems with application to double-lane-change maneuver

Explicit model predictive control (eMPC) has been proposed to reduce the huge computational complexity of MPC while maintaining the performance of MPC. Therefore, this control method has been more widely employed in the automotive industry than MPC. In this paper, an eMPC is designed to perform a double-lane-change (DLC) maneuver. This task has been employed to demonstrate the efficacy of controllers in an autonomous driving situation. In this sense, the proposed controller shows better performance than a driver model designed in CarSim at a high vehicle longitudinal velocity. The main contribution of this paper is to present an eMPC for discrete-time linear time-variant (LTV) systems so that the proposed controller can be robust against parameter variation. In a state-space representation of the vehicle, the longitudinal velocity of the vehicle is assumed to be a constant so that the whole system is linear time-invariant (LTI). However, it is inevitable that this velocity varies in an actual driving situation. Therefore, an eMPC controller is designed using an add-on unit to consider the varying parameter without modification of the eMPC solution. The CarSim simulation results of eMPC show enhanced performance compared to that of eMPC for the LTI system.


Introduction
Model predictive control (MPC) has the ability to anticipate future events of systems and fulfill complex constraints by solving open-loop optimization problems at each sampling time [1,2]. Owing to these advantages, MPC has been employed in various fields. In [3], a MPC scheme has been applied for improving the fuel efficiency in vehicles in a given driving situation, resulting in a significant improvement in fuel consumption. An MPC approach has also been used for charging control of electric vehicles in a smart grid [4], demonstrating that the MPC approach can improve the stability and efficiency of smart grids. In [5], nonlinear MPC has been employed for regenerative braking system of hybrid electric commercial vehicles. The hardware-in-loop test has been conducted to verify improved recovery energy. MPC has been designed in [6] for prevention of a rollover or sideslip due to variable time delays in actual driving situations. As an upper controller, the MPC controller successfully calculated the a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 desired tire force, while fulfilling the constraints of the vehicle. Furthermore, MPC has been employed in building cooling systems in [7], where it showed the ability to successfully fulfill such constraints, and in electric circuits to reduce the capacitor voltage ripple and enhance capacitor lifetime of capacitor in [8].
However, because as MPC is based on online optimization, a significant computational complexity is inevitably caused, and this drawback limits the target application of MPC to small and/or slow problems [9]. For this purpose, explicit model predictive control (eMPC) has been suggested to reduce the computational complexity by processing the MPC scheme offline [10]. This offline optimization can be made available with a multi-parametric programming skill, which aims to to obtain the solution regions, the so-called critical regions, of an optimization problem by considering state variables as a vector of parameters [11]. Developments of multi-parametric programming can be found in [11,12].
As eMPC can expand the target applications of MPC to relatively faster problems than that of online MPC, this method has been proposed in many real-time systems. Employed for adaptive cruise control, eMPC showed the suitability of the vehicle to behave in such working conditions in [13]. In [14], eMPC has been developed for real-time control of fully electric vehicles and showed improved energy efficiency by predicting a complex movement of a preceding vehicle. Moreover, eMPC has been used in electric circuits. In [15] an eMPC scheme has been suggested for DC-DC power supplies and the possibility of applying this scheme to industrial microcontrollers by taking advantage of the reduced computational complexity. In addition, an eMPC scheme has been used for active filtering and proven to be suitable for such systems, which require a large bandwidth by providing a fast response [16].
This paper proposes an eMPC controller for a double-lane-change (DLC) maneuver to demonstrate the ability of the proposed controller in an autonomous driving situation. Fig 1 represents a built-in road path for a DLC maneuver in CarSim with a 30 m longitudinal range given for the lane change. The completion of the DLC maneuver can be determined by checking whether a collision with the traffic cones occurs while the vehicle is driving. DLC maneuvers have been widely used to verify the ability of vehicle controllers for path-following control. In [17], a sliding mode controller has been designed to achieve a lane change maneuver in an automated highway system. Also, modeling of a human driver by fuzzy logic has been done in [18] and verified through a DLC maneuver. For the simulation of DLC maneuvers, CarSim is used in this paper. This tool has been utilized to simulate driving tasks in order to analyze vehicle dynamics and test such vehicle controllers. Many cases using CarSim have been reported in the literature [19][20][21][22].
MPC-based controllers are mostly designed based on a discrete-time state space representation of linear time-invariant (LTI) systems. A preliminary version of the present paper, which has been published in proceedings at the international symposium on Industrial Electronics in 2018, also shows the design of an eMPC controller based on an LTI system. However, the parameters assumed to be constant in the LTI system change in an actual driving condition, degrading the performance of the vehicle controllers. To address this issue, we design an eMPC controller that can consider parameter changes through a few computational steps. The main concept of this approach, which has been previously reported in [23], is to compensate for errors caused in state variables due to parameter variation without modification of the critical regions of eMPC, that is, this method does not deteriorate the offline optimization framework.
For not only the steering control, but also other systems in vehicles such as transmission systmes or power management, various optimization methods for those systems have been proposed [24][25][26]. Therefore, the number of electric control units(ECUs) in electric vehicles has increased significantly [27]; correspondingly, the reduction of computational complexity for ECUs has been an important issue to handle. Thanks to the major advantage of eMPC, this control method can serve as a novel approach for ECUs to be capable of performing many types of vehicle control in real time. Furthermore, the eMPC controller for the LTV system in this paper has the ability to maintain the performance of MPC in terms of parameter variation caused by working conditions, aging, or degradation of systems. As a result, it can be shown that the proposed controller can perform MPC optimization offline while ensuring the stability and robustness of the controller by applying a simple add-on unit.
The remainder of this paper is organized as follows. Section 2 reviews the MPC scheme and summarizes a formulation of eMPC. Section 3 shows a state-space representation of the vehicle and the design of eMPC controller for a linear time-variant (LTV) system. The simulation results are discussed in Section 4, and the conclusion and future work are presented in Section 5 and 6.

Explicit model predictive control
Based on the receding policy, MPC solves an open-loop optimization problem (1) at each sampling time. x min � x tþkjt � x max ; k ¼ 0; 1; . . . ; N y ; where A d , B d , and C d are, respectively, the system, input, and output matrix in discrete-time. k is the time index, and x t+k|t indicates the predicted state vector at time t + k from the current time t. N u and N y denote the prediction horizon for the state vector x t and input horizon for the input vector u(t). It is assumed that Q = Q T ≽ 0, R = R T � 0, QR = QR T ≽ 0, and P ≽ 0. The matrix P for the predicted state vector at N y and the gain matrix K, the control law for N u < k � N y , are the solution of the discrete-time algebraic Riccati equation (ARE) as follows: Based on these weighting matrices, the MPC controller obtains a sequence of optimal vectors U, which minimizes the cost function J. Then, the controller applies the first input vector u t to the system while discarding others. As u t is obtained considering the constraints over N y and N u , MPC can anticipate future events of the system and fulfill such complex constraints. Despite these advantages, a considerable computational load due to online optimization of MPC has been regarded as a huge drawback. Therefore, a new MPC scheme, which can reduce the computational burden, has been suggested in [10]. Called explicit MPC, this approach uses a multi-parametric quadratic programming (mp-QP) skill to perform MPC offline.
By using the prediction equation of the state vector as follows . . ;  the optimization problem (1) can be reformulated as follows: The matrices H, F, and G can be obtained offline, and F i indicates the ith row of F.
From (4), an mp-QP problem can be formulated by defining z ≜ U þ H À 1 F T x t as follows: where and H is a weighting matrix for z. The inequality constraint in (5), which is defined by x t , is a polytope, which means the generated critical regions are also polytope. The optimization variable z is a continuous piecewise affine; correspondingly, the optimal input u t is also a continuous piecewise affine function of x t [10]. One approache to forming the critical regions has been suggested in [28] as where CR j , C j , and q indicate the jth critical region, inequality constraint, and the number of constraints in the mp-QP problem (5) respectively. The whole space of the parameter vector z is the sum of the critical regions. In this paper, the parametric optimization (POP) toolbox from the PAROC Platform is used [29]. On the basis of the values of z, the eMPC controller explicitly chooses a critical region among the critical regions. A unique sequence of MPC laws is contained in each critical region so that the controller can obtain a sequence of the optimal vector U in (1). Then, as MPC processes, only the first input vector u t is chosen as the actual control input to the system. Note that in the eMPC scheme, the task of solving the complicated optimization problem (1) at each sampling time turns into a simple computational step of choosing a critical region.

Vehicle dynamics
In this subsection, the vehicle dynamics and a state-space representation reflecting a varying parameter will be addressed.  Table 1 lists the vehicle parameters, where its values refer to a vehicle model in CarSim, C-Class Hatchback 2017. x lgt (t) and y ltr (t) can be obtained as follows: where δ yaw (t) is the yaw angle of the vehicle. Considering that _ y ltr ðtÞ and δ yaw (t) in (7) is significantly smaller than V x in DLC maneuvers [30], (7) can be simply linearized as follows: The motion equation of y ltr (t) and δ yaw (t) of the vehicle can be presented as follows [30] m€ y ltr ðtÞ ¼ À In an actual driving situation, it is nearly impossible for the driver to maintain a constant longitudinal velocity V x . Therefore, in this paper, V x is considered a varying parameter, V x (t).
Using (9), the state-space representation of the LTV system can be obtained as follows: where x t 2 R n ; u t 2 R m ; ; In (10), x t ¼ _ y ltr ðtÞ _ d yaw ðtÞ y ltr ðtÞ d yaw ðtÞ �  ; where A i d ½k�, i = 1, . . ., 4 indicates the varying elements due to V x (t), and k is the sampling time index.

Explicit MPC for LTI system
First, the design of the eMPC controller with the LTI system, which treats the varying parameter V x (t) as a constant value, will be presented.
The constraints of the states and input are determined as follows: À 0:65 The constraints of _ y ltr ðtÞ and δ yaw (t) are set to satisfy the assumption applied in (8). Other constraints are determined based on the boundaries of the driver model states in CarSim, with a longitudinal velocity of 60 km/h and the geometrical constraint of the road path.
The determination of the weighting matrices in (1)  ; R ¼ 1 � 10 À 6 ; QR ¼ 35: As the value of the weighting factor increases, the associated state or input is more dominantly considered in solving (1). The values in (15) are chosen with respect to this relation through trial and error. The matrix P in (1), which acts as the weighting matrix for the terminal states, is given by the discrete-time Riccati Eq (2). The input horizon N u is set to 1, and to obtain the range of the prediction horizon N y , some cases of N y are set and simulated as shown in Fig 3. It can be found that the ability of eMPC controllers to predict future events, which is y ltr (t) in this case, is enhanced with a long range of N y . However, in this simulation, an excessively long range of N y results in an unreasonably earlier steering, which can be seen in the case of N y = 60 as well as increasing the number of critical regions which consumes a large memory size. Because this control action may cause the vehicle to collide with the traffic cones, N y is set to 40 in this paper.
A total of 113 critical regions were generated using the POP toolbox and and z 2 are bounded by the constraint set (14). Each critical region owns its unique sequence of optimal vectors and a region is chosen based on the values of z 1 and z 2 . The eMPC controller selects the region by simply calculating inequality constraints instead of solving the optimization problem (1) at each sampling time. This reduction in computational load relieves the burden of implementing industrial microcontrollers in real-time situations [31]. For an actual implementation of eMPC controllers, the POP toolbox forms critical regions in the controller design process as in this subsection. Then, eMPC controllers employ the conditional statement written by C language, which represents generated critical regions. Based on the values of the variables, controllers explore this statement to obtain an optimal input vector for the real-time closed-loop control. An explicit MPC controller with an LTI system, where V x is assumed to be constant, is designed and compared with an LTV system, which will be addressed in Section 3.3.

Explicit MPC for LTV systems
Considering an actual driving situation, the LTI system matrix A d is changed into the timevariant system matrix A d [k] as determined in (13). In this paper, A d is denoted byÂ d , which we assume to be known as we know the initial value.
In this subsection, an algorithm proposed [23] to compensate the state vector x[k] will be presented. Through this algorithm, the eMPC controller can be made robust against parameter changes. Fig 5A illustrates the implementation of eMPC for LTI systems. Based on the critical regions, which are formed by LTI systems, and the measured state vector x[k], the eMPC controller explicitly obtains an optimal input u [k]. Because the eMPC controller is designed based When the prediction horizon is 20, a relatively large error in the lateral displacement appears as the prediction ability of the controller is degraded. On the other hand, when the prediction ability increases overwhelmingly a prediction horizon of 60 in this case, an extremely early steering is observed. Therefore, the prediction horizon is set to 40 for the controller. https://doi.org/10.1371/journal.pone.0208071.g003 Explicit model predictive control for linear time-variant systems with application to lane change maneuver onÂ d , the controller is vulnerable to such parameter variation. Whereas Fig 5B shows the implementation of eMPC, where an error compensator, which is a simple linear matrix, is added to compensate for the state vector according to the variation in the system matrix.
The matrix A d [k] can be determined as where D i 2 R n�n , a i ðtÞ 2 R, and N v is the number of varying parameters. We know which elements vary but how the matrix evolves is unknown. Eq (12) can be rewritten using (16) as follows: D i a i ½k À 1�x½k À 1�; ¼ D½k À 1�½a 1 ½k À 1�Þ; a 1 ½k À 1�Þ; . . . ; a N v ½k À 1��; In (17) As a result, by substituting (17) into (16), A d [k − 1] can be obtained based on the recent history of the states and input, and the current state measurement. In order to obtain the gain matrix L[k] for the compensation of the state vector, the following equation can be considered: wherex½k� denotes a compensated state vector at the time instant k. Assume that the initial system matrixÂ d is invertible, andx½k� in (18) is replaced by Then, considering (12) and (18) Because (20), the compensation of the state vector in Fig 5B, is a simple matrix multiplication based on the previous states and input, this compensator does not need modification of the critical regions of eMPC regarding parameter variation. For the better understanding, a full explanation about this approach can be found in [23].  Fig 5B, compensating for the state vector with an error compensator, enables the controller to be robust against such parameter variation. The main advantage of this approach is that, by simply adding a compensator, where only matrix multiplication is taken in its process, no modification of the critical regions is necessary. maneuver. This figure also demonstrates the fulfillment of the constraints of the eMPC controller by showing that all variables are within the boundaries. Fig 7 shows the simulation results of eMPC controllers for both LTI and LTV systems at a longitudinal velocity of 100 km/h. The tracking abilities of all controllers, including the driver model, are degraded as a relatively more rapid and sophisticated control of the steering wheel is required than that at a longitudinal velocity of 60 km/h. As we predicted previously, Fig 7  also shows that the longitudinal velocity varies during the driving situation even though this value is assumed to be constant. The eMPC controller designed for the LTI system is inevitable to be vulnerable to this parameter variation. This degradation of the performance of the controller demonstrates the importance of designing the eMPC controller for LTV systems. The result of the lateral displacement error shows the improvement in the eMPC controller for the LTV system. After five seconds of the simulation, where the longitudinal velocity varies apparently enough, the error in the eMPC controller for the LTV system decreases compared to that for the LTI system. A considerable lateral error appears in the simulation of the driver model which nearly causes a collision with a traffic cone, as shown in Fig 8. The driver model and eMPC controller for the LTV system are colored by gray and red, respectively.  (19) based on the recent measurment of states and inputs to consider parameter variation. As seen in Fig 9, the variation in the states of the LTV system is relatively restricted than that of the LTI system, resulting in an increase of the tracking ability. In addition, because a rapid lateral acceleration corresponds to a large sprung mass acceleration, which deteriorates the ride comfort [32], the proposed controller can also enhance the ride comfort.

Simulation results
Furthermore, In the actual driving situation of commercial vehicles, it frequently happens that the initial parameters change, for instance, vehicle mass due to passengers on buses or loads on trucks. Hence, robust controllers against parameter variation needs to be designed to maintain the performance of controllers for LTI systems.

Conclusion
An eMPC controller was designed for the LTV system of the vehicle. eMPC has been proposed to reduce the huge computational complexity of MPC by using an mp-QP technique. In the preliminary version of this paper, the vehicle model for the DLC maneuver is assumed to be LTI. However, such parameters, the longitudinal velocity for instance, are inevitably changed in an actual driving situation.
In this paper, we designed the eMPC controller with a simple add-on unit for the LTV system. The main contribution of this approach is that no modification is required in the critical regions of eMPC. Through the simulation results, the fulfillment of the constraints and tracking ability of the proposed controller were shown. Furthermore, it was found that the proposed controller improved ride comfort by compensating for the state vector and control input.

Future works
In the future work, we intend to conduct an actual experiment for a DLC maneuver using an electric power steering test bench to verify the applicability of the eMPC controller for autonomous driving. In addition, a more detailed analysis about the feasibility of the eMPC scheme is planned for the future work. In this paper, the eMPC controller succeeded in obtaining the control law with respect to the constraints of the vehicle and discrete-time ARE. Therefore, we intend to simulate how the eMPC controller derives the control input when the controller fails to solve the MPC problem due to more complex or harder constraints.
Moreover, because of the increased number of ECUs in electric vehicles, the time delay appeared in transmitting control or state signals has been significantly considered to cope with. Regarding this issue, in [33], a robust sliding mode controller has been designed for the States of the vehicle model during DLC maneuver. In the implementation of the eMPC controller for the LTV system, the states are compensated regarding the parameter variation to improve the robustness of the controller. The proposed controller not only improves the tracking ability of the controller, but also enhances ride comfort as the lateral velocity is more restricted compared to the eMPC controller for the LTI system. https://doi.org/10.1371/journal.pone.0208071.g009 Explicit model predictive control for linear time-variant systems with application to lane change maneuver systems with delay. Therefore, we also intend to employ the algorithm presented in this paper to compensate the time delay in the state and input signals.
Supporting information S1 Dataset. Constraints for partitioning of critical regions when the prediction horizon is 40 and input horizon is 1.