Motor control parameter setting method and system, and motor driver

By automatically setting motor control parameters through receiving mode jump commands, the problem of complexity and time-consuming debugging in existing motor control methods is solved, achieving the effect of simplifying parameter adjustment and reducing the professional requirements of users.

CN116015153BActive Publication Date: 2026-03-17SUZHOU SASAMAI SEMICON CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-13
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing motor control methods are complex, require users to have professional knowledge and experience, and are time-consuming to debug, thus increasing the development cycle.

Method used

By receiving mode jump commands from the debugging terminal, the current operating mode of the motor is obtained, and control parameters are automatically set according to the target operating mode, including the cooperation between the motor driver and the debugging terminal, to achieve automatic parameter adjustment.

Benefits of technology

It reduces the workload of parameter adjustment, simplifies the process of setting motor control parameters, and lowers the professional requirements and debugging time for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116015153B_ABST
    Figure CN116015153B_ABST
Patent Text Reader

Abstract

The application discloses a motor control parameter setting method and system and a motor driver. The method comprises the following steps: when a mode jump instruction sent by a debugging terminal is received, a current operation mode of a motor is acquired; if the current operation mode is a normal motion mode, a target operation mode is determined according to the mode jump instruction; and control parameters of the motor are set according to a parameter setting method corresponding to the target operation mode. The method can reduce the workload of parameter adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the development of technology, the application scenarios of motors have greatly increased. However, there are many motor control methods and complex control technologies involved. Users need to understand the parameters of the controlled system and the control structure parameters, and they need to have certain professional knowledge in motor control theory. In particular, in terms of motor parameter debugging, users need to have certain debugging experience, and motor parameter debugging is time-consuming, increasing the user's development cycle. Summary of the Invention

[0003] This invention aims to at least partially solve one of the technical problems in related technologies. Therefore, the first objective of this invention is to provide a method for setting motor control parameters to reduce the workload of parameter adjustment.

[0004] The second objective of this invention is to provide a motor driver.

[0005] The third objective of this invention is to provide a motor control parameter setting system.

[0006] To achieve the above objectives, a first aspect of the present invention provides a method for setting motor control parameters. The method includes: when a mode jump command is received from a debugging terminal, obtaining the current operating mode of the motor; if the current operating mode is a normal operating mode, determining a target operating mode according to the mode jump command; and setting the control parameters of the motor according to the parameter setting method corresponding to the target operating mode.

[0007] To achieve the above objectives, a second aspect of the present invention provides a motor driver, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-described method for setting motor control parameters.

[0008] To achieve the above objectives, a third aspect of the present invention provides a motor control parameter setting system, comprising: a motor, a debugging terminal, and the aforementioned motor driver.

[0009] The motor control parameter setting method, system, and motor driver of this invention, when receiving a mode jump command sent by a debugging terminal, obtain the current operating mode of the motor; if the current operating mode is the normal operating mode, determine the target operating mode according to the mode jump command; and set the motor control parameters according to the parameter setting method corresponding to the target operating mode. This allows setting the motor control parameters simply by issuing a mode jump command, reducing the workload of parameter adjustment.

[0010] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0011] Figure 1 This is a flowchart of a motor control parameter setting method according to an embodiment of the present invention;

[0012] Figure 2 This is a flowchart of a motor control parameter setting method according to another embodiment of the present invention;

[0013] Figure 3 This is a flowchart of a motor control parameter setting method according to another embodiment of the present invention;

[0014] Figure 4 This is a flowchart of a motor control parameter setting method according to another embodiment of the present invention;

[0015] Figure 5 This is a schematic diagram showing the result of an example of a motor control parameter setting method according to the present invention;

[0016] Figure 6 This is a schematic diagram of a motor control parameter setting method according to an example of the present invention;

[0017] Figure 7 This is a flowchart of a method for setting motor control parameters, as exemplified by this invention.

[0018] Figure 8 This is a flowchart of a method for setting motor control parameters, which is another example of the present invention;

[0019] Figure 9 This is a structural block diagram of the motor control parameter setting system according to an embodiment of the present invention. Detailed Implementation

