Motor control parameter calibration and test system and method

By constructing a four-layer architecture system consisting of a hardware layer, a communication layer, a functional layer, and a user interface layer, and combining the CAN bus and the XCP protocol, the problems of expensive, complex, and poor universality of existing motor control parameter calibration software are solved, thereby reducing the cost and improving the efficiency of motor control parameter calibration and testing.

CN121742418APending Publication Date: 2026-03-27辰致科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing motor control parameter calibration software is expensive, complex to operate, lacks versatility and maintainability, making it difficult to meet the development needs of small and medium-sized enterprises and individuals.

Method used

A four-layer architecture system consisting of a hardware layer, a communication layer, a functional layer, and a user interface layer is constructed. The CAN bus and XCP protocol are used to realize data interaction between the computer and the electronic control unit, and a graphical user interface is used to simplify the operation process.

Benefits of technology

It reduces the cost of motor control parameter calibration and testing, improves development efficiency, and simplifies and maintains functionality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121742418A_ABST
    Figure CN121742418A_ABST
Patent Text Reader

Abstract

The invention discloses a motor control parameter calibration and test system and method. The system comprises a hardware layer, a communication layer, a function layer and a user interface layer. The hardware layer comprises a computer, a CAN communication card, a to-be-tested electronic control unit and a motor. The communication layer establishes a CAN bus communication link between the computer and the to-be-tested electronic control unit, performs data interaction with the to-be-tested electronic control unit based on an XCP protocol, analyzes the loaded parameter description file, and obtains a mapping relation between a parameter name and a memory address in the to-be-tested electronic control unit; the functional layer reads, sets and stores parameters of the to-be-tested electronic control unit according to the mapping relation, sends a control instruction to drive the motor to run, and collects and processes running data of the motor in real time; and the user interface layer receives the input parameter configuration information and the test instruction, and displays the running state of the motor and the processed running data. According to the invention, the motor control parameter calibration and test cost is reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive electronic control technology, and in particular to a system and method for calibrating and testing motor control parameters. Background Technology

[0002] In the development of automotive electronic control systems, the accurate calibration of ECU motor control parameters is crucial for vehicle performance and safety. With the widespread application of systems such as electric power steering and electric air conditioning, the demand for motor control calibration is increasing daily. Existing technologies mainly fall into three categories: first, professional calibration software such as ETAS INCA and Vector CANape, which are feature-rich but expensive, complex to operate, and require professional training; second, simple testing tools for specific vehicle models, lacking versatility and unable to meet diverse needs; and third, custom scripts written by engineers, which lack maintainability and scalability. Although existing solutions achieve basic functions such as parameter reading and writing through technologies like XCP protocol communication and A2L file parsing, they generally suffer from high costs, high barriers to entry, and functional redundancy, severely restricting the development efficiency of small and medium-sized enterprises and individuals.

[0003] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a system and method for calibrating and testing motor control parameters.

[0005] In a first aspect, the present invention provides a motor control parameter calibration and testing system, the technical solution of which is as follows: It includes: hardware layer, communication layer, functional layer, and user interface layer; The hardware layer includes a computer, a CAN communication card, an electronic control unit under test (ECU) and a motor. The computer establishes a physical connection with the ECU under test through the CAN communication card. The communication layer is used to establish a CAN bus communication link between the computer and the electronic control unit under test, to perform data interaction with the electronic control unit under test based on the XCP protocol, and to parse the loaded parameter description file to obtain the mapping relationship between parameter names and memory addresses inside the electronic control unit under test. The functional layer is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, send control commands to the electronic control unit under test to drive the motor to run, and collect and process the motor's running data in real time. The user interface layer is a graphical operation interface used to receive parameter configuration information and test commands input by the user, and to display the operating status of the motor and the processed operating data.

[0006] The beneficial effects of the motor control parameter calibration and testing system of the present invention are as follows: The system of this invention constructs a four-layer architecture system consisting of a hardware layer, a communication layer, a functional layer, and a user interface layer. It realizes data interaction between the computer and the electronic control unit based on the XCP protocol and CAN bus, and adopts a graphical user interface to simplify the operation process. It solves the problems of high price, complex operation, poor versatility and insufficient maintainability of traditional calibration software, and realizes the reduction of motor control parameter calibration and testing costs and the improvement of development efficiency.

[0007] Based on the above scheme, the motor control parameter calibration and testing system of the present invention can be further improved as follows.

[0008] In one alternative embodiment, the CAN communication card is used for signal conversion and CAN message transmission between the computer and the electronic control unit under test.

