Motor controller calibration data separation strategy

By separating the lookup model and data dictionary in the motor controller and adopting custom storage and identification records, the problem of coupling between code and calibration data is solved, the motor controller can be quickly adapted and stored securely, and the flexibility and reliability of the system are improved.

CN120848459APending Publication Date: 2025-10-28EWEA-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511011608.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

The code and calibration data in existing motor controllers are highly coupled, resulting in long development cycles, poor flexibility, chaotic storage management, security risks, and difficulty in quickly adapting to the needs of different motor models.

Method used

By reconstructing the lookup model, establishing a data dictionary and separating calibration data from code, and using custom storage types and identification records, we can achieve physical separation and storage solidification of data and code, isolate dynamic compilation and burning, and ensure independent management of data files.

Benefits of technology

This enables the motor controller to adapt to different motors without modifying the code or recompiling it, improving maintenance efficiency and system robustness, and ensuring safety and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
Patent Text Reader

Abstract

The invention discloses a motor controller calibration data separation strategy, relates to the technical field of electric vehicle driving systems, and aims to solve the problems that codes and calibration data in an existing motor controller are tightly coupled, internal storage management of the calibration data is disordered and the like. According to the strategy, physical separation of data and codes, classified storage of parameters and rapid adaptation of'one-code multi-motor 'are achieved through core means such as data physical separation and storage solidification, modeling data generation and dynamic adaptation, and meanwhile the reliability and traceability of the system are ensured through dynamic compiling verification, data identification design and the like. The method is not only suitable for an electric vehicle motor control system, but also can be extensively applied to multiple fields of industrial servo, robot control and the like, and has remarkable practical value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electric vehicle drive system technology, and in particular relates to a motor controller calibration data separation strategy. Background Technology

[0002] In the field of motor control systems, the motor controller, as the core component for achieving efficient and precise motor operation, directly affects the overall performance of the motor system. However, existing motor controllers have significant deficiencies in code and calibration data management, severely restricting the system's flexibility and reliability. First, the problem of data embedding in code is prominent; motor calibration data is usually hard-coded in code files as constants or arrays, which makes the code and data highly coupled. When a new motor needs to be adapted, the entire project must be recompiled, which greatly prolongs the development cycle, increases development costs, and makes it difficult to meet the needs of rapid iteration and diversified applications. Secondly, the system lacks dynamic adaptability. In practical application scenarios, if a motor needs to be replaced, it can only be done by burning the entire firmware. It cannot be quickly adapted by switching independent data files, resulting in poor system flexibility and difficulty in adapting to the rapid switching needs of different motor models. Third, there are risks in storage management. Because the compiler automatically allocates storage addresses, the motor MAP data and inherent parameters are interleaved during storage, resulting in a random mixed storage state. When updating data, accidental overwriting can easily occur, which not only affects the normal operation of the motor but may also cause safety hazards. While some optimization techniques exist to address the aforementioned issues, a systematic solution has yet to be developed, failing to fundamentally resolve the core problems of tight coupling between code and calibration data, and disordered internal storage management of calibration data. Therefore, a novel, end-to-end decoupled architecture and related technologies are urgently needed to overcome existing technological bottlenecks and improve the performance and adaptability of motor controllers. Summary of the Invention

[0003] The purpose of this invention is to provide a motor controller calibration data separation strategy to address the problems of low adaptation efficiency and high maintenance costs caused by the coupling of code and calibration data and the mixed storage of MAP data and inherent parameters in motor controllers.

[0004] The technical solution adopted in this invention is as follows: A motor controller calibration data separation strategy includes the following steps: Step 1: Reconstruct the data reference part of the lookup table model, and design the storage and file structure of the newly created data dictionary; Step 2: Integrate the inherent parameters of the motor controller into the data dictionary and write them to a fixed storage address; Step 3: Before compilation, select the dynamic compilation strategy for different motor calibration data and perform data isolation verification; Step 4: Design an identifier to record the motor to which the current calibration data belongs, and be able to read the identifier through the host computer; Step 5: Design for compatibility during programming, including code file filling design and separate programming of code and data.

