User Stories

Hyundai Uses Model-Based Design to Accelerate Engine Control Unit Development

View PDF

SQ HMC User Story Image
Applying Model-Based Design to a production ECU target.

"Model-Based Design with MathWorks and SimuQuest tools enables dramatic reductions in development time and cost, as well as seamless integration between research, development, and production."

Dr. Seungbum Park, Hyundai Motor Company

Automotive manufacturers are constantly striving to improve engine performance measures, such as power output, fuel consumption, and emissions. However, accomplishing this has been challenging, since progress in one area often requires an undesirable tradeoff in another area. For example, limiting fuel intake to reduce fuel consumption will cause a corresponding drop in power output.

To build an engine that optimizes these tradeoffs and delivers simultaneous improvement across all key performance categories, Hyundai Motor Co. engineers are using MathWorks and SimuQuest tools for Model-Based Design. The tools have enabled them to rapidly design, develop, and implement an engine control unit (ECU) that incorporates recent advances in engine technology.

"Model-Based Design with MathWorks and SimuQuest tools enables us to accelerate and streamline our design and development process," says Dr. Seungbum Park, senior research engineer at Hyundai. "By automatically generating code from our development model, we can use the same microcontroller for prototyping as we use in production, resulting in significant time and cost savings."

Challenge

New technologies, such as variable valve timing and variable intake systems, are enabling engineers to redefine tradeoffs to achieve previously unattainable engine performance goals. To apply these technologies, however, Hyundai needed more flexibility in the ECU because the newer technologies require more sophisticated control logic. "To use these new technologies, we needed to design a flexible ECU and a way to rapidly develop and implement control system functions," says Park.

Automobile manufacturers typically use a high-performance rapid prototyping controller to accelerate ECU development. Hyundai recognized that using this specialized hardware introduced gaps between research, development, and production groups, and required additional time and cost to reimplement the prototype on production hardware. The company sought a new approach that enabled them to design and develop the ECU using the same microprocessor for prototyping and production (on-target rapid prototyping).

Solution

Using SimuQuest UniPhi to architect and manage the Simulink and Stateflow models and data, and SimuQuest Enginuity to model the engine, Hyundai engineers developed an ECU with a dual continuously variable valve timing control. They used Embedded Coder® and SimuQuest QuantiPhi for MPC56x/OSEK/Engine Drivers to automatically generate production code for the system’s MPC566 microprocessor.

Hyundai engineers first used SimuQuest Enginuity to develop an accurate dynamic model of a four-cylinder engine. Control engineers then, using SimuQuest UniPhi with Simulink and Stateflow, modeled the control strategy for the ECU. Using this system model, they conducted simulations in Simulink to debug and calibrate the strategy.

As the control engineers were developing the control logic, software engineers used Simulink and the SimuQuest QuantiPhi MPC56x blockset to build the OSEK operating system, lower-level device drivers, and the CAN interface.

After developing and tuning the control system through simulations, Hyundai engineers used Embedded Coder and SimuQuest QuantiPhi to automatically generate code for the production-level target hardware from their Simulink model.

They used this real-time implementation to conduct hardware-in-the-loop (HIL) and dynamometer testing.

"MathWorks and SimuQuest tools enable a seamless transition from a high-performance rapid prototyping controller to a production-level controller," notes Park.

Following real-time HIL tests, the team downloaded the automatically generated code onto production hardware for testing in a real vehicle that had been parked outside Hyundai’s facility in below-freezing temperatures. They then started the engine and achieved idle speed control on the first attempt, ramped down to a warm idle speed, idled for cold and warm conditions, switched between idle controllers, applied loads with no perceivable engine speed drop or flare, and drove the vehicle.

The team measured engine performance using a dynamometer. Actual waveforms for crank, cam, injection, and ignition signals were also validated by matching simulation results from Simulink.

Results

  • Vehicle started and idled smoothly on first attempt. During the initial real-world test of the newly designed ECU, engineers started and idled the engine and drove the vehicle. Engine data collected during this test correlated closely with simulation results from Simulink.
  • Prototype control functions implemented and tested within just a few hours. Using MathWorks and SimuQuest tools, Hyundai implements new control functions on a production ECU and tests them on a real engine in just a few hours. Park adds, "Because we design and develop with Simulink blocks instead of hand-coding, all the code can be automatically generated and downloaded onto the hardware within a few minutes."
  • Research, development, and production unified. "Using MathWorks and SimuQuest tools, we eliminated the gaps between research, development, and production by using the same microcontroller for on-target rapid prototyping and production," says Park. "Seamlessly connecting these groups and automatically generating production code plays a key role in reducing development time and costs."

Challenge

To improve the development process for modern engine control units

Solution

Use MathWorks and SimuQuest tools to model, simulate, prototype, and deploy the system by automatically generating code for production hardware

Results

  • Vehicle started and idled smoothly on first attempt
  • Prototype control functions implemented and tested within just a few hours
  • Research, development, and production unified

Products Used

Learn more about Hyundai