[0009] The advantages of adopting the above optional methods are: further clarifying that the CAN communication card performs signal conversion and CAN message transmission between the computer and the electronic control unit under test, realizing physical layer connection and data link layer communication functions, and ensuring the reliability of information transmission.

[0010] In one alternative embodiment, the communication layer includes: a CAN communication module and an XCP protocol module; The CAN communication module is used to: initialize the CAN communication card and configure communication parameters, establish and maintain the CAN bus communication link between the computer and the electronic control unit under test, and perform CAN message sending and receiving operations; The XCP protocol module is used to: establish an XCP connection with the electronic control unit under test based on the CAN bus communication link, parse the loaded parameter description file, obtain the mapping relationship between the parameter names and memory addresses inside the electronic control unit under test, and complete the parameter and measurement data interaction with the electronic control unit under test through XCP commands.

[0011] The advantages of adopting the above optional approach are: further dividing the communication layer into a CAN communication module and an XCP protocol module, and completing the communication card configuration, link maintenance and parameter description file parsing through module collaboration, thereby realizing the data interaction function based on the XCP protocol.

[0012] In one alternative approach, the functional layer includes: a parameter management module, a motor control module, and a data acquisition and processing module; The parameter management module is used to: perform reading and setting operations on the parameters in the electronic control unit under test according to the mapping relationship, and store the set parameter values; The motor control module is used to: send control commands to the electronic control unit under test according to the configured test parameters, and drive the motor to perform torque control, frequency setting or stall test; The data acquisition and processing module is used to: acquire and process the operating data of the motor in real time.

[0013] The advantages of adopting the above optional approach are: further subdividing the functional layer into three modules: parameter management, motor control, and data acquisition and processing. Each module has a clear division of labor, realizing real-time processing of parameter reading, writing and storage, motor drive control, and operating data.

[0014] In one alternative approach, the user interface layer is a graphical user interface, including a device control interface, a parameter setting interface, a status display interface, and a file operation interface. The device control interface is used to control the opening and closing of the CAN communication card; The parameter setting interface is used to receive the parameter configuration information and test instructions input by the user for motor control; The status display interface is used to display the operating status of the motor and the processed operating data; The file operation interface is used to load and manage parameter files related to the electronic control unit under test.

[0015] The advantages of adopting the above optional approach are: further designing the user interface layer into four independent interfaces for device control, parameter setting, status display, and file operation, realizing functional partition management, and improving the intuitiveness and convenience of graphical operation.

[0016] In one alternative approach, the parameter setting interface includes separate input areas for configuring torque control parameters, frequency setting parameters, and stall test parameters, respectively.

[0017] The advantages of adopting the above optional method are: further setting independent input areas for torque control, frequency setting and stall test in the parameter setting interface, realizing the separate configuration of different types of test parameters, and avoiding confusion in parameter settings.

[0018] In an alternative embodiment, the data acquisition and processing module is further configured to: The running data is generated as a dynamic curve, and the dynamic curve is displayed through the status display interface.

[0019] The advantages of adopting the above optional method are: the data acquisition and processing module generates dynamic curves from the operating data and displays them on the status display interface, realizing the visual monitoring of the motor's operating status and facilitating the observation of data change trends.

[0020] Secondly, the present invention provides a method for calibrating and testing motor control parameters, using the motor control parameter calibration and testing system provided by the present invention. The technical solution of this method is as follows: The computer at the hardware layer establishes a physical connection with the electronic control unit under test via a CAN communication card. The communication layer establishes a CAN bus communication link between the computer and the electronic control unit under test (ECU), performs data interaction with the ECU based on the XCP protocol, and parses the loaded parameter description file to obtain the mapping relationship between parameter names and memory addresses within the ECU. The functional layer is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, send control commands to the electronic control unit under test to drive the motor to run, and collect and process the motor's running data in real time. The user interface layer provides a graphical operation interface, receives parameter configuration information and test commands input by the user, and displays the motor's operating status and processed operating data.

[0021] The beneficial effects of the motor control parameter calibration and testing method of the present invention are as follows: The method of this invention constructs a four-layer architecture system consisting of a hardware layer, a communication layer, a functional layer, and a user interface layer. It realizes data interaction between the computer and the electronic control unit based on the XCP protocol and CAN bus, and adopts a graphical user interface to simplify the operation process. It solves the problems of high price, complex operation, poor versatility and insufficient maintainability of traditional calibration software, and realizes the reduction of motor control parameter calibration and testing costs and the improvement of development efficiency.

[0022] Thirdly, the technical solution of an electronic device according to the present invention is as follows: It includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the motor control parameter calibration and testing method of the present invention.

