Parameter determination method and apparatus

By dividing the motor's operating status data into real-time and non-real-time data and transmitting them to the host computer within the target communication cycle, the problem that low-speed interfaces cannot meet online parameter adjustment needs is solved, and low-cost online parameter adjustment and real-time data transmission are achieved.

CN115866448BActive Publication Date: 2026-06-19BEIJING RUNKE GENERAL TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING RUNKE GENERAL TECH
Filing Date
2022-11-25
Publication Date
2026-06-19

Smart Images

  • Figure CN115866448B_ABST
    Figure CN115866448B_ABST
Patent Text Reader

Abstract

This application discloses a parameter determination method and apparatus. The method is applied to a controller with a low-speed interface and includes: receiving target control parameters sent by a host computer; controlling motor operation based on the target control parameters; acquiring non-real-time operating status data of the motor based on a target communication cycle; acquiring real-time operating status data of the motor based on the target control cycle; and transmitting the real-time and non-real-time operating status data to the host computer via the low-speed interface based on the target communication cycle and target communication rate. This allows the host computer to determine whether the motor's operating state meets the target operating state, and if the motor's operating state meets the target operating state, to determine the target control parameters as the control parameters corresponding to the motor. This enables online parameter tuning based on a low-cost low-speed interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and in particular relates to a parameter determination method and apparatus. Background Technology

[0002] When debugging motor control parameters, a simulator is typically used to communicate between the host computer and the controller via a Joint Test Action Group (JTAG) interface. Since the JTAG interface allows for real-time data transmission and reception, online debugging of control parameters is possible. However, in some environments, communication between the host computer and the controller via the JTAG interface may not be possible. For example, in non-laboratory environments, a JTAG interface may not be available. In such cases, online debugging of control parameters is impossible, and offline parameter tuning is the only option. This means that the modified program must be permanently installed into the controller for each debugging session, which is very inefficient.

[0003] In related technologies, controllers equipped with high-speed interfaces such as traditional 100Mbps Ethernet or Ethernet for Control Automation Technology (EtherCAT) can achieve real-time data transmission between the host computer and the controller through these high-speed interfaces. However, controllers with traditional 100Mbps Ethernet or EtherCAT interfaces are typically expensive. Therefore, many controllers only have low-speed interfaces. Due to bandwidth limitations, low-speed interfaces usually cannot meet the real-time data transmission requirements of online parameter tuning. Therefore, in related technologies, online parameter tuning cannot be achieved through low-speed interfaces. Summary of the Invention

[0004] This application provides a parameter determination method and apparatus that can increase the proportion of real-time operating status data within a single target communication cycle, thereby improving the efficiency of transmitting real-time operating status data via low-speed interfaces, meeting the requirements of online parameter tuning for real-time data transmission, and realizing online parameter tuning based on low-cost low-speed interfaces.

[0005] In a first aspect, embodiments of this application provide a parameter determination method applied to a controller with a low-speed interface, the method comprising:

[0006] Receive target control parameters sent by the host computer.

[0007] Motor operation is controlled based on target control parameters.

[0008] Non-real-time operating status data of the motor is acquired based on the target communication cycle, and real-time operating status data of the motor is acquired based on the target control cycle.

[0009] Based on the target communication cycle and target communication rate, real-time and non-real-time operating status data are transmitted to the host computer via a low-speed interface. The host computer then uses this data to determine whether the motor's operating status meets the target operating status. If the motor's operating status meets the target operating status, the host computer determines the target control parameters as the corresponding control parameters for the motor.

[0010] The target control period is the control period corresponding to the target control parameter. The target control period is less than the target communication period. Within the target communication period, the maximum data length transmitted by the low-speed interface based on the target communication rate is not less than the total data length of the real-time operating status data and the non-real-time operating status data.

[0011] Secondly, embodiments of this application provide a parameter determination device applied to a controller with a low-speed interface, the device comprising:

[0012] The receiving module is used to receive the target control parameters sent by the host computer.

[0013] The control module is used to control the motor operation based on target control parameters.

[0014] The first acquisition module is used to acquire non-real-time operating status data of the motor based on the target communication cycle, and to acquire real-time operating status data of the motor based on the target control cycle.

[0015] The transmission module is used to transmit real-time and non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate. This allows the host computer to determine whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data. If the motor's operating status meets the target operating status, the host computer determines the target control parameters as the control parameters corresponding to the motor.

[0016] The target control period is the control period corresponding to the target control parameter. The target control period is less than the target communication period. Within the target communication period, the maximum data length transmitted by the low-speed interface based on the target communication rate is not less than the total data length of the real-time operating status data and the non-real-time operating status data.

