A HIL test method, apparatus and system

By simulating the operating state of the T-type three-level circuit of an electric vehicle and using a motor simulation model, the three-phase terminal voltage and current values ​​are determined, solving the problem that existing HIL tests cannot test the T-type three-level circuit controller, and achieving more comprehensive and reliable simulation testing.

CN122308333APending Publication Date: 2026-06-30HAINACHUANHAOFUER (BEIJING) NEW ENERGY VEHICLE DRIVE SYST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HAINACHUANHAOFUER (BEIJING) NEW ENERGY VEHICLE DRIVE SYST CO LTD
Filing Date
2026-05-08
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing HIL testing methods cannot effectively test the controller of the T-type three-level circuit of electric vehicles, and cannot meet the simulation testing requirements of different operating states.

Method used

The operating state of the controller is simulated by a circuit simulation model based on the controller's output signal and a T-type three-level circuit. The three-phase terminal voltage and current values ​​are determined according to the motor simulation model. The current in the simulation model is fed back to the controller by the digital-to-analog converter unit, thereby realizing the simulation test of the controller.

Benefits of technology

It improves the comprehensiveness and reliability of HIL testing, and can effectively simulate and test the performance of electric vehicle T-type three-level circuit controllers under different operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122308333A_ABST
    Figure CN122308333A_ABST
Patent Text Reader

Abstract

This invention discloses a HIL (High-Intensity Logic) testing method, apparatus, and system for testing the controller of a T-type three-level circuit in an electric vehicle. The HIL testing method includes: simulating the operating states of the T-type three-level circuit based on the controller's output signal and a circuit simulation model of the T-type three-level circuit; wherein the operating states of the T-type three-level circuit include normal operation, three-phase short circuit, and transistor off state; determining the three-phase terminal voltage values ​​in the circuit simulation model based on the operating states of the T-type three-level circuit; determining the three-phase current values ​​in the motor simulation model based on the three-phase terminal voltage values; and feeding back the three-phase currents from the motor simulation model to the controller based on a digital-to-analog converter. The technical solution of this invention enables simulation testing of the controller of the T-type three-level circuit in an electric vehicle under different operating states, improving the comprehensiveness and reliability of HIL testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of simulation testing technology, and in particular to a HIL testing method, apparatus and system. Background Technology

[0002] The electric drive system of an electric vehicle is the power source of the entire vehicle, and the motor controller is the core control component of the electric drive system. Due to the complex and varied driving conditions of electric vehicles and the susceptibility of electrical faults in the electric drive system, comprehensive simulation testing of the controller is required during the development and production stages to ensure the stable operation of the electric drive system.

[0003] In existing technologies, controller testing methods include real-vehicle testing, physical load bench testing, and hardware-in-the-loop (HIL) simulation testing. HIL testing is a method that connects a real controller to a simulated controlled object to simulate the system's operating environment in real time, thereby testing the controller's functionality and performance. Due to its advantages of high security and low cost, it has become the mainstream method for controller testing. However, current HIL testing methods are mainly used to test controllers for two-level circuits in electric vehicles and cannot test controllers for T-type three-level circuits in electric vehicles, thus failing to meet the simulation testing requirements for different operating states of T-type three-level circuits. Summary of the Invention

[0004] This invention provides a HIL testing method, apparatus, and system, which improves the comprehensiveness and reliability of HIL testing.

[0005] In a first aspect, the present invention provides a HIL testing method for testing the controller of a T-type three-level circuit in an electric vehicle; the HIL testing method includes: Based on the output signal of the controller and the circuit simulation model of the T-type three-level circuit, the operating state of the T-type three-level circuit is simulated; wherein, the operating state of the T-type three-level circuit includes normal operation state, three-phase short circuit state, and transistor off state; Based on the operating state of the T-type three-level circuit, determine the three-phase terminal voltage values ​​in the circuit simulation model; Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values. Based on the digital-to-analog conversion unit, the three-phase current in the motor simulation model is fed back to the controller.

[0006] Optionally, based on the operating state of the T-type three-level circuit, the three-phase terminal voltage values ​​in the circuit simulation model are determined, including: When the simulated T-type three-level circuit is in normal operating condition, the three-phase terminal voltage values ​​are determined according to the conduction state of each transistor in the circuit simulation model.

[0007] Optionally, determining the three-phase terminal voltage values ​​in the circuit simulation model based on the operating state of the T-type three-level circuit further includes: When simulating the operation of the T-type three-level circuit as a three-phase short-circuit state, it is determined that the voltage values ​​of the three phase terminals are all the same.