[0020] The following description, with reference to the accompanying drawings, outlines a method, system, and motor driver for setting motor control parameters according to embodiments of the present invention. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. The embodiments described with reference to the accompanying drawings are exemplary and should not be construed as limiting the present invention.

[0021] Figure 1 This is a flowchart of a motor control method according to an embodiment of the present invention.

[0022] like Figure 1 As shown, the method for setting motor control parameters includes:

[0023] S11: When a mode jump command is received from the debugging terminal, the current operating mode of the motor is obtained.

[0024] S12, if the current operating mode is normal operation mode, then determine the target operating mode according to the mode jump instruction.

[0025] S13, set the motor control parameters according to the parameter setting method corresponding to the target operating mode.

[0026] Specifically, a static configuration file for the motor is first stored in a preset location. This static configuration file contains all the parameters required for motor control, such as motor-related parameters, controller parameters, and pole configuration parameters. The motor driver reads the parameters from the static configuration file, starts normally to complete the initialization operation, and then enters an idle state.

[0027] The motor has multiple operating modes, including normal operation mode, parameter initialization mode, and parameter self-tuning mode. Upon entering idle state, the motor automatically enters normal operation mode first. See also... Figure 2 When the motor is in normal operating mode, the motor driver starts the motor after receiving a motion command from the control software in the debugging terminal. The initial speed and direction parameters of the motor are read from the configuration file, or new speed and direction parameters can be issued by the control software to adjust the motor operation in real time. If a stop command is received while the motor is moving, the motor will stop.

[0028] When the motor driver receives a mode jump command from the debugging terminal, it first obtains the current operating mode of the motor. If the current operating mode is the normal operating mode, it can determine the target operating mode according to the mode jump command and perform the mode jump.

[0029] Moreover, the motor driver has different preset parameter setting methods for different target operating modes. After determining the target operating mode, the corresponding parameter setting method can be obtained, and the parameters can be set according to the parameter setting method.

[0030] Therefore, when a mode jump command is received from the debugging terminal, the current operating mode of the motor is obtained. If the current operating mode is the normal operating mode, the target operating mode is determined according to the mode jump command. The motor control parameters are then set according to the parameter setting method corresponding to the target operating mode. This allows the motor control parameters to be set simply by issuing a mode jump command, reducing the workload of parameter adjustment.

[0031] In one embodiment of the present invention, when the target operating mode is the parameter initialization mode, the control parameters of the motor are set according to the parameter setting method corresponding to the target operating mode, including: obtaining motor configuration parameters; and calculating the control parameters of the motor based on the motor configuration parameters.

[0032] Specifically, see Figure 3 In the idle state, when a controller parameter initialization command is received, the target operating mode is determined to be the parameter initialization mode. The motor configuration parameters are read, including the motor parameters and related configuration parameters. The motor control parameters are then calculated based on the motor configuration parameters and the parameter setting method corresponding to the parameter initialization mode. The motor control parameters include the controller parameters.

[0033] Furthermore, after the calculation is complete, the control software in the debugging terminal can read the calculation results of the control parameters from the motor driver, generate a new motor static configuration file based on the calculation results, and save it. This allows for updating the motor static configuration file.

[0034] In one embodiment of the present invention, the motor configuration parameters include motor resistance, motor inductance, number of motor pole pairs, motor moment of inertia, motor flux linkage, current loop bandwidth, and damping coefficient. The motor control parameters include initial proportional parameters of the current loop controller, initial integral parameters of the current loop controller, initial proportional parameters of the speed loop controller, and initial integral parameters of the speed loop controller. The motor control parameters are calculated according to the following formula:

[0035] ,

[0036] ,

[0037] ,

[0038] ,

[0039] Among them, K I_p Here are the initial proportional parameters for the current loop controller, ω is the current loop bandwidth, L is the motor inductance, and K... I_i Here are the initial integral parameters for the current loop controller, R is the motor resistance, and K is the... S_i K is the initial integral parameter of the speed loop controller. s_pHere are the initial proportional parameters for the speed loop controller, and δ is the damping coefficient. P is the number of pole pairs of the motor. Let J be the motor flux linkage and J be the motor moment of inertia.