[0017] Thirdly, embodiments of this application provide an electronic device, the device comprising: a processor and a memory storing computer program instructions.

[0018] When the processor executes the computer program instructions, it implements the parameter determination method as shown in any embodiment of the first aspect.

[0019] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the parameter determination method shown in any embodiment of the first aspect.

[0020] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the parameter determination method shown in any embodiment of the first aspect.

[0021] In the parameter determination method and apparatus of this application embodiment, the controller can receive target control parameters sent by the host computer, control the motor to run based on the target control parameters, obtain non-real-time operating status data of the motor based on the target communication cycle, and obtain real-time operating status data of the motor based on the target control cycle. Then, based on the target communication cycle and the target communication rate, the real-time operating status data and non-real-time operating status data are transmitted to the host computer through a low-speed interface, so that the host computer can determine whether the operating status of the motor meets the target operating status based on the real-time operating status data and non-real-time operating status data, and determine the target control parameters as the control parameters corresponding to the motor if the operating status of the motor meets the target operating status. In this embodiment, the motor's operating status data is divided into real-time operating status data and non-real-time operating status data. Non-real-time operating status data is obtained based on a target communication cycle, and real-time operating status data is obtained based on a target control cycle. Since the target control cycle is the control cycle corresponding to the target control parameters and is shorter than the target communication cycle, by obtaining the motor's non-real-time operating status data based on the target communication cycle and the motor's real-time operating status data based on the target control cycle, and transmitting the real-time and non-real-time operating status data through a low-speed interface based on the target communication cycle, the proportion of real-time operating status data within a single target communication cycle can be increased. This improves the efficiency of transmitting real-time operating status data through the low-speed interface, meets the requirements of online parameter tuning for real-time data transmission, and realizes online parameter tuning based on a low-cost low-speed interface. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a parameter determination method provided in one embodiment of this application.

[0024] Figure 2This is a schematic diagram of an RS422 underlying communication basic frame format provided in one embodiment of this application.

[0025] Figure 3 This is a schematic diagram of the structure of a parameter determination device according to an embodiment of this application.

[0026] Figure 4 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation

[0027] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0029] As mentioned in the background section, when debugging the control parameters of a motor, a simulator is typically used to achieve communication between the host computer and the controller via a JTAG interface. Since data can be sent and received in real time via the JTAG interface, online debugging of control parameters is possible. However, in some environments, communication between the host computer and the controller via the JTAG interface may not be possible. For example, in non-laboratory environments, a JTAG interface may not be available. In such cases, online debugging of control parameters is impossible, and only offline parameter tuning methods can be used. This means that the modified program must be permanently installed into the controller for debugging each time, which is very inefficient.

[0030] In related technologies, controllers equipped with traditional 100Mbps Ethernet or EtherCAT high-speed interfaces can realize real-time data transmission between the host computer and the controller through high-speed interfaces. However, controllers equipped with traditional 100Mbps Ethernet or EtherCAT high-speed interfaces are usually expensive. Therefore, many controllers only have low-speed interfaces. Due to bandwidth limitations, low-speed interfaces usually cannot meet the real-time data transmission requirements of online parameter tuning.

[0031] For example, the motor can be a servo motor, and the controller can be a servo controller. The servo controller's control of the motor can be divided into three control loops: current loop, speed loop, and position loop. To meet control accuracy requirements, the control period of the current loop is typically set to 50µs, the control period of the speed loop to 1ms, and the control period of the position loop to 5ms. Typically, downlink data frames (data frames sent from the host computer to the servo controller) transmit control commands and parameters, along with fixed frame headers, counters, checksums, and frame trailers. A single frame length usually does not exceed 40 bytes. Uplink data frames (data frames sent from the servo controller to the host computer) contain fixed information such as frame headers, counters, checksums, and frame trailers, as well as monitoring information such as the controller's position, speed, current, voltage, and temperature, and fault detection results. A single frame length is typically not less than 40 bytes.

[0032] Taking online parameter tuning to meet current loop requirements as an example, for a controller with a traditional 100Mbps Ethernet or EtherCAT high-speed interface, its transmission rate is 100Mbps, and theoretically, the number of bytes that can be transmitted within 50µs is: It can meet the bandwidth requirements for real-time data transmission during online parameter tuning; however, for servo controller products with only low-speed serial communication interfaces, the standard transmission rate they typically support is 115.2Kbps, and the maximum non-standard transmission rate they support is 691.2Kbps. Theoretically, the maximum number of bytes that can be transmitted within 50us is: It cannot meet the bandwidth requirements for real-time data transmission in online parameter tuning.

[0033] Therefore, in related technologies, online parameter tuning cannot be achieved through low-speed interfaces.