[0005] Furthermore, step 1 specifically includes: Step 1-1: Establish a default data dictionary containing default calibration data with all zero initial values; initialize matrix data through table editing, execute a script to import the table data into BaseWorkSpace, and then use a script to automatically map the BaseWorkSpace data to the corresponding variables in the data dictionary to ensure that the data format matches the model interface; Step 1-2: Model parameter binding. In the attribute configuration page of the lookup module, associate the dynamic parameters defined in the data dictionary. The dynamic parameters include the motor external characteristics and DQ axis current parameters. Steps 1-3: In the code generation configuration, specify independent filenames for the calibration parameters in the data dictionary to physically separate the calibration data file from the code file; Steps 1-4 define an independent storage segment for each calibration parameter, design a custom storage type based on the Memory Section and apply it in the data dictionary, and declare the starting address and length of the storage segment in the ld file.

[0006] Furthermore, in step 1-1, the default calibration data includes motor external characteristic data and DQ axis current parameters.

[0007] Furthermore, in steps 1-2, the lookup module includes a Simulink two-dimensional or three-dimensional lookup module; the motor external characteristics are voltage-speed-torque relationships; and the DQ shaft current is a voltage-speed-torque-current relationship.

[0008] Furthermore, step 2 specifically includes: Step 2-1: Based on the lookup model framework established in Step 1, construct the calibration data generation model, reference the actual motor calibration data, and maintain the consistency of parameter configuration and storage type; Step 2-2: Design a structure data type that includes motor body parameters and controller inherent parameters. Define structure type parameters in the data dictionary, reference the parameter through the Constant module in the model, and convert the macro-defined constants of the original project into structure variables through the script and write them to the specified storage segment. Steps 2-3 involve developing an integrated script, selecting the motor calibration data file, inherent parameter file, and target data dictionary, automatically verifying data alignment rules, and generating a standardized data file.

[0009] Furthermore, in step 2-2, the motor body parameters include flux linkage and inductance; the controller inherent parameters include PI parameters.

[0010] Furthermore, step 3 specifically includes: Step 3-1: Use the lookup code and inherent parameter header file as common files for the project, and the motor data file as an optional file to achieve file classification and project isolation; Step 3-2: Perform custom data segment integration design, connect the data segments referenced by the motor calibration data and parameters in the definition and declaration with the data segments defined in the ld file, allocate the required storage space for the MemoryMap storage segment in the ld file according to the maximum length requirement of the default motor calibration data in the data dictionary referenced by the lookup model; Step 3-3: Select two different sets of calibration data for compilation, analyze the generated map files, and verify that the starting address of the calibration data segment is consistent and only the data length changes with the content; compare the hex files to confirm that only the content of the calibration data segment is different, while the code segment and other data segments are completely consistent. Furthermore, step 4 specifically includes: Step 4-1: Add a storage segment for the motor material number in the custom storage design and define a 4-byte constant storage space; add the parameter for the motor material number in the calibration data generation model, and select the custom storage type for data storage; Step 4-2: Define DID based on UDS protocol, send a request through host computer, the controller reads the material number and returns it, and verify the matching of material number with calibration data.

[0011] Furthermore, in step 5, code file filling involves adding virtual fill data to the end of the code area; code and data separation burning involves burning the code file in the conventional way, while the calibration data is burned separately.

[0012] The beneficial effects of this invention are as follows: This solution achieves full-process decoupling from data production to deployment through five major technical chains: data generation modeling, fixed data storage start address and data length storage address, dynamic compilation selection, explicit identification and traceability, and secure burning isolation. This allows the same controller to adapt to different motors without modifying the code or recompiling, greatly improving maintenance efficiency and ensuring the robustness of the system. Attached Figure Description

[0013] Figure 1 This is a flowchart of the present invention; Figure 2 This is a schematic diagram of the separate storage of calibration data in this invention. Detailed Implementation

[0014] The invention will now be further described with reference to the accompanying drawings.

[0015] like Figure 1 As shown, this invention is a motor controller calibration data separation strategy, including the following steps: Step 1: Reconstruct the data reference portion of the lookup table model, and design the storage and files for the newly created data dictionary to ensure fixed storage addresses for MAP data and separation of calibration data and code; the specific steps are as follows: Step 1-1, Establish Default Data Dictionary: Create a data dictionary containing default calibration data with all-zero initial values ​​for motor external characteristics and DQ axis current; Automated Matrix Data Mapping: Initialize matrix data through table editing; Execute script to import table data into BaseWorkSpace; Automatically map BaseWorkSpace data to corresponding variables in the data dictionary through script to ensure that the data format matches the model interface.