[0040] In one embodiment of the present invention, when the target operating mode is self-tuning mode, see [link to relevant documentation]. Figure 4 Set the motor control parameters according to the parameter setting method corresponding to the target operating mode, including:

[0041] S41, obtain parameter adjustment mode, initial parameter value and motor reciprocating motion parameters.

[0042] S42, determine the parameter adjustment range and parameter adjustment step size based on the initial parameter value, and determine the parameter adjustment start point and parameter adjustment end point based on the parameter adjustment range.

[0043] S43 determines the control parameters to be tuned for the motor according to the parameter adjustment mode, adjusts the control parameters to be tuned to the parameter adjustment starting point, and controls the motor to perform reciprocating motion according to the reciprocating motion parameters of the motor.

[0044] S44 samples the motor for each reciprocating motion and adjusts the control parameters to be tuned based on the parameter adjustment endpoint and parameter adjustment step size.

[0045] S45, set the control parameters to be tuned based on the sampling results.

[0046] Specifically, in idle state, upon receiving a parameter self-tuning command, the target operating mode is determined to be self-tuning mode. First, the parameter adjustment mode and initial parameter values ​​are determined. When determining the initial parameter values, if this is the first time parameter adjustment is performed, a theoretical calculation of the initial values ​​is required, and self-tuning is then performed based on the calculated initial values. If this is not the first time parameter adjustment is performed, self-tuning can be directly performed based on the existing parameters.