[0034] Based on this, embodiments of this application provide a parameter determination method and apparatus. The controller can receive target control parameters sent by a host computer and control the motor operation based on the target control parameters. Then, it can obtain non-real-time operating status data of the motor based on the target communication cycle and real-time operating status data of the motor based on the target control cycle. Then, based on the target communication cycle and the target communication rate, it transmits the real-time operating status data and non-real-time operating status data to the host computer through a low-speed interface, so that the host computer can determine whether the operating status of the motor meets the target operating status based on the real-time operating status data and non-real-time operating status data. If the operating status of the motor meets the target operating status, the target control parameters are determined to be the control parameters corresponding to the motor. In this embodiment, the motor's operating status data is divided into real-time operating status data and non-real-time operating status data. Non-real-time operating status data is acquired based on a target communication cycle, and real-time operating status data is acquired based on a target control cycle. Since the target control cycle is the control cycle corresponding to the target control parameters and is shorter than the target communication cycle, by acquiring the motor's non-real-time operating status data based on the target communication cycle and acquiring the motor's real-time operating status data in real time, and transmitting the real-time and non-real-time operating status data through a low-speed interface based on the target communication cycle, the proportion of real-time operating status data within a single target communication cycle can be increased. This improves the efficiency of transmitting real-time operating status data through the low-speed interface, meets the requirements of online parameter tuning for real-time data transmission, and realizes online parameter tuning based on a low-cost low-speed interface.

[0035] Figure 1 A flowchart illustrating a parameter determination method provided in one embodiment of this application is shown.

[0036] like Figure 1 As shown, the execution entity of this parameter determination method can be a controller with a low-speed interface, and the parameter determination method may include the following steps:

[0037] S110 receives the target control parameters sent by the host computer.

[0038] S120 controls motor operation based on target control parameters.

[0039] S130: Obtain non-real-time operating status data of the motor based on the target communication cycle, and obtain real-time operating status data of the motor based on the target control cycle.

[0040] S140, based on the target communication cycle and target communication rate, transmits real-time operating status data and non-real-time operating status data to the host computer through a low-speed interface, so that the host computer can determine whether the motor's operating status meets the target operating status based on the real-time operating status data and non-real-time operating status data, and if the motor's operating status meets the target operating status, determine the target control parameters as the control parameters corresponding to the motor.

[0041] Therefore, the controller can receive the target control parameters sent by the host computer and control the motor operation based on the target control parameters. It can then obtain the non-real-time operating status data of the motor based on the target communication cycle and the real-time operating status data of the motor based on the target control cycle. Then, based on the target communication cycle and the target communication rate, it transmits the real-time and non-real-time operating status data to the host computer through a low-speed interface. This allows the host computer to determine whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data. If the motor's operating status meets the target operating status, the controller determines the target control parameters as the control parameters corresponding to the motor. In this embodiment, the motor's operating status data is divided into real-time operating status data and non-real-time operating status data. Non-real-time operating status data is acquired based on a target communication cycle, and real-time operating status data is acquired based on a target control cycle. Since the target control cycle is the control cycle corresponding to the target control parameters and is shorter than the target communication cycle, by acquiring the motor's non-real-time operating status data based on the target communication cycle and acquiring the motor's real-time operating status data in real time, and transmitting the real-time and non-real-time operating status data through a low-speed interface based on the target communication cycle, the proportion of real-time operating status data within a single target communication cycle can be increased. This improves the efficiency of transmitting real-time operating status data through the low-speed interface, meets the requirements of online parameter tuning for real-time data transmission, and realizes online parameter tuning based on a low-cost low-speed interface.

[0042] Regarding S110, the host computer connects to the controller and can be used to send target control parameters to the controller. These target control parameters may include one of the following: current loop control parameters, speed loop control parameters, and position loop control parameters.

[0043] Involving S120, the controller is connected to the motor. After the host computer sends the target control parameters to the controller, the controller can control the motor to run based on the target control parameters.

[0044] Regarding S130, the target control cycle can be the control cycle corresponding to the target control parameters, such as the current loop control cycle, speed loop control cycle, or position loop control cycle. The target control cycle is shorter than the target communication cycle. The uplink data frames sent by the controller to the host computer can include real-time operating status data with high real-time requirements and non-real-time operating status data with low real-time requirements. Based on this target communication cycle, the controller can periodically acquire the non-real-time operating status data of the motor, and based on the target control cycle, periodically acquire the real-time operating status data of the motor. The target communication cycle can be the communication cycle between the controller and the host computer via a low-speed interface. The target control cycle can be much shorter than the target communication cycle; therefore, within a single target communication cycle, the controller can acquire one set of non-real-time operating status data and multiple sets of real-time operating status data.

