Joint motor cogging compensation method and device
By conducting step response tests and parameter adjustments on the joint motor, identifying the cogging torque period, and using an interpolation algorithm to calculate the compensation current, the problem of damping interference in the existing joint motor cogging torque compensation method is solved, thereby improving the smoothness of robot joint operation and control accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING LINGZU TIMES TECHNOLOGY CO LTD
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
AI Technical Summary
In the prior art, the cogging torque compensation method of joint motors fails to effectively consider the complex damping interference introduced by the reducer, which affects the low-speed smoothness and control accuracy of the robot joint, and the high-density sampling occupies a lot of storage resources.
By conducting step response tests on the joint motor, adjusting control parameters to meet preset dynamic response indicators, recording current feedback values, identifying the cogging torque cycle length, using interpolation algorithms to calculate compensation current and apply it to the control loop, eliminating reducer damping interference, and optimizing memory usage.
It significantly improves the smoothness of joint motor operation and control precision, reduces data storage, and achieves continuous and smooth real-time compensation effect.
Smart Images

Figure CN122159727A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of articulated motor control technology, and in particular to a method and apparatus for cogging compensation in articulated motors. Background Technology
[0002] In related technologies, cogging torque is an inherent phenomenon of permanent magnet motors, generated by the interaction between the rotor permanent magnet and the stator cogging teeth. It can cause motor vibration during operation, affecting the low-speed smoothness and control accuracy of robot joints. Existing compensation methods typically use high-density sampling (e.g., thousands of points per revolution) to record the mapping relationship between motor position and current for feedforward compensation. However, such methods mainly target individual motors and do not fully consider the complex damping interference introduced by the reducer in the joint system. Furthermore, the excessive number of sampling points consumes a large amount of storage resources. Summary of the Invention
[0003] To overcome the problems existing in the related technologies, this disclosure provides a method and device for cogging of joint motor teeth.
[0004] According to a first aspect of the present disclosure, a method for cogging compensation in a joint motor is provided, comprising:
[0005] A step response test was performed on the joint motor, and the motor control parameters were adjusted based on the test results so that the control parameters of the joint motor met the preset dynamic response index. Based on the adjusted control parameters, the joint motor is controlled to run at a first preset step length, and the current feedback value corresponding to each preset step position point corresponding to the first preset step length is recorded. The period length of the cogging torque is determined based on the change characteristics of the current feedback value. Based on the period length, the sampling step size is determined, and the motor is controlled to rotate at least one revolution in the forward and reverse directions respectively with the sampling step size. The forward current and reverse current of each sampling position point corresponding to the sampling step size are recorded. Calculate the compensation current reference value for each sampling location point based on the forward current and reverse current, and obtain the mapping relationship between the sampling location point and the compensation current reference value. During the operation of the joint motor, the target compensation current is calculated using an interpolation algorithm based on the current position of the joint motor and the mapping relationship, and the target compensation current is applied to the control loop of the joint motor.
[0006] According to a second aspect of the present disclosure, a joint motor cogging compensation device is provided, comprising: The test unit is used to perform step response tests on the joint motor and adjust the motor control parameters based on the test results so that the control parameters of the joint motor meet the preset dynamic response indicators. The determining unit is used to control the joint motor to run at a first preset step size based on the adjusted control parameters, record the current feedback value corresponding to each preset step position point corresponding to the first preset step size, and determine the period length of the cogging torque based on the change characteristics of the current feedback value. A recording unit is used to determine the sampling step size based on the period length, control the motor to rotate at least one revolution in the forward and reverse directions respectively with the sampling step size, and record the forward current and reverse current at each sampling position point corresponding to the sampling step size. The mapping unit is used to calculate the compensation current reference value of each sampling location point based on the forward current and reverse current, and to obtain the mapping relationship between the sampling location point and the compensation current reference value. The compensation unit is used to calculate the target compensation current by using an interpolation algorithm based on the current position of the joint motor and the mapping relationship during the operation of the joint motor, and to apply the target compensation current to the control loop of the joint motor.
[0007] According to a third aspect of the present disclosure, an electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the method as described in any of the first aspects.
[0008] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the first aspects.
[0009] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method as described in any of the first aspects.
[0010] The technical solutions provided by the embodiments of this disclosure may include the following: It should be noted that by performing a step response test on the joint motor and adjusting the control parameters to meet the preset dynamic response index, the motor is ensured to be in a consistent and optimal control state before calibration, thus guaranteeing the accuracy and repeatability of subsequent data acquisition; based on the adjusted parameters, the motor is controlled to run at a first preset step size and the current feedback value at each step position is recorded. Then, the period length of the cogging torque is determined based on the changing characteristics of the current feedback value, achieving adaptive identification of the periodic characteristics of the cogging torque; based on the identified period length, the sampling step size is determined, and the motor is controlled to run at this sampling step size. The step size is rotated at least one revolution in both the forward and reverse directions, recording the forward and reverse currents at each sampling point. This allows the sampling resolution to be dynamically adjusted according to the actual cycle of the cogging torque, effectively reducing data storage while ensuring sampling accuracy. The compensation current reference value for each sampling point is calculated based on the forward and reverse currents, and a mapping relationship is established. Averaging of the forward and reverse currents eliminates reducer damping interference, resulting in a pure cogging torque compensation reference. During the operation of the articulated motor, the target compensation current is calculated using an interpolation algorithm based on the current motor position and the mapping relationship, and applied to the control loop, achieving continuous and smooth real-time compensation. This method significantly improves the smoothness of articulated motor operation and control accuracy while eliminating the influence of reducer damping and optimizing memory usage.
[0011] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0013] Figure 1 This is a flowchart illustrating a method for cogging compensation in a joint motor according to an exemplary embodiment.
[0014] Figure 2 This is a block diagram illustrating a joint motor cogging compensation device according to an exemplary embodiment.
[0015] Figure 3 This is a block diagram illustrating an apparatus for a method of cogging tooth compensation in a joint motor according to an exemplary embodiment. Detailed Implementation
[0016] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0017] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. The singular forms “a” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0018] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of embodiments of this disclosure, and similarly, second information may also be referred to as first information. Depending on the context, the words “if” and “suppose” as used herein may be interpreted as “when”, “when”, or “in response to a determination”.
[0019] Furthermore, various forms of processes shown in the embodiments of this disclosure can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and no limitation is imposed herein.
[0020] It should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0021] Figure 1 This is a flowchart illustrating a method for cogging compensation in a joint motor according to an exemplary embodiment, such as... Figure 1 As shown, it should be noted that the articulated motor cogging compensation method of this disclosure is applied to an articulated motor cogging compensation device. For example... Figure 1 As shown, the method may include the following steps: Step 101: Perform a step response test on the joint motor, and adjust the motor control parameters based on the test results so that the control parameters of the joint motor meet the preset dynamic response index.
[0022] In some embodiments of this disclosure, before performing cogging torque compensation on the joint motor, it is necessary to first perform state tuning on the motor control system to ensure the consistency and reliability of subsequent data acquisition.
[0023] As an example, the dynamic performance of the joint motor under the current control parameters can be evaluated through step response testing, and the control parameters can be iteratively adjusted according to the test results until the preset dynamic response index is met.
[0024] Specifically, step response testing involves controlling a motor to rapidly step from one stable position to another and recording the entire response process. By analyzing the response curves, the system's speed and stability can be evaluated.
[0025] Understandably, dynamic response metrics can be set according to actual application requirements, and may include metrics such as response time and steady-state accuracy.
[0026] In some embodiments of this application, step 101 may specifically include the following steps: Step a1: Control the motor to jump from the starting position to the target position according to the preset step size.
[0027] As an example, the preset step size can be set to 1 degree.
[0028] Specifically, the motor is controlled to step from a starting position (e.g., 0 degrees) to a target position (e.g., 1 degree), causing the motor to produce a position step response.
[0029] It is understood that the specific value of the step size can be adjusted according to the motor type and control accuracy requirements, and this disclosure does not impose any specific limitations on it.
[0030] Step a2: When the motor responds to the step command and reaches the target position, the absolute value of the deviation between its actual position and the target position is less than the preset deviation. Furthermore, the absolute value of the deviation between its actual position and the target position is less than the preset deviation for the first time from the issuance of the step command, and the time it maintains this deviation is less than the preset duration. Therefore, it is determined that the control parameters of the joint motor meet the preset dynamic response index.
[0031] In some embodiments of this disclosure, as an example, the preset deviation can be set to 0.1 degrees and the preset duration can be set to 0.5 seconds.
[0032] Specifically, after the motor responds to the step command and reaches the target position, two conditions must be met for the control parameters to be deemed qualified: First, the absolute value of the deviation between the actual position and the target position is less than 0.1 degrees, which means that the steady-state accuracy is high enough. Secondly, the time from the issuance of the step command to the first occurrence of an absolute deviation of less than 0.1 degrees and its maintenance is less than 0.5 seconds, indicating a sufficiently fast response speed. Here, "maintaining" means that the actual position remains within the deviation range for a continuous period of time, indicating that the system has entered a stable state.
[0033] It should be noted that by setting clear dynamic response indicators, it is possible to ensure that the motor control system is in the best working state, laying the foundation for the accurate calibration of subsequent cogging torque and avoiding data acquisition errors caused by poor system response.
[0034] In some embodiments of this application, adjusting the motor control parameters based on the test results in step 101 may specifically include the following steps: Step b1: If the control parameters of the joint motor meet the preset dynamic response index, execute the step of controlling the joint motor to run at a first preset step size based on the adjusted control parameters.
[0035] In some embodiments of this disclosure, if the current control parameters already meet the preset dynamic response index, the subsequent cogging torque calibration process can be directly entered.
[0036] As an example, step 102 and subsequent steps can then be performed based on the adjusted control parameters.
[0037] Step b2: If the control parameters of the joint motor do not meet the preset dynamic response index, increase the position loop proportional gain and speed loop proportional gain of the joint motor by a preset increment, and return to the step of performing a step response test on the joint motor until the control parameters of the joint motor meet the preset dynamic response index.
[0038] In some embodiments of this disclosure, as an example, the preset increment can be set to 5% of the current parameters. Specifically, if the step response test results show that the current control parameters do not meet the preset targets, the position loop proportional gain (Kp) and velocity loop proportional gain (Kp_v) need to be gradually increased in increments of 5%. After each increase, the step response test is repeated to observe whether the system response improves. Through this iterative approach, the optimal parameters can be gradually approximated until the preset dynamic response targets are met.
[0039] It should be noted that by employing a 5% gradual adjustment strategy, significant oscillations and system instability risks during parameter tuning are avoided, while ensuring the controllability and convergence of parameter tuning. This iterative parameter tuning method has strong engineering applicability and is suitable for different types of articulated motors.
[0040] Step 102: Based on the adjusted control parameters, control the joint motor to run at a first preset step length, record the current feedback value corresponding to each preset step position point corresponding to the first preset step length, and determine the period length of the cogging torque based on the change characteristics of the current feedback value.
[0041] In some embodiments of this disclosure, after system state tuning is completed, it is necessary to further identify the period length of the cogging torque. The cogging torque is a quantity that changes periodically with the motor position. By identifying the period length, a basis can be provided for determining the subsequent sampling step size.
[0042] As an example, the motor can be controlled to move slowly in small steps, and the sustaining current at each position point can be recorded. The magnitude of this sustaining current reflects the strength of the cogging torque. By analyzing the changing characteristics of the current feedback value, the cycle length of the cogging torque can be accurately identified.
[0043] In some embodiments of this application, step 102 may specifically include the following steps: Step c1: Determine the starting point where the absolute value of the negative slope in the waveform of the current feedback value is greater than the preset fluctuation threshold.
[0044] In some embodiments of this disclosure, the first preset step size can be set to 0.1 degrees.
[0045] Specifically, the motor is controlled to move forward in steps of 0.1 degrees, starting from the zero position. After each step, the motor is allowed to stabilize (the waiting time is based on the step response time determined in step 101), and then the current feedback value at that step position is recorded. As the position changes, the current feedback value will fluctuate periodically.
[0046] To accurately identify the period of cogging torque, feature points need to be extracted from the current waveform. As an example, the starting point where the absolute value of the negative slope in the current feedback waveform exceeds a preset fluctuation threshold can be detected. The negative slope corresponds to the peak point where the current transitions from rising to falling, i.e., the position where the cogging torque begins to pull in the opposite direction. The preset fluctuation threshold is used to mask spurious starting points caused by sampling noise and can be set based on the historical fluctuation amplitude or peak value of the current feedback value.
[0047] Step c2: Determine the angle difference between two adjacent starting points to obtain the period length of the cogging torque.
[0048] In some embodiments of this disclosure, after identifying the starting point that meets the conditions, the angle difference between two adjacent starting points can be used to obtain the length of a complete tooth groove cycle.
[0049] For example, if the first starting point is at 5 degrees and the second starting point is at 15 degrees, then the tooth groove cycle length is 10 degrees.
[0050] It should be noted that identifying the cogging cycle by combining slope detection with threshold shielding has strong anti-interference capabilities and can accurately extract the periodic characteristics of the cogging torque, providing a foundation for subsequent adaptive period sampling. That is, during the cogging cycle identification process, the current feedback signal inevitably contains sampling fluctuations caused by sensor noise, electrical interference, etc. If all negative slope points are directly detected, these tiny random fluctuations are easily misjudged as the start points of the cycle, leading to cycle identification failure. This scheme introduces a preset fluctuation threshold, considering only points with an absolute negative slope value greater than this threshold as valid start points, while noise fluctuations with smaller amplitudes are effectively shielded by the threshold. Since the current change caused by the cogging torque has a definite physical law, its waveform slope is significantly greater than random noise; therefore, threshold screening can accurately extract the true periodic feature points. This anti-interference mechanism based on amplitude characteristics effectively improves the robustness and accuracy of cycle identification without increasing the complexity of the filtering algorithm.
[0051] Step 103: Determine the sampling step size based on the period length, control the motor to rotate at least one revolution in both the forward and reverse directions at the sampling step size, and record the forward and reverse currents at each sampling position point corresponding to the sampling step size.
[0052] In some embodiments of this disclosure, after identifying the tooth groove period length, a suitable sampling step size needs to be determined based on the period length in order to minimize the amount of data stored while ensuring compensation accuracy. Then, raw current data for eliminating damping interference is obtained by sampling in both forward and reverse directions.
[0053] In some embodiments of this application, step 103 may specifically include the following steps: Step d1: Determine the sampling step size based on the period length and the preset number of sampling points in each period; wherein, the sampling step size is equal to the period length divided by the preset number of sampling points in each period.
[0054] In some embodiments of this disclosure, as an example, the preset number of sampling points in each period can be set to 10 or more.
[0055] Specifically, the sampling step size can be obtained by dividing the period length by the preset number of sampling points in each period.
[0056] For example, if the period length is 10 degrees and 10 points are taken in each period, the sampling step size is 1 degree; if the period length is 20 degrees and 10 points are taken in each period, the sampling step size is 2 degrees.
[0057] Understandably, the number of preset sampling points in each period can be flexibly adjusted according to accuracy requirements and memory limitations. For example, 10×n points can be selected, where n is a positive integer.
[0058] Step d2: Control the motor to rotate at least one revolution in both the forward and reverse directions at the sampling step length, and record the forward and reverse currents at each sampling position point corresponding to the sampling step length.
[0059] In some embodiments of this disclosure, after determining the sampling step size, the motor is controlled to rotate one revolution in the forward direction at the sampling step size, and the corresponding current value is recorded at each sampling position point, which is denoted as the forward current; then the motor is controlled to rotate one revolution in the reverse direction at the same sampling step size, and the corresponding current value is recorded at the same sampling position point, which is denoted as the reverse current.
[0060] It should be noted that by adaptively determining the sampling step size through period, a sufficient number of sampling points are available within each tooth groove cycle to characterize the waveform features, while avoiding the memory waste caused by fixed high-density sampling. This period-adaptive point count strategy significantly reduces data storage while maintaining accuracy.
[0061] Step 104: Calculate the compensation current reference value for each sampling location point based on the forward and reverse currents to obtain the mapping relationship between the sampling location point and the compensation current reference value.
[0062] In some embodiments of this disclosure, the current recorded during forward rotation includes the cogging torque current and the reducer damping current, while the current recorded during reverse rotation includes the cogging torque current minus the reducer damping current. By averaging the forward and reverse currents, damping interference can be eliminated, resulting in a pure cogging torque current value, which serves as a reference for subsequent compensation.
[0063] In some embodiments of this application, step 104 may specifically include the following steps: For each sampling location, the average value of the forward and reverse currents corresponding to the sampling location is calculated to obtain the compensation current reference value for the sampling location.
[0064] Through the above calculations, a set of discrete sampling locations and their corresponding compensation current reference values can be obtained, i.e., a "location-compensation current" lookup table. This table stores the compensation current value required for each sampling location, which is used for subsequent real-time compensation.
[0065] It should be noted that the forward and reverse averaging method cleverly utilizes the physical property that the direction of friction is opposite to the direction of motion, while the direction of cogging force is related to position. Through simple calculation, it can effectively eliminate the damping interference of the reducer and obtain pure cogging torque information. This method does not require complex modeling and identification, is simple to implement in engineering, and has significant effects.
[0066] Step 105: During the operation of the joint motor, the target compensation current is calculated using an interpolation algorithm based on the current position and mapping relationship of the joint motor, and the target compensation current is applied to the control loop of the joint motor.
[0067] In some embodiments of the present disclosure, after obtaining the "position-compensation current" mapping relationship, online compensation can be performed during the real-time operation of the motor. Since the mapping relationship is discrete while the motor position is continuous, an interpolation algorithm is required to calculate the compensation current value corresponding to any position to achieve smooth compensation.
[0068] In some embodiments of the present application, step 105 may specifically include the following steps: Step e1, calculating the target compensation current using an interpolation algorithm.
[0069] In some embodiments of the present disclosure, as an example, a linear interpolation algorithm can be used. For the current joint motor position value (i.e., the position value c of the current sampling position point), find two sampling position points adjacent to c in the mapping relationship, whose position values are a and b respectively and satisfy a < c < b, and calculate the target compensation current I using the following formula c :
[0070] where c is the position value of the current sampling position point, a is the position value of the first sampling position point adjacent to the current sampling position point, b is the position value of the second sampling position point adjacent to the current sampling position point, I a is the compensation current reference value corresponding to the first sampling position point, and I b is the compensation current reference value corresponding to the second sampling position point.
[0071] It can be understood that, according to the distance between c and the adjacent sampling points a and b, a weighted average is performed on I a and I b , and the closer the distance, the greater the weight.
[0072] It can be understood that, in addition to linear interpolation, other interpolation algorithms such as spline interpolation and polynomial interpolation can also be used, and the present disclosure does not make specific limitations thereto.
[0073] Step e2, applying the target compensation current to the control loop of the joint motor.
[0074] In some embodiments of the present disclosure, the calculated target compensation current can be fed forward to the current loop of the joint motor.
[0075] Specifically, the compensation current is superimposed on the given signal of the current loop, so that the motor generates a torque component with the same magnitude and opposite direction as the cogging torque, thereby offsetting the influence of the cogging torque.
[0076] It should be noted that the interpolation algorithm achieves a smooth transition from discrete points to continuous values, ensuring the continuity of the compensation current and avoiding secondary jitter caused by abrupt changes in the compensation value. Simultaneously, feeding the compensation current forward to the current loop enables rapid response and effectively suppresses the impact of cogging torque on motor operation.
[0077] In some embodiments of this disclosure, an iterative optimization strategy can be employed to further improve compensation accuracy. After the target compensation current is applied to the control loop for the first time, steps 102 to 105 are repeated at least once. Since the motor runs more smoothly and damping interference is further reduced after the first compensation, re-performing periodic identification and forward / reverse sampling at this point yields purer cogging torque information, resulting in a more accurate compensation current reference value. Through multiple iterations, the optimal compensation effect can be gradually approximated until the motor speed fluctuation is less than a preset threshold (such as speed variance or speed peak-to-peak value).
[0078] It should be noted that the iterative optimization strategy fully utilizes the improved data quality brought about by the improved system state after compensation, and achieves a gradual improvement in compensation accuracy, which has strong engineering practicality and robustness.
[0079] According to the articulated motor cogging compensation method proposed in this disclosure, the articulated motor is subjected to step response testing and control parameters are adjusted to meet preset dynamic response indicators. This ensures that the motor is in a consistent and optimal control state before calibration, providing a guarantee for the accuracy and repeatability of subsequent data acquisition. Based on the adjusted parameters, the motor is controlled to run at a first preset step size, and the current feedback value at each step position is recorded. Then, the period length of the cogging torque is determined according to the change characteristics of the current feedback value, realizing adaptive identification of the period characteristics of the cogging torque. Based on the identified period length, the sampling step size is determined, and the motor is controlled to operate at this sampling step size. The system rotates the motor at least one revolution in both directions, recording the forward and reverse currents at each sampling point. This allows the sampling resolution to be dynamically adjusted based on the actual cycle of the cogging torque, effectively reducing data storage while maintaining sampling accuracy. The system calculates the compensation current reference value for each sampling point based on the forward and reverse currents and establishes a mapping relationship. Averaging of the forward and reverse currents eliminates reducer damping interference, resulting in a pure cogging torque compensation reference. During the operation of the articulated motor, an interpolation algorithm is used to calculate the target compensation current based on the current motor position and the mapping relationship, and this current is applied to the control loop, achieving continuous and smooth real-time compensation. This method significantly improves the smoothness of the articulated motor's operation and control accuracy while eliminating the influence of reducer damping and optimizing memory usage.
[0080] Figure 2 This is a block diagram illustrating a joint motor cogging compensation device according to an exemplary embodiment. (Refer to...) Figure 2The device includes a test unit 201, a determination unit 202, a recording unit 203, a mapping unit 204, and a compensation unit 205.
[0081] The test unit 201 is used to perform step response tests on the joint motor and adjust the motor control parameters based on the test results so that the control parameters of the joint motor meet the preset dynamic response indicators. The determining unit 202 is used to control the joint motor to run at a first preset step length based on the adjusted control parameters, record the current feedback value corresponding to each preset step position point corresponding to the first preset step length, and determine the period length of the cogging torque based on the change characteristics of the current feedback value. The recording unit 203 is used to determine the sampling step size based on the period length, control the motor to rotate at least one revolution in the forward and reverse directions respectively at the sampling step size, and record the forward current and reverse current at each sampling position point corresponding to the sampling step size. The mapping unit 204 is used to calculate the compensation current reference value of each sampling location point based on the forward current and reverse current, and to obtain the mapping relationship between the sampling location point and the compensation current reference value. The compensation unit 205 is used to calculate the target compensation current based on the current position and mapping relationship of the joint motor during operation, and apply the target compensation current to the control loop of the joint motor.
[0082] In some embodiments of this application, the test unit 201 may specifically be used for: The motor is controlled to jump from the starting position to the target position in a preset step size; When the motor responds to the step command and reaches the target position, if the absolute value of the deviation between its actual position and the target position is less than the preset deviation, and the absolute value of the deviation between its actual position and the target position is less than the preset deviation for the first time from the issuance of the step command, and the time maintained is less than the preset duration, it is determined that the control parameters of the joint motor meet the preset dynamic response index.
[0083] In some embodiments of this application, the determining unit 202 may specifically be used for: Determine the starting point where the absolute value of the negative slope in the waveform of the current feedback value is greater than the preset fluctuation threshold; By determining the angle difference between two adjacent starting points, the period length of the cogging torque can be obtained.
[0084] In some embodiments of this application, the recording unit 203 may be specifically used to: determine the sampling step size based on the period length and the preset number of sampling points in each period; wherein the sampling step size is equal to the period length divided by the preset number of sampling points in each period.
[0085] In some embodiments of this application, the mapping unit 204 may be specifically used to: calculate the average value of the forward current and the reverse current corresponding to each sampling location point, and obtain the compensation current reference value of the sampling location point.
[0086] In some embodiments of this application, the compensation unit 205 may specifically be used for: The target compensation current I is calculated using the following formula. c :
[0087] Where c is the position value of the current sampling point, a is the position value of the first sampling point adjacent to the current sampling point, b is the position value of the second sampling point adjacent to the current sampling point, and I a I is the reference value of the compensation current corresponding to the first sampling location point. b This is the reference value of the compensation current corresponding to the second sampling location.
[0088] In some embodiments of this application, the test unit 201 may specifically be used for: If the control parameters of the joint motor meet the preset dynamic response index, execute the step of controlling the joint motor to run at the first preset step size based on the adjusted control parameters; If the control parameters of the joint motor do not meet the preset dynamic response index, the position loop proportional gain and speed loop proportional gain of the joint motor are increased by a preset increment, and the step response test of the joint motor is returned to be executed until the control parameters of the joint motor meet the preset dynamic response index.
[0089] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0090] According to the articulated motor cogging compensation device proposed in this embodiment, the articulated motor is subjected to step response testing and control parameters are adjusted to meet preset dynamic response indicators. This ensures that the motor is in a consistent and optimal control state before calibration, providing a guarantee for the accuracy and repeatability of subsequent data acquisition. Based on the adjusted parameters, the motor is controlled to run at a first preset step size, and the current feedback value at each step position is recorded. Then, the period length of the cogging torque is determined according to the change characteristics of the current feedback value, realizing adaptive identification of the period characteristics of the cogging torque. Based on the identified period length, the sampling step size is determined, and the motor is controlled to operate at this sampling step size. The system rotates the motor at least one revolution in both directions, recording the forward and reverse currents at each sampling point. This allows the sampling resolution to be dynamically adjusted based on the actual cycle of the cogging torque, effectively reducing data storage while maintaining sampling accuracy. The system calculates the compensation current reference value for each sampling point based on the forward and reverse currents and establishes a mapping relationship. Averaging of the forward and reverse currents eliminates reducer damping interference, resulting in a pure cogging torque compensation reference. During the operation of the articulated motor, an interpolation algorithm is used to calculate the target compensation current based on the current motor position and the mapping relationship, and this current is applied to the control loop, achieving continuous and smooth real-time compensation. This method significantly improves the smoothness of the articulated motor's operation and control accuracy while eliminating the influence of reducer damping and optimizing memory usage.
[0091] Figure 3 This is a block diagram illustrating an apparatus for a method of cogging tooth compensation in a joint motor, according to an exemplary embodiment. For example, apparatus 300 may be an electronic device, such as a mobile phone, computer, digital broadcasting terminal, messaging device, tablet device, personal digital assistant, etc.
[0092] Reference Figure 3 The device 300 may include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, input / output (I / O) interface 312, sensor component 314, and communication component 316.
[0093] Processing component 302 typically controls the overall operation of device 300, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 302 may include one or more processors 320 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 302 may include one or more modules to facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
[0094] Memory 304 is configured to store various types of data to support the operation of device 300. Examples of such data include instructions for any application or method operating on device 300, contact data, phonebook data, messages, pictures, videos, etc. Memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0095] The power supply component 306 provides power to the various components of the device 300. The power supply component 306 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 300.
[0096] Multimedia component 308 includes a screen that provides an output interface between device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 308 includes a front-facing camera and / or a rear-facing camera. When device 300 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0097] Audio component 310 is configured to output and / or input audio signals. For example, audio component 310 includes a microphone (MIC) configured to receive external audio signals when device 300 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 304 or transmitted via communication component 316. In some embodiments, audio component 310 also includes a speaker for outputting audio signals.
[0098] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.
[0099] Sensor assembly 314 includes one or more sensors for providing state assessments of various aspects of device 300. For example, sensor assembly 314 may detect the on / off state of device 300, the relative positioning of components such as the display and keypad of device 300, changes in the position of device 300 or a component of device 300, the presence or absence of user contact with device 300, the orientation or acceleration / deceleration of device 300, and temperature changes of device 300. Sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 314 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0100] Communication component 316 is configured to facilitate wired or wireless communication between device 300 and other devices. Device 300 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 316 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 316 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0101] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0102] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, which can be executed by a processor 320 of the device 300 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0103] In an exemplary embodiment, a computer program product is also provided, including a computer program that implements the above-described method when executed by the processor 320 of the device 300.
[0104] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0105] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for cogging compensation in a joint motor, characterized in that, include: A step response test was performed on the joint motor, and the motor control parameters were adjusted based on the test results so that the control parameters of the joint motor met the preset dynamic response index. Based on the adjusted control parameters, the joint motor is controlled to run at a first preset step length, and the current feedback value corresponding to each preset step position point corresponding to the first preset step length is recorded. The period length of the cogging torque is determined based on the change characteristics of the current feedback value. Based on the period length, the sampling step size is determined, and the motor is controlled to rotate at least one revolution in the forward and reverse directions respectively with the sampling step size. The forward current and reverse current of each sampling position point corresponding to the sampling step size are recorded. Calculate the compensation current reference value for each sampling location point based on the forward current and reverse current, and obtain the mapping relationship between the sampling location point and the compensation current reference value. During the operation of the joint motor, the target compensation current is calculated using an interpolation algorithm based on the current position of the joint motor and the mapping relationship, and the target compensation current is applied to the control loop of the joint motor.
2. The joint motor tooth cogging compensation method according to claim 1, characterized in that, The step response test of the joint motor includes: The motor is controlled to jump from the starting position to the target position in a preset step size; When the motor responds to the step command and reaches the target position, if the absolute value of the deviation between its actual position and the target position is less than the preset deviation, and the absolute value of the deviation between its actual position and the target position is less than the preset deviation for the first time from the issuance of the step command, and the time maintained is less than the preset duration, it is determined that the control parameters of the joint motor meet the preset dynamic response index.
3. The joint motor cogging compensation method according to claim 1, characterized in that, The determination of the period length of the cogging torque based on the variation characteristics of the current feedback value includes: Determine the starting point where the absolute value of the negative slope in the waveform of the current feedback value is greater than the preset fluctuation threshold; The period length of the cogging torque is obtained by determining the angle difference between two adjacent starting points.
4. The joint motor tooth cogging compensation method according to claim 1, characterized in that, The step of determining the sampling step size based on the period length includes: The sampling step size is determined based on the period length and the preset number of sampling points in each period; wherein the sampling step size is equal to the period length divided by the preset number of sampling points in each period.
5. The method for cogging of a joint motor according to claim 1, characterized in that, The calculation of the compensation current reference value at each sampling location point based on the forward and reverse current includes: For each sampling location, the average value of the forward current and the reverse current corresponding to the sampling location is calculated to obtain the compensation current reference value of the sampling location.
6. The method for cogging compensation in a joint motor according to claim 1, characterized in that, The step of calculating the target compensation current using an interpolation algorithm based on the current joint motor position and the mapping relationship includes: The target compensation current I is calculated using the following formula. c : Where c is the position value of the current sampling point, a is the position value of the first sampling point adjacent to the current sampling point, b is the position value of the second sampling point adjacent to the current sampling point, and I a I is the reference value of the compensation current corresponding to the first sampling location point. b This is the reference value of the compensation current corresponding to the second sampling location.
7. The method for cogging compensation in a joint motor according to claim 1, characterized in that, The adjustment of motor control parameters based on test results includes: When the control parameters of the joint motor meet the preset dynamic response index, the step of controlling the joint motor to run with a first preset step size based on the adjusted control parameters is executed. If the control parameters of the joint motor do not meet the preset dynamic response index, the position loop proportional gain and velocity loop proportional gain of the joint motor are increased by a preset increment, and the step response test of the joint motor is returned to be executed until the control parameters of the joint motor meet the preset dynamic response index.
8. A joint motor tooth cogging compensation device, characterized in that, include: The test unit is used to perform step response tests on the joint motor and adjust the motor control parameters based on the test results so that the control parameters of the joint motor meet the preset dynamic response indicators. The determining unit is used to control the joint motor to run at a first preset step size based on the adjusted control parameters, record the current feedback value corresponding to each preset step position point corresponding to the first preset step size, and determine the period length of the cogging torque based on the change characteristics of the current feedback value. A recording unit is used to determine the sampling step size based on the period length, control the motor to rotate at least one revolution in the forward and reverse directions respectively with the sampling step size, and record the forward current and reverse current at each sampling position point corresponding to the sampling step size. The mapping unit is used to calculate the compensation current reference value of each sampling location point based on the forward current and reverse current, and to obtain the mapping relationship between the sampling location point and the compensation current reference value. The compensation unit is used to calculate the target compensation current by using an interpolation algorithm based on the current position of the joint motor and the mapping relationship during the operation of the joint motor, and to apply the target compensation current to the control loop of the joint motor.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 7.
10. 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 as described in any one of claims 1 to 7.