Underwater rudder motor return difference elimination method based on mechanical feature code adaptive compensation
By identifying and recording the meshing start point and backlash difference of the worm gear in the underwater servo, and using the meshing start point of the absolute encoder and adaptive compensation technology, the technical problem caused by the backlash difference of the worm gear meshing transmission system is solved. This achieves seamless reversing and improved positioning accuracy of the underwater servo, and extends the high-performance service life of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU AEROSPACE KAITE ELECTROMECHANICAL TECH CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-19
AI Technical Summary
The worm gear transmission system of underwater servo motors suffers from tooth backlash (backlash difference), which leads to lag in commutation response and loss of position accuracy. Existing technologies are difficult to effectively eliminate or cause problems such as increased cost, complex structure, and increased friction, and do not fully utilize the potential of absolute encoders.
By identifying the meshing start point and backlash difference of the worm gear teeth during the calibration phase, and using an absolute encoder to record hardware characteristic parameters, combined with an adaptive control algorithm, high-speed crossing and precise engagement are achieved during commutation, and the compensation strategy is updated in real time to eliminate the influence of backlash.
It achieves seamless reversing of underwater servo motors, improves reversing response speed and positioning accuracy, extends the high-performance service life of the system, maintains the reliability and accuracy of the mechanical system, and reduces costs.
Smart Images

