New energy automobile motor controller HiL test method and system

By obtaining environmental data and vehicle operating conditions, using Transformer model and multiple motor models for scene simulation, the limitations of the existing motor controller HIL testing methods are solved, and accurate testing and comprehensive verification of motor controller performance are achieved.

CN120234952APending Publication Date: 2025-07-01SHANGHAI VEHINFO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510284605.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The existing HIL testing methods for motor controllers have limitations in operating conditions, making it difficult to reproduce complex and changeable actual scenarios, lack of signal processing and data analysis capabilities, weak automation and adaptive adjustment capabilities, resulting in insufficient performance verification of motor controllers and lack of accurate basis for optimization design.

Method used

By obtaining the voxel characteristics and vehicle operating conditions of the environment data, the Transformer model is used for scene simulation, and a permanent magnet synchronous motor, load, rotation transformer, three-phase inverter and CAN communication model is built, and the difference in the current signal of the motor dq axis is calculated to generate a test signal and sent to the motor controller.

Benefits of technology

It improves the accuracy and authenticity of the test environment, realizes accurate testing of the performance of the motor controller, and enhances the comprehensiveness and accuracy of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234952A_ABST
    Figure CN120234952A_ABST
Patent Text Reader

Abstract

The invention discloses a new energy automobile motor controller HiL test method and system, and the method comprises the steps: obtaining environment data needing to be simulated, and carrying out the preprocessing of the environment data, so as to obtain the voxel features of the environment data; obtaining an automobile working condition needing to be simulated, and inputting the voxel features and the automobile working condition into the trained Transform model to complete a scene simulation task; collecting a motor dq-axis current signal generated by the constructed motor model, calculating a difference value between the motor dq-axis current signal and a preset motor dq-axis current signal, and generating a motor test signal according to the difference value; and sending the motor test signal to a motor controller. According to the new energy automobile motor controller HiL test method and system, the accuracy and authenticity of the test environment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of new energy vehicle testing, and in particular to a new energy vehicle motor controller HiL testing method and system. Background Art

[0002] As the automotive industry accelerates towards electrification and intelligence, the performance of the motor controller, as a key core component of the automotive electric powertrain, is directly related to the power, economy and reliability of the vehicle. However, the existing motor controller HIL test faces many severe challenges. On the one hand, traditional test methods have great limitations in operating condition simulation. Most of them can only rely on simple preset rules to generate conventional driving conditions, and it is difficult to accurately reproduce the complex, changeable and extreme scenarios in the real world, such as low-temperature starting in high-cold areas, thin air operation in high-altitude areas, frequent start-stop and acceleration and deceleration under urban congested road conditions, etc., resulting in the adaptability and reliability of the motor controller in actual complex environments cannot be fully verified; on the other hand, in the signal processing and data analysis links, due to the lack of efficient and intelligent algorithm support, facing the massive and high-dimensional motor operation data and controller input and output signals, traditional methods are difficult to quickly and accurately extract key features and explore potential fault modes, and cannot provide accurate and powerful basis for the optimization design of the controller. Furthermore, the existing test systems have weak automation and adaptive adjustment capabilities, and often rely on manual experience and judgment to advance and optimize the test process. This is not only inefficient, but also prone to human errors, which seriously hinders the R&D and iteration speed of automotive motor controllers and makes it difficult to meet the needs of the rapid development of the modern automotive industry. Summary of the invention

[0003] In order to solve the technical problems existing in the background technology, the present invention proposes a HiL test method and system for a motor controller of a new energy vehicle.

[0004] The present invention proposes a HiL test method for a new energy vehicle motor controller, comprising: Acquire environmental data to be simulated, and pre-process the environmental data to obtain voxel features of the environmental data; Obtain the vehicle operating conditions that need to be simulated, and input the voxel features and vehicle operating conditions into the trained Transformer model to complete the scenario simulation task; Collect the motor dq axis current signal generated by the constructed motor model, calculate the difference between the motor dq axis current signal and the preset motor dq axis current signal, and generate a motor test signal according to the difference; Sends motor test signals to the motor controller.

[0005] Preferably, the environmental data includes but is not limited to external environmental temperature, average battery temperature, and motor temperature; the preprocessing specifically includes: Extract the first voxel features for each piece of environmental data one by one; After unifying the feature dimensions and resolutions of the extracted multiple first voxel features, perform feature fusion to obtain the voxel features corresponding to the environmental data.