[0008] Optionally, the output signal of the controller includes a circuit control signal and an excitation signal; Based on the operating state of the T-type three-level circuit, determining the three-phase terminal voltage values ​​in the circuit simulation model further includes: When the simulated T-type three-level circuit is in the off state, the three-phase terminal voltage values ​​are determined based on the excitation signal and the first calculation formula; the first calculation formula is: ; ; ; Among them, U ao U is the terminal voltage value of phase a. bo U is the terminal voltage value of phase b. co Ψ is the terminal voltage of phase c, w is the stator current and angular velocity of the motor. PM For permanent magnet flux linkage, θ e The angle of the magnetic field of the motor rotor.

[0009] Optionally, the output signal of the control signal includes a circuit control signal and an excitation signal; Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values, including: Based on the three-phase terminal voltage values, determine the voltage values ​​in the two-phase stationary coordinate system; Based on the excitation signal and the voltage value in the two-phase stationary coordinate system, determine the current value in the two-phase rotating coordinate system; The three-phase current values ​​are determined based on the current values ​​in the two-phase rotating coordinate system.

[0010] Optionally, based on the three-phase terminal voltage values, determining the voltage values ​​in the two-phase stationary coordinate system includes: Based on the three-phase terminal voltage values, determine the three-phase line voltage values; Based on the three-phase line voltage values, determine the voltage values ​​in the two-phase stationary coordinate system.

[0011] Optionally, determining the current value in the two-phase rotating coordinate system based on the excitation signal and the voltage value in the two-phase stationary coordinate system includes: Based on the excitation signal and the motor simulation model, the angle of the motor rotor magnetic field is obtained; The voltage value in the two-phase rotating coordinate system is determined based on the voltage value in the two-phase stationary coordinate system and the angle of the motor rotor magnetic field. Based on the excitation signal and the motor simulation model, the current value in the two-phase rotating coordinate system is determined according to the voltage value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field.

[0012] Optionally, the three-phase current values ​​are determined based on the current values ​​in the two-phase rotating coordinate system, including: Based on the excitation signal and the motor simulation model, the angle of the motor rotor magnetic field is obtained; The current value in the two-phase stationary coordinate system is determined based on the current value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field. The three-phase current values ​​are determined based on the current values ​​in the two-phase stationary coordinate system.

[0013] Secondly, the present invention provides a HIL testing device for testing the controller of a T-type three-level circuit in an electric vehicle; the HIL testing device includes: The operation state simulation module is used to simulate the operation state of the T-type three-level circuit based on the output signal of the controller and the circuit simulation model of the T-type three-level circuit; wherein, the operation state of the T-type three-level circuit includes normal operation state, three-phase short circuit state and transistor off state; The voltage value determination module is used to determine the three-phase terminal voltage values ​​in the circuit simulation model based on the operating state of the T-type three-level circuit. The current value determination module is used to determine the three-phase current values ​​in the motor simulation model based on the three-phase terminal voltage values. The feedback module is used to feed back the three-phase current in the motor simulation model to the controller based on the digital-to-analog conversion unit.

[0014] Thirdly, the present invention provides a HIL testing system for testing the controller of a T-type three-level circuit in an electric vehicle; The HIL testing system includes the HIL testing apparatus described in the second aspect, used to perform the HIL testing method described in the first aspect.

[0015] The technical solution of this invention simulates the operating state of a T-type three-level circuit based on the controller's output signal and a circuit simulation model of the T-type three-level circuit. Based on the operating state of the T-type three-level circuit, the three-phase terminal voltage values ​​in the circuit simulation model are determined. Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values. Then, based on the digital-to-analog converter, the three-phase current in the motor simulation model is fed back to the controller. This achieves simulation testing of the controller under different operating states of the T-type three-level circuit in electric vehicles, improving the comprehensiveness and reliability of HIL testing. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of a single-phase structure of a T-type three-level circuit provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a HIL testing method provided in Embodiment 1 of the present invention; Figure 3 This is a flowchart illustrating a HIL testing method provided in Embodiment 2 of the present invention; Figure 4 This is a flowchart illustrating a HIL testing method provided in Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of a vector control coordinate system provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a HIL testing device provided in an embodiment of the present invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0018] The terminology used in the embodiments of this invention is for the purpose of describing specific embodiments only and is not intended to limit the invention. It should be noted that directional terms such as "upper," "lower," "left," and "right" described in the embodiments of this invention are used to describe the angles shown in the accompanying drawings and should not be construed as limiting the embodiments of this invention. Furthermore, in the context, it should be understood that when referring to an element being formed "on" or "below" another element, it can be formed not only directly on or below the other element, but also indirectly on or below it through intermediate elements. The terms "first," "second," etc., are used for descriptive purposes only and do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0019] The term "comprising" and its variations as used in this invention are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment".

[0020] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish the corresponding contents and are not used to limit the order or interdependence.