[0047] After determining the initial parameter values, the parameter adjustment range and step size can be obtained based on these initial values. Furthermore, the starting and ending points of the parameter adjustment can be determined based on the adjustment range. As an example, assume the initial parameter values ​​include the initial proportional parameter K of the speed loop controller. s_p and the initial integral parameter K of the speed loop controller S_i After determining the initial values ​​of the parameters, the adjustment range of the parameters can be determined based on these initial values, for example, it can be [0.9K]. s_p 1.1K s_p ] and [0.9K S_i 1.1K S_i Furthermore, the parameter initial value can be used as a reference to determine the parameter adjustment step size, for example, it can be 0.5%K.s_p and 0.5%K S_i At this point, the starting point for adjusting the above parameters can be 0.9K. s_p and 0.9K S_i The parameter adjustment endpoint can be the maximum value, which is 1.1K. s_p and 1.1K S_i .

[0048] The motor is controlled to perform reciprocating motion based on the initial parameter values ​​and the motor's reciprocating motion parameters. As an example, assume the initial parameter value is the lower limit of the parameter adjustment range, and the motor's reciprocating motion parameters include the maximum speed. The acceleration and deceleration are equal. If the uniform motion time is 1 second, then when the motor reciprocates according to the above motor reciprocating motion parameters, the motor speed is as follows: Figure 5 As shown.

[0049] It should be noted that the adjustment range, adjustment step size, and motor reciprocating motion parameters mentioned above can all be set independently in the motor static configuration file.

[0050] After adjusting the control parameters to be tuned to the starting point of parameter adjustment, the motor is controlled to reciprocate. For each reciprocating motion of the motor, the motor is sampled, and the control parameters to be tuned are adjusted according to the parameter adjustment endpoint and parameter adjustment step size. The control parameters to be tuned are then set according to the sampling results.

[0051] In one embodiment of the present invention, the above-mentioned sampling of the motor for each reciprocating motion of the motor, and adjusting the control parameters to be tuned according to the parameter adjustment endpoint and parameter adjustment step size, includes:

[0052] For the first reciprocating motion of the motor, the running speed of the motor is sampled, an evaluation function value is obtained based on the sampling result, the evaluation function value is saved, and the control parameters to be tuned are adjusted once according to the parameter adjustment step size.

[0053] For each reciprocating motion after the first reciprocating motion of the motor, the running speed of the motor is sampled, an evaluation function value is obtained based on the sampling results, and the obtained evaluation function value is compared with the saved evaluation function value. The saved evaluation function value is updated based on the smaller value.

[0054] Specifically, for each reciprocating motion of the motor after the first reciprocating motion, if the evaluation function value obtained in the most recent N consecutive times is not greater than the saved evaluation function value, and the control parameter to be tuned has not reached the parameter adjustment endpoint, then the control parameter to be tuned is adjusted once according to the parameter adjustment step size, where N is a positive integer greater than or equal to 2; if the evaluation function value obtained in the most recent N consecutive times is greater than the saved evaluation function value, or the control parameter to be tuned reaches the parameter adjustment endpoint, then the adjustment of the control parameter to be tuned ends.

[0055] Specifically, after adjusting the motor's control parameters to the starting point of parameter adjustment, the motor is controlled to perform one reciprocating motion according to the motor's reciprocating motion parameters. The motor is sampled, and the evaluation function value is obtained based on the sampling results.

[0056] The step size is adjusted according to the parameters. The control parameters to be tuned are adjusted once, and the motor is controlled to perform a reciprocating motion once. The motor is sampled, and the evaluation function value is obtained based on the sampling results.

[0057] Compare the evaluation function value obtained from the first reciprocating motion with the evaluation function value corresponding to the second motion, save the smaller evaluation function value and the control parameter value of the control parameter to be tuned corresponding to the smaller evaluation function value, and adjust the control parameter to be tuned once according to the parameter adjustment step size.

[0058] The motor is repeatedly controlled to perform one reciprocating motion. The motor is sampled, and an evaluation function value is obtained based on the sampling results. The saved evaluation function value is updated based on the obtained evaluation function value. The control parameter to be tuned is adjusted once according to the parameter adjustment step size until the control parameter to be tuned reaches the parameter adjustment endpoint, or when N consecutive evaluation function values ​​are greater than the saved evaluation function value, the parameter self-tuning is exited.

[0059] In one embodiment of the present invention, setting the control parameter to be tuned according to the sampling result includes: taking the control parameter value corresponding to the smallest evaluation function value as the optimal value of the control parameter to be tuned, and adjusting the control parameter to be tuned to the optimal value.

[0060] In one embodiment of the present invention, the evaluation function value is calculated according to the following formula:

[0061] ,

[0062] Where F is the evaluation function value, t(k) is the time corresponding to the k-th sampling, and ω s (k) is the set value of the motor running speed corresponding to the kth sampling, ω f (k) is the motor running speed corresponding to the kth sampling.

[0063] In one embodiment of the present invention, the control parameters of the motor include the proportional parameters of the speed loop controller and the integral parameters of the speed loop controller. When the parameter adjustment mode is the fixed proportional adjustment mode, the control parameters to be adjusted are the proportional parameters of the speed loop controller and the integral parameters of the speed loop controller. When the parameter adjustment mode is the separate adjustment mode, the control parameters to be adjusted are either the proportional parameters of the speed loop controller or the integral parameters of the speed loop controller.

[0064] As an example, when the parameter adjustment mode is the separate adjustment mode, first determine that the control parameter to be tuned is the proportional parameter of the speed loop controller. At this time, set the integral parameter of the speed loop controller to the default value. For example, the integral parameter of the speed loop controller can be set to the initial value of the parameter. After obtaining the optimal value of the proportional parameter of the speed loop controller and adjusting the proportional parameter of the speed loop controller to the optimal value, the control parameter to be tuned can be determined to be the integral parameter of the speed loop controller. Obtain the optimal value of the integral parameter of the speed loop controller and adjust the integral parameter of the speed loop controller to the optimal value.

[0065] The embodiments of the present invention will be described in detail below with reference to a specific example.

[0066] See this specific example. Figure 6 This includes the settings for the motor driver and motor control software.

[0067] The motor static configuration file contains all the parameters required for motor control, such as motor-related parameters, controller parameters, and pole configuration parameters. The motor driver reads the controller parameters from the configuration file, starts normally to complete the initialization operation, and enters the idle state.

[0068] The motor has three operating modes: normal operation mode, parameter initialization mode, and speed loop parameter self-tuning mode. In idle state, the motor can switch from normal operation mode to parameter initialization mode or speed loop parameter self-tuning mode according to the command received by the driver.

[0069] In normal operation mode, the driver initiates motor movement after receiving motion commands from the control software. The initial speed and direction parameters of the motor are read from the configuration file, or new speed and direction parameters can be sent from the control software to adjust motor operation in real time.

[0070] In idle state, upon receiving an initialization command from the control software, it enters parameter initialization mode. It reads motor parameters and related setting parameters and calculates controller parameters. The specific steps are as follows:

[0071] 1) Read the following parameters from the configuration: motor resistance R, motor inductance L, number of motor pole pairs P, motor moment of inertia J, and motor flux linkage. The current loop is set with bandwidth ω and damping coefficient δ.

