"Three years ago, SAIC Motor did not have rich experience developing embedded control software. We chose Model-Based Design because it is a proven and efficient development method. This approach enabled our team of engineers to develop the highly complex HCU control logic and complete the project ahead of schedule."Jun Zhu, SAIC Motor
The Roewe 750 hybrid sedan from SAIC Motor Corporation Ltd. (SAIC Motor) improves fuel economy and emissions by about 20% over the non-hybrid Roewe 750. The complex control logic in the vehicle’s hybrid control unit (HCU), which coordinates the electric motor and engine, is vital to achieving the fuel efficiency and drivability goals SAIC Motor had set for the vehicle.
Recognizing that the design of this embedded system represented core intellectual property, the company decided to develop the production version in-house using Simulink® and Model-Based Design after a concept design was produced by an outside consulting firm. “Three years ago, SAIC Motor did not have rich experience developing embedded control software. With some team members new to embedded development, we needed an industry-proven approach,” says Jun Zhu, general manager of Shanghai E-propulsion Auto Technology Co., the SAIC Motor subsidiary that develops electric and hybrid propulsion technologies. “Our Simulink model served as an executable specification, enabling better communication of the requirements and design both with consulting partners and among our team. Model-Based Design also enabled us to generate efficient, reliable code from our verified model.”
The Roewe 750 hybrid is SAIC Motor’s first hybrid car, and the HCU project was among their first production embedded software development initiatives. With SAIC Motor engineers taking on tasks that were previously handled by suppliers, the team sought to adopt a development methodology that would eliminate misunderstandings that arise from interpreting written specification documents. The team wanted to further reduce errors by minimizing hand-coding and verifying the design via simulation, instead of via in-car testing.
Simulation was viewed as critical because the vehicle and several key components, including the battery and motor, were being developed concurrently, and delays in component delivery were possible. “Our goal was to discover and address as many problems as possible through model simulation and testing, rather than discovering them on the car after the software had been implemented,” says Zhu.
SAIC Motor standardized on Model-Based Design for embedded software development on the Roewe 750 hybrid and all new energy vehicles. This enabled the team to make design modifications at the model level rather than in the embedded code.
SAIC Motor control engineers used MATLAB® and Simulink to model and refine the control algorithms for the HCU based on the system requirements and preliminary Simulink models provided by a consulting partner.
They modeled the HCU’s mode transition logic with Stateflow® by creating a graphical representation of the system’s states and the transitions between them.
The team ran multiple simulations to evaluate different powertrain system configurations and compare each configuration’s effect on fuel economy and drivability.
Throughout development, the team used Simulink Check™ to perform modeling standards checks, ensure compliance with MAAB standards, and establish a consistent modeling style.
To verify the functionality of the model and its components, SAIC Motor test engineers conducted unit tests, model-in-the-loop tests, and hardware-in-the-loop tests, which are part of a systematic verification process SAIC Motor developed for this project and now adopts for all projects that use Model-Based Design.
Test engineers and calibration engineers at SAIC Motor relied on Simulink models, in addition to written documents, for test development and vehicle calibration.
Using Embedded Coder®, SAIC Motor engineers generated production code from their Simulink and Stateflow models.
Working with MathWorks consultants, SAIC Motor software integration engineers transitioned the design from the prototyping environment to the production ECU. During the transition, many manual tasks in the development process were automated to improve efficiency and reduce errors.
The hybrid program achieved its fuel efficiency goals, and the Roewe 750 is currently on the market. The SAIC Motor team is now using Model-Based Design on new energy vehicle programs, including the Roewe 550 strong hybrid and an electric vehicle.
98% of production code generated. “When changing a control strategy, we often need to update multiple modules. With hand-coding, this can be difficult to get right in a short amount of time,” says Zhu. “With Embedded Coder, we automatically generate 98% of our code. The process is faster, and the code is more efficient with fewer errors.”
Development from concept to production completed in 18 months. “It took about 18 months to go from the concept car to the start of vehicle production,” notes Zhu. “Without Model-Based Design it would have taken close to 24 months. We also had more time to ensure we delivered a high-quality product.”
Complete verification process established. “We discovered and fixed design flaws early, in the model, rather than later, in the car. This provides significant time and cost savings,” says Zhu. The process, including simulation, model and code verification, and HIL testing, is now used for all new energy vehicle projects.
Join the Customer Reference Program