[0021] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0022] The T-type three-level circuit is a high-performance three-phase inverter topology. It consists of phases a, b, and c. Figure 1 This is a schematic diagram of a single-phase structure of a T-type three-level circuit provided in an embodiment of the present invention, as shown below. Figure 1As shown, each phase T-type three-level circuit includes four transistors and two capacitors. The first transistor T1 and the fourth transistor T4 are connected in series between the positive terminal DCP and the negative terminal DCN of the DC bus. The second transistor T2 and the third transistor T3 are connected in series between the midpoint DCO of the DC bus and the output terminal PH. The first capacitor C1 and the second capacitor C2 are connected in series between the positive terminal DCP and the negative terminal DCN of the DC bus. In a T-type three-level circuit, the switching state of each transistor determines the output voltage of the output terminal PH. When the first transistor T1 and the second transistor T2 are on, and the third transistor T3 and the fourth transistor T4 are off, the output voltage of PH relative to the DC bus midpoint DCO is positive (Udc / 2). When the second transistor T2 and the third transistor T3 are on, and the first transistor T1 and the fourth transistor T4 are off, the output voltage of PH relative to the DC bus midpoint DCO is 0. When the third transistor T3 and the fourth transistor T4 are on, and the first transistor T1 and the second transistor T2 are off, the output voltage of PH relative to the DC bus midpoint DCO is negative (-Udc / 2). Therefore, when the T-type three-level circuit switches levels, the output voltage drop of PH is Udc / 2, which reduces switching losses, decreases harmonic content in the three-phase current and system losses, and improves system efficiency.

[0023] Example 1 Figure 2 This is a flowchart illustrating a HIL testing method provided in Embodiment 1 of the present invention. This embodiment can be used to test the controller of a T-type three-level circuit in an electric vehicle. The method can be executed by a HIL testing device, and can be implemented in software and / or hardware, and is generally integrated into the HIL testing system provided in this embodiment of the present invention. Figure 2 As shown, the HIL testing method includes: S110. A circuit simulation model based on the controller's output signal and the T-type three-level circuit is used to simulate the operating state of the T-type three-level circuit.

[0024] The T-type three-level circuit has three operating states: normal operation, three-phase short circuit, and transistor shutdown. In normal operation, the transistors in the T-type three-level circuit turn on and off in an orderly manner according to the drive signal output by the controller. The output terminal PH can normally output three voltages: Udc / 2, 0, and -Udc / 2, thus driving the motor to work normally. In the three-phase short circuit state, the controller controls specific transistors in the T-type three-level circuit to turn on, making the three-phase potentials consistent, stopping the motor and protecting the hardware structure of the T-type three-level circuit. In the transistor shutdown state, when the electric vehicle is in states such as not connected to high voltage, not engaged after power-on, in neutral standby, or stopped after power-off, the controller controls all 12 transistors of the three-phase T-type three-level circuit to be in the off state, stopping the voltage output of the T-type three-level circuit and protecting its hardware structure.

[0025] Specifically, the HIL test system can acquire the output signals from the controller. These output signals can be 12 PWM signals, which can simulate the operating state of a T-type three-level circuit based on a circuit simulation model, thereby simulating the output voltage of the T-type three-level circuit. Since the frequency of PWM signals is generally around 10kHz, to improve the accuracy of PWM signal acquisition, an FPGA can be used as the processing chip in the HIL test system. This improves the time accuracy of the rising and falling edges of the PWM signals and reduces errors caused by the discretization of analog signals.

[0026] S120. Based on the operating state of the T-type three-level circuit, determine the three-phase terminal voltage values ​​in the circuit simulation model.

[0027] Among them, the terminal voltage value refers to the output voltage value of the output terminal PH relative to the DC bus midpoint DCO.

[0028] Specifically, the three-phase terminal voltage values ​​in the circuit simulation model differ depending on the operating state of the T-type three-level circuit. For example, when the simulated T-type three-level circuit is in normal operation, the three-phase terminal voltage values ​​can be determined based on the conduction state of each transistor in the circuit simulation model. When the simulated T-type three-level circuit is in a three-phase short-circuit state, the three-phase terminal voltage values ​​are the same because the three-phase potentials are consistent. When the simulated T-type three-level circuit is in a transistor-off state, the three-phase terminal voltage values ​​can be determined according to the calculation formula.

[0029] S130. Based on the motor simulation model, determine the three-phase current values ​​in the motor simulation model according to the three-phase terminal voltage values.

[0030] Specifically, after determining the three-phase terminal voltage values, the motor simulation model can perform coordinate transformation and calculation on the three-phase terminal voltage values ​​to ultimately determine the three-phase current values ​​in the motor simulation model.

[0031] S140, based on the digital-to-analog converter unit, feeds back the three-phase current from the motor simulation model to the controller.

[0032] Specifically, the three-phase current values ​​in the motor simulation model are digital signals. Since the controller cannot recognize digital signals, a digital-to-analog converter (DAC) converts the digital current signals into analog voltage signals, which are then fed back to the controller. The controller's internal DAC then converts the analog voltage signals back into analog current signals, thus completing the identification of the three-phase current values. The controller can also perform PI correction in a two-phase rotating coordinate system based on the three-phase current values ​​in the motor simulation model and the target current values, thereby determining the voltage values ​​in the two-phase rotating coordinate system. After modulating the voltage values ​​in the two-phase rotating coordinate system, the controller can re-output 12 PWM control signals, ultimately completing the HIL test closed loop.

