Gear clearance error compensation method and device, equipment and storage medium
By obtaining the angle between the motor shaft and the load shaft, the feedforward compensation amount of the gear backlash is determined, and the load is driven to the command angle, thus solving the problem of low positioning accuracy caused by gear backlash and achieving high-precision load positioning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GEER TECH CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-21
AI Technical Summary
In the prior art, due to the low positioning accuracy caused by gear backlash, the effective angle of the actual rotation of the load is less than the actual rotation angle of the motor shaft, resulting in an error between the actual position where the load finally stops and the angle of the input command.
By obtaining the motor shaft angle and the load shaft angle, the feedforward compensation amount corresponding to the gear backlash is determined. The feedforward compensation amount and the command angle are used to output control commands to drive the load to move to the command angle, thereby compensating for the gear backlash error.
This effectively improves the positioning accuracy of the system, ensuring that the load can move accurately to the commanded angle and reducing the positioning deviation caused by gear backlash.
Smart Images

Figure CN121900504A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of precision motion control technology, and in particular to a method, device, equipment and storage medium for compensating for gear backlash error. Background Technology
[0002] In the field of precision motion control, such as extended reality (XR) eye-tracking testing equipment, robot joints, and high-end medical instruments, motors and gear transmission mechanisms are often used to drive the load to achieve precise positioning. The load is the final actuator at the end of the transmission chain that needs to be precisely positioned.
[0003] Currently, the existing positioning method involves the servo driver receiving an input command angle, controlling the motor shaft to rotate based on that command angle, which in turn drives the gear transmission mechanism to move the load to the command angle position, thus achieving positioning.
[0004] However, the inherent gear backlash exists in the gear pair between the motor and the load during meshing. When the servo driver receives a command angle opposite to the current motor shaft angle, i.e., expecting the motor shaft to rotate in the opposite direction, the driving gear on the motor shaft must first disengage from the tooth surface of the original driven gear and idle within the space of the gear backlash (i.e., without driving the load) until its tooth surface contacts the tooth surface of the other side of the driven gear, only then can it re-establish meshing and begin driving the load to move in the opposite direction. During this process, the actual rotation angle of the motor shaft based on the command angle includes the idle angle used to fill the gear backlash and the effective angle used to drive the load. Due to the existence of the idle angle, the effective angle of the actual rotation of the load will be less than the actual rotation angle of the motor shaft, resulting in a gear backlash error between the actual position where the load finally stops and the input command angle, leading to low positioning accuracy of the system. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, device, and storage medium for compensating for gear backlash error, aiming to solve the technical problem of low positioning accuracy caused by gear backlash in the prior art.
[0006] To achieve the above objectives, this application proposes a gear backlash error compensation method, the method comprising: In response to the received instruction angle, the motor shaft angle and load shaft angle at the current moment are obtained. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. The feedforward compensation amount corresponding to the gear backlash is determined based on the motor shaft angle and the load shaft angle. Based on the feedforward compensation amount and the command angle, output control commands to drive the load to move, so that the load moves to the command angle.
[0007] In one embodiment, the step of determining the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle includes: The load state at the current moment is predicted based on the motor shaft angle and the load shaft angle to obtain a target state vector, wherein the target state vector includes at least the predicted angular velocity of the load at the current moment. When the direction corresponding to the predicted angular velocity is opposite to the direction corresponding to the angular velocity of the motor shaft, a first angular difference between the motor shaft angle and the load shaft angle is determined. The feedforward compensation amount corresponding to the gear backlash is determined based on the first angle difference.
[0008] In one embodiment, the step of determining the feedforward compensation amount corresponding to the gear backlash based on the first angle difference includes: The initial compensation amount is determined based on the first angle difference; The friction compensation amount is determined based on the acceleration corresponding to the predicted angular velocity. Determine the jerk compensation amount based on the jerk corresponding to the acceleration; The feedforward compensation amount corresponding to the gear backlash is determined based on the initial compensation amount, the friction compensation amount, and the jerk compensation amount.
[0009] In one embodiment, the target state vector includes at least the predicted angle of the load at the current moment, and the step of driving the load to move according to the feedforward compensation amount and the command angle, so that the load moves to the command angle, includes: Determine a second angle difference between the commanded angle and the predicted angle; The feedback control quantity is determined based on the second angle difference; The feedforward compensation amount is updated based on the feedback control amount to obtain the target compensation amount; The corresponding control command is output according to the target compensation amount to drive the load to move, so that the load moves to the command angle.
[0010] In one embodiment, the step of predicting the load state at the current moment based on the motor shaft angle and the load shaft angle to obtain the target state vector includes: The initial state vector and the prediction covariance matrix at the current time are determined based on the historical state vector at a preset time. The motor shaft angle and motor shaft angular velocity are converted into an equivalent state vector on the load side; The equivalent state vector is compared with the initial state vector to obtain the vector difference; The initial state vector is updated based on the predicted covariance matrix and the vector difference to obtain the target state vector.
[0011] In one embodiment, the step of updating the initial state vector based on the predicted covariance matrix and the vector difference to obtain the target state vector includes: The first trust weight is determined based on the predicted covariance matrix; The state correction amount is determined based on the first trust weight and the vector difference; The initial state vector is updated based on the state correction amount to obtain the target state vector.
[0012] In one embodiment, the step of updating the initial state vector according to the state correction amount to obtain the target state vector includes: The initial state vector is updated according to the state correction amount to obtain the updated state vector; The load axis angle is compared with the angle component in the updated state vector to obtain the third angle difference; The angle correction amount is determined based on the third angle difference and the second trust weight corresponding to the load axis angle; The angle component in the updated state vector is updated according to the angle correction amount to obtain the target state vector at the current moment.
[0013] Furthermore, to achieve the above objectives, this application also proposes a gear backlash error compensation device, the device comprising: The data acquisition module is used to respond to the received instruction angle and acquire the current motor shaft angle and load shaft angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. The data determination module is used to determine the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle. An error compensation module is used to output a control command to drive the load to move according to the feedforward compensation amount and the command angle, so that the load moves to the command angle.
[0014] In addition, to achieve the above objectives, this application also proposes a gear backlash error compensation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the gear backlash error compensation method as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the gear backlash error compensation method described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains the current motor shaft angle and load shaft angle by responding to the received command angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. Based on the motor shaft angle and load shaft angle, it determines the feedforward compensation amount corresponding to the gear backlash. Based on the feedforward compensation amount and the command angle, it outputs a control command to drive the load to move to the command angle. Because this application determines the feedforward compensation amount corresponding to the gear backlash by using the motor shaft angle and load shaft angle, and then uses the feedforward compensation amount and the command angle to output a control command to drive the load to the command angle, compared with the prior art, this application achieves compensation for gear backlash error, effectively improving the system positioning accuracy. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the first embodiment of the gear backlash error compensation method of this application; Figure 2 This is a flowchart illustrating the second embodiment of the gear backlash error compensation method of this application; Figure 3 This is a flowchart illustrating the third embodiment of the gear backlash error compensation method of this application; Figure 4 This is a schematic diagram of the module structure for gear backlash error compensation in this application; Figure 5 This is a schematic diagram of the gear backlash error compensation device of this application.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] The main solution of this application embodiment is as follows: This application obtains the current motor shaft angle and load shaft angle by responding to the received command angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. The feedforward compensation amount corresponding to the gear backlash is determined according to the motor shaft angle and the load shaft angle. The control command is output according to the feedforward compensation amount and the command angle to drive the load to move, so that the load moves to the command angle.
[0024] Due to the inherent gear backlash in the gear pair between the motor and the load in existing technology, when the servo driver receives a command angle opposite to the current motor shaft angle (i.e., expecting the motor shaft to rotate in the opposite direction), the driving gear on the motor shaft must first disengage from the tooth surface of the original driven gear and idle within the gear backlash (i.e., without driving the load) until its tooth surface contacts the tooth surface of the other side of the driven gear, only then can it re-establish engagement and begin driving the load to move in the opposite direction. During this process, the actual rotation angle of the motor shaft based on the command angle includes the idle angle used to fill the gear backlash and the effective angle used to drive the load. Due to the existence of the idle angle, the effective angle of the actual load rotation will be less than the actual rotation angle of the motor shaft, resulting in a gear backlash error between the actual stopping position of the load and the input command angle, leading to low positioning accuracy of the system.
[0025] This application provides a solution that determines the feedforward compensation amount corresponding to the gear backlash by using the motor shaft angle and the load shaft angle. Then, it uses the feedforward compensation amount and the command angle to output a control command to drive the load to move to the command angle. Therefore, compared with the prior art, this application realizes the compensation for gear backlash error and effectively improves the positioning accuracy of the system.
[0026] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a programmable logic controller, motion control card, embedded controller, etc., or a hardware device capable of implementing the above functions, such as a gear backlash error compensation device. The following description uses a gear backlash error compensation device (hereinafter referred to as the error compensation device) as an example to illustrate this embodiment and the following embodiments.
[0027] Based on this, the embodiments of this application provide a gear backlash error compensation method, referring to... Figure 1 , Figure 1 This is a schematic flowchart of the first embodiment of the gear backlash error compensation method of this application.
[0028] In this embodiment, the gear backlash error compensation method includes steps S10 to S30: Step S10: Respond to the received instruction angle and obtain the current motor shaft angle and load shaft angle.
[0029] It should be noted that the motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, reflecting the rotational position of the motor body. The load shaft angle is the angular displacement of the load shaft around its own rotation center, reflecting the actual position of the actuator (load) that ultimately needs to be controlled.
[0030] Understandably, the command angle can be the target position angle that the load is expected to eventually reach or track, as input by the upper-level motion planner or the user.
[0031] In practical implementation, a motor encoder can be installed on the motor shaft. The motor encoder can be used to accurately measure the rotational angular displacement of the motor shaft itself (i.e., the motor shaft angle). An external encoder can be installed on the load shaft. The external encoder is used to measure the actual position angle of the load (i.e., the load shaft angle). The measurement of the position encoder is not affected by the error in the transmission chain (including gear backlash) between the motor and the load, and can reflect the true position of the load.
[0032] Furthermore, when the error compensation device responds to the received instruction angle, it can communicate with the motor encoder and the external encoder to obtain the motor shaft angle at the current moment collected by the motor encoder, as well as the load shaft angle at the current moment collected by the external encoder.
[0033] Step S20: Determine the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle.
[0034] It should be noted that the feedforward compensation can be an additional torque applied at the instant the motor changes direction, the magnitude of which matches the gear backlash. The feedforward compensation is used to drive the motor shaft to quickly and accurately cross the physical clearance between the gears, thereby enabling the load to start reversing with lower delay and reducing positioning deviations caused by gear backlash.
[0035] In its implementation, the error compensation device monitors and calculates the real-time difference between the motor shaft angle and the load shaft angle. During stable unidirectional operation, the real-time difference remains constant; however, it dynamically changes at critical moments when the direction of motion is about to change. The error compensation device captures these changes and, using a specific algorithm (e.g., taking a portion of the real-time difference), converts it into an estimated gear backlash. Subsequently, the estimated gear backlash is substituted into a preset compensation function to calculate the required feedforward compensation control value.
[0036] Step S30: Output a control command to drive the load to move according to the feedforward compensation amount and the command angle, so that the load moves to the command angle.
[0037] In its implementation, the error compensation device outputs a basic control quantity based on the angular difference between the command angle and the load shaft angle. This basic control quantity drives the load to move in the direction that reduces the angular error. Subsequently, the error compensation device superimposes a feedforward compensation quantity onto the basic control quantity and outputs a corresponding control command to drive the load. The feedforward compensation quantity provides an additional driving force to compensate for gear backlash, overcoming the idle travel during gear meshing surface switching, thus ensuring that the actual stopping position of the load is consistent with or close to the command angle.
[0038] This embodiment obtains the current motor shaft angle and load shaft angle by responding to the received command angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. Based on the motor shaft angle and load shaft angle, the feedforward compensation amount corresponding to the gear backlash is determined. Based on the feedforward compensation amount and the command angle, a control command is output to drive the load to move to the command angle. Since this embodiment determines the feedforward compensation amount corresponding to the gear backlash by using the motor shaft angle and load shaft angle, and then uses the feedforward compensation amount and the command angle to output a control command to drive the load to the command angle, compared with the prior art, this application achieves compensation for gear backlash error, effectively improving the system positioning accuracy.
[0039] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment of this application, content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the gear backlash error compensation method of this application.
[0040] In this embodiment, step S20 includes steps S201 to S203: Step S201: Predict the load state at the current moment based on the motor shaft angle and the load shaft angle to obtain the target state vector.
[0041] The target state vector includes at least the predicted angular velocity and the predicted angle of the load at the current moment.
[0042] In its implementation, the error compensation device performs data fusion and state estimation on the current motor shaft angle and load shaft angle to determine a target state vector containing angular velocity predictions and angle predictions. The angle prediction, combining the motor shaft angle and load shaft angle, is a load position estimate obtained through algorithmic fusion and optimization. Compared to the load shaft angle directly measured by an external encoder, it effectively suppresses measurement noise and potential data delays from the external encoder, resulting in a smoother and more continuous result. The angular velocity prediction characterizes the actual motion trend of the load after being dynamically influenced by the transmission chain. Compared to the motor angular velocity, it isolates the interference of transmission nonlinear factors such as gear backlash on speed observation, more realistically reflecting the actual dynamics on the load side.
[0043] Among them, the motor angular velocity can be obtained by differential calculation of the motor shaft angular velocity, which is the instantaneous angular velocity of the motor shaft itself during rotation.
[0044] It should be understood that raw data from a single sensor (i.e., the motor encoder and the external encoder) cannot provide complete, reliable, and suitable real-time status information for high-precision dynamic control of the load. Motor encoder data cannot detect transmission errors, external encoder data may contain noise and delays, and neither can directly provide the critical dynamic quantity of load speed. By constructing a target state vector, the complementarity and optimization of multi-source information can be achieved, resulting in the optimal estimate of the load position and speed.
[0045] Step S202: When the direction corresponding to the predicted angular velocity is opposite to the direction corresponding to the motor shaft angular velocity, determine the first angular difference between the motor shaft angle and the load shaft angle.
[0046] In practical implementation, when the direction corresponding to the predicted angular velocity is opposite to the direction corresponding to the motor shaft angular velocity, it indicates that the motor has started to perform reverse drive, while the load, due to the existence of gear backlash, has not yet been driven and remains in its original inertial motion or stationary. Based on this, when the direction corresponding to the predicted angular velocity is opposite to the direction corresponding to the motor shaft angular velocity, the error compensation device can calculate the difference between the motor shaft angle and the load shaft angle, and take the absolute value of the difference to obtain the first angle difference value. This first angle difference value can reflect the currently effective single-sided gear backlash value.
[0047] Step S203: Determine the feedforward compensation amount corresponding to the gear backlash based on the first angle difference.
[0048] In practical implementation, since gear backlash exists in both forward and reverse directions, the error compensation device can take half of the first angle difference to obtain the single-sided backlash value, and then determine the compensation amount required to compensate the single-sided backlash value as the feedforward compensation amount.
[0049] In one feasible implementation, the following preset feedforward compensation formula can be pre-constructed:
[0050] In the formula, This is the feedforward compensation amount. To compensate for gap gain, This is the single-sided gap value. For the speed of load movement, Here is the Coulomb friction compensation coefficient. For load acceleration, This is the inertial jitter suppression coefficient. To accelerate.
[0051] Accordingly, step S203 includes steps S2031 to S2034: Step S2031: Determine the initial compensation amount based on the first angle difference.
[0052] In its implementation, the error compensation device takes half of the first angle difference to obtain the single-sided clearance value. Then, it uses the predicted angular velocity in the target state vector as the load's movement speed and substitutes it, along with the single-sided clearance value, into a preset feedforward compensation formula. The calculation result based on the clearance compensation amount, the single-sided clearance value, and the load's movement speed is the initial compensation amount. This initial compensation amount is used to provide a reference torque proportional to the gear clearance size to drive the motor shaft to quickly traverse the physical clearance between the gears.
[0053] Step S2032: Determine the friction compensation amount based on the acceleration corresponding to the predicted angular velocity.
[0054] In its implementation, the error compensation device differentiates the predicted angular velocity to obtain the acceleration. This acceleration is then used as the load acceleration and substituted into a preset feedforward compensation formula. The calculation result based on the Coulomb friction compensation coefficient and the load acceleration is the friction compensation amount. This friction compensation amount is used to overcome nonlinear friction in the transmission system, especially during low-speed starts or when the speed crosses zero, providing additional torque to counteract static friction and ensure smooth motion.
[0055] Step S2033: Determine the jerk compensation amount based on the jerk corresponding to the acceleration.
[0056] In practical implementation, the error compensation device can differentiate the acceleration to obtain the jerk, and then substitute it into a preset feedforward compensation formula. The calculation result based on the inertial jitter suppression system and the jerk is the jerk compensation amount. This jerk compensation amount is used to suppress the flexible vibration and noise of the mechanical structure excited by sudden acceleration changes (sudden start, sudden stop).
[0057] Step S2034: Determine the feedforward compensation amount corresponding to the gear backlash based on the initial compensation amount, the friction compensation amount, and the jerk compensation amount.
[0058] In practical implementation, the error compensation device can use the final result output by the preset feedforward compensation formula, that is, the superposition result of the initial compensation amount, the friction compensation amount, and the friction compensation amount, as the feedforward compensation amount corresponding to the gear clearance. This feedforward compensation amount integrates gear clearance, friction, and inertial effects to jointly achieve high-precision, low-oscillation precision motion control.
[0059] In this embodiment, step S30 may include steps S301 to S304: Step S301: Determine the second angle difference between the commanded angle and the predicted angle.
[0060] In its implementation, the error compensation device calculates the difference between the commanded angle and the predicted angle to obtain a second angle difference. This second angle difference reflects the deviation between the current load position and the commanded position.
[0061] It should be understood that the second angle difference is the command angle minus the angle prediction. A positive second angle difference indicates that the current position of the load (angle prediction) lags behind the command angle, requiring forward drive to eliminate the error. A negative second angle difference indicates that the current position of the load (angle prediction) leads the command angle, requiring reverse drive to eliminate the error.
[0062] Step S302: Determine the feedback control quantity based on the second angle difference.
[0063] In practical implementation, the error compensation device can calculate the feedback control quantity based on the proportional, integral, and derivative components of the second angle difference using a PID controller. This feedback control quantity is used to resist unknown disturbances, suppress error accumulation, and ensure stable system convergence, driving the load to move in the direction that eliminates the position error.
[0064] Step S303: Update the feedforward compensation amount according to the feedback control amount to obtain the target compensation amount.
[0065] In practical implementation, the error compensation device can synthesize (e.g., superimpose) the feedback control quantity and the feedforward compensation quantity, thereby updating the feedforward compensation quantity using the feedback control quantity to obtain the target compensation quantity.
[0066] Step S304: Output the corresponding control command according to the target compensation amount to drive the load to move, so that the load moves to the command angle.
[0067] In practical implementation, the error compensation device can convert the target compensation amount into a corresponding control command to drive the load to move, control the motor to output the corresponding torque, and thus drive the load to move to the command angle.
[0068] During load movement, the feedforward compensation can be used to offset known nonlinear disturbances such as gear backlash, while the feedback control is used to correct all residual errors and random disturbances that are not offset by the feedforward compensation in real time. The two work together to ensure that the load can move precisely to the command angle and improve positioning accuracy.
[0069] Based on the first and second embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, content that is the same as or similar to the first and second embodiments described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the gear backlash error compensation method of this application.
[0070] In this embodiment, step S201 includes steps S2011 to S2014: Step S2011: Determine the initial state vector and the predicted covariance matrix at the current time based on the historical state vector at the preset time.
[0071] It should be noted that the preset time can be a time that was set in advance and is before the current time.
[0072] In its implementation, the error compensation device can acquire historical state vectors determined at a preset time, and use the system dynamics model to calculate the current state vector and its uncertainty (i.e., the prediction covariance matrix). This prediction covariance matrix can provide a reliability assessment of the load state at the current time. The angle component in the historical state vector is the predicted angle at the preset time, and the velocity component is the predicted angular velocity at the preset time.
[0073] Step S2012: Convert the motor shaft angle and motor shaft angular velocity into an equivalent state vector on the load side.
[0074] In practical implementation, the error compensation device can differentially measure the motor shaft angle to obtain the motor shaft angular velocity. Then, based on the gear transmission ratio, the motor shaft angle and motor shaft angular velocity are converted to the load side to form an equivalent state vector with the load as the observation object.
[0075] Step S2013: Compare the equivalent state vector with the initial state vector to obtain the vector difference.
[0076] In practice, the error compensation device can compare the equivalent state vector with the initial state vector and calculate the vector difference between the two (i.e., the observation residual). This vector difference quantifies the deviation between the actual observation (equivalent state vector) and the model prediction (initial state vector).
[0077] Step S2014: Update the initial state vector according to the predicted covariance matrix and the vector difference to obtain the target state vector.
[0078] In practical implementation, the error compensation device can determine the correction weights based on the predicted covariance matrix and the above vector differences through a specific gain algorithm (such as Kalman gain), and update the initial state vector according to the correction weights to obtain the target state vector.
[0079] In one feasible implementation, step S2014 includes steps S20141 to S20143: Step S20141: Determine the first trust weight based on the predicted covariance matrix.
[0080] In its implementation, the error compensation device calculates a first trust weight to characterize the degree of trust in the motor shaft angle based on the predicted covariance matrix and the noise level of the motor encoder. This first weight can be a dynamically adjusted matrix. When the prediction uncertainty represented by the predicted covariance matrix is large, the error compensation device will trust the motor shaft angle more and assign it a higher weight; conversely, when the observation noise is large, the error compensation device will favor the angle prediction in the initial state vector.
[0081] Step S20142: Determine the state correction amount based on the first trust weight and the vector difference.
[0082] In a practical implementation, the error compensation device can multiply the first trust weight by the quantity difference to obtain the state correction amount.
[0083] Step S20143: Update the initial state vector according to the state correction amount to obtain the target state vector.
[0084] In practical implementation, the error compensation device can update the angle and angular velocity components in the initial state vector according to the state correction amount to obtain the target state vector.
[0085] In one feasible implementation, step S20143 includes steps S201431 to S201434: Step S201431: Update the initial state vector according to the state correction amount to obtain the updated state vector.
[0086] In practice, the error compensation device can superimpose the state correction amount with the corresponding angle and angular velocity components in the initial state vector to obtain an updated state vector that has undergone preliminary calibration.
[0087] Step S201432: Compare the load axis angle with the angle component in the updated state vector to obtain the third angle difference.
[0088] In its implementation, the error compensation device compares the load axis angle with the angular component in the updated state vector, subtracts the angular component from the load axis angle, and obtains the third angular difference. This third angular difference reflects the deviation between the updated state vector (after the first correction) and the actual load position in the position dimension.
[0089] Step S201433: Determine the angle correction amount based on the third angle difference and the second trust weight corresponding to the load shaft angle.
[0090] In practice, the error compensation device can determine the second trust weight based on the inherent characteristics of the external encoder. Then, the second trust weight is multiplied by the third angle difference to obtain the angle correction amount.
[0091] Step S201434: Update the angle component in the updated state vector according to the angle correction amount to obtain the target state vector at the current moment.
[0092] In practical implementation, the error compensation device can superimpose the angle correction amount with the angle component in the updated state vector to update the angle component and obtain the target state vector at the current moment.
[0093] It should be understood that the initial state vector is updated by the state correction amount to obtain the updated state vector. Then, the angle correction amount is determined based on the third angle difference between the load axis angle and the angle component in the updated state vector, and the second trust weight corresponding to the load axis angle. The angle correction amount is used to update the angle component in the updated state vector, so that the angle prediction in the obtained target state vector is highly converged to the true position of the load, so that the target state vector can more accurately reflect the true position of the load.
[0094] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the gear backlash error compensation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0095] This application also provides a gear backlash error compensation device, please refer to... Figure 4 , Figure 4 This is a schematic diagram of the module structure for gear backlash error compensation in this application. The gear backlash error compensation device includes: The data acquisition module 10 is used to respond to the received instruction angle and acquire the current motor shaft angle and load shaft angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center.
[0096] The data determination module 20 is used to determine the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle.
[0097] The error compensation module 30 is used to output a control command to drive the load to move according to the feedforward compensation amount and the command angle, so that the load moves to the command angle.
[0098] The gear backlash error compensation device provided in this application, employing the gear backlash error compensation method in the above embodiments, can solve the technical problem of low positioning accuracy caused by gear backlash in the prior art. Compared with the prior art, the beneficial effects of the gear backlash error compensation device provided in this application are the same as those of the gear backlash error compensation method provided in the above embodiments, and other technical features in the gear backlash error compensation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0099] This application provides a gear backlash error compensation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the gear backlash error compensation method in the first embodiment described above.
[0100] The following is for reference. Figure 5 , Figure 5 This is a schematic diagram of the gear backlash error compensation device of this application. The gear backlash error compensation device in the embodiments of this application may include, but is not limited to, programmable logic controllers, motion control cards, and embedded controllers. Figure 5 The gear backlash error compensation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0101] like Figure 5As shown, the gear backlash error compensation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the gear backlash error compensation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the gear backlash error compensation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show gear backlash error compensation devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.
[0102] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0103] The gear backlash error compensation device provided in this application, employing the gear backlash error compensation method in the above embodiments, can solve the technical problem of low positioning accuracy caused by gear backlash in the prior art. Compared with the prior art, the beneficial effects of the gear backlash error compensation device provided in this application are the same as those of the gear backlash error compensation method provided in the above embodiments, and other technical features of this gear backlash error compensation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0104] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0105] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0106] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the gear backlash error compensation method in the above embodiments.
[0107] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0108] The aforementioned computer-readable storage medium may be included in the gear backlash error compensation device; or it may exist independently and not assembled into the gear backlash error compensation device.
[0109] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the gear backlash error compensation device, the gear backlash error compensation device: responds to the received command angle, obtains the current motor shaft angle and load shaft angle, where the motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center; determines the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle; and outputs a control command to drive the load to move to the command angle based on the feedforward compensation amount and the command angle.
[0110] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0112] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0113] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the gear backlash error compensation method described above, which can solve the technical problem of low positioning accuracy caused by gear backlash in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the gear backlash error compensation method provided in the above embodiments, and will not be repeated here.
[0114] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for compensating gear backlash error, characterized in that, The method includes: In response to the received instruction angle, the motor shaft angle and load shaft angle at the current moment are obtained. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. The feedforward compensation amount corresponding to the gear backlash is determined based on the motor shaft angle and the load shaft angle. Based on the feedforward compensation amount and the command angle, output control commands to drive the load to move, so that the load moves to the command angle.
2. The gear backlash error compensation method as described in claim 1, characterized in that, The step of determining the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle includes: The load state at the current moment is predicted based on the motor shaft angle and the load shaft angle to obtain a target state vector, wherein the target state vector includes at least the predicted angular velocity of the load at the current moment. When the direction corresponding to the predicted angular velocity is opposite to the direction corresponding to the angular velocity of the motor shaft, a first angular difference between the motor shaft angle and the load shaft angle is determined. The feedforward compensation amount corresponding to the gear backlash is determined based on the first angle difference.
3. The gear backlash error compensation method as described in claim 2, characterized in that, The step of determining the feedforward compensation amount corresponding to the gear backlash based on the first angle difference includes: The initial compensation amount is determined based on the first angle difference; The friction compensation amount is determined based on the acceleration corresponding to the predicted angular velocity. Determine the jerk compensation amount based on the jerk corresponding to the acceleration; The feedforward compensation amount corresponding to the gear backlash is determined based on the initial compensation amount, the friction compensation amount, and the jerk compensation amount.
4. The gear backlash error compensation method as described in claim 2, characterized in that, The target state vector includes at least the predicted angle of the load at the current moment. The step of driving the load to move according to the feedforward compensation and the command angle, so that the load moves to the command angle, includes: Determine a second angle difference between the commanded angle and the predicted angle; The feedback control quantity is determined based on the second angle difference; The feedforward compensation amount is updated based on the feedback control amount to obtain the target compensation amount; The corresponding control command is output according to the target compensation amount to drive the load to move, so that the load moves to the command angle.
5. The gear backlash error compensation method as described in claim 4, characterized in that, The step of predicting the load state at the current moment based on the motor shaft angle and the load shaft angle to obtain the target state vector includes: The initial state vector and the prediction covariance matrix at the current time are determined based on the historical state vector at a preset time. The motor shaft angle and motor shaft angular velocity are converted into an equivalent state vector on the load side; The equivalent state vector is compared with the initial state vector to obtain the vector difference; The initial state vector is updated based on the predicted covariance matrix and the vector difference to obtain the target state vector.
6. The gear backlash error compensation method as described in claim 5, characterized in that, The step of updating the initial state vector based on the predicted covariance matrix and the vector difference to obtain the target state vector includes: The first trust weight is determined based on the predicted covariance matrix; The state correction amount is determined based on the first trust weight and the vector difference; The initial state vector is updated based on the state correction amount to obtain the target state vector.
7. The gear backlash error compensation method as described in claim 6, characterized in that, The step of updating the initial state vector according to the state correction amount to obtain the target state vector includes: The initial state vector is updated according to the state correction amount to obtain the updated state vector; The load axis angle is compared with the angle component in the updated state vector to obtain the third angle difference; The angle correction amount is determined based on the third angle difference and the second trust weight corresponding to the load axis angle; The angle component in the updated state vector is updated according to the angle correction amount to obtain the target state vector at the current moment.
8. A gear backlash error compensation device, characterized in that, The device includes: The data acquisition module is used to respond to the received instruction angle and acquire the current motor shaft angle and load shaft angle. The motor shaft angle is the angular displacement of the motor output shaft around its own rotation center, and the load shaft angle is the angular displacement of the load shaft around its own rotation center. The data determination module is used to determine the feedforward compensation amount corresponding to the gear backlash based on the motor shaft angle and the load shaft angle. An error compensation module is used to output a control command to drive the load to move according to the feedforward compensation amount and the command angle, so that the load moves to the command angle.
9. A gear backlash error compensation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the gear backlash error compensation method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the gear backlash error compensation method as described in any one of claims 1 to 7.