A Hardware-in-the-Loop Simulator for Permanent Magnet Synchronous Motor Considering the Dead-Time Characteristics of Inverters
By simulating the dead-zone characteristics of the inverter based on DSP, the problems of complex programming and high cost in FPGA implementation are solved, and efficient and safe motor driver testing is achieved, reducing the testing cost and complexity.
Patent Information
- Application Number
- CN202210779215.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-07-04
AI Technical Summary
In the prior art, the semi-physical simulation platform of the permanent magnet synchronous motor control system is implemented based on FPGA, which is cumbersome in programming and high cost, making it difficult to efficiently update and test the motor model code, and it is time-consuming and labor-intensive to debug directly on the physical motor, affecting development efficiency.
The semi-physical simulator based on DSP is adopted, including a conditioning module, an inverter dead-space error voltage simulation superposition module and a permanent magnet synchronous motor model calculation module to simulate the dead-space characteristics of the inverter. The DSP chip TMS320F28335 is used to calculate and output the motor state amount, reducing programming complexity and cost.
It improves the motor driver testing efficiency, simplifies the motor testing system, reduces the testing cost, realizes real simulation of the inverter dead-zone characteristics, and improves test safety and flexibility.
Smart Images

Figure CN115296564B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control hardware-in-the-loop simulation, and more specifically, to a hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. Background Art
[0002] In the field of motor control system development, after the control code is written, testing is often required. At this time, if the control system is directly connected to the power board to drive the motor, the motor may rotate abnormally due to undebugged errors in the control code itself, and even cause overcurrent and damage to the power devices. At the same time, due to the complexity of the debugging steps of the power devices and the physical motor itself, directly debugging the preliminary control code on the physical object is often time-consuming and laborious, reducing the development efficiency and the speed of algorithm verification.
[0003] Therefore, it is necessary to conduct preliminary simulation tests on the control code through hardware-in-the-loop simulation technology and then conduct physical debugging after passing. However, conventional hardware-in-the-loop simulation platforms such as dSPACE use FPGA to analyze the externally input PWM pulse signals, detect the corresponding duty cycles, calculate the corresponding output voltages, and then update the motor model equations. Programming the motor model through FPGA is often troublesome and cumbersome, which is not conducive to repeatedly updating the model code. At the same time, the cost of FPGA is relatively high, which is not conducive to the popularization and implementation of hardware-in-the-loop simulation technology. These are the problems that the current hardware-in-the-loop simulation technology for permanent magnet synchronous motor control needs to face.
[0004] Aiming at the problems of the existing technology, the present invention provides a hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. Summary of the Invention
[0005] To solve the problems in the existing technology, the present invention provides a hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. The hardware-in-the-loop simulator is implemented based on DSP and is used to simulate the power-stage characteristics of a permanent magnet synchronous motor and its inverter. It includes:
[0006] A conditioning module, which is used to collect the three-phase upper-bridge-arm PWM control signals output by the motor controller to be tested and process them to obtain the true ideal input voltage.
[0007] An inverter dead-time error voltage simulation and superposition module, which is used to convert the ideal input voltage into the actual three-phase input voltage with the non-linear characteristics of the inverter dead-time.
[0008] A permanent magnet synchronous motor model calculation module, which is used to perform calculation iterations on the actual three-phase input voltage to obtain the state quantities of the permanent magnet synchronous motor.
[0009] According to an embodiment of the present invention, the conditioning module includes an input conditioning circuit, which, based on the three-phase upper-bridge-arm PWM control signal and combined with the actual inverter bus voltage, converts to obtain the actual three-phase equivalent input voltage. Among them, the input conditioning circuit includes:
[0010] A first resistor, whose first end inputs the three-phase upper-bridge-arm PWM control signal;
[0011] A first capacitor, whose first end is connected to the second end of the first resistor, and the second end is connected to digital ground;
[0012] A rail-to-rail operational amplifier, whose non-inverting input terminal is connected to the second end of the first resistor;
[0013] A second resistor, whose first end is connected to the inverting input terminal of the rail-to-rail operational amplifier, and the second end is connected to the output terminal of the rail-to-rail operational amplifier;
[0014] A second capacitor, whose first end is connected to the positive power supply terminal of the rail-to-rail operational amplifier, and the second end is connected to digital ground.
[0015] According to an embodiment of the present invention, the conditioning module includes an ADC sampling module, which is connected to the input conditioning circuit and is used to proportionally amplify the three-phase equivalent input voltage according to the actual DC bus voltage to obtain an unfiltered ideal input voltage.
[0016] According to an embodiment of the present invention, the conditioning module includes a filtering module, which is connected to the ADC sampling module and is used to perform second-order low-pass filtering on the unfiltered ideal input voltage to eliminate the noise caused by ADC acquisition and obtain the ideal input voltage.
[0017] According to an embodiment of the present invention, the inverter dead-time error voltage analog superposition module calculates the actual three-phase input voltage through the following formula:
[0018] U' a = ΔV a + U a
[0019] U′ b = ΔV b + U b
[0020] U′ c = ΔV c + U c
[0021] In the formula, U' a 、U′ b 、U′ c are the actual three-phase input voltages; ΔVa 、 ΔV b 、 ΔV c is the three - phase average disturbance voltage; U a 、 U b 、 U c is the ideal input voltage;
[0022] The three - phase average disturbance voltage is:
[0023]
[0024]
[0025]
[0026] Wherein, T a is the PWM cycle time; T d is the PWM dead - time; T on 、 T off are the turn - on and turn - off delays; V on is the average conduction voltage drop of the switch tube and the diode; V dc is the DC input voltage of the inverter; i a 、 i b 、 i c are the phase currents; sgn() is the sign function. The phase current is a negative current when flowing from the motor to the inverter, and a positive current when flowing from the inverter to the motor.
[0027] According to an embodiment of the present invention, the permanent - magnet synchronous motor state variables include but are not limited to the three - phase currents and rotor position of the next cycle. The permanent - magnet synchronous motor model calculation module includes:
[0028] The first coordinate system conversion unit is used to convert the actual three - phase input voltage into the input voltage in the two - phase rotating d - q axis coordinate system;
[0029] The d - q axis current update unit, based on the input voltage in the two - phase rotating d - q axis coordinate system, uses the voltage equation and flux linkage equation of the permanent - magnet synchronous motor in the two - phase rotating d - q axis coordinate system to obtain the updated d - q axis currents;
[0030] The rotor position update unit, based on the updated d - q axis currents, uses the torque equation and motion equation to obtain the updated rotor electrical angle as the rotor position;
[0031] The second coordinate system conversion unit is used to convert the updated d - q axis currents into the three - phase currents in the three - phase stationary coordinate system as the three - phase currents of the next cycle;
[0032] The voltage equation of the permanent magnet synchronous motor in the two-phase rotating d-q axis coordinate system is as follows:
[0033]
[0034] Where, u d , u q are the d-q axis input voltages in the two-phase rotating d-q axis coordinate system; i d , i q are the d-q axis currents in the two-phase rotating d-q axis coordinate system; L d , L q are the d-q axis inductances in the two-phase rotating d-q axis coordinate system; ψ d , ψ q are the d-q axis magnetic fluxes in the two-phase rotating d-q axis coordinate system; R s is the stator voltage; ω e is the rotor speed; ψ f is the rotor magnetic flux;
[0035] The magnetic flux equation is:
[0036]
[0037] The torque equation is:
[0038] T e = n p (ψ f i q +(L d - L q )i d i q )
[0039] Where, T e is the electromagnetic torque of the motor; n p is the number of pole pairs of the permanent magnet;
[0040] The motion equation is:
[0041]
[0042] Where, T L is the load torque of the motor, J is the moment of inertia of the motor rotor and the mechanical load, and B represents the damping coefficient; ω is the mechanical angular velocity of the motor.
[0043] According to an embodiment of the present invention, the hardware-in-the-loop simulator includes:
[0044] A noise superposition module, which communicates with the permanent magnet synchronous motor model calculation module, and is used to superimpose Gaussian white noise on the state variables of the permanent magnet synchronous motor to simulate various operating condition noises and non-linear factors that may exist in actual operating conditions;
[0045] An output module, which communicates with the noise superposition module and is used to output the permanent magnet synchronous motor state quantity superimposed with noise in the form of a communication bus.
[0046] According to another aspect of the present invention, there is also provided a hardware-in-the-loop simulation method for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, which is executed by the hardware-in-the-loop simulator as described in the above claims. The method includes the following steps:
[0047] Collect, through the conditioning module, three-phase upper-bridge-arm PWM control signals output by a motor controller to be measured without dead-time injection, and process them to obtain the true ideal input voltage.
[0048] Convert, through the inverter dead-time error voltage simulation and superposition module, the ideal input voltage into the actual three-phase input voltage with the non-linear characteristics of the inverter dead-time.
[0049] Calculate and iterate the actual three-phase input voltage through the permanent magnet synchronous motor model calculation module to obtain the permanent magnet synchronous motor state quantity.
[0050] According to another aspect of the present invention, there is also provided a storage medium, which includes a series of instructions for executing the method steps as described above.
[0051] According to another aspect of the present invention, there is also provided a hardware-in-the-loop simulation system for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. The simulation system includes: a motor controller to be measured and the hardware-in-the-loop simulator as described in any one of the above. Among them, after the motor controller to be measured runs the algorithms to be tested and verified, it outputs PWM control signals and receives the permanent magnet synchronous motor state quantity fed back by the hardware-in-the-loop simulator.
[0052] The present invention provides a hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. Compared with the prior art, it has the following advantages or beneficial effects:
[0053] (1) Improve the test efficiency: The hardware-in-the-loop simulator is used to simulate the power-stage characteristics of the permanent magnet synchronous motor and its inverter, effectively replacing the real permanent magnet synchronous motor and inverter to complete various performance tests on the motor driver. And the hardware-in-the-loop simulator simulates the internal working mechanism of the permanent magnet synchronous motor and the simulation of power electronic devices such as inverters to output the phase current and rotor position of the motor, effectively replacing the physical motor, loading equipment, test instruments, connection devices, etc. in the traditional motor test bench, simplifying the composition of the actual motor test system, with a simpler structure, lighter weight and smaller volume than the traditional permanent magnet synchronous motor driver test system, reducing the space requirement during the test and improving the test efficiency of the permanent magnet synchronous motor driver.
[0054] (2) Simple and flexible configuration, more adaptable: The hardware-in-the-loop simulator describes the dead-time characteristics of the motor and inverter with a formulaic model. By changing the model parameters, it can simulate parameter changes and working mode changes of the motor and inverter, etc. It takes less configuration time, is simpler and more flexible, and has greater versatility and adaptability than traditional motor driver test systems;
[0055] (3) Safety and practicality: The hardware-in-the-loop simulator can easily simulate the dead-time characteristics of the motor and its inverter. Compared with traditional motor driver test systems, it will not cause damage to the motor and its load, making fault testing safer and more practical.
[0056] (4) Realized based on DSP: Compared with traditional hardware-in-the-loop simulation systems realized based on FPGA, the half-simulation system realized based on DSP has lower cost, greatly reducing the test cost; and it is easier to program and has lower implementation difficulty.
[0057] (5) Considering dead-time effect: By simulating the non-linear dead-time characteristics of the inverter, the power-stage characteristics of the inverter are restored more realistically.
[0058] Other features and advantages of the present invention will be described in the subsequent specification, and some of them will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained through the structures specifically pointed out in the specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation to the present invention. In the drawings:
[0060] Figure 1 shows a schematic structural diagram of a permanent magnet synchronous motor hardware-in-the-loop simulator considering the dead-time characteristics of the inverter according to an embodiment of the present invention;
[0061] Figure 2 shows a schematic circuit diagram of the input conditioning circuit according to an embodiment of the present invention;
[0062] Figure 3 shows a schematic diagram of the A-phase current path during the dead-time according to an embodiment of the present invention;
[0063] Figure 4 shows a flowchart of a permanent magnet synchronous motor hardware-in-the-loop simulation method considering the dead-time characteristics of the inverter according to an embodiment of the present invention;
[0064] Figure 5Shows a schematic structural diagram of a hardware-in-the-loop simulation system for a permanent magnet synchronous motor considering the inverter dead-time characteristics according to an embodiment of the present invention.
[0065] In the drawings, the same components are denoted by the same reference numerals. Additionally, the drawings are not drawn to actual scale. The meanings of the reference numerals in the drawings are as follows: Hardware-in-the-loop simulator - 1; Input conditioning circuit - 101; ADC sampling module - 102; Filtering module - 103; Inverter dead-time error voltage analog superposition module - 104; Permanent magnet synchronous motor model calculation module - 105; Noise superposition module - 106; Output module - 107; Motor controller under test - 2. Detailed implementation manners
[0066] To make the objectives, technical solutions and advantages of the present invention clearer, the following further describes the embodiments of the present invention in detail with reference to the drawings.
[0067] In the field of motor control system development, conventional hardware-in-the-loop simulation platforms such as dSPACE, etc., all use FPGA to analyze the externally input PWM pulse signals, detect the corresponding duty cycles and then calculate the corresponding output voltages, and then update the motor model equations. Programming the motor model through FPGA is often troublesome and cumbersome, which is not conducive to repeatedly updating the model code. At the same time, the cost of FPGA is relatively high, which is not conducive to the popularization and implementation of the hardware-in-the-loop simulation technology. These are the problems that the current hardware-in-the-loop simulation technology for permanent magnet synchronous motor control needs to face.
[0068] Aiming at the current situation of the prior art, the objective of the present invention is to provide a hardware-in-the-loop simulation system that simplifies the cumbersome writing and complex programming of updating the motor model in the traditional FPGA-based hardware-in-the-loop simulation system, and reduces the chip cost, which is used for the hardware-in-the-loop simulation of permanent magnet synchronous motors, improves the test efficiency of motor drivers, and greatly reduces the test cost.
[0069] Figure 1 Shows a schematic structural diagram of a hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the inverter dead-time characteristics according to an embodiment of the present invention.
[0070] In one embodiment, the hardware-in-the-loop simulator is implemented based on DSP and is used to simulate the power-stage characteristics of a permanent magnet synchronous motor and its inverter, and it includes: a conditioning module, an inverter dead-time error voltage analog superposition module 104, and a permanent magnet synchronous motor model calculation module 105.
[0071] The conditioning module is used to collect the three-phase upper-bridge-arm PWM control signals without dead-time injection output by the motor controller under test and process them to obtain the true ideal input voltage. In one embodiment, as Figure 1As shown, the conditioning module includes an input conditioning circuit 101, which converts the actual three-phase equivalent input voltage based on the three-phase upper bridge arm PWM control signal and the actual inverter bus voltage. In actual applications, the target motor controller to be tested outputs six PWM waves after running the required test and verification algorithm, among which the three-phase upper bridge arm PWM wave enters the input conditioning circuit 101 and is converted into the actual three-phase equivalent input voltage.
[0072] like Figure 2 As shown, the input physical quantities of the input conditioning circuit 101 are three, namely, the PWM control signals of the upper bridge arms of the three phases A, B, and C, which are converted into the actual three-phase equivalent input voltage U in combination with the actual inverter bus voltage. a , U b , U c .
[0073] like Figure 2 As shown, the input conditioning circuit 101 includes: a first resistor R1, a first capacitor C1, a rail-to-rail operational amplifier, a second resistor R2, and a second capacitor C2. Among them, the first end of the first resistor R1 inputs the three-phase upper bridge arm PWM control signal. The first end of the first capacitor C1 is connected to the second end of the first resistor R1, and the second end of the first capacitor C1 is connected to the digital ground DGND. The rail-to-rail operational amplifier in-phase input end is connected to the second end of the first resistor R1. The first end of the second resistor R2 is connected to the inverting input end of the rail-to-rail operational amplifier, and the second end of the second resistor R2 is connected to the output end of the rail-to-rail operational amplifier. The first end of the second capacitor C2 is connected to the positive power supply end of the rail-to-rail operational amplifier, and the second end is connected to the digital ground DGND.
[0074] In one embodiment, the input conditioning circuit 101 requires that the input three-phase PWM control signal does not contain a dead zone protection time, and modulates the frequency of the input PWMA and the motor state equation (the state equation is composed of the three-phase current i a 、i b 、i c and the rotor electrical angle θ e The update frequency of the state equation composed of the input conditioning circuit 101 is consistent, which is 10K. The operation selection is a rail-to-rail op amp, and the output analog voltage range is 0-5V. The middle value 2.5V represents the value of "0". Through the input conditioning circuit 101, the function of PWM acquisition that originally needed to be performed at a frequency of 50M in the FPGA only needs to be performed at a frequency of 10K in the present invention. As a result, the semi-physical simulation function of the entire permanent magnet synchronous motor can be realized in the DSP, which greatly reduces the cost and complexity.
[0075] In one embodiment, Figure 1As shown, the conditioning module includes an ADC sampling module 102, which is connected to its input conditioning circuit 101, and proportionally amplifies the three-phase equivalent input voltage according to the actual DC bus voltage to obtain the unfiltered ideal input voltage. Specifically, the three-phase equivalent input voltage (three-phase input analog quantity) conditioned by the input conditioning circuit 101 is collected by the ADC sampling module 102. The ADC sampling module 102 uses a multi-channel synchronous sampling method and takes the mean value filtering of the collected signals to improve the sampling accuracy. The input analog quantity collected by the ADC sampling module 102 also needs to be proportionally amplified according to the actual DC bus voltage to obtain the true unfiltered ideal input voltages Ua, Ub, and Uc.
[0076] In one embodiment, the ADC sampling module 102 can use the ADC module in the DSP chip. Further, the DSP chip is selected as TMS320F28335.
[0077] In one embodiment, as Figure 1 shown, the conditioning module includes a filtering module 103, which is connected to the ADC sampling module 102 and is used to perform second-order low-pass filtering on the unfiltered ideal input voltage to eliminate the noise caused by ADC sampling and obtain the ideal input voltage. Specifically, the filtering module 103 performs second-order low-pass filtering on the obtained three-phase voltages (unfiltered ideal input voltages) to eliminate the noise caused by ADC sampling. Further, the cut-off frequency of the filtering module 103 needs to be much greater than the PWM switching frequency of the inverter to avoid affecting the value of the actual input voltage.
[0078] In one embodiment, the filtering module 103 can use the filtering circuit in the DSP chip. Further, the DSP chip is selected as TMS320F28335.
[0079] The inverter dead-time error voltage simulation superposition module 104 is used to convert the ideal input voltage into the actual three-phase input voltage with the non-linear characteristics of the inverter dead-time. Specifically, the inverter dead-time error voltage simulation superposition module 104 is used to simulate the error between the output voltage and the ideal output voltage caused by the insertion of the IGBT inverter dead-time. After being superposed by this module, a final actual three-phase input voltage considering the dead-time error voltage is output.
[0080] Due to the insertion of the IGBT dead-time, there is an error between the output voltage and the ideal output voltage, which is called the dead-time error voltage. The dead-time error voltage is related to the current direction. If the influence of the turn-on and turn-off delays and conduction voltage drops of the switching tubes and diodes on the output voltage is considered, the three-phase average disturbance voltage becomes:
[0081]
[0082] Where, T a is the PWM cycle time; T d is the PWM dead time; T on and T off are the turn-on and turn-off delays; V on is the average conduction voltage drop of the switching device and the diode; V dc is the DC input voltage of the inverter; i a , i b , i c are the phase currents; sgn() is the sign function, and the regulations for the current polarity are as Figure 3 shown, that is, when the phase current flows from the motor to the inverter, it is a negative current, and when it flows from the inverter to the motor, it is a positive current.
[0083] Then the actual three-phase input voltage considering the dead-time error voltage is:
[0084]
[0085] Where, U a , U b , U c are the actual three-phase input voltages; ΔV a , ΔV b , ΔV c are the three-phase average disturbance voltages; U a , U b , U c are the ideal input voltages. Among the above parameters, T on , T off , V on are parameters related to the physical characteristics of the actual inverter, and users can set them according to the actual situation. Different set parameters will affect the actual output characteristics of the inverter.
[0086] The permanent magnet synchronous motor model calculation module 105 is used to perform calculation iterations on the actual three-phase input voltage to obtain the state quantities of the permanent magnet synchronous motor. In one embodiment, the state quantities of the permanent magnet synchronous motor include but are not limited to the three-phase currents and rotor position in the next cycle.
[0087] In one embodiment, the permanent magnet synchronous motor model calculation module includes: a first coordinate system conversion unit, a d-q axis current update unit, a rotor position update unit, and a second coordinate system conversion unit.
[0088] The first coordinate system conversion unit is used to convert the actual three-phase input voltage into the input voltage in the two-phase rotating d-q axis coordinate system. In one embodiment, the first coordinate system conversion unit first converts the actual three-phase input voltage (U' a , U′ b , U′ c) After Clark transformation, Ualpha and Ubeta in the two-phase stationary coordinate system are obtained. Then, Ualpha and Ubeta in the two-phase stationary coordinate system are transformed through Park's Transformation to obtain the input voltage (U d 、U q ) in the two-phase rotating d-q axis coordinate system.
[0089] In one embodiment, C 3s / 2s is defined as the transformation matrix of the amplitude value from the three-phase stationary coordinate system to the two-phase stationary coordinate system:
[0090]
[0091] The U 3s / 2s and U alpha obtained after the C beta transformation need to go through Park transformation to obtain U d and U q in the two-phase rotating coordinate system. Define C 2s / 2r as the transformation matrix of the amplitude value from the three-phase stationary coordinate system to the two-phase stationary coordinate system:
[0092]
[0093] The d-q axis current update unit is based on the input voltage (U d 、U q ) in the two-phase rotating d-q axis coordinate system. Using the voltage equation and flux linkage equation of the permanent magnet synchronous motor in the two-phase rotating d-q axis coordinate system, the updated d-q axis current (i d 、i q ) is obtained.
[0094] In one embodiment, the voltage equation of the permanent magnet synchronous motor (PMSM) in the two-phase rotating d-q axis coordinate system is:
[0095]
[0096] Where, u d 、u q are the d-q axis input voltages in the two-phase rotating d-q axis coordinate system; i d 、i q are the d-q axis currents in the two-phase rotating d-q axis coordinate system; L d 、L q are the d-q axis inductances in the two-phase rotating d-q axis coordinate system; ψ d 、ψ q are the d-q axis flux linkages in the two-phase rotating d-q axis coordinate system; R s is the stator voltage; ωe is the rotor speed; ψ f is the rotor flux linkage;
[0097] In one embodiment, the flux linkage equation is:
[0098]
[0099] The rotor position updating unit, based on the updated d-q axis currents (i d , i q ), uses the torque equation and the motion equation to obtain the updated rotor electrical angle (θ e ) as the rotor position.
[0100] In one embodiment, the torque equation is:
[0101] T e = n p (ψ f i q +(L d - L q )i d i q )(7)
[0102] In the formula, T e is the electromagnetic torque of the motor; n p is the number of pole pairs of the permanent magnet;
[0103] In one embodiment, the motion equation is:
[0104]
[0105]
[0106] In the formula, T L is the load torque of the motor, J is the moment of inertia of the motor rotor and the mechanical load, B represents the damping coefficient; ω is the mechanical angular velocity of the motor; θ e is the rotor electrical angle.
[0107] The second coordinate system conversion unit is used to convert the updated d-q axis currents (i d , i q ) into three-phase currents in the three-phase stationary coordinate system as the three-phase currents for the next cycle. In one embodiment, the second coordinate system conversion unit first converts the (i d , i q ) in the two-phase rotating d-q axis coordinate system through the inverse Park transformation to obtain the i alpha , i beta in the two-phase stationary coordinate system, and then converts the i alpha , i beta, after the inverse Clark transformation, the three-phase current (i a , i b , i c ) in the three-phase stationary coordinate system is obtained.
[0108] In one embodiment, C 2r / 2s is defined as the cross-value transformation matrix from the two-phase rotating coordinate system to the two-phase stationary coordinate system:
[0109]
[0110] In one embodiment, C 2s / 3s is defined as the cross-value transformation matrix from the two-phase stationary coordinate system to the three-phase stationary coordinate system:
[0111]
[0112] Mechanical parameters (T L , J, B), electrical parameters (R s , L d , L q , ψ f ) are user-set parameters, which can be set according to the actual needs of the user, and their magnitude results are also related to the operating characteristics of the final model. i d , i q , ω e , θ e are state variables updated in real time, used to represent the actual operating state of the current motor.
[0113] In one embodiment, it is stipulated that the numerical calculation methods of the voltage equation, flux linkage equation and motion equation of the above permanent magnet synchronous motor (PMSM) in the two-phase rotating d-q axis coordinate system are the fourth-order Runge-Kutta method.
[0114] In one embodiment, as Figure 1 shown, the hardware-in-the-loop simulator includes a noise superposition module 106, which communicates with the permanent magnet synchronous motor model calculation module 105, and is used to superimpose Gaussian white noise on the basis of the permanent magnet synchronous motor state variables to simulate various operating condition noises and non-linear factors that may exist in the actual operating conditions. Specifically, the permanent magnet synchronous motor state variables (i a , i b , i c and θ e ) obtained in the permanent magnet synchronous motor model calculation module 105 will have Gaussian white noise superimposed on them in the noise superposition module 106 to simulate various operating condition noises and non-linear factors that may exist in the actual operating conditions. Further, the noise amplitude of the superimposed Gaussian white noise is set by the user. It should be noted that appropriate noise can better simulate the actual operating conditions, while too large noise will cause abnormal operation of the hardware-in-the-loop motor model.
[0115] In one embodiment, as Figure 1 shown, the hardware-in-the-loop simulator includes an output module 107, which communicates with a noise superposition module 106 and is used to output the state quantity of the permanent magnet synchronous motor with noise superposition in the form of a communication bus. Specifically, the state quantity of the permanent magnet synchronous motor with noise superposition will be output in the form of a communication bus in the output module 107 and can be read by the motor controller to be measured. In one embodiment, the communication bus is SPI, and the alternative is IIC. Further, the communication time is within 1 us, and the short time consumption will not affect the real-time acquisition of the motor controller to be measured.
[0116] In one embodiment, the inverter dead-time error voltage simulation and superposition module 104, the permanent magnet synchronous motor model calculation module 105, the noise superposition module 106, and the output module 107 can be implemented based on a DSP chip. Further, the DSP chip selected is TMS320F28335.
[0117] In one embodiment, the hardware-in-the-loop simulator can be applied to hardware-in-the-loop simulators such as power-stage permanent magnet synchronous motor simulation, hardware-in-the-loop simulation verification of permanent magnet synchronous motor control algorithms, and permanent magnet synchronous motor driver test systems. Further, it can be built and tested in Simulink. After passing the test, the corresponding code will be directly generated according to the DSP code of Simulink and downloaded to the target DSP. Through this update mode, the correctness of the semi-simulation model can be ensured in advance through simulation, and the process of writing model code is omitted, accelerating the development process when the hardware-in-the-loop simulation model needs to be updated. That is, the hardware-in-the-loop simulator can directly update the hardware-in-the-loop simulation model through the download function generated by the DSP code of Simulink, simplify the complexity of updating the motor model, improve the driver test efficiency, and greatly reduce the test cost.
[0118] Figure 4 shows a flowchart of a hardware-in-the-loop simulation method for a permanent magnet synchronous motor considering inverter dead-time characteristics according to an embodiment of the present invention.
[0119] As Figure 4 shown, in step S1, the three-phase upper-bridge-arm PWM control signal without dead-time injection output by the motor controller to be measured is collected through an adjustment module, and the real ideal input voltage is obtained through processing. In step S2, the ideal input voltage is converted into the actual three-phase input voltage with the non-linear characteristics of the inverter dead-time through the inverter dead-time error voltage simulation and superposition module 104. In step S3, the actual three-phase input voltage is calculated and iterated through the permanent magnet synchronous motor model calculation module 105 to obtain the state quantity of the permanent magnet synchronous motor.
[0120] In one embodiment, after the algorithm required for testing and verification runs on the target motor controller to be tested, six PWM waves are output. Among them, the three upper-bridge-arm PWM waves enter the input conditioning circuit 101 and are converted into three-phase equivalent input voltages; the three-phase equivalent input voltages pass through the ADC sampling module 102 and are scaled according to the actual DC bus voltage magnitude to obtain the true unfiltered ideal input three-phase voltages; the ideal input three-phase voltages are obtained after second-order low-pass filtering through the filtering module 103; through the inverter dead-time error voltage simulation and superposition module 104, the ideal input three-phase voltages are converted into actual three-phase input voltages with the nonlinear characteristics of the inverter dead-time and input into the permanent magnet synchronous motor model calculation module 105 for calculation and iteration. The three-phase currents and rotor positions of the next cycle are obtained, and then Gaussian white noise is superimposed through the noise superposition module 106 and output externally through the output module 107, which is read by the target motor controller to be tested, thus realizing a complete hardware-in-the-loop permanent magnet synchronous motor simulation process based on DSP considering the nonlinear dead-time characteristics of the inverter.
[0121] A hardware-in-the-loop permanent magnet synchronous motor simulator considering the dead-time characteristics of the inverter provided by the present invention can also cooperate with a computer-readable storage medium. A computer program is stored on the storage medium, and the computer program is executed to run a hardware-in-the-loop permanent magnet synchronous motor simulation method considering the dead-time characteristics of the inverter. The computer program can run computer instructions, and the computer instructions include computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc.
[0122] The computer-readable storage medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0123] It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0124] Figure 5 Shows a schematic structural diagram of a hardware-in-the-loop permanent magnet synchronous motor simulation system according to an embodiment of the present invention.
[0125] As Figure 5As shown in the figure, a hardware-in-the-loop simulation system for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter includes: a motor controller 2 to be tested and a hardware-in-the-loop simulator 1. Among them, the motor controller 2 to be tested outputs a PWM control signal after running the algorithms to be tested and verified, and receives the state variables of the permanent magnet synchronous motor fed back by the hardware-in-the-loop simulator 1. Specifically, after running the algorithms to be tested and verified, the motor controller 2 to be tested outputs six PWM waves. Among them, the three upper-bridge-arm PWM waves enter the hardware-in-the-loop simulator 1. After motor simulation and load simulation, the state variables of the permanent magnet synchronous motor are output and received by the motor controller 2 to be tested.
[0126] In one embodiment, the hardware-in-the-loop simulator 1 completes the simulation functions of a real motor and its load. The motor controller 2 to be tested and the hardware-in-the-loop simulator 1 jointly constitute a hardware-in-the-loop simulation and verification system based on DSP. The type of MCU chip of the motor controller 2 to be tested is not limited. It can be a DSP or an STM32, and mainly includes two on-chip peripherals, namely PWM and SPI.
[0127] In summary, the present invention provides a hardware-in-the-loop simulator, a hardware-in-the-loop simulation system, and a hardware-in-the-loop simulation method for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter. Compared with the prior art, it has the following advantages or beneficial effects:
[0128] (1) Improving the test efficiency: The hardware-in-the-loop simulator is used to simulate the power-stage characteristics of a permanent magnet synchronous motor and its inverter, effectively replacing the real permanent magnet synchronous motor and inverter to complete various performance tests of the motor driver. And the hardware-in-the-loop simulator outputs the phase current and rotor position of the motor by simulating the internal working mechanism of the permanent magnet synchronous motor and the simulation of power electronic devices such as inverters, effectively replacing the physical motor, loading equipment, test instruments, connection devices, etc. in the traditional motor test bench, simplifying the composition of the actual motor test system, making the structure of the permanent magnet synchronous motor driver test system simpler, lighter in weight, and smaller in volume, reducing the space requirement during the test, and improving the test efficiency of the permanent magnet synchronous motor driver.
[0129] (2) Simple and flexible configuration, and more adaptable: The hardware-in-the-loop simulator describes the dead-time characteristics of the motor and the inverter with a formulaic model. By changing the model parameters, it can simulate the parameter changes, working form changes, etc. of the motor and the inverter. It takes less configuration time, is simpler and more flexible, and has greater versatility and adaptability than the traditional motor driver test system;
[0130] (3) Safety and practicality: The hardware-in-the-loop simulator can easily simulate the dead-time characteristics of the motor and its inverter. Compared with the traditional motor driver test system, it will not cause damage to the motor and its load, making the fault test more safe and practical.
[0131] (4) Implementation based on DSP: Compared with the traditional hardware-in-the-loop simulation system based on FPGA, the hardware-in-the-loop simulation system based on DSP has lower costs, greatly reducing the test costs; and it is easy to program and has lower implementation difficulty.
[0132] (5) Considering the dead zone effect: By simulating the non-linear dead zone characteristics of the inverter, the power stage characteristics of the inverter are restored more realistically.
[0133] It should be understood that the embodiments disclosed in the present invention are not limited to the specific structures, processing steps or materials disclosed herein, but should extend to equivalent alternatives of these features understood by those of ordinary skill in the relevant art. It should also be understood that the terms used herein are only for the purpose of describing specific embodiments and do not imply limitation.
[0134] In the description of the present invention, unless otherwise specified, the meaning of "a plurality" is two or more; the orientation or positional relationships indicated by the terms "upper", "lower", "left", "right", "inner", "outer", "front end", "rear end", "head", "tail", etc. are based on the orientation or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0135] In the description of the present invention, it should be noted that unless otherwise clearly specified and defined, the terms "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood in specific situations.
[0136] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in connection with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" that appear throughout the specification do not necessarily all refer to the same embodiment.
[0137] The embodiments of the present invention are given for the purposes of illustration and description, and are not exhaustive or limit the present invention to the disclosed form. Many modifications and variations are obvious to those of ordinary skill in the art. The embodiments are chosen and described in order to better illustrate the principles of the present invention and its practical applications, and to enable those of ordinary skill in the art to understand the present invention and thus design various embodiments with various modifications suitable for specific purposes.
[0138] Although the embodiments disclosed in the present invention are as above, the content described is only an embodiment adopted for the convenience of understanding the present invention and is not intended to limit the present invention. Any person skilled in the art within the technical field to which the present invention pertains may make any modifications and changes in the form of implementation and details without departing from the spirit and scope disclosed in the present invention. However, the scope of patent protection of the present invention shall still be subject to the scope defined by the appended claims.
Claims
1. A hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, characterized in that, The hardware-in-the-loop simulator is implemented based on a DSP and is used to simulate the power stage characteristics of a permanent magnet synchronous motor and its inverter. It includes: A conditioning module, which is used to collect the three-phase upper-bridge-arm PWM control signals output by the motor controller to be measured and process them to obtain the true ideal input voltage; An inverter dead-time error voltage simulation and superposition module, which is used to convert the ideal input voltage into the actual three-phase input voltage with the non-linear characteristics of the inverter dead time; A permanent magnet synchronous motor model calculation module, which is used to calculate and iterate the actual three-phase input voltage to obtain the state variables of the permanent magnet synchronous motor; The conditioning module includes an input conditioning circuit, which, based on the three-phase upper-bridge-arm PWM control signals and combined with the actual inverter bus voltage, converts to obtain the actual three-phase equivalent input voltage. Among them, the input conditioning circuit includes: a first resistor, whose first end inputs the three-phase upper-bridge-arm PWM control signals; a first capacitor, whose first end is connected to the second end of the first resistor and the second end is connected to the digital ground; a rail-to-rail operational amplifier, whose non-inverting input terminal is connected to the second end of the first resistor; a second resistor, whose first end is connected to the inverting input terminal of the rail-to-rail operational amplifier and the second end is connected to the output terminal of the rail-to-rail operational amplifier; a second capacitor, whose first end is connected to the positive power supply terminal of the rail-to-rail operational amplifier and the second end is connected to the digital ground; The inverter dead-time error voltage simulation and superposition module calculates the actual three-phase input voltage through the following formula: U' a = ΔV a + U a U b ' = ΔV b + U b U c ' = ΔV c + U c Where, U' a , U b ', U c ' are the actual three-phase input voltages; ΔV a , ΔV b , ΔV c are the three-phase average disturbance voltages; U a , U b , U c are the ideal input voltages; The state variables of the permanent magnet synchronous motor include the three-phase current and the rotor position in the next cycle. The permanent magnet synchronous motor model calculation module includes: a first coordinate system conversion unit, which is used to convert the actual three-phase input voltage into the input voltage in the two-phase rotating d-q axis coordinate system; a d-q axis current update unit, which, based on the input voltage in the two-phase rotating d-q axis coordinate system, uses the voltage equation and the flux linkage equation of the permanent magnet synchronous motor in the two-phase rotating d-q axis coordinate system to obtain the updated d-q axis current; a rotor position update unit, which, based on the updated d-q axis current, uses the torque equation and the motion equation to obtain the updated rotor electrical angle as the rotor position; a second coordinate system conversion unit, which is used to convert the updated d-q axis current into the three-phase current in the three-phase stationary coordinate system as the three-phase current in the next cycle.
2. The hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter according to claim 1, wherein The conditioning module includes an ADC sampling module, which is connected to the input conditioning circuit and is used to proportionally amplify the three-phase equivalent input voltage according to the actual DC bus voltage to obtain the unfiltered ideal input voltage.
3. A hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter according to claim 2, characterized in that The conditioning module includes a filtering module, which is connected to the ADC sampling module and is used to perform second-order low-pass filtering on the unfiltered ideal input voltage to eliminate the noise caused by ADC sampling and obtain the ideal input voltage.
4. A hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, characterized in that, The three-phase average disturbance voltage is: Where, T a is the PWM cycle time; T d is the PWM dead time; T on , T off are the turn-on and turn-off delays; V on is the average conduction voltage drop of the switch and diode; V dc is the DC input voltage of the inverter; i a , i b , i c are the phase currents; sgn() is the sign function. The phase current is negative when flowing from the motor to the inverter and positive when flowing from the inverter to the motor.
5. A hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, characterized in that, The voltage equation of the permanent magnet synchronous motor in the two-phase rotating d-q axis coordinate system is: where u d , u q are the d-q axis input voltages in the two-phase rotating d-q axis coordinate system; i d , i q are the d-q axis currents in the two-phase rotating d-q axis coordinate system; L d , L q are the d-q axis inductances in the two-phase rotating d-q axis coordinate system; ψ d , ψ q are the d-q axis magnetic fluxes in the two-phase rotating d-q axis coordinate system; R s is the stator voltage; ω e is the rotor speed; ψ f is the rotor magnetic flux; The flux linkage equation is: The torque equation is: T e = n p (ψ f i q +(L d - L q )i d i q ) where, T e is the electromagnetic torque of the motor; n p is the number of pole pairs of the permanent magnet; The motion equation is: where T L is the motor load torque, J is the moment of inertia of the motor rotor and the mechanical load, B represents the damping coefficient; ω is the mechanical angular velocity of the motor; θ e is the electrical angular position of the rotor.
6. A hardware-in-the-loop simulator for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter according to any one of claims 1 to 5, characterized in that The hardware-in-the-loop simulator includes: A noise superposition module, which communicates with the permanent magnet synchronous motor model calculation module, is used to superpose Gaussian white noise on the basis of the permanent magnet synchronous motor state quantity to simulate various working condition noises and non-linear factors that may exist in the actual working conditions; An output module, which communicates with the noise superposition module, is used to output the permanent magnet synchronous motor state quantity with noise superposition in the form of a communication bus.
7. A semi-physical simulation method for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, characterized in that, Executed by the hardware-in-the-loop simulator according to any one of claims 1-6, the method includes the following steps: Collect the three-phase upper-bridge-arm PWM control signal without dead-time injection output by the motor controller of the target to be measured through the conditioning module, and process it to obtain the true ideal input voltage; Convert the ideal input voltage into the actual three-phase input voltage with the non-linear characteristics of the inverter dead zone through the inverter dead zone error voltage simulation superposition module; Perform calculation iteration on the actual three-phase input voltage through the permanent magnet synchronous motor model calculation module to obtain the permanent magnet synchronous motor state quantity.
8. A storage medium, characterized in that, It includes a series of instructions for executing the method steps according to claim 7.
9. A hardware-in-the-loop simulation system for a permanent magnet synchronous motor considering the dead-time characteristics of an inverter, characterized in that The simulation system includes: a motor controller of the target to be measured and the hardware-in-the-loop simulator according to any one of claims 1-6, wherein the motor controller of the target to be measured outputs a PWM control signal after running the algorithms to be tested and verified, and receives the permanent magnet synchronous motor state quantity fed back by the hardware-in-the-loop simulator.
Citation Information
Patent Citations
Parameter identification method of permanent magnet synchronous motor based on inverter nonlinear compensation
CN108183648A
Permanent magnet synchronous motor model prediction control method based on dead zone effect
CN108900119A