[0023] Fourthly, the technical solution of a computer-readable storage medium provided by the present invention is as follows: The computer-readable storage medium stores instructions that, when read, cause the computer-readable storage medium to perform the steps of the motor control parameter calibration and testing method of the present invention.

[0024] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0025] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of an embodiment of the motor control parameter calibration and testing system of the present invention; Figure 2 A schematic diagram of the workflow of a motor control parameter calibration and testing system; Figure 3 This is a flowchart illustrating an embodiment of a motor control parameter calibration and testing method according to the present invention; Figure 4 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation

[0026] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0027] Figure 1 A schematic diagram of an embodiment of a motor control parameter calibration and testing system 100 provided by the present invention is shown. Figure 1 As shown, the motor control parameter calibration and testing system 100 includes: a hardware layer 101, a communication layer 102, a functional layer 103, and a user interface layer 104. The hardware layer 101 includes a computer, a CAN communication card, an electronic control unit under test (ECU) and a motor. The computer establishes a physical connection with the ECU under test through the CAN communication card.

[0028] Here, a CAN communication card refers to a hardware interface device that implements the CAN bus protocol, used to complete electrical signal conversion and communication protocol data processing between a computer and an electronic control unit (ECU). For example, a CAN communication card supporting a USB interface connects to a computer via a USB cable on one end and to the CAN bus network of the ECU under test via another cable on the other. The ECU under test refers to an embedded automotive electronic controller that stores motor control software logic and parameters and requires online parameter calibration and functional testing through the system. For example, the main control unit in a certain type of electric power steering system. A motor refers to an actuator driven by the ECU under test, converting electrical energy into mechanical energy to achieve specific actions. For example, a permanent magnet synchronous motor used to generate auxiliary steering torque in the aforementioned electric power steering system. A physical connection refers to a conductive path established through physical media such as cables and connectors for transmitting electrical signals. For example, using shielded twisted-pair cables to connect the CAN_H and CAN_L signal lines of the CAN communication card to the corresponding pins of the CAN bus interface of the ECU under test.

[0029] The communication layer 102 is used to establish a CAN bus communication link between the computer and the electronic control unit under test, to perform data interaction with the electronic control unit under test based on the XCP protocol, and to parse the loaded parameter description file to obtain the mapping relationship between the parameter names and memory addresses inside the electronic control unit under test.

[0030] The CAN bus communication link refers to a communication path established based on the CAN international standard for reliable transmission of data frames between communication nodes; for example, a two-wire differential communication channel with a baud rate of 500 kilobits per second established between the computer's CAN communication card and the electronic control unit under test (ECU). The XCP protocol refers to a standardized master-slave communication protocol used for measurement, calibration, and bypass operations of the ECU, which can be implemented on various physical transport layers; for example, the XCP protocol based on the CAN bus transport layer can be used to achieve parameter and measurement data interaction between the computer and the ECU under test. The loaded parameter description file refers to a file written according to a specific industry standard format to describe the internal parameters, measurement variables, memory address layout, and data conversion relationships of the ECU; for example, a parameter description file with the .a2l extension obtained from the software development project accompanying the ECU under test, which is read and parsed by the software when the system starts. The parameter name refers to a text string defined in the parameter description file to uniquely identify a specific data element within the ECU; for example, the variable name "Motor_Target_Torque" defined in the parameter description file to represent the target torque of the motor. A memory address refers to the specific storage location of a parameter or variable within the memory mapping of the microcontroller under test (ECU); for example, the physical memory address corresponding to the parameter "Motor_Target_Torque" is 0x0800F100. A mapping relationship refers to a table establishing the association between parameter names and their corresponding addresses in the ECU's memory, created by parsing the parameter description file; for example, after parsing the parameter description file, the system generates a data structure internally to record the mapping relationship between "Motor_Target_Torque" and memory address 0x0800F100.

[0031] The functional layer 103 is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, send control commands to the electronic control unit under test to drive the motor to run, and collect and process the motor's running data in real time.

[0032] Control commands refer to command data generated by the system functional layer, sent to the electronic control unit under test (ECU) via the communication layer, and used to directly or indirectly drive the motor to perform specific actions. For example, writing the value "100" to memory address 0x0800F100 via the XCP protocol indicates that the motor is commanded to output a target torque of 10.0 N·m. Operating data refers to physical quantities generated by the motor during operation, reflecting its electrical or mechanical state, and measured or calculated by the ECU. For example, the motor's three-phase current values, DC bus voltage values, rotor speed, and rotor position information are periodically read from the ECU under test via the XCP protocol.

[0033] The user interface layer 104 is a graphical operation interface used to receive parameter configuration information and test commands input by the user, and to display the operating status of the motor and the processed operating data.

