A motor simulation device and test system

Through a heterogeneous computing architecture that enables the main control module and the FPGA processing module to work together, high-precision motor state simulation is achieved, which solves the problem of high cost in existing technologies, reduces hardware requirements and improves dynamic response characteristics.

CN121978989BActive Publication Date: 2026-07-07SUZHOU YINGTEMO AUTOMOBILE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU YINGTEMO AUTOMOBILE TECH CO LTD
Filing Date
2026-04-07
Publication Date
2026-07-07

Smart Images

  • Figure CN121978989B_ABST
    Figure CN121978989B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a motor simulation device and a test system, and relates to the technical field of testing.In the motor simulation device, a signal conditioning module receives a three-phase voltage signal of a current moment output by a measured motor controller; a load adjustment module receives the three-phase voltage signal output by the measured motor controller to obtain a three-phase current signal of the current moment; a main control module pre-processes the three-phase voltage signal and the three-phase current signal sent by the signal conditioning module; an FPGA processing module determines motor simulation parameters of the simulated motor at a next moment; the main control module drives the load adjustment module to perform equivalent impedance simulation based on a target three-phase current signal; and the FPGA processing module outputs the motor simulation parameters to the measured motor controller, so that the measured motor controller adjusts the output three-phase voltage.The motor simulation device greatly reduces the requirement for hardware selection, and realizes controllable cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of testing technology, specifically to a motor simulation device and testing system. Background Technology

[0002] In the research and application of power-level motor simulators, their advantages, such as convenient testing, energy feedback to the grid, and ability to simulate extreme or fault conditions of motors, have led to their widespread use in testing motor drives in fields such as electric vehicles, aerospace, and wind power generation. Using DSP-based power-level motor simulators to replace traditional mechanical motor test benches is a cost-effective and simple approach.

[0003] However, in order to achieve high-precision simulation, some systems use a high-performance hardware platform based on DSP in conjunction with a high-speed analog-to-digital converter chip for signal acquisition and processing. In order to achieve an ultra-high-speed switching frequency to simulate the motor characteristics to the greatest extent, it is usually necessary to equip the system with equally high-end peripheral circuits, such as using high-power switching devices in parallel to achieve high-frequency current adjustment. This results in a high overall cost for motor simulators. Summary of the Invention

[0004] The purpose of this invention is to provide a motor simulation device and testing system, which uses a heterogeneous computing architecture with a main control module and an FPGA processing module working together. The main control module ensures the stability and reliability of the system and the control logic, while the FPGA processing module ensures the extreme speed and accuracy of algorithm execution, thereby achieving high-precision motor state simulation at a medium sampling rate. This greatly reduces the hardware selection requirements of the motor simulation device and makes the cost controllable.

[0005] To achieve the above objectives, the present invention provides a motor simulation device comprising: a main control module, an FPGA processing module, a load adjustment module, and a signal conditioning module; the main control module is communicatively connected to the FPGA processing module, the load adjustment module, and the signal conditioning module, respectively.

[0006] The signal conditioning module is used to receive the three-phase voltage signal at the current moment output by the controller of the motor under test;

[0007] The load adjustment module is used to receive the three-phase voltage signal output by the controller of the motor under test, obtain the three-phase current signal at the current moment, and have it sampled by the signal conditioning module;

[0008] The main control module is used to preprocess the three-phase voltage signal and the three-phase current signal sent by the signal conditioning module, and then send them to the FPGA processing module.

[0009] The FPGA processing module is used to determine the motor simulation parameters of the simulated motor at the next moment based on the received three-phase voltage signal, the three-phase current signal and the preset motor simulation model. The motor simulation parameters include: the target three-phase current signal and the encoder signal.

[0010] The main control module is also used to drive the load adjustment module to perform equivalent impedance simulation based on the target three-phase current signal, so that the three-phase voltage signal output by the motor controller under test becomes the target three-phase current signal after passing through the load adjustment module.

[0011] The FPGA processing module is used to output the motor simulation parameters to the motor controller under test, so that the motor controller under test can adjust the output three-phase voltage based on the target three-phase current signal and the encoder signal.

[0012] The present invention also provides a testing system, comprising: a controller for the motor under test and the aforementioned motor simulation device;

[0013] The motor under test controller is used to adjust the three-phase voltage output to the motor simulation device based on the motor simulation parameters received from the motor simulation device.

[0014] In one embodiment, the FPGA processing module is further configured to:

[0015] Based on the three-phase current signal and three-phase voltage signal of the previous moment, determine the ideal three-phase voltage signal at the current moment;

[0016] Based on the current three-phase voltage signal and the current ideal three-phase voltage signal, determine the composite error information at the current moment;

[0017] Based on the composite error information at the current moment, the composite error information at the previous moment, and the three-phase current signal and three-phase voltage signal at the previous moment, determine the current compensation gain parameters.

[0018] Based on the current compensation gain parameters and the composite error information at the current moment, determine the target three-phase voltage signal at the current moment;

[0019] The main control module is specifically used to drive the load adjustment module to perform equivalent impedance simulation based on the target three-phase current signal and the target three-phase voltage signal.

[0020] In one embodiment, the FPGA processing module is specifically used to: determine the reference three-phase voltage signal at the current moment based on the compensation gain parameter and composite error information at the current moment;

[0021] Based on the reference three-phase voltage signal at the current moment, the dead zone voltage compensation amplitude, and the temperature drift voltage compensation amplitude, the target three-phase voltage signal at the current moment is determined.

[0022] In one embodiment, the composite error information includes: an amplitude error component and a phase error component; the compensation gain parameter includes: an amplitude compensation gain and a phase compensation gain;

[0023] The formula for calculating the reference three-phase voltage signal at the current moment is as follows:

[0024] u comp [t]=u ref [t]+K a ×e a [t]+K p ×e p [t];

[0025] Among them, u comp [t] represents the reference three-phase voltage signal at the current time t, u ref [t] represents the initial reference voltage at time t, K a K represents the current amplitude compensation gain. p e represents the current phase compensation gain. a [t] represents the amplitude error component at the current time t, e p [t] represents the phase error component at the current time t.

[0026] In one embodiment, the load adjustment module includes: a switch drive circuit, a three-phase switch module, and a resistive-inductive network module;

[0027] The resistive inductance network module is connected to the motor controller under test, the three-phase switch module is connected to the switch drive circuit and the resistive inductance network module respectively, and the switch drive circuit is connected to the main control module;

[0028] The main control module is specifically used to generate a PWM drive signal based on the target three-phase current signal and send it to the switch drive circuit.

[0029] The switch driving circuit is used to control the switching of the MOS transistors in the three-phase switch module based on the PWM drive signal, so as to adjust the connection between the resistive inductance network module and the three-phase switch module, so that the three-phase voltage signal output by the motor controller under test becomes the target three-phase current signal after passing through the resistive inductance network module and the three-phase switch module.

[0030] In one embodiment, the preprocessing includes at least: zero-point correction and / or gain compensation.

[0031] In one embodiment, the main control module and the FPGA processing module communicate through two communication channels, which are based on a parallel data bus and an SPI bus, respectively.

[0032] The main control module is used to send the three-phase current signal and the three-phase voltage signal to the FPGA processing module through the parallel data bus;

[0033] The FPGA processing module is used to send the target three-phase current signal to the main control module via the SPI bus.

[0034] In one embodiment, the motor simulation device further includes: a clock generation module;

[0035] The clock generation module is used to generate a sampling clock and provide the sampling clock to the main control module and the FPGA processing module respectively.

[0036] In one embodiment, the motor simulation device further includes: a power management module;

[0037] The power management module is used to simultaneously power the main control module and the FPGA processing module. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the motor simulation device according to the first embodiment of the present invention;

[0039] Figure 2 This is a schematic diagram of the load adjustment module in the motor simulation device of the first embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of the A-phase voltage signal in the target three-phase voltage signal predicted by the FPGA processing module in the second embodiment of the present invention and the A-phase voltage signal in the actual collected three-phase voltage signal. Detailed Implementation

[0041] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings to provide a clearer understanding of the purpose, features, and advantages of the present invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of the present invention, but are merely illustrative of the essential spirit of the technical solution of the present invention.

[0042] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details. In other instances, well-known apparatuses, structures, and techniques associated with this application may not have been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.

[0043] Unless the context requires otherwise, throughout the specification and claims, the word “comprising” and its variations, such as “including” and “having”, shall be understood to have an open, inclusive meaning, that is, to be interpreted as “including, but not limited to”.

[0044] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.

[0045] The singular forms “a” and “” used in this specification and the appended claims include plural references unless otherwise expressly stated herein. It should be noted that the term “or” is generally used to mean “or / and” unless otherwise expressly stated herein.

[0046] In the following description, in order to clearly demonstrate the structure and working method of the present invention, a number of directional terms will be used. However, terms such as "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", and "down" should be understood as convenient terms and not as limiting terms.

[0047] The first embodiment of the present invention relates to a motor simulation device for simulating motors, capable of simulating motors and outputting motor simulation parameters at future times to test the controller of the motor under test; the motor is a common rotating device, such as a synchronous motor or an asynchronous motor.

[0048] Please refer to Figure 1 The motor simulation device 10 includes a main control module 1, an FPGA processing module 2, a load adjustment module 3, and a signal conditioning module 4. The main control module 1 is communicatively connected to the FPGA processing module 2, the load adjustment module 3, and the signal conditioning module 4. Additionally, the main control module 1, the load adjustment module 3, and the signal conditioning module 4 are also connected to an external motor controller 20 under test.

[0049] The load adjustment module 3 is used to receive the three-phase voltage signal output by the motor controller 20 under test, obtain the three-phase current signal at the current moment, and sample it by the signal conditioning module 4. Specifically, the three-phase voltage signal output by the motor controller 20 under test is converted into a three-phase current signal by the load adjustment module 3, and the signal conditioning module 4 can sample this three-phase current signal in real time.

[0050] The signal conditioning module 4 is used to receive the three-phase voltage signal at the current moment output by the motor controller 20 under test.

[0051] As can be seen, the signal conditioning module 4, as a front-end circuit for signal acquisition, acquires the three-phase current signal obtained by the load adjustment module 3 based on the three-phase voltage signal at the current moment, and the three-phase voltage signal at the current moment sent by the motor controller 20 under test.

[0052] The signal conditioning module 4 samples the three-phase current signal and three-phase voltage signal at the current moment according to a set frequency. For example, the signal conditioning module 4 includes a signal acquisition module, an active filter circuit, an amplifier circuit, and an ADC converter connected in sequence. The signal acquisition module can adopt a differential input structure and may further be configured with a protection circuit. The protection circuit uses bidirectional transient voltage suppression diodes and a resettable fuse to provide overvoltage and overcurrent protection. The three-phase current signal and three-phase voltage signal are input to the active filter circuit after passing through the protection circuit. The active filter circuit can be a Butterworth filter, thereby achieving low-frequency filtering and ensuring a flat amplitude-frequency characteristic within a 20kHz bandwidth. The three-phase current signal and three-phase voltage signal after passing through the active filter circuit are input to the amplifier circuit. The amplifier circuit can be an instrumentation amplifier, with a first stage of fixed gain amplification and a second stage of programmable gain amplification, with a gain range adjustable from 1 to 1000 times. The amplified three-phase current signal and three-phase voltage signal are input to the ADC converter, which performs signal sampling. The ADC converter, for example, uses a high-speed operational amplifier to ensure signal stability during the sampling and holding period.

[0053] Among them, the three-phase current signal represents the three sets of currents, phase A, phase B and phase C, input to the motor. They have the same frequency and a phase difference of 120°. The three-phase current signal and the three-phase voltage signal are output by the signal conditioning module 4 to two different input interfaces of the main control module 1 through two outputs.

[0054] The main control module 1 is used to preprocess the three-phase voltage signal and the three-phase current signal sent by the signal conditioning module 4 at the current moment, and then send them to the FPGA processing module 2 after preprocessing. The main control module 1 can be a high-performance 32-bit processor with a built-in timer unit, communication interface controller, and digital I / O management unit, enabling efficient management of system tasks and synchronous control between multiple devices. The main control module 1 receives the motor control signal sent by the ADC converter of the signal conditioning module 4, preprocesses the three-phase current signal in the motor control signal, and sends the preprocessed three-phase current signal and three-phase voltage signal to the FPGA processing module 2; the preprocessing includes at least zero-point correction and / or gain compensation.

[0055] The FPGA processing module 2 is used to determine the motor simulation parameters of the simulated motor at the next moment based on the received three-phase voltage signal, the three-phase current signal, and a preset motor simulation model. The motor simulation parameters include the target three-phase current signal and the encoder signal. The FPGA processing module 2 integrates multiple parallel processing units, a high-speed memory, and a precise clock management circuit. The high-speed memory contains a preset motor simulation model. Therefore, the FPGA processing module 2 can input the three-phase current signal and the three-phase voltage signal into the motor simulation model, and the motor simulation model outputs the motor simulation parameters for the next moment. The motor simulation parameters include the target three-phase current signal, which represents the state the motor should be in at the next moment after the received three-phase voltage signal and three-phase current signal are input to the motor; that is, the three-phase current signal that the motor should receive at the next moment.

[0056] For example, the preset motor simulation model in FPGA processing module 2 is based on the physical equation of a permanent magnet synchronous motor. The input of the physical equation includes the three-phase current signal and the three-phase voltage signal at the current moment, and the output is the target three-phase current at the next moment. It may also include the encoder signal of the motor, which indicates the output torque, position and speed of the simulated motor under the input of the current three-phase current signal and the three-phase voltage signal.

[0057] Specifically, the continuous-time model of the simulated permanent magnet synchronous motor in the rotating coordinate system is as follows:

[0058] ;

[0059] Among them, i s (t) represents the state variable, which includes the direct axis component and the quadrature axis component, u s (t) represents the voltage component corresponding to the three-phase voltage signal; A cThis represents the preset system matrix parameters, which include the resistance, inductance, and speed-related dynamic characteristics of the simulated motor; B c This represents a preset input matrix that reflects the direct influence of three-phase voltage on three-phase current variations. c This represents a preset constant term, which characterizes the back electromotive force effect generated by the permanent magnet of the simulated motor.

[0060] State variable i s The method for obtaining (t) is as follows: the three-phase voltage signal is successively transformed by Clark transformation and Park transformation, and is converted into orthogonal direct axis (d-axis) components i in a rotating coordinate system. d With the intersection axis (q-axis) component i q d-axis component i d The q-axis component corresponds to the excitation current and is used to control the magnetic flux; the q-axis component corresponds to the torque current and is used to control the torque.

[0061] Three-phase voltage signal converted into direct-axis (d-axis) component i d With the intersection axis (q-axis) component i q The transformation formula is as follows:

[0062] ;

[0063] Among them, i d Represents the direct axis component, i q Indicates the cross-axis component, i a The A-phase current, i, represents the three-phase current signal. b The B-phase current, i, represents the three-phase current signal. c Let C represent the three-phase current signal, and θ represent the angle between the three-phase current signal and the rotating coordinate system.

[0064] This transformation converts the three-phase voltage signal in the stationary coordinate system into the direct axis (d-axis) component and the quadrature axis (q-axis) component in the rotating coordinate system, which are then input into the motor simulation model.

[0065] The motor simulation model includes two coupled sub-models: an electrical sub-model and a mechanical sub-model. The electrical sub-model is used to simulate the electromagnetic characteristics of the motor stator winding, including resistance voltage drop, inductance effect and back EMF generation. The resistance term reflects the ohmic loss of the conductor, the inductance term characterizes the energy storage characteristics of the magnetic field, and the back EMF term reflects the relative motion between the rotor permanent magnet and the stator winding.

[0066] The mechanical sub-model is used to simulate the motion characteristics of the rotor, including the effects of inertia, friction, and load torque. Its state equation can be expressed as:

[0067] ;

[0068] Where, ω mθ represents the electric angular velocity of the simulated motor. m T represents the electrical angle of the simulated motor. e The electromagnetic torque of the simulated motor, T, can be calculated from the current state. f T represents the frictional torque of the simulated motor. L T represents the load torque of the simulated motor. f With T L The resistance torque of the mechanical system is formed by J, which represents the moment of inertia of the simulated motor and determines the acceleration capability of the simulated motor system.

[0069] The state equations of a continuous-time model of a permanent magnet synchronous motor in a rotating coordinate system can be solved using a high-order numerical integration method. The state variables at the next moment can be calculated based on the input state variables at the current moment and the voltage components of the three-phase voltage.

[0070] Specifically, within each sampling period, the state equations of the continuous-time model are first discretized using the Runge-Kutta method, resulting in:

[0071] i s (t+1)=i s (t) + T s (A) c i s (t) + B c u s (t) + g c );

[0072] Among them, i s (t) represents the state variable within the current sampling period, i s (t+1) represents the predicted state variables for the next sampling period, T s This indicates the preset sampling period, for example, 16kHz; u s (t) represents the voltage component corresponding to the three-phase voltage signal in the current sampling period; A c B represents the preset system matrix parameters; c G represents the preset input matrix. c This represents a preset constant term.

[0073] Based on the above, at a fixed sampling frequency of 16kHz, the feedforward compensation mechanism of the motor simulation model is used to perform real-time forward prediction calculations using the motor simulation model within the FPGA processing module 2. Within each sampling period, the current state variable i can be used to perform the calculations. s (t) and u sThe input (t) is used to quickly generate a high-resolution ideal voltage waveform through the state equation of the discretized continuous-time model, which is to obtain the state variable at the next moment. The state variable at the next moment can be converted into the three-phase voltage signal at the next moment (i.e., the ideal three-phase voltage signal). Based on the ideal three-phase voltage signal, the three-phase current signal at the next moment can be obtained, which is the target three-phase current signal.

[0074] Based on the target three-phase current signal and combined with the state equation of the mechanical subsystem mentioned above, the motion state of the simulated motor under the input of the target three-phase current signal can be calculated, and the encoder signal of the simulated motor can be obtained.

[0075] In FPGA processing module 2, the electrical sub-model, mechanical sub-model, and state equation solution can be performed simultaneously by multiple parallel processing units, ensuring the real-time performance of FPGA processing module 2.

[0076] The FPGA processing module 2 is also used to output the motor simulation parameters, composed of the target three-phase current signal and the encoder signal, to the motor under test controller 20. Specifically, in each sampling period, after acquiring the motor simulation parameters for the next moment, the FPGA processing module 2 sends the motor simulation parameters to the motor under test controller 20, and the motor under test controller 20 adjusts the output three-phase voltage based on the target three-phase current signal and the encoder signal.

[0077] As can be seen from the above, the above process completes one cycle. Repeating the above process can realize the cyclic test of the motor controller 20 under test.

[0078] Furthermore, the motor simulation device 10 also includes a power management module 5, which is electrically connected to the main control module 1 and the FPGA processing module 2 respectively.

[0079] The power management module 5 is used to simultaneously power the main control module 1 and the FPGA processing module 2. The power management module 5 can be connected to an external power supply, or it may include a battery module to power both the main control module 1 and the FPGA processing module 2.

[0080] The power management module 5 can adopt a multi-stage voltage regulation and noise suppression design to provide stable power supply to the main control module 1 and the FPGA processing module 2, thereby reducing the impact of power supply noise on sampling and control accuracy from the source.

[0081] Furthermore, the motor simulation device 10 also includes a clock generation module 6, which is connected to the main control module 1 and the FPGA processing module 2 respectively.

[0082] The clock generation module 6 is used to generate a sampling clock and provide the sampling clock to the main control module 1 and the FPGA processing module 2 respectively, so that the main control module 1 and the FPGA processing module 2 work synchronously; wherein, the sampling clock is, for example, a 16kHz clock signal, which can use a temperature-compensated crystal oscillator with a frequency stability of ±5ppm.

[0083] In one example, the main control module 1 and the FPGA processing module 2 communicate through two communication channels, which are based on a parallel data bus and an SPI bus, respectively.

[0084] The main control module 1 is used to send the three-phase current signal and the three-phase voltage signal to the FPGA processing module 2 through the parallel data bus;

[0085] The FPGA processing module 2 is used to send the target three-phase current signal to the main control module 1 via the SPI bus.

[0086] As described above, the main control module 1 and the FPGA processing module 2 transmit the three-phase current signal and the three-phase voltage signal, which have a large amount of data, through a parallel data bus, while the target three-phase current signal is transmitted through a high-speed SPI bus, thereby ensuring the stability of data interaction and transmission efficiency.

[0087] The interface circuit between the main control module 1 and the FPGA processing module 2 can be configured with signal buffering, level conversion and timing synchronization circuits to ensure the reliability of data transmission.

[0088] The main control module 1 is also used to drive the load adjustment module to perform equivalent impedance simulation based on the target three-phase current signal, so that the three-phase voltage signal output by the motor controller under test becomes the target three-phase current signal after passing through the load adjustment module.

[0089] Please refer to Figure 2 The load adjustment module 3 is the core load simulation module of the motor simulation device, which includes: a switch drive circuit 31, a three-phase switch module 32, and a resistive-inductive network module 33.

[0090] The resistive inductance network module 33 is connected to the motor controller 20 under test, the three-phase switch module 32 is connected to the switch drive circuit 31 and the resistive inductance network module 33 respectively, and the switch drive circuit 31 is connected to the main control module 1;

[0091] The main control module 1 is specifically used to generate a PWM drive signal based on the target three-phase current signal and send it to the switch drive circuit 31;

[0092] The switch drive circuit 31 is used to control the switching of the MOS transistor in the three-phase switch module 32 based on the PWM drive signal, so as to adjust the connection between the resistive inductance network module 33 and the three-phase switch module 32, so that the three-phase voltage signal output by the motor controller 20 under test is converted into the target three-phase current signal after passing through the resistive inductance network module 33 and the three-phase switch module 31.

[0093] In other words, by controlling the on / off state of the MOS transistors in the three-phase switch module 32, the resistors and inductors connected to the resistive-inductive network module 33 are controlled, thereby realizing the adjustment of the collected three-phase current signals.

[0094] For example, please refer to Figure 2 The three-phase switch module 32 includes: a three-phase bridge arm composed of six MOSFETs, denoted as MOS1 to MOS6, with one MOSFET in each upper and lower bridge arm of each phase. A freewheeling diode is connected in parallel across the two ends of each MOSFET. Furthermore, a capacitor C1 is connected between the MOSFETs in the upper and lower bridge arms of each phase to protect the MOSFETs. For example, the MOSFETs are P-channel MOSFETs.

[0095] The switch drive circuit 31 is, for example, an integrated drive circuit, which is connected to the gate of each MOS transistor. It drives each MOS transistor to switch at high frequency to adjust the equivalent impedance. Furthermore, it can convert three-phase AC power into DC power to achieve energy recovery.

[0096] The resistive-inductive network module 33 includes three identical series resistors R1 and inductors L1. One end of each resistor R1 is connected to one of the three phases of the three-phase voltage signal, and the other end of each resistor R1 is connected to the connection point between the upper and lower bridge arms of each phase through inductors L1. The other end of each resistor R1 is also connected to the signal conditioning module 4 through inductors L1.

[0097] Based on the magnitude of the current in each phase of the target three-phase current signal, the main control module 1 generates a PWM drive signal to control the switching of the MOSFETs of the upper and lower bridge arms of the corresponding phase bridge arm, and sends the PWM drive signal to the switch drive circuit 31. The switch drive circuit 31 then outputs a corresponding control signal to the gate of each MOSFET, thereby controlling the on and off of each MOSFET, and adjusting the magnitude of the three-phase current signal formed by the three-phase voltage signal output by the motor controller 20 and the three resistors R1 and L1. Thus, the signal conditioning module 4 can acquire the changing three-phase current signal in real time.

[0098] In this embodiment, a heterogeneous computing architecture is used, with a main control module and an FPGA processing module working collaboratively. The FPGA processing module, as the high-performance computing core, relies on its parallel processing capabilities to specifically handle time-critical tasks, including running motor simulation models based on state-space equations, achieving nanosecond-level motor state prediction and solution. The main control module serves as the control center of the motor simulation device, responsible for overall task scheduling and communication with the FPGA processing module. The two interact via a parallel data bus and an SPI bus, working closely together within a clock cycle. The main control module ensures the stability and reliability of the system and the control logic, while the FPGA processing module guarantees the extreme speed and accuracy of algorithm execution, thus achieving high-precision motor state simulation at a moderate sampling rate. This significantly reduces the hardware selection requirements for the motor simulation device, making costs controllable.

[0099] The second embodiment of this application provides a motor simulation device. Compared with the first embodiment, this embodiment adds a current signal compensation mechanism to the FPGA processing module.

[0100] The motor simulation device in this embodiment is as follows: Figure 1 As shown.

[0101] The FPGA processing module 2 is also used for:

[0102] Based on the three-phase current signal and three-phase voltage signal of the previous moment, determine the ideal three-phase voltage signal at the current moment;

[0103] Based on the current three-phase voltage signal and the current ideal three-phase voltage signal, determine the composite error information at the current moment;

[0104] Based on the composite error information at the current moment, the composite error information at the previous moment, and the three-phase current signal and three-phase voltage signal at the previous moment, determine the current compensation gain parameters.

[0105] Based on the current compensation gain parameters and the composite error information at the current moment, determine the target three-phase voltage signal at the current moment;

[0106] The main control module 1 is specifically used to drive the load adjustment module to perform equivalent impedance simulation based on the target three-phase current signal and the target three-phase voltage signal.

[0107] Furthermore, the FPGA processing module is specifically used to: determine the reference three-phase voltage signal at the current moment based on the compensation gain parameter and composite error information at the current moment;

[0108] Based on the reference three-phase voltage signal at the current moment, the dead zone voltage compensation amplitude, and the temperature drift voltage compensation amplitude, the target three-phase voltage signal at the current moment is determined.

[0109] Based on the analysis in the first embodiment, it is known that the target three-phase voltage signal for the next sampling period is predicted in each sampling period. Therefore, after obtaining the three-phase voltage signal at the current moment, the three-phase voltage signal at the current moment is compared with the ideal three-phase voltage signal predicted at the previous moment, so as to determine the composite error information at the current moment, which includes amplitude error component and phase error component.

[0110] The expression for the composite error information e[t] is:

[0111] e[t]=u actual (t)-u model (t);

[0112] Among them, u model (t) represents the ideal three-phase voltage signal at the current moment, u actual (t) represents the three-phase voltage signal (actual three-phase voltage signal) collected at the current moment.

[0113] Subsequently, the compensation gain parameter is adjusted based on the composite error information e[t] at the current moment. Specifically, the compensation gain parameter can be optimized in real time using a recursive least squares algorithm. This algorithm adjusts the compensation gain parameter by minimizing the sum of squared errors, and the determined compensation gain parameter θ at the current moment is... comp The expression for [t] is:

[0114] θ comp [t]=θ comp [t-1]+K[t](e[t]-

[0115] Where, θ comp [t-1] represents the compensation gain parameter of the previous time step, and K[t] represents the gain matrix of the recursive least squares algorithm at the current time step, which determines the weight of the error in updating the compensation gain parameter. [t] represents the three-phase voltage, three-phase current, and error signal at the previous moment.

[0116] Compensation gain parameter θ comp [t] includes: amplitude compensation gain K a With phase compensation gain K p The composite error information includes the amplitude error component e. a [t] and phase error component e p [t]; Therefore, based on the compensation gain parameters and composite error information at the current moment, the reference three-phase voltage signal at the current moment can be determined.

[0117] The formula for calculating the reference three-phase voltage signal at the current moment is as follows:

[0118] u comp [t]=u ref [t]+K a ×e a [t]+K p ×e p [t];

[0119] Among them, u comp [t] represents the reference three-phase voltage signal at the current time t, u ref [t] represents the initial reference voltage at time t, K a K represents the current amplitude compensation gain. p e represents the current phase compensation gain. a [t] represents the amplitude error component at the current time t, e p [t] represents the phase error component at the current time t.

[0120] Based on the reference three-phase voltage signal, dead zone voltage compensation amplitude, and temperature drift voltage compensation amplitude at the current moment, the target three-phase voltage signal at the current moment is determined.

[0121] The target three-phase voltage signal U at the current moment comp The expression is as follows:

[0122] U comp =U term +ΔU deadtime +ΔU temperature ;

[0123] Among them, U term Indicates the reference three-phase voltage signal, ΔU deadtime This represents the dead-zone voltage compensation amplitude, which is dynamically calculated based on the polarity of the three-phase current signals; ΔU temperature This represents the voltage compensation amplitude for temperature drift, which is obtained based on the readings of an analog temperature sensor to correct parameter drift.

[0124] Regarding the dead-zone voltage compensation amplitude, the FPGA processing module 2 determines the current current polarity based on the current three-phase current signal, and then determines the dead-zone voltage compensation amplitude based on the current current polarity; thus, the amplitude compensation value can be dynamically adjusted according to the input three-phase current polarity, which can correct the nonlinear error caused by the dead-zone effect.

[0125] For the temperature drift voltage compensation amplitude, the FPGA processing module 2 also has a preset motor temperature simulation model. Its input is the current encoder signal. The motor temperature simulation model can simulate the temperature of the motor under the current encoder signal indication motor state. The motor temperature simulation model will output the current motor temperature value. Then the FPGA processing module 2 can determine the temperature drift compensation amplitude based on the current motor temperature value. This can correct the nonlinear error caused by temperature drift compensation.

[0126] After dead zone compensation and temperature drift compensation, the total harmonic distortion of the final target current signal can be reduced from 15% to below 2%.

[0127] As described above, FPGA processing module 2 can achieve error compensation, dynamically adjusting the compensation amount in real time using an adaptive algorithm to address changing environmental factors and operating conditions. It can also perform real-time correction and compensation of the obtained real current signal in the digital domain, effectively offsetting distortions introduced by analog paths (such as gain error and offset) and inverter nonlinearities (such as dead zone and tube voltage drop). Therefore, the front-end signal conditioning module does not need to pursue extreme native accuracy; a mature and stable industrial-grade circuit design is sufficient. This significantly reduces the design difficulty and cost of the front-end signal acquisition circuit analog hardware, and improves the long-term stability of the motor simulation device.

[0128] It is evident that, without relying on ultra-high switching frequencies and high-power parallel devices, precise timing control and real-time algorithm compensation effectively suppress waveform distortion, achieving high-precision motor simulation under medium-frequency sampling conditions.

[0129] It should be noted that in some scenarios, the reference three-phase voltage signal can be directly used as the target three-phase voltage signal.

[0130] After determining the target three-phase voltage signal after compensation, the control module 1 can correct the target three-phase current signal based on the target three-phase voltage signal to obtain the final three-phase current signal. Then, based on the final three-phase current signal, a PWM drive signal is generated and sent to the switching drive circuit in the load adjustment module 3.

[0131] In this embodiment, active predictive compensation effectively eliminates signal reconstruction distortion caused by sampling frequency limitations, improving the effective resolution of the motor simulation device to the level of an equivalent 200kHz sampling system. At the same time, while maintaining moderate hardware costs, it significantly improves dynamic response characteristics. The compensated control signal not only accurately tracks the desired trajectory but also has strong robustness to parameter changes and external disturbances.

[0132] For example, please refer to Figure 3The diagram shows the A-phase voltage signal in the target three-phase voltage signal predicted by FPGA processing module 2 at the current moment, the actual A-phase voltage signal collected by signal conditioning module 4 at the current moment, and the A-phase voltage signal to be collected by signal conditioning module 4 in the next sampling cycle. It can be seen that the target three-phase voltage signal predicted by FPGA processing module 2 and the actual three-phase voltage signal collected by signal conditioning module 4 have a high degree of consistency.

[0133] The third embodiment of the present invention relates to a testing system for testing a motor controller under test. Please refer to... Figure 1 The testing system includes: a motor controller 20 under test and a motor simulation device 10 in the first or second embodiment. In some scenarios, it may also include a host computer, which can configure parameters and control the motor controller 20 under test and / or the motor simulation device 10.

[0134] The motor under test controller 20 is used to adjust the three-phase voltage output to the motor simulation device 10 based on the motor simulation parameters received from the motor simulation device 10.

[0135] Since the first and second embodiments correspond to this embodiment, this embodiment can be implemented in conjunction with the first and second embodiments. The relevant technical details mentioned in the first and second embodiments remain valid in this embodiment, and the technical effects achievable in the first and second embodiments can also be realized in this embodiment. To reduce repetition, they will not be repeated here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the first and second embodiments.

[0136] The preferred embodiments of the present invention have been described in detail above, but it should be understood that, if necessary, aspects of the embodiments can be modified to utilize aspects, features, and concepts from various patents, applications, and publications to provide other embodiments.

[0137] In light of the detailed description above, these and other changes can be made to the embodiments. Generally, the terminology used in the claims should not be considered limited to the specific embodiments disclosed in the specification and claims, but should be understood to include all possible embodiments together with the full scope of equivalents enjoyed by these claims.

Claims

1. A motor simulation device, characterized in that, It includes: a main control module, an FPGA processing module, a load adjustment module, and a signal conditioning module; the main control module is communicatively connected to the FPGA processing module, the load adjustment module, and the signal conditioning module, respectively. The signal conditioning module is used to receive the three-phase voltage signal at the current moment output by the controller of the motor under test; The load adjustment module is used to receive the three-phase voltage signal output by the controller of the motor under test, obtain the three-phase current signal at the current moment, and have it sampled by the signal conditioning module; The main control module is used to preprocess the three-phase voltage signal and the three-phase current signal sent by the signal conditioning module, and then send them to the FPGA processing module. The FPGA processing module is used to determine the motor simulation parameters of the simulated motor at the next moment based on the received three-phase voltage signal, the three-phase current signal and the preset motor simulation model. The motor simulation parameters include: the target three-phase current signal and the encoder signal. The FPGA processing module is also used for: Based on the three-phase current signal and three-phase voltage signal of the previous moment, determine the ideal three-phase voltage signal at the current moment; Based on the current three-phase voltage signal and the current ideal three-phase voltage signal, determine the composite error information at the current moment; The current compensation gain parameter is determined based on the following formula: θ comp [t]=θ comp [t-1]+K[t](e[t]- Where, θ comp [t] represents the compensation gain parameter at the current time, e[t] represents the composite error information at the current time, and θ comp [t-1] represents the compensation gain parameter of the previous time step, and K[t] represents the gain matrix of the recursive least squares algorithm at the current time step; [t] represents the three-phase voltage, three-phase current, and composite error information of the previous moment; Based on the current compensation gain parameters and the composite error information at the current moment, the target three-phase voltage signal at the current moment is determined, including: based on the current compensation gain parameters and composite error information, the reference three-phase voltage signal at the current moment is determined; based on the reference three-phase voltage signal at the current moment, the dead zone voltage compensation amplitude, and the temperature drift voltage compensation amplitude, the target three-phase voltage signal at the current moment is determined. The composite error information includes: amplitude error component and phase error component; the compensation gain parameter includes: amplitude compensation gain and phase compensation gain. The formula for calculating the reference three-phase voltage signal at the current moment is as follows: u comp [t]=u ref [t]+K a ×e a [t]+K p ×e p [t]; Among them, u comp [t] represents the reference three-phase voltage signal at the current time t, u ref [t] represents the initial reference voltage at time t, K a K represents the current amplitude compensation gain. p e represents the current phase compensation gain. a [t] represents the amplitude error component at the current time t, e p [t] represents the phase error component at the current time t; The main control module is also used to drive the load adjustment module to perform equivalent impedance simulation based on the target three-phase current signal and the target three-phase voltage signal, so that the three-phase voltage signal output by the motor controller under test becomes the target three-phase current signal after passing through the load adjustment module; The FPGA processing module is used to output the motor simulation parameters to the motor controller under test, so that the motor controller under test can adjust the output three-phase voltage based on the target three-phase current signal and the encoder signal.

2. The motor simulation device according to claim 1, characterized in that, The load adjustment module includes: a switch drive circuit, a three-phase switch module, and a resistive-inductive network module; The resistive inductance network module is connected to the motor controller under test, the three-phase switch module is connected to the switch drive circuit and the resistive inductance network module respectively, and the switch drive circuit is connected to the main control module; The main control module is specifically used to generate a PWM drive signal based on the target three-phase current signal and send it to the switch drive circuit. The switch driving circuit is used to control the switching of the MOS transistors in the three-phase switch module based on the PWM drive signal, so as to adjust the connection between the resistive inductance network module and the three-phase switch module, so that the three-phase voltage signal output by the motor controller under test becomes the target three-phase current signal after passing through the resistive inductance network module and the three-phase switch module.

3. The motor simulation device according to claim 1, characterized in that, The preprocessing includes at least: zero-point correction and / or gain compensation.

4. The motor simulation device according to claim 1, characterized in that, The main control module and the FPGA processing module communicate through two communication channels, which are based on a parallel data bus and an SPI bus, respectively. The main control module is used to send the three-phase current signal and the three-phase voltage signal to the FPGA processing module through the parallel data bus; The FPGA processing module is used to send the target three-phase current signal to the main control module via the SPI bus.

5. The motor simulation device according to claim 1, characterized in that, The motor simulation device also includes: a clock generation module; The clock generation module is used to generate a sampling clock and provide the sampling clock to the main control module and the FPGA processing module respectively.

6. The motor simulation device according to claim 1, characterized in that, The motor simulation device also includes: a power management module; The power management module is used to simultaneously power the main control module and the FPGA processing module.

7. A testing system, characterized in that, include: The motor controller under test and the motor simulation device according to any one of claims 1 to 6; The motor under test controller is used to adjust the three-phase voltage output to the motor simulation device based on the motor simulation parameters received from the motor simulation device.