[0033] This embodiment simulates the operating state of a T-type three-level circuit using a circuit simulation model based on the controller's output signal and the T-type three-level circuit. Based on the operating state of the T-type three-level circuit, the three-phase terminal voltage values ​​in the circuit simulation model are determined. Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values. Then, based on the digital-to-analog converter, the three-phase current in the motor simulation model is fed back to the controller. This achieves simulation testing of the controller under different operating states of the T-type three-level circuit in electric vehicles, improving the comprehensiveness and reliability of HIL testing.

[0034] Example 2 Figure 3 This is a flowchart illustrating a HIL testing method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment provides a detailed explanation of the method for determining the three-phase terminal voltage values ​​in the circuit simulation model, such as... Figure 3 As shown, the HIL testing method includes: S210. A circuit simulation model based on the controller's output signal and the T-type three-level circuit is used to simulate the operating state of the T-type three-level circuit.

[0035] S220. When the simulated T-type three-level circuit is in normal operating state, determine the three-phase terminal voltage values ​​according to the conduction state of each transistor in the circuit simulation model.

[0036] Specifically, when the simulated T-type three-level circuit is in normal operation, the controller's output signal simulates and controls the conduction state of each transistor in real time. The three-phase terminal voltage value is determined by the currently conducting transistor combination. For example, the three-phase terminal voltage value can be Udc / 2, 0, or -Udc / 2.

[0037] S230. When the simulated T-type three-level circuit is in a three-phase short-circuit state, ensure that the three-phase terminal voltage values ​​are all the same.

[0038] Specifically, when the simulated T-type three-level circuit is in a three-phase short-circuit state, since the three-phase potentials are the same, the three-phase terminal voltage values ​​are all the same. For example, the three-phase terminal voltage values ​​can all be Udc / 2, 0, or -Udc / 2.

[0039] S240. When the simulated T-type three-level circuit is in the off state, the three-phase terminal voltage values ​​are determined based on the excitation signal and the first calculation formula; the first calculation formula is: ; ; ; Among them, U ao U is the terminal voltage value of phase a. bo U is the terminal voltage value of phase b. co Ψ represents the terminal voltage of phase c, and w represents the angular velocity of the motor stator current. The angular velocity of the motor stator current indicates the rotational speed of the three-phase stator current. PM The permanent magnet flux linkage is the total magnetic field generated by the motor rotor magnets themselves, and is an inherent parameter of the motor at the time of manufacture; θ e The angle of the motor rotor magnetic field represents the real-time angle of the motor rotor magnetic field's current spatial position. The controller's output signals include circuit control signals and excitation signals. The circuit control signals can be 12-channel PWM signals used to simulate the conduction state of transistors, thereby simulating the operation of a T-type three-level circuit. The HIL test system can simulate the stator current angular velocity and the angle of the motor rotor magnetic field based on the excitation signal and the motor simulation model. After determining the stator current angular velocity, permanent magnet flux linkage, and the angle of the motor rotor magnetic field, these parameters can be substituted into the first calculation formula mentioned above to calculate the three-phase terminal voltage values ​​respectively.

[0040] S250. Based on the motor simulation model, determine the three-phase current values ​​in the motor simulation model according to the three-phase terminal voltage values.

[0041] S260, based on the digital-to-analog converter unit, feeds back the three-phase current from the motor simulation model to the controller.

[0042] This embodiment improves the accuracy of calculating the three-phase terminal voltage values ​​of the electric vehicle's T-type three-level circuit under different operating conditions by determining the three-phase terminal voltage values ​​based on the conduction state of each transistor in the circuit simulation model when the simulated T-type three-level circuit is in normal operation; determining the same three-phase terminal voltage values ​​when the simulated T-type three-level circuit is in a three-phase short-circuit state; and determining the three-phase terminal voltage values ​​based on the excitation signal and the first calculation formula when the simulated T-type three-level circuit is in a transistor-off state. This enhances the comprehensiveness and reliability of HIL testing.

[0043] Example 3 Figure 4 This is a flowchart illustrating a HIL testing method provided in Embodiment 3 of the present invention. Based on the above embodiments, this embodiment provides a detailed explanation of the method for determining the three-phase current values ​​in the circuit simulation model, such as... Figure 3 As shown, the HIL testing method includes: S310, a circuit simulation model based on the controller's output signal and the T-type three-level circuit, simulates the operating state of the T-type three-level circuit.

[0044] S320. Based on the operating state of the T-type three-level circuit, determine the three-phase terminal voltage values ​​in the circuit simulation model.