[0034] The graphical user interface (GUI) refers to a software interface built using graphical visual elements, operated via mouse or keyboard, providing users with interactive system functions; for example, the main interface displayed after the system application starts, including a menu bar, toolbar, parameter list window, data chart window, and status information bar. Parameter configuration information refers to a set of values ​​or options entered or selected by the user through the GUI to adjust motor control characteristics or test conditions; for example, entering the value "10.0" in the edit box of the parameter setting interface sets the target torque parameter of the motor to 10.0 N·m. Test commands refer to commands triggered by the user through controls on the GUI to start, stop, or switch specific test processes; for example, the start test command generated by the user clicking the "Start Frequency Jitter Test" button on the parameter setting interface. Operating status refers to textual or symbolic descriptions of the motor's current operating mode, health status, or key conditions; for example, the status display interface uses a green indicator light icon and the text "Running: Torque Control Mode" to comprehensively display the motor's current status. Processed operating data refers to the data format generated after mathematical operations, digital filtering, or engineering unit conversion of the original acquired operating data; for example, the data acquisition and processing module reads the original current analog-to-digital converter code value and converts it into the actual current value in "amperes" using a predetermined calibration formula.

[0035] The technical solution of this embodiment constructs a four-layer architecture system consisting of a hardware layer, a communication layer, a functional layer, and a user interface layer. It realizes data interaction between the computer and the electronic control unit based on the XCP protocol and CAN bus, and adopts a graphical user interface to simplify the operation process. It solves the problems of high price, complex operation, poor versatility and insufficient maintainability of traditional calibration software, and realizes the reduction of motor control parameter calibration and testing costs and the improvement of development efficiency.

[0036] In one alternative embodiment, the CAN communication card is used for signal conversion and CAN message transmission between the computer and the electronic control unit under test.

[0037] Signal conversion refers to the process of converting a signal from one electrical interface standard into a signal conforming to the electrical requirements of another bus protocol. For example, the internal circuitry of a CAN communication card converts digital signals transmitted from a computer's universal serial bus interface into differential signals conforming to the CAN bus standard. CAN message transmission refers to the complete process of encapsulating application layer data into a standard CAN frame format with an identifier, data length code, and data field, and then sending and receiving it via the bus. For example, a CAN communication card encapsulates XCP command data packets issued by the system into CAN data frames with the identifier 0x650 and drives them to be transmitted over the bus network.

[0038] Among the above optional methods, it is further clarified that the CAN communication card performs signal conversion and CAN message transmission between the computer and the electronic control unit under test, realizes physical layer connection and data link layer communication functions, and ensures the reliability of information transmission.

[0039] In one alternative embodiment, the communication layer 102 includes: a CAN communication module and an XCP protocol module; The CAN communication module is used to: initialize the CAN communication card and configure communication parameters, establish and maintain the CAN bus communication link between the computer and the electronic control unit under test, and perform CAN message sending and receiving operations.

[0040] The CAN communication module refers to a software functional unit integrated into the system software, specifically responsible for driving the specific CAN communication card hardware and managing the CAN bus communication link status and data transmission and reception. For example, it might be a set of code in the system software that calls a dynamic link library provided by a specific manufacturer to implement core communication functions such as device opening, baud rate setting, and data frame transmission and reception. Initialization and communication parameter configuration refer to the process of setting and preparing the necessary parameters for the communication hardware and communication protocol before normal communication begins. For example, the CAN communication module calls an initialization function when the system starts, configuring the CAN communication card's baud rate to 500 kilobits per second and setting the acceptance filter to receive all messages. A CAN message refers to an independent data unit transmitted on the CAN bus that conforms to the CAN protocol frame format. For example, a CAN data frame contains an 11-bit standard identifier (0x650), a data length code of 8, and a data field content of a series of XCP command bytes.

[0041] The XCP protocol module is used to: establish an XCP connection with the electronic control unit under test based on the CAN bus communication link, parse the loaded parameter description file, obtain the mapping relationship between the parameter names and memory addresses inside the electronic control unit under test, and complete the parameter and measurement data interaction with the electronic control unit under test through XCP commands.

[0042] The XCP protocol module refers to a software functional unit integrated into the system software that implements the XCP protocol master station function, is responsible for constructing and parsing XCP protocol data packets, and manages the connection session state; for example, a code module in the system software that implements command packet assembly, response packet parsing, and timestamp synchronization according to the XCP protocol specification. An XCP connection refers to a logical session channel successfully established between the XCP protocol module and the XCP protocol slave station within the ECU under test, used for all subsequent calibration and measurement communications; for example, a logical connection with a unique session identifier established on the CAN bus by sending a CONNECT command to the ECU under test and receiving an affirmative CONNECT response. An XCP command refers to a standard format instruction data packet transmitted over the XCP connection to perform a specific calibration or measurement operation; for example, an XCP protocol DOWNLOAD command data packet used to write the value "100" to memory address 0x0800F100.

