数据驱动模型预测控制应用于自动驾驶车辆转向
Application of Data-driven Model Predictive Control to Autonomous Vehicle Steering
数据驱动模型预测控制应用于自动驾驶车辆转向

Abstract
With advancements in autonomous driving technology, there is a growing demand for effective vehicle control systems, which has led to increased research interest in model predictive control (MPC). Existing MPC methods relying on vehicle kinematics or dynamics face several challenges including complex modeling requirements numerous parameters inherent nonlinearities and high computational costs. To tackle these issues this paper introduces a data-driven MPC approach tailored for autonomous vehicle steering applications. This method eliminates the need for intricate vehicle system models while achieving precise trajectory tracking with minimal computational resources. Through comprehensive simulations using CarSim-Simulink we evaluate the algorithm's effectiveness under diverse scenarios comparing its performance against traditional PID controllers and conventional vehicle motion-based MPC strategies. The results demonstrate that this innovative approach offers enhanced accuracy and reliability making it a promising solution for advancing autonomous driving technologies. Index Terms—data-driven control autonomous vehicle steering model predictive control path tracking
I. INTRODUCTION
Currently, autonomous driving has matured and is gradually coming into the public eye. Numerous internet and vehicle manufacturing companies are investing increasing efforts into researching autonomous driving technology, which has significantly contributed to improving traffic congestion, reducing traffic accidents, and enhancing economic benefits [1], [2]. Mastinu et al. analyzed the reasons and scenarios in which drivers lose control of the vehicle. They pointed out that after severe lane changes, gusts of wind, or other disturbances, drivers might be unable to regain the intended actions, potentially posing traffic safety hazards [3]. Moreover, Ahangar et al. found that the number of fatalities due to road traffic accidents is continually rising, with many accidents resulting from driver fatigue and distraction [4]. Additionally, the proportion of carbon dioxide emissions from road traffic in the total human carbon dioxide emissions is also increasing [5]. Therefore, research on autonomous driving technology is urgently needed.
目前,自动驾驶技术已经成熟,并逐渐进入公众视野。众多互联网公司和汽车制造企业正在加大对自动驾驶技术研究的投入,这在改善交通拥堵、减少交通事故和提升经济效益方面做出了显著贡献[1]、[2]。Mastinu等人分析了驾驶员失去对车辆控制的原因和场景。他们指出,在剧烈变道、阵风或其他干扰之后,驾驶员可能无法恢复预期动作,这可能会带来交通安全隐患[3]。此外,Ahangar等人发现,由于道路交通事故导致的死亡人数持续上升,许多事故是由于驾驶员疲劳和分心造成的[4]。同时,道路交通产生的二氧化碳排放量在人类总二氧化碳排放量中的比例也在增加[5]。因此,对自动驾驶技术的研究迫在眉睫。
Autonomous vehicles are composed of multiple modules, including perception, prediction, planning, decision-making, and control. Among them, control is one of the most critical modules, and the control methods have always been a key research focus. In the field of autonomous driving control, PID and adaptive control, etc. are widely used in the industry, which do not require mathematical modeling of the system, and the optimal control quantity can be obtained using the vehicle’s state and reference trajectory [6], [7]. In academia, however, Model Predictive Control (MPC) is a widely researched topic. First proposed by Richalet et al. in 1978 [8], MPC have since evolved with various modifications to suit different control scenarios and controlled objects [9]–[11].
自动驾驶车辆由多个模块组成,包括感知、预测、规划、决策和控制。其中,控制是最关键的模块之一,控制方法一直是研究的重点。在自动驾驶控制领域,PID和自适应控制等方法在工业界得到了广泛应用,这些方法不需要对系统进行数学建模,可以直接使用车辆的状态和参考轨迹来获得最优控制量[6]、[7]。然而,在学术界,模型预测控制(MPC)是一个广泛研究的话题。MPC最早由Richalet等人在1978年提出[8],自那以后,MPC经历了各种改进,以适应不同的控制场景和控制对象[9]–[11]。
However, general MPC require precise modeling of the controlled system. Currently, most MPC methods for autonomous driving steering control are based on vehicle kinematics or dynamics models [12], [13]. Vehicle kinematics models have fewer parameters and simple structures, but they simplify the autonomous vehicle into a two-wheel model, which significantly deviates from the actual vehicle situation and results in low control precision. On the other hand, vehicle dynamics models contain more parameters and require parameter calibration through experiments, and also the strong nonlinearity of the models leads to high optimization computational costs. Therefore, researchers have begun considering how to avoid the cumbersome modeling process and directly use data for system characteristics analysis [14] and controller design [15]– [17].
然而,传统的MPC需要对被控系统进行精确建模 。目前,大多数自动驾驶转向控制的MPC方法都是基于车辆运动学或动力学模型[12]、[13]。车辆运动学模型参数较少、结构简单,但它们将自动驾驶车辆简化为双轮模型,这与实际车辆情况相差甚远,导致控制精度较低。另一方面,车辆动力学模型包含更多参数,需要通过实验进行参数校准,而且模型的强非线性导致优化计算成本高 。因此,研究人员开始考虑如何避免繁琐的建模过程,直接使用数据进行系统特性分析[14]和控制器设计[15]–[17] 。
Currently, Data-driven MPC becomes widely researched. This control method avoids the precise modeling of system, as required by traditional MPC algorithms, and reduces computational time while maintaining high control accuracy. To address existing vehicle control problems, this paper studies the existing Data-driven MPC and, by integrating vehicle system characteristics, applies it to vehicle steering control and verifies the feasibility of this method. The contributions of this paper are presented as follows:
目前,数据驱动的模型预测控制(MPC)被广泛研究 。这种控制方法避免了传统MPC算法所要求的系统精确建模 ,并在保持高控制精度的同时减少了计算时间 。为了解决现有的车辆控制问题,本文研究了现有的数据驱动MPC,并通过整合车辆系统特性,将其应用于车辆转向控制,并验证了这种方法的可行性。本文的贡献如下:
1.Based on the research of [18]–[21], a Data-driven Model Predictive Control method is applied to autonomous vehicle steering control.
2.The feasibility of the application of DDMPC to autonomous vehicle steering was verified through simulation experiments, and the superiority of this algorithm was demonstrated by comparing it with other algorithms.
The rest of the paper is organized as follows. Section II provides a brief introduction to our research problem and discusses Willems’ Lemma. In Section III, we introduce the existing research on DDMPC. Based on this, we make minor modifications to make the algorithm applicable to autonomous vehicle control. In Section IV, we validate the effectiveness of the proposed algorithm through CarSim and Simulink simulation experiments and conduct a comparative analysis with PID and vehicle kinematics MPC algorithms. Finally, conclusions are drawn in Section V.
1.基于对文献[18]-[21]的研究,将数据驱动的模型预测控制方法应用于自动驾驶车辆的转向控制。
2.通过仿真实验验证了DDMPC在自动驾驶车辆转向应用的可行性,并通过与其他算法的比较展示了这种算法的优越性。本文的其余部分组织如下:第二节简要介绍了我们的研究问题,并讨论了Willems引理。在第三节中,我们介绍了关于DDMPC的现有研究。基于此,我们进行了小幅修改,使算法适用于自动驾驶车辆控制。在第四节中,我们通过CarSim和Simulink仿真实验验证了所提算法的有效性 ,并与PID和车辆运动学MPC算法进行了比较分析 。最后,在第五节中得出结论。
II. PROBLEM STATEMENT
The development of autonomous vehicle technology relies on efficient and reliable control algorithms. The advantage of MPC lies in its ability to calculate high-precision control inputs within a limited prediction horizon, based on the vehicle model and reference trajectory. Consequently, MPC often depends on accurate vehicle models, but modeling and parameter calibration of traditional vehicle models—especially dynamic models—become extremely challenging. Additionally, vehicle models often have many parameters and strong nonlinearity, which may consume a significant amount of computational time during optimization. Most scholars and engineers address this issue by linearization, but this often leads to a decrease in model accuracy.
自动驾驶车辆技术的发展依赖于高效且可靠的控制算法。模型预测控制(MPC)的优势在于其能够在有限的预测范围内,基于车辆模型和参考轨迹,计算出高精度的控制输入。因此,MPC往往依赖于精确的车辆模型,但传统车辆模型——尤其是动态模型——的建模和参数校准变得极其具有挑战性。此外,车辆模型通常包含许多参数且具有很强的非线性,这可能会在优化过程中消耗大量的计算时间 。大多数学者和工程师通过线性化来解决这一问题,但这往往会导致模型准确性的降低。
Based on the Willems’s lemma, which is a data-based method for system identification [22], Jeremy first proposed an algorithmic framework called Data-enabled Predictive Control and applied it on aerial robotics [18]. Thereafter, Berberich et al. designed a robust Data-driven MPC control method [19]–[21]. This method can directly use the Hankel matrix constructed from offline input-output trajectory data of the system to replace complex system models, predicting future states of the system and thereby calculating the optimal control inputs. Lu et al. used this method to complete the data-driven identification of vehicle and designed a DDMPC controller for vehicle lateral stability control [23]. Subsequently, many scholars have expanded and applied this method [24], [25].
基于Willems引理 ,这是一种基于数据的系统辨识方法 ,Jeremy首次提出了一个名为Data-enabled Predictive Control的算法框架 ,并将其应用于空中机器人。此后,Berberich等人设计了一种鲁棒的数据驱动MPC控制方法 –。这种方法可以直接使用从系统的离线输入输出轨迹数据构建的Hankel矩阵来替代复杂的系统模型,预测系统的未来状态,从而计算出最优的控制输入 。Lu等人使用这种方法完成了车辆的数据驱动辨识 ,并为车辆横向稳定性控制设计了一个DDMPC控制器 。随后,许多学者扩展并应用了这种方法,。
We build on this foundation by applying the data-driven MPC algorithm proposed by [18] and [19] to steering control of autonomous vehicles and provide the algorithm application flowchart, as shown in Fig. 1.
我们在[18]和[19]提出的数据驱动MPC算法的基础上,将其应用于自动驾驶车辆的转向控制,并提供了算法应用流程图,如 图1 所示。
III. APPLICATION OF DDMPC FOR AUTONOMOUS VEHICLE STEERING
A. Willems’ Lemma and Application
In this context, we initially examine the description and application of Willems' Lemma as outlined in references [18] and [19]. In this context, we initially examine the description and application of Willems' Lemma as outlined in references [18] and [19].

