Motor control method and device, electronic equipment, storage medium and product
By detecting deviations in motor motion and establishing predictive relationships, the motor control inputs are optimized to address the issues of motor response speed and stability under load changes and disturbances, achieving stable response and rapid correction within the allowable control range of the motor.
Patent Information
- Application Number
- CN202611639094.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
Motor control methods struggle to balance motion response speed and operational stability under load changes and disturbances.
By detecting the deviation of the motor's motion state, and combining the control response characteristics of the motor under load and the disturbance detection results, a predictive relationship between the predicted motion state and the motor control quantity is established. The motor control quantity is optimized to reduce the deviation, and the target motor control quantity is solved within the allowable control quantity range of the motor.
Under the influence of load changes and disturbances, the system takes into account both the motor's motion response speed and operational stability, reduces the mismatch between the control action and the actual motion conditions, and corrects motion state deviations in a timely manner.
Smart Images

Figure CN123144673A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robotics, and more specifically, to a method, apparatus, electronic device, storage medium, and product for controlling an electric motor. Background Technology
[0002] In motor control, related technologies typically apply control to the motor through a motor driver based on the deviation between the target motion state and the actual motion state, and continue to correct the deviation based on the actual motion state feedback during motor operation in order to complete the predetermined motion task.
[0003] However, there is a certain amount of time between the detection of motion deviation and the application of control measures reflecting the actual motion state of the motor. During this period, load changes and external disturbances may further alter the motor's motion state, causing the previously applied control measures to become incompatible with the current motor motion, resulting in delayed deviation elimination or repeated fluctuations in the motion state.
[0004] Therefore, motor control methods in related technologies struggle to balance motor motion response speed and operational stability under load changes and disturbances. Summary of the Invention
[0005] This disclosure provides a method, apparatus, electronic device, storage medium, and product for controlling a motor, to at least address the problem that in related technologies, motor control methods struggle to balance the motor's motion response speed and operational stability under load changes and disturbances.
[0006] According to one aspect of the present disclosure, a method for controlling a motor is provided, comprising: Detect the deviation between the motor's current target motion state and its actual motion state; Based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, a reference motor control quantity that meets the stable operating conditions of the motor and is used to reduce the motion state deviation is determined. Based on the current actual current and the actual motion state of the motor, the disturbances to the actual motion state of the motor are detected, the disturbance detection results of the motor are obtained, and the motion state prediction model is called to establish the prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection results. Based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, the motor control quantity is solved within the allowable motor control quantity range of the motor to obtain the target motor control quantity. The motor is controlled to operate according to the target motor control quantity.
[0007] According to another aspect of the present disclosure, a motor control device is also provided, comprising: The detection module is used to detect the deviation between the current target motion state and the actual motion state of the motor. The determination module is used to determine a reference motor control quantity that meets the stable operating conditions of the motor based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, and is used to reduce the motion state deviation. A module is established to detect disturbances to the actual motion state of the motor based on the current actual current and the actual motion state of the motor, obtain the disturbance detection result of the motor, and call the motion state prediction model to establish a prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection result. The solution module is used to solve the motor control quantity within the allowable motor control quantity range of the motor, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, to obtain the target motor control quantity; The control module is used to control the operation of the motor according to the target motor control quantity.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor is configured to execute the computer program to implement the steps of any of the above-described motor control methods.
[0009] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the above-described motor control methods.
[0010] According to one aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of any of the above-described motor control methods.
[0011] The technical solution provided in this disclosure proposes a motor control method. Based on the motor's control response characteristics and motion state deviation under the current motor load, a reference motor control quantity is determined. Disturbance detection results and the actual motion state are used together to establish a predictive relationship, characterizing the correlation between the motor control quantity and the predicted motion state. On this basis, combining the reference motor control quantity and the predictive relationship, a target motor control quantity for controlling motor operation is solved within the allowable range of motor control quantities. Since the determination of the reference motor control quantity considers the control response characteristics and stable operating conditions under the current motor load, and the establishment of the predictive relationship considers the impact of disturbances on the motion state, the solution for the target motor control quantity can simultaneously consider the control response under the current load and the impact of disturbances. This reduces the situation where the control action is not adapted to the actual motor motion. Therefore, it can solve the technical problem in related technologies where motor control methods struggle to balance the motor's motion response speed and operational stability under load changes and disturbances. Meanwhile, since the solution of the target motor control quantity aims to reduce the deviation between the predicted motion state and the target motion state, it can determine the control action required for deviation correction based on the predicted motion situation, which helps to reduce the motion state deviation in a timely manner. Combined with the reference motor control quantity that meets the stable operation conditions, and limiting the solution to the range of motor control quantities allowed by the motor, it helps to balance the requirements of deviation correction and stable operation. Therefore, it can achieve the technical effect of balancing the motor's motion response speed and operation stability under the influence of load changes and disturbances. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0013] Figure 1 This is a schematic diagram of an application environment for an optional motor control method according to an embodiment of the present disclosure; Figure 2 This is a schematic flowchart of an optional motor control method according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram of an optional high-order sliding mode observer structure and finite-time convergence according to an embodiment of the present disclosure; Figure 4 This is an optional three-level timescale separation and phase alignment scheduling timing diagram according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram of an optional bidirectional cross-layer data channel and object dictionary mapping according to an embodiment of the present disclosure; Figure 6 This is a block diagram of the overall architecture of an optional cross-domain collaborative control system according to an embodiment of the present disclosure; Figure 7This is a schematic diagram of the structure of a motor control device provided in an embodiment of the present disclosure; Figure 8 This is a schematic diagram of the structure of an optional electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0014] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0015] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term, for example, “A and / or B” or “A, B” indicates implementation as “A,” or implementation as “B,” or implementation as “A and B.”
[0016] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0017] First, the technical terms used in this disclosure will be introduced and explained: Permanent Magnet Synchronous Motor (PMSM): This refers to a motor in which the magnetic field is provided by permanent magnets on the rotor, and the rotor speed is synchronized with the speed of the rotating magnetic field of the stator.
[0018] Torque refers to the force exerted on an object's rotation about its axis, characterizing the magnitude and direction of the rotational force. Electromagnetic torque, in particular, is the torque generated by the interaction between the internal current and magnetic field of a motor.
[0019] Moment of inertia: This is a physical quantity that characterizes the inertia of an object when it rotates about a specified axis. It is related to the object's mass and its distribution relative to the axis of rotation. The greater the moment of inertia, the greater the torque required to produce the same angular acceleration.
[0020] Current loop: refers to a closed-loop control process that adjusts the voltage applied to the motor based on the deviation between the target current and the actual current to reduce the current deviation.
[0021] Speed loop: refers to a closed-loop control process that adjusts the motor's control input based on the deviation between the target speed and the actual speed to reduce the speed deviation.
[0022] Speed control response bandwidth: refers to the frequency range within which the actual speed can respond to changes in the target speed under specified response amplitude requirements in speed control. It is used to measure the speed control's ability to respond to changing commands.
[0023] This disclosure proposes a method for controlling a motor. Before introducing the optional embodiments of this disclosure, relevant technologies will be described first to facilitate understanding of the technical concept of this disclosure: In applications where motors drive mechanical components such as robot joints, related technologies typically determine motion deviations based on position or rotational speed feedback, convert these deviations into motor control signals, and then execute them via a motor driver. The load on the mechanical components may change during motion, and the motor's operation may be affected by external disturbances. Therefore, the motion changes produced by the same control action are not always consistent. Especially when the moment of inertia is small, the motor's rotational speed is highly sensitive to torque changes, and current response and control execution are delayed. This can easily lead to situations where motion deviations are not eliminated in time, and the actual motion state has already changed further, increasing the possibility of response lag or motion oscillations. Furthermore, the amount of control that the motor can execute is limited; rapid changes in control quantities can cause motion fluctuations. Control calculations, data transmission, and drive execution all require time, and untimely coordination can also affect the timely application of control actions. Therefore, how to reduce motion deviations within the actual execution capacity of the motor and the control time requirements, while balancing motion response speed and operational stability, under the influence of load changes and disturbances, is a technical problem that needs to be solved.
[0024] In view of at least one of the above-mentioned technical problems or areas requiring improvement in the related technologies, this disclosure proposes a motor control method that can solve the technical problem that the motor control methods in the related technologies are difficult to balance the motor's motion response speed and operational stability under the influence of load changes and disturbances, and achieve the technical effect of balancing the motor's motion response speed and operational stability under the influence of load changes and disturbances.
[0025] The technical solutions and their effects according to the embodiments of this disclosure are described below through several exemplary implementation methods. It should be noted that the following implementation methods can be referenced, learned from, or combined with each other, and the same terms, similar features, and similar implementation steps in different implementation methods will not be described again.
[0026] According to one aspect of the embodiments of this disclosure, a method for controlling a motor is provided. Optionally, in this embodiment, Figure 1 This is a schematic diagram illustrating an application environment of an optional motor control method according to an embodiment of the present disclosure. The motor control method described above can be applied to, but is not limited to, situations such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application 107, etc.) to terminal device 102 or clients installed on terminal device 102. Database 105 can be set up on or independently of server 104 to provide data storage services for server 104.
[0027] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0028] The motor control method of this disclosure embodiment can be executed by server 104, by terminal device 102, or by both server 104 and terminal device 102. Alternatively, the motor control method of this disclosure can be executed by a client installed on the terminal device 102.
[0029] Taking the motor control method in this embodiment executed by terminal device 102 (server 104) as an example, Figure 2 This is a schematic flowchart of an optional motor control method according to an embodiment of the present disclosure, as shown below. Figure 2 As shown, the process of this method may include the following steps: Step S11: Detect the motion state deviation between the current target motion state and the actual motion state of the motor; Step S12: Based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, determine the reference motor control quantity that satisfies the stable operation conditions of the motor and is used to reduce the motion state deviation. Step S13: Based on the current actual current of the motor and the actual motion state, detect the disturbance of the actual motion state of the motor, obtain the disturbance detection result of the motor, and call the motion state prediction model to establish the prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection result. Step S14: Based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, solve the motor control quantity within the allowable motor control quantity range of the motor to obtain the target motor control quantity. Step S15: Control the motor to operate according to the target motor control quantity. Optionally, in this embodiment, the motor control method is applied to a scenario where a permanent magnet synchronous motor drives the movement of mechanical components. The motor controller is communicatively connected to the motor driver, and the motor driver is connected to the motor. During motor operation, feedback information on current and motion state is used to calculate control quantities, and the motor driver adjusts the motor current according to the calculated target motor control quantity. In this embodiment, torque is used as the specific implementation of the motor control quantity, and angular position and rotational speed are used as the specific content of the motion state.
[0030] In step S11, the target motion state includes the target angular position and the target rotational speed, while the actual motion state includes the actual angular position and the actual rotational speed. For the same control moment, the target angular position is compared with the actual angular position to obtain the angular position deviation, and the target rotational speed is compared with the actual rotational speed to obtain the rotational speed deviation. The angular position deviation characterizes the difference between the current rotational position and the target rotational position, while the rotational speed deviation characterizes the difference between the current rotational speed and the target rotational speed. Both provide a basis for determining the subsequent reference motor control quantity.
[0031] In step S12, the control response characteristics are used to characterize how the motor's motion state changes with the motor control quantity under the current motor load. In the implementation of torque-controlled motors, the total moment of inertia of the motor and the current motor load affects the speed change under torque. Taking the mechanical motion at the motor shaft end as an example, the electromagnetic torque, load torque, and speed have the following relationship:
[0032] in, The electromagnetic torque of the motor. The load torque acting on the motor shaft end, This is the total moment of inertia of the motor and its current load. Let be the mechanical angular velocity of the motor. For time. The difference between electromagnetic torque and load torque corresponds to the torque that causes the change in speed, and the total moment of inertia reflects the inertia of the motor and its load to the change in speed.
[0033] As can be seen from the above relationships, the change in rotational speed under the same torque will also change when the total moment of inertia changes. Therefore, the determination of the reference motor control quantity considers both the control response characteristics and motion state deviation under the current motor load, and aims to meet the requirements of stable motor operation. The stable operation condition is used to constrain the control action during the deviation correction process, avoiding continuously increasing motion oscillations caused by deviation correction. Optionally, in this embodiment, the applicable control adjustment range is determined by combining the total moment of inertia and the motor control delay. Within this range, a reference torque is formed based on the motion state deviation. The reference torque is the specific implementation of the reference motor control quantity.
[0034] The reference motor control quantity represents the desired control action to reduce the current motion state deviation and serves as the control reference for subsequent motor control quantity solutions. Subsequent solutions further consider disturbance effects and the allowable control range of the motor to obtain the target motor control quantity actually executed by the motor driver. For example, even with the same motion state deviation, a reference torque adapted to the current load can be determined based on the changed control response characteristics when the load changes.
[0035] In step S13, the actual current reflects the electromagnetic torque generated by the motor, and the actual motion state reflects the motion result under the combined action of the electromagnetic torque and the disturbance experienced by the motor. Disturbance observation is performed based on the actual current and actual speed to obtain an estimated value of the disturbance torque affecting motor rotation, which serves as the disturbance detection result. Optionally, in this embodiment, the load torque and dynamic influences not individually represented in the basic dynamic relationship during motor motion are uniformly converted into an equivalent combined disturbance torque acting on motor rotation, and the equivalent combined disturbance torque is estimated as a whole.
[0036] After obtaining the disturbance detection results, the motion state prediction model is invoked. Taking the current actual motion state as the prediction starting point, the disturbance detection results are incorporated into the calculation of the motor's motion state changes, establishing a predictive relationship between the predicted motion state and the motor control quantity. This predictive relationship represents the subsequent motion state corresponding to different values of the motor control quantity. In the implementation of prediction based on rotational speed, the following discrete motion relationship can be used:
[0037] in, This is the sequence number of the current control moment. The rotational speed at the current control moment. The rotational speed at the next control moment is calculated based on the model. The sampling period of the velocity loop. The total moment of inertia, The electromagnetic torque involved in the prediction calculation at the current control moment. This is the estimated equivalent combined disturbance torque at the current control moment. The difference between the electromagnetic torque and the estimated disturbance torque, after conversion using the sampling period and total moment of inertia, forms the change in speed from the current speed to the next control moment.
[0038] When establishing the predictive relationship, the current actual speed and disturbance detection results provide the known conditions for this prediction, and the motor control quantities involved in the solution are retained in the predictive relationship. Using this relationship, the predicted speed under different torques can be calculated, and the relationship between the predicted motion state and the motor control quantities at subsequent control moments can be further established. For example, when a load change causes a decrease in the actual motor speed, the disturbance detection results incorporate the corresponding disturbance effect into the speed change calculation, and the subsequent control quantity solution evaluates the predicted motion of the motor based on this.
[0039] In step S14, the reference motor control quantity is used as the reference for the desired control action. Combined with the prediction relationship, the solution is obtained within the allowable range of motor control quantities, with the goal of reducing the deviation between the predicted motion state and the target motion state. Optionally, in this embodiment, Model Predictive Control (MPC) is used for the solution. The predicted speed deviation is evaluated within a finite prediction time domain, considering both torque change and torque amplitude. The optimization objective can be expressed as:
[0040] in, To predict the number of steps, To control the number of steps, This is the step index relative to the current control time. For the prediction of the first time at the current control time The rotational speed at subsequent time points, The target rotational speed at the corresponding time. The torque to be solved at the corresponding control moment, This represents the torque change at adjacent control moments. , and These represent the weights for speed deviation, torque change, and torque amplitude, respectively. The subscripted square norm indicates the squared cost calculated using the corresponding weight. In the case of scalar speed and scalar torque for a single motor, this corresponds to the product of the square of the corresponding value and the weight. The solution uses the torque change in the control time domain as the variable, combined with the applied torque, to determine the torque sequence to be executed.
[0041] In the above optimization objective, the speed deviation term is used to evaluate the correction of motion deviation, the torque change term is used to evaluate the degree of change in control action, and the torque magnitude term is used to evaluate the magnitude of control action. All terms participate in the solution, considering both the change and magnitude of control action while reducing the predicted speed deviation. In an optional implementation, the solution can be combined with the following constraints:
[0042] in, and These are the lower and upper limits of the permissible torque, respectively. This represents the upper limit of the absolute value of the torque change at adjacent control moments. and These are the number of control steps and the number of prediction steps, respectively. The first two constraints limit the torque amplitude and the torque change between adjacent control moments, respectively. The last constraint is a terminal equality constraint, which limits the predicted speed at the end of the prediction time domain. Equal to the corresponding target speed When using terminal equality constraints, the solution is performed within the feasible range that simultaneously satisfies both terminal equality constraints and torque constraints.
[0043] Optionally, in this embodiment, the above optimization solution employs a quadratic programming solver. The quadratic programming solver can use the effective set method to determine the constraints that play a limiting role during the solution process and calculate solutions that satisfy the constraints. Alternatively, other quadratic programming algorithms capable of completing the solution within the speed loop control cycle can also be used. For the obtained torque sequence, the torque corresponding to the current control moment is... The target motor control quantity for this execution has been determined.
[0044] In step S15, the target motor control quantity is provided to the motor driver. The motor driver adjusts the motor current according to the target torque and controls the motor operation through electromagnetic torque. After reaching the next control moment, disturbance detection and motion state prediction are performed using the new actual current and actual motion state, and the target motor control quantity executed this time is re-solved, thereby continuously correcting the motion state deviation during motor operation.
[0045] In this embodiment, the determination of the reference motor control quantity is combined with the control response characteristics under the current load and stable operating conditions. The motion state prediction further considers the impact of disturbances on motor rotation. The solution of the target motor control quantity simultaneously considers the predicted motion deviation and the range of control quantities that the motor can execute. The above process helps to reduce the mismatch between the control action and the actual motion situation caused by load changes and disturbances, and takes into account the feasibility of the control action when correcting motion state deviations, thereby balancing the motor's motion response speed and operating stability.
[0046] As an optional solution, the step of determining a reference motor control quantity that satisfies the stable operating conditions of the motor and is used to reduce the motion state deviation, based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, includes: S21, Based on the control response characteristics, determine the range of values for the adjustment parameter under the stable operating conditions, wherein the adjustment parameter is used to adjust the magnitude of the change in the reference motor control quantity with the motion state deviation; S22, determine the value of the adjustment parameter within the range of the values to obtain the target adjustment parameter; S23, generate the reference motor control quantity based on the target adjustment parameter and the motion state deviation.
[0047] Optionally, in this embodiment, the control action corresponding to the motion state deviation is adjusted by determining the value of the adjustment parameter. The adjustment parameter is the calculated parameter used when generating the reference motor control quantity, the target adjustment parameter is the parameter value used in this calculation, and the reference motor control quantity is the calculation result obtained by combining the value and the motion state deviation.
[0048] In step S21, the range of adjustment parameters that meet the stable operating conditions is determined based on the control response characteristics under the current motor load. Specifically, the total moment of inertia of the motor and the current motor load affects the motion changes caused by the control action, and the control delay of the motor affects the actual effective time of the control action. Therefore, the allowable values of the adjustment parameters need to be compatible with these response characteristics. For cases involving multiple parameters, the range of values can be formed by a combination of parameters that meet the stable operating conditions, where the parameter combination simultaneously satisfies the value limits of each parameter and the coordination requirements between parameters.
[0049] Optionally, in this embodiment, the adjustment parameters include angular position adjustment parameters and speed adjustment parameters, which correspond to the stiffness coefficient and damping coefficient in torque control, respectively. The angular position adjustment parameter is used to adjust the torque action corresponding to the angular position deviation, and the speed adjustment parameter is used to adjust the torque action corresponding to the speed deviation. Therefore, when determining the value range, the allowable values of the angular position adjustment parameter and the speed adjustment parameter, as well as their coordination relationship, are constrained to form a parameter combination that can be selected subsequently.
[0050] In step S22, the parameter combination to be used in this operation is determined within the aforementioned value range to obtain the target adjustment parameters. For the implementation including angular position adjustment parameters and speed adjustment parameters, the target adjustment parameters correspondingly include target angular position adjustment parameters and target speed adjustment parameters. The value range defines the selectable boundaries of the parameter combination, and the selected target adjustment parameters determine the degree of adjustment used for this motion deviation correction. After the motor load changes, the value range can be re-determined based on the changed control response characteristics, and the target adjustment parameters applicable to the current load can be determined within this range.
[0051] In step S23, the target angular position adjustment parameter and the angular position deviation are used together to determine the control action corresponding to the angular position deviation, and the target speed adjustment parameter and the speed deviation are used together to determine the control action corresponding to the speed deviation, thereby generating a reference motor control quantity. In the implementation of torque as the motor control quantity, the generated reference torque reflects both the current motion state deviation and the degree of adjustment determined by the selected parameter combination, and serves as the control reference for solving the subsequent target motor control quantity.
[0052] In this embodiment, the permissible parameter combination is first determined based on the control response characteristics, then the target adjustment parameters are selected and a reference motor control quantity is generated, incorporating stable operating conditions into the generation process of the reference motor control quantity. Therefore, the control action corresponding to the motion deviation can adapt to the control response under the current load, helping to reduce motion state deviation while maintaining motor operational stability.
[0053] As an optional solution, the adjustment parameters include angular position adjustment parameters and speed adjustment parameters. The angular position adjustment parameters are used to adjust the control quantity of the reference motor according to the angular position deviation in the motion state deviation, and the speed adjustment parameters are used to adjust the control quantity of the reference motor according to the speed deviation in the motion state deviation. Determining the value range of the adjustment parameters under the stable operating conditions based on the control response characteristics includes: S31, based on the total moment of inertia of the motor and the current motor load and the control delay of the motor, determine the upper limit of the speed control proportional coefficient that satisfies the stable operating conditions, wherein the control delay is used to indicate the control delay caused by the current response and pulse width modulation of the motor, and the speed control proportional coefficient is the proportional coefficient used when calculating the motor control quantity based on the speed deviation of the motor, wherein the speed deviation is the deviation between the target speed of the motor in the target motion state and the actual speed in the actual motion state; S32, the product of the upper limit of the speed control proportional coefficient and the conversion coefficient is divided by the total moment of inertia to obtain the upper limit of the value of the angular position adjustment parameter, wherein the conversion coefficient is the coefficient conversion ratio from speed adjustment to angular position adjustment; S33, Based on the total moment of inertia and the target damping ratio, establish a value constraint between the angular position adjustment parameter and the speed adjustment parameter, wherein the value constraint limits the speed adjustment parameter to be equal to twice the target damping ratio multiplied by the square root of the product of the angular position adjustment parameter and the total moment of inertia, and the target damping ratio is used to indicate the target ratio of the speed adjustment parameter relative to the critical damping coefficient; S34, under the condition that the angular position adjustment parameter does not exceed the upper limit of the value, determine the combination of the angular position adjustment parameter and the speed adjustment parameter that satisfies the value constraint and the stable operation condition, and determine the set of each value combination as the value range.
[0054] Optionally, in this embodiment, the allowable combination of values for the angular position adjustment parameter and the speed adjustment parameter is determined by combining the total moment of inertia of the motor and the current motor load with the control delay. The angular position adjustment parameter will be denoted as follows: The speed adjustment parameter is recorded as These correspond to the stiffness coefficient and damping coefficient used in the reference torque calculation, respectively.
[0055] In step S31, the proportional coefficient of speed control is used to characterize the proportional relationship between speed deviation and torque control action, and based on this, the limitations of total moment of inertia and control delay on the allowable control action are analyzed. Taking the case where the speed loop uses proportional control as an example, its torque command can be expressed as:
[0056] in, This is the torque command calculated by the speed loop based on the speed deviation. This is the proportional coefficient for speed control. For speed deviation, For the target speed, This represents the actual rotational speed. This relationship indicates that for the same speed deviation, the larger the proportional control coefficient, the larger the calculated torque command amplitude. Here, the allowable boundary of the control action is determined by the proportional control coefficient, and the angular position adjustment parameter and speed adjustment parameter in the reference torque are selected within the value range corresponding to this boundary.
[0057] Under the ideal condition of approximating the current response as an instantaneous response, and combining the aforementioned relationship between torque and speed variation, the open-loop transfer function of the speed loop can be expressed as:
[0058] in, This is the open-loop transfer function of the speed loop, used to describe the input-output relationship formed by the control loop and the motor motion loop before feedback closure. For the complex frequency variable in the Laplace transform, This is the total moment of inertia of the motor and its current load. Let be the proportional coefficient for speed control. Under these ideal conditions, the time constant of the closed-loop response is... This time constant reflects how quickly the rotational speed approaches the target rotational speed.
[0059] In practical motor control, both current response and pulse width modulation (PWM) require time. PWM adjusts the voltage applied to the motor by changing the pulse width of the switching signal, and this modulation process introduces a corresponding delay. After equating the control delays caused by current response and PWM to control delays, the open-loop transfer function can be expressed as:
[0060] in, For the above equivalent control delay, To represent the transmission link of this delay, the other symbols are the same as those defined above. The control delay introduces a time interval between the generation of the control command and the effective action of the corresponding control, therefore, when determining the speed control proportional coefficient, both the total moment of inertia and the control delay need to be considered.
[0061] For the above proportional control and equivalent delay model, this embodiment adopts a value constraint based on the phase margin:
[0062] in, Pi and These are the total moment of inertia and the equivalent control delay, respectively. This represents the boundary corresponding to this value limit. The phase margin reflects the margin reserved for the phase condition that causes continuous oscillation of the feedback control distance. The upper limit of the speed control proportional coefficient is determined according to this limit. At this time, a margin required for stable operation should be reserved within the above boundaries, which can be set in conjunction with a safety factor. For the same control delay, when the total moment of inertia decreases, this boundary should be lowered accordingly; for the same total moment of inertia, when the control delay increases, this boundary should also be lowered accordingly.
[0063] In step S32, the upper limit of the speed control proportional coefficient is used to limit the allowable values of the angular position adjustment parameter. Optionally, in this embodiment, the calculation is performed using the identification result of the current total moment of inertia, and the angular position adjustment parameter and the upper limit of the speed control proportional coefficient satisfy the following relationship:
[0064] in, This is the sequence number of the time when the current parameter is calculated. The angular position adjustment parameter at that moment. This represents the identification result of the total moment of inertia of the motor and its current load at that moment. This is the upper limit of the speed control proportional coefficient determined based on the total moment of inertia and control delay at that moment. These are the conversion factors used from speed adjustment to angular position adjustment. The total moment of inertia identification result was obtained before the calculation of this parameter range and is used to characterize the magnitude of inertia under the current load.
[0065] Since the total moment of inertia is positive, the upper limit of the speed control proportional coefficient and the conversion coefficient are divided by the current total moment of inertia to obtain the upper limit of the angular position adjustment parameter. Therefore, the allowable boundary of the speed control action is further used to limit the control action corresponding to the angular position deviation. The selection of the angular position adjustment parameter is also constrained by the current motor response conditions.
[0066] In step S33, the coordination relationship between the speed adjustment parameters and the angular position adjustment parameters is determined based on the total moment of inertia and the target damping ratio. Optionally, in this embodiment, the following value constraints are adopted:
[0067] in, The speed adjustment parameters are calculated based on the current parameters at the current time. The angular position adjustment parameters at the same time. The results of the total moment of inertia identification are as follows: The target damping ratio represents the target ratio of the speed adjustment parameter to the critical damping coefficient. In this equivalent kinematic relationship between stiffness and damping, the critical damping corresponds to the boundary where the motion deviation transitions from oscillatory decay to non-oscillatory decay, and its coefficient is determined jointly by the angular position adjustment parameter and the total moment of inertia. The above constraints are used to determine the speed adjustment action in conjunction with the angular position adjustment action.
[0068] For a given total moment of inertia and target damping ratio, each angular position adjustment parameter value corresponds to the speed adjustment parameter value calculated according to the above constraints. Therefore, when the angular position adjustment parameter changes, the corresponding speed adjustment parameter is also determined according to this constraint to maintain the coordination between the two types of adjustment actions.
[0069] In step S34, the upper limit of the angular position adjustment parameter is used as the range boundary, and the value constraints between the angular position adjustment parameter and the speed adjustment parameter are combined to determine the parameter combination that simultaneously satisfies the stable operation conditions. Each parameter combination includes an angular position adjustment parameter value and a corresponding speed adjustment parameter value. All available combinations together constitute the value range of the adjustment parameter for subsequent selection of the target adjustment parameter.
[0070] In this embodiment, the allowable boundary of the speed control action is determined by the total moment of inertia and the control delay. This boundary is then used to limit the values of the angular position adjustment parameters, and a coordination constraint between the angular position adjustment parameters and the speed adjustment parameters is established through the target damping ratio. Therefore, the subsequently selected parameter combinations consider both the impact of the current load and the control delay on the motor response, and maintain the coordination between the angular position deviation correction and the speed deviation correction. This helps to balance motion response and operational stability when generating the reference motor control quantity.
[0071] As an optional approach, determining the value of the adjustment parameter within the specified range to obtain the target adjustment parameter includes: S41, construct an objective function with the adjustment parameter as a variable, wherein the objective function is the square of the deviation between the predicted angular position of the rotating component driven by the motor and the target angular position of the rotating component in the target motion state, and the weighted sum of the squares of the values of the adjustment parameter; S42, Invoke the parameter planner, within the range of values, solve for the adjustment parameter with the objective function as the minimum value, and obtain the target adjustment parameter. In the process of solving, the parameter planner calculates the predicted angle position based on the value of the adjustment parameter.
[0072] Optionally, in this embodiment, after determining the range of adjustment parameters, a parameter planner is used to evaluate the motion effects corresponding to different parameter values, and a target adjustment parameter is selected within the range. The parameter planner performs predictive optimization oriented towards the adjustment parameters, and its solution is used to generate the reference motor control quantity. The following description assumes that the adjustment parameters include angular position adjustment parameters and speed adjustment parameters, and both use the same... and express.
[0073] In step S41, the target angular position of the motor-driven rotating component is used as the position control target. The predicted angular position calculated using the corresponding parameter values is compared with the target angular position to obtain the predicted angular position deviation. Here, the angular position represents the rotational position of the rotating component relative to the angular reference, the predicted angular position represents the angular position calculated by the parameter planner at subsequent moments, and the target angular position corresponds to the angular position at the same moment in the target's motion state.
[0074] When constructing the objective function, the square of the predicted angular position deviation and the square of each adjustment parameter value are assigned weights, and then a weighted sum is performed. The predicted angular position deviation term is used to evaluate the position control effect corresponding to the parameter value, while the adjustment parameter value term is used to evaluate the magnitude of the adjustment parameter used. By jointly evaluating both types of content, when selecting parameters that help reduce the predicted angular position deviation, the degree of adjustment corresponding to the parameter value is also considered.
[0075] Optionally, in this embodiment, parameter planning is performed on a prediction time domain containing multiple subsequent time points, with the angular position adjustment parameters and rotational speed adjustment parameters forming parameter sequences corresponding to these time points. The costs at each time point within the prediction time domain are accumulated, and the solution is obtained with the goal of minimizing the accumulated result, which can be expressed as:
[0076] in, Let this be the sequence number of the current parameter planning time. To predict the index of subsequent time steps in the time domain, The number of prediction steps used in parametric planning, indicated by the superscript. This represents the parametric planning layer. The calculation of the first time step at the current parameter planning time. The predicted angular position at each subsequent time step. This represents the target angle position at the corresponding time. and These are the angular position adjustment parameters and speed adjustment parameters to be solved at the corresponding times. As the weight for predicting angular position deviation, and These represent the weights of the angular position adjustment parameter and the speed adjustment parameter, respectively. The subscripted square norm indicates the squared cost calculated using the corresponding weight; when the corresponding quantity is a scalar, it represents the product of the square of that quantity and the corresponding weight. The summation range covers all subsequent time points within the prediction time domain, and the solution variables for the minimization operation are the values of the two types of adjustment parameters.
[0077] Each weight is used to determine the relative influence of the corresponding cost on the objective function. For example, for two sets of parameter sequences both within the allowable range, when the predicted angular position deviation costs corresponding to the two sets of parameter sequences are the same, the set with the smaller parameter cost corresponds to a smaller objective function value. Thus, parameter programming simultaneously evaluates both the position deviation correction effect and the parameter value magnitude.
[0078] In step S42, the parameter planner is invoked, using the aforementioned value range as a constraint for parameter solving. During the solution process, the parameter planner calculates the predicted angular position of the rotating component based on the parameter values involved in the solution. Then, it substitutes the predicted angular position, the corresponding target angular position, and the parameter values into the objective function to calculate the corresponding cost. The target adjustment parameter is determined with the goal of minimizing the objective function. The correlation between the predicted angular position and the parameter values thus participates in the parameter solving, and the value range limits the stable operating conditions that the solution result must satisfy.
[0079] Optionally, in this embodiment, the parameter planner uses the total moment of inertia identification result as the input reflecting the control response under the current load, and receives the convergence flag bit of the disturbance observer as observation status information. The convergence flag bit is used to indicate the estimated convergence state of the disturbance observer. The parameter planner performs parameter planning based on the currently applicable value range to obtain target values or target value sequences for the angular position adjustment parameter and speed adjustment parameter, and uses the corresponding values for generating the reference motor control quantity.
[0080] During continuous motor operation, parameter planning can be repeated according to the parameter planning cycle. Each planning iteration utilizes the obtained inertia identification results and observation state information, combined with the target angle position at the corresponding moment, to resolve the adjustment parameters within the currently applicable value range. Therefore, the generation of subsequent reference motor control quantities can adopt the target adjustment parameters corresponding to the planning results of this iteration.
[0081] In this embodiment, by incorporating the predicted angular position deviation and the adjustment parameter values into the objective function and solving for the parameter values within the range that satisfies the stable operating conditions, the parameter selection is linked to the expected position control effect. Parameter planning considers both reducing the predicted angular position deviation of the rotating component and the degree of adjustment of the adopted parameters, which helps to provide parameter values that are adapted to the motion control requirements for generating the reference motor control quantity, while taking into account both the position control effect and the stability of motor operation.
[0082] As an optional solution, the target adjustment parameters include target angular position adjustment parameters and target speed adjustment parameters. The target angular position adjustment parameters are used to adjust the reference motor control quantity based on the angular position deviation in the motion state deviation, and the target speed adjustment parameters are used to adjust the reference motor control quantity based on the speed deviation in the motion state deviation. Generating the reference motor control quantity based on the target adjustment parameters and the motion state deviation includes: S51, Multiply the target angular position adjustment parameter in the target adjustment parameters with the angular position deviation in the motion state deviation to obtain the angular position control component; S52, Multiply the target speed adjustment parameter in the target adjustment parameters with the speed deviation in the motion state deviation to obtain the speed control component; S53, the angular position control component, the speed control component, and the feedforward motor control quantity are added together to obtain the reference motor control quantity, wherein the feedforward motor control quantity is used to provide the basic control action required for the motor to operate according to the target motion state.
[0083] Optionally, in this embodiment, using the determined target angular position adjustment parameters and target speed adjustment parameters, the control components corresponding to the angular position deviation and speed deviation are calculated respectively, and then combined with the feedforward motor control quantity to generate the reference motor control quantity. Torque will continue to be used as the motor control quantity below, and the target angular position adjustment parameters and target speed adjustment parameters correspond to the stiffness coefficient and damping coefficient used in this calculation, respectively.
[0084] In step S51, the difference between the target angular position and the actual angular position is used as the angular position deviation. The target angular position adjustment parameter is multiplied by the angular position deviation to obtain the angular position control component. This component represents the torque action used to correct the rotational position deviation, and its magnitude depends on both the angular position deviation and the target angular position adjustment parameter used in this case. For the same target angular position adjustment parameter, the larger the absolute value of the angular position deviation, the larger the absolute value of the calculated angular position control component.
[0085] In step S52, the difference between the target speed and the actual speed is used as the speed deviation. The target speed adjustment parameter is multiplied by the speed deviation to obtain the speed control component. This component represents the torque action used to correct the speed deviation, and its magnitude is determined by the speed deviation and the target speed adjustment parameter used in this case. The angular position control component and the speed control component reflect the correction requirements for rotational position and rotational speed, respectively, and jointly participate in the generation of the reference motor control quantity.
[0086] In step S53, the angular position control component, the speed control component, and the feedforward motor control quantity are added together. In the implementation using torque as the motor control quantity, the feedforward motor control quantity is specifically a feedforward torque determined based on the model, used to provide the basic torque required for the motor to operate according to the target motion state. The two deviation control components provide correction based on the difference between the target motion state and the actual motion state. The three components correspond to the same control moment and are added together in the form of torque to obtain the reference torque at that moment, which can be specifically expressed as:
[0087] in, To control the sequence number of the time. This refers to the reference torque at the corresponding moment, i.e., the reference motor control quantity. This represents the feedforward torque at the corresponding moment. These are the target angular position adjustment parameters used in this study. This represents the angular position deviation at the corresponding time. These are the target speed adjustment parameters used in this test. This represents the rotational speed deviation at the corresponding moment. For angular position control components, This is the speed control component. Each torque component is assigned a sign according to the same positive direction of rotation and then algebraically added together.
[0088] For example, when the actual angular position has reached the target angular position, but there is still a deviation between the actual and target speeds, the angular position control component is zero, and the speed control component and the feedforward torque together form the reference torque. When both the angular position deviation and the speed deviation are zero, the reference torque equals the feedforward torque. Thus, the reference torque can simultaneously reflect both the basic control requirements and the correction requirements for the current motion deviation.
[0089] After obtaining the reference torque, it is used as the control reference for subsequent motor control quantity calculation. Combined with the motion state prediction relationship and the allowable control range of the motor, the actual target motor control quantity to be executed is determined. For the reference torque continuously generated at each control moment, the reference torque at each moment constitutes a reference sequence for subsequent calculations.
[0090] In this embodiment, the determined target adjustment parameters are used to calculate the angular position deviation and speed deviation, respectively, and then added to the feedforward torque that provides the basic control action. This reflects the position correction, speed correction, and basic control requirements together in the reference motor control quantity. Therefore, the reference motor control quantity can not only reflect the adjustment degree determined by the target adjustment parameters, but also change with the motion state deviation, providing a control reference adapted to the current motion situation for solving the subsequent target motor control quantity.
[0091] As an optional approach, the actual motion state includes the actual rotational speed of the motor. The disturbance detection result is generated by a disturbance observer, which estimates the disturbance torque affecting the rotation of the motor based on the actual current and the actual rotational speed. The step of detecting the disturbance experienced by the motor in its actual motion state based on the current actual current and the actual motion state to obtain the disturbance detection result includes: S61, determine the electromagnetic torque of the motor based on the actual current, and subtract the speed estimate value in the disturbance observer from the actual speed to obtain the speed estimate deviation. Perform a sign operation on the speed estimate deviation to obtain a sign value. The speed estimate value is the estimation result of the disturbance observer on the actual speed. When the speed estimate deviation is greater than zero, equal to zero, and less than zero, the sign value is 1, 0, and -1, respectively. S62, construct a speed correction amount based on the speed estimation deviation, wherein the speed correction amount is the sum of a first correction term and a second correction term, the first correction term is obtained by multiplying the square root of the absolute value of the speed estimation deviation, the sign value of the speed estimation deviation, and a first observation coefficient, and the second correction term is obtained by time integration of the product of the sign value and the second observation coefficient; S63, divide the difference between the electromagnetic torque and the disturbance torque estimate in the disturbance observer by the total moment of inertia of the motor and the current motor load to obtain a target quotient value, and add the target quotient value to the speed correction amount to obtain the speed estimate change rate of the speed estimate value. The product of the sign value and the third observation coefficient is determined as the disturbance torque estimate change rate of the disturbance torque estimate value, wherein the disturbance torque estimate value is the estimation result of the disturbance observer on the disturbance torque affecting the rotation of the motor; S64, update the speed estimate based on the speed estimate and the rate of change of the speed estimate to obtain the updated speed estimate, and update the disturbance torque estimate based on the disturbance torque estimate and the rate of change of the disturbance torque estimate to obtain the updated disturbance torque estimate; S65, the updated speed estimate and the disturbance torque estimate are used to calculate the speed estimate deviation and the target quotient in the subsequent observation update, respectively, and the updated disturbance torque estimate is determined as the disturbance detection result.
[0092] Optionally, in this embodiment, the disturbance observer employs a high-order sliding mode observer based on the superspiral algorithm. The disturbance observer continuously calculates speed estimates and disturbance torque estimates based on the actual current and actual speed. The speed estimate represents the actual motor speed estimated by the observer, and the disturbance torque estimate represents the equivalent combined disturbance torque affecting motor rotation. The equivalent combined disturbance torque includes the load torque and the unmodeled dynamic effects converted to torque.
[0093] Figure 3 This is a schematic diagram of an optional high-order sliding mode observer structure and finite-time convergence according to an embodiment of this disclosure. Figure 3 As shown, speed feedback corresponds to the actual speed of the motor, and observation error corresponds to the speed estimation deviation. The first term of the superspiral curve and the superspiral integral term together form the speed correction. The speed observation equation is used to update the speed estimate, and the disturbance torque observation equation is used to update the disturbance torque estimate. The above estimates continue to participate in the calculation through subsequent observation updates, forming the disturbance observation process.
[0094] In step S61, the electromagnetic torque is determined based on the current actual current of the motor. Optionally, the quadrature-axis current in the current loop can be used. The electromagnetic torque is calculated, where the quadrature-axis current is the current component in the rotating coordinate system that participates in the generation of the electromagnetic torque. The actual rotational speed is obtained from encoder feedback, and the actual speed and the estimated speed use the same unit of rotation and direction of rotation. The speed estimation deviation is obtained by subtracting the estimated speed value saved by the observer before this update from the actual speed.
[0095] The speed estimation deviation reflects the difference between the actual speed and the current estimate from the observer. The deviation is then subjected to a sign operation to extract its direction: a sign value of 1 indicates a deviation greater than zero, a sign value of 0 indicates a deviation equal to zero, and a sign value of -1 indicates a deviation less than zero. Figure 3 Observation error Corresponding to the above-mentioned speed estimation deviation, subsequent correction terms are calculated based on the same speed estimation deviation.
[0096] In step S62, a first correction term is constructed using the magnitude and sign of the speed estimation deviation, and a second correction term is constructed by integrating the product of the deviation sign and the second observation coefficient over time. The two terms are then added together to obtain the speed correction amount, and their calculation relationship is as follows:
[0097] in, This is the speed correction amount. This refers to the actual rotational speed. This is an estimated value for the rotational speed. To account for the speed estimation error, The sign value is obtained by performing a sign operation on the deviation; The first observed coefficient, The second observation coefficient, For time. Corresponding to the first correction term, This corresponds to the second correction term.
[0098] The first correction term utilizes both the absolute value and direction of the deviation, and its magnitude varies with the square root of the absolute value of the deviation. The second correction term, corresponding to the cumulative deviation sign, retains the cumulative result during continuous observation and continues to change as the observation process progresses. Therefore, the speed correction includes both the correction effect formed by the current deviation and the correction effect accumulated over time.
[0099] In step S63, the target quotient is first calculated using the electromagnetic torque, the estimated disturbance torque, and the total moment of inertia. Then, the target quotient is added to the speed correction to determine the rate of change of the estimated speed. Simultaneously, the rate of change of the estimated disturbance torque is calculated using the sign value and the third observation coefficient. The two estimates in the observer change according to the following state equation:
[0100] in, For the estimated rotational speed Rate of change over time The disturbance torque estimate Rate of change over time For electromagnetic torque, This is the total moment of inertia of the motor and its current load. This is the speed correction amount. The correction input used for the rate of change of the disturbance torque estimate. Corresponding to the target quotient, it represents the rate of change of rotational speed calculated based on the difference between the electromagnetic torque and the estimated disturbance torque.
[0101] The correction input used for the rate of change of the disturbance torque estimate is determined according to the following relationship:
[0102] in, The correction input used for the rate of change of the disturbance torque estimate. The third observation coefficient, To be based on actual speed Compared with the estimated speed The sign value is determined by the deviation between the two values. This correction input introduces the direction of the speed estimation deviation into the update process of the disturbance torque estimate.
[0103] In step S64, the estimated rotational speed and the estimated disturbance torque are two state variables that the observer continuously stores. Each observation update starts with the two estimates stored at the end of the previous update, and advances the two state variables according to the corresponding rate of change during the current observation to obtain the estimated rotational speed and the estimated disturbance torque at the end of the current update. Thus, the rate of change is used to determine how the estimates change over time, and the updated estimates are used to characterize the estimation result at the end of the current update.
[0104] In step S65, the updated two estimates are saved to the observer. During the next observation update, the newly obtained actual rotational speed is subtracted from the saved rotational speed estimate, and the rotational speed estimation deviation is recalculated; the newly determined electromagnetic torque is subtracted from the saved disturbance torque estimate, and the target quotient is recalculated in conjunction with the total moment of inertia. Thus, the rotational speed estimate participates in continuous observation by influencing the calculation of the next deviation and correction, and the disturbance torque estimate participates in continuous observation by influencing the calculation of the next target quotient.
[0105] The disturbance torque estimate obtained in this update is designated as the disturbance detection result and provided to the motion state prediction model. Based on this, the motion state prediction model incorporates the equivalent combined disturbance affecting motor rotation into the prediction relationship. The speed estimate serves as the internal feedback state of the observer in the above process, while the disturbance torque estimate serves both as the internal feedback state and as the external disturbance detection result; the two are interconnected.
[0106] Optionally, in this embodiment, the first, second, and third observation coefficients are adaptively adjusted based on the identified total moment of inertia to adapt to changes in the inertia of the motor and its load. As another optional implementation, fixed observation coefficients tuned offline according to the Lyapunov stability criterion can be used. The selection of the observation coefficients is adapted to the disturbance variation and the convergence conditions of the observer.
[0107] In this embodiment, the speed estimation deviation is used in the calculation of the speed correction and the rate of change of the disturbance torque estimate. These two estimates are updated and then used in subsequent observations, thus forming a process of continuously correcting the estimation results using actual motion feedback. The square root correction term and the integral correction term jointly participate in speed estimation, which helps reduce chattering in sliding mode observation. Under the condition that the corresponding observer convergence conditions are met, the obtained disturbance torque estimate can provide disturbance information for motion state prediction, helping to reduce prediction deviations caused by load changes and disturbances, and providing a basis for subsequent motor control that balances motion response speed and operational stability.
[0108] As an optional approach, the invocation of the motion state prediction model, based on the actual motion state and the disturbance detection results, establishes a predictive relationship between the predicted motion state of the motor and the motor control quantity, including: S71, based on the speed control response bandwidth of the motor, adjust the prediction step number of the motion state prediction model to obtain the target prediction step number, wherein the speed control response bandwidth is used to indicate how quickly the actual speed of the motor responds to the change of the target speed in the target motion state; the higher the speed control response bandwidth, the fewer the target prediction steps; the prediction step number is used to indicate the number of subsequent control moments of the motion state of the motor that the motion state prediction model needs to predict. S72, invoke the motion state prediction model, and based on the actual motion state and the disturbance detection result, establish the prediction relationship between the predicted motion state of the motor and the motor control quantity at each subsequent control moment corresponding to the target prediction step number.
[0109] Optionally, in this embodiment, the prediction length of the motion state prediction model is adjusted according to the motor's speed control response bandwidth. The speed control response bandwidth reflects the actual speed's responsiveness to changes in the target speed. A higher bandwidth allows the motor to respond quickly to changes in the target speed; a lower bandwidth requires a longer time for the actual speed to complete the corresponding change. The number of prediction steps corresponds to the number of subsequent control moments the model needs to predict. With the same control period, more prediction steps result in a longer prediction timeframe.
[0110] In step S71, the number of prediction steps adapted to the motor response speed is determined based on the speed control response bandwidth, resulting in the target number of prediction steps. When the response bandwidth is high, fewer prediction steps are used to shorten the prediction time and reduce the control time involved in subsequent prediction calculations; when the response bandwidth is low, more prediction steps are used to extend the prediction time, allowing for evaluation of the motor's motion state changes during a longer response process. Therefore, the target number of prediction steps limits the prediction length used to establish the prediction relationship in this step.
[0111] In step S72, taking the current actual motion state as the prediction starting point, the disturbance detection result is incorporated into the motion state prediction model, and the prediction relationship between the predicted motion state and the motor control quantity at each subsequent control moment is established sequentially according to the target prediction step number. The target prediction step number determines which subsequent control moment needs to be predicted, the actual motion state determines the starting state of the prediction, and the disturbance detection result provides disturbance information that affects the changes in the subsequent motion state. All three are used together to establish the prediction relationship in this step.
[0112] Optionally, in the implementation where rotational speed is used as the predicted motion state and torque is used as the motor control quantity, the aforementioned rotational speed prediction relationship is retained. Based on the current actual rotational speed, the estimated disturbance torque, and the torque involved in the solution, the relationship between the predicted rotational speed and torque at the next control moment is established. Subsequently, the predicted rotational speed at the previous control moment is used as the starting point for continued prediction, and the calculation continues in conjunction with the torque at subsequent control moments until the last control moment corresponding to the target prediction step number. The above calculation retains the relationship between the predicted rotational speed and the torque involved in the solution, and subsequent solutions use this relationship to evaluate the deviation between the predicted motion state and the target motion state corresponding to different torque values.
[0113] During motor operation, the prediction step count is adjusted based on changes in the speed control response bandwidth, and the corresponding target prediction step count is used when re-establishing the prediction relationship. For the adjusted prediction length, the motion state prediction model starts from the actual motion state and combines it with the disturbance detection results to establish the corresponding prediction relationship, thereby incorporating the adjustment of the prediction length into the prediction information used in the subsequent motor control quantity solution.
[0114] As another optional implementation, the number of prediction steps in the motion state prediction model can also be a predetermined fixed value, and the prediction relationship for subsequent control moments can be established according to this fixed value. This implementation uses a fixed prediction length, while the aforementioned implementation that adjusts the number of prediction steps based on the speed control response bandwidth uses a prediction length that varies with the response bandwidth.
[0115] By employing the aforementioned dynamic adjustment method, reducing the number of prediction moments when the speed control response bandwidth is high helps reduce the computational load and latency. Conversely, increasing the number of prediction moments when the speed control response bandwidth is low incorporates motion state changes during longer response processes into the prediction and control quantity calculations. Thus, the prediction length is adapted to the motor's response speed, helping to balance the timeliness of prediction calculations with the ability to predict subsequent motion states, providing a basis for reducing motion state deviations.
[0116] As an optional approach, the motor control quantity is solved by a motor controller, and the motor is driven by a motor driver communicatively connected to the motor controller. Before obtaining the target motor control quantity by solving the motor control quantity within the allowable range of the motor control quantity based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, the method further includes: S81, calibrate the time recorded by the motor controller and the motor driver respectively using the same timing reference; S82, according to the timing reference, set the start time for the motor controller to start solving the motor control quantity, and the start time for the motor driver to start adjusting the current of the motor according to the solution result of the motor control quantity, wherein the set solution start time and the set current adjustment start time are used to send the solved target motor control quantity to the motor driver before the current adjustment start time; In this process, the motor controller begins solving for the motor control quantity at the start of the solution process. The current regulation and disturbance detection performed by the motor driver are both initiated by the same trigger signal at the start of the current regulation. The current regulation adjusts the motor current according to the received target motor control quantity to control the motor operation. The disturbance detection updates the disturbance detection result based on the current actual current of the motor and the actual motion state. The motor driver periodically sends the disturbance detection result to the motor controller. The motor controller uses the received disturbance detection result to subsequently establish the prediction relationship and solve for the motor control quantity.
[0117] Optionally, in this embodiment, the motor controller is responsible for establishing the predictive relationship and solving the target motor control quantity, while the motor driver is responsible for adjusting the motor current according to the target motor control quantity and performing disturbance detection. The two exchange control quantities and feedback information via a real-time communication bus. Before starting to solve the motor control quantity, the timing of both is calibrated, and the start time for solving and current adjustment is set; during operation, corresponding operations are performed according to the set times.
[0118] Figure 4This is an optional three-level timescale separation and phase alignment scheduling timing diagram according to an embodiment of this disclosure. For example... Figure 4 As shown, current regulation and disturbance detection, target motor control quantity solving, and regulation parameter planning are executed according to their respective cycles. Specifically, the bottom-level observation corresponds to the disturbance detection performed by the motor driver, the middle-level optimization corresponds to the target motor control quantity solving performed by the motor controller, and the upper-level scheduling corresponds to the aforementioned regulation parameter planning. All operations use a common timing reference and establish their sequential relationship by setting their respective start times.
[0119] In step S81, the times recorded by the motor controller and motor driver are calibrated using the same timing reference. Optionally, the real-time communication bus employs Ethernet for Control Automation Technology (EtherCAT), with the motor controller acting as the master and the motor driver as the slave. The system time provided by Distributed Clocks (DC) is used as a common timing reference, and the local timings of the master and slave stations are calibrated to this reference. In one implementation, the clock of the first slave station is selected as the reference clock. After calibration, the controller and driver determine the start time of operation according to the common time reference.
[0120] In step S82, the motor controller calculates the target motor control quantity according to the calibrated time schedule, and the motor driver schedules current adjustment according to the same timing reference. By setting the time offset between the solution start time and the current adjustment start time, time is allocated for the calculation and transmission of the control quantity, so that the current adjustment can begin only after the target motor control quantity has been solved and delivered to the motor driver. In the implementation using a distributed clock, the offset of the driver synchronization signal relative to the common timing reference can be configured through the synchronization offset register, and combined with the controller's solution start time setting, the above timing relationship is formed.
[0121] The motor controller initiates the calculation of the target motor control quantity at the start of the solution process, according to the calibrated global time. The EtherCAT Slave Controller (ESC) in the motor driver generates Synchronization Signal 0 (Sync0) based on the distributed clock. At the start of current regulation, this signal is used to jointly initiate current regulation and disturbance detection. Current regulation uses the received target motor control quantity, while disturbance detection updates the results using the current actual current and actual motion state. Thus, the time scheduling on the controller side and the synchronization signal triggering on the driver side are executed in coordination under the same timing reference.
[0122] Optionally, the execution cycle for current regulation and disturbance detection is 50 microseconds, the solution cycle for the target motor control quantity is 1 millisecond, and the planning cycle for the regulation parameters is 4 milliseconds. These cycles constitute a configuration example, demonstrating that current regulation, disturbance detection, control quantity solution, and parameter planning are executed at different time scales. For the connection between parameter planning and control quantity solution, the start time is also arranged according to a common timing reference, and the parameter planning results are provided to the control quantity solution process before the start of the solution cycle using those results.
[0123] Figure 5 This is a schematic diagram of an optional bidirectional cross-layer data channel and object dictionary mapping according to an embodiment of this disclosure. For example... Figure 5 As shown, a periodic upload channel, a periodic download channel, and an aperiodic configuration channel are set up between the motor controller and the motor driver. An object dictionary is used to organize the parameters and process data in the driver, and different data are distinguished by indexes and sub-indexes; the data mapping in the channels is used to determine the data transmitted in each communication and its corresponding object dictionary entry.
[0124] The periodic upload channel uses a Transmit Process Data Object (TxPDO) to send the actual speed and disturbance detection results from the motor driver to the motor controller. Figure 5 The actual speed feedback corresponds to the actual rotational speed in the actual motion state, and the disturbance torque estimation corresponds to the disturbance detection result. In the mapping example shown, the actual rotational speed uses object 0x606C:00, and the disturbance detection result uses a manufacturer-specific object. The motor controller uses the received disturbance detection result to subsequently establish a predictive relationship and combines it with the reference motor control quantity to solve for the target motor control quantity to be executed subsequently.
[0125] The periodic transmission channel uses a Receive Process Data Object (RxPDO) to send the target motor control quantity from the motor controller to the motor driver. In the implementation where torque is used as the motor control quantity, the Cyclic Synchronous Torque (CST) mode can be adopted, and the calculated target torque is transmitted through object 0x6071:00. This target torque corresponds to the target motor control quantity, and the motor driver uses the received target torque to regulate the current at the pre-set current regulation start time. The uploading of disturbance detection results and the transmission of the target torque thus constitute a bidirectional data exchange in the continuous control process.
[0126] During the initialization phase, aperiodic configuration can be completed through Service Data Objects (SDOs), including mapping configuration of Process Data Objects (PDOs), initialization of disturbance observer parameters, and distributed clock synchronization configuration. After initialization, periodic data exchange is performed according to the established mapping. During operation, the observer gain coefficient and the weight parameters of model predictive control can also be adjusted through Service Data Objects. In this embodiment, Model Predictive Control (MPC) corresponds to the process of solving for the target motor control quantity by combining the predictive relationship.
[0127] Optional, Figure 5 The upload channel shown can also carry inertia identification results, control delay estimation results, observer convergence flags, and the upper limit of the speed control proportional coefficient. The download channel can also carry the upper limit of the angular position adjustment parameters required for disturbance compensation torque and parameter adjustment, as well as recommended values for speed adjustment parameters. The upper limits of inertia, control delay, and proportional coefficient are linked to the determination of the aforementioned adjustment parameter value ranges; the parameter upper limits and recommended values are used for corresponding parameter adjustments. The manufacturer-specific object address in the figure is for illustrative purposes; the actual data mapping uses the indexes and sub-indexes allocated in the driver object dictionary. The solution for motor control quantities can also be deployed on a high-performance motion controller, which will handle the corresponding solution and communication operations.
[0128] Through the aforementioned timing arrangement and data exchange, the solution, transmission, and current regulation of the target motor control quantity have a clear sequential relationship, which helps to reduce the impact of the inconsistency between the control quantity delivery time and the execution time on the control process. Current regulation and disturbance detection are initiated by the same synchronization signal, and the updated disturbance detection results participate in subsequent prediction and control quantity solution, thereby connecting the actual operation feedback on the driver side with the control decision on the controller side, providing timing and feedback support for continuous motor control under the influence of load changes and disturbances.
[0129] As an optional approach, the step of solving for the motor control quantity within the allowable range of motor control quantity, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, to obtain the target motor control quantity, includes: S91, based on the disturbance detection result, adjust the upper limit of the change in the motor control quantity, wherein the upper limit of the change is used to limit the absolute value of the difference between the motor control quantities at adjacent control times; S92, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, within the allowable motor control quantity range of the motor, and with the constraint that the absolute value of the difference between the motor control quantities at adjacent control times does not exceed the upper limit of the change, the motor control quantity is solved to obtain the target motor control quantity.
[0130] Optionally, in this embodiment, the disturbance detection results are further used to adjust the upper limit of the change in the motor control quantity. The allowable range of motor control quantity limits the value of the control quantity itself, while the upper limit of the change limits the allowable range of change in the control quantity from one control moment to an adjacent control moment. Both together constrain the solution of the target motor control quantity, so as to take into account both the magnitude of the control action and the degree of change.
[0131] In step S91, the upper limit of the change amount used in subsequent solutions is adjusted based on the disturbance situation characterized by the disturbance detection results. In the implementation where torque is used as the motor control variable, the disturbance detection results correspond to the estimated disturbance torque value, and the upper limit of the change amount corresponds to the upper limit of the absolute value of the torque change at adjacent control moments. This upper limit simultaneously restricts the magnitude of torque increase and decrease. Under the same control period, tightening the upper limit of the change amount can reduce the allowable rate of torque change.
[0132] For example, during the dynamic response period when load changes cause changes in the motor's motion state, the control increment constraints are adjusted based on disturbance observation results. By tightening the upper limit of torque change, the magnitude of torque change between adjacent control moments is limited. The adjusted upper limit is used to solve for the target motor control quantity. Thus, the disturbance detection results participate in both motion state prediction and the constraint of control quantity change magnitude.
[0133] In step S92, the adjusted upper limit of the change is used as the constraint boundary for the solution, and the aforementioned reference motor control quantity and prediction relationship are used to solve the motor control quantity with the goal of reducing the deviation between the predicted motion state and the target motion state. During the solution process, the motor control quantity simultaneously satisfies the allowable value range and the change limit between adjacent control moments. In the implementation of solving using a torque sequence, the torque to be solved at the current control moment is compared with the torque executed at the previous control moment, and the torques to be solved at subsequent adjacent control moments are also constrained according to the same upper limit of change, thereby incorporating the change limit into the solution process of the control sequence.
[0134] The control increment cost term in the aforementioned optimization objective, along with the change constraint in this embodiment, participates in the solution. The control increment cost term evaluates the magnitude of torque change with appropriate weights and, together with cost terms such as motion state deviation, influences the solution result; the change constraint limits the upper limit of the absolute value of torque change between adjacent control moments. Solving within the feasible range that satisfies all constraints yields the target motor control quantity that balances motion deviation correction and control quantity change limits. This target motor control quantity corresponding to the current control moment is then used to control motor operation.
[0135] In this way, the operating conditions reflected by the disturbance detection results can further influence the allowable range of control variable changes. The adjusted upper limit of the change, together with the motion state prediction and deviation correction targets, works on the control variable solution. Especially during the dynamic response period after load changes, limiting the torque change range between adjacent control moments helps to mitigate the impact and oscillations caused by rapid changes in control action, and continuously corrects motion state deviations within the constraints, thereby balancing the motor's motion response and operational stability.
[0136] To better understand and illustrate the solutions provided by the embodiments of this disclosure and their beneficial effects, the following description, in conjunction with a specific scenario embodiment, will illustrate the solutions provided by the embodiments of this disclosure.
[0137] This scenario uses the motor drive of a four-axis Selective Compliance Assembly Robot Arm (SCARA) as an example. Each drive axis is equipped with a servo driver and a permanent magnet synchronous motor, and the motor controller is connected to each servo driver through the aforementioned real-time communication bus. The control process is first explained by considering the case where the load of one drive axis changes during operation, and then this process is applied to the coordinated operation of multiple drive axes.
[0138] Figure 6 This is a block diagram of the overall architecture of an optional cross-domain collaborative control system according to an embodiment of this disclosure. Figure 6 As shown, the master station corresponds to the motor controller, the slave servo driver corresponds to the motor driver, and the permanent magnet synchronous motor corresponds to the controlled motor. The master station is responsible for planning the adjustment parameters, generating the reference motor control quantity, and solving the target motor control quantity. The driver is responsible for current regulation and disturbance observation. The real-time bus connects the control calculations and status feedback on both sides. The parameter planner in the figure corresponds to the determination of the aforementioned target adjustment parameters, the torque command generation and constraint optimization correspond to the formation of the reference torque and the solution of the target torque, and the low-level observation corresponds to the generation of disturbance detection results.
[0139] In one deployment, the motor controller uses a master station running a Linux operating system and communicates with the servo driver supporting the driver and motion control protocols using the IgH master station protocol stack. The disturbance observation program is deployed in the driver's current loop interrupt service routine, the control quantity solving program is deployed in the master station's real-time task, and the parameter planning program is deployed in the master station's application layer. The driver supports the mapping of manufacturer-specific process data through firmware, and relevant observation results and control parameters participate in data exchange according to the aforementioned communication configuration.
[0140] During operation, the motor controller determines the motion state deviation based on the target motion state and the actual motion state of the drive shaft. When the load changes, the inertia identification result corresponding to the current load is used to determine the range of adjustment parameters. Within this range, the parameter planner determines the applicable angular position adjustment parameters and speed adjustment parameters, and forms a reference motor control quantity accordingly. At the same time, the driver side continuously updates the disturbance torque estimate based on the actual current and actual speed, reflecting the impact of load changes on motor rotation in the disturbance detection results.
[0141] After receiving the disturbance detection result of the drive shaft, the motor controller establishes a predictive relationship using the updated actual motion state and solves for the target torque in conjunction with the reference motor control quantity. During the dynamic response period after load changes, the torque change constraint is adjusted in the aforementioned manner to correct motion state deviations within the allowable torque range and change range. The solved target torque is sent to the corresponding driver, which uses it for current regulation at a predetermined time. The actual current, actual speed, and disturbance detection results obtained thereafter continue to participate in the next control calculation, forming a process that connects load changes, parameter adjustments, disturbance feedback, and torque execution.
[0142] Extending the above process to four drive axes, each axis performs disturbance observation and target motor control variable solving separately. Parameter planning determines the corresponding adjustment parameters based on the inertia identification results of each axis, maintaining a correspondence between the actual motion state, disturbance detection results, and target torque of each axis. Each servo drive uses a common timing reference and coordinates access to process data and command latching through a synchronization manager, latching and executing the corresponding control commands for each axis at the same reference time. Thus, each axis can adopt control parameters suitable for its own load conditions and execute control under a common timing schedule.
[0143] For the cycle configuration of the control task, in addition to the examples mentioned above, other cycle combinations that satisfy the sequential increase of the current regulation cycle, control quantity solution cycle, and parameter planning cycle can also be used, wherein the control quantity solution cycle is at least 20 times the current regulation cycle. The start time of each cycle is still configured according to the aforementioned requirement of delivering the solution results in advance. For predictive optimization, the number of control steps is used to determine the number of subsequent control quantities participating in this optimization. It can be combined with the speed control response bandwidth configuration, or a fixed value can be used, which, together with the aforementioned prediction step configuration, determines the prediction and solution time range.
[0144] Optionally, a higher-order sliding mode observation structure can be used for disturbance observation to perform an overall estimation of the load torque and the equivalent combined disturbance formed by the unmodeled dynamics. The observation results are still used for subsequent prediction and control variable solving in the aforementioned manner. The rated torque parameters of the motor can be used as the nominal reference for the observation output to express the observation output in a dimensionless manner. As an optional compensation configuration, the disturbance observation results can also be used to generate disturbance compensation torque, which is provided to the driver via the downlink channel for torque feedforward compensation.
[0145] When the driver supports multiple operating modes, in addition to the periodic synchronous torque mode used in this scenario, the periodic synchronous speed (CSV) mode or the periodic synchronous position (CSP) mode can be selected through the operating mode object 0x6060:00. These modes are used for receiving and controlling periodic speed commands or position commands, respectively. The operating mode configuration corresponds to the internal control functions performed by the driver. In this scenario, the periodic synchronous torque mode is used to implement the target torque as the final control quantity.
[0146] The aforementioned motor control process can also be applied to joint servo drives of industrial robots and collaborative robots, high-speed spindle and feed drives of CNC machine tools, servo motors and propulsion motors of UAVs or electric vertical take-off and landing aircraft, motor drives of optoelectronic platforms, and other multi-axis synchronous motion control scenarios. In these applications, the calculation, feedback, and execution relationships between the motor controller, driver, and motor are utilized, and control is executed based on the load and target motion state of each motor.
[0147] Through axis-by-axis parameter adjustment, disturbance feedback, and constraint-based control calculation in this scenario, load changes can be simultaneously reflected in the reference control action and subsequent motion prediction. Torque execution is also limited by allowable amplitude and variation, which helps to balance the correction of motion state deviations and operational stability. While maintaining their respective control calculations and feedback correspondences, multiple drive axes execute control commands according to a common time base, further helping to reduce the impact of inconsistent execution times of each axis on coordinated motion.
[0148] This disclosure provides a motor control device. Figure 7 This is a schematic diagram of the structure of a motor control device provided in an embodiment of the present disclosure, as shown below. Figure 7 As shown, the control device 70 for the motor may include: The detection module 701 is used to detect the motion state deviation between the current target motion state and the actual motion state of the motor; The determining module 702 is used to determine a reference motor control quantity that meets the stable operating conditions of the motor based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, and is used to reduce the motion state deviation. Module 703 is used to detect disturbances to the actual motion state of the motor based on the current actual current and the actual motion state of the motor, obtain the disturbance detection result of the motor, and call the motion state prediction model to establish a prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection result. The solver module 704 is used to solve the motor control quantity within the allowable motor control quantity range of the motor, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, to obtain the target motor control quantity. The control module 705 is used to control the operation of the motor according to the target motor control quantity.
[0149] In one exemplary embodiment, the determining module includes: The first determining unit is used to determine the range of values of the adjustment parameter under the stable operating conditions based on the control response characteristics, wherein the adjustment parameter is used to adjust the magnitude of the change of the reference motor control quantity with the motion state deviation; The second determining unit is used to determine the value of the adjustment parameter within the range of the values, so as to obtain the target adjustment parameter; The generation unit is used to generate the reference motor control quantity based on the target adjustment parameters and the motion state deviation.
[0150] In an exemplary embodiment, the adjustment parameters include angular position adjustment parameters and speed adjustment parameters. The angular position adjustment parameters are used to adjust the reference motor control quantity based on the angular position deviation in the motion state deviation, and the speed adjustment parameters are used to adjust the reference motor control quantity based on the speed deviation in the motion state deviation. The first determining unit is further configured to: Based on the total moment of inertia of the motor and the current motor load, and the control delay of the motor, an upper limit of the speed control proportional coefficient that satisfies the stable operating conditions is determined. The control delay is used to indicate the control delay caused by the current response and pulse width modulation of the motor. The speed control proportional coefficient is the proportional coefficient used when calculating the motor control quantity based on the speed deviation of the motor. The speed deviation is the deviation between the target speed of the motor in the target motion state and the actual speed in the actual motion state. The upper limit of the angular position adjustment parameter is obtained by dividing the product of the upper limit of the speed control proportional coefficient and the conversion coefficient by the total moment of inertia, wherein the conversion coefficient is the coefficient conversion ratio from speed adjustment to angular position adjustment. Based on the total moment of inertia and the target damping ratio, a value constraint is established between the angular position adjustment parameter and the speed adjustment parameter. The value constraint limits the speed adjustment parameter to be equal to twice the target damping ratio multiplied by the square root of the product of the angular position adjustment parameter and the total moment of inertia. The target damping ratio is used to indicate the target ratio of the speed adjustment parameter relative to the critical damping coefficient. Under the condition that the angular position adjustment parameter does not exceed the upper limit of the value, the combination of the angular position adjustment parameter and the speed adjustment parameter that satisfies the value constraint and the stable operation condition is determined, and the set of each of the value combinations is determined as the value range.
[0151] In one exemplary embodiment, the second determining unit is further configured to: Construct an objective function with the adjustment parameters as variables, wherein the objective function is the square of the deviation between the predicted angular position of the motor-driven rotating component and the target angular position of the rotating component in the target motion state, and the weighted sum of the squares of the values of the adjustment parameters; The parameter planner is invoked to solve for the adjustment parameter within the range of values, with the objective function being minimized, to obtain the target adjustment parameter. During the solution process, the parameter planner calculates the predicted angular position based on the values of the adjustment parameter.
[0152] In an exemplary embodiment, the target adjustment parameters include a target angular position adjustment parameter and a target speed adjustment parameter. The target angular position adjustment parameter is used to adjust the reference motor control quantity according to the angular position deviation in the motion state deviation, and the target speed adjustment parameter is used to adjust the reference motor control quantity according to the speed deviation in the motion state deviation. The generation unit is further configured to: Multiply the target angular position adjustment parameter in the target adjustment parameters by the angular position deviation in the motion state deviation to obtain the angular position control component; Multiply the target speed adjustment parameter in the target adjustment parameters by the speed deviation in the motion state deviation to obtain the speed control component; The angular position control component, the speed control component, and the feedforward motor control quantity are added together to obtain the reference motor control quantity, wherein the feedforward motor control quantity is used to provide the basic control action required for the motor to operate according to the target motion state.
[0153] In one exemplary embodiment, the solving module includes: The first adjustment unit is used to adjust the upper limit of the change in the motor control quantity according to the disturbance detection result, wherein the upper limit of the change is used to limit the absolute value of the difference between the motor control quantities at adjacent control times. The solving unit is used to solve the motor control quantity based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, within the allowable motor control quantity range of the motor, and with the constraint that the absolute value of the difference between the motor control quantities at adjacent control times does not exceed the upper limit of the change, to obtain the target motor control quantity.
[0154] In one exemplary embodiment, the establishment module includes: The second adjustment unit is used to adjust the prediction step number of the motion state prediction model according to the speed control response bandwidth of the motor to obtain the target prediction step number. The speed control response bandwidth is used to indicate how quickly the actual speed of the motor responds to the change of the target speed in the target motion state. The higher the speed control response bandwidth, the fewer the target prediction steps. The prediction step number is used to indicate the number of subsequent control moments of the motion state of the motor that the motion state prediction model needs to predict. The calling unit is used to call the motion state prediction model, and based on the actual motion state and the disturbance detection result, establish a prediction relationship between the predicted motion state of the motor and the motor control quantity at each subsequent control moment corresponding to the target prediction step number.
[0155] In one exemplary embodiment, the motor control quantity is solved by a motor controller, the motor is driven by a motor driver communicatively connected to the motor controller, and the device further includes: The calibration module is used to calibrate the times recorded by the motor controller and the motor driver respectively using the same timing reference before solving the motor control quantity within the allowable motor control quantity range based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state. The setting module is used to set the start time for the motor controller to start solving the motor control quantity and the start time for the motor driver to start adjusting the current of the motor according to the solution of the motor control quantity, according to the timing reference. The set solution start time and the set current adjustment start time are used to send the target motor control quantity obtained by the solution to the motor driver before the current adjustment start time. In this process, the motor controller begins solving for the motor control quantity at the start of the solution process. The current regulation and disturbance detection performed by the motor driver are both initiated by the same trigger signal at the start of the current regulation. The current regulation adjusts the motor current according to the received target motor control quantity to control the motor operation. The disturbance detection updates the disturbance detection result based on the current actual current of the motor and the actual motion state. The motor driver periodically sends the disturbance detection result to the motor controller. The motor controller uses the received disturbance detection result to subsequently establish the prediction relationship and solve for the motor control quantity.
[0156] In an exemplary embodiment, the actual motion state includes the actual rotational speed of the motor, the disturbance detection result is generated by a disturbance observer, the disturbance observer being used to estimate the disturbance torque affecting the rotation of the motor based on the actual current and the actual rotational speed, and the establishment module includes: The third determining unit is used to determine the electromagnetic torque of the motor based on the actual current, and subtract the speed estimate value in the disturbance observer from the actual speed to obtain the speed estimate deviation, and perform a sign operation on the speed estimate deviation to obtain a sign value, wherein the speed estimate value is the estimation result of the disturbance observer on the actual speed, and the sign value is 1, 0 and -1 when the speed estimate deviation is greater than zero, equal to zero and less than zero, respectively; A construction unit is used to construct a speed correction amount based on the speed estimation deviation, wherein the speed correction amount is the sum of a first correction term and a second correction term, the first correction term is obtained by multiplying the square root of the absolute value of the speed estimation deviation, the sign value of the speed estimation deviation, and a first observation coefficient, and the second correction term is obtained by time integration of the product of the sign value and the second observation coefficient; The fourth determining unit is used to divide the difference between the electromagnetic torque and the disturbance torque estimate in the disturbance observer by the total moment of inertia of the motor and the current motor load to obtain a target quotient value, and add the target quotient value to the speed correction amount to obtain the speed estimate change rate of the speed estimate value. The product of the sign value and the third observation coefficient is determined as the disturbance torque estimate change rate of the disturbance torque estimate value, wherein the disturbance torque estimate value is the estimation result of the disturbance observer on the disturbance torque affecting the rotation of the motor. An update unit is configured to update the speed estimate based on the speed estimate and the rate of change of the speed estimate to obtain the updated speed estimate, and update the disturbance torque estimate based on the disturbance torque estimate and the rate of change of the disturbance torque estimate to obtain the updated disturbance torque estimate. The fifth determining unit is used to use the updated speed estimate and the disturbance torque estimate for the calculation of the speed estimate deviation and the target quotient in the subsequent observation update, respectively, and to determine the updated disturbance torque estimate as the disturbance detection result.
[0157] The apparatus of this disclosure embodiment can execute the method provided in this disclosure embodiment, and its implementation principle is similar, and it has corresponding technical effects. The actions performed by each module in the apparatus of each embodiment of this disclosure correspond to the steps in the method of each embodiment of this disclosure. For a detailed functional description of each module of the apparatus, please refer to the description in the corresponding method shown above, and it will not be repeated here.
[0158] This disclosure provides an electronic device (computer apparatus / device / system) including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure.
[0159] In one alternative embodiment, an electronic device is provided. Figure 8 The following is a schematic diagram of the structure of an optional electronic device provided in an embodiment of this disclosure, such as... Figure 8 As shown, Figure 8 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this disclosure.
[0160] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0161] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0162] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0163] The memory 4003 is used to store computer programs that execute embodiments of the present disclosure, and is controlled by the processor 4001 to execute them. The processor 4001 is used to execute the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0164] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0165] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0166] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0167] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A method for controlling an electric motor, characterized in that, include: Detect the deviation between the motor's current target motion state and its actual motion state; Based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, a reference motor control quantity that meets the stable operating conditions of the motor and is used to reduce the motion state deviation is determined. Based on the current actual current and the actual motion state of the motor, the disturbances to the actual motion state of the motor are detected, the disturbance detection results of the motor are obtained, and the motion state prediction model is called to establish the prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection results. Based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, the motor control quantity is solved within the allowable motor control quantity range of the motor to obtain the target motor control quantity. Control the motor to operate according to the target motor control quantity.
2. The motor control method according to claim 1, characterized in that, The step of determining a reference motor control quantity that satisfies the stable operating conditions of the motor and is used to reduce the motion state deviation, based on the motor's control response characteristics to the motor control quantity under the current motor load and the motion state deviation, includes: Based on the control response characteristics, the range of values for the adjustment parameter under the stable operating conditions is determined, wherein the adjustment parameter is used to adjust the magnitude of the change in the reference motor control quantity with the deviation of the motion state; The value of the adjustment parameter is determined within the specified range to obtain the target adjustment parameter; The reference motor control quantity is generated based on the target adjustment parameters and the motion state deviation.
3. The motor control method according to claim 2, characterized in that, The adjustment parameters include angular position adjustment parameters and speed adjustment parameters. The angular position adjustment parameters are used to adjust the control quantity of the reference motor according to the angular position deviation in the motion state deviation. The speed adjustment parameters are used to adjust the control quantity of the reference motor according to the speed deviation in the motion state deviation. Determining the value range of the adjustment parameters under the stable operating conditions based on the control response characteristics includes: Based on the total moment of inertia of the motor and the current motor load, and the control delay of the motor, an upper limit of the speed control proportional coefficient that satisfies the stable operating conditions is determined. The control delay is used to indicate the control delay caused by the current response and pulse width modulation of the motor. The speed control proportional coefficient is the proportional coefficient used when calculating the motor control quantity based on the speed deviation of the motor. The speed deviation is the deviation between the target speed of the motor in the target motion state and the actual speed in the actual motion state. The upper limit of the angular position adjustment parameter is obtained by dividing the product of the upper limit of the speed control proportional coefficient and the conversion coefficient by the total moment of inertia, wherein the conversion coefficient is the coefficient conversion ratio from speed adjustment to angular position adjustment. Based on the total moment of inertia and the target damping ratio, a value constraint is established between the angular position adjustment parameter and the speed adjustment parameter. The value constraint limits the speed adjustment parameter to be equal to twice the target damping ratio multiplied by the square root of the product of the angular position adjustment parameter and the total moment of inertia. The target damping ratio is used to indicate the target ratio of the speed adjustment parameter relative to the critical damping coefficient. Under the condition that the angular position adjustment parameter does not exceed the upper limit of the value, the combination of the angular position adjustment parameter and the speed adjustment parameter that satisfies the value constraint and the stable operation condition is determined, and the set of each of the value combinations is determined as the value range.
4. The motor control method according to claim 2, characterized in that, The step of determining the value of the adjustment parameter within the range of values to obtain the target adjustment parameter includes: Construct an objective function with the adjustment parameters as variables, wherein the objective function is the square of the deviation between the predicted angular position of the motor-driven rotating component and the target angular position of the rotating component in the target motion state, and the weighted sum of the squares of the values of the adjustment parameters; The parameter planner is invoked to solve for the adjustment parameter within the range of values, with the objective function being minimized, to obtain the target adjustment parameter. During the solution process, the parameter planner calculates the predicted angular position based on the values of the adjustment parameter.
5. The motor control method according to claim 2, characterized in that, The target adjustment parameters include target angular position adjustment parameters and target speed adjustment parameters. The target angular position adjustment parameters are used to adjust the reference motor control quantity based on the angular position deviation in the motion state deviation. The target speed adjustment parameters are used to adjust the reference motor control quantity based on the speed deviation in the motion state deviation. Generating the reference motor control quantity based on the target adjustment parameters and the motion state deviation includes: Multiply the target angular position adjustment parameter in the target adjustment parameters by the angular position deviation in the motion state deviation to obtain the angular position control component; Multiply the target speed adjustment parameter in the target adjustment parameters by the speed deviation in the motion state deviation to obtain the speed control component; The angular position control component, the speed control component, and the feedforward motor control quantity are added together to obtain the reference motor control quantity, wherein the feedforward motor control quantity is used to provide the basic control action required for the motor to operate according to the target motion state.
6. The motor control method according to claim 1, characterized in that, The step of solving for the motor control quantity within the allowable range of motor control quantity, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, to obtain the target motor control quantity includes: Based on the disturbance detection results, the upper limit of the change in the motor control quantity is adjusted, wherein the upper limit of the change is used to limit the absolute value of the difference between the motor control quantities at adjacent control times; Based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, within the allowable range of motor control quantity, and with the constraint that the absolute value of the difference between the motor control quantities at adjacent control times does not exceed the upper limit of the change, the motor control quantity is solved to obtain the target motor control quantity.
7. The motor control method according to claim 1, characterized in that, The step of calling the motion state prediction model, based on the actual motion state and the disturbance detection results, establishes a predictive relationship between the predicted motion state of the motor and the motor control quantity, including: Based on the speed control response bandwidth of the motor, the prediction step number of the motion state prediction model is adjusted to obtain the target prediction step number. The speed control response bandwidth is used to indicate how quickly the actual speed of the motor responds to the change of the target speed in the target motion state. The higher the speed control response bandwidth, the fewer the target prediction steps. The prediction step number is used to indicate the number of subsequent control moments of the motion state of the motor that the motion state prediction model needs to predict. The motion state prediction model is invoked, and based on the actual motion state and the disturbance detection result, a prediction relationship is established between the predicted motion state of the motor and the motor control quantity at each subsequent control moment corresponding to the target prediction step number.
8. The motor control method according to claim 1, characterized in that, The motor control quantity is solved by a motor controller, and the motor is driven by a motor driver that is communicatively connected to the motor controller. Before obtaining the target motor control quantity by solving the motor control quantity within the allowable range of motor control quantity based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, the method further includes: The times recorded by the motor controller and the motor driver are calibrated using the same timing reference. According to the timing reference, the starting time for the motor controller to start solving the motor control quantity is set, and the starting time for the motor driver to start adjusting the current of the motor based on the solution of the motor control quantity is set. The set solution start time and the current adjustment start time are used to send the solved target motor control quantity to the motor driver before the current adjustment start time. In this process, the motor controller begins solving for the motor control quantity at the start of the solution process. The current regulation and disturbance detection performed by the motor driver are both initiated by the same trigger signal at the start of the current regulation. The current regulation adjusts the motor current according to the received target motor control quantity to control the motor operation. The disturbance detection updates the disturbance detection result based on the current actual current of the motor and the actual motion state. The motor driver periodically sends the disturbance detection result to the motor controller. The motor controller uses the received disturbance detection result to subsequently establish the prediction relationship and solve for the motor control quantity.
9. The motor control method according to claim 1, characterized in that, The actual motion state includes the actual speed of the motor. The disturbance detection result is generated by a disturbance observer, which estimates the disturbance torque affecting the rotation of the motor based on the actual current and the actual speed. The step of detecting the disturbance experienced by the motor in its actual motion state based on the current actual current and the actual motion state, and obtaining the disturbance detection result for the motor, includes: The electromagnetic torque of the motor is determined based on the actual current, and the speed estimate value in the disturbance observer is subtracted from the actual speed to obtain the speed estimate deviation. The speed estimate deviation is then subjected to a sign operation to obtain a sign value. The speed estimate value is the estimation result of the disturbance observer on the actual speed. When the speed estimate deviation is greater than zero, equal to zero, and less than zero, the sign value is 1, 0, and -1, respectively. A speed correction amount is constructed based on the speed estimation deviation, wherein the speed correction amount is the sum of a first correction term and a second correction term. The first correction term is obtained by multiplying the square root of the absolute value of the speed estimation deviation, the sign value of the speed estimation deviation, and a first observation coefficient. The second correction term is obtained by integrating the product of the sign value and the second observation coefficient over time. The difference between the electromagnetic torque and the disturbance torque estimate in the disturbance observer is divided by the total moment of inertia of the motor and the current motor load to obtain the target quotient. The target quotient is then added to the speed correction to obtain the rate of change of the speed estimate. The product of the sign value and the third observation coefficient is determined as the rate of change of the disturbance torque estimate. The disturbance torque estimate is the result of the disturbance observer's estimation of the disturbance torque affecting the rotation of the motor. The speed estimate is updated based on the speed estimate and the rate of change of the speed estimate to obtain the updated speed estimate. The disturbance torque estimate is also updated based on the disturbance torque estimate and the rate of change of the disturbance torque estimate to obtain the updated disturbance torque estimate. The updated speed estimate and the disturbance torque estimate are used to calculate the speed estimate deviation and the target quotient in subsequent observation updates, respectively, and the updated disturbance torque estimate is determined as the disturbance detection result.
10. A control device for an electric motor, characterized in that, include: The detection module is used to detect the deviation between the current target motion state and the actual motion state of the motor. The determination module is used to determine a reference motor control quantity that meets the stable operating conditions of the motor based on the control response characteristics of the motor to the motor control quantity under the current motor load and the motion state deviation, and is used to reduce the motion state deviation. A module is established to detect disturbances to the actual motion state of the motor based on the current actual current and the actual motion state of the motor, obtain the disturbance detection result of the motor, and call the motion state prediction model to establish a prediction relationship between the predicted motion state of the motor and the motor control quantity based on the actual motion state and the disturbance detection result. The solution module is used to solve the motor control quantity within the allowable motor control quantity range of the motor, based on the reference motor control quantity and the prediction relationship, with the goal of reducing the deviation between the predicted motion state and the target motion state, to obtain the target motor control quantity; The control module is used to control the operation of the motor according to the target motor control quantity.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 9.
