A rapid automatic calibration method and system based on an automated test bench and a motor controller
By combining an automated test bench and a motor controller, and employing current closed-loop control and data processing algorithms, the problems of long calibration time and inaccurate data in the calibration process of permanent magnet synchronous motors have been solved, achieving efficient and accurate calibration data generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SINO TRUK JINAN POWER CO LTD
- Filing Date
- 2022-07-25
- Publication Date
- 2026-06-09
Smart Images

Figure CN115684920B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy vehicle testing, specifically to an automatic bench calibration method, system, and motor controller for a permanent magnet synchronous motor. Background Technology
[0002] Permanent magnet synchronous motors (PMSMs) are the most widely used drive motor type in new energy vehicles, boasting advantages such as high energy density, ease of control, and low losses. Currently, the mainstream control method for PMSMs is the lookup table method, which uses calibrated current-torque-speed data to obtain the required current for control by looking up a table. Therefore, motor calibration is an essential process in motor control, and the efficiency of the calibration process and the accuracy of the calibration data are key to calibration technology.
[0003] Currently, manual calibration is generally used, which involves manually setting Id and Iq, recording the torque at different speeds, and iterating through all speeds. This method is time-consuming, the manually recorded data has a certain degree of error, and errors in manual setting can lead to unnecessary risks. Therefore, automatic motor calibration technology has emerged.
[0004] Traditional automatic calibration methods rely on the motor controller to automatically apply current and iterate through all speeds. While more efficient than manual methods, this still requires considerable time. Furthermore, data recording typically involves manual input or the motor controller recording current and voltage data, while the dynamometer records torque data, causing significant inconvenience for subsequent data processing. Additionally, the influence of temperature on magnetic flux linkage and the accuracy limitations of torque sensors often lead to inaccurate calibration data.
[0005] Therefore, providing a fast and automatic calibration method, system, and motor controller to achieve rapid and efficient calibration and accurate processing of correction data is a major challenge in the field of calibration. Summary of the Invention
[0006] The technical problems to be solved by this invention are as follows: calibration of full speed takes a long time, data recording methods are inefficient, and data processing accuracy is low. To solve these problems, this invention proposes a rapid automatic calibration method, system, and motor controller, achieving rapid calibration, efficient storage, and accurate processing of correction data.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] According to a first aspect of the embodiments of this application, an automatic calibration method for a permanent magnet synchronous motor based on an automated test bench is provided, the method comprising:
[0009] The speed control of the bench dynamometer provides the tested motor with a constant speed that is close to but less than the base speed. The closer this speed is to the base speed, the more accurate the calibration data.
[0010] The motor controller uses a current closed-loop control to operate the motor, and automatically gives direct-axis current and quadrature-axis current commands according to a preset current table.
[0011] The current step size can be set and adjusted according to the current parameters of the motor under test. The smaller the current step size, the more data points are collected and the more accurate the calibration data.
[0012] When the calibration enable flag is set from 0 to 1, the motor controller begins the automatic calibration process.
[0013] During operation, the motor temperature and IGBT module temperature are collected and logical judgments are made. If the temperature is within the threshold and there are no other faults, each current point will run stably for 5 seconds. After the operation is completed, the direct axis given current and quadrature axis given current will be increased according to the preset current step size.
[0014] If the motor temperature or IGBT temperature exceeds the threshold, the motor controller will shut down.
[0015] Once the motor temperature and IGBT temperature drop below the threshold, the motor controller starts operating and continues to work at the previous current point.
[0016] During the calibration process, a pause operation can be performed at any time, changing the calibration enable flag from 1 to 0.
[0017] During the calibration process, the motor controller collects direct-axis current command dataset, quadrature-axis current command dataset, direct-axis voltage dataset, quadrature-axis voltage dataset, motor temperature dataset, and IGBT temperature dataset.
[0018] The signal is transmitted to the test bench via the data transmission module;
[0019] The torque sensor at the dynamometer end of the test bench collects the torque data set output by the motor under test;
[0020] The test bench records the dataset transmitted by the motor controller and the torque dataset collected by the test bench into the test bench database.
[0021] After all current commands are executed, the motor controller stops and the calibration data is collected.
[0022] The calibration data from the bench database was extracted and processed. The global ammeter and global inductance meter were obtained by using the voltage-torque compensation method and the composite flux linkage method.
[0023] A global ammeter is used for current lookup control, and a global inductance meter is used for feedforward decoupling control.
[0024] According to a second aspect of the embodiments of this application, an automatic calibration system for permanent magnet synchronous motors based on an automated test bench is provided, the system comprising:
[0025] Automatic calibration enable module: Enables the start and stop of automatic calibration function;
[0026] Current setting module: Based on the parameter characteristics of the motor and its controller, a full current table is set, covering the entire current limit circle. A step size variable is set to enable calibrable step size input.
[0027] Temperature detection module: Real-time monitoring of the temperature of the motor and the motor controller IGBT. During the calibration process, the motor temperature rises the fastest, followed by the motor controller temperature, and control needs to be performed based on the temperature.
[0028] Data transmission module: This module transmits the motor temperature, motor controller IGBT temperature, direct-axis voltage, quadrature-axis voltage, direct-axis current, and quadrature-axis current collected by the motor controller to the test bench via DBC files and CAN cards;
[0029] Torque measurement module: The load and torque sensor are provided by an automated bench dynamometer to measure the output torque of the motor under test;
[0030] Calibration data storage module: The automated test bench provides the database, which records the data such as motor temperature, motor controller IGBT temperature, direct axis voltage, quadrature axis voltage, direct axis current, and quadrature axis current transmitted by the motor controller, along with the torque data measured by the dynamometer, to the test bench's host computer database;
[0031] Data processing module: Consists of data processing scripts, which process calibration data using voltage-torque compensation method and composite flux linkage method;
[0032] According to a third aspect of the embodiments of this application, an automatic calibration motor controller for permanent magnet synchronous motors is provided, wherein the motor controller integrates an automatic calibration algorithm, a temperature detection module, a data transmission module, and a fault diagnosis module.
[0033] The beneficial effects achieved by this invention are as follows: Compared with traditional calibration methods, the entire calibration process described in this invention only requires testing data at one rotational speed, which greatly improves calibration efficiency; the automatic calibration algorithm has high reliability and the collected data is accurate and reliable; all calibration data is uniformly recorded and stored by an automated test bench, simplifying the data storage process and facilitating data retrieval; data processing using the voltage-torque compensation method and the composite flux linkage method reduces data errors. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of a rapid automatic calibration system based on an automated test bench provided in an embodiment of the present invention;
[0035] Figure 2This is a flowchart illustrating the steps of a rapid automatic calibration method based on an automated test bench, as provided in an embodiment of the present invention.
[0036] Figure 3 The embodiments of this invention provide a rapid automatic calibration method based on an automated test bench, including the isotorque line, isospeed line, current limit circle curve, MTPA curve, and MTPV curve.
[0037] The following is supplementary explanation of the attached figures:
[0038] Curve 1 - MTPA curve, Curve 2 - MTPV curve, Curve 3 - Current limit circle curve, Curve 4 - Isotorque line, Curve 5 - Isospeed line. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0040] Figure 1 The image illustrates an automated calibration system based on an automated test bench according to an embodiment of this application, specifically including:
[0041] Automatic calibration enable module 10: Enables the start and stop of automatic calibration function;
[0042] Current setting module 20: Based on the parameter characteristics of the motor and its controller, it sets a full current table covering the entire current limit circle. It also sets a step size variable to enable calibrable step size input.
[0043] Temperature detection module 30: Real-time monitoring of the temperature of the motor and the motor controller IGBT. During the calibration process, the motor temperature rises the fastest, followed by the motor controller temperature, and control needs to be performed based on the temperature.
[0044] Data transmission module 40: This module transmits the motor temperature, motor controller IGBT temperature, direct-axis voltage, quadrature-axis voltage, direct-axis current, and quadrature-axis current collected by the motor controller to the test bench via DBC files and CAN cards;
[0045] Torque measurement module 50: The load and torque sensor are provided by an automated bench dynamometer to measure the output torque of the motor under test;
[0046] Calibration data storage module 60: The automated test bench provides a database to record data such as motor temperature, motor controller IGBT temperature, direct-axis voltage, quadrature-axis voltage, direct-axis current, and quadrature-axis current transmitted by the motor controller, along with torque data measured by the dynamometer, to the test bench's host computer database.
[0047] Data processing module 70: Composed of data processing scripts, it processes calibration data using voltage-torque compensation method and composite flux linkage method;
[0048] Figure 2 The figure shows a flowchart of the steps of an automatic calibration method for a permanent magnet synchronous motor based on an automated test bench, according to an embodiment of this application.
[0049] like Figure 2 As shown, the automatic calibration method for permanent magnet synchronous motors in this embodiment specifically includes the following steps:
[0050] S1: The dynamometer is set to a fixed speed (close to the base speed) after the base speed. The motor controller provides the direct-axis current and quadrature-axis current according to the preset current grid.
[0051] S2: During operation, the motor controller determines the operating status based on the collected motor temperature and IGBT temperature. If the temperature is too high, the motor stops and resumes automatic operation at the previous current point once the temperature drops below the threshold.
[0052] S3: The motor controller sends the current data Id and Iq, voltage data Ud and Uq, and motor temperature data Temp_motor to the test bench via CAN. The test bench automatically stores the collected torque data Torque into the test bench database.
[0053] S4: Export calibration data from the test bench database, process and correct the data using the voltage-torque compensation method and the composite flux method, and generate a current data table for the entire speed range;
[0054] Specifically, in S1, the load on the test specimen is provided by a bench dynamometer. The dynamometer is controlled by speed control and is controlled by the host computer of the dynamometer.
[0055] When the dynamometer speed is close to and less than the motor's base speed, the calibration data will be more accurate.
[0056] Furthermore, the dynamometer stand is equipped with a torque sensor to monitor and store the output torque of the tested motor in real time.
[0057] The preset current table includes parameters such as current step size and maximum current limit circle value, which can be adjusted according to different test motor parameters. Id is fixed as a constant value, and Iq increases from 0 to its maximum value according to the preset step size. Then, Id increases by another step size, and the above steps are repeated.
[0058] In S2, the calibration process can be started or paused via the calibration enable module. After pausing, the user can choose to continue the automatic calibration operation at the current current point. When the motor temperature or the motor controller temperature exceeds the set temperature threshold 1, the motor controller stops. Once both temperatures drop to the set threshold 2, the automatic calibration operation at the previous current point resumes.
[0059] In S3, the motor controller collects direct-axis current, quadrature-axis current, direct-axis voltage, quadrature-axis voltage, motor temperature, and motor controller temperature, while the test bench collects the motor output torque. The motor controller sends the collected calibration data to the test bench.
[0060] Specifically, a custom DBC file for data transmission is provided, which includes the aforementioned acquired data signals and the motor controller calibration status flag signal Current_state.
[0061] The Current_state flag has three states: 0 indicates a paused state, 1 indicates a calibration running state, and 2 indicates an over-temperature state.
[0062] The motor controller sends the above signals via the CAN bus.
[0063] The automated test bench loads the aforementioned DBC file to parse CAN signal messages, and the sampling period can be set to 100ms.
[0064] In the host computer of the automatic test bench, its running script can be edited, the signal variables received from the motor controller can be selected, defined as storable variables, and the corresponding project can be created;
[0065] The calibration program is started, and the motor controller automatically sends data, which is received and stored on the test bench.
[0066] Furthermore, the data is stored systematically in the host computer database on the test bench and exported in Excel spreadsheet format to improve data processing efficiency.
[0067] During the automatic calibration program, each current point is run for 5 seconds to ensure the accuracy of the collected calibration data.
[0068] In S4, export the data table and perform calibration data processing steps.
[0069] Specifically, the calibration data is filtered based on the Current_state flag, and the data with the Current_state flag set to 1 is retained as the original calibration data;
[0070] Singularity removal: Singularity identification is performed on the calibration current point data, and current point data with large deviations are removed.
[0071] Averaging involves identifying and averaging the data at each current point, resulting in the following data: Direct-axis current. quadrature axis current Direct-axis voltage setpoint quadrature axis voltage setpoint Direct-axis voltage feedback value quadrature axis voltage feedback value Motor output torque Motor temperature ;
[0072] Calculate the stator resistance Rs corresponding to each current point using the following formula:
[0073]
[0074] Because the control values of direct-axis voltage and quadrature-axis voltage deviate from their actual values, i.e., direct-axis voltage deviation... Cross-axis voltage deviation The voltage-torque compensation method can be used to process and compensate for direct-axis voltage and quadrature-axis voltage.
[0075]
[0076] According to the principle of conservation of energy, the following expression can be obtained:
[0077]
[0078] The above equation is averaged, and:
[0079]
[0080] The above VAR stands for variance sign.
[0081] Assumption Then the following equation holds:
[0082]
[0083] Furthermore, assuming and The same as , Proportional, and the proportionality constant is assumed to be... and Then we have:
[0084]
[0085]
[0086] As shown in the equation above, the direct-axis current... quadrature axis current Direct-axis voltage setpoint quadrature axis voltage setpoint The stator resistance Rs is a measurable quantity, only the coefficient is not. and Since the voltage is an unknown quantity, the least squares method is used for data processing to achieve the effect of voltage compensation.
[0087] Plot the current-limiting circle curve in the second quadrant; the radius of the current-limiting circle is... Its size is determined by the current-carrying capacity of the IGBT in the motor controller.
[0088] Cubic spline interpolation is performed on the torque dataset to obtain the torque-Id-Iq surface and the corresponding functional relationship Te(Id,Iq);
[0089] Based on the torque-Id-Iq surface and the corresponding functional relationship Te(Id,Iq) above, draw the isotor curve. The torque step size can be determined according to the number of data points required.
[0090] Furthermore, to solve the MTPA curve, the minimum current amplitude and the current limit circle under the same torque conditions are set as the solution constraints. That is, within the limit circle, the set of current points closest to the origin on the equal torque curve is the maximum torque-current ratio curve - curve 1.
[0091] The above MTPA curve represents the current setpoints for different torque outputs when operating at different speeds below the base speed.
[0092] Solve for the isotropic curve at maximum speed, i.e., the voltage limit ellipse. This is derived from the following voltage steady-state equation and voltage limit equation:
[0093]
[0094] In the formula Includes permanent magnets , avoided The resulting uncertainties; since modulation is not considered, in the above formula When selecting a voltage, a voltage margin should be deducted to ensure the accuracy of data processing.
[0095] Draw the maximum speed isotropic line, solve the MTPV curve, and use the voltage limit ellipse and current limit circle as the solution constraints to solve and draw the set of current points corresponding to the maximum torque point, i.e., the maximum torque-voltage ratio curve -- curve 2.
[0096] Within the region enclosed by the MTPA curve, the current limit circle, the MTPV curve, and the maximum speed curve, the set of intersection points of the isotor lines and isovelocity lines is obtained, which is the field weakening calibration data, corresponding to the given direct-axis current and given quadrature-axis current at different speeds and torques.
[0097] By solving the steady-state voltage equation, the current point corresponding to [ Dataset. At this point, the sets of current points and inductance points for the entire speed range have been solved.
[0098] Finally, bench testing was conducted to verify the voltage utilization rate of the current points, especially the current points on the external characteristics.
[0099] This completes the entire calibration process.
[0100] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A rapid automatic calibration method based on an automated test bench, characterized in that, Includes the following steps: Step 1: The dynamometer is set to a fixed speed from the base speed, and the motor controller provides the direct-axis current and quadrature-axis current according to the preset current grid; Step 2: During operation, the motor controller determines the operating status based on the collected motor temperature and IGBT temperature. If the temperature is too high, the motor stops and resumes automatic operation at the previous current point after the temperature drops below the threshold. Step 3: The motor controller sends the current data (Id, Iq), voltage data (Ud, Uq), and motor temperature data (Temp_motor) to the test bench via CAN. The test bench automatically stores these data, along with the collected torque data (Torque), into its database. Step 4: Export calibration data from the test bench database, process and correct the data using the voltage-torque compensation method and the composite flux linkage method, and generate a current data table covering the entire speed range; including: Plot the current-limiting circle curve in the second quadrant; the radius of the current-limiting circle is... Its size is determined by the current-resistance capability of the IGBT in the motor controller; Cubic spline interpolation is performed on the torque dataset to obtain the torque-Id-Iq surface and the corresponding functional relationship Te(Id,Iq); Based on the torque-Id-Iq surface and the corresponding functional relationship Te(Id,Iq) above, draw the isotor curve. The torque step size can be determined according to the number of data points required. To solve the MTPA curve, the minimum current amplitude and the current limit circle under the same torque conditions are set as the solution constraints. That is, within the limit circle, the set of current points on the equal torque curve that are closest to the origin is the maximum torque-current ratio curve. The MTPA curve is the current setpoint for outputting different torques when running at different speeds below the base speed. Solve for the isotropic curve at maximum speed, i.e., the voltage limit ellipse; from the following voltage steady-state equation and voltage limit equation: In the formula, For direct-axis current, For quadrature axis current, Stator resistance; Includes permanent magnets , avoided The resulting uncertainties; since modulation is not considered, in the above formula When selecting, a voltage margin should be deducted; Plot the maximum speed isotropic line, solve the MTPV curve, and use the voltage limit ellipse and current limit circle as the solution constraints to solve and plot the set of current points corresponding to the maximum torque point, i.e., the maximum torque-voltage ratio curve. Within the region enclosed by the MTPA curve, the current limit circle, the MTPV curve, and the maximum speed curve, the set of intersection points of the isotor lines and isovelocity lines is solved, which is the field weakening calibration data, corresponding to the given direct-axis current and given quadrature-axis current under different speeds and different torques. By solving the steady-state voltage equation, the current point corresponding to [ Dataset.
2. The rapid automatic calibration method according to claim 1, characterized in that, We need to test the calibration data corresponding to a speed lower than but close to the base speed to obtain calibration data for the entire speed range.
3. The rapid automatic calibration method according to claim 1, characterized in that, The motor operation is controlled by a current closed loop, and the direct-axis current and quadrature-axis current commands are automatically given according to a preset current table.
4. The rapid automatic calibration method according to claim 1, characterized in that, During operation, the motor temperature and IGBT module temperature are collected and logical judgments are made.
5. The rapid automatic calibration method according to claim 1, characterized in that, The specific steps for sending the calibration data to the test bench are as follows: 1) A custom DBC file for data transmission, which includes the acquired data signal and the motor controller calibration status flag signal Current_state; the Current_state flag has three states: pause state, calibration running state, and over-temperature state; 2) The motor controller sends the above signals via the CAN bus; 3) Load the above DBC file onto the automated test bench, set the sampling period, and realize the parsing of CAN signal messages; 4) In the host computer of the automatic test bench, edit its running script, select the signal variables received from the motor controller, define them as storable variables, and create the corresponding project; 5) Start the calibration program. The motor controller will automatically send data, and the test bench will receive and store the data. The data will be stored in an orderly manner in the host computer database on the test bench and exported in the form of an Excel spreadsheet.
6. The rapid automatic calibration method according to claim 5, characterized in that, During the automatic calibration process, each current point runs for 5 seconds; the sampling period in step 3) is 100ms.
7. The rapid automatic calibration method according to claim 1, characterized in that, The calibration data were processed using the voltage-torque compensation method and the composite flux method. The voltage-torque compensation method derives formulas and performs linear fitting on direct-axis voltage and quadrature-axis voltage to obtain the compensated voltage and torque. The composite flux linkage method calculates the flux linkage, avoiding the influence of other factors on the flux linkage, and obtains ammeter data for the entire speed range.
8. The rapid automatic calibration method according to claim 1, characterized in that, The calibration data processing steps also include: The calibration data is filtered based on the Current_state flag, and the data with the Current_state flag set to the calibration running state are retained as the original calibration data. Singularity removal: Singularity identification is performed on the calibration current point data, and current point data with large deviations are removed. Average averaging involves identifying and averaging the data at each current point. Since the control values of direct-axis voltage and quadrature-axis voltage deviate from their actual values, the voltage-torque compensation method is used to process and compensate for the direct-axis voltage and quadrature-axis voltage. The coefficient is set to and Then we have: in, Represents the sign of variance. For direct-axis current, For quadrature axis current, For the direct-axis voltage setpoint, Given the quadrature-axis voltage value, This is the direct-axis voltage feedback value. This is the quadrature-axis voltage feedback value. This is the output torque of the motor; As shown in the equation above, the direct-axis current... quadrature axis current Direct-axis voltage setpoint quadrature axis voltage setpoint The stator resistance Rs is a measurable quantity, only the coefficient is not. and Since the voltage is an unknown quantity, the least squares method is used for data processing to achieve the effect of voltage compensation.
9. An automated calibration system based on an automated test bench using the method of any one of claims 1-8, characterized in that, specifically include: Automatic calibration enable module 10: Enables the start and stop of automatic calibration function; Current setting module 20: Based on the parameter characteristics of the motor and motor controller, a full current table is set, which covers the entire current limit circle. The step size variable is set to realize calibrable step size input. Temperature detection module 30: Real-time monitoring of the temperature of the motor and the motor controller IGBT. During the calibration process, the motor temperature rises the fastest, followed by the motor controller, and control needs to be performed based on the temperature. Data transmission module 40: This module transmits the motor temperature, motor controller IGBT temperature, direct-axis voltage, quadrature-axis voltage, direct-axis current, and quadrature-axis current collected by the motor controller to the test bench via DBC files and CAN cards; Torque measurement module 50: The load and torque sensor are provided by an automated bench dynamometer to measure the output torque of the motor under test; Calibration data storage module 60: The automated test bench provides a database to record the motor temperature, motor controller IGBT temperature, direct-axis voltage, quadrature-axis voltage, direct-axis current, and quadrature-axis current data transmitted by the motor controller, along with the torque data measured by the dynamometer, to the test bench's host computer database. Data processing module 70: Composed of data processing scripts, it processes calibration data using voltage-torque compensation method and composite flux linkage method.
10. A motor controller, characterized in that, The motor controller has the automatic calibration system based on an automated test bench as described in claim 9.