where u(t) ∈ U ⊂ ℝ^m represents the system's input at time t, with m being the input dimension; y(t) ∈ Y ⊂ ℝ^p represents the system's output at time t, with p being the output dimension; G(\cdot) serves as the system's behavior model, typically expressed through transfer functions or state-space equations.
When a set of inputs U is applied to the system, it generates corresponding output vectors Y. The open-loop input-output data collected are represented by two vector sets in Equation 2.

where N represents the count of data sets, and the choice of this parameter will significantly affect the subsequent Data-driven MPC design.
其中 N 代表数据集的数量,在后续的数据驱动MPC设计中将发挥着关键作用 。
对输入-输出数据进行系统性处理
随后

其中 L 表示 MPC 算法的基本预测步长。基于以下定义,我们判断输入矩阵 H_L(U) 对应的输入序列 U 是否满足持续激励的要求。
定义(引文见文献 [18] 和 [19]):输入序列 U 被认为是阶数为 L 的持续激励的充要条件是基于由该序列构建的阶数为 L 的 Hankel 矩阵 H_L(U) 的秩满足方程 5。
定义(见文献 [18] 和 [19]):通过从该输入序列构建 Hankel 矩阵 H_L(U) ,若其秩满足方程 (5),则称该输入序列为阶数为 L 的持续激励。