[0006] Preferably, the vehicle operating conditions include but are not limited to idling, low-speed driving, high-speed driving, rapid acceleration, and rapid braking; the training process of the Transformer model specifically includes: Obtain a sample data set for training the Transformer model, where the sample data set includes multiple vehicle operating conditions and multiple voxel features, and each voxel feature corresponds to a set of environmental data; Set relevant Transformer network parameters, and split the sample data set according to a preset strategy to form a training set, a test set, and a validation data set; Use the vehicle operating conditions and voxel features as input features and a set of environmental data as the target variable to input into the Transformer network for model training to obtain the Transformer model; Adjust the Transformer network parameters according to the training results until the obtained training results are within the preset error range to obtain the trained Transformer model.

[0007] Preferably, the preset strategy specifically includes: using 70% of the sample data set as the training set, 20% of the sample data set as the test set, and 10% of the sample data set as the validation data set.

[0008] Preferably, the construction process of the motor model specifically includes: Build a permanent magnet synchronous motor model and compile the permanent magnet synchronous motor model into the HIL test device; Build a load model and compile the load model into the HIL test device; Build a resolver model and compile the resolver model into the HIL test device; Build a three-phase inverter model and compile the physical model of the three-phase inverter into the HIL test device; Build a CAN communication model, compile the CAN communication model into the HIL test device, obtain the motor controller feedback signal, compare the motor controller feedback signal with the preset feedback signal, and if the difference does not exceed the preset reference value, it is considered to meet the expectation and continue to load the three-phase inverter model, otherwise send an alarm message.

[0009] Preferably, building a three-phase inverter model and compiling the three-phase inverter model into the HIL test device includes: The three-phase inverter receives the PWM control signal from the slave board and detects whether the bridge arm is conducting; If the bridge arm is conducting, it detects whether it is conducting in the forward direction. If it is detected that the bridge arm is conducting in the forward direction, it calculates the control phase voltage, current, and internal resistance during forward conduction; If it is detected that the bridge arm is not conducting or the bridge arm is conducting in the negative direction, it calculates the control phase voltage, current, and internal resistance when not conducting and the control phase voltage, current, and internal resistance when conducting in the negative direction, respectively; Outputs the calculated values of voltage, current, and internal resistance to the motor model to construct a three-phase inverter model; Compiles the three-phase inverter model into the HIL test equipment.

[0010] Preferably, the construction of the permanent magnet synchronous motor model specifically includes: Constructs a permanent magnet synchronous motor model based on the voltage equation, electromagnetic torque equation, and back electromotive force equation; The voltage equation is specifically: ; The electromagnetic torque equation is specifically: ; The back electromotive force equation is specifically: ; Where, R is the stator resistance; d-axis equivalent inductance; q-axis equivalent inductance; rotor electrical angular velocity; rotor permanent magnet flux linkage; p is the number of pole pairs of the motor.

[0011] Preferably, the construction process of the load model specifically includes: Constructs a load model based on the motion equation; The motion equation is specifically: ; Where, J is the inertia of the motor and the load; B is the friction coefficient.

[0012] A HiL test method for a new energy vehicle motor controller proposed by the present invention includes: A data acquisition module, which is used to acquire the environmental data to be simulated and preprocess the environmental data to obtain the voxel features of the environmental data; A first processing module, which is used to acquire the vehicle working conditions to be simulated, and input the voxel features and vehicle working conditions into the trained Transformer model to complete the scene simulation task; A second processing module, which is used to collect the motor dq-axis current signals generated by the constructed motor model, calculate the difference between the motor dq-axis current signals and the preset motor dq-axis current signals, and generate a motor test signal according to the difference; An output module, which is used to send the motor test signal to the motor controller.

[0013] In the present invention, the proposed HiL test method and system for a new energy vehicle motor controller improve the accuracy and authenticity of the test environment by obtaining the environmental data and vehicle operating conditions to be simulated and using the trained Transformer model for scenario simulation. By calculating the difference between the motor dq-axis current signal and the preset motor dq-axis current signal, generating a motor test signal, and sending the test signal to the motor controller, accurate testing of the motor controller performance is achieved. By building a permanent magnet synchronous motor model, a load model, a resolver model, a three-phase inverter model, and a CAN communication model, a complete HiL test system is constructed, improving the comprehensiveness and accuracy of the test. Using the voltage equation, electromagnetic torque equation, and back electromotive force equation to build the permanent magnet synchronous motor model ensures the accuracy and reliability of the model. Description of the Drawings

[0014] Figure 1 It is a schematic structural diagram of the working process of a HiL test method for a new energy vehicle motor controller proposed by the present invention; Figure 2 It is a schematic system architecture diagram of a HiL test system for a new energy vehicle motor controller proposed by the present invention. Detailed Embodiments

[0015] Referring to Figure 1 and Figure 2 A HiL test method for a new energy vehicle motor controller proposed by the present invention includes the following steps: S1. Obtain the environmental data to be simulated, and preprocess the environmental data to obtain the voxel features of the environmental data.