[0045] S330. Determine the voltage values ​​in the two-phase stationary coordinate system based on the three-phase terminal voltage values.

[0046] Figure 5 This is a schematic diagram of a vector control coordinate system provided in an embodiment of the present invention, as shown below. Figure 5 As shown, HIL testing mainly involves a two-phase stationary coordinate system, a two-phase rotating coordinate system, and a three-phase coordinate system. The three-phase coordinate system includes the a-axis, b-axis, and c-axis, which coincide with the axes of the three-phase windings. The two-phase stationary coordinate system includes the α-axis and β-axis, which coincide with the a-axis and lead the α-axis by 90 degrees. The two-phase rotating coordinate system includes the d-axis and q-axis, with the d-axis coinciding with the N-pole direction of the motor rotor and leading the q-axis by 90 degrees.

[0047] Specifically, after determining the three-phase terminal voltage values, the difference between the voltage values ​​of two adjacent phase terminals can be used as the line voltage value. Then, based on the line voltage value, the voltage value in the two-phase stationary coordinate system can be determined.

[0048] In an optional embodiment, determining the voltage value in a two-phase stationary coordinate system based on the three-phase terminal voltage value includes: determining the three-phase line voltage value based on the three-phase terminal voltage value; and determining the voltage value in a two-phase stationary coordinate system based on the three-phase line voltage value.

[0049] Specifically, based on the three-phase terminal voltage values, the three-phase line voltage values ​​are determined using the second calculation formula; the second calculation formula is: ; ; Among them, U ab U is the line voltage between phase a and phase b. bc U is the line voltage between phase b and phase c. ao U is the terminal voltage value of phase a. bo U is the terminal voltage value of phase b. co Let c be the terminal voltage value. After determining the terminal voltage values ​​of phase a, phase b, and phase c, the terminal voltage values ​​of phase a, phase b, and phase c can be substituted into the second calculation formula mentioned above to calculate the line voltage values ​​between phase a and phase b and between phase b and phase c, respectively.

[0050] Based on the three-phase line voltage values, and using the third calculation formula, determine the voltage values ​​in the two-phase stationary coordinate system; the third calculation formula is: ; ; Among them, U α U is the voltage value along the α axis. β U is the β-axis voltage value. ab U is the line voltage between phase a and phase b. bc Given the line voltage values ​​between phase b and phase c, after determining the line voltage values ​​between phase a and phase b and between phase b and phase c, these values ​​can be substituted into the third calculation formula mentioned above to calculate the α-axis voltage value and the β-axis voltage value, respectively.

[0051] S340. Based on the excitation signal and the voltage value in the two-phase stationary coordinate system, determine the current value in the two-phase rotating coordinate system.

[0052] Specifically, after determining the voltage value in the two-phase stationary coordinate system, the voltage value in the two-phase rotating coordinate system can be determined by coordinate transformation, taking into account the angle of the motor rotor magnetic field. Then, based on the voltage value in the two-phase rotating coordinate system, the current value in the two-phase rotating coordinate system can be determined.

[0053] In an optional embodiment, determining the current value in a two-phase rotating coordinate system based on the excitation signal and the voltage value in the two-phase stationary coordinate system includes: obtaining the angle of the motor rotor magnetic field based on the excitation signal and the motor simulation model; determining the voltage value in the two-phase rotating coordinate system based on the voltage value in the two-phase stationary coordinate system and the angle of the motor rotor magnetic field; and determining the current value in the two-phase rotating coordinate system based on the excitation signal and the motor simulation model, and the voltage value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field.

[0054] Specifically, the excitation signal refers to the magnetic field of the permanent magnet in the motor rotor. By combining the motor simulation model with the magnetic field of the permanent magnet and considering the motor's operating conditions, the angle of the motor rotor's magnetic field can be obtained. After obtaining the angle of the motor rotor's magnetic field, based on the voltage values ​​in the two-phase stationary coordinate system and the angle of the motor rotor's magnetic field, the voltage values ​​in the two-phase rotating coordinate system are determined using the fourth calculation formula. The fourth calculation formula is: ; ; Among them, U d U is the d-axis voltage value. q U is the q-axis voltage value. α U is the voltage value along the α axis. β θ is the β-axis voltage value. e Given the angle of the motor rotor magnetic field, after determining the α-axis voltage value, β-axis voltage value, and the angle of the motor rotor magnetic field, these values ​​can be substituted into the fourth calculation formula mentioned above to calculate the d-axis voltage value and the q-axis voltage value, respectively.

[0055] When the simulated T-type three-level circuit is operating in a three-phase short-circuit state, the voltage values ​​at the three-phase terminals are all the same, U ao =U bo =U co This makes U ab =U bc =0, combining the third and fourth calculation formulas, we can obtain the fifth calculation formula. Based on the fifth calculation formula, we can determine the voltage value in the two-phase rotating coordinate system. The fifth calculation formula is: ; ; Among them, U d U is the d-axis voltage value. q The voltage value is the q-axis value. Since the three-phase terminal voltage values ​​are the same when the simulated T-type three-level circuit is in a three-phase short-circuit state, the three-phase line voltage values ​​and the voltage values ​​in the two-phase stationary coordinate system are both 0. Therefore, it is determined that the voltage values ​​in the two-phase rotating coordinate system are both 0.