[0045] The distinction between non-real-time and real-time operating status data can be based on actual online parameter tuning requirements, and no specific distinction is made here.

[0046] For example, when adjusting the parameters of the current control loop online, the data that needs to meet the real-time transmission interval of the target control cycle can be the three-phase current value, while the remaining fixed-length data information such as frame header, counter, frame tail, status monitoring and status data does not need to meet the real-time transmission requirement.

[0047] In some implementations, to make the parameter determination method provided in this application more widely applicable, the real-time operating status data may include one of current data, speed data, and position data.

[0048] Since real-time operating status data may include one of current data, speed data, and position data, the parameter determination method provided in this application embodiment can be applied to online parameter adjustment of any one of the current loop, speed loop, and position loop.

[0049] In some implementations, real-time operating status data may include current data, meaning that the current control loop can be adjusted online.

[0050] Typically, the control cycle of the current loop is less than that of the speed loop, which in turn is less than that of the position loop. In other words, the current loop responds the fastest, and the position loop responds the slowest. Therefore, for the same external communication interface, if the online parameter tuning requirements of the current loop can be met, the online parameter tuning requirements of both the speed and position loops can also be met. Thus, online parameter tuning can be performed only on the current loop.

[0051] In some implementations, to reduce the bandwidth requirements of online parameter tuning, the method may further include the following before S130:

[0052] Obtain the preset communication period.

[0053] Determine the total data length within a single preset communication cycle, including the real-time operating status data acquired based on the target control cycle and the non-real-time operating status data acquired based on the preset communication cycle.

[0054] The first communication rate is determined based on the preset communication period and total data length.

[0055] If the first communication rate does not exceed the maximum communication rate of the low-speed interface, the first communication rate is determined as the target communication rate, and the preset communication period is determined as the target communication period.

[0056] Here, the preset communication cycle can be determined by the user based on experience.

[0057] Specifically, the total data length of real-time operating status data acquired based on the target control cycle and non-real-time operating status data acquired based on the preset communication cycle can be determined within a single preset communication cycle. Based on this total data length and the preset communication cycle, a first communication rate is calculated. If the first communication rate does not exceed the maximum communication rate of the low-speed interface, then the first communication rate can be determined as the target communication rate, and the preset communication cycle can be determined as the target communication cycle. Of course, the target communication rate can also be determined as any value that is not lower than the first communication rate and not higher than the maximum communication rate of the low-speed interface.

[0058] For example, the preset communication period can be 5ms, and the target control period can be t = 50us. The data length Dnrt = 34 bytes of non-real-time operating status data acquired within a single preset communication period, and the data length of real-time operating status data acquired within a single preset communication period... Therefore, the total data length is 234 bytes. Then the first communication rate can be determined as follows: If the maximum communication rate of the low-speed interface is 691.2kbps, then the first communication rate of 468kbps does not exceed the maximum communication rate of the low-speed interface of 691.2kbps. Therefore, the target communication rate can be determined to be 468kbps, and the target communication period can be determined to be 5ms.

[0059] Thus, through the above process, the bandwidth requirement for online parameter tuning can be reduced by adjusting the communication rate, thereby achieving online parameter tuning.

[0060] In some implementations, to further reduce the bandwidth requirements of online parameter tuning, after determining the first communication rate based on the preset communication period and total data length, the method may further include:

[0061] If the first communication rate exceeds the maximum communication rate, the maximum communication rate is determined as the target communication rate.

[0062] Using the target communication cycle as the independent variable, determine the expression for the total data length of real-time operating status data acquired based on the target control cycle and non-real-time operating status data acquired based on the target communication cycle within a single target communication cycle.

[0063] The target communication period is determined based on the expression for the target communication rate and the total data length.

[0064] Here, the communication rate of the low-speed interface is limited and cannot be adjusted indefinitely. When the low-speed interface transmits at the maximum communication rate, it is still unable to transmit the real-time operating status data and non-real-time operating status data obtained by the controller based on the target control cycle within a single preset communication cycle within a preset communication cycle. In this case, the bandwidth requirement for online parameter tuning can be further reduced by adjusting the communication cycle.

[0065] Specifically, if the first communication rate calculated based on the preset communication period and the total data length exceeds the maximum communication rate, it indicates that the low-speed interface, even when transmitting at the maximum communication rate, still cannot complete the transmission of the real-time operating status data and the non-real-time operating status data acquired by the controller based on the target control cycle within a single preset communication period. Therefore, the target communication rate can be determined as the maximum communication rate of the low-speed interface. Then, with the target communication period as the independent variable, an expression for the total data length of the real-time operating status data and the non-real-time operating status data acquired based on the target control cycle within a single target communication period is determined. Finally, based on this expression for the total data length and the target communication rate, the value of the target communication period is determined.

