introduce
Electric motors play an important role in modern life. For safety, cost, and efficiency reasons, engineers, especially those working on hybrid electric vehicles (HEVs), often want to test motor controllers by simulating motor models in a specific real-world environment.
HEV has received extensive attention due to its advantages in economy and environment, and the motor is the core component of HEV. Especially considering that the motor and power electronic devices of HEV are large in size and high in cost; before letting the controller control these actual components, it is very necessary to use hardware-in-the-loop simulation method to test and verify the performance of the controller.
This article discusses the high-speed HIL simulator designed based on FPGA to implement motor controller testing. The figure below shows the HIL test system.
The motor drive simulator includes the DC voltage source, inverter bridge and motor. We support both permanent magnet synchronous motors (PMSM) and brushless DC motors (BLDC).
Why do we need an FPGA-based hardware-in-the-loop simulator?
Modern motor drive systems are usually driven by pulse width modulation (PWM). The following figure describes the basic concept of PWM.
[page]
The motor controller compares the reference waveform with the triangular carrier to determine the state of the gate control signal.
When , the gate control signal of the upper power electronic device is high, and the control signal of the lower device is low
When , the gate control signal of the upper power electronic device is low, and the control signal of the lower device is high
Accurately detecting the switching moment of the gate signal is very important for the simulator to correctly generate simulation signals. Otherwise, the simulator may produce inaccurate results such as jitter, non-characteristic harmonics, or even become unstable. The figure below shows the current waveform simulation result of the PMSM motor drive.
The PWM frequency is 10 kHz. It can be seen that the simulation loop rate of 50 kHz is not enough for the simulator to detect the switching moment in time.
Therefore, accurate results cannot be obtained. Unwanted harmonic components are included in the test results, which makes the results deviate greatly from the expected values. At a cycle rate of 200 kHz, the test results are much better.
To obtain accurate results, the simulator’s sampling interval must be much smaller than the controller’s PWM cycle. Such high cycle rate applications make FPGA-based solutions ideal. Both our fixed-point PMSM model and fixed-point BLDC model can complete an update operation within 40 FPGA clock cycles.
Tip: Sometimes the desired simulation cycle rate may exceed the rate that the simulated I/O can achieve. Generally, there is no need to update the analog I/O (torque input, current output, etc.) to match the simulation cycle rate. Users can use multi-frequency programming to keep the digital I/O and simulation cycle at a high rate for accurate detection of the gate signal switching moment, while setting the analog I/O in another cycle state, and then transfer data between the two cycles with different frequencies through the FIFO.
Design Assumptions
a. Ideal switch model of power electronic devices
Power electronics are modeled as ideal switches. When the gate signal is true (high), the switch is an ideal short circuit. When the gate signal is false (low), the switch is an ideal open circuit. Ideal switch models are very suitable for system-level simulations, where we are not concerned with the parasitic effects of power electronics. In addition, ideal switch models can significantly increase simulation speed.
For the heat loss of power electronic devices, their equivalent resistance can be calculated and this resistance value can be included in the total resistance of the motor.
b. Integration method
The mathematical model of the motor is a set of differential equations. When simulating the motor drive model on the FPGA, these differential equations are actually integrated on the FPGA. The expected integration step size is very small, only on the order of a few microseconds.
Therefore, users can choose the simplest integration method, such as Euler's method, which is suitable for small step sizes. [page]
Solution flow chart
The figure below is a flowchart for creating an FPGA-based motor simulator.
In the first step, users need to collect motor parameters and raw data. Use floating-point simulation to verify whether the simulation results are consistent with the measured data. Then use fixed-point simulation to verify the fixed-point motor model to determine whether the accuracy meets the requirements and whether the output results are satisfactory. After completing the fixed-point model verification, you can enter the final deployment stage.
Meeting the Challenges of Fixed-Point Implementation
Different motors usually have very different power levels, but the range and accuracy of fixed-point data types are fixed, so it is very important to choose the right fixed-point data type, otherwise quantization errors will accumulate quickly and lead to incorrect simulation results. It is often difficult for users to adjust or calibrate all fixed-point configurations to suit their own situation. National Instruments provides the following solutions to meet these challenges.
a. Normalized system
In addition to using engineering units, electrical engineers also use normalized systems. A normalized system scales current, voltage, speed, etc. to a uniform value so that the normalized value of the operating point is close to 1.0. This characteristic of a normalized system is very suitable for fixed-point implementation. Normalization allows the fixed-point motor model to be used for a variety of different motors.
After using the normalized system, the user can select certain predefined fixed-point data types for the fixed-point motor model. The following table is a partial list of choices.
|
Word length |
Integer word length |
Data Range |
Normalized current |
32 |
5 |
[-16, 16) |
Normalized rate |
32 |
4 |
[-8, 8) |
Normalized voltage |
twenty four |
4 |
[-8, 8) |
The above options all leave margins for extreme situations (such as current overload, etc.).
Determining the fixed-point data types of the above parameters can help the user select the fixed-point configuration of the internal calculation unit, such as the conversion from Idq to Iabc in the following figure.
[page]
b. Move some of the computation to the host
The motor simulation process involves some division operations, such as . This type of operation does not involve time-varying parameters such as current, so the user does not need to update this value at each step. The user can move this division operation to the host to calculate it, avoiding the thorny problem of performing division operations in the FPGA.
Therefore, two VIs are required for the fixed-point motor model. The host VI handles some division operations and parameter conversions; the FPGA VI is used to simulate the fixed-point motor model of the target.
Case
The figure below shows the velocity and electromagnetic torque of the fixed-point PMSM model during acceleration and deceleration.
The user can observe the regenerative braking effect during the deceleration phase in the figure above. When the motor feeds energy back to the DC power source (battery), the electromagnetic torque is negative.
in conclusion
This article introduces a LabVIEW FPGA-based motor drive simulator that can be used to help users create high-speed motor drive HIL tests using NI-RIO hardware.
Previous article:An innovative FPGA experimental board design based on APA300
Next article:Simulation of Data Link System of Burst Communication System Based on Simulink
Recommended ReadingLatest update time:2024-11-16 22:52
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to create beam-forming smart antennas using FPGAS
- The problem that the microcontroller reset circuit cannot burn the program when connected to the battery
- 64 details that must be paid attention to in switching power supply design
- Domestic voltage regulator device
- How does a “temperature gun” measure your temperature?
- Switching Power Supply Interest Group 19th Task
- LED power supply not working
- Smart MM32 + UCOS + uCGUI
- How to decorate a chemical analysis room?
- Find VHDL half-integer division