"By using MathWorks tools for Model-Based Design and their production code generation capabilities, we’ve become more agile and can respond rapidly to future technical software challenges."
Roger Tudor, Lotus Engineering
The U.S. Environmental Protection Agency (EPA) has set stringent standards for 2007 diesel exhaust emissions to reduce pollution by 95 percent. To comply with these standards, diesel engines will need to reduce emissions of nitrogen oxide by more than 50 percent and particulate matter by 90 percent.
As a leading automotive consultancy, Lotus Engineering is helping one of its clients meet these requirements by using MathWorks tools for Model-Based Design to model, simulate, and generate code for emission control systems.
"Using MathWorks tools to model our control systems has enabled us to manage the complexity of new emissions technologies and the interactions between the catalysts and other components," says Roger Tudor, Principal Engineer at Lotus Engineering. "The tools have made a very difficult task much easier for us. I don't think we could have done it without them."
Lotus Engineering’s client wanted to avoid redesigning the engine, opting instead for exhaust aftertreatment to reduce emissions. Lotus Engineering needed to develop an engine management system that incorporated a range of emission control technologies and components, such as an oxidation catalyst, a diesel particulate filter, and a nitrogen oxide trap. The system had to manage active and passive regenerations to clean the particulate filter. In addition, it needed to protect against runaway high-temperature conditions and manage desulfurization of the exhaust.
"It was an ambitious project with a tight schedule," Tudor explains. "Typically, we would sketch designs on paper, but with the complexity and time requirements of this project, we needed additional tools."
Tudor and his team needed to rapidly model and simulate the control system, and then automatically generate production-level code for ontrack validation tests.
Lotus Engineering used Simulink and Stateflow to develop an engine management system to control diesel emissions and Embedded Coder® to generate production-intent code for the system.
To jumpstart the project, Tudor attended MathWorks Training and worked with MathWorks Consulting for onsite assistance. "The reference documents, the examples, and the training course format are all excellent. The expert consulting support was also very good and responsive," says Tudor.
Tudor used Simulink and Stateflow to develop algorithms and control strategies for the catalysts and an additional fuel injector. They used Stateflow to control the timing of events in the system. The Simulink model also incorporates safety features to control temperature and master switches in the aftertreatment system.
Using Simulink S-functions generated by the Legacy Code Tool on MATLAB Central, Tudor incorporated existing algorithms for interpolation tables. "I integrated legacy code into the model, so I knew I was simulating with the real algorithms. Those same algorithms were also called very neatly by the generated code," Tudor explains.
Tudor used MATLAB to import the interpolation tables before saving them to the calibration area of the target. He also used MATLAB to postprocess recordings of real data to feed back into the simulations.
Tudor then used Simulink to simulate and validate the system before automatically generating production-intent code with Embedded Coder. He then downloaded the production-intent code to a Motorola MPC563 microcontroller. Although the code was efficient, the floating-point performance on the target was not acceptable, so Tudor converted the model to fixed point using data types from Simulink Fixed Point.
Lotus Engineering is due to commence vehicle testing in extreme conditions shortly. “We are anticipating strategy refinement. MathWorks tools will help us make changes in the field rapidly, avoiding delays and potential misinterpretations," says Tudor.
Based on its early success with MathWorks tools, the team is modeling a complete engine control unit.
To develop control systems that enable diesel engines to run cleaner and meet EPA standards for diesel emissions
Use MathWorks tools for Model-Based Design to model and simulate control systems for emission-reducing components, then generate fixed-point, production-intent code for ontrack validation tests