Developing Software That Simulates Electric Motor Drives in Cars

Developing Software That Simulates Electric Motor Drives in Cars
Dražen Tomić - Tomich Productions

We had the opportunity to talk to dr.sc. Tin Bariša, who works at dSpace as a software development engineer within the Electric Drives (ED) department, and who points out that using dSpace's developed models and platforms, the user has the ability to simulate in detail the complex electric motor drives present in electric cars, as well as safely test individual drive components and their own control algorithms (eg torque or engine speed control).

The world's largest automotive companies use the developed models of the company dSpace to speed up the process of synthesis of different control systems (Rapid control prototyping - RCP) or through simulation models and appropriate hardware to perform rapid testing of its own components in a safe environment (HIL), according to Bariša.

What is your area of ​​activity within dSpace engineering?

I work as a software development engineer within the Electric Drives (ED) department. The basic focus of my work as well as the department itself is the development of simulation models of components of electric motor drives intended for FPGA (field-programmable gate array) platforms. Standard components of the electric motor drive whose models we are developing include different types of electric motors (eg synchronous motor with permanent magnets, asynchronous motor, etc.), voltage and frequency converters, blocks for generating and measuring PWM (pulse width modulation) signals, speed sensors rotations and positions with different protocols as well as various mechanical components. Using dSpace's developed models and platforms, the user has the ability to simulate in detail the complex electric motor drives present in electric cars, as well as safely test individual drive components and their own control algorithms (eg torque or engine speed control).

Do you have previous relevant work experience before being employed by dSpace engineering?

Before joining dSpace engineering  I worked as a researcher at the Department of Electrical Engineering and Automation, Faculty of Electrical Engineering and Computing. My work was related to a scientific research project on the development of advanced control algorithms for a synchronous wind turbine with permanent magnets with the aim of increasing energy efficiency. As part of this project, I prepared and defended a doctoral dissertation that deals with the problems of this type of wind turbine without a speed limiting member as well as reducing the switching losses of the converter using model predictive control algorithms. The research method of work as well as the acquired knowledge in the field of electric motor drives during my doctoral studies help me significantly in my current job.

What is the area of ​​application of the software solutions you are developing?

The application of the developed simulation models of the components of electric motor drives is very wide. The emphasis is of course on the automotive industry, where electric and hybrid vehicles represent a significant step forward in reducing fossil fuel consumption and environmental pollution. The world's largest automotive companies use the developed models of the company dSpace to speed up the process of synthesis of different control systems (Rapid control prototyping - RCP) or through simulation models and appropriate hardware to perform rapid testing of its own components in a safe environment (HIL). Some of the applications of the developed models are battery cell voltage simulation, development and testing of DC converter for electric vehicles, development and testing of electric motor control algorithms in electric and hybrid vehicles, validation of electric vehicle charging stations, simulation of entire electric motor drive or hybrid vehicle including electric motor , voltage and frequency converters, speed and position sensors and mechanical components, testing of control algorithms for low power motors (eg motors for glass lifting, ventilation, seat and mirror control, etc.), development of control algorithms for multi-level inverters, testing of regenerative systems braking, etc. However, in addition to the automotive industry, the developed tools are used in other activities that include some form of electric motor drives, such as aviation, medicine, but also science and education.

What are the benefits of testing with the tools you are developing?

Hardware in the loop (HIL) simulation allows the user to quickly and safely test various devices or parts of the system. For example, in electric motor drives, testing of electric motor speed and torque control algorithms is common. In this example, the actual electric motor drive (voltage and frequency converter, electric motor, speed sensor, various mechanical components) is replaced with the appropriate hardware and simulation models of these components and connected to the device under test via digital and analog inputs and outputs. device under test - DUT), which in this case is a microcontroller with a developed control algorithm. In feedback to the control system, the user receives the same signals (eg current, speed and motor position) as in the case of a connection to an actual electric motor powered from a voltage and frequency converter. The advantages of this type of testing are reduced costs in the development and testing phase (physical components of the electric drive are replaced by hardware and simulation models), reduction of risks associated with system failures (in case of complex drives incorrect operation of the control algorithm can lead to damage development of different components of the whole system (possible testing of control algorithms before voltage and frequency converter or electric motor is designed and manufactured), conducting tests on different systems (in case of electric motor control algorithms it is possible to test work on another machine type or converter topology by simply replacing simulation models voltage and frequency) and the ability to test the state of system failures (flexibility in simulating different states of system failure, which is often not possible or practical to test on an actual system).

What challenges do you face every day in your work?

Sometimes I encounter completely new concepts or requirements that have not yet been researched or developed at the level of the company itself. For example, I recently worked on the concept and implementation of higher dimension matrix inverse calculations on an FPGA platform which required detailed research and development of the concept prior to implementation. Also, when developing software solutions, ie blocks that simulate a certain component of the electric motor drive (eg synchronous motor with permanent magnets), it is necessary to perform extensive tests to check the operation in all conditions and thus avoid possible errors. For example, with this engine, this means testing at all expected values ​​of speed and torque, in motor and generator mode. Additionally, sometimes in direct contact with clients, additional requirements are defined that correspond to a specific application. For example, some clients do not require a detailed simulation of a DC link and a voltage and frequency converter, but only a detailed model of an electric motor. In this case, it is necessary to take into account additional requirements and modify the ready-made solutions in order to achieve the desired accuracy of the simulation with acceptable complexity of the model.