[0066] For example, the maximum communication rate can be 691.2 kbps, and the target control period can be t = 50 μs. Let the target communication period be T, the data length of the non-real-time operating status data acquired within a single T be Dnrt = 34 Bytes, and the data length of the real-time operating status data acquired within a single T be... Therefore, the total data length is Then we can use the equation: Solving for T, we get T = 1.17 ms, which means the target communication period is 1.17 ms.

[0067] In this way, if adjusting the communication rate to the maximum communication rate of the low-speed interface still cannot meet the bandwidth requirements of online parameter tuning, the bandwidth requirements of online parameter tuning can be further reduced by adjusting the communication cycle.

[0068] Regarding S140, the controller can send uplink data frames to the host computer via a low-speed interface based on the target communication cycle. The uplink data frame may include a set of non-real-time operating status data and multiple sets of real-time operating status data. This allows the proportion of real-time operating status data to be larger within a single target communication cycle, thereby improving the effective utilization of bandwidth.

[0069] Among them, the maximum data length transmitted by the low-speed interface based on the target communication rate within the target communication cycle can be no less than the total data length of real-time operating status data and non-real-time operating status data.

[0070] Specifically, the target operating state can be the motor operating state desired by the user. Real-time and non-real-time operating state data can reflect the current operating state of the motor. The controller can transmit the real-time and non-real-time operating state data to the host computer via a low-speed interface based on the target communication cycle and target communication rate. The host computer can then determine whether the motor's operating state meets the target operating state based on this data. If the motor's operating state meets the target operating state, the target control parameters are determined to be the corresponding control parameters for the motor.

[0071] In some implementations, to more accurately determine the control parameters corresponding to the motor, the method may further include the following when the motor's operating state does not meet the target operating state:

[0072] Based on the updated target control parameters, return to receive the target control parameters sent by the host computer until the motor's operating state meets the target operating state, and then obtain the corresponding control parameters for the motor.

[0073] Here, the updated target control parameters can be obtained by the host computer updating the target control parameters when the motor's operating state does not meet the target operating state.

[0074] In other words, the host computer can adjust and update the target control parameters when the motor's operating state does not meet the target operating state, and send the updated target control parameters to the controller. That is, the controller can receive the updated target control parameters sent by the host computer, and can return to execute S110-S140 based on the updated target control parameters.

[0075] In this way, by adjusting the target control parameters when the motor's operating state does not meet the target operating state until the motor's operating state meets the target operating state, the corresponding control parameters of the motor can be obtained, and the corresponding control parameters of the motor can be determined more accurately.

[0076] In some implementations, to reduce the cost of the controller, the low-speed interface may include an RS232 interface and / or an RS422 interface.

[0077] Of course, the interface of the controller provided in this application embodiment can also be other low-speed interfaces, which are not limited here.

[0078] In some implementations, to further reduce the bandwidth requirements of online parameter tuning, the method may further include the following steps before S140:

[0079] Reduce the resolution of real-time operational status data.

[0080] Specifically, it can reduce the number of bytes occupied by real-time running status data.

[0081] Here, the data length of the uplink data frame can be reduced by lowering the resolution of the real-time running status data, thereby further reducing the bandwidth requirements of online parameter tuning.

[0082] In some implementations, the real-time operating status data may include three-phase current values. To reduce the data length of the uplink data frame, the method may further include the following steps before S140:

[0083] The three-phase current values ​​are converted into D-axis and Q-axis current values.

[0084] Here, when adjusting the current control loop online, the real-time operating status data can include three-phase current values. In order to reduce the bandwidth requirements of online parameter adjustment, the three-phase current values ​​can be converted into D-axis current values ​​and Q-axis current values.

[0085] Thus, when adjusting the current control loop online, the data length of the uplink data frame can be reduced by converting the three-phase current values ​​into D-axis and Q-axis current values, thereby reducing the bandwidth requirements for online parameter adjustment.

[0086] In some implementations, to quickly and accurately convert three-phase current values ​​into D-axis and Q-axis current values, the above-mentioned conversion of three-phase current values ​​into D-axis and Q-axis current values ​​may include:

[0087] The Park transformation converts the three-phase current values ​​into D-axis and Q-axis current values.

[0088] In some implementations, to further reduce the bandwidth requirements of online parameter tuning of the current control loop, after converting the three-phase current values ​​into D-axis and Q-axis current values ​​and before S140, the method may further include:

[0089] Reduce the number of bytes occupied by the D-axis current value and the Q-axis current value.

[0090] Here, when performing online parameter adjustment of the current loop, the core requirements are real-time performance and trend analysis, rather than high precision. Therefore, the resolution of the current value can be appropriately reduced.

