Browse Publications Technical Papers 2007-01-4249
2007-10-30

Automatic Code Generation - Technology Adoption Lessons Learned from Commercial Vehicle Case Studies 2007-01-4249

Using Model-Based Design, engineers model complex systems and simulate them on their desktop environment for analysis and design purposes. Model-Based Design supports a wide variety of C/C++ code generation applications that include stand-alone simulation, rapid control prototyping, hardware-in-the-loop testing, and production or embedded code deployment.
Many of these code generation scenarios impose different requirements on the generated code. Stand-alone simulations usually need to run fast, for parameter sweep or Monte Carlo studies, but do not need to execute in true hard real-time. Hardware-in-the-loop tests by definition use engine control unit (ECU) component hardware that requires a hard real-time execution environment to protect the physical devices. Code generated for production ECUs must satisfy hard real-time, efficiency, legacy code, and other requirements involving verification and validation efforts.
With Model-Based Design, the functional behavior of the model needs to match that of the generated code. As a result the transformation of models into generated code must include necessary deployment and real-time artifacts to ensure that the code executes properly in the final software and hardware environments.
For example, in a typical commercial vehicle use case, a diesel engine control algorithm and engine plant model are simulated together as a hybrid system. The plant model is input into the code generator for deployment in a hard real-time HIL lab. Code generation for the engine control algorithm is often done in two, or even three, phases. First, the code is generated for real-time rapid control prototyping for algorithm assessment and refinement. Next, the code may be generated for execution on the actual embedded microprocessor during on-target rapid prototyping for algorithm assessment on the ECU hardware. Finally, the code is generated for production ECUs and several verification steps are employed, including software-in-the-loop (SIL), processor-in-the-loop (PIL), and finally hardware-in-the-loop (HIL) testing.
Organizations moving from traditional waterfall processes that involve paper documents and hand code to Model-Based Design face challenges familiar to those who have followed other technology migrations, such as drafting tables to CAD systems or Assembly language to C code. These challenges center on how to:
  • best leverage the technology
  • reuse existing process
  • pace the transition
  • develop necessary skills sets and training
This paper describes case studies on how John Deere adopted Model-Based Design for commercial vehicle development and discusses the benefits and lessons learned.

SAE MOBILUS

Subscribers can view annotate, and download all of SAE's content. Learn More »

Access SAE MOBILUS »

Members save up to 16% off list price.
Login to see discount.
Special Offer: Download multiple Technical Papers each year? TechSelect is a cost-effective subscription option to select and download 12-100 full-text Technical Papers per year. Find more information here.
We also recommend:
TECHNICAL PAPER

Prototyping Hardware-in-the-loop Simulation System of Diesel Engine on Linux System with Automatic Code Generation

2008-01-1735

View Details

TECHNICAL PAPER

Design and Comparison of Autonomous Intelligent Cruise Control Systems

942405

View Details

TECHNICAL PAPER

Chassis Control System Development Using Simulation: Software in the Loop, Rapid Prototyping, and Hardware in the Loop

2002-01-1565

View Details

X