“Simulink is particularly helpful in two stages of our development process. Early on, it helps us try new ideas and visualize how they will work. After generating code and conducting in-vehicle tests, we can run multiple simulations, refine the design, and regenerate code for the next iteration.”
Jonny Andersson, Scania
Inefficient driving techniques can increase carbon emissions and raise fuel consumption by as much as 10%. For a company with 20 trucks, each driven 120,000 kilometers (75,000 miles) a year, this translates to 200 tons of additional carbon dioxide emissions and 66,000 euros in added costs.
Scania’s driver support system provides immediate feedback to drivers via a dashboard console. The system helps improve driving techniques, leading to fuel economy, safer driving, and less wear and tear on brakes and other parts. Now in production on Scania R-Series trucks, Scania Driver Support was developed using MathWorks tools for Model-Based Design.
“Modeling the system in Simulink enabled us to define the architecture, visualize the design, and run simulations to debug the design at an early stage,” explains Jonny Andersson, lead engineer at Scania. “With Embedded Coder, we generated code for early real-time prototypes as well as for the production system. As a result, we refined the design in the model instead of in low-level code.”
To keep down costs, Scania wanted to analyze driving scenarios based on input from the vehicle’s existing sensors. As a result, several key metrics had to be derived mathematically. The system would have access to more than 100 inputs, most of them via the CAN bus, including individual wheel speeds, engine torque, engine speed, vehicle speed, and the gear in use. Developing algorithms that would translate these inputs into driver performance assessments was a key challenge of the project.
Scania wanted to reduce development time and enable early verification of the design on an actual ECU. They also needed to develop and evaluate different designs for the driver display panel.
Scania needed a simulation environment that would enable engineers to test ideas early in development and then use simulation and code generation to reduce the number of road tests and prototypes.
Scania engineers used MathWorks tools for Model-Based Design to model and simulate the driver support system, develop a prototype user interface, and generate embedded code for prototype and production targets.
The team partitioned the design into subsystems to evaluate the driver’s hill driving, brake use, choice of gears, and anticipation. These subsystems, together with components that control the display, were modeled using Simulink®. They used Stateflow® to model the control logic that determines when driving conditions are safe to provide the driver with an update.
Scania engineers collected truck sensor data from the CAN bus for various topographies and traffic situations during road tests and then simulated the system in Simulink using the sensor data as input. In addition, they simulated fault conditions and other operating conditions that would have been difficult or impossible to recreate in actual driving tests.
Using MATLAB®, the team developed a prototype user interface that displayed Scania Driver Support output. With MATLAB Compiler™ they created a standalone executable of the interface that was used in the trucks.
The team generated code using Embedded Coder® and deployed it to a prototype ECU, enabling real-time road testing.
Throughout development, they used the Model Advisor tool in Simulink to ensure that the models complied with Scania modeling standards. These standards were based on lessons learned from similar Simulink based projects and on MAAB guidelines. Many were implemented as customized Model Advisor checks to make them easier to follow.
During simulations the team used Simulink Verification and Validation™ to analyze model coverage and identify untested elements of the design.
After thoroughly testing the system through simulations and road tests, they generated production code for the target ECU using Embedded Coder. The ECU is now deployed on Scania R-Series trucks. Early tests show that drivers using the system have reduced fuel use by up to 11%.
Scania R-Series trucks received the International Truck of the Year award. The jury described the Scania Driver Support system as “an innovative learning tool capable of providing a continuous and proactive assessment of a driver out on the road.”
Develop a real-time driver analysis system that provides truck drivers with immediate feedback on their driving techniques
Use MathWorks tools for Model-Based Design to design and simulate the driver support system, generate embedded code for prototype and production targets, and build a prototype user interface