Model of Electronic Components and Communications of

Model of Electronic Components and Communications of an Electric/Hybrid
Vehicle’s Propulsion System for the Validation of Controllers
"The combination of this model with NI tools produces a state-of-the-art
system for the development and validation of controllers in the automotive
sector."
Bookmark and Share
Explore the NI Developer
Community
- Miguel Allende Marcos, Tecnalia Research and Innovation (www.tecnalia.com)
Discover and collaborate on the latest
example code and tutorials with a
worldwide community of engineers and
scientists.
(
/cms/images/casestudies/mmaa.jpg?size
)
(
http://decibel.ni.com/content/community/zone
)‌Check‌ out‌ the‌ NI‌ Community (
http://decibel.ni.com/content/community/zone
)
(
/cms/images/casestudies/mmbb.jpg?size
)
Who is National Instruments?
National Instruments provides a
graphical system design platform for
test, control, and embedded design
applications that is transforming the
way engineers and scientists design,
prototype, and deploy systems.
(
http://www.ni.com/company/standardize.htm
)‌Learn‌ more‌ about‌ NI (
http://www.ni.com/company/standardize.htm
)
(
/cms/images/casestudies/mmcc.jpg?size
)
(
/cms/images/casestudies/mmdd.jpg?size
)
(
The Challenge:
/cms/images/casestudies/mmee.jpg?size
)Implementing three models that emulate the unavailable functioning and communications electronic control units (ECUs) for an
electric/hybrid vehicle propulsion system.
The Solution:
Using LabVIEW software to develop the real-time modeling of the virtual ECUs needed to test the control systems.
Read
the
Full
Case
Study
Author(s):
Miguel Allende Marcos - Tecnalia Research and Innovation (www.tecnalia.com)
Maider Larburu López - Tecnalia Research and Innovation
Pablo Prieto Arce - Tecnalia Research and Innovation
Tecnalia is experienced in the automotive sector and in the development of controllers embedded in powertrain ECUs. The
systems are tested in the different V stages because of industry trends and recent ISO 26262 regulations. In the automotive
sector, it is key that control systems be validated before they are installed in the vehicle. One of the stages previous to this
installation is the integration of the implemented ECU with the other ECUs that it needs to interact and exchange data with if
working correctly.
Initially we can carry out partial validations of the components, since each company involved in the project can be autonomous
until the control software has been embedded in the microcontroller, generating an ECU. The problem arises when the
integration (the stage before installation in the vehicle) starts, due to the fact that all the ECUs needed for data exchange might
not be available at all times. To solve this problem, we needed to create a project to generate different virtual ECUs that could
model the control systems found in a vehicle’s powertrain and:
1. Validate the implemented ECU without needing to have the real ECUs
2. Check communications
3. Inject errors in sensors, in communications, and in the ECU’s functionality from which our system reads data to check
1/6
www.ni.com
3. Inject errors in sensors, in communications, and in the ECU’s functionality from which our system reads data to check
the functioning of the ECU during the tests
Carry out automatic and repetitive tests to verify how robust the ECU is in different scenarios
Figure 1. The ECU’s Connections for Testing in Virtual Hardware in the Loop
For this project, our objective was to test the traction ECU of an electric vehicle with gear box. This ECU calculates the par set
point of the inverter that controls the engine that moves the vehicle in function of:
The conductor’s demands (accelerator, break, gear)
The vehicle’s condition (ABS, ESP, TCS)
The traction system’s condition (cell load, engine and inverter’s condition)
To achieve the required performance for the ECU, we had to build a complete powertrain model to generate all the information
required to do the tests. Depending on the ECU being virtualized, there may be two distinctive parts in the code. One of the
parts manages the actual physical model of the system to be controlled, and the other one monitors the system control and
generation of communications. In this case, based on the system under test, we virtualized the following ECUs:
Energy Storage System ECU—Since it was an electric vehicle, we modeled the workings of a battery, calculating the average
values needed for its correct functioning, such as the instant current value when loading and unloading, the charge level, the
voltage of the battery depending on the actual current, and the load and power levels in the car's electrical grid, depending on
the demands of the engine and the auxiliary equipment also connected to it.
Inverter ECU—In this case we modeled the power equipment’s (inverter’s) electrical behavior and also the behavior of the
permanent magnets. The model’s available data is the current value of the engine’s par, depending on the par set point, the
engine’s efficiency and the thermal image, the value of the speed in function of the vehicle’s speed and the current gear, as well
as the value of the current in function of the engine’s par and the operating point (constant power zone or constant par zone).
Accelerator ECU—This ECU receives the data from the accelerator and sends it through the communications network.
Break ECU (ABS, ESP)—This ECU reads the driver’s breaking demand and calculates the breaking balance between the
mechanical and the electrical breaks. Additionally, it also reads the wheel sensors and carries out the ABS and ESP functions,
demanding par values from the equipment, based on the vehicle’s condition.
Vehicle’s General ECU (Central ECU)—This ECU shows the driver on screen the most relevant data regarding the propulsion
system, such as the engine speed, battery’s load charge levels, engine par, and more.
Figure 2. VeriStand Vehicle Electrical Plant Model
All the virtual ECUs need to be integrated in a real-time platform, so we use software that meets the following requirements:
Can integrate the different ECUs to generate the complete plant model and the final code to be downloaded to the real-time
system
The ECUs can be implemented in programming languages other than LabVIEW (http://www.ni.com/labview/) software
Models need to be interchangeable and the system has to be easy to use
The ECUs can be connected/disconnected, depending on those available at each stage of the project
Can connect to an HMI to visualize the working data
Can possibly generate reports and records
2/6
www.ni.com
Figure 3. Data Exchange of an ECU Being Tested With Virtual ECUs
VeriStand (http://www.ni.com/veristand/) software met these requirements. Thanks to VeriStand, we reduced the programming
and customizing times for each client and can concentrate our efforts testing and improving the model. That is why we
programmed the virtual ECUs with LabVIEW and later compiled them for VeriStand and executed them on a dedicated PXI.
Since some of them have physical models of the system, they are executed at a basic time of 1 millisecond. Internally, we set
subtasks on the code to emulate the control software and the communications.
We downloaded the whole project on a dedicated PXI-8110 that received the vehicle’s necessary information from another
PXI-8110 that had Dynacar, a longitudinal and lateral dynamics vehicle’s model, installed. The virtual sensors generated by
Dynacar go to the virtual ECU PXI in the same way as they are read in the car, either through analogue signals or field bus.
Additionally, and since we are using PXI, the communication bus programming (CAN in this case) was extremely simple, using
the NI-XNET (http://sine.ni.com/nips/cds/view/p/lang/en/nid/10234) module to define the messages with the data to be
exchanged.
Figure 4. Test Bench With Different Components: ECU Under Test and Virtual ECU PXI
Many of the designed controllers need to be robust and stable when facing changes in the systems to be controlled. In this
case, each virtual ECU can generate erroneous data, when functioning as well as when communicating, to test the replies from
the designed controllers. Additionally, the ECU being tested has parameters that are modifiable by the user and need to be
checked along the whole range.
To meet these two needs, we used TestStand software to carry out many automated tests, not only changing the model
parameters, but also the parameters of the tested ECU. We used the CCP protocol to modify the last one, which is the standard
automotive protocol for system parameterization.
Results
Thanks to this model of electronic and communications components of an electric/hybrid vehicle’s propulsion system, we could
reduce the integration times of the development ECUs, since they were previously tested with virtual models of unavailable
ECUs. We also validated the control algorithms. Because it is a versatile system and the ECU can be connected or
disconnected as required, it can be used in different phases of the project. All this reduces integration and testing times and
generates significant saving on automotive control system development costs. The combination of this model with NI tools
produces a state-of-the-art system for the development and validation of controllers in the automotive sector.
3/6
www.ni.com
Figure 5. VeriStand Project With Virtual ECUs and Communications
Author Information:
Miguel Allende Marcos
Tecnalia Research and Innovation (www.tecnalia.com)
Parque Tecnológico. Edificio 202.
48170
Spain
miguel.allende@tecnalia.com (mailto:miguel.allende@tecnalia.com)
The ECU’s Connections for Testing in Virtual Hardware in the Loop
VeriStand Vehicle Electrical Plant Model
4/6
www.ni.com
VeriStand Vehicle Electrical Plant Model
Data Exchange of an ECU Being Tested With Virtual ECUs
Test Bench With Different Components: ECU Under Test and Virtual ECU PXI
VeriStand Project With Virtual ECUs and Communications
5/6
www.ni.com
Legal
This case study (this "case study") was developed by a National Instruments ("NI") customer. THIS CASE STUDY IS PROVIDED "AS IS"
WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN
NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/ (http://ni.com/legal/termsofuse/unitedstates/us/)).
PRODUCT
SUPPORT
COMPANY
Order status and history (http://www.ni.com/status/)
Submit a service request (
https://sine.ni.com/srm/app/myServiceRequests)
About National Instruments (http://www.ni.com/company
Order by part number (
http://sine.ni.com/apps/utf8/nios.store?action=purchase_form)
Events (http://www.ni.com/events/)
Manuals (http://www.ni.com/manuals/)
Careers (http://www.ni.com/careers/)
Activate a product (
http://sine.ni.com/myproducts/app/main.xhtml?lang=en)
Drivers (http://www.ni.com/downloads/drivers/)
Alliance Partners (http://partners.ni.com/partner_locator/search.aspx)
Order and payment information (http://www.ni.com/how-to-buy/)
MISSION
NI equips engineers and scientists with systems that accelerate productivity, innovation, and discovery.
(http://twitter.com/niglobal)
http://www.linkedin.com/company/3433?trk=tyah)
(http://www.facebook.com/NationalInstruments)
(http://www.ni.com/rss/)
(http://www.youtube.com/nationalinstrument
Contact Us (http://www.ni.com/contact-us/)
(//privacy.truste.com/privacy-seal/National-Instruments-Corporation/validation?rid=bc6daa8f-7051-4eea-b7b5-fb24dcd96d95)
Legal (http://www.ni.com/legal/) | © National Instruments. All rights reserved. | Site map (http://www.ni.com/help/map.htm)
6/6
www.ni.com