This implies that the input sequence is sufficiently rich to activate all dynamic modes of the system. Based on this principle, we can further investigate the connection between the input-output Hankel matrix and the system under study to predict future system outputs. Willems' Lemma [22] states: Given a set of N input-output data {U,Y} = {{u_k,y_k}}{k=0}^{N-1}, measured from a system G where U is persistently exciting of order L + n; then {{ū_k,\ȳ_k}}{k=0}^{L-1}} represent the predicted input-output sequences for future L time steps based on {U,Y}. This holds true if and only if there exists an α ∈ ℝ^{N-L+1}} that satisfies Equation 6.

Let n denote the number of states in the controlled system. By referring to the prior definition of persistent excitation, it is imperative that the rank of the Hankel matrix H_{L+n}(U), which is constructed from an input sequence U of length N, satisfies Equation 7.

基于已知的历史输入-输出数据,在找到最优的α值后,我们可以通过上述引理来预测系统的未来输入和输出。这一引理在系统辨识和数据驱动控制领域具有极大的兴趣,在提供了一种新的方法的同时使我们无需推导系统的模型(甚至无需了解系统的具体形式),即可直接从系统产生的开环数据中获得动态行为信息[18]-[21]。由于当输入信号满足某些持续激励条件时,在预先收集的已知输入-输出数据段上构建的Hankel矩阵隐含地代表了系统的动态特性,并且可通过线性组合表示基本预测范围L内系统的任何输入-输出轨迹。
B. DDMPC for Vehicle Steering Control
Drawing from Willems' lemma, existing studies have incorporated MPC roll optimization into their frameworks and developed the DDMPC optimization formulation [18, 19]. This approach is then applied to vehicle steering control within this subsection, as demonstrated in Equations 8 through 12.