[0043] In the above-mentioned optional approach, the communication layer is further divided into a CAN communication module and an XCP protocol module. The modules work together to complete the communication card configuration, link maintenance and parameter description file parsing, so as to realize the data interaction function based on the XCP protocol.

[0044] In one alternative embodiment, the functional layer 103 includes: a parameter management module, a motor control module, and a data acquisition and processing module; The parameter management module is used to: perform reading and setting operations on the parameters in the electronic control unit under test according to the mapping relationship, and store the set parameter values.

[0045] The parameter management module refers to a software unit integrated into the system's functional layer, specifically responsible for reading, modifying, saving to files, and loading from files the parameters of the electronic control unit based on mapping relationships. For example, when a user performs a "read all" operation on the interface, this module traverses the internally stored mapping relationship table and generates a series of corresponding XCP read commands to obtain the current values ​​of all parameters. The set parameter value refers to the new value of the parameter that the user has modified through the system interface and successfully written to the non-volatile memory or random access memory of the electronic control unit under test. For example, after the user modifies the torque parameter from 10.0 N·m to 12.0 N·m and performs a write operation, the value "120" is stored at address 0x0800F100 of the electronic control unit.

[0046] The motor control module is used to: send control commands to the electronic control unit under test according to the configured test parameters, and drive the motor to perform torque control, frequency setting or stall test.

[0047] The motor control module refers to a software functional unit integrated into the system's functional layer, specifically responsible for generating corresponding control command sequences and coordinating the transmission process based on the user-selected test mode and configuration parameters. For example, when the user initiates a "locked rotor test," this module sequentially sends motor enable commands and gradually increases torque commands according to the configured test logic and timing, while simultaneously monitoring feedback signals. The configured test parameters refer to a set of control conditions, protection thresholds, or operating mode options that the user needs to pre-set for a specific type of motor test. For example, before conducting a locked rotor test, the user sets "locked rotor current threshold: 20A," "torque rise slope: 5N·m / s," and "test timeout: 5s" on the interface. Torque control refers to a motor control mode where the system sets target torque parameters to the electronic control unit, causing the motor's output shaft torque to maintain or follow the set torque value. For example, in torque control mode, the system periodically writes a fixed value to the memory address corresponding to the target torque parameter, thereby ensuring a stable and constant motor output of 10.0 N·m. Frequency setting refers to a motor control mode where the system changes the energizing frequency of the motor windings by adjusting control parameters related to the motor drive frequency or operating speed in the electronic control unit. For example, in frequency setting mode, the system modifies parameters such as the control pulse width modulation carrier frequency or target speed to make the motor operate within a user-specified frequency range. Locked rotor testing refers to a specialized test mode designed to verify the protective performance and electrical characteristics of the motor and its controller when the rotor is forcibly stopped. For example, the system controls the motor to output linearly increasing torque while an external mechanism locks the motor shaft, testing whether the electronic control unit can correctly trigger the overcurrent protection function and record relevant data when the phase current reaches a set threshold.

[0048] The data acquisition and processing module is used to: acquire and process the operating data of the motor in real time.

[0049] The data acquisition and processing module refers to a software functional unit integrated into the system's functional layer, responsible for periodically acquiring measured variable data from the electronic control unit and performing real-time calculations, statistical analysis, digital filtering, or visualization preprocessing. For example, this module reads the raw values ​​of motor phase current and speed via XCP commands at a fixed period of 10ms, calculates the effective value of the current and the speed fluctuation rate, and performs first-order low-pass digital filtering. Real-time acquisition and processing refers to the operational characteristic of continuously and uninterruptedly acquiring data at a high rate that matches the dynamic characteristics of motor operation and immediately executing predetermined algorithm calculations. For example, during motor operation, the data acquisition and processing module continuously reads the analog-to-digital conversion sampled values ​​of the current and calculates its root mean square value within one power cycle in real time for interface display and logical judgment.

[0050] In the above-mentioned optional approach, the functional layer is further subdivided into three modules: parameter management, motor control, and data acquisition and processing. Each module has a clear division of labor, realizing parameter reading, writing and storage, motor drive control, and real-time processing of operating data.

[0051] In one alternative approach, the user interface layer 104 is a graphical operation interface, including a device control interface, a parameter setting interface, a status display interface, and a file operation interface. The device control interface is used to control the opening and closing of the CAN communication card.