[0016] Step 1-2, Model Parameter Binding: In the property configuration page of the lookup module (such as the Simulink 2D or 3D lookup module), associate the dynamic parameters defined in the data dictionary, including the motor external characteristics (voltage-speed-torque relationship) and DQ axis current (voltage-speed-torque-current relationship) parameters.

[0017] Steps 1-3, code and data are generated separately: In the code generation configuration, specify independent filenames for the calibration parameters in the data dictionary, so that the calibration data file and the code file are physically separated.

[0018] Steps 1-4, Define custom storage type: Define an independent storage segment for each calibration parameter; design a custom storage type based on MemorySection and apply the type in the data dictionary; declare the starting address and length of the storage segment in the ld file to ensure that the compiled variable is fixed at the specified address.

[0019] Step 2: After separating the calibration data and code and fixing the storage address of the MAP data in the calibration data in Step 1, the inherent parameters of the motor controller are integrated into the data dictionary and written to the fixed storage address. For example... Figure 2 As shown, the specific steps include: Step 2-1, Model Architecture Reuse: Based on the lookup model framework established in Step 1, construct a calibration data generation model, directly reference actual motor calibration data, and maintain consistency in parameter configuration and storage type.

[0020] Step 2-2, Structure Encapsulation and Address Fixing: Design structure data types, including motor body parameters (such as flux linkage and inductance) and controller inherent parameters (such as PI parameters); define structure type parameters in the data dictionary and reference these parameters through the Constant module in the model; convert the macro-defined constants of the original project into structure variables through a script and write them to the specified storage segment.

[0021] Steps 2-3: Develop an integrated script to achieve one-click data generation: select the motor calibration data file in .mat format, the inherent parameter file in .m format, and the target data dictionary in .sldd format; automatically verify the data alignment rules; and generate a standardized data file in .c / h format.

[0022] Step 3: Implement a dynamic compilation strategy that selects different motor calibration data before compilation and performs data isolation verification; the specific steps are as follows: Step 3-1, File Classification and Project Isolation: Treat the lookup code and inherent parameter header file as common files for the project, and treat the motor data file as an optional file.

[0023] Step 3-2, Data Segment Integration Design and ld File Design: Customize the data segment integration design to interface the data segments referenced by the motor calibration data and parameters during definition and declaration with the data segments defined in the ld file; for the MemoryMap storage segment allocation in the ld file, allocate the required storage space according to the maximum length requirement of the default motor calibration data in the data dictionary referenced by the lookup model.

[0024] Step 3-3, Difference Comparison Test: Select two sets of different calibration data for compilation; analyze the generated map files: verify that the starting address of the calibration data segment is consistent, with only the data length varying with the content; compare the hex files: confirm that only the content of the calibration data segment differs, while the code segment and other data segments are completely identical. This indicates that the calibration data is stored independently and at a fixed address, and the code can be adapted to different motors without modification.

[0025] Step 4: Design an identifier to record the motor to which the current calibration data belongs, and enable the identifier to be read by the host computer; the specific steps are as follows: Step 4-1, Storage Segment Expansion: Add a storage segment for the motor part number in the custom storage design, and define a 4-byte constant storage space; Model Integration: Add the parameter of the motor part number to the calibration data generation model designed in Step 2, and select the custom storage type for data storage.

[0026] Step 4-2: Define DID based on UDS protocol and send a request through host computer; controller reads material number and returns; verify the matching of material number with calibration data to prevent misuse.

[0027] Step 5: Programming compatibility design, the specific steps are as follows: Step 5-1, Code file padding design: Add virtual padding data at the end of the code section to ensure the programmer passes the verification.

[0028] Step 5-2, Separate burning of code and data: The code file containing the padding data is burned using the conventional method, while the calibration data can be burned separately.

[0029] Through the above steps, the present invention achieves: 1. Physical separation and storage solidification of data: Based on the parameterized data dictionary, an independent calibration data file is generated. By customizing the storage type and linking script, a specific Flash storage area is forced to be specified, thereby realizing the physical separation of data and code and the classification and storage of parameters.

[0030] 2. Model-based data generation and dynamic adaptation: Construct a model that integrates motor body parameters and controller parameters, develop scripts to automate the conversion from raw data to C code, and dynamically select files through script compilation to achieve "one code for multiple motors" adaptation.

[0031] This invention achieves full-process decoupling from data production to deployment through five major technical chains: data generation modeling, fixed data storage start address and data length storage address, dynamic compilation selection, explicit identification and traceability, and secure burning isolation. This allows the same controller to be adapted to different motors without modifying the code or recompiling, greatly improving maintenance efficiency and ensuring system robustness.

