Electronic controller control parameter debugging method
By dividing the storage area for the control parameter list in the memory of the electronic controller, the problems of cumbersome control parameter debugging operations, high cost and low security in the prior art are solved, and efficient and safe control parameter debugging is achieved, reducing maintenance costs.
Patent Information
- Application Number
- CN202411810202.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the debugging of control parameters requires frequent code modification and writing of solidification software, resulting in cumbersome operation, high cost and low security.
By dividing the storage area for the control parameter list in the memory of the electronic controller, the adjustable parameter configuration file is solidified to this area, and the debug value is read after power-on and tested until the debug value that meets the control requirements is used as the final control parameter.
It improves the efficiency and safety of control parameter debugging, reduces product maintenance costs, simplifies operation, and is suitable for a wide range of applications in the field of power control.
Smart Images

Figure CN119805991A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power control and relates to a method for debugging control parameters of an electronic controller. Background Art
[0002] The core of the power control system is the control algorithm. During the debugging phase, depending on the controlled object, it is often necessary to frequently and dynamically adjust a large number of control algorithm parameters. These control parameters are used for engine control and fault diagnosis. The accuracy of the control parameters directly affects the function, performance and safety of the engine. Therefore, the safety criticality level of these control parameters is relatively high.
[0003] At present, the commonly used control parameter debugging method in engineering is: the software developer repeatedly modifies the code according to the parameter requirements proposed by the system personnel, and re-burns the firmware with the modified code each time. This method is cumbersome to operate and requires the presence of the software developer, which wastes manpower costs. In addition, this method of modifying the software on site has great safety risks.
[0004] However, in essence, the change of control parameters does not require the modification of the control software. Therefore, the present invention intends to provide a method that is simple to operate and can adapt to the debugging requirements of different electronic controllers to the greatest extent, so as to improve the efficiency and safety of control parameter debugging and reduce product maintenance costs. Summary of the invention
[0005] In order to solve the technical problems in the prior art that the control parameter debugging requires repeated modification of the control parameter code and burning and solidification, resulting in cumbersome debugging operations, high costs and low safety, the present invention discloses a control parameter debugging method for an electronic controller, the method comprising the following steps:
[0006] S1. Obtain a control parameter list for debugging the electronic controller according to the control requirements of the electronic controller, and allocate a storage area for the control parameter list, wherein the control parameter list includes adjustable parameters and fixed parameters;
[0007] S2. Writing the debugging value of the adjustable parameter into the adjustable parameter configuration file according to the debugging working condition to obtain a binary configuration file, and solidifying the binary configuration file into the control parameter list of the storage area;
[0008] S3, after the electronic controller is powered on or reset, the debugging values in the control parameter list are read into the global variables in the memory, and the electronic controller test is performed to obtain test data;
[0009] S4. Modify the debugging value according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller.
[0010] Furthermore, in step S1, the control requirements of the electronic controller include control rate requirements and control timing requirements.
[0011] Furthermore, in step S1, allocating a storage area for the control parameter list includes:
[0012] S11, analyzing each adjustable parameter in the control parameter list to obtain the number of occupied bytes, and calculating the sum of the number of occupied bytes of all the adjustable parameters to obtain a first number of bytes;
[0013] S12, calculating the sum of the number of bytes occupied by all the fixed parameters in the control parameter list to obtain a second number of bytes;
[0014] S13, allocating a storage area for the control parameter list in a non-volatile memory, so that the space of the storage area is larger than the sum of the first number of bytes and the second number of bytes;
[0015] S14. Allocate a storage area in the storage region for each of the adjustable parameters, and the space of the storage area of each of the adjustable parameters is greater than or equal to the number of bytes occupied by it.
[0016] Further, in step S2, the debugging value of each adjustable parameter is written into the adjustable parameter configuration file according to the dynamic debugging working condition to obtain a binary configuration file, including:
[0017] S21, establishing an adjustable parameter configuration file, wherein the adjustable parameter configuration file includes a parameter name item, a parameter type item, a value range item, a parameter value item, and a default value item of each adjustable parameter;
[0018] S22, parsing each of the adjustable parameters to obtain relevant information, the relevant information including parameter name, parameter type, value range and default value, and writing the relevant information into the adjustable parameter configuration file;
[0019] S23. Setting a debugging value for each of the adjustable parameters according to the dynamic debugging test conditions, writing the debugging value into the parameter value item of each of the adjustable parameters, and converting the adjustable parameter configuration file filled with data to obtain the binary configuration file.
[0020] Furthermore, step S23 also includes: judging the written debugging value according to the value range of each adjustable parameter, and outputting a write error signal when the debugging value is greater than the value range.
[0021] Further, in step S3, after the electronic controller is powered on or reset, the debugging value in the control parameter list is read into the global variable in the memory, including:
[0022] S31, after the electronic controller is powered on or reset, the control parameter list of the storage area is read into the memory to calculate a new checksum of all the debugging values;
[0023] S32, comparing the new checksum with the checksum of the control parameter list for consistency, if the comparison results are consistent, storing the debugging value read into the memory into the global variable; if the comparison results are inconsistent, using the default value item to replace the debugging value read into the memory and storing it in the global variable.
[0024] Further, in step S4, the debugging value is corrected according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller, including:
[0025] S41, calculating the control rate and the control sequence according to the test data, and modifying the debugging value in the adjustable parameter configuration file according to the control rate, the control sequence and the control requirement of the electronic controller;
[0026] S42, re-solidifying the modified adjustable parameter configuration file to the control parameter list of the storage area, and performing an electronic controller test after the electronic controller is powered on or reset, until a debugging value that meets the control requirements of the electronic controller is obtained as the final control parameter of the electronic controller.
[0027] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above technical solutions adopted in the embodiments of this specification include at least: the method of the present invention solidifies the adjustable parameter configuration file written with the debugging value into the storage area by dividing a storage area for the control parameter list in the memory of the electronic controller, and reads the debugging value from the storage area through the memory after power-on to perform debugging tests until the debugging value that meets the control requirements is obtained as the final control parameter of the electronic controller. This method can improve the current situation where a large number of control parameter changes require software modification and improve the maintainability of the software; it can reduce the maintenance cost of the product and improve the efficiency of control system algorithm development, debugging, and joint testing; it does not limit the use scenario and can be easily transplanted to projects with similar control parameters, calibration parameters, etc., and it is simple to operate and has a wide range of application scenarios in the field of power control. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 It is a flow chart of a method for debugging control parameters of an electronic controller disclosed in an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of the interconnection between the maintenance device and the electronic controller used in the control parameter debugging method disclosed in an embodiment of the present invention;
[0031] Figure 3 The present invention discloses a flowchart of reading a debugging value in a control parameter list into a global variable in a memory. DETAILED DESCRIPTION
[0032] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0033] The following describes the implementation methods of the present application through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and the features of the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0034] The present invention discloses a method for debugging control parameters of an electronic controller, see Figure 1 and Figure 2 As shown, the method comprises the following steps:
[0035] S1. Obtain a control parameter list for debugging the electronic controller according to the control requirements of the electronic controller, and allocate a storage area for the control parameter list, wherein the control parameter list includes adjustable parameters and fixed parameters;
[0036] S2. Writing the debugging value of the adjustable parameter into the adjustable parameter configuration file according to the debugging working condition to obtain a binary configuration file, and solidifying the binary configuration file into the control parameter list of the storage area;
[0037] S3, after the electronic controller is powered on or reset, the debugging values in the control parameter list are read into the global variables in the memory, and the electronic controller test is performed to obtain test data;
[0038] S4. Modify the debugging value according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller.
[0039] Furthermore, in step S1, the electronic controller control requirements include control rate requirements and control timing requirements. According to the control rate requirements and control timing requirements, adjustable parameters as shown in the following Table 1 can be extracted:
[0040] Table 1: List of adjustable parameters
[0041] Serial number Tunable parameter name Parameter Type Parameter value range 1 Temperature limit Single point 0~500 2 Speed point 1 Single point 0~100 3 Speed point 2 Single point 0~100 4 Oil quantity calculation table Two-dimensional table, 2 rows and 6 columns x∈[0,30],y∈[0,60]
[0042] Furthermore, in step S1, allocating a storage area for the control parameter list includes:
[0043] S11, analyzing each adjustable parameter in the control parameter list to obtain the number of occupied bytes, and calculating the sum of the number of occupied bytes of all the adjustable parameters to obtain a first number of bytes;
[0044] S12, calculating the sum of the number of bytes occupied by all the fixed parameters in the control parameter list to obtain a second number of bytes;
[0045] S13, allocating a storage area for the control parameter list in a non-volatile memory, so that the space of the storage area is larger than the sum of the first number of bytes and the second number of bytes;
[0046] S14. Allocate a storage area in the storage region for each of the adjustable parameters, and the space of the storage area of each of the adjustable parameters is greater than or equal to the number of bytes occupied by it.
[0047] When dividing the storage area, the non-volatile memory used can be NVRAM, which is located in the electronic controller and has a space size of 256KB. According to the total number of bytes occupied by the adjustable parameters, the area shown in Table 2 can be allocated to it, where the storage area space allocation of each adjustable parameter is shown in Table 3 and Table 4:
[0048] Table 2: Storage location of adjustable parameters in NVRAM
[0049] Tunable parameter storage area Starting address Reserved length Adjustable parameters area 0x0 4KB
[0050] Table 3: Storage space allocation for each parameter
[0051]
[0052] Table 4: Storage space allocation for fuel calculation table
[0053] x: speed (%) 5 10 15 20 25 30 y: Oil volume (kg / h) 10 20 30 40 50 60
[0054] Further, in step S2, the debugging value of each adjustable parameter is written into the adjustable parameter configuration file according to the dynamic debugging working condition to obtain a binary configuration file, including:
[0055] S21. Create an adjustable parameter configuration file, wherein the adjustable parameter configuration file includes a parameter name item, a parameter type item, a value range item, a parameter value item, and a default value item of each adjustable parameter; wherein the adjustable parameter configuration file may be in .xlsx format.
[0056] S22. Analyze each adjustable parameter to obtain relevant information, including parameter name, parameter type, value range and default value, and write the relevant information into the adjustable parameter configuration file. The purpose of setting the default value item is to provide a set of default values to avoid the situation where the controller has no parameters available when the debugging value fails to be read, which affects the control safety. When the debugging value is read into the memory for verification, if the checksum is inconsistent, it means that the debugging value acquisition failed. At this time, the default value can be used to replace it to ensure the normal progress of this debugging.
[0057] S23. Setting a debugging value for each adjustable parameter according to the dynamic debugging test conditions, writing the debugging value into the parameter value item of each adjustable parameter, and converting the adjustable parameter configuration file filled with data to obtain the binary configuration file, wherein the format of the binary configuration file is .bin.
[0058] In specific implementations, the tunable parameter configuration file can be in Figure 2 The software maintenance tool shown in the figure performs debugging value writing and file format conversion, and loads and solidifies the converted binary configuration file into the corresponding position of the storage area in the non-volatile memory.
[0059] Furthermore, step S23 also includes: judging the written debugging value according to the value range of each adjustable parameter, and outputting a write error signal when the debugging value is greater than the value range.
[0060] Further, in step S3, after the electronic controller is powered on or reset, the debugging value in the control parameter list is read into the global variable in the memory, see Figure 3 As shown, including:
[0061] S31, after the electronic controller is powered on or reset, the control parameter list of the storage area is read into the memory, and a new checksum of all the debugging values is calculated, that is, all data within the range of a starting address of 0x0 and a length of 4KB are written into the memory.
[0062] The checksum is calculated by accumulating all bytes except the checksum in the read file, inverting and adding one, and taking the lower eight bits as the new checksum.
[0063] S32, comparing the new checksum with the checksum of the control parameter list for consistency, if the comparison results are consistent, storing the debugging value read into the memory into the global variable; if the comparison results are inconsistent, using the default value item to replace the debugging value read into the memory and storing it in the global variable.
[0064] Further, in step S4, the debugging value is corrected according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller, including:
[0065] S41, calculating the control rate and the control sequence according to the test data, and modifying the debugging value in the adjustable parameter configuration file according to the control rate, the control sequence and the control requirement of the electronic controller;
[0066] S42, re-solidifying the modified adjustable parameter configuration file to the control parameter list of the storage area, and performing an electronic controller test after the electronic controller is powered on or reset, until a debugging value that meets the control requirements of the electronic controller is obtained as the final control parameter of the electronic controller.
[0067] The method of the present invention allocates a storage area for the control parameter list in the memory of the electronic controller, solidifies the adjustable parameter configuration file with the debug value written into the storage area, and reads the debug value from the storage area through the memory after power-on to perform a debug test until the debug value that meets the control requirement is obtained as the final control parameter of the electronic controller. The method can improve the current situation that a large number of control parameter changes require software modification and improve the maintainability of the software; it can reduce the maintenance cost of the product and improve the efficiency of control system algorithm development, debugging, and joint testing; it does not limit the use scenario and can be easily transplanted to projects with similar control parameters, calibration parameters, etc., and is simple to operate, and has a wide range of application scenarios in the field of power control.
[0068] Obviously, those skilled in the art should understand that the various steps of the embodiments of the present invention can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0069] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for debugging control parameters of an electronic controller, characterized in that: include: Acquire a control parameter list for debugging the electronic controller according to the control requirements of the electronic controller, and allocate a storage area for the control parameter list, wherein the control parameter list includes adjustable parameters and fixed parameters; Writing the debugging value of the adjustable parameter into the adjustable parameter configuration file according to the debugging working condition to obtain a binary configuration file, and fixing the binary configuration file to the control parameter list in the storage area; After the electronic controller is powered on or reset, the debugging values in the control parameter list are read into the global variables in the memory, and the electronic controller test is performed to obtain test data; The debugging value is modified according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller.
2. The electronic controller control parameter debugging method according to claim 1, characterized in that: The electronic controller control requirements include control rate requirements and control timing requirements.
3. The electronic controller control parameter debugging method according to claim 1, characterized in that: Allocating a storage area for the control parameter list includes: Analyze each of the adjustable parameters in the control parameter list to obtain the number of occupied bytes, and calculate the sum of the number of occupied bytes of all the adjustable parameters to obtain a first number of bytes; Calculate the sum of the number of bytes occupied by all the fixed parameters in the control parameter list to obtain a second number of bytes; Allocate a storage area for the control parameter list in a non-volatile memory so that the space of the storage area is larger than the sum of the first number of bytes and the second number of bytes; A storage area is allocated in the storage region for each of the adjustable parameters, and the space of the storage area of each of the adjustable parameters is greater than or equal to the number of bytes occupied by the storage area.
4. The electronic controller control parameter debugging method according to claim 1, characterized in that: According to the dynamic debugging condition, the debugging value of each adjustable parameter is written into the adjustable parameter configuration file to obtain a binary configuration file, including: Establishing an adjustable parameter configuration file, wherein the adjustable parameter configuration file includes a parameter name item, a parameter type item, a value range item, a parameter value item and a default value item of each adjustable parameter; Parsing each of the adjustable parameters to obtain relevant information, the relevant information including parameter name, parameter type, value range and default value, and writing the relevant information into the adjustable parameter configuration file; A debugging value is set for each of the adjustable parameters according to the dynamic debugging test conditions, the debugging value is written into the parameter value item of each of the adjustable parameters, and the adjustable parameter configuration file filled with data is converted to obtain the binary configuration file.
5. The electronic controller control parameter debugging method according to claim 4, characterized in that: The written debugging value is judged by the value range of each adjustable parameter, and when the debugging value is greater than the value range, a write error signal is output.
6. The electronic controller control parameter debugging method according to claim 4, characterized in that: After the electronic controller is powered on or reset, the debugging values in the control parameter list are read into the global variables in the memory, including: After the electronic controller is powered on or reset, the control parameter list of the storage area is read into the memory to calculate a new checksum of all the debugging values; The new checksum is compared with the checksum of the control parameter list for consistency. If the comparison results are consistent, the debugging value read into the memory is stored in the global variable; if the comparison results are inconsistent, the default value item is used to replace the debugging value read into the memory and stored in the global variable.
7. The electronic controller control parameter debugging method according to claim 1, characterized in that: The debugging value is modified according to the test data and the control requirement of the electronic controller until a debugging value that meets the control requirement of the electronic controller is obtained as a final control parameter of the electronic controller, including: Calculate the control rate and control timing according to the test data, and modify the debugging value in the adjustable parameter configuration file according to the control rate, the control timing and the control requirements of the electronic controller; The modified adjustable parameter configuration file is re-solidified into the control parameter list of the storage area, and the electronic controller is tested after the electronic controller is powered on or reset, until the debugging value that meets the control requirement of the electronic controller is obtained as the final control parameter of the electronic controller.
Citation Information
Patent Citations
Method for protecting software startup parameter zone
CN101042652A
Mechanical engineering electronic controller parameter debugging method
CN104155972A
Control system software design method and control system software change method
CN112527279A
Controller online parameter configuration method and system and program burning method and device
CN115586912A