[0052] The device control interface refers to the visual area in the graphical operation interface specifically used for managing the connection status, starting and stopping of external hardware devices such as CAN communication cards; for example, a dedicated toolbar area at the top of the main operation window, which contains buttons such as "Connect Device", "Disconnect Device", "Start Communication", and "Stop Communication" as well as status indicator lights.

[0053] The parameter setting interface is used to receive the parameter configuration information for motor control and the test instructions input by the user.

[0054] The parameter setting interface refers to the visual area in the graphical operation interface specifically used to display a list of calibrable parameters to the user, allow the user to edit parameter values, select test modes, and trigger test execution; for example, a panel on the left side of the main operation window that displays all calibrable parameters in a tree structure or table format, with each parameter row containing a name, current value, value edit box, and a separate write button.

[0055] The status display interface is used to show the operating status of the motor and the processed operating data.

[0056] The status display interface refers to the visual area in the graphical operation interface specifically used to display the system communication status, motor operation status, current values ​​of key parameters, and system alarm information in real time. For example, a fixed information display bar at the bottom of the main operation window displays "CAN status: connected", "motor status: running", "current torque: 10.0 N·m" and "alarm information: none" in the form of text and colored icons.

[0057] The file operation interface is used to load and manage parameter files related to the electronic control unit under test.

[0058] The file operation interface refers to the functional entry point or visual area in the graphical operation interface that provides interaction with data files such as parameter description files and parameter configuration files; for example, the "File" main menu in the menu bar and its subordinate secondary menu items such as "Open Parameter Description File", "Save Current Parameter Group", and "Save Parameter Group As". The parameter file refers to the data file used to store the set of optimal parameter names and values ​​read from the electronic control unit or determined after multiple rounds of calibration, to facilitate data import, export, or comparison between different versions; for example, after a user completes a calibration test, a file named "EPS_Calibration_Set_01.cal" saved through the system function, which records the latest values ​​of all calibration parameters in Extensible Markup Language format.

[0059] In the above-mentioned optional methods, the user interface layer is further designed as four independent interfaces: device control, parameter setting, status display, and file operation, to realize functional partition management and improve the intuitiveness and convenience of graphical operation.

[0060] In one alternative approach, the parameter setting interface includes separate input areas for configuring torque control parameters, frequency setting parameters, and stall test parameters, respectively.

[0061] Torque control parameters refer to a set of variables related to the specific implementation of the torque control mode, which can be calibrated and adjusted by the user according to the application scenario. Examples include parameters such as "maximum torque limit," "torque loop proportional gain coefficient," and "torque loop integral time constant" under the "torque control parameter group" in the parameter setting interface. Frequency setting parameters refer to a set of variables related to the specific implementation of the frequency setting or speed control mode, which can be calibrated and adjusted by the user according to the application scenario. Examples include parameters such as "maximum operating frequency limit," "frequency setpoint ramp-up time," and "speed loop proportional-integral regulator parameters" under the "frequency control parameter group" in the parameter setting interface. Stall test parameters refer to a set of variables specifically configured for performing stall tests, related to the test logic flow and protection judgment conditions. Examples include parameters such as "stall judgment current threshold," "stall state judgment delay time," and "test safe exit torque value" under the "stall test parameter group" in the parameter setting interface. An independent input area refers to a grouping and layout of input controls within the parameter setting interface, created using visual separation to group parameters for different functional modules or test modes, where they do not interfere with each other. For example, the parameter setting interface may be organized using multiple tabs, with one tab titled "Torque Control Parameters." All text editing boxes, numerical adjusters, and drop-down menus within this tab may be used only to configure parameters related to the torque control mode.

[0062] In the above optional methods, separate input areas for torque control, frequency setting, and stall test can be set in the parameter setting interface to achieve separate configuration of different types of test parameters and avoid confusion in parameter settings.

[0063] In an alternative embodiment, the data acquisition and processing module is further configured to: The running data is generated as a dynamic curve, and the dynamic curve is displayed through the status display interface.

[0064] Among them, dynamic curves refer to a two-dimensional graphical representation in a status display interface or a dedicated chart display interface, which is plotted in real time and continuously updated with time as the horizontal axis and one or more operating data as the vertical axis; for example, an embedded chart control in the status display interface has an automatically scrolling time window as the horizontal axis and the current value as the vertical axis. This control plots and refreshes the waveform curve of the actual phase current of the motor changing with time in real time.

[0065] In the above-mentioned optional methods, the data acquisition and processing module is further used to generate dynamic curves from the operating data and display them on the status display interface to realize the visual monitoring of the motor's operating status and facilitate the observation of data change trends.