where y_{kr}(t) 和 u_{k}(t) 分别表示系统在时间 t 从当前状态向前 k 个时间步的预期输出和输入;Q \in \mathbb{R}^{p \times p} 和 R \in \mathbb{R}^{m \times m} 是对称正定矩阵。\ 在自动驾驶控制的情境下,在时间 t 前向 k 个时间步内车辆的位置信息及其状态被 y_{kr}(t) 所代表。\ 从安全性和舒适性的角度来看,在时间 t 前向 k 个时间步内期望的控制作用通常被设定为空值向量。\ 基于Willems引理原理\ ,我们通过Hankel矩阵来表征 \bar{y} 和 \bar{u} 并限定系统状态\ ,从而形成了以下优化问题所包含的等式与不等式约束方程组

In this context, 方程9 表示初始约束 ,其中 u_{-n}(t) 和 y_{-n}(t) 分别表示在时间 t 之前 n 个时间步的实际控制输入和输出。这一约束旨在利用系统的实际动态行为来约束决策变量 \alpha(t) ,以确保预测结果与实际系统行为紧密匹配。
方程10 是数据驱动 MPC 算法中应用维勒姆斯引理的结果。它使用汉克尔矩阵来预测系统的输入输出,并作为此优化问题的等式约束。通过将预测系统输出 \overline{y}(t) 与参考轨迹 y_{kr}(t) 进行比较,得到最优控制序列 \overline{u}(t) 。
方程10 是Willems引理在数据驱动MPC算法中的应用。它通过Hankel矩阵预测系统的输入输出,并将其作为优化问题的一个等式约束条件。通过比较预测系统输出 \bar{y}(t) 和参考轨迹 y_{k}^r(t) ,可以获得最优控制序列 \bar{u}(t) 。
方程11 表示决策变量的上下界约束 。在一般系统中,在自动驾驶控制系统中对控制输入 \bar{u}(t) 的约束尤为重要 ,因为这些输入通常是加速度或前轮转向角 。通常需要从安全和舒适的角度限制 \bar{u}(t) 的范围 。值得注意的是 ,这里选择的预测范围应为 L+n ,这意味着开环输入序列必须是阶数 L + 2n 的持续激励 [19] 。此外 ,基于开环数据构建的Hankel矩阵应满足 方程13 。

在此时段里
IV. EXPERIMENTS AND RESULTS
为了验证算法的有效性, 我们基于CarSim和Simulink软件进行了仿真实验. CarSim是一种广泛认可的车辆实验仿真平台, 配备了精确的车辆动力学模型, 能够真实地模拟现实世界中车辆的具体运行情况. 仿真实验分为两个阶段: 开环数据采集与闭环算法仿真验证, 并遵循算法设计的基本逻辑. 在CarSim中, 选择了一辆D级轿车作为开环数据采集与算法仿真验证的测试用例. 具体参数如表I所示.

A. Open-Loop Data Collection
In CarSim, we established a test environment for open-loop data collection. To ensure comprehensive operation, this setup should incorporate a wide range of steering maneuvers so that input sequences can effectively engage all dynamic aspects of the vehicle's behavior. The selection of output variables includes key parameters such as horizontal coordinate X and vertical coordinate Y within the global reference frame, along with heading angle ϕ. These variables represent quantities of interest for analyzing system responses. Meanwhile, control inputs are defined by left front wheel steering angle δL and right front wheel steering angle δR respectively. Consequently, Eq. 14 and Eq. 15 provide a mathematical representation of this open-loop input-output relationship under varying operating conditions.