[0072] 2) Initial parameters of the current loop controller: , .

[0073] 3) Initial parameters of the speed loop controller: , , .

[0074] 4) After the calculation is completed, the control software can read the calculation results of the controller parameters from the driver and generate a new static configuration file to save the current parameters.

[0075] See Figure 7 In idle state, upon receiving a speed loop parameter self-tuning command from the control software, the system enters self-tuning mode. The controller controls the motor to perform reciprocating motion, adjusting the speed loop controller parameters during this process and using an evaluation function to assess the motor's operating condition, thereby finding the optimal parameters. The specific steps are as follows:

[0076] 1) Determine the speed loop controller parameter adjustment mode.

[0077] In the fixed proportional control mode, during the self-tuning process, the proportional parameters and integral parameters of the speed loop controller change simultaneously, but the current proportional relationship between the two remains unchanged.

[0078] The separate adjustment mode involves first adjusting the value of the proportional parameter of the speed loop controller during the self-tuning process, and then adjusting the value of the integral parameter of the speed loop controller after the adjustment is completed. The two are not changed at the same time.

[0079] 2) Set the parameter adjustment range (which can be set independently in the static configuration parameters; the default value is used as an example here): The driver takes the current proportional parameter and integral parameter of the speed loop controller as the reference, and takes 10% up and down as the parameter adjustment range.

[0080] 3) Set parameters to adjust the step size (which can be set independently in the static configuration parameters; the default value is used as an example here): The driver obtains the step size based on the current proportional parameters and integral parameters of the speed loop controller.

[0081] 4) Set the maximum speed, acceleration / deceleration, and constant speed motion time of the motor's reciprocating motion (this can be set manually in the static configuration parameters; the default values ​​are used as an example here): maximum speed is 50 r / s, and acceleration and deceleration are equal at 200 r / s. 2 The uniform motion time is 1 second.

[0082] 5) The driver starts reciprocating motion and performs self-tuning of the speed loop parameters (including the proportional parameters and integral parameters of the speed loop controller).

[0083] Fixed ratio adjustment mode:

[0084] See Figure 9 The driver controls the motor, causing it to reciprocate along a trapezoidal curve. The error within one cycle is calculated for each run and used as an evaluation function.

[0085] Using the parameter adjustment starting point as the initial value, perform one pass to obtain the evaluation function value F.

[0086] After increasing the velocity loop parameters by one step, the system moves again to obtain a new evaluation function value. The results of the two F values ​​are compared, and the smaller evaluation function value and the corresponding control parameter value of the velocity loop are retained. Then, the velocity loop parameters are increased again.

[0087] The speed loop parameter tuning continues until the maximum value of the speed loop parameter is reached, or until two consecutive evaluation function values ​​are greater than the saved minimum value. The control parameter value corresponding to the minimum value of the obtained evaluation function is then taken as the optimal value.

[0088] Adjust the mode separately:

[0089] Adjust the proportional parameter of the speed loop controller to the starting point of parameter adjustment, and keep the integral parameter of the speed loop controller at the above benchmark. Perform one pass to obtain the evaluation function value F.

[0090] The integral parameter of the speed loop controller remains unchanged, while the proportional parameter is increased by one step. After moving again, a new evaluation function value is obtained.

[0091] After continuously increasing the proportional parameter and reciprocating, the minimum value of the evaluation function corresponds to the optimal value of the proportional parameter of the speed loop controller.

[0092] The proportional parameter of the speed loop controller is fixed at the optimal value obtained in the previous step, and the integral parameter is adjusted to the starting point of parameter adjustment. The above steps are repeated to obtain the optimal value of the integral parameter.