[0066] like Figure 2As shown, the workflow of the motor control parameter calibration and testing system includes seven main stages: system initialization, file loading, communication establishment, parameter setting, test execution, data monitoring, and test termination. Specifically: 1) During the system initialization phase, the user starts the system application. The computer in hardware layer 101 establishes a physical connection with the electronic control unit under test (ECU) via the CAN communication card. The CAN communication module in communication layer 102 performs initialization and communication parameter configuration on the CAN communication card, and establishes and maintains the CAN bus communication link between the computer and the ECU under test.

[0067] 2) During the file loading phase, the user selects and loads the parameter description file through the file operation interface of the user interface layer 104. The XCP protocol module of the communication layer 102 parses the loaded parameter description file and obtains the mapping relationship between the parameter names and memory addresses inside the electronic control unit under test.

[0068] 3) During the communication establishment phase, the XCP protocol module establishes an XCP connection with the electronic control unit under test based on the established CAN bus communication link, completes the protocol handshake, and lays the channel foundation for subsequent parameter and measurement data interaction.

[0069] 4) During the parameter setting phase, the user inputs motor control parameter configuration information and specific test commands through the parameter setting interface of the user interface layer 104. The parameter setting interface includes independent input areas for configuring torque control parameters, frequency setting parameters, and stall test parameters respectively. The parameter management module of the functional layer 103, based on the acquired mapping relationship, writes the user-set parameter values ​​to the corresponding memory address of the electronic control unit under test via the XCP command, and performs a storage operation on the set parameter values.

[0070] 5) During the test execution phase, the motor control module of functional layer 103 generates a corresponding control command sequence based on the test parameters configured by the user, and sends the control command to the electronic control unit under test through the established XCP connection, thereby driving the motor to perform torque control, frequency setting or stall test.

[0071] 6) During the data monitoring phase, the data acquisition and processing module in functional layer 103 acquires the motor's operating data in real time via XCP connection, and performs calculations, filtering, and unit conversions on the acquired operating data. The processed operating data and the motor's real-time operating status are displayed on the status display interface in user interface layer 104. The data acquisition and processing module also generates dynamic curves from the operating data and plots and updates them in real time through the status display interface.

[0072] 7) At the end of the test, the user issues a stop command through the device control interface of the user interface layer 104. The system then closes the XCP connection and the CAN bus communication link, completing the test process.

[0073] The above workflow fully integrates the key technologies of this embodiment. The communication architecture based on CAN bus and XCP protocol is used throughout the communication establishment, parameter setting, test execution, and data monitoring stages, achieving stable and efficient data communication between the computer and the electronic control unit. The integration of multiple motor control modes is specifically completed by the motor control module during the test execution stage, meeting diverse testing needs. The parameter description file parsing and parameter mapping mechanism is completed during the file loading stage, providing accurate parameter addressing basis for the entire calibration and testing process. The real-time data acquisition and display system is fully demonstrated during the data monitoring stage, realizing visualized monitoring of motor operating status and parameter changes. The intuitive graphical user interface provides users with clear and convenient operation interfaces at each stage of the process through the device control interface, parameter setting interface, status display interface, and file operation interface. The stable and reliable communication mechanism is jointly guaranteed by the CAN communication module and the XCP protocol module, ensuring communication reliability throughout the entire process from parameter calibration to test execution.

[0074] Figure 3 This diagram illustrates a flowchart of an embodiment of a motor control parameter calibration and testing method provided by the present invention. Figure 3 As shown, it includes the following steps: S1. The computer at the hardware layer establishes a physical connection with the electronic control unit under test via a CAN communication card. S2. The communication layer establishes a CAN bus communication link between the computer and the electronic control unit under test (ECU). It interacts with the ECU based on the XCP protocol, parses the loaded parameter description file, and obtains the mapping relationship between the parameter names and memory addresses inside the ECU. S3, the functional layer is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, and send control commands to the electronic control unit under test to drive the motor to run, while collecting and processing the motor's running data in real time; S4, the user interface layer, provides a graphical operation interface, receives user-input parameter configuration information and test commands, and displays the motor's operating status and processed operating data.

[0075] It should be noted that the beneficial effects of the motor control parameter calibration and testing method provided in the above embodiments are the same as those of the motor control parameter calibration and testing system 100 described above, and will not be repeated here. Furthermore, the method and system embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0076] The motor control parameter calibration and testing system 100 of the present invention can be a computer program (including program code) running on a computer device. For example, the motor control parameter calibration and testing system 100 of the present invention is an application software that can be used to execute the corresponding steps in the motor control parameter calibration and testing method of the present invention.