Because of the variable speed of the vehicle, it becomes essential to interpolate or approximate the more sparse sections within the gathered raw data. Furthermore, preprocessing is required for this dataset, which includes such steps as data cleaning and outlier removal. The total number of processed datasets obtained is N = 646.
B. Simulation Experiments
Since we do not need to model the vehicle system, the system order n is unknown here. Therefore, we assign an upper bound v to the system order, and set v = 6 to substitute for n in the algorithm. Additionally, we set the basic prediction horizon L = 24, making the prediction horizon L + v = 30. The weight matrices are set as Q = Ip, R = 10−2 · Im, and λ = 1 · 10−3. To meet the vehicle’s safety and comfort requirements, we set umin = −1.5◦ and umax = +1.5◦. Besides, We don’t bind α(t) and y¯(t), and keep the vehicle speed around 36 km/h.
由于我们不需要对车辆系统进行建模,因此在这里系统阶数 n 是未知的。因此,我们给系统阶数指定一个上限 v,并设置 v = 6 来替代算法中的 n。此外,我们设置基本预测范围 L = 24,使得预测范围 L + v = 30。权重矩阵设置为 Q = I_p,R = 10^{-2} \cdot I_m,并且 \lambda = 1 \cdot 10^{-3}。为了满足车辆的安全和舒适性要求,我们设置 u_{\text{min}} = -1.5^\circ 和 u_{\text{max}} = +1.5^\circ。此外,我们不对 \alpha(t) 和 \bar{y}(t) 进行约束,并保持车辆速度在大约36公里/小时。
A dual-lane switching scenario shown in Fig. 2 is selected as the simulation experiment case. Additionally, the experiments are conducted using PID and vehicle kinematics MPC control algorithms in the same scenario and the comparative analysis is performed with the results of the Data-driven MPC experiments to demonstrate the advantages of the application of it in vehicle steering control.
选择了 图2 所示的双车道变换场景作为仿真实验案例。此外,在同一场景下使用PID和车辆运动学MPC控制算法进行实验,并将这些结果与数据驱动MPC实验的结果进行比较分析,以展示数据驱动MPC在车辆转向控制中应用的优势。

C. Results Analysis
Figure 4 illustrates the variation in time of the left and right front wheel steering angles under DDMPC control. It is evident that these trends are nearly identical, exhibiting smooth changes without significant fluctuations, consistently within −5◦ to +5◦. This demonstrates that the algorithm permits stable lane changes without overly aggressive steering maneuvers, ensuring vehicle stability and comfort. Moreover, a notable feature is that DDMPC can respond swiftly in turning scenarios, ensuring vehicle control safety during emergency lane changes.

To validate the practical effectiveness of DDMPC in steering control, we conducted a comparative analysis with PID and vehicle kinematics MPC algorithms as outlined in Section 4.] The experimental results presented in Figure 3 and Figure 5 demonstrate the global trajectory and tracking error across all three algorithms under identical operating conditions. The comparative analysis reveals that while all three approaches achieve trajectory tracking within defined error thresholds, significant differences emerge in their performance during curve-to-straight transitions [see Figure 3]. Specifically, both vehicle kinematics MPC and PID exhibited notable vehicle deviation from the desired trajectory during these transitions, whereas DDMPC demonstrated superior performance by ensuring a swift response to steering angle adjustments [as illustrated in Figure 4]. Furthermore, an examination of tracking errors across all scenarios revealed that DDMPC maintained relatively stable performance with consistent error magnitudes falling within ±0.1 m over a sampling interval [see Figure 5]. This consistent behavior underscores its reliability as an effective control strategy for maintaining precise trajectory adherence without significant deviations between consecutive sampling instants [as shown in Figure 6].


From Figure 6, it can be seen that the computational time for DDMPC is roughly half that required by vehicle kinematics MPC. This stems from the fact that its computational effort depends solely on the data quantity N and prediction window L + v, rather than system complexity. These observations demonstrate that appropriate selection of N, L, and v enables us to achieve desired control performance while significantly reducing computational burden.

V. CONCLUSION
In this study, we researched the existing Data-driven Model Predictive Control method proposed by [18]–[21] and apply it to steering control of autonomous vehicle. Our experiments demonstrated that the algorithm could achieve stable front wheel angle control for tracking the reference trajectory, and compared to traditional MPC algorithms, it effectively reduces control errors and computation time. For more demonstrations of the effects of the experimental section go to: https://john0915aaa.github.io/DDMPC-for-AV-steering/.
在本研究中,我们研究了现有的数据驱动模型预测控制方法,该方法由文献[18]-[21]提出,并将其应用于自动驾驶车辆的转向控制。我们的实验表明,该算法能够实现稳定的前轮角度控制以跟踪参考轨迹,与传统的MPC算法相比,它有效地减少了控制误差和计算时间 。有关实验部分效果的更多演示,您可以参考以下链接:DDMPC-for-AV-steering。
Our future work will focus on enhancing the algorithm’s robustness and real-time adaptability to further improve its effectiveness in diverse driving conditions.
我们未来的工作将专注于增强算法的鲁棒性和实时适应性 ,以进一步提高其在多样化驾驶条件下的有效性。