Figure CN121957153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method for eliminating backlash error in underwater servos based on adaptive compensation using mechanical feature codes. Background Technology
[0002] Underwater servo motors are the core actuators of underwater vehicles, underwater robots, and other equipment, and their performance directly determines the vehicle's maneuverability and control precision. Currently, underwater servo motors generally employ a motor + reducer + transmission mechanism scheme. Among these, worm gear drives have become the preferred solution for underwater servo motor transmission systems due to their compact structure, large transmission ratio, self-locking capability, and smooth operation. The self-locking characteristic of worm gears is particularly suitable for underwater applications—when the servo motor is powered off, the rudder plate can maintain its current position, resisting the impact of water currents.
[0003] However, the inherent backlash (backlash) of worm gear drives poses a challenge to high-precision control. Backlash is necessary for ensuring lubrication, assembly, and temperature adaptability, but it also leads to lag in commutation response and loss of positional accuracy. When the servo motor switches from forward to reverse rotation, the motor must first idle to overcome the backlash before the output shaft begins to move, creating a control dead zone. For underwater vehicles, this commutation lag means delayed attitude adjustment, affecting navigation stability; the backlash also directly translates into positional error of the output shaft, limiting precise positioning capabilities.
[0004] In the existing technology, the following solutions are mainly adopted to address the backlash problem: (1) Improve the processing and assembly accuracy, but the cost increases sharply and the gap cannot be completely eliminated; (2) Use a double-lead worm or double worm wheel backlash elimination structure, but the structure is complex and occupies a large space, which contradicts the compact requirements of underwater servo motors; (3) Use spring preload to eliminate backlash, but increase friction and wear, and is not suitable for bidirectional load conditions; (4) Use software filtering compensation, but the compensation is based on post-detection, there is still a lag, and the precise gap size cannot be known, so the compensation effect is limited; (5) Use dual motors to eliminate backlash, but the volume and cost double, and it is not suitable for compact spaces.
[0005] More importantly, existing solutions do not fully utilize the existing hardware resources of the servo system—absolute encoders. Absolute encoders are usually only used as position measurement tools, and their deeper potential of "not losing position when power is off" and "absolute position memory" has not been explored.
[0006] In view of the above, this application is hereby submitted. Summary of the Invention
[0007] To address the aforementioned problems in existing technologies, a method for eliminating the backlash difference of underwater servos based on adaptive compensation using mechanical feature codes is provided, with the aim of solving at least one of the above problems.
[0008] The technical solution to achieve the purpose of this invention is as follows:
[0009] This invention provides a method for eliminating backlash in underwater servos based on adaptive compensation using mechanical feature codes, comprising the following steps:
[0010] Step S1: During the calibration phase after the servo motor assembly is completed, the control system drives the motor to rotate the output shaft in the positive direction to the mechanical limit position, and records the first boundary position value P output by the absolute encoder. +max Then drive it in the opposite direction to the mechanical limit position on the other side, and record the second boundary position value P. -max During forward and reverse rotation, encoder data and motor current signals are continuously acquired to identify the transition range from disengagement to re-engagement of the worm gear teeth, and the forward engagement start point P is extracted. +boundary and the starting point of reverse meshing P -boundary Calculate the encoder pulse number R corresponding to the hysteresis error: R = |P +boundary -P -boundary |; its boundary values and pulse count are used as hardware characteristic parameters of the servo and written into the non-volatile memory of the control module;
[0011] Step S2, during normal operation, the control system reads the current absolute position P of the absolute encoder in real time. curr When the rudder angle command P is received target Then, the direction of motion is calculated and the relationship between the current position and the stored hardware characteristic parameters is determined:
[0012] If the current position is in the meshing zone and the direction of motion is consistent with the current direction of force, it directly enters the position closed-loop PID control mode;
[0013] If the current position is in the meshing zone but needs to change direction, or is in the blind zone, then enter the high-speed crossing mode, control the motor to run in open loop at a preset high speed and low torque, and quickly pass through the blind zone;
[0014] When the encoder's real-time feedback value is at the target boundary, the system seamlessly switches to the position closed-loop PID precision control mode, so that the worm gear and worm can mesh smoothly and drive the rudder plate to the precise position.
[0015] Step S3: During the servo motor's idle period or according to a preset cycle, the self-test program is automatically executed. During the self-test, the drive motor causes the output shaft to reciprocate within a small angle range. The encoder provides feedback to measure the current backlash range in real time and calculates the current backlash R. , ; Set the current return difference R , If the error exceeds a preset threshold, the hardware characteristic parameters in the non-volatile memory are automatically updated to ensure that the compensation strategy always matches the current mechanical state.
[0016] Compared with the prior art, the beneficial effects of the present invention include:
[0017] (1) Through the high-speed crossing mode based on hardware characteristic parameters in step S2, the control system can predict the size of the blind zone at the moment the commutation command is received, and quickly sweeps across the gap in an open-loop high-speed, low-torque manner, compressing the blind zone crossing time to the millisecond level, increasing the output shaft response speed by more than 80%, and realizing "seamless commutation". Compared with the fixed dead zone compensation based on post-detection in the prior art, the present invention fundamentally eliminates hysteresis;
[0018] (2) By setting the precise engagement mode and boundary threshold ε in step S2, the system switches to position closed-loop control in advance before physical contact occurs, and uses PID regulation capability to achieve smooth meshing of the tooth surface, avoiding overshoot and oscillation caused by impact, and improving repeatability by more than 60%. Compared with the uniform parameter compensation that ignores individual differences in the prior art, the present invention achieves high-precision control that is precisely matched with mechanical characteristics;
[0019] (3) Through the periodic self-check and adaptive update mechanism in step S3, the system can sense gap fluctuations caused by factors such as wear and temperature changes in real time, and dynamically optimize the stored hardware characteristic parameters so that the compensation strategy always matches the actual mechanical state. Compared with the existing technology where the parameters are fixed, the present invention ensures that the system accuracy does not decrease with the time of use, and significantly extends the high-performance service life of the servo motor;
[0020] (4) This invention fully utilizes the existing hardware resources of the servo motor—an absolute encoder for position feedback and mechanical characteristic recording, a motor current signal for engagement state sensing, and a non-volatile memory for permanent storage of characteristic parameters. It does not add any sensors, mechanical parts, or dedicated testing equipment, but achieves a performance leap solely through software algorithms, resulting in an extremely high cost-effectiveness ratio.
[0021] (5) This invention allows the mechanical system to retain the optimal design clearance, fully guaranteeing the physical space required for lubrication, assembly and temperature adaptability, and ensuring long-term reliable operation; at the same time, by controlling and compensating, the influence of clearance on commutation response and positioning accuracy is precisely eliminated, thus completely resolving the inherent contradiction in traditional design that "improving accuracy inevitably sacrifices reliability, and improving reliability inevitably sacrifices accuracy";
[0022] (6) Through the self-checking mechanism triggered by temperature changes in step S3, and the periodic adaptive update, the system can automatically compensate for gap fluctuations caused by factors such as thermal expansion and pressure changes, and maintain stable performance under different temperature and water depth conditions. Compared with the fixed parameter scheme in the prior art, the present invention has obvious advantages in complex underwater environments. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating a method for eliminating backlash in underwater servos based on adaptive compensation using mechanical signature codes. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0026] Therefore, the following detailed description of embodiments of the present invention is not intended to limit the scope of the claimed invention, but merely illustrates some embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0027] It should be noted that, unless otherwise specified, the embodiments and features and technical solutions in the present invention can be combined with each other.
[0028] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0029] The present invention will be further described in detail below with reference to embodiments.
[0030] like Figure 1 As shown, this invention provides a method for eliminating the backslip difference of underwater servo motors based on adaptive compensation using mechanical feature codes. This method is implemented by an underwater servo motor backslip difference elimination system and includes the following steps:
[0031] Step S1: During the calibration phase after the servo motor assembly is completed, the control system drives the motor to rotate the output shaft in the positive direction to the mechanical limit position, and records the first boundary position value P output by the absolute encoder. +max Then drive it in the opposite direction to the mechanical limit position on the other side, and record the second boundary position value P. -max During forward and reverse rotation, encoder data and motor current signals are continuously acquired to identify the transition range from disengagement to re-engagement of the worm gear teeth, and the forward engagement start point P is extracted. +boundary and the starting point of reverse meshing P-boundary Calculate the encoder pulse number R corresponding to the hysteresis error: R = |P +boundary -P -boundary |; its boundary values and pulse count are used as hardware characteristic parameters of the servo and written into the non-volatile memory of the control module;
[0032] Step S2, during normal operation, the control system reads the current absolute position P of the absolute encoder in real time. curr When the rudder angle command P is received target Then, the direction of motion is calculated and the relationship between the current position and the stored hardware characteristic parameters is determined:
[0033] If the current position is in the meshing zone and the direction of motion is consistent with the current direction of force, it directly enters the position closed-loop PID control mode;
[0034] If the current position is in the meshing zone but needs to change direction, or is in the blind zone, then enter the high-speed crossing mode, control the motor to run in open loop at a preset high speed and low torque, and quickly pass through the blind zone;
[0035] When the encoder's real-time feedback value is at the target boundary, the system seamlessly switches to the position closed-loop PID precision control mode, so that the worm gear and worm can mesh smoothly and drive the rudder plate to the precise position.
[0036] Step S3: During the servo motor's idle period or according to a preset cycle, the self-test program is automatically executed. During the self-test, the drive motor causes the output shaft to reciprocate within a small angle range. The encoder provides feedback to measure the current backlash range in real time and calculates the current backlash R. , ; Set the current return difference R , If the error exceeds a preset threshold, the hardware characteristic parameters in the non-volatile memory are automatically updated to ensure that the compensation strategy always matches the current mechanical state.
[0037] The underwater servo backlash elimination system includes a rigid transmission chain module, an absolute position sensing unit module, and an intelligent control unit module. Through the deep collaboration of these three modules, an intelligent transmission control system with self-sensing, self-compensation, and self-optimization capabilities is constructed.
[0038] The rigid transmission chain module consists of a coreless motor, a planetary gear reducer, and a worm gear transmission mechanism connected in sequence. This module provides a deterministic mechanical transmission relationship. The worm gear meshing pair retains a designed clearance to ensure lubrication, temperature adaptability, and smooth assembly. At the same time, this clearance has stable boundary characteristics and a repeatable return path.
[0039] The absolute position sensing module uses a magnetic induction multi-turn absolute encoder, directly coupled to the servo motor output shaft. This module has the ability to maintain position even when power is off and multi-turn angle counting function. It can output the absolute angular position of the output shaft in real time, permanently memorize the physical characteristics of mechanical parts, and establish a precise mapping from physical space to digital space.
[0040] The intelligent control module is based on an ARM-based embedded controller with built-in non-volatile memory and a floating-point arithmetic unit. This module stores the unique mechanical characteristic parameters of each servo and runs a dual-mode adaptive control algorithm.
[0041] It should be noted that the tooth backlash of a worm gear transmission chain is a necessary condition for ensuring the long-term reliable operation of a mechanical system. This backlash provides space for the lubricating oil film, compensates for manufacturing and assembly errors, and accommodates thermal expansion and contraction. However, this very mechanically essential physical characteristic becomes a major obstacle to control precision. The introduction of absolute encoders is not merely for position feedback; their core value lies in converting this physical backlash into permanently storable digital information. The worm gear provides a measurable physical object with stable boundary characteristics, while the absolute encoder provides a precise means of converting physical quantities into digital quantities. The combination of the two allows the unique characteristics of the mechanical system to be recorded and utilized. Without the deterministic backlash of the worm gear, encoder measurements would only fluctuate randomly; without the memory function of an absolute encoder, the backlash characteristics could only be remeasured after each power-on, making true hardware-level compensation impossible.
[0042] It should be noted that the hardware characteristic parameters are stored in non-volatile memory, establishing a precise mapping from the physical space to the control space. The physical backlash of the worm gear is converted into digital characteristic codes using an absolute encoder, establishing a digital mapping of the mechanical blind zone in the control space. This mapping relationship allows the control system to predict the behavior characteristics of the mechanical system—at the instant a commutation command is received, the system already knows how many angles need to be traversed to re-establish meshing, rather than passively discovering it only after the output shaft has stopped or the motor is idling. The characteristic parameters are the bridge connecting the physical layer and the control layer, transforming the physical memory of the mechanical system into prior knowledge of the control system, enabling the control strategy to evolve from reactive to predictive.
[0043] It should be noted that the seamless switching between high-speed traversal mode and precision close-in mode reflects the engineering implementation of the time separation principle. Within the extremely short time window of the commutation instant, the system virtually eliminates the backlash in a high-speed, low-torque mode, making the output shaft exhibit a backlash-free response at the control level. During steady-state operation, the system allows the physical existence of mechanical backlash to ensure lubrication and smooth transmission. This separation of the time dimension unifies the contradictory physical requirements (the need for both the existence and non-existence of backlash) within the same system, achieving the ideal state of physical backlash but backlash-free control.
[0044] It's important to note that wear and temperature changes alter the gap size, and compensation strategies with fixed parameters inevitably fail as the system ages. The adaptive update mechanism, through periodic self-checks, senses changes in mechanical characteristics in real time and optimizes stored feature parameters in reverse, forming a closed-loop evolutionary chain of "perception-decision-execution-feedback-optimization." This relationship endows the system with a life-like adaptive capability—as usage time increases, the system does not experience performance degradation but rather maintains its accuracy, achieving performance stability throughout its entire lifecycle.
[0045] It should be noted that the above four relationships interact to produce emergent effects that a single module cannot achieve: the system can transform its own physical defects (mechanical backlash) into optimizable digital resources, turning waste into treasure through control logic. The mechanical system provides measurable physical characteristics, the sensing system provides digital measurement methods, the control system provides predictive strategies based on prior knowledge, and the learning system provides continuous optimization and evolutionary capabilities—the four are interconnected and mutually supportive, forming an intelligent transmission control ecosystem with self-sensing, self-compensation, and self-optimization capabilities.
[0046] Furthermore, in some embodiments of the present invention, in step S1, by traversing the complete mechanical motion range of the output shaft, the engagement and disengagement states of the worm gear transmission pair are accurately identified using multi-source information fusion technology. Absolute position parameters characterizing the tooth flank clearance boundary are extracted and permanently stored in non-volatile memory, forming a unique mechanical fingerprint for each servo motor. This method enables the control system to obtain prior knowledge of the individual mechanical characteristics of the servo motor, providing accurate reference information for adaptive backflip compensation in subsequent operation phases. It includes the following steps:
[0047] Step S11: The control system drives the motor to slowly rotate the output shaft in the positive direction until it touches the mechanical limit (or the safety limit set by the software), and records the first boundary position value P output by the absolute encoder at this time. +max Similarly, drive in the reverse direction to the other limit, and record the second boundary position value P output by the absolute encoder at this point. -max Its two extreme positions provide a repeatable absolute coordinate framework for the entire calibration process, ensuring that subsequent measurements are performed in a unified spatial reference system.
[0048] It should be noted that P +max and P -max These are the inherent physical boundaries of the mechanical system, which do not change with external disturbances. Their two reference points ensure that measurements and comparisons can be performed and compared in the same reference frame whenever calibration is performed (including subsequent adaptive updates), eliminating uncertainties caused by time and temperature drift.
[0049] Step S12, the control system drives the motor to move the output shaft from P+max To P -max The system rotates continuously at a constant speed while simultaneously acquiring two types of data at a sampling frequency of no less than 1 kHz: the real-time absolute position sequence P(t) output by the absolute encoder, and the real-time motor current I(t) signal fed back by the sampling resistor of the drive circuit. The constant speed rotation ensures a linear correspondence between the time axis and the position axis, while the high-frequency synchronous acquisition ensures precise alignment of position and current in the time dimension, providing a data foundation for subsequent state recognition.
[0050] It should be noted that step S12 uses high-frequency synchronous acquisition to precisely align the current signal on the time axis with the position signal on the spatial axis. This spatiotemporal correspondence is a prerequisite for the subsequent mapping from current abrupt changes to position coordinates; without this precise correspondence, current changes cannot be transformed into meaningful spatial locations.
[0051] Step S13: The motor current I(t) directly reflects the change in load torque. When the worm gear is in the meshing state driving the load, the current is high; when it is in the disengaged return state, the motor only needs to overcome its own friction, and the current decreases significantly. By analyzing the local rate of change of I(t), the moment t when the current jumps from a low level to a high level is identified. + and the time t when the voltage drops from high to low. - Its time corresponds to the critical point where the tooth surface goes from disengagement to contact and from contact to disengagement.
[0052] It should be noted that step S13 uses the jump characteristics of current as the criterion for the change of meshing state. The physical basis is that at the instant the worm gear rotates from idle to meshing, the sudden change in load causes a current step. This physical phenomenon has clear repeatability, and the response speed of the current signal is faster than any mechanical contact sensor, thus enabling high-precision state identification.
[0053] Step S14, the time t identified in step S13 is... + and t - Mapping this to the synchronously acquired real-time absolute position sequence P(t), we obtain the corresponding absolute position values:
[0054] During the forward motion, the position corresponding to the moment of current jump is the forward engagement initiation point P. +boundary ;
[0055] During the reverse motion, the position corresponding to the current jump is the reverse engagement initiation point P. -boundary ;
[0056] Its two locations define the physical boundaries of the gap: at P +boundary and P -boundary In the region between these two points, the worm gear is disengaged; outside this region, it is engaged.
[0057] It should be noted that step S14 maps the time point identified in step S13 to the position sequence, realizing the transformation from physical event (tooth surface contact) to digital quantity (absolute position). This mapping is a bridge connecting the physical world and the digital world, making the originally abstract gap boundary a concrete and storable digital parameter.
[0058] Step S15, the encoder pulse number R corresponding to the hysteresis difference is defined as the absolute difference between the two boundary positions:
[0059] R=|P +boundary -P -boundary |
[0060] R directly quantifies the angular equivalent of the tooth flank clearance on the output shaft, and is a precise numerical feature that corresponds one-to-one with the mechanical system.
[0061] It should be noted that step S15 eliminates the absoluteness of the boundary positions by calculating the difference between the two boundary positions, and extracts the encoder pulse number R, which represents the gap size. R is not affected by the origin of the coordinate system, which makes it easy for subsequent control algorithms to use directly, and also facilitates comparison between different servos.
[0062] Step S16, P +boundary P -boundary R and extreme position P +max P -max The hardware characteristic parameters of the servo are written into the non-volatile memory (such as Flash) of the control module. These parameters can be read at any time throughout the servo's lifespan and will not be lost even when power is off.
[0063] It should be noted that step S16 writes the parameters obtained in steps S14 and S15 into a non-volatile memory, ensuring that the information remains available throughout the servo motor's lifecycle. This step endows the control system with memory capabilities—it is no longer a system that needs to relearn every time it is powered on, but rather an intelligent agent with prior knowledge.
[0064] These features collectively constitute a complete chain of "measurement → perception → recognition → calculation → storage," with each link in the chain taking the output of the previous link as its input, and none can be omitted. More importantly, there is a two-way interaction between these features: the stored feature parameters are not only the result of the current calibration but also the benchmark for future adaptive updates; and changes discovered in future adaptive updates will, in turn, verify the accuracy of the initial calibration or trigger recalibration. This two-way interaction endows the system with the ability to learn and evolve.
[0065] It should be further explained that the absolute encoder, originally used only for position feedback, is now functioning as a mechanical characteristic recorder; the motor current signal, originally used only for overcurrent protection, is now used as a meshing state sensor; and the non-volatile memory, originally used only for storing program code, is now used to store individual mechanical characteristic parameters. This invention completes the extraction and storage of mechanical characteristics before the servo motor is put into operation (during the calibration phase), enabling high-speed crossings of the clearance boundaries for each subsequent commutation. Its predictive capability upgrades the control mode from reactive response to proactive prediction, significantly improving system performance. This invention divides the continuous mechanical clearance space into two discrete boundary points (P...). +boundary and P -boundary The gap length is quantized into a countable number of encoder pulses R. This segmentation transforms the originally continuous and difficult-to-process physical quantity into discrete, easily stored, and computationally scalable digital parameters, laying the foundation for digital control. Although the current scheme focuses on static feature extraction during the calibration phase, it should be combined with a subsequent adaptive update mechanism to enable the system to dynamically adjust feature parameters based on wear and environmental changes. This extension expands the scheme's scope from one-time calibration to full lifecycle self-optimization. Identifying the meshing state through current signals essentially uses the mechanical system's response (load change) as feedback information to adjust the judgment of the gap boundary. Its closed-loop sensing method improves the accuracy and robustness of feature extraction, demonstrating the application of feedback principles.
[0066] In existing technologies, the unified parameter compensation scheme involves setting a fixed dead time or angle in the control algorithm and actively compensating for this fixed value when commutation is detected. Limitations: Due to manufacturing tolerances, the actual clearances of servos of the same model vary, and the fixed parameters cannot match individual differences, resulting in low compensation accuracy; it also cannot adapt to changes in clearance due to wear.
[0067] In existing technologies, high-precision machining solutions reduce clearance by increasing machining accuracy. Limitations: costs rise sharply, and clearance cannot be completely eliminated; excessive reduction of clearance can lead to new problems such as lubrication failure and temperature jamming.
[0068] In existing technologies, mechanical backlash elimination schemes employ double-lead worm gears and spring preload to eliminate backlash. Limitations: The structure is complex, occupies a large space, increases friction and wear, and is unsuitable for the compact space and bidirectional load-bearing conditions of underwater servos.
[0069] In existing technologies, traditional encoder feedback schemes treat the encoder merely as a position measurement tool for position feedback in closed-loop control. Limitations: They fail to explore the deeper potential of encoder power-off memory and absolute position; the information recorded by the encoder is only used for the current control cycle and cannot be accumulated to form system knowledge.
[0070] Existing technologies use uniform control parameters for all servos of the same model, ignoring individual differences. This invention obtains the unique mechanical limit positions and engagement start points of each servo through a calibration process, establishing an individualized set of mechanical characteristic parameters, enabling the control system to recognize and memorize the mechanical fingerprint of the controlled object.
[0071] In existing technologies, motor current signals are typically used only for overcurrent protection and are not used as sensor information for sensing mechanical conditions. This invention integrates encoder position signals and motor current signals, utilizing the characteristics of current abrupt changes to accurately identify the starting point of tooth meshing, thus achieving non-contact, high-precision sensing of mechanical conditions.
[0072] In existing technologies, encoder position information is only used for real-time feedback, and the control system cannot retain any historical information about mechanical characteristics after power failure. This invention writes the extracted feature parameters into a non-volatile memory for permanent storage, enabling the control system to have long-term memory of mechanical characteristics, achieving power-on functionality without the need for repeated calibration.
[0073] Existing technologies for handling hysteresis are mostly qualitative or coarse estimations (such as fixing the dead time). This invention quantizes the abstract hysteresis into a specific encoder pulse number R and precisely calibrates its boundary position P. +boundary and P -boundary This provides a digital input that can be directly calculated for subsequent control algorithms.
[0074] Existing compensation technologies are based on post-event detection—compensation is applied only after the commutation action is detected. This invention, through pre-stored boundary information, enables the control system to predict the size of the blind zone to be traversed the instant the commutation command is received, thereby achieving predictive compensation rather than reactive compensation, fundamentally eliminating lag.
[0075] It should be noted that the actual clearance boundary of each servo motor is precisely measured and stored. Subsequent compensation control can be precisely matched with individual mechanical characteristics, avoiding errors from uniform parameter compensation and significantly improving control accuracy. Predictive control based on prior knowledge reduces commutation lag time by more than 80%, and the output shaft response time is at the motor start-up time, achieving seamless commutation. The extracted feature parameters serve as the initial benchmark, which, in conjunction with the adaptive update mechanism during subsequent operation, can monitor clearance changes caused by wear in real time and dynamically optimize the compensation strategy, ensuring that the system accuracy does not decrease over time. Utilizing the existing absolute encoder, current sampling circuit, and non-volatile memory of the servo motor without adding any sensors or mechanical parts, and achieving feature extraction solely through software algorithms, it boasts an extremely high cost-effectiveness ratio. In traditional solutions, improving accuracy often sacrifices reliability (e.g., excessively reducing clearance leads to jamming risk), while improving reliability inevitably sacrifices accuracy (e.g., maintaining a large clearance). This invention allows the mechanical system to maintain optimal clearance to ensure long-term reliable operation, while achieving high accuracy through control compensation, completely resolving this inherent contradiction. The gap fluctuations caused by temperature changes can be remeasured and updated through periodic self-checks, ensuring that the compensation strategy always matches the actual environment and that the system can maintain stable performance under different temperature and pressure conditions.
[0076] Furthermore, in some embodiments of the present invention, in step S2, after the servo motor completes calibration and solidifies its hardware characteristic parameters, it enters the normal operation phase. The control system, based on real-time position feedback and stored mechanical fingerprints, executes control input and state initialization, position relationship determination, and control mode selection logic.
[0077] Furthermore, in some embodiments of the present invention, in step S2, during the execution of control input and state initialization logic, the control system reads the current absolute position P output by the absolute encoder in real time at a fixed control period (e.g., 1 ms). curr And receive the target rudder angle command P issued by the host computer. target The system maintains the following state variables internally:
[0078] Current direction of motion indicator Dir curr The target location is determined by comparing the current command with the target location of the previous command. curr Defined as:
[0079] Dir curr =sign(P curr -P prev )
[0080] Among them, P prev The position value is the position value of the previous control cycle. sign() is the sign function, which takes the value of +1 (forward movement), -1 (reverse movement), or 0 (stationary).
[0081] Current force direction indicator (Force) curr By inferring the direction of the motor current or the historical motion direction (it is generally assumed that when a robot is in continuous motion, the tooth surface is in contact on one side, and the direction of the force is consistent with the direction of motion), Force curr Defined as:
[0082] Force curr =sign(I q )
[0083] Among them, I q This represents the torque current component of the motor, with its sign corresponding to the direction of the motor's output torque, thus reflecting the force-bearing side of the tooth surface. When the motor drives the load in the forward direction, the forward side of the tooth surface is in contact, and the force... curr =+1; During reverse drive, Force curr =-1; When the motor is stationary or in a zero-torque state, Force curr =0 indicates that the tooth surface is in a free state (possibly in a blind zone or just in contact).
[0084] Target movement direction Dir target Defined as:
[0085] Dir target =sign(P target -P curr )
[0086] Among them, P target The target rudder angle command issued by the host computer.
[0087] The stored hardware characteristic parameters include the positive engagement initiation point P. +boundary Reverse meshing start point P -boundary The encoder pulse count R for hysteresis.
[0088] Furthermore, in some embodiments of the present invention, in step S2, during the determination of positional relationship, according to P curr With P +boundary and P -boundary Based on the numerical relationship, the system divides the current position into a forward engagement zone, a reverse engagement zone, and a blind zone.
[0089] In the forward meshing zone, the worm gear is in a forward-biased meshing state. When the output shaft is in this zone and subjected to a forward load, the tooth surfaces are in close contact; if subjected to a reverse load, the tooth surfaces will disengage and enter the dead zone. The parameter relationships in the forward meshing zone are:
[0090] P curr ≥P +boundary ;
[0091] In the reverse meshing zone, the worm gear is in a reverse meshing state. When the output shaft is in this zone and subjected to a reverse load, the tooth surfaces are in close contact; if subjected to a forward load, the tooth surfaces will disengage and enter the dead zone. The parameter relationships in the reverse meshing zone are:
[0092] P curr ≤P -boundary
[0093] In the blind zone, the worm gear is disengaged. The output shaft can swing freely in this area without being constrained by the tooth surface; the motor rotation must pass through this area to re-establish engagement. The parameter relationships in the blind zone are:
[0094] P -boundary <P curr <P +boundary
[0095] Furthermore, in some embodiments of the present invention, in step S2, the boundary threshold ε, whose unit is the number of encoder pulses, typically ranges from 3 to 10 pulses, corresponding to an output shaft angle of 0.1° to 0.5° (depending on the encoder resolution). The magnitude of the boundary threshold ε is related to the encoder resolution, the elastic deformation of the mechanical system, and the control cycle. A reasonable ε should ensure that at the moment of switching, the tooth surfaces have not yet made actual contact, but are close enough to allow subsequent closed-loop control to achieve a smooth transition. It is typically taken as 3 to 5 times the encoder resolution. The static determination threshold δ, when |P curr -P prev When | < δ and continues for multiple periods, it is determined to be in a static state.
[0096] Furthermore, in some embodiments of the present invention, in step S2, in the control mode selection logic, the system decides to enter one of the following three control modes based on the current position area, target direction, and force direction:
[0097] Mode 1: Direct position closed-loop control is adopted. The system directly enters position closed-loop PID control when the following conditions are met simultaneously: the current position is in the engagement zone (forward or reverse); the target direction is consistent with the current force direction, i.e.
[0098] Dir target =Force curr
[0099] Under these conditions, the worm gear is already in a stable meshing state, and there is no need to change the force-bearing side. Therefore, the motor can be directly driven to the target position using the standard PID algorithm, ensuring response speed and steady-state accuracy.
[0100] Mode 2: High-speed crossing control is adopted. The system enters high-speed crossing mode when any of the following conditions are met:
[0101] The current location is within the blind spot (regardless of the target's direction);
[0102] The current position is in the meshing zone, but the target direction is opposite to the current force direction (i.e., a reversal is required).
[0103] In high-speed traverse mode, the control system performs the following operations:
[0104] Open-loop speed control is used, and the motor operates at a preset fixed speed V. cross and current limiting current I limit The direction of movement is determined by the target direction. cross It is usually set to 60% to 80% of the motor's rated speed to ensure rapid passage through blind spots while avoiding impact; I limit Set to 30%–50% of the rated current to prevent excessive impact force during sudden contact at the end of the dead zone; wherein, the fixed speed V cross The speed can be dynamically adjusted based on the backhaul difference: when R is large, the crossing speed should be increased appropriately to shorten the lag time; when R is small, the speed should be reduced to ensure switching accuracy.
[0105] Real-time position monitoring is adopted. During the crossing process, the control system continuously reads the real-time absolute position sequence P(t) and compares it with the stored boundary parameters.
[0106] Boundary detection is employed: when |P(t) - P boundary When | ≤ ε, where ε is the boundary threshold, P boundary The engagement start point is determined by, for example, 5 encoder pulses, indicating that the engagement zone is about to begin.
[0107] Mode 3: Employing precise input control, when the high-speed crossing mode detects that the system is at the target boundary, the system immediately switches to position closed-loop PID control for a seamless transition. At the moment of switching, the PID controller uses the current deviation e=P... boundary -P(t) is the input to begin calculation, and the output is a smoothly transitioning motor control quantity to ensure smooth tooth contact and avoid impact and oscillation. At the moment of switching from high-speed crossing to position closed loop, speed feedforward compensation is introduced, that is, the required deceleration curve is predicted based on the current crossing speed and target position, so that the motor smoothly decelerates to near zero speed before entering position holding, avoiding overshoot.
[0108] If the travel time exceeds the preset maximum travel time T max If the value is calculated from the maximum blind zone angle and the minimum crossing speed, then an abnormality (such as mechanical jamming) is considered to have occurred, the drive is immediately stopped and the fault is reported.
[0109] It should be further explained that the region division based on hardware characteristic parameters is achieved through the storage of P. +boundary and P -boundaryThe continuous position space is divided into three regions with clear physical meaning (forward engagement zone, blind zone, and reverse engagement zone). This division breaks down the complex commutation process into independently processable stages, enabling the control system to understand the current position relative to the mechanical clearance, providing prior knowledge for subsequent decisions, and simplifying the control logic.
[0110] The joint determination of the force direction and the target direction is achieved by introducing the current force direction identifier (Force). curr The system can determine the current tooth surface contact state. When the target direction is consistent with the force direction, it indicates that there is no need to change the meshing side, and position control can be performed directly; when they are opposite, it indicates that the system is about to enter a return loop and requires special handling. This determination avoids unnecessary blind zone crossings and improves control efficiency.
[0111] The high-speed crossing mode is designed for conditions requiring the crossing of blind zones, employing open-loop high-speed, low-torque control. Open-loop control ensures deterministic crossing speed, while low torque limits the impact energy at the moment of contact. This mode compresses the impact of blind zones in the time dimension, minimizing commutation lag.
[0112] Precise entry and seamless switching are achieved by setting a boundary threshold ε, allowing the system to switch to closed-loop control before physical contact occurs, utilizing the adjustment capability of PID control to achieve smooth engagement. Seamless switching requires precise synchronization between real-time encoder feedback and PID calculation to ensure continuous control at the moment of switching.
[0113] The adaptive adjustment of the crossing speed enables the system to adapt to servos with different clearance sizes; speed feedforward suppresses commutation shock; and the fault protection mechanism ensures the robustness of the system.
[0114] The above five features form a complete control chain of "perception → decision-making → execution → optimization → protection". Each link in the chain depends on the output of the preceding link, and the links reinforce each other to achieve seamless switching, precision maintenance and long-term adaptation.
[0115] It should be further explained that this invention addresses the issue of worm gears needing to maintain clearance to ensure mechanical reliability, but this clearance also leads to commutation lag, through time separation. During the extremely short time of commutation, the system virtually eliminates the clearance in a high-speed pass-through mode (manifesting as clearance-free at the control level); during steady-state operation, the clearance physically exists to ensure lubrication and thermal deformation margins. This separation of the time dimension allows conflicting requirements to be met within the same system.
[0116] It should be noted that the encoder is not only used for position feedback, but also for storing mechanical fingerprints and serving as a real-time monitoring tool during the crossing process; the motor current signal is not only used for driving, but also implies information on the direction of force (inferred from the direction of the current); the non-volatile memory not only stores the program, but also permanently saves individual characteristic parameters.
[0117] It should be noted that mechanical characteristic parameters are extracted and stored in advance during the calibration phase, enabling predictive control based on prior knowledge during the operation phase, rather than reactive response. This pre-emptive action gives the system predictive capabilities.
[0118] It should be noted that the crossing speed is dynamically adjusted according to the magnitude of the backflip difference, enabling different servos to achieve the optimal hysteresis-smoothness tradeoff; the adaptive update mechanism further optimizes the control parameters as wear changes. This dynamism ensures that the system maintains high performance throughout its entire lifecycle.
[0119] It should be noted that in high-speed traversal mode, real-time position feedback is used to monitor whether the vehicle is on the boundary; once the threshold is reached, mode switching is triggered. This closed-loop feedback ensures the accuracy of the switching. Simultaneously, the determination of the force direction relies on current feedback, forming another closed loop.
[0120] In existing technologies, fixed dead-zone compensation is used. A fixed dead-zone time or angle is set in the control algorithm. When commutation is detected, the motor first idles for this fixed value before entering the closed loop. Limitations: The fixed value cannot match individual differences, resulting in over- or under-compensation; it cannot adapt to wear changes; and hysteresis still exists.
[0121] Incremental encoder-based filtering compensation utilizes the incremental encoder feedback to predict and compensate for gaps using an algorithm. Limitations: the incremental encoder loses its position when power is off, requiring a zeroing process upon each power-on; compensation is based on historical data prediction, resulting in accumulated errors and hysteresis.
[0122] Mechanical backlash elimination structures use double-lead worm gears and spring preload to eliminate backlash. Limitations: complex structure, high cost, large space occupation, and increased wear due to preload, making them unsuitable for prolonged underwater operation.
[0123] Traditional PID control directly employs PID control without any special treatment for the backlash. The commutation lag is entirely determined by the mechanical characteristics, resulting in limited accuracy.
[0124] Existing technologies cannot accurately determine the current position relative to the clearance boundary, and can only blindly compensate. This invention utilizes stored absolute boundary positions to divide the position space into engagement zone and blind zone, enabling the control system to predict when to enter the blind zone and when to exit, thereby taking targeted measures.
[0125] Existing technologies typically only consider the target direction and ignore the current tooth surface contact side. This invention introduces the concept of force direction to determine whether a reversal is needed, avoiding unnecessary blind zone crossings (for example, when moving back and forth within a small range, if the engagement has not been disengaged, the direction can be reversed directly without entering the blind zone).
[0126] Existing compensation technologies mostly employ a single mode (such as fixed dead zone compensation). This invention addresses the special operating conditions within the blind zone by employing an open-loop high-speed crossing for rapid passage, then seamlessly switching to closed-loop precise control when reaching the boundary, thus balancing speed and accuracy. The timing of the switch between open-loop and closed-loop control is precisely controlled by real-time position, avoiding impact.
[0127] Existing technologies typically use fixed compensation parameters. This invention dynamically adjusts the crossing speed based on the actual backhaul difference, minimizing and maintaining stability of the lag time, thus demonstrating system-level optimization.
[0128] In existing technologies, switching often leads to sudden speed changes, affecting trajectory smoothness and mechanical lifespan. This invention introduces speed feedforward at the moment of switching, enabling the motor to decelerate smoothly and avoiding overshoot.
[0129] This invention, due to its high-speed traversal mode, compresses blind zone traversal time to the millisecond level, increasing output shaft response speed by over 80%, resulting in seamless commutation. The precise engagement mode ensures smooth tooth surface contact, avoiding overshoot and oscillation caused by impact, and improving repeatability by over 60%. Combined with an adaptive update mechanism, control parameters are dynamically optimized with wear, ensuring system accuracy does not decrease over time. It fully utilizes existing servo hardware (absolute encoder, current sampling, non-volatile memory), achieving a performance leap solely through software algorithms, resulting in extremely high cost-effectiveness. The mechanical system maintains optimal clearance to ensure lubrication and thermal deformation margins, and control compensation compensates for clearance defects, resolving the contradiction between accuracy and reliability in traditional designs. Adaptive traversal speed and dynamic parameter updates enable the system to adapt to clearance fluctuations caused by temperature changes, aging, and other factors, maintaining stable performance under different environmental conditions. It is not only applicable to underwater servos but can be extended to any servo system using worm gear drives and equipped with absolute encoders, such as industrial robot joints, aerospace servos, and precision rotary tables. If the time travel is abnormal or the update frequency is too high, the system can provide early warnings of excessive wear or potential faults, enabling predictive maintenance and reducing downtime risks.
[0130] Furthermore, in some embodiments of the present invention, in step S3, after the servo motor completes its initial calibration and enters long-term operation, the tooth backlash of the mechanical system will slowly change due to factors such as tooth surface wear, temperature changes, and changes in lubrication conditions. To ensure that the compensation strategy always matches the actual mechanical state, a self-test is automatically performed during the servo motor's idle period or at a preset cycle to measure the current backlash difference in real time and dynamically update the stored hardware characteristic parameters.
[0131] Furthermore, in some embodiments of the present invention, in step S3, the control system maintains the following triggering conditions, and initiates a self-test program when any one of them is met:
[0132] Idle period trigger: When the servo motor is continuously active for time T idle If no new rudder angle command is received and the output shaft position fluctuation is less than the stationary judgment threshold δ (e.g., a position change of less than 0.1° for 5 consecutive seconds), the servo is determined to be in an idle state and a self-check is automatically triggered. This mechanism utilizes normal operating intervals and does not affect task execution.
[0133] Periodic triggering: Based on the cumulative running time or calendar time, for example, every T cumulative runs... cycle A self-check is triggered at the next idle time, either every hour (e.g., 100 hours) or every fixed calendar time (e.g., weekly). If there is no idle time for an extended period, it is forced to execute during low-load periods (e.g., task breaks).
[0134] Temperature change trigger: When the temperature sensor detects an ambient temperature change exceeding a preset temperature ΔT th (e.g., at 20℃) a self-test is triggered to compensate for gap changes caused by thermal expansion;
[0135] Command Trigger: Receives a self-test command from the host computer and executes it immediately;
[0136] Before the self-check begins, the system records the current target location and status to ensure recovery after the self-check is completed. The system ensures that the self-check is executed automatically at the appropriate time, without affecting normal tasks, while also responding promptly to environmental changes. The triggering mechanism is the initiator of the self-check, determining the timeliness and availability of updates.
[0137] Furthermore, in some embodiments of the present invention, in step S3, the self-test program drives the motor to make the output shaft perform reciprocating motion within a preset small angle range, with the specific parameters as follows:
[0138] The range of motion is ±5° (which can be adjusted according to the total travel of the servo motor, generally taking 10% to 20% of the total travel), ensuring that the range of motion covers the blind zone and does not touch the mechanical limit;
[0139] The movement speed is 10% to 20% of the rated speed, at a low speed to ensure measurement accuracy and avoid impact;
[0140] The number of reciprocating measurements is 3, and random errors are eliminated by averaging multiple measurements.
[0141] The motion trajectory is as follows: the output shaft starts from the current position (or from the center of the blind zone), moves forward first, then moves in the opposite direction, and then moves forward back to the starting point, completing one reciprocating cycle. Within each reciprocating cycle, the output shaft crosses the blind zone twice, generating two forward engagement events and two reverse engagement events.
[0142] Furthermore, in some embodiments of the present invention, in step S3, during the self-test motion process, the control system synchronously acquires real-time absolute position sequence P(t) and motor current I(t) (reflecting load torque) data at a high frequency (e.g., 2kHz).
[0143] After filtering the current signal I(t), its rate of change dI / dt is calculated. When dI / dt exceeds the positive threshold, this moment is recorded as the engagement start time t. engage When dI / dt is detected to be lower than the negative threshold, it is recorded as the time of departure.
[0144] Its t engage Mapping to the real-time absolute position sequence P(t), the meshing start point of this reciprocating motion is obtained. For the k-th reciprocating motion, the forward meshing start point P is recorded. + k and the starting point of reverse meshing P - k , where k is a natural number.
[0145] Furthermore, in some embodiments of the present invention, in step S3, the collected multiple reciprocating data undergoes post-processing, which includes the following steps:
[0146] Step S31: For the k-th reciprocating motion, record the forward engagement start point P. + k and the starting point of reverse meshing P - k Calculate the forward engagement initiation point P respectively. + k and the starting point of reverse meshing P - k The arithmetic mean and standard deviation are calculated. If the deviation of a measurement exceeds 3 times the standard deviation, or if the current waveform shows an abnormal spike (such as the rate of change exceeding the preset protection threshold), the data is determined to be interfered with or abnormal and is discarded, and will not be included in subsequent calculations.
[0147] Step S32: After removing outliers, let the number of valid measurements be M (each reciprocating cycle can generate two forward and two reverse meshing events), where M is twice a natural number. Calculate the average of the valid data as the measurement result of this self-test, from the 1st reciprocating cycle to the kth reciprocating cycle, accumulating the forward meshing start point P. + k Calculate the average value to obtain the positive engagement initiation point P. , +boundary From the first reciprocating motion to the kth reciprocating motion, the cumulative reverse engagement starting point P - k Find the average value to obtain the reverse meshing starting point P. ,-boundary ;
[0148] Step S33: Calculate the current return difference R based on the average value. , The corresponding encoder pulse count:
[0149] R , =|P , +boundary -P , -boundary |
[0150] Among them, P , +boundary P is the starting point of the positive engagement of the average value. , -boundary The starting point of the reverse meshing of the average value;
[0151] Step S34, measure and calculate the current return difference R , The relative deviation ΔR is calculated by comparing it with the number of encoder pulses R currently stored in the non-volatile memory:
[0152] ΔR = |R , -R|÷R×100%
[0153] Where, ε update As a preset update threshold, if ΔR ≥ ε update If the deviation is 10%, it indicates a significant change in the mechanical clearance, requiring parameter updates. Simultaneously, record the direction of the deviation: if R... , >R indicates an increase in clearance (usually caused by wear). If R , <R indicates a reduction in clearance (possibly due to contamination, thermal expansion, or assembly stress release). In addition to threshold judgment, trend analysis can be combined: if multiple consecutive self-inspections show changes in the same direction and the cumulative change exceeds the threshold, for example, an increase of more than 3% each time for three consecutive times, accumulating to more than 10%, an update is triggered even if the threshold is not reached in a single instance, in order to adapt to progressive wear in advance;
[0154] Step S35: Write the new set of feature parameters, along with the current timestamp and temperature value (if a temperature sensor is present), into the backup area of the non-volatile memory.
[0155] The data in the backup area is read and compared with the value in memory to verify that the write is correct.
[0156] The parameter pointer of the primary storage area is set to the backup area, or the data in the backup area is copied to overwrite the primary area; a dual backup mechanism is adopted (the primary area and the backup area are used alternately) to prevent data corruption or loss due to unexpected power outages during the update process;
[0157] Update events are recorded in the log area, including old values, new values, deviations, temperatures, and times, for subsequent maintenance and analysis.
[0158] Step S36: If a new rudder angle command is received during the self-test, the self-test should be immediately stopped, the current motion smoothly exited, and the system switched to normal operating mode to respond to the command. The self-test status flag should be cleared, and the test should be retried when the system is idle. During the self-test, the current and position should be monitored in real time. If the current exceeds the safety threshold (e.g., 150% of the rated current) or the position is at a mechanical limit (e.g., the distance limit is less than the preset safety margin), the drive should be stopped immediately and a fault reported to avoid damage to the mechanical structure. If the duration of a single self-test exceeds the preset maximum time (e.g., 10 seconds), the self-test should be forcibly exited to avoid prolonged system occupation.
[0159] Step S37: After the self-test is completed normally, the system clears the self-test flag and can slowly return the output shaft to the target position recorded before the self-test (or keep it at the current position) as needed, and then enters standby mode to wait for subsequent instructions. If the self-test exits prematurely due to an interruption, it directly restores to the control state before the interruption.
[0160] It should be noted that technical features that are not fully explained will be addressed using conventional technical methods.
[0161] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described herein. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the specific embodiments described above. Therefore, any modifications or equivalent substitutions to the present invention, as well as all technical solutions and improvements that do not depart from the spirit and scope of the invention, are covered within the scope of the claims of the present invention.
Claims
1. A method for eliminating backlash error in underwater servo motors based on adaptive compensation using mechanical feature codes, characterized in that: It includes the following steps: Step S1: During the calibration phase after the servo motor assembly is completed, the control system drives the motor to rotate the output shaft in the positive direction to the mechanical limit position, and records the first boundary position value P output by the absolute encoder. +max Then drive it in the opposite direction to the mechanical limit position on the other side, and record the second boundary position value P. -max During forward and reverse rotation, encoder data and motor current signals are continuously acquired to identify the transition range from disengagement to re-engagement of the worm gear teeth, and the forward engagement start point P is extracted. +boundary and the starting point of reverse meshing P -boundary Calculate the encoder pulse number R = |P| corresponding to the hysteresis difference. +boundary -P -boundary |; its boundary values and pulse count are used as hardware characteristic parameters of the servo and written into the non-volatile memory of the control module; Step S2, during normal operation, the control system reads the current absolute position P of the absolute encoder in real time. curr When the rudder angle command P is received target Then, the direction of motion is calculated and the relationship between the current position and the stored hardware feature parameters is determined; Step S3: During the servo motor's idle period or according to a preset cycle, the self-test program is automatically executed. During the self-test, the drive motor causes the output shaft to reciprocate within a small angle range. The encoder provides feedback to measure the current backlash range in real time and calculates the current backlash R. , ; The current return difference R , If the error exceeds a preset threshold, the hardware characteristic parameters in the non-volatile memory are automatically updated to ensure that the compensation strategy always matches the current mechanical state.
2. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 1, characterized in that, In step S1, the engagement start point is identified by continuously acquiring encoder data and motor current signals, which includes: The drive motor causes the output shaft to move from P +max To P -max The motor rotates continuously at a constant speed, and the real-time absolute position sequence P(t) and the real-time motor current signal I(t) are synchronously acquired at a sampling frequency of not less than 1kHz. Analyze the local rate of change of I(t) to identify the moment t when the current jumps from a low level to a high level. + and the time t when the voltage drops from high to low. − ; t + and t − Mapped to the synchronously acquired real-time absolute position sequence P(t), the position corresponding to the current jump during the forward motion is the forward engagement initiation point P. +boundary The position corresponding to the current jump during the reverse motion is the reverse engagement initiation point P. -boundary .
3. The underwater servo motor backlash elimination method based on adaptive compensation of mechanical feature codes according to claim 1 or 2, characterized in that, In step S2, the relationship between the current position and the stored hardware characteristic parameters is determined as follows: based on the current absolute position P curr With the forward engagement starting point P +boundary and the starting point of reverse meshing P -boundary Based on the numerical relationship, the system divides the current position into a forward engagement zone, a reverse engagement zone, and a blind zone. In the forward meshing zone, the worm gear is in a forward meshing state, and the parameter relationship in the forward meshing zone is as follows: P curr ≥P +boundary ; In the reverse meshing zone, the worm gear is in a reverse meshing state, and the parameter relationship in the reverse meshing zone is as follows: P curr ≤P -boundary ; In the blind zone, the worm gear is disengaged, and the parameter relationship in the blind zone is as follows: P -boundary <P curr <P +boundary 。 4. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 3, characterized in that, In step S2, during the execution of control input and state initialization logic, the control system reads the current absolute position P output by the absolute encoder in real time at a fixed control cycle. curr And receive the target rudder angle command P issued by the host computer. target The system maintains the following state variables internally: Current direction of motion indicator Dir curr The target location is determined by comparing the current command with the target location of the previous command. curr Defined as: Dir curr =sign(P curr -P prev ) Among them, P prev The position value of the previous control cycle is given by sign(), which is the sign function and takes the value of +1, -1, or 0. Current force direction indicator (Force) curr By inferring the direction of the motor current or the historical direction of motion, Force curr Defined as: Force curr =sign(I q ) Among them, I q This refers to the torque current component of the motor, whose sign corresponds to the direction of the motor's output torque, thus reflecting the force-bearing side of the tooth surface. When the motor drives the load in the forward direction, the forward side of the tooth surface is in contact, and the force... curr =+1; During reverse drive, Force curr =-1; When the motor is stationary or in a zero-torque state, Force curr =0 indicates that the tooth surface is in a free state; Target movement direction Dir target Defined as: Dir target =sign(P target -P curr ) Among them, P target The target rudder angle command issued by the host computer.
5. The underwater servo motor backlash elimination method based on adaptive compensation of mechanical feature codes according to claim 1 or 4, characterized in that, In step S2, the high-speed crossing mode specifically includes: using open-loop speed control, with the motor operating at a preset fixed speed V. cross and current limiting current I limit The operation is carried out in a direction determined by the target direction; during the traversal, the real-time absolute position sequence P(t) is continuously read and compared with the stored boundary parameters; When |P(t)-P boundary When | ≤ ε, where ε is the boundary threshold, P boundary This is the starting point of engagement, indicating that the engagement zone is about to begin.
6. The underwater servo motor backflip error elimination method based on mechanical feature code adaptive compensation according to claim 5, characterized in that, In step S2, a fixed speed V is preset. cross The crossing speed is dynamically adjusted based on the number of backflash pulses R: when R increases, the crossing speed is increased; when R decreases, the crossing speed is decreased.
7. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 1, characterized in that, In step S3, the control system maintains the following triggering conditions, and a self-test program is initiated when any one of them is met: Idle period trigger: When the servo motor is continuously active for time T idle If no new rudder angle command is received and the fluctuation of the output shaft position is less than the static judgment threshold δ, the servo is determined to be in an idle state and a self-test is automatically triggered. Periodic trigger: Based on the cumulative running time or calendar time, a self-check is triggered during the next idle time after the cumulative running time or after a fixed calendar time. Temperature change trigger: When the temperature sensor detects an ambient temperature change exceeding a preset temperature ΔT th When this occurs, a self-check is triggered to compensate for gap changes caused by thermal expansion; Command Trigger: Receives a self-test command from the host computer and executes it immediately.
8. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 1, characterized in that, In step S3, the self-test program drives the motor to make the output shaft reciprocate within a preset small angle range. The specific parameters are as follows: The range of motion is ±5° to ensure that the range of motion covers the blind spot and does not touch the mechanical limit; The movement speed is 10% to 20% of the rated speed, at a low speed to ensure measurement accuracy and avoid impact; The cycle was repeated three times, and random errors were eliminated by averaging the multiple measurements. The motion trajectory is that the output shaft starts from the current position, moves forward first, then moves in the opposite direction, and then moves forward back to the starting point, completing one reciprocating cycle.
9. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 1, characterized in that, In step S3, during the self-test motion process, the control system synchronously acquires real-time absolute position sequence P(t) and motor current I(t) data at high frequency. After filtering the current signal I(t), its rate of change dI / dt is calculated; when dI / dt exceeds the positive threshold, this moment is recorded as the engagement start time t. engage When dI / dt is detected to be lower than the negative threshold, it is recorded as the time of departure. Its t engage Mapping to the real-time absolute position sequence P(t), we obtain the meshing start point of this reciprocating motion. For the k-th reciprocating motion, we record the positive meshing start point P. + k and the starting point of reverse meshing P - k , where k is a natural number.
10. The underwater servo motor backlash elimination method based on mechanical feature code adaptive compensation according to claim 1, characterized in that, In step S3, the hardware characteristic parameters in the non-volatile memory are automatically updated, including: Write the new set of feature parameters along with the timestamp to the backup area of the non-volatile memory; Perform data validation to ensure correct writing; Set the parameter pointer of the primary storage area to the backup area or copy the data from the backup area to overwrite the primary area; Record update events to the log area; If a new rudder angle command is received during the self-test, the self-test is stopped and the system switches to normal operation mode; if the current exceeds the safety threshold or the position is at the mechanical limit, the drive is stopped and a fault is reported.