[0077] In some embodiments, the motor control parameter calibration and testing system 100 of the present invention can be implemented in a combination of hardware and software. As an example, the motor control parameter calibration and testing system 100 of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the motor control parameter calibration and testing method of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0078] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0079] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned motor control parameter calibration and testing methods. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the motor control parameter calibration and testing method shown in any embodiment of the present invention by calling the computer program.

[0080] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0081] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0082] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0083] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0084] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0085] Among them, electronic devices can also be terminal devices. A terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0086] It should be noted that, Figure 4 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0087] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned motor control parameter calibration and testing methods.

[0088] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0089] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned motor control parameter calibration and testing method.

[0090] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0091] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0092] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0093] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0094] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0095] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0096] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0097] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A motor control parameter calibration and testing system, characterized in that, include: Hardware layer, communication layer, functional layer, and user interface layer; The hardware layer includes a computer, a CAN communication card, an electronic control unit under test (ECU) and a motor. The computer establishes a physical connection with the ECU under test through the CAN communication card. The communication layer is used to establish a CAN bus communication link between the computer and the electronic control unit under test, to perform data interaction with the electronic control unit under test based on the XCP protocol, and to parse the loaded parameter description file to obtain the mapping relationship between parameter names and memory addresses inside the electronic control unit under test. The functional layer is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, send control commands to the electronic control unit under test to drive the motor to run, and collect and process the motor's running data in real time. The user interface layer is a graphical operation interface used to receive parameter configuration information and test commands input by the user, and to display the operating status of the motor and the processed operating data.

2. The motor control parameter calibration and testing system according to claim 1, characterized in that, The CAN communication card is used for signal conversion and CAN message transmission between the computer and the electronic control unit under test.

3. The motor control parameter calibration and testing system according to claim 1, characterized in that, The communication layer includes: a CAN communication module and an XCP protocol module; The CAN communication module is used to: initialize the CAN communication card and configure communication parameters, establish and maintain the CAN bus communication link between the computer and the electronic control unit under test, and perform CAN message sending and receiving operations; The XCP protocol module is used to: establish an XCP connection with the electronic control unit under test based on the CAN bus communication link, parse the loaded parameter description file, obtain the mapping relationship between the parameter names and memory addresses inside the electronic control unit under test, and complete the parameter and measurement data interaction with the electronic control unit under test through XCP commands.

4. The motor control parameter calibration and testing system according to claim 3, characterized in that, The functional layer includes: a parameter management module, a motor control module, and a data acquisition and processing module; The parameter management module is used to: perform reading and setting operations on the parameters in the electronic control unit under test according to the mapping relationship, and store the set parameter values; The motor control module is used to: send control commands to the electronic control unit under test according to the configured test parameters, and drive the motor to perform torque control, frequency setting or stall test; The data acquisition and processing module is used to: acquire and process the operating data of the motor in real time.

5. The motor control parameter calibration and testing system according to claim 4, characterized in that, The user interface layer is a graphical operation interface, including a device control interface, a parameter setting interface, a status display interface, and a file operation interface. The device control interface is used to control the opening and closing of the CAN communication card; The parameter setting interface is used to receive the parameter configuration information and test instructions input by the user for motor control; The status display interface is used to display the operating status of the motor and the processed operating data; The file operation interface is used to load and manage parameter files related to the electronic control unit under test.

6. The motor control parameter calibration and testing system according to claim 5, characterized in that, The parameter setting interface includes independent input areas for configuring torque control parameters, frequency setting parameters, and stall test parameters, respectively.

7. The motor control parameter calibration and testing system according to claim 5, characterized in that, The data acquisition and processing module is also used for: The running data is generated as a dynamic curve, and the dynamic curve is displayed through the status display interface.

8. A method for calibrating and testing motor control parameters, employing the motor control parameter calibration and testing system as described in any one of claims 1 to 7, characterized in that, include: The computer at the hardware layer establishes a physical connection with the electronic control unit under test via a CAN communication card. The communication layer establishes a CAN bus communication link between the computer and the electronic control unit under test (ECU), performs data interaction with the ECU based on the XCP protocol, and parses the loaded parameter description file to obtain the mapping relationship between parameter names and memory addresses within the ECU. The functional layer is used to read, set and store the execution parameters of the electronic control unit under test according to the mapping relationship, send control commands to the electronic control unit under test to drive the motor to run, and collect and process the motor's running data in real time. The user interface layer provides a graphical operation interface, receives parameter configuration information and test commands input by the user, and displays the motor's operating status and processed operating data.

9. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory, the memory storing at least one computer program, which is loaded and executed by the processor to enable the electronic device to implement the motor control parameter calibration and testing method as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which, when executed by a processor, implements the motor control parameter calibration and testing method as described in claim 8.