[0056] When the simulated T-type three-level circuit is in the off state, U can be determined by the first calculation formula. ao U bo U co Based on this, combined with the second calculation formula, we can obtain U. ab U bc Combining the third and fourth calculation formulas, we can obtain the sixth calculation formula, which can be used to determine the voltage value in the two-phase rotating coordinate system. The sixth calculation formula is: ; ; Among them, U d U is the d-axis voltage value. q Ψ is the q-axis voltage value, w is the motor stator current and angular velocity. PM For permanent magnet flux linkage, since the controller has no voltage output when the simulated T-type three-level circuit is in the off state, only the back EMF voltage of the motor exists. Therefore, the d-axis voltage value is 0, and the q-axis voltage value is the product of the motor stator current angular velocity and the permanent magnet flux linkage.

[0057] The relationship between the current value and the voltage value in a two-phase rotating coordinate system can be determined by the seventh calculation formula; the seventh calculation formula is: ; ; Among them, U d U is the d-axis voltage value. q i is the q-axis voltage value. d i represents the d-axis current value. q L is the q-axis current value. d L is the d-axis inductance value. q R is the q-axis inductance, R is the stator resistance, w is the stator current angular velocity, and Ψ is the q-axis inductance. PM For the permanent magnet flux linkage, based on the excitation signal and the motor simulation model, and according to the voltage value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field, the current value in the two-phase rotating coordinate system is determined based on the eighth calculation formula; the eighth calculation formula is: ; ; Among them, i d i represents the d-axis current value. q L is the q-axis current value. d L is the d-axis inductance value. q U is the q-axis inductance value. d U is the d-axis voltage value. qR is the q-axis voltage value, R is the stator resistance value, w is the stator current angular velocity, and Ψ is the q-axis voltage value. PM For the permanent magnet flux linkage, after determining the d-axis inductance, q-axis inductance, d-axis voltage, q-axis voltage, stator resistance, stator current angular velocity, and permanent magnet flux linkage, substitute these values ​​into the eighth calculation formula above to calculate the d-axis current and q-axis current values ​​respectively.

[0058] S350. Determine the three-phase current values ​​based on the current values ​​in the two-phase rotating coordinate system.

[0059] Specifically, after determining the current value in the two-phase rotating coordinate system, the current value in the two-phase stationary coordinate system can be determined by coordinate transformation, taking into account the angle of the motor rotor magnetic field. Then, based on the current value in the two-phase stationary coordinate system, the three-phase current value can be determined.

[0060] In an optional embodiment, the three-phase current value is determined based on the current value in the two-phase rotating coordinate system, including: obtaining the angle of the motor rotor magnetic field based on the excitation signal and the motor simulation model; determining the current value in the two-phase stationary coordinate system based on the current value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field; and determining the three-phase current value based on the current value in the two-phase stationary coordinate system.

[0061] Specifically, the excitation signal refers to the magnetic field of the permanent magnet in the motor rotor. By combining the motor simulation model with the magnetic field of the permanent magnet and considering the motor's operating conditions, the angle of the motor rotor's magnetic field can be obtained. After obtaining the angle of the motor rotor's magnetic field, based on the current value in the two-phase rotating coordinate system and the angle of the motor rotor's magnetic field, the current value in the two-phase stationary coordinate system is determined using the ninth calculation formula. The ninth calculation formula is: ; ; Among them, i α i is the α-axis current value. β i is the β-axis current value. d i represents the d-axis current value. q Let θ be the q-axis current value. e Given the angle of the motor rotor magnetic field, after determining the d-axis current value, q-axis current value, and the angle of the motor rotor magnetic field, these values ​​can be substituted into the ninth calculation formula mentioned above to calculate the α-axis current value and β-axis current value respectively.

[0062] Based on the current values ​​in the two-phase stationary coordinate system, and using the tenth calculation formula, the three-phase current values ​​are determined; the tenth calculation formula is: ; ; ; Among them, i a Let i be the phase current value. b Let i be the value of phase b current. c Let i be the c-phase current value. α i is the α-axis current value. β Given the β-axis current value, after determining the α-axis and β-axis current values, the α-axis and β-axis current values ​​can be substituted into the tenth calculation formula mentioned above to calculate the a-phase current value, b-phase current value, and c-phase current value respectively.

[0063] S360, based on the digital-to-analog converter unit, feeds back the three-phase current from the motor simulation model to the controller.