[0016] In this embodiment, the environmental data includes but is not limited to the external environmental temperature, the average battery temperature, and the motor temperature; the preprocessing specifically includes: Extract the first voxel features from the environmental data one by one; After unifying the feature dimensions and resolutions of the extracted multiple first voxel features, perform feature fusion to obtain the voxel features corresponding to the environmental data.

[0017] S2. Obtain the vehicle operating conditions to be simulated, and input the voxel features and vehicle operating conditions into the trained Transformer model to complete the scenario simulation task.

[0018] In this embodiment, the vehicle operating conditions include but are not limited to idling, low-speed driving, high-speed driving, rapid acceleration, and rapid braking; the training process of the Transformer model specifically includes: Obtain a sample data set for training the Transformer model, where the sample data set includes multiple vehicle operating conditions and multiple voxel features, and each voxel feature corresponds to a set of environmental data; Set relevant Transformer network parameters, and split the sample data set according to a preset strategy to form a training set, a test set, and a validation data set; Use the vehicle driving conditions and voxel features as input features and a set of environmental data as the target variable to input into the Transformer network for model training to obtain a Transformer model; Adjust the Transformer network parameters according to the training results until the obtained training results are within the preset error range to obtain a trained Transformer model.

[0019] In this embodiment, the preset strategy specifically includes: using 70% of the sample data set as the training set, 20% of the sample data set as the test set, and 10% of the sample data set as the validation data set.

[0020] In this embodiment, the construction process of the motor model specifically includes: Build a permanent magnet synchronous motor model and compile the permanent magnet synchronous motor model into the HIL test device; Build a load model and compile the load model into the HIL test device; Build a resolver model and compile the resolver model into the HIL test device; Build a three-phase inverter model and compile the physical model of the three-phase inverter into the HIL test device; Build a CAN communication model, compile the CAN communication model into the HIL test device, obtain the motor controller feedback signal, compare the motor controller feedback signal with the preset feedback signal, if the difference does not exceed the preset reference value, it is considered to meet the expectation, and continue to load the three-phase inverter model, otherwise send an alarm message.

[0021] In this embodiment, building a three-phase inverter model and compiling the three-phase inverter model into the HIL test device includes: The three-phase inverter receives the PWM control signal from the slave board and detects whether the bridge arm is conducting; If the bridge arm is conducting, detect whether it is forward conducting. If it is detected that the bridge arm is forward conducting, calculate the control phase voltage, current, and internal resistance during forward conduction; If it is detected that the bridge arm is not conducting or the bridge arm is negatively conducting, calculate the control phase voltage, current, and internal resistance when not conducting and the control phase voltage, current, and internal resistance when negatively conducting respectively; Output the calculated values of the phase voltage, current, and internal resistance to the motor model to build a three-phase inverter model; Compile the three-phase inverter model into the HIL test device.

[0022] In this embodiment, a permanent magnet synchronous motor model is built, which specifically includes: Build a permanent magnet synchronous motor model based on the voltage equation, electromagnetic torque equation, and back electromotive force equation; The voltage equation is specifically: ; The electromagnetic torque equation is specifically: ; The back electromotive force equation is specifically: ; Among them, R is the stator resistance; d-axis equivalent inductance; q-axis equivalent inductance; rotor electrical angular velocity; rotor permanent magnet flux linkage; p is the number of pole pairs of the motor.

[0023] In this embodiment, the process of building the load model specifically includes: Build a load model based on the motion equation; The motion equation is specifically: ; Among them, J is the inertia of the motor and the load; B is the friction coefficient.

[0024] S3. Collect the motor dq-axis current signals generated by the built motor model, calculate the difference between the motor dq-axis current signals and the preset motor dq-axis current signals, and generate a motor test signal according to the difference.

[0025] S4. Send the motor test signal to the motor controller.

[0026] Referring to Figure 1 and Figure 2 , a HiL test system for a motor controller of a new energy vehicle proposed by the present invention includes: A data acquisition module, configured to acquire environmental data to be simulated and preprocess the environmental data to obtain voxel features of the environmental data.

[0027] A first processing module, configured to acquire the vehicle working conditions to be simulated, and input the voxel features and the vehicle working conditions into the trained Transformer model to complete the scenario simulation task.

[0028] A second processing module, configured to collect the motor dq-axis current signals generated by the built motor model, calculate the difference between the motor dq-axis current signals and the preset motor dq-axis current signals, and generate a motor test signal according to the difference.

[0029] An output module, configured to send the motor test signal to the motor controller.

[0030] The above are only the preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes, shall be covered by the protection scope of the present invention.

Claims

