Virtual Electric Vehicle Design using Real-world Coupled Realtime Simulation

Electric Vehicles gain more and more importance in public media as well as in scientific research. At the Department of Energy Conversion Technology a collegiate student project has been established to construct an electric vehicle based on a buggy chassis. Simulation models of the vehicle have been realized to study the system. A test bench for the propulsion system has been built. To use the test bench for hardware-in-the-loop tests of the communication system the ECUs are coupled with the existing test bench. The obtained results will be fed back to the upcoming new vehicle planned for the near future.


Introduction
Electric Vehicles gain more and more importance in public media as well as in scientific research. A lot of effort has been spent to introduce simulation models for virtual vehicle development according to [1]. These tools are suitable for the pre-dimensioning of vehicle components like the power characteristics of electrical machines or storage devices. Control strategies for the vehicle operation can be designed in offline simulations. Even optimizations can be made with these models and tools [2].

Colleguate Project
At the Institute for Energy Conversion Technology a collegiate student project has been established since the summer term of 2009 [3], [4]. Within this students project a prototype electric vehicle has been built based on a conventional buggy chassis. The vehicle has four propulsion machines that can be controlled individually resulting in a wheel selective drive system. However, the main focus of the project is on the education of future engineers that can organize themselves and are able to use state-ofthe-art engineering tools. Figure 1 shows a picture of the electric buggy. About 50 students work on the project every EVS26 International Battery, Hybrid and Fuel Cell Electric Vehicle Symposium 1 Figure1: electric vehicle based on a buggy chassis semester to work out further improvements. The special goal of the project is that the organization is entirely made by the students that work in several dedicated teams. There are teams that work on the energy storage system, the wiring harness and chassis, the communication system and the propulsion system.

Vehicle simulation
For the conceptional phases and the sizing of the components a vehicle simulation similar to the above mentioned approaches has been implemented.
For the simulation environment Dymola from Dassault Systèmes has been used because of the object-oriented modeling language Modelica [5]. The advantage is among others the possibility to easily realize systems with different physical domains coupled in one systems. This is especially the case in electric vehicle systems where at least electric and mechanic systems are coupled. Figure 2 shows an overview of the modular vehicle simulation approach based on the work in [6]. Within [6] only the interface classes are defined not the actual behavior of the specific component. Thus in the proposed work a library of component models has been build up so the modules get their functional behavior. With the help of the resulting entire vehicle model the behavior of the components within a vehicular system can be studied.
Moreover some additional components have been modeled and added into the library to study the effect of these advanced electric vehicle systems. For example the energy consumption or performance benefits of a range extender or a hybrid energy storage system which includes double layer capacitors can be investigated. These informations are especially used for the development of the new car's concept.
As one practical example it may be considered here that the vehicle model was used for the first design steps for the conceptional phase of the new vehicle the project team is currently working on.
The model shown in figure 2 has been build up and established with the current full functional car shown in figure 1. Due to the modular approach it could be adapted for the development of the future vehicle. The choice for the electric drive system has been made with the help of the model.

Test bench overview
Besides the construction of the car a test bench has been built-up that consists of one propulsion machine of the vehicle and a load machine with the appropriate control system and measurement EVS26 International Battery, Hybrid and Fuel Cell Electric Vehicle Symposium 2 Figure 2: Modular vehicle simulation equipment. One goal is the measurement of the propulsion machine to retrieve suitable simulation models. Furthermore a dSpace real time system has been integrated into the test bench to do a coupling of vehicle simulation models with real-world components like the propulsion machine. Figure 3 shows the vehicle test bench that has been built to simulate the car and to do virtual test drives using the 3D-visualization of the simulated scenario. This feature is possible because of a real time vehicle dynamics simulation that has been adapted to the regarded vehicle concept and is described in detail later.
One major idea of the proposed approach on the test bench is the fact, that real hardware and simulated components are coupled in one system.

System Approach
As mentioned above the test bench is capable of simulating the vehicle behavior in real time and simulation models for the propulsion system and the entire vehicle exist. These models are basically introduced in the section above. The benefit of the proposed solution is the reuse of the library for several use cases and scopes of development during the entire design phases of the vehicle. The approach of the proposed system is to couple the real time model which is extended by the propulsion system of the electric vehicle with the real-world components on the test bench. Figure 4 illustrates this approach. The special goal is that part of the power train is simulated in the real time system and the other part is on the test bench. Suitable interfaces between the different domains have already been defined and realized in hardware and software.
One further step is the integration of the ECUs and the communication system of the vehicle. To achieve this goal the test bench has to emulate the entire car from the communication systems point of view. That way the communication system can be tested in a very early state during the development process. Furthermore the influence of computation and communication delays inside the ECUs on the vehicle behavior can be studied. This is especially important during the development of chassis control systems like torque-vectoring or dynamic stability control.
To achieve a flexible system a functional separation of the software programmed on the ECU and the real time model has been realized. With this idea new functions can be evaluated in rapid control prototyping on the real time platform first before the software of the ECU is adapted.

