Dongfeng Electric Vehicle (DFEV), a research and development branch of Dongfeng Motor Co., Wuhan, Hubei Province, China, was asked to develop hybrid electric buses for the 2008 Beijing Olympic Games. While DFEV sources most components for its R&D efforts (such as traction motors and batteries) from suppliers, because the control strategies for the battery management and vehicle energy management must be optimized and integrated on the vehicle level, the company decided to take on the development of the electronic control systems in-house.
The sophisticated control system not only interacted with the battery itself, but also with different control systems in the vehicle. The team responsible for the battery management system was a mere six people, and with only 18 months to complete the project it was decided that the only way to successfully complete the project was to use models to discover errors early on in the development, as well as to generate code used in the electronic control system.
The engineers used Model-Based Design and tools from The MathWorks, Natick, MA, a global provider of software for technical computing, to design, simulate and verify the battery management control system for the Dongfeng EQ6110 hybrid electric city bus, then to generate production code for it. “Model-based design is the methodology that allows engineers to develop embedded software that goes into all the controllers, whether that’s for the engine, transmission, etc. using the model as the design, from specification through implementation,” explains Wensi Jin, automotive industry marketing manager, The MathWorks. In the end, the team had generated over 100,000 lines, or100% of the application code. “Generating code not only saves time, but also prevents errors that normally would be injected during the manual code writing process,” says Jin.
“Continuous verification and the use of plant models for closed-loop simulation enabled us to identify and resolve problems early to ensure that our high quality standards were met or surpassed,” says Dr. Xiaokang Liu, principal engineer at DFEV.
Dongfeng engineers must comply with ISO/TS 16949 quality management guidelines, and the code they produce must meet the set of MISRA C standards that Dongfeng follows. "MathWorks tools enabled us to develop key battery management technology using our own expertise, in an environment that facilitated early and continuous verification of our design." says Liu.
A common problem in the hybrid vehicle market is frequently that which is being controlled (in Dongfeng’s case, the battery system) is still being developed. There is no working data of the finished product to design the software and coding around, so the system software develops in parallel to its hardware.
To create a test bed for the battery controller before the actual battery and the vehicle was available Dongfeng development engineers used parameters of a battery to extract basic characteristics of the expected battery, and then used the data to construct a model. “The battery model and controller were developed under the Simulink® platform to simulate the controller against the virtual battery,” says Jin. “You can complete extensive testing in the modeling simulation world with that method.”
Following the model development and testing, they would take the controller and generate code from the model, bring the code back into Simulink and test the code against the battery model. With the development and testing little by little, Dongfeng was able to catch software errors early on to avoid hiccups down the road closer to project completion.
The team made the battery control hardware themselves which they then put through hardware-in-the-loop (HIL) testing – integrating the battery control software into the battery control hardware, then testing the control system against the virtual battery running on simulators – bringing the project to near-completion, before testing in the prototype vehicle.
The controller was then calibrated using CANape and installed in prototype vehicles for on-road reliability and durability testing, taking advantage of the ASAP2 calibration file generated alongside the production code.
Engineers at Dongfeng used MathWorks tools and Model-Based Design to develop a sophisticated battery management control system for the Dongfeng EQ6110, a hybrid electric city bus that delivers 30% better fuel efficiency than standard city buses while lowering emissions.