[0064] This embodiment determines the voltage value in the two-phase stationary coordinate system based on the three-phase terminal voltage value, and determines the current value in the two-phase rotating coordinate system based on the excitation signal and the voltage value in the two-phase stationary coordinate system. Then, based on the current value in the two-phase rotating coordinate system, the three-phase current value is determined, thereby simulating the current change of the controller, providing data basis for the current closed-loop regulation of the controller, and improving the comprehensiveness and reliability of HIL testing.

[0065] Example 4 Figure 6 This is a schematic diagram of a HIL testing device provided in an embodiment of the present invention. This device can be used to test the controller of a T-type three-level circuit in an electric vehicle. The device can be implemented in software and / or hardware and is generally integrated into the HIL testing system provided in this embodiment of the present invention. Figure 6 As shown, the HIL testing apparatus includes: The operating state simulation module 410 is used to simulate the operating state of the T-type three-level circuit based on the controller's output signal and the circuit simulation model of the T-type three-level circuit; wherein, the operating state of the T-type three-level circuit includes normal operation state, three-phase short circuit state and transistor off state; The voltage value determination module 420 is used to determine the three-phase terminal voltage values ​​in the circuit simulation model based on the operating status of the T-type three-level circuit. The current value determination module 430 is used to determine the three-phase current values ​​in the motor simulation model based on the three-phase terminal voltage values. Feedback module 440 is used to feed back the three-phase current from the motor simulation model to the controller based on the digital-to-analog converter unit.

[0066] Optionally, the voltage value determination module 420 may include a first voltage value determination unit; the first voltage value determination unit is used to determine the three-phase terminal voltage value according to the conduction state of each transistor in the circuit simulation model when the operating state of the simulated T-type three-level circuit is the normal operating state.

[0067] Optionally, the voltage value determination module 420 further includes a second voltage value determination unit; the second voltage value determination unit is used to determine that the three-phase terminal voltage values ​​are the same when the operating state of the simulated T-type three-level circuit is a three-phase short-circuit state.

[0068] Optionally, the voltage value determination module 420 further includes a third voltage value determination unit; the third voltage value determination unit is used to determine the three-phase terminal voltage values ​​based on the excitation signal and the first calculation formula when the operating state of the simulated T-type three-level circuit is the off state; the first calculation formula is: ; ; ; Among them, U ao U is the terminal voltage value of phase a. bo U is the terminal voltage value of phase b. co Ψ is the terminal voltage of phase c, w is the stator current and angular velocity of the motor. PM For permanent magnet flux linkage, θ e The angle of the magnetic field of the motor rotor.

[0069] Optionally, the current value determination module 430 may include a voltage value determination unit, a first current value determination unit, and a second current value determination unit; the voltage value determination unit is used to determine the voltage value in a two-phase stationary coordinate system based on the three-phase terminal voltage value; the first current value determination unit is used to determine the current value in a two-phase rotating coordinate system based on the excitation signal and the voltage value in the two-phase stationary coordinate system; and the second current value determination unit is used to determine the three-phase current value based on the current value in the two-phase rotating coordinate system.

[0070] Optionally, the voltage value determination unit is specifically used to determine the three-phase line voltage value based on the three-phase terminal voltage value; and to determine the voltage value in the two-phase stationary coordinate system based on the three-phase line voltage value.

[0071] Optionally, the first current value determination unit is specifically used to obtain the angle of the motor rotor magnetic field based on the excitation signal and the motor simulation model; determine the voltage value in the two-phase rotating coordinate system based on the voltage value in the two-phase stationary coordinate system and the angle of the motor rotor magnetic field; and determine the current value in the two-phase rotating coordinate system based on the excitation signal and the motor simulation model, based on the voltage value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field.

[0072] Optionally, the second current value determination unit is specifically used to obtain the angle of the motor rotor magnetic field based on the excitation signal and the motor simulation model; determine the current value in the two-phase stationary coordinate system based on the current value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field; and determine the three-phase current value based on the current value in the two-phase stationary coordinate system.

[0073] It is understood that, since the HIL testing device described above is capable of executing the HIL testing method in any embodiment of the present invention, those skilled in the art can understand the specific implementation and various variations of the HIL testing device in this embodiment based on the HIL testing method described in the embodiments of the present invention. Therefore, how the HIL testing device implements the HIL testing method in the embodiments of the present invention will not be described in detail here. Any device used by those skilled in the art to implement the HIL testing method in the embodiments of the present invention falls within the scope of protection of this application.

[0074] Example 5 The present invention also provides a HIL test system for testing the controller of a T-type three-level circuit in an electric vehicle; the HIL test system includes a HIL test device for executing the HIL test method of any embodiment of the present invention.

[0075] The HIL testing system provided in this embodiment can execute the HIL testing method of any embodiment of the present invention, and has the functional module for executing the HIL testing method of any embodiment of the present invention. It can achieve the effect of the HIL testing method of the above embodiment. The similarities can be referred to the above description, and will not be repeated here.