[0093] In summary, the motor control parameter setting method of this invention, upon receiving a mode jump command from the debugging terminal, obtains the current operating mode of the motor; if the current operating mode is the normal operating mode, it determines the target operating mode according to the mode jump command; and sets the motor control parameters according to the parameter setting method corresponding to the target operating mode. This allows setting motor control parameters simply by issuing a mode jump command, reducing the workload of parameter adjustment. When parameter initialization is required, the mode jump method is used to automatically calculate the controller parameter initialization, avoiding unnecessary calculations during normal use. In the motor speed loop parameter self-tuning adjustment mode, the motor reciprocates to adjust the speed loop parameters and automatically judges the operating effect to determine the optimal parameters. This significantly reduces the workload of parameter adjustment. Using the methods of motor control parameter initialization calculation and speed loop parameter self-tuning adjustment, the motor parameters are adaptively adjusted, reducing the user's workload in motor parameter adjustment. Furthermore, both are implemented using mode jump, avoiding unnecessary calculations during normal use. The algorithm is simple to implement, reducing hardware costs.

[0094] Furthermore, the present invention proposes a motor driver.

[0095] In this embodiment of the invention, the motor driver includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the above-described method for setting motor control parameters.

[0096] The motor driver in this embodiment of the invention, by implementing the above-described motor control parameter setting method, obtains the current operating mode of the motor when it receives a mode jump command sent by the debugging terminal; if the current operating mode is the normal operating mode, it determines the target operating mode according to the mode jump command; and sets the motor control parameters according to the parameter setting method corresponding to the target operating mode. This allows setting the motor control parameters simply by issuing a mode jump command, reducing the workload of parameter adjustment. When parameter initialization is required, the mode jump method is used to automatically calculate the controller parameter initialization, avoiding unnecessary calculations during normal use. In the motor speed loop parameter self-tuning adjustment mode, the motor reciprocates to adjust the speed loop parameters and automatically judges the operating effect to determine the optimal parameters. This significantly reduces the workload of parameter adjustment. Using the methods of motor control parameter initialization calculation and speed loop parameter self-tuning adjustment, the motor parameters are adaptively adjusted, reducing the user's workload in motor parameter adjustment. Furthermore, both are implemented using mode jump, avoiding unnecessary calculations during normal use. The algorithm is simple to implement, reducing hardware costs.

[0097] Furthermore, this invention proposes a motor control parameter setting system.

[0098] Figure 9 This is a structural block diagram of the motor control parameter setting system according to an embodiment of the present invention.

[0099] like Figure 9 As shown, the motor control parameter setting system 100 includes: a motor 101, a debugging terminal 102, and the aforementioned motor driver 103.

[0100] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein can be considered as a ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0101] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0102] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0103] In the description of this specification, the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and should not be construed as limiting the present invention.

[0104] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0105] In this specification, unless otherwise stated, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly defined. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0106] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can mean that the first feature is in direct contact with the second feature, or that the first feature is in indirect contact with the second feature through an intermediate medium. Furthermore, "above," "over," and "on top" of the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.

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

Claims

1. A method of setting a motor control parameter, characterized by, The method comprises: When receiving a mode jump instruction sent by a debugging terminal, obtaining a current running mode of the motor; If the current running mode is a normal motion mode, determining a target running mode according to the mode jump instruction; Setting the control parameter of the motor according to a parameter setting method corresponding to the target running mode; When the target running mode is a self-tuning mode, the setting of the control parameter of the motor according to the parameter setting method corresponding to the target running mode comprises: Obtaining a parameter adjustment mode, a parameter initial value and a motor reciprocating motion parameter; Determining a parameter adjustment range and a parameter adjustment step according to the parameter initial value, and determining a parameter adjustment starting point and a parameter adjustment ending point according to the parameter adjustment range; Determining a to-be-tuned control parameter of the motor according to the parameter adjustment mode, adjusting the to-be-tuned control parameter to the parameter adjustment starting point, and controlling the motor to perform reciprocating motion according to the motor reciprocating motion parameter; For each reciprocating motion of the motor, sampling the motor, and adjusting the to-be-tuned control parameter according to the parameter adjustment ending point and the parameter adjustment step; Setting the to-be-tuned control parameter according to the sampling result.