[0091] For example, the number of bytes occupied by the D-axis current value and the Q-axis current value can be reduced from 2 bytes to 1 byte.

[0092] Thus, when performing online parameter tuning of the current control loop, the bandwidth requirement for online parameter tuning can be further reduced by decreasing the bytes occupied by the D-axis current value and the Q-axis current value.

[0093] For example, the controller can be a DSP chip, and the low-speed interface can be an RS422 interface. If the current loop is adjusted online, the communication period is 5ms, the target control period is 50us, and the communication rate is 115.2Kbps. In this case, the uplink data table can be as shown in Table 1, containing a total of 40 bytes. The RS422 underlying communication basic frame format can be as follows: Figure 2 As shown, a single transmission occupies 10 bits (1 start bit + 8 data bits + 1 stop bit). Therefore, the transmission time required for a single uplink data frame is calculated as follows: The target control cycle is much longer than 50µs, which cannot meet the bandwidth requirements for direct real-time transmission of all data, and therefore cannot support online parameter tuning.

[0094] Based on the parameter determination method provided in this application, the uplink data is divided into real-time operating status data and non-real-time operating status data. Then, non-real-time operating status data is acquired based on a target communication cycle of 5ms, and real-time operating status data is acquired based on a target control cycle of 50us. Here, the real-time operating status data can be three-phase current values, which can be converted into D-axis and Q-axis current values. The bytes occupied by the D-axis and Q-axis current values ​​are adjusted from 2 bytes to 1 byte. Based on the target communication cycle of 5ms and the target communication rate of 691.2kbps, the real-time and non-real-time operating status data are sent to the host computer via the RS422 interface. This satisfies the real-time data transmission bandwidth requirements for online parameter adjustment of the current loop. The software only needs to allocate two 200-byte ping-pong buffers to achieve pseudo-real-time uploading of the real-time acquired and stored current data to the host computer for observation, thus fulfilling the application requirements for online parameter adjustment of the current loop. The uplink data table supporting online parameter adjustment is shown in Table 2.

[0095] Table 1 - Upstream data table that does not support online parameter tuning

[0096]

[0097] Table 2 - Upstream data table supporting online parameter tuning

[0098]

[0099] For online parameter tuning requirements of speed loops or position loops with longer control cycles, online parameter tuning can be achieved by adding function codes and modifying the corresponding uplink data frames.

[0100] Based on the parameter determination method provided in the embodiments of this application, the basic requirements for bus transmission bandwidth for online parameter tuning can be reduced. Without changing the controller hardware state, online parameter tuning can be achieved by modifying the host computer and controller software, thereby greatly improving the debugging efficiency under new loads or complex working conditions and reducing debugging costs.

[0101] Based on the same inventive concept, embodiments of this application also provide a parameter determination device. The following, in conjunction with… Figure 3 The parameter determination device provided in the embodiments of this application will be described in detail.

[0102] Figure 3 A schematic diagram of a parameter determination device provided in one embodiment of this application is shown.

[0103] like Figure 3 As shown, this parameter determination device can be applied to a controller with a low-speed interface, and the parameter determination device may include:

[0104] Receiver module 301 is used to receive target control parameters sent by the host computer.

[0105] Control module 302 is used to control the motor operation based on target control parameters.

[0106] The first acquisition module 303 is used to acquire non-real-time operating status data of the motor based on a target communication cycle, and to acquire real-time operating status data of the motor based on a target control cycle.

[0107] The transmission module 304 is used to transmit real-time and non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate. This allows the host computer to determine whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data, and to update the target control parameters if the motor's operating status does not meet the target operating status.

[0108] The processing module 305 is also used to return the target control parameters sent by the host computer based on the updated target control parameters, and stop when the motor's operating state meets the target operating state.

[0109] The target control cycle is the control cycle corresponding to the target control parameters. The target control cycle is shorter than the target communication cycle. Within the target communication cycle, the maximum data length transmitted by the low-speed interface based on the target communication rate is not less than the total data length of the real-time operating status data and the non-real-time operating status data.