Claims

1. A motor controller calibration data separation strategy, characterized in that, The following steps are involved: Step 1: Reconstruct the data reference part of the lookup table model, and design the storage and file structure of the newly created data dictionary; Step 2: Integrate the inherent parameters of the motor controller into the data dictionary and write them to a fixed storage address; Step 3: Before compilation, select the dynamic compilation strategy for different motor calibration data and perform data isolation verification; Step 4: Design an identifier to record the motor to which the current calibration data belongs, and be able to read the identifier through the host computer; Step 5: Design for compatibility during programming, including code file filling design and separate programming of code and data.

2. The motor controller calibration data separation strategy according to claim 1, characterized in that, Step 1 specifically includes: Step 1-1: Establish a default data dictionary, which contains default calibration data with all zero initial values; initialize matrix data through table editing, execute a script to import the table data into BaseWorkSpace, and then use a script to automatically map the BaseWorkSpace data to the corresponding variables in the data dictionary to ensure that the data format matches the model interface; Step 1-2: Model parameter binding. In the attribute configuration page of the lookup module, associate the dynamic parameters defined in the data dictionary. The dynamic parameters include the motor external characteristics and DQ axis current parameters. Steps 1-3: In the code generation configuration, specify independent filenames for the calibration parameters in the data dictionary to physically separate the calibration data file from the code file; Steps 1-4 define an independent storage segment for each calibration parameter, design a custom storage type based on the Memory Section and apply it in the data dictionary, and declare the starting address and length of the storage segment in the ld file.

3. The motor controller calibration data separation strategy according to claim 2, characterized in that: In step 1-1, the default calibration data includes motor external characteristic data and DQ axis current parameters.

4. The motor controller calibration data separation strategy according to claim 2, characterized in that: In steps 1-2, the lookup module includes a Simulink two-dimensional or three-dimensional lookup module; the motor external characteristics are voltage-speed-torque relationships; and the DQ axis current is a voltage-speed-torque-current relationship.

5. The motor controller calibration data separation strategy according to claim 1, characterized in that, Step 2 specifically includes: Step 2-1: Based on the lookup model framework established in Step 1, construct the calibration data generation model, reference the actual motor calibration data, and maintain the consistency of parameter configuration and storage type; Step 2-2: Design a structure data type that includes motor body parameters and controller inherent parameters. Define structure type parameters in the data dictionary, reference the parameter through the Constant module in the model, and convert the macro-defined constants of the original project into structure variables through the script and write them to the specified storage segment. Steps 2-3 involve developing an integrated script, selecting the motor calibration data file, inherent parameter file, and target data dictionary, automatically verifying data alignment rules, and generating a standardized data file.

6. The motor controller calibration data separation strategy according to claim 4, characterized in that, In step 2-2, the motor body parameters include flux linkage and inductance; the controller inherent parameters include PI parameters.

7. The motor controller calibration data separation strategy according to claim 1, characterized in that, Step 3 specifically includes: Step 3-1: Use the lookup code and inherent parameter header file as common files for the project, and the motor data file as an optional file to achieve file classification and project isolation; Step 3-2: Perform custom data segment integration design, connect the data segments referenced by the motor calibration data and parameters in the definition and declaration with the data segments defined in the ld file, allocate the required storage space for the MemoryMap storage segment in the ld file according to the maximum length requirement of the default motor calibration data in the data dictionary referenced by the lookup model; Step 3-3: Select two different sets of calibration data for compilation, analyze the generated map files, and verify that the starting address of the calibration data segment is consistent and only the data length changes with the content; compare the hex files to confirm that only the content of the calibration data segment is different, while the code segment and other data segments are completely consistent.

8. The motor controller calibration data separation strategy according to claim 1, characterized in that, Step 4 specifically includes: Step 4-1: Add a storage segment for the motor material number in the custom storage design and define a 4-byte constant storage space; add the parameter for the motor material number in the calibration data generation model, and select the custom storage type for data storage; Step 4-2: Define DID based on UDS protocol, send a request through host computer, the controller reads the material number and returns it, and verify the matching of material number with calibration data.

9. The motor controller calibration data separation strategy according to claim 1, characterized in that, In step 5, the code file filling is to add virtual padding data to the end of the code area; the code and data separation burning is to burn the code file in the conventional way and burn the calibration data separately.