2. The method of setting motor control parameters according to claim 1, wherein, When the target running mode is a parameter initialization mode, the setting of the control parameter of the motor according to the parameter setting method corresponding to the target running mode comprises: Obtaining motor configuration parameters; Calculating the control parameter of the motor according to the motor configuration parameters.

3. The method of setting motor control parameters according to claim 2, wherein, The motor configuration parameters comprise motor resistance, motor inductance, motor pole pair number, motor rotational inertia, motor flux linkage, current loop setting bandwidth and damping coefficient, and the control parameter of the motor comprises current loop controller initial proportional parameter, current loop controller initial integral parameter, speed loop controller initial proportional parameter and speed loop controller initial integral parameter, and the control parameter of the motor is calculated according to the following formula: , , , , wherein K I_p is the initial proportional parameter of the current loop controller, ω is the bandwidth set for the current loop, L is the inductance of the motor, K I_i is the initial integral parameter of the current loop controller, R is the resistance of the motor, K S_i is the initial integral parameter of the speed loop controller, K s_p is the initial proportional parameter of the speed loop controller, δ is the damping coefficient, , P is the number of pole pairs of the motor, is the flux of the motor, and J is the moment of inertia of the motor.

4. The method of setting motor control parameters according to claim 1, wherein, The sampling of the motor for each reciprocating motion of the motor and the adjustment of the to-be-tuned control parameter according to the parameter adjustment ending point and the parameter adjustment step comprise: For the first reciprocating motion of the motor, sampling the running speed of the motor, obtaining an evaluation function value according to the sampling result, saving the evaluation function value, and adjusting the to-be-tuned control parameter once according to the parameter adjustment step; For each reciprocating motion of the motor after the first reciprocating motion, sampling the running speed of the motor, obtaining an evaluation function value according to the sampling result, comparing the obtained evaluation function value with the saved evaluation function value, and updating the saved evaluation function value according to the smaller one of the two; For each reciprocating motion of the motor after the first reciprocating motion, if the evaluation function values obtained in the last N consecutive times are all greater than the saved evaluation function value, and the to-be-tuned control parameter does not reach the parameter adjustment ending point, adjusting the to-be-tuned control parameter once according to the parameter adjustment step, wherein N is a positive integer greater than or equal to 2. If the evaluation function value obtained in the last N consecutive times is greater than the saved evaluation function value, or the to-be-tuned control parameter reaches the parameter adjustment end point, the adjustment of the to-be-tuned control parameter is ended.

5. The method of setting motor control parameters according to claim 4, wherein, The setting of the to-be-tuned control parameter according to the sampling result comprises: The control parameter value corresponding to the minimum evaluation function value is taken as the optimal value of the to-be-tuned control parameter, and the to-be-tuned control parameter is adjusted to the optimal value.

6. The method of setting motor control parameters according to claim 4, wherein, The evaluation function value is calculated according to the following formula: , Wherein, F is the evaluation function value, t(k) is the time corresponding to the kth sampling, ω s (k) is the set value of the motor running speed corresponding to the kth sampling, ω f (k) is the motor running speed corresponding to the kth sampling.

7. The method of setting motor control parameters according to claim 4, wherein, The control parameters of the motor include a speed loop controller proportional parameter and a speed loop controller integral parameter, when the parameter adjustment mode is a fixed proportional adjustment mode, the to-be-tuned control parameter is the speed loop controller proportional parameter and the speed loop controller integral parameter, when the parameter adjustment mode is a separate adjustment mode, the to-be-tuned control parameter is any one of the speed loop controller proportional parameter and the speed loop controller integral parameter.

8. An electric motor drive, characterized by A computer program product comprising a memory, a processor and a computer program stored on the memory and executable on the processor, when the computer program is executed by the processor, the motor control parameter setting method according to any one of claims 1-7 is implemented.

9. A motor control parameter setting system characterized by comprising: The motor control parameter setting method comprises: The motor, a debugging terminal, and the motor driver according to claim 8.

Citation Information

Patent Citations

  • Online adjustment method for PI (proportion integrate) parameter of asynchronous motor

    CN102739151A

  • PI parameter setting method of motor controller, control system and storage device

    CN113497577A