[0110] Therefore, the controller can receive target control parameters sent by the host computer and control the motor operation based on these target control parameters. It can then obtain non-real-time operating status data of the motor based on the target communication cycle and real-time operating status data of the motor based on the target control cycle. Based on the target communication cycle and target communication rate, the controller transmits the real-time and non-real-time operating status data to the host computer through a low-speed interface. This allows the host computer to determine whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data. If the motor's operating status does not meet the target operating status, the controller updates the target control parameters. The controller can then return to receiving the target control parameters sent by the host computer based on the updated target control parameters until the motor's operating status meets the target operating status. In this embodiment, the motor's operating status data is divided into real-time operating status data and non-real-time operating status data. Non-real-time operating status data is acquired based on a target communication cycle, and real-time operating status data is acquired based on a target control cycle. Since the target control cycle is the control cycle corresponding to the target control parameters and is shorter than the target communication cycle, by acquiring the motor's non-real-time operating status data based on the target communication cycle and acquiring the motor's real-time operating status data in real time, and transmitting the real-time and non-real-time operating status data through a low-speed interface based on the target communication cycle, the proportion of real-time operating status data within a single target communication cycle can be increased. This improves the efficiency of transmitting real-time operating status data through the low-speed interface, meets the requirements of online parameter tuning for real-time data transmission, and realizes online parameter tuning based on a low-cost low-speed interface.

[0111] In some embodiments, to reduce the bandwidth requirements of online parameter tuning, the device may further include:

[0112] The second acquisition module is used to acquire a preset communication cycle before acquiring the non-real-time operating status data of the motor based on the target communication cycle and acquiring the real-time operating status data of the motor based on the target control cycle.

[0113] The first determining module is used to determine the total data length of real-time operating status data acquired based on the target control cycle and non-real-time operating status data acquired based on the preset communication cycle within a single preset communication cycle.

[0114] The second determining module is used to determine the first communication rate based on the preset communication period and the total data length.

[0115] The third determining module is used to determine the first communication rate as the target communication rate and the preset communication period as the target communication period, provided that the first communication rate does not exceed the maximum communication rate of the low-speed interface.

[0116] In some embodiments, to further reduce the bandwidth requirements of online parameter tuning, the device may further include:

[0117] The fourth determining module is used to determine the target communication rate after determining the first communication rate based on the preset communication period and total data length, provided that the first communication rate exceeds the maximum communication rate.

[0118] The fifth determining module is used to determine, with the target communication cycle as the independent variable, an expression for the total data length of the real-time operating status data and the non-real-time operating status data obtained based on the target control cycle within a single target communication cycle.

[0119] The sixth determining module is used to determine the target communication period based on an expression of the target communication rate and the total data length.

[0120] In some embodiments, to further reduce the bandwidth requirements of online parameter tuning, the device may further include:

[0121] The resolution adjustment module is used to reduce the resolution of real-time operating status data before transmitting real-time and non-real-time operating status data to the host computer via a low-speed interface, based on the target communication cycle and target communication rate.

[0122] In some implementations, to make the parameter determination method provided in this application more widely applicable, the real-time operating status data may include one of current data, speed data, and position data.

[0123] In some implementations, the real-time operating status data may include three-phase current values. To reduce the data length of the uplink data frame, the device may further include:

[0124] The current value conversion module is used to convert the three-phase current values ​​into D-axis current values ​​and Q-axis current values ​​before transmitting real-time and non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate.

[0125] In some implementations, to quickly and accurately convert three-phase current values ​​into D-axis and Q-axis current values, the current value conversion module may include:

[0126] The current value conversion submodule is used to convert three-phase current values ​​into D-axis and Q-axis current values ​​through Park transformation.

[0127] In some embodiments, to further reduce the bandwidth requirement for online parameter tuning of the current control loop, the device may further include:

[0128] The byte adjustment module is used to reduce the number of bytes occupied by the D-axis and Q-axis current values ​​after the three-phase current values ​​are converted into D-axis and Q-axis current values.

[0129] In some embodiments, to more accurately determine the control parameters corresponding to the motor, the device may further include:

[0130] The processing module is used to, when the motor's operating state does not meet the target operating state, return the target control parameters sent by the host computer based on the updated target control parameters, until the motor's operating state meets the target operating state, and then obtain the corresponding control parameters for the motor.

[0131] The updated target control parameters are obtained by the host computer when the motor's operating state does not meet the target operating state.

[0132] Figure 4 A schematic diagram of the structure of an electronic device provided in one embodiment of this application is shown.

[0133] like Figure 4 As shown, the electronic device 4 is a structural diagram of an exemplary hardware architecture of an electronic device that can implement the parameter determination method and parameter determination device according to the embodiments of this application. This electronic device may refer to the electronic device in the embodiments of this application.

[0134] The electronic device 4 may include a processor 401 and a memory 402 storing computer program instructions.

[0135] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0136] Memory 402 may include a large-capacity memory for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), a floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to an integrated gateway disaster recovery device. In a particular embodiment, memory 402 is non-volatile solid-state memory. In a particular embodiment, memory 402 may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, memory 402 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0137] The processor 401 implements any of the parameter determination methods in the above embodiments by reading and executing computer program instructions stored in the memory 402.

[0138] In one example, the electronic device may also include a communication interface 403 and a bus 404. Wherein, as... Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 404 and complete communication with each other.

