技术文章和新闻通讯

通过机器学习检测宝马汽车的过度

By Tobias Freudling, BMW Group


过度稳定是一种不安全的条件,其中车辆的后轮胎在转弯时失去握力(图1)。这可能是由磨损的轮胎,湿滑的道路条件,转弯过快,转弯时突然制动或这些因素的组合引起的。

Figure 1. Oversteering a BMW M4 on a test track.

Figure 1. Oversteering a BMW M4 on a test track.

Modern stability control systems are designed to automatically take corrective action when oversteer is detected. In theory, such systems can identify an oversteering condition by using mathematical models based on first principles. For example, when measurements from onboard sensors exceed established threshold values for parameters in the model, the system determines that the car is oversteering. In practice, however, this approach has proven difficult to implement because of the interplay of the many factors involved. A car with underinflated tires on an icy road might need vastly different threshold values than the same car operating with properly inflated tires on a dry surface.

在宝马,我们正在探索一种机器学习方法来检测过度的工作。在MATLAB工作®, we developed a supervised machine learning model as a proof of concept. Despite having little previous experience with machine learning, in just three weeks we completed a working ECU prototype capable of detecting oversteering with over 98% accuracy.

收集数据并提取功能

We began by gathering real-world data from a vehicle before, during, and after oversteering. With the help of a professional driver, we conducted live driving tests in a BMW M4 at the BMW proving grounds in Miramas, France (Figure 2).

Figure 2. The BMW proving grounds in Miramas, France.

Figure 2. The BMW proving grounds in Miramas, France.

在测试期间,我们捕获了过度转向检测算法中常用的信号:车辆的正向加速度,侧向加速度,转向角和偏航速率。此外,我们还记录了驾驶员对过度运转的看法:当驾驶员指示汽车过于步步时,我的同事以乘客骑车骑车时,按下了笔记本电脑上的一个按钮。当驾驶员指示汽车正常返回处理时,她释放了按钮。这些按钮按下创建了我们需要培训监督学习模型的地面真实标签。总共,我们在43分钟记录的数据中捕获了约259,000个数据点。

Back in our Munich office, we loaded the data that we had collected into MATLAB and used the Classification Learner app in Statistics and Machine Learning Toolbox™ to train machine learning models using a variety of classifiers. The results produced by models trained on this raw data were not outstanding—the accuracy was between 75% and 80%. To achieve more accurate results, we cleaned and reduced the raw data. First, we applied filters to reduce noise on the signal data (Figure 3).

图3.过滤后的原始转向角信号和相同的信号。

图3.过滤后的原始转向角信号(蓝色)和相同的信号(橙色)。

接下来,我们使用峰分析来识别我们过滤后的输入信号上的峰(图4)。

图4.鉴定出峰的转向角信号。

图4.鉴定出峰的转向角信号。

评估机器学习方法

过滤和减少收集的数据后,我们可以更好地评估监督机器学习方法。使用分类学习者应用程序,我们尝试了K-Nearest邻居(KNN)分类器,支持向量机(SVM),二次判别分析和决策树。万博1manbetx我们还使用该应用程序来查看通过主成分分析(PCA)转换功能的效果,这有助于防止过度拟合。

The results produced by the classifiers that we evaluated are summarized in Table 1. All the classifiers performed well in identifying oversteer, with three producing true positive rates above 98%. The deciding factor was the true negative rates: how accurately the classifier was able to determine when the vehicle was不是oversteering. Here, decision trees outperformed the other classifiers, with a true negative rate of almost 96%.

True Positive (%) True Negative (%) 假阳性 (%) False Negative (%)
k-nearest邻居与PCA
94.74 90.35 5.26 9.65
Support Vector Machine 98.92 73.07 1.08 26.93
二次判别分析 98.83 82.73 1.17 17.27
Decision Trees 98.16 95.86 1.84 4.14
Table 1. Summary of results for four different supervised machine learning classifiers.

生成Code for In-Vehicle Tests

The results produced by the decision tree were promising, but the true test would be how well the classifier performed on an ECU in a real car. We generated code from the model with MATLAB Coder™ and compiled the code for our target ECU, installed in a BMW 5 Series sedan. This time, we conducted the tests ourselves at a BMW facility near Aschheim, close to our office. As I drove, my colleague collected data, recording the precise times when I indicated that the car was oversteering.

分类器在ECU上实时运行,表现出色,准确率约为95%。进入测试,我们不知道会发生什么,因为我们使用了其他车辆(BMW 5系而不是M4),另一个驱动程序和其他轨道。仔细观察数据表明,模型与驾驶员感知到的过度平稳之间的大多数不匹配发生在过度转移条件的开始和结束附近。这种不匹配是可以理解的。即使对于驾驶员来说,也很难确定何时开始和停止过度转向。

Having successfully developed a machine learning model for oversteering detection and deployed it on a prototype ECU, we are now envisioning numerous other potential applications for machine learning at BMW. Vast amounts of data collected over decades are available to us, and today, a single vehicle can generate a terabyte of measured data in a day. Machine learning provides an opportunity to develop software that uses the available data to learn about a driver’s behavior and improve the driving experience.

出版2018年

View Articles for Related Capabilities

查看相关行业的文章