To develop the new HVAC controller, GM engineers used MathWorks tools and adopted Model-Based Design, an approach that enabled them to validate their designs and test components under various failure conditions before hardware was available.
Working with MathWorks consultants, the team developed a model framework for the entire HVAC controller in Simulink®, and then integrated existing components coded in C.
Engineers converted components written in C into Simulink and Stateflow® models, adding functionality to meet current design requirements. This approach enabled them to update the system component by component while maintaining the ability to deliver the latest control software to vehicles entering production.
With Simulink Report Generator™ , GM Engineering Europe created documentation for their Simulink and Stateflow models, which helped team members understand component designs created by others. The Simulink framework, combined with this documentation, enabled GM engineering teams in India, North America, Germany, and Sweden to work on the design in parallel.
New components, including controls for the hybrid vehicles’ electrically driven compressors, were developed entirely in Simulink and Stateflow. The team developed Simulink plant models for the compressor, blower, and auxiliary heat to verify component functionality via closed-loop simulations.
With Simulink Coder™ , they automatically generated code for components modeled in Simulink and conducted real-time, in-vehicle tests using rapid prototyping hardware. Because the code was automatically generated from their system model, they could make changes in the model, re-generate the code, and test the new version—all within minutes.
They then generated production code using Embedded Coder® and deployed it to the target 32-bit microcontroller.
The new controller is already installed in several production vehicles, including the Opel Insignia, and GM engineers are working toward a full Simulink implementation, increasing the percentage of automatically generated code in each release of the software.