[0139] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0140] Bus 404 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 404 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0141] The electronic device can execute the parameter determination method in the embodiments of this application, thereby achieving the combination Figures 1 to 3 The described method and apparatus for determining parameters.

[0142] Furthermore, in conjunction with the parameter determination methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions, which, when executed by a processor, implement any of the parameter determination methods in the above embodiments.

[0143] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0144] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0145] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0146] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0147] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A parameter determination method, applied to a controller with a low-speed interface, characterized in that, The method includes: Receive target control parameters sent by the host computer. The motor is controlled to operate based on the target control parameters. The non-real-time operating status data of the motor is obtained based on the target communication cycle, and the real-time operating status data of the motor is obtained based on the target control cycle. Based on the target communication cycle and target communication rate, the real-time operating status data and the non-real-time operating status data are transmitted to the host computer via a low-speed interface. The host computer then determines whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data. If the motor's operating status meets the target operating status, the host computer determines the target control parameters as the control parameters corresponding to the motor. The target control cycle is the control cycle during which the controller controls the motor to run based on the target control parameters. The target control cycle is shorter than the target communication cycle. Within the target communication cycle, the maximum data length transmitted by the low-speed interface based on the target communication rate is not less than the total data length of the real-time operating status data and the non-real-time operating status data.

2. The method according to claim 1, characterized in that, Before acquiring the non-real-time operating status data of the motor based on the target communication cycle and acquiring the real-time operating status data of the motor based on the target control cycle, the method further includes: Obtain the preset communication period. Determine the total data length of the real-time operating status data obtained based on the target control cycle and the non-real-time operating status data obtained based on the preset communication cycle within a single preset communication cycle. The first communication rate is determined based on the preset communication period and the total data length. If the first communication rate does not exceed the maximum communication rate of the low-speed interface, the first communication rate is determined as the target communication rate, and the preset communication period is determined as the target communication period.

3. The method according to claim 2, characterized in that, After determining the first communication rate based on the preset communication period and the total data length, the method further includes: If the first communication rate exceeds the maximum communication rate, the maximum communication rate is determined as the target communication rate. Using the target communication cycle as the independent variable, an expression is used to determine the total data length of the real-time operating status data and the non-real-time operating status data obtained based on the target control cycle within a single target communication cycle. The target communication period is determined based on the expression for the target communication rate and the total data length.

4. The method according to claim 1, characterized in that, Before transmitting the real-time operating status data and the non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate, the method further includes: Reduce the resolution of the real-time operating status data.

5. The method according to claim 1, characterized in that, The real-time operating status data includes one of the following: current data, speed data, and position data.

6. The method according to claim 1, characterized in that, The real-time operating status data includes three-phase current values. Before transmitting the real-time operating status data and the non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate, the method further includes: The three-phase current values ​​are converted into D-axis current values ​​and Q-axis current values.

7. The method according to claim 6, characterized in that, The process of converting the three-phase current values ​​into D-axis and Q-axis current values ​​includes: The three-phase current values ​​are converted into D-axis and Q-axis current values ​​through Park transformation.

8. The method according to claim 6, characterized in that, After converting the three-phase current values ​​into D-axis and Q-axis current values, the method further includes: Reduce the number of bytes occupied by the D-axis current value and the Q-axis current value.

9. The method according to claim 1, characterized in that, If the operating state of the motor does not meet the target operating state, the method further includes: Based on the updated target control parameters, the system returns to execute the target control parameters sent by the host computer until the motor's operating state meets the target operating state, at which point the corresponding control parameters for the motor are obtained. The updated target control parameters are obtained by the host computer when the motor's operating state does not meet the target operating state.

10. A parameter determination device, applied to a controller with a low-speed interface, characterized in that, The device includes: The receiving module is used to receive the target control parameters sent by the host computer. The control module is used to control the motor operation based on the target control parameters. The first acquisition module is used to acquire non-real-time operating status data of the motor based on a target communication cycle, and to acquire real-time operating status data of the motor based on a target control cycle. The transmission module is used to transmit the real-time operating status data and the non-real-time operating status data to the host computer via a low-speed interface based on the target communication cycle and target communication rate. This allows the host computer to determine whether the motor's operating status meets the target operating status based on the real-time and non-real-time operating status data. If the motor's operating status meets the target operating status, the host computer determines the target control parameters as the control parameters corresponding to the motor. The target control cycle is the control cycle during which the controller controls the motor to run based on the target control parameters. The target control cycle is shorter than the target communication cycle. Within the target communication cycle, the maximum data length transmitted by the low-speed interface based on the target communication rate is not less than the total data length of the real-time operating status data and the non-real-time operating status data.