[0076] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, combinations, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A HIL testing method, characterized in that, A controller for testing the T-type three-level circuit of an electric vehicle; the HIL test method includes: Based on the output signal of the controller and the circuit simulation model of the T-type three-level circuit, the operating state of the T-type three-level circuit is simulated; wherein, the operating state of the T-type three-level circuit includes normal operation state, three-phase short circuit state, and transistor off state; Based on the operating state of the T-type three-level circuit, determine the three-phase terminal voltage values ​​in the circuit simulation model; Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values. Based on the digital-to-analog conversion unit, the three-phase current in the motor simulation model is fed back to the controller.

2. The HIL testing method according to claim 1, characterized in that, Based on the operating state of the T-type three-level circuit, determine the three-phase terminal voltage values ​​in the circuit simulation model, including: When the simulated T-type three-level circuit is in normal operating condition, the three-phase terminal voltage values ​​are determined according to the conduction state of each transistor in the circuit simulation model.

3. The HIL testing method according to claim 1, characterized in that, Based on the operating state of the T-type three-level circuit, determining the three-phase terminal voltage values ​​in the circuit simulation model further includes: When simulating the operation of the T-type three-level circuit as a three-phase short-circuit state, it is determined that the voltage values ​​of the three phase terminals are all the same.

4. The HIL testing method according to claim 1, characterized in that, The controller's output signals include circuit control signals and excitation signals; Based on the operating state of the T-type three-level circuit, determining the three-phase terminal voltage values ​​in the circuit simulation model further includes: When the simulated T-type three-level circuit is in the off state, the three-phase terminal voltage values ​​are determined based on the excitation signal and the first calculation formula; the first calculation formula is: ; ; ; Among them, U ao U is the terminal voltage value of phase a. bo U is the terminal voltage value of phase b. co Ψ is the terminal voltage of phase c, w is the stator current and angular velocity of the motor. PM For permanent magnet flux linkage, θ e The angle of the magnetic field of the motor rotor.

5. The HIL testing method according to claim 1, characterized in that, The output signal of the control signal includes a circuit control signal and an excitation signal; Based on the motor simulation model, the three-phase current values ​​in the motor simulation model are determined according to the three-phase terminal voltage values, including: Based on the three-phase terminal voltage values, determine the voltage values ​​in the two-phase stationary coordinate system; Based on the excitation signal and the voltage value in the two-phase stationary coordinate system, determine the current value in the two-phase rotating coordinate system; The three-phase current values ​​are determined based on the current values ​​in the two-phase rotating coordinate system.

6. The HIL testing method according to claim 5, characterized in that, Based on the three-phase terminal voltage values, determine the voltage values ​​in the two-phase stationary coordinate system, including: Based on the three-phase terminal voltage values, determine the three-phase line voltage values; Based on the three-phase line voltage values, determine the voltage values ​​in the two-phase stationary coordinate system.

7. The HIL testing method according to claim 5, characterized in that, Based on the excitation signal and the voltage values ​​in the two-phase stationary coordinate system, the current values ​​in the two-phase rotating coordinate system are determined, including: Based on the excitation signal and the motor simulation model, the angle of the motor rotor magnetic field is obtained; The voltage value in the two-phase rotating coordinate system is determined based on the voltage value in the two-phase stationary coordinate system and the angle of the motor rotor magnetic field. Based on the excitation signal and the motor simulation model, the current value in the two-phase rotating coordinate system is determined according to the voltage value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field.

8. The HIL testing method according to claim 5, characterized in that, Based on the current values ​​in the two-phase rotating coordinate system, the three-phase current values ​​are determined, including: Based on the excitation signal and the motor simulation model, the angle of the motor rotor magnetic field is obtained; The current value in the two-phase stationary coordinate system is determined based on the current value in the two-phase rotating coordinate system and the angle of the motor rotor magnetic field. The three-phase current values ​​are determined based on the current values ​​in the two-phase stationary coordinate system.

9. A HIL testing device, characterized in that, A controller for testing T-type three-level circuits in electric vehicles; The HIL testing device includes: The operation state simulation module is used to simulate the operation state of the T-type three-level circuit based on the output signal of the controller and the circuit simulation model of the T-type three-level circuit; wherein, the operation state of the T-type three-level circuit includes normal operation state, three-phase short circuit state and transistor off state; The voltage value determination module is used to determine the three-phase terminal voltage values ​​in the circuit simulation model based on the operating state of the T-type three-level circuit. The current value determination module is used to determine the three-phase current values ​​in the motor simulation model based on the three-phase terminal voltage values. The feedback module is used to feed back the three-phase current in the motor simulation model to the controller based on the digital-to-analog conversion unit.

10. A HIL testing system, characterized in that, A controller for testing T-type three-level circuits in electric vehicles; The HIL testing system includes the HIL testing device as described in claim 9, and is used to perform the HIL testing method as described in any one of claims 1-8.