Energetic Simulations
As mentioned and described above a energetic vehicle simulation has been set up to evaluate the energetic behavior of the vehicle and the dependencies between the single components. Furthermore the model has been used for the design and the conceptional studies of the next "eCARus" vehicle. Figure 5 shows one result of the energetic vehicle simulation. The model was fed with a speed profile that has been derived from a testdrive. The signal is taken by the virtual driver model that has to follow the speed profile. It is shown in figure 5 as the blue curve in the upper diagram.
It can be concluded out of the first plot of figure  5 that the model is capable of reproducing the actual measured speed profile very exactly. As a second fact it should be stated that the model is able to visualize values that can not be measured in the real car during the testdrive. One example is the battery voltage shown in the second plot of figure 5.

Realtime Simulation Model
As mentioned before the main goal of the proposed approach is the reusability of the simulation models. Therefore the dSpace ASM (Automotive Simulation Models) [7] vehicle model has been adapted to fit the given task.
Thanks to the modular simulation model the adoption could be done quite easily. Figure 5 shows the construction of the ASM model.  well as the combustion engine of conventional cars and were thus omitted. The block "Soft ECU" has been chosen to remain from the original because of the ability to implement and evaluate new functionality in the real time simulation first before going to the real ECU platform. This way a flexible environment for the development of functions like torque control could be achieved.
For the effective development of drive train control the drive train has to be implemented in the real time model. This is done by the a Dymola model that is interfaced by the Simulink ASM environment. Figure 7 shows the basic interface of the Dymola model. The system models the electrical power train that includes the battery system, the electric drives and the gear. The fact that part of the power train is implemented on the test bench and parts are only in the model becomes obvious in figure 7. It is assumed that the rear left drive is implemented in hardware. Thus the measured current is fed into the model. Furthermore the block takes the remaining torque signals and the angular velocities of the individual wheels as an input from the vehicle dynamic model and calculates the machine currents.
For the construction of the test bench it is vital to have a supply that emulates the electrical behavior of the battery system. Thus the battery behavior is calculated in the Dymola block with the electrical power train. The block outputs the battery voltage that can be connected to a programmable power supply and an electronic load.
The view inside the Dymola block in the simulation model is shown in the functional overview of figure 8. It is assumed that three of the four drives are simulated and one (Drive 1) is at the test bench. For the voltage of the battery it is necessary that the total current that is taken from the energy storage is considered. Regarding the electrical node at the positive terminal of the battery in figure 8 this current can be calculated by equation 1.
Assuming that drive 1 is at the test bench in real hardware this can be written as In conjunction with the programmable power supply and electric load from figure 10 this approach offers the possibility of battery emulation like it is described in [8]. With this battery emulation drive 1 can be treated electrically as if it was in the real car.

Communication System
One very interesting part of the system is the communication infrastructure which is based on a CAN network. For the functional development of the focused ECU it is vital that the ECU gets back the responses of the individual drives.
The drive controllers that are placed in the vehicle   Figure 9 shows the implementation on the test bench. Drive 1 is realized with the real component. Whereas the other drives 2 to 4 are virtual components that are emulated by the dSpace real time system. The responses that are expected by the ECU are generated and sent back via the CAN bus. The data for the response like the current speed are taken from the vehicle dynamics part of the ASM model. This way the security routines of the ECU that check the presence of the drive controllers doesn't throw an error and the development of drive system control algorithms is made possible.

Test bench implementation
To complete the system and to make hardwarein-the-loop simulation feasible on the test bench the components have to be implemented in the real experimental setup. Figure 10 gives an overview of the components which are realized on the test bench with their functional connection. It can be seen that the ECU has everything present that is necessary for proper function. The ECU would behave just like it would be plugged in the vehicle.
The foot pedals are realized with the original angle sensors as the human machine interface (HMI) whereas the steering wheel is connected through the control workstation to the real time system. This is done because the real vehicle does not yet have a sensor for the steering wheel angle. However this might be reasonable in the future for the development of torque-vectoring algorithms. In the meantime the steering angle has to be submitted via the vehicle model and the CAN bus.
One major advantage of the proposed system is the visualization via the control workstation. With this visualization virtual testdrives are possible in a 3D environment. Furthermore automated tests can be performed to evaluate the effectiveness of the chassis control algorithms.

Conclusion & Outlook
At the Department of Energy Conversion Technology a electric vehicle with wheel selective drive based on a buggy chassis has been realized within a collegiate project. The development has been done by use of state-of-the-art tools that have been adapted and built for the given task. The focus has been made on the coupling of vehicle dynamics models and the power train models. The modular approach guaranties the reuse of models during several stages of development. With the results that come out of the proposed work the functional development based on the real ECUs and communication system can be assisted and accelerated because of tests in early development phases. It is planned that a second electric vehicle is built up in the near future where the methods that have been worked out besides the construction of the first vehicle are applied and validated from the beginning.