Technical Articles

Rapid Prototyping for Intelligent Networked Vehicle Applications

By Jian Lv, United Automotive Electronic Systems Co., Ltd.

The development of intelligent and connected vehicle applications has been the subject of growing interest across the automotive industry. Compared to traditional ECU-based vehicle software, however, these new applications bring with them increased uncertainty. Specifically, questions about technical feasibility, user acceptance, and robustness must be answered as early as possible in the system design phase.

To help answer these questions and better manage the uncertainty around the development of novel intelligent networked vehicle applications, my engineering team at United Automotive Electronic Systems Co., Ltd. has established a new rapid prototyping approach based on MATLAB® and Simulink®. We recently used this approach to develop and validate a predictive gasoline particle filter (GPF) regeneration application that increases fuel economy and drivability by accounting for a range of factors, including the operator’s driving style and route. The system architecture for this application includes a vehicle GPF simulation model developed in Simulink, a web application designed using App Designer and deployed via MATLAB Web App Server™, and a cloud-based predictive GPF regeneration algorithm hosted on MATLAB Production Server™ (Figure 1). This architecture enables us to quickly build prototype applications that can be fully simulated at both vehicle and fleet levels. It also makes it easy for us to incorporate machine learning and deep learning techniques to improve efficiency and reduce the time needed to build accurate simulation models.

A diagram showing architecture for the rapid prototyping of predictive GPF regeneration algorithms, including the Simulink Vehicle GPF simulation model, MATLAB Production Server, and MATLAB Web App Server.

Figure 1. Architecture for the rapid prototyping of predictive GPF regeneration algorithms.

GPF and Predictive Regeneration Basics

As a key component of the emissions system on vehicles with gasoline direct injection engine, a GPF removes particulate matter from the exhaust gas. To keep the filter operating effectively, the soot that accumulates over time must periodically be burnt off through a process called regeneration.

Control strategies that decide when it is best to initiate regeneration are vital because the timing of this process affects several key performance metrics, including fuel efficiency, drivability, and the lifespan of the filter itself. Frequent regenerations decrease fuel economy and adversely affect drivability. Conversely, delayed regenerations can cause soot to build up, which increases exhaust back pressure and risks damaging the filter.

Since the regeneration can only take place when the exhaust temperature is high, it is ideally performed when the vehicle has been operating at high speeds rather than idling or in stop-and-go traffic. Although it is possible for an emissions control system to raise exhaust temperature by increasing the ignition angle, this increases fuel consumption and diminishes drivability. For a control algorithm to consistently identify the best times to initiate a regeneration, it must be able to predict periods of expected elevated temperatures by considering a range of factors, including the aggressiveness of the vehicle operator’s driving style, their planned or expected route, and traffic along that route. It was this kind of predictive regeneration algorithm that our team developed via rapid prototyping with MATLAB and Simulink.

Developing the Vehicle GPF Model

Among the first components we start building was the vehicle GPF simulation model. This Simulink model uses input values such as engine speed, engine temperature, and the air-fuel equivalence ratio (lambda) to calculate the rate of soot accumulation and the total soot load of the filter. It also includes submodels that calculate the filter temperature, control the active regeneration of the filter, and track the amount of soot burnt (Figure 2).

Workflow illustration of the Simulink vehicle GPF model.

Figure 2. The Simulink vehicle GPF model.

Since it would take a long time to build an accurate plant model of the GPF based on physical and chemical principles, we took an alternative approach. Specifically, we used the Regression Learner app from Statistics and Machine Learning Toolbox™ to train and validate a regression model using data we had collected for soot load. We used a similar technique to develop a long short-term memory (LSTM) model for exhaust temperature prediction based on engine speed and engine temperature, among other factors. We trained this model using PyTorch® and incorporated it into our Simulink model. This data-driven approach with machine learning and deep learning not only produced accurate models (Figure 3), but it was also much faster than developing physical models based on first principles.

Two graphs, one above and one below, showing comparison of actual and predicted soot load and the engine working conditions used to train the model, respectively.

Figure 3. Comparison of actual (blue) and predicted (red) soot load (above) and the engine working conditions used to train the model (below).

Developing and Deploying the Predictive GPF Regeneration Algorithm

As we were developing the Simulink vehicle GPF model, we were also working on the predictive regeneration algorithm itself. This algorithm continually performs a series of operations to predict an optimal time window for performing the regeneration. The first operations include obtaining data on current traffic conditions and environmental conditions, such as the vehicle’s position and weather respectively. Based on the information obtained, the algorithm then estimates the vehicle’s speed, before using this value to predict exhaust temperature and subsequently soot accumulation. Finally, the algorithm forecasts both when regeneration will be necessary and when regeneration can be performed efficiently. In other words, it identifies opportunities for initiating the burn when the exhaust temperature will already be elevated due to the vehicle’s speed.

We trained the algorithm’s prediction models in PyTorch and deployed the entire algorithm to the cloud using MATLAB Production Server. During a simulation, the deployed algorithm communicates with an instance of the vehicle GPF model. To make it easier to deploy this model to the cloud—and potentially scale our simulations to the multiple vehicles in a fleet in the future—we packaged it as standalone executable using Simulink Compiler™ and deployed in a Docker container. The predictive algorithm sends information to the vehicle GPF model via an Apache® Kafka® event stream. This information includes data values, such as engine speed and temperature, which are based on the traffic and environmental conditions, as well as commands to initiate a regeneration, which are based on the algorithm’s prediction models. The vehicle GPF model processes this information and sends back soot load and other regeneration details via Kafka (Figure 4).

Screenshot of Apache Kafka showing events exchanged between the predictive GPF regeneration algorithm and the vehicle GPF model. 

Figure 4. Kafka events exchanged between the predictive GPF regeneration algorithm and the vehicle GPF model. 

Building a Web Application Front End

The final piece of our simulation environment is the web application user interface developed using App Designer and deployed using MATLAB Web App Server. This application makes use of Mapping Toolbox™ functions to display a road map on which the user can select one of several previously traveled routes for a simulated vehicle to navigate (Figure 5). Once the user starts the simulation, the predictive algorithm continually sends messages to the vehicle GPF model, receives soot load and other data back from the model, and identifies opportune regeneration windows as well as forced regeneration windows. The former are periods during which regeneration can be run effeciently with minimal impact to drivability and fuel economy, while the latter are periods during which a regeneration should be initiated as soon as possible to remove soot build-up.

A screenshot of the web application, showing a previously traveled route, hosted via MATLAB Web App Server.

Figure 5. Web application hosted via MATLAB Web App Server.

Results and Next Steps

After running simulations in which virtual vehicles traveled more than 4,500 kilometers, we compared the results from our new predictive GPF regeneration strategy with results from a traditional strategy—like those implemented on many ECUs today. The results showed a significant decrease in the number of active regenerations and fuel consumed during regenerations, as well as a modest reduction in overall fuel consumption (Figure 6). 

Traditional strategy results
Predictive strategy results

Final carbon load Burner quantity Burner duration Number of regenerative activations Fuel consumption Active regenerative fuel consumption Cumulative total mileage
3.823 g 2.707 g 8524 s 138 552.6 L 13.1 L 4,529 km
3.315 g 3.265 g 12566 s 71 548.3 L 8.8 L
-13.3% +20.6% +47.4% -48.6% Active regenerative fuel consumption -32.6%

Figure 6. Comparison of results for traditional and predictive GPF strategies.

The rapid prototyping approach we established for predictive GPF regeneration is widely applicable to a variety of intelligent networked vehicle applications. It combines tools that our automotive engineers have extensive experience with—namely, MATLAB for engineering data analysis and technical computing and Simulink for simulation—with new technologies that our engineers are increasingly employing, such as web front ends, cloud computing, and machine learning. Going forward, we expect that a growing number of our teams will use this approach to build new intelligent applications for the cloud using their expertise in MATLAB and Simulink.

Published 2023

View Articles for Related Capabilities

View Articles for Related Industries