Sie sind auf Seite 1von 2


Weichai Power Develops ECU Software for

High-Pressure Common-Rail Diesel Engine

A high-pressure common-rail diesel engine from

Weichai Power.

Weichai Power is a global leader in heavyduty engines. For many years, Weichai
purchased engine control units (ECUs) and
fuel systems for its diesel engines from suppliers. The company made a strategic plan to
develop its own control strategy and ECU
software for high-pressure common-rail
diesel engines. The reasons for in-house
development were to increase Weichai
Powers competitiveness and its ability to
innovate by lowering costs, reusing core
functionality, and enabling rapid development of engine control strategies based on
customer requirements.
Weichai Power built a control strategy and
embedded software team, and adopted
Model-Based Design to develop the common-rail diesel ECU software.

The Challenge
Build a production engine control and embedded software team, establish in-house
development capability, and complete the
first production program in 36 months

The Solution
Use Model-Based Design to design, implement, and test control strategies and ECU
software for a common-rail diesel engine
while working with MathWorks consultants
to develop the teams software development
skills and expertise

The Results
Development time cut by 40%
Integration testing time halved
60% of design reused

Model-Based Designwith its graphical

design and automatic code generation
reduces software bugs, improves software
maintainability and reuse, and reduces the
difficulty of software development, says
Daming Li, director of the Electronic
Controls Division at Weichai Power. ModelBased Design enabled us to build a
development team consisting of engine and
control specialists within the shortest possible time and to dramatically reduce
development costs.
The Challenge

While Weichai Power regularly conducts

engine control research and prototyping, the
company had not previously developed
embedded controls and software for a largescale, production ECU.

Weichai Power sought a methodology and

development tools that are widely used in
the automotive industry. At the same time,
they wanted to reduce the learning curve
associated with introducing new tools. They
needed to recruit engineers and train them
to develop and test ECU software for production before Chinas National Emission
Standard IV took effect.
The Solution

Weichai Power adopted Model-Based Design

with MATLAB and Simulink to design and
implement the common-rail diesel engine
ECU software. They built a production control and software team, and trained new
engineers in the tools. The company also
worked with MathWorks Consulting to
establish on-target rapid prototyping capability that would enable Weichai group
companies and customers to collaborate.
Working from system requirements, Weichai
Power engineers developed an engine controller model in Simulink and Stateflow.
They used Stateflow to model state transition logic for engine operating mode control,
rail pressure control, and diagnostics
During model development, they used the
Model Advisor in Simulink to check compliance with modeling standards adapted from
MathWorks Automotive Advisory Board
(MAAB) guidelines.
Using Simulink Verification and
Validation, the team linked textual requirements to the model elements in Simulink
that implemented the requirements to
ensure traceability.

Compared with our past experience with hand-coding, Model-Based Design enabled us to reduce labor costs by
30%, cut testing costs by 20%, and increase productivity by more than 30%. We completed ECU development
ahead of schedule while establishing our in-house software development team. Daming Li, Weichai Power

In Simulink, the team created a plant model

of the vehicle, after-treatment systems, and
engine, including fuel, torque, intake, and
exhaust subsystems. To verify the control
design, they ran closed-loop simulations of
the control and plant models.
They created test vectors with Simulink
Design Verifier. Used with Simulink
Verification and Validation, these test vectors enabled the team to identify dead logic
in their model and achieve complete model
Using Fixed-Point Designer, the engineers
converted the floating-point model to fixed
point by recording minimum and maximum
data values during simulation and applying
Fixed-Point Designer recommendations for
scaling fixed-point data types.
After comparing the floating-point and
fixed-point model simulation results to
verify the conversion, the team generated
C code from the control model using
Embedded Coder.
Working in Simulink they performed
software-in-the-loop tests on a PC and
hardware-in-the-loop tests on an ETAS
PT-LABCAR simulator.
The team generated more than 340,000
effective lines of code for the production
ECU with Embedded Coder. The generated
code comprised 100% of the application
software; 85% of the CAN application layer
and diagnostic routines were also generated
from models.

Working in MATLAB, the team developed

vehicle drive cycle software, which they used
for data analysis during testing of the initial
production ECUs.
The common-rail diesel engine ECU is in
production on heavy-duty trucks, construction machinery, and power generation
equipment. Weichai Power plans to reuse the
ECU design for light diesel engines.
The Results
Development time cut by 40%. We completed development and verification of the
ECU from scratch in 36 months40% faster
than we had planned, says Li. With ModelBased Design and support from MathWorks
consultants, our engineers training time
was reduced dramatically. In addition, using
Embedded Coder to generate MISRAcompliant code from our Simulink models
considerably shortened the time required to
implement quality software.

Industrial automation and machinery

Application Areas
Control systems
Embedded systems


Data analysis
Algorithm development
System design and simulation
Embedded code generation
Verification, validation, and test

Products Used

Embedded Coder
Fixed-Point Designer
Simulink Design Verifier
Simulink Verification and Validation

Integration testing time halved. Continuous

Learn More About Weichai Power

testing via Simulink simulations throughout

the development phase enabled us to detect
6070% of bugs before integration testing,
Li says. As a result, our integration testing
time was reduced by about 50%.

60% of design reused. We are currently

developing an ECU for a compressed natural

gas engine, and we have reused about 60% of
the model from our initial project, says Li.
This reuse has led to a 50% reduction in
development time for the new ECU.
2014 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See for a list of additional
trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

92200v00 06/14