1. A new energy vehicle motor controller HiL test method, characterized in that: include: Acquire environmental data to be simulated, and pre-process the environmental data to obtain voxel features of the environmental data; Obtain the vehicle operating conditions that need to be simulated, and input the voxel features and vehicle operating conditions into the trained Transformer model to complete the scenario simulation task; Collect the motor dq axis current signal generated by the constructed motor model, calculate the difference between the motor dq axis current signal and the preset motor dq axis current signal, and generate a motor test signal according to the difference; Sends motor test signals to the motor controller.

2. The HiL test method for the motor controller of a new energy vehicle according to claim 1, characterized in that: The environmental data include but are not limited to external environmental temperature, average battery temperature, and motor temperature; the preprocessing specifically includes: Extracting the first voxel features of the environmental data one by one; After unifying the feature dimensions and resolutions of the extracted multiple first voxel features, feature fusion is performed to obtain the voxel features corresponding to the environmental data.

3. The HiL test method for the new energy vehicle motor controller according to claim 2 is characterized in that: The vehicle operating conditions include but are not limited to idling, low-speed driving, high-speed driving, sudden acceleration, and sudden braking; the training process of the Transformer model specifically includes: Obtain a sample data set for Transformer model training, wherein the sample data set includes multiple vehicle operating conditions and multiple voxel features, each voxel feature corresponding to a set of environmental data; Set relevant Transformer network parameters and split the sample data set according to the preset strategy to form training set, test set, and validation set; The vehicle working condition and voxel features are used as input features, and a set of environmental data is used as target variables to input into the Transformer network for model training to obtain a Transformer model; Adjust the Transformer network parameters according to the training results until the training results are within the preset error range to obtain a trained Transformer model.

4. The HiL test method for the new energy vehicle motor controller according to claim 3 is characterized in that: The preset strategy specifically includes: using 70% of the sample data set as a training set, using 20% ​​of the sample data set as a test set, and using 10% of the sample data set as a verification data set.

5. The HiL test method for the motor controller of a new energy vehicle according to claim 1, characterized in that: The construction process of the motor model specifically includes: Building a permanent magnet synchronous motor model, and compiling the permanent magnet synchronous motor model into a HIL test device; Building a load model and compiling the load model into a HIL test device; Building a resolver model, and compiling the resolver model into a HIL test device; Building a three-phase inverter model, and compiling the three-phase inverter physical model into a HIL test device; Build a CAN communication model, compile the CAN communication model into the HIL test equipment, obtain the motor controller feedback signal, compare the motor controller feedback signal with the preset feedback signal, if the difference does not exceed the preset reference value, it is considered to be in line with expectations, and continue to load the three-phase inverter model, otherwise send an alarm message.

6. The HiL test method for the motor controller of a new energy vehicle according to claim 5, characterized in that: Build a three-phase inverter model and compile the three-phase inverter model into the HIL test equipment, including: The three-phase inverter receives the PWM control signal from the board and detects whether the bridge arm is turned on; If the bridge arm is turned on, detecting whether it is forward conducting, and if it is detected that the bridge arm is forward conducting, calculating the control phase voltage, current and internal resistance when forward conducting; If it is detected that the bridge arm is not conducting or the bridge arm is conducting in the negative direction, the control phase voltage, current and internal resistance when not conducting and the control phase voltage, current and internal resistance when conducting in the negative direction are calculated respectively; Output voltage, current and internal resistance calculation values ​​to the motor model to build a three-phase inverter model; The three-phase inverter model is compiled into the HIL test equipment.

7. The HiL test method for the motor controller of a new energy vehicle according to claim 5, characterized in that: The construction of the permanent magnet synchronous motor model specifically includes: Build a permanent magnet synchronous motor model based on the voltage equation, electromagnetic torque equation and back electromotive force equation; The voltage equation is specifically: ; The electromagnetic torque equation is specifically: ; The back electromotive force equation is specifically: ; Among them, R is the stator resistance; d-axis equivalent inductance; q-axis equivalent inductance; rotor electrical angular velocity; rotor permanent magnet flux; p is the number of motor pole pairs.

8. The HiL test method for the motor controller of a new energy vehicle according to claim 5, characterized in that: The process of building the load model specifically includes: Build load models based on equations of motion; The motion equation is specifically: ; Where J is the inertia of the motor and load; B is the friction coefficient.

9. A new energy vehicle motor controller HiL test system, characterized in that: include: A data acquisition module is used to acquire environmental data to be simulated and pre-process the environmental data to obtain voxel features of the environmental data; The first processing module is used to obtain the vehicle working conditions that need to be simulated, and input the voxel features and the vehicle working conditions into the trained Transformer model to complete the scene simulation task; The second processing module is used to collect the motor dq axis current signal generated by the constructed motor model, calculate the difference between the motor dq axis current signal and the preset motor dq axis current signal, and generate a motor test signal according to the difference; Output module, used to send motor test signals to the motor controller.