Automatic calibration method for zero position of manipulator
By performing bidirectional micro-oscillation sampling and sequential Bayesian updates within the safety corridor of the robotic arm, combined with self-verification of the safety closed-loop trajectory and false alarm rate constraints, the automated and reliable calibration of the robotic arm's zero-point position was achieved. This solved the problems of line stoppage and positioning error caused by the uncertainty of zero-point recovery, and improved production stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN DIEN TESTING CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-05-15
AI Technical Summary
During the zero-point position recovery process of a robotic arm, existing technologies struggle to achieve automated and reliable zero-point recovery and drift monitoring in confined spaces and under various operating conditions, potentially leading to line stoppages, collision risks, and the accumulation of positioning errors.
By implementing bidirectional micro-oscillation sampling within the safety corridor, the encoder counts at the upper and lower edges of the switch are recorded. The midpoint posterior distribution table and confidence level are obtained using sequential Bayesian updates. The encoder reference flag count is captured and written into the axis zero bias vector. Combined with the change point detection of safety closed-loop trajectory self-verification and false alarm rate constraints, automatic zero-point calibration and drift monitoring are achieved.
It has achieved automated and reliable calibration of the robot's zero position, reduced the risk of line stoppage and collision, improved positioning consistency and cycle stability, and has the ability to continuously manage the operation period.
Smart Images

Figure CN122033952A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motion control for industrial robots, and more specifically, to a method for automatic zero-point position calibration of a robotic arm. Background Technology
[0002] In continuous production lines such as automotive parts assembly, lithium battery and semiconductor handling, and metal processing loading and unloading, robotic arms are typically deployed in enclosed or semi-enclosed units, operating across multiple shifts to perform tasks such as picking, placing, positioning, insertion, and collaborative transport. To ensure the accuracy of trajectory planning, tooling alignment, and safety limits, the control system relies on the "zero-point position" of each joint as a reference for joint angles. When events such as emergency power outages, brake holding, external force collisions, changes in reducer hysteresis, or replacement of joint modules occur, the correspondence between electrical readings and mechanical zero positions may change. The system needs to restore this correspondence before production can continue. Such events often occur at night or during unattended periods, and the unit space is limited, with a high risk of interference. If the zero-point restoration is not timely or reliable, it may lead to a decrease in cycle time, tooling collisions, accumulation of repeated gripping deviations, equipment alarms and line stoppages, and difficulties in subsequent quality traceability. On production lines with multi-station cycle time coupling, a single machine stoppage may also trigger a coordinated stoppage in upstream and downstream systems.
[0003] In existing technologies, zero-point recovery typically establishes a reference position based on a zero-return reference and position sensor signals, and writes the joint zero offset using encoder reference marks or absolute value information. In some cases, external gauges or maintenance tools are also needed to align the mechanical zero position. For systems using incremental encoders, the absolute position needs to be recovered via reference marks after power-on. For systems using absolute encoders, the position may still be affected by factors such as external force movement during power outages, brake slippage, power supply maintenance, or multi-turn information management, triggering unreliable position processing procedures. Due to the combined effects of the zero-return reference, installation tolerances, switch switching characteristics, mechanical clearances and load conditions, temperature, and lubrication conditions, the zero-point recovery results may exhibit batch differences or drift over time. Furthermore, to balance safety and repeatability, the zero-return process often requires setting search windows, speeds, and multiple judgment conditions, and relies on manual experience or repeated operations in case of anomalies. For closed-cell and multi-axis collaborative scenarios, the aforementioned uncertainties amplify the conservatism of path planning and interference judgment, making it difficult to stably embed the recovery process into the production cycle, and lacking objective criteria for determining the reliability of the zero point.
[0004] However, without significantly increasing on-site hardware and human intervention, how can we achieve automatic recovery and reliability determination of the robot's joint zero point under confined space and multi-condition disturbances, so that zero bias writing, operation verification and drift monitoring have consistent criteria, thereby avoiding line stoppage, collision risks and positioning error accumulation caused by zero point uncertainty?
[0005] To address the aforementioned problems, a technical solution is provided. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an automatic zero-point position calibration method for a robotic arm. This method involves bidirectional micro-oscillation sampling of the zero-return switch switching area within a safe corridor, recording encoder counts corresponding to the upper and lower edges of the switch, and performing sequential Bayesian updates to obtain a midpoint posterior distribution table and confidence level. Based on the midpoint posterior distribution table, a midpoint estimate and a high-density interval are obtained. Within the high-density interval, encoder reference flag counts are captured, and electrical reference flag counts are selected according to consistency probability. The zero-bias vector is calculated and written to the axis. The method then writes the trailing edge safety closed-loop trajectory for self-verification and jointly fine-tunes the axis zero-bias vector. Finally, the zero-bias version, confidence level, and hysteresis width statistics are versioned and archived, and drift is determined using change point detection constrained by the false alarm rate, triggering rollback and recalibration to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: S1: In the safety corridor, bidirectional micro-oscillations cross the zero-return switch switching area, record the encoder counts at the upper and lower edges of the switch, and sequentially update the midpoint position and hysteresis width of the switching area using Bayesian methods to obtain the midpoint posterior distribution table and confidence level. S2: Obtain the midpoint estimate and high-density interval from the midpoint posterior distribution table, capture the encoder reference flag count in the high-density interval, select the electrical reference flag count according to the consistency probability and write it into the shaft zero bias vector; S3: After writing the axis zero bias vector, return to the initial attitude along the safe closed-loop trajectory, collect the closed-loop residual and drive current to construct the sequential likelihood ratio, and fine-tune the axis zero bias vector in the feasible region of the high-density interval when the sequential likelihood ratio is improved. S4: Write the axis zero bias vector, confidence level, hysteresis width statistic and sequential likelihood ratio into the version record unit, and determine the drift by the change point detection of the false alarm rate constraint parameter alpha. When drift occurs, revert to the baseline version and trigger the recalibration process.
[0008] Furthermore, step S1 includes: bidirectional micro-oscillations crossing the zero-return switch transition area in alternating directions within the safety corridor; latching the corresponding encoder count and incorporating it into the sequence when the upper and lower edges of the zero-return switch satisfy the constant debounce holding time; and adjusting the micro-oscillation amplitude and sampling number based on the incremental confidence level after each update of the midpoint posterior distribution table.
[0009] Furthermore, step S1 also includes: sequential Bayesian update using the midpoint position and hysteresis width of the transition region as latent content, using the grid probability quality representation of the midpoint posterior distribution table discrete by encoder count and initializing it with a uniform distribution, and updating the grid probability quality only with the observed edges and normalizing it when the upper or lower edge is missing, so that the sum of the grid probability quality remains one.
[0010] Furthermore, step S2 includes: the high-density interval is obtained by sorting the grid probability quality of the midpoint posterior distribution table from high to low and accumulating it, and stopping when the accumulated probability quality reaches one minus the upper limit of the allowable erroneous decision probability; when there are ties in probability quality in the sorting, the midpoint candidate value that is closer to the midpoint estimate is included first, and the minimum and maximum counts of the midpoint candidate values corresponding to the grid cells to be included are taken at the boundary of the high-density interval.
[0011] Furthermore, step S2 also includes: the capture of encoder reference flag counts introduces a hysteresis width estimate and a counting resolution unit to generate a scanning interval based on the high-density interval, and clips the scanning interval between the lower limit count of the safety corridor and the upper limit count of the safety corridor; the reference flag is determined to be valid by the reference flag debouncing holding time constant, and a reference flag count sequence is formed after repeated triggering and deduplication within the same control cycle.
[0012] Furthermore, step S2 also includes: when calculating the consistency probability for candidate reference mark counts, first determine the nearest midpoint candidate value for each candidate reference mark count, then sum the probability quality of all hysteresis width candidate values corresponding to the midpoint candidate value in the midpoint posterior distribution table to form a consistency probability quality score, and select the one with the largest score as the electrical reference mark count.
[0013] Furthermore, when the consistency probability quality score is tied for the highest, the candidate reference flag count with the smallest count distance from the midpoint estimate is used as the priority criterion, and a reverse scan retest is performed to form a second reference flag count sequence; the consistency probability quality score is recalculated among the candidates in both sequences and the electrical reference flag count is locked, and the candidate set before locking and the consistency probability quality score sequence are written into the calibration log entry.
[0014] Furthermore, step S3 includes: dividing the safe closed-loop trajectory into segments by segment number and configuring the set of joint axes participating in the excitation, allowing only the target count command of the joint axes participating in the excitation to change monotonically within the segment; aligning the closed-loop residual with the driving current sample value by segment number, and summing the product of the absolute value of the driving current sample value and the absolute value of the target count increment according to the segment to obtain the segment energy, and then subtracting it from the segment energy of the baseline version to obtain the segment energy difference value.
[0015] Furthermore, step S3 also includes: the sequential likelihood ratio is represented by the logarithmic sequential likelihood ratio accumulation; for each control cycle, the logarithm of the ratio of the closed-loop residual likelihood term to the baseline version closed-loop residual likelihood term is weighted and summed with the logarithm of the segment energy difference likelihood term; and the axis zero bias vector is updated one axis at a time with the counting resolution unit as the step size. The updated axis zero bias component is constrained by the feasible region derived from the high-density interval boundary and the electrical reference flag count.
[0016] Further, step S4 includes: the version recording unit writes the axis zero bias vector, electrical reference flag count, confidence level and hysteresis width estimate by joint axis number, and writes the hysteresis width marginal probability quality distribution obtained by summing along the midpoint candidate value direction from the midpoint posterior distribution table, and writes the log-sequential likelihood ratio accumulation, version confidence identifier and baseline version identifier at the same time; the change point detection determines the drift and triggers backoff and recalibration by using the boundary function derived from the false alarm rate constraint parameter alpha.
[0017] The technical effects and advantages of the automatic zero-point position calibration method for robotic arms of the present invention are as follows: This invention uses the edge counting of the zero-return switch as the entry point, and sequentially updates the midpoint position of the transition zone and the hysteresis width to form a traceable probability distribution and reliability. Based on this, the search range of the reference flag is limited, and the count of the electrical reference flag is locked using consistency probability before being written into the axis zero bias vector. This transforms the jitter, hysteresis, and assembly differences during the zero-return process into a unified data basis, so that zero-point determination no longer relies on fixed windows and experience-based judgments. The zero bias writing has a clear source of evidence and verifiable records, adapting to the stable start-stop requirements in confined spaces and unattended scenarios.
[0018] After zero-bias writing, this invention introduces a safety closed-loop trajectory self-verification mechanism. It constructs a sequential likelihood discrimination by integrating closed-loop residuals and drive current evidence, performs joint fine-tuning of the axis zero-bias vector under feasible region constraints, and writes the zero-bias version, confidence level, hysteresis width statistics, and self-verification evidence into the version recording unit. It uses false alarm rate-constrained change point detection to determine drift, automatically reverting and triggering recalibration upon drift. This closed loop enables continuous operational control of zero-point recovery, allowing for timely identification of reference offsets and restoration of usable versions under changing operating conditions, thereby reducing the risk of line stoppages and collisions and improving alignment consistency and cycle stability. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the automatic zero-point position calibration method for the robotic arm according to the present invention. Detailed Implementation
[0020] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1: Figure 1 The present invention provides an automatic zero-point position calibration method for a robotic arm, comprising: S1: In the safety corridor, bidirectional micro-oscillations cross the zero-return switch switching area, record the encoder counts at the upper and lower edges of the switch, and sequentially update the midpoint position and hysteresis width of the switching area using Bayesian methods to obtain the midpoint posterior distribution table and confidence level. When the joint axis is within the safety corridor, the controller repeatedly crosses the switching zone of the zero-return switch with low-speed, small-amplitude bidirectional micro-oscillations. Each time, it only collects the time of the upper and lower edges of the switch and the corresponding encoder counts, and sequentially updates the midpoint position and hysteresis width of the switching zone as implicit content to obtain the probability distribution and reliability of the midpoint. At the same time, it automatically adjusts the oscillation amplitude and sampling number according to the degree of distribution convergence, so that the sampling naturally stops when the information gain tends to saturate, avoiding ending with a fixed number of times or a fixed window, and uses the statistical stability of the hysteresis width as the basis for subsequent health assessment.
[0022] S2: Obtain the midpoint estimate and high-density interval from the midpoint posterior distribution table, capture the encoder reference flag count in the high-density interval, select the electrical reference flag count according to the consistency probability and write it into the shaft zero bias vector; For each axis, the most likely midpoint estimate is obtained based on the midpoint probability distribution, and a short-stroke search is performed within the high-density interval of this distribution to capture the encoder reference flag. When there are multiple candidate reference flags, the consistency probability between each candidate and the midpoint distribution is calculated and sorted, and only the candidate with the highest posterior probability and cross-cycle stability is selected as the electrical reference. Subsequently, the axis zero bias is calculated based on the relationship between this reference and the current count and written into the zero bias vector. At the same time, the candidate set and its probability are archived together, so that subsequent anomalies can be directly recovered based on historical posteriors without having to rely on manual experience to set the search boundary again.
[0023] S3: After writing the axis zero bias vector, return to the initial attitude along the safe closed-loop trajectory, collect the closed-loop residual and drive current to construct the sequential likelihood ratio, and fine-tune the axis zero bias vector in the feasible region of the high-density interval when the sequential likelihood ratio is improved. After writing the zero bias, the controller drives the robot to execute the pre-stored safe closed-loop trajectory and return to the initial posture. The trajectory is designed with small displacement and multi-axis time-division excitation to improve the zero bias recognition. The encoder closed-loop residual and drive current waveform are collected and time-aligned to construct the sequential likelihood gain of the current zero bias hypothesis relative to the previous reliable version. Only when the likelihood gain is positive and continuously accumulates is the zero bias vector jointly fine-tuned. The fine-tuning solution incorporates amplitude constraints and smoothing constraints to avoid over-correction. This mechanism uses probability gain instead of hard threshold judgment, thereby reducing mis-tuning parameters caused by load, temperature and friction changes.
[0024] S4: Write the axis zero bias vector, confidence level, hysteresis width statistic and sequential likelihood ratio into the version record unit, and determine the drift by the change point detection of the false alarm rate constraint parameter alpha. When drift occurs, revert to the baseline version and trigger the recalibration process.
[0025] The distribution characteristics of zero-bias version, confidence, hysteresis width statistics, and closed-loop residuals are archived in a versioned manner, and the statistical sequence is monitored online using change point detection with alpha-controlled false alarm rate. Once a structural change in the distribution is detected, instead of directly judging the fault with a fixed angle threshold, it automatically reverts to the most recent confident version and triggers a recalibration process. At the same time, the likelihood comparison before and after the revert is written to the log for traceability. When drift continues to occur, the amount of sampling information is automatically increased to improve the posterior confidence, and when the environment returns to stability, it automatically converges to the minimum action, realizing the linkage optimization of sampling-writing-self-verification-revert as a whole.
[0026] This invention establishes a unified data link around the reliability of the entire process of zero-point recovery of the robotic arm, so that zero-point acquisition, reference locking, operation self-certification and drift handling form a closed loop, and maintains traceability and reusability under confined space and multi-condition disturbance.
[0027] Step S1 involves bidirectional micro-oscillation across the zero-return switch transition zone within the safety corridor, acquiring encoder count sequences corresponding to the upper and lower edges of the switch, and sequentially updating the midpoint position and hysteresis width of the transition zone as latent content to form a midpoint posterior distribution table and confidence level. Simultaneously, the oscillation amplitude and sampling count are automatically adjusted based on distribution convergence. This process transforms discrete triggering information into a computable probability structure, ensuring a consistent expression of zero-point information and reducing reliance on fixed windows and human experience.
[0028] Step S2 generates midpoint estimates and high-density intervals using the midpoint posterior distribution table. Within these intervals, a short-range reference marker search is performed to obtain a reference marker count sequence. Candidate reference marker counts are then sorted using a consistency probability quality score to lock the electrical benchmark reference marker counts. The axis zero-bias vector is calculated and written, while the candidate set and score sequence are recorded. This process bases the selection of the electrical benchmark on interpretable probabilistic evidence, ensuring the uniqueness and traceability of the zero-bias writing.
[0029] Step S3 drives the robotic arm to execute a safe closed-loop trajectory and return to its initial posture, forming a closed-loop residual sequence and segment energy difference. Based on this, a log-sequential likelihood ratio accumulation is constructed to determine the interpretability of the axis zero-bias vector for the observations. When the evidence shows improvement, joint fine-tuning is performed according to the counting resolution unit and constrained by the feasible region derived from the high-density interval. This process transforms the zero-point recovery results into continuous self-verifying evidence at the operational level, providing a more stable benchmark support for the path and alignment within the confined space.
[0030] Step S4 constructs drift statistics using the version record unit archive axis zero bias vector, electrical reference flag count, confidence level, hysteresis width marginal probability mass distribution, and log-sequential likelihood ratio accumulation. A boundary function derived from the false alarm rate constraint parameter alpha is used to complete drift discrimination, triggering backtracking and recalibration. The drift intensity is mapped to the next round of micro-oscillation amplitude count by adjusting the sampled information content. This process enables long-term operation management of the zero-point reference, providing a backtrackable path for anomalies and unifying recovery actions and risk constraints into a single evidence system.
[0031] When a production line robot enters the zero-return phase after an emergency stop, power outage, or external disturbance, the joint axis needs to complete zero-point recovery within a confined space. Hysteresis and jitter in the zero-return switch transition area can cause unstable offsets in the encoder counts corresponding to the edges, resulting in a lack of consistent basis for zero-bias writing. The task of step S1 is to convert the zero-return switch edge timing sequence and encoder count sequence into a reusable midpoint posterior distribution table and confidence level, and simultaneously provide midpoint estimates and hysteresis width estimates, so that subsequent reference flag searches and zero-bias writing have the same data foundation and traceability.
[0032] S101: Micro-oscillation input construction and safety corridor constraints.
[0033] The joint axis number identifies the single joint axis being processed. The encoder count represents the discrete count value of the current position of the joint axis. The lower and upper bound counts of the safety corridor define the counting range that allows for zero-return motion. The micro-oscillation center count is defined as the center of symmetry of the reciprocating motion, and the micro-oscillation amplitude count is defined as the distance from the center to the target counts at both ends. The reciprocating phase markers are arranged alternately with positive and negative phases, so that each phase segment corresponds to a monotonic motion direction. The target count command for each phase segment is equal to the algebraic synthesis of the micro-oscillation center count and the micro-oscillation amplitude count, and the synthesis direction is given by the reciprocating phase markers. The micro-oscillation center count and the micro-oscillation amplitude count need to satisfy the boundary relationship: the micro-oscillation center count minus the micro-oscillation amplitude count is not less than the lower bound count of the safety corridor, and the micro-oscillation center count plus the micro-oscillation amplitude count is not greater than the upper bound count of the safety corridor. The motion speed is constrained by the control cycle. Within the control cycle, the encoder count increment does not exceed the counting resolution unit, making the quantization error between the edge latch count and the actual conversion count controllable.
[0034] S102: Edge validity determination and observation sequence formation.
[0035] The latching times at the rising and falling edges of the homing switch represent the effective toggling times of the homing switch from off to on and from on to off, respectively. The latching counts at the rising and falling edges represent the encoder counts latched within the corresponding control cycle. Edge validity is determined using a constant debouncing hold time, which represents the minimum duration for which the homing switch needs to maintain the new state after an edge occurs. Only when the duration reaches the constant debouncing hold time is the edge latching count recorded as a valid observation.
[0036] Each phase segment allows recording one valid upper edge and one valid lower edge. After recording, repeating the same type of flip within the same phase segment is ignored until the next phase segment begins. If a micro-oscillation only yields an upper edge latch count and not a lower edge latch count, the observation sequence contains only the upper edge latch count. If a micro-oscillation only yields a lower edge latch count and not an upper edge latch count, the observation sequence contains only the lower edge latch count. This observation sequence serves as input data for updating the posterior distribution table. When observations are missing, the corresponding one-sided update rule is used to continue the recursion.
[0037] S103: Discrete representation and sequential update of the midpoint posterior distribution table.
[0038] The midpoint of the switching zone is defined as the geometric midpoint of the two switching boundaries of the zero-return switch switching zone. The hysteresis width is defined as the distance between the two switching boundaries in the encoder counting coordinates; both are in encoder counts. The midpoint candidate sequence is formed by enumerating the counts from the lower boundary to the upper boundary of the safety corridor point by point according to the counting resolution unit. The hysteresis width candidate sequence is formed by enumerating the counts from the starting point of the counting resolution unit to the span of the safety corridor point by point according to the counting resolution unit. The posterior distribution table is defined as a two-dimensional discrete quality table, where each item corresponds to the joint probability quality of a midpoint candidate value and a hysteresis width candidate value. The initial posterior distribution table is uniformly distributed, ensuring that each candidate combination has the same initial quality and the total quality of the entire table is one.
[0039] For any candidate combination, the candidate lower boundary count is equal to the midpoint candidate value minus half of the hysteresis width candidate value, and the candidate upper boundary count is equal to the midpoint candidate value plus half of the hysteresis width candidate value. The upper edge observation residual is defined as the upper edge latch count minus the candidate lower boundary count, and the lower edge observation residual is defined as the lower edge latch count minus the candidate upper boundary count. The likelihood function adopts a heavy-tailed fractional form, where the likelihood value is one divided by one plus the ratio of the square of the observation residual to the square of the count resolution unit. When the residual is close to zero, the likelihood value is close to one; as the residual increases, the likelihood value decreases, and the rate of decrease is gradual, which can cover jitter and occasional offsets.
[0040] The sequential update rules are as follows: When both upper-edge latch counts and lower-edge latch counts exist, multiply each item in the previous round's posterior distribution table by the upper-edge likelihood and lower-edge likelihood to obtain the unnormalized quality. Then, divide the unnormalized quality by the sum of the unnormalized qualities of all candidate combinations to obtain the new round's posterior distribution table. When only upper-edge latch counts exist, multiply by the upper-edge likelihood and normalize. When only lower-edge latch counts exist, multiply by the lower-edge likelihood and normalize.
[0041] S104: Credibility calculation, adaptive iteration termination and motion parameter update.
[0042] The maximum a posteriori quality is defined as the unit with the highest probability quality in the posterior distribution table. The confidence level is calculated from the maximum a posteriori quality. The calculation process first converts the maximum a posteriori quality into a posterior advantage ratio, which is the ratio of the maximum a posteriori quality to one minus the maximum a posteriori quality. Then, the posterior advantage ratio is converted into a confidence level between zero and one, which is the ratio of the posterior advantage ratio to one plus the posterior advantage ratio. The upper limit of the allowable probability of wrong decisions is defined as a risk constraint parameter used to limit the conditions for stopping sampling at an acceptable risk level. The termination condition is defined as a confidence level not lower than one minus the upper limit of the allowable probability of wrong decisions. When the termination condition is not met, the candidate midpoint value corresponding to the maximum a posteriori quality is defined as the midpoint estimate, and the candidate hysteresis width value corresponding to the maximum a posteriori quality is defined as the hysteresis width estimate. The next micro-oscillation center count is updated to the midpoint estimate. The next micro-oscillation amplitude count is updated to half of the hysteresis width estimate plus one counting resolution unit, and is constrained together with the safety corridor boundary to ensure that the micro-oscillation center count minus the micro-oscillation amplitude count is not less than the lower limit count of the safety corridor, and the micro-oscillation center count plus the micro-oscillation amplitude count is not greater than the upper limit count of the safety corridor.
[0043] When step S1 terminates, the midpoint posterior distribution table and confidence level are output, and the midpoint estimate and hysteresis width estimate are output simultaneously to form a data object with the same name for direct reference in step S2.
[0044] After step S1, the midpoint posterior distribution table corresponding to the joint axis number and the confidence level form a unified data representation. The midpoint estimate provides the spatial center for the reference marker search, and the hysteresis width estimate provides the spatial scale for crossing the transition zone. The upper limit of the allowed erroneous decision probability binds the sampling stopping condition to the risk constraint. The update of the micro-oscillation center count and micro-oscillation amplitude count transforms the most reliable part of the posterior distribution table into the next round of motion instructions, keeping the observation sequence and decision basis continuous and consistent. This gives the zero-point recovery process a traceable statistical basis and an executable motion closed loop.
[0045] After the production line robot completes step S1, the joint axis remains within the safety corridor. The midpoint posterior distribution table has already converted the effects of zero-return switch edge jitter and hysteresis into a probability mass distribution, and the midpoint estimate and hysteresis width estimate have given the central location of the counting coordinates. The key issue in step S2 is that the encoder reference flag pulse may occur multiple times within a short stroke. If the electrical reference is unstable, the shaft zero-bias vector writing will lose consistency as the operating conditions drift. However, the midpoint posterior distribution table can provide a sortable probability basis, and step S2 uses this to complete the electrical reference locking and shaft zero-bias component calculation.
[0046] S201: Maximum a posteriori mesh cell localization and high-density interval generation.
[0047] The midpoint posterior distribution table consists of a two-dimensional grid of midpoint candidate values and hysteresis width candidate values, with each grid cell corresponding to a joint probability mass. The midpoint posterior distribution table first locates the grid cell with the highest probability mass; the midpoint candidate value corresponding to this grid cell is defined as the midpoint estimate, and the hysteresis width candidate value is defined as the hysteresis width estimate. Confidence is used to determine the central tendency of the midpoint posterior distribution table; when the confidence is not less than one minus the upper limit of the allowable erroneous decision probability, it enters the reference flag locking stage.
[0048] A high-density grid set is used to define the midpoint range within a probability set. It is generated by sorting all grid cells in the midpoint posterior distribution table according to probability quality from highest to lowest, accumulating the probability quality sequentially according to the sorting, and stopping when the accumulated probability quality is not lower than one minus the upper limit of the allowable erroneous decision probability. The resulting grid cells constitute the high-density grid set. When grid cells with the same probability quality are sorted, they are first arranged in ascending order of the counting distance between the candidate midpoint value and the estimated midpoint value, and then in ascending order of the counting distance between the candidate hysteresis width value and the estimated hysteresis width. The lower bound count of the high-density interval is the minimum count of all candidate midpoint values within the high-density grid set, and the upper bound count is the maximum count of all candidate midpoint values within the high-density grid set.
[0049] S202: Calculation of reference marker scanning interval and determination of scanning direction.
[0050] The reference marker scanning interval is defined in the counting coordinates. The scanning interval needs to simultaneously cover the midpoint high-density interval and the transition zone span corresponding to the hysteresis width estimate, and is constrained by the lower bound count and the upper bound count of the safety corridor. The calculation of the lower bound count of the scanning interval is divided into two steps: first, take the lower bound count of the midpoint high-density interval minus half of the hysteresis width estimate, and then subtract one counting resolution unit to obtain the preliminary lower bound count; if the preliminary lower bound count is less than the lower bound count of the safety corridor, the lower bound count of the scanning interval is taken as the lower bound count of the safety corridor; otherwise, the preliminary lower bound count is taken.
[0051] The calculation of the upper bound count of the scanning interval is divided into two steps. First, the upper bound count of the high-density interval at the midpoint is added to half of the estimated hysteresis width, and then one counting resolution unit is added to obtain the preliminary upper bound count. If the preliminary upper bound count is greater than the upper bound count of the safety corridor, the upper bound count of the scanning interval is taken as the upper bound count of the safety corridor; otherwise, the preliminary upper bound count is taken.
[0052] The scanning direction is determined by the encoder count at the current position and the counting distance between the two endpoints of the scanning interval. The distance from the current position to the lower bound of the scanning interval is compared with the distance from the current position to the upper bound of the scanning interval. The endpoint with the shorter distance is taken as the scanning start point. The scanning process maintains a monotonically changing count until the other endpoint is reached.
[0053] S203: Reference flag counting sequence acquisition and de-jittering / deduplication rules.
[0054] During the scanning process, the encoder reference flag pulses are latched using an edge-triggered method to store the encoder count. This latched count is called the reference flag count, and it is arranged chronologically to form a reference flag count sequence. The reference flag count acceptance condition uses a constant reference flag debouncing hold time. After being triggered, the reference flag pulse must remain valid for the constant reference flag debouncing hold time before the reference flag count is written into the reference flag count sequence. The reference flag count deduplication rule is based on the control cycle. If multiple triggers occur within the same control cycle, only one reference flag count is recorded. Continuous jitter triggers of the same phase are naturally filtered out using the constant reference flag debouncing hold time.
[0055] When the reference flag count sequence is empty after the scan is completed, step S2 does not generate electrical reference and axis zero bias components. The process returns to step S1 to continue to execute bidirectional micro oscillation and midpoint posterior distribution table update until the confidence level meets the entry condition of step S2 and then step S2 is executed again.
[0056] S204: Consistency probability quality score calculation and electrical reference flag count locking.
[0057] The reference marker count sequence may contain multiple candidate reference marker counts, requiring a reproducible ranking basis provided by the midpoint posterior distribution table. The consistency probability quality score is used to measure the degree of consistency between the candidate reference marker counts and the midpoint posterior distribution table, and the calculation process involves two steps.
[0058] The first step is to determine the nearest midpoint candidate value for each candidate reference marker count. The nearest midpoint candidate value is defined as the midpoint candidate value with the smallest count distance from the candidate reference marker count in the midpoint candidate value set. If there are multiple midpoint candidate values with the same minimum count distance, the midpoint candidate value with the smallest count distance from the midpoint estimate is selected.
[0059] The second step involves summing the midpoint posterior distribution table along the direction of the hysteresis width candidate values. The summation is limited to all grid cells whose midpoint candidate values are equal to their nearest neighboring midpoint candidate values. The probability quality of these grid cells is then summed to obtain the consistency probability quality score. The electrical reference flag count is taken from the candidate reference flag count with the highest consistency probability quality score. If there is a tie for the highest consistency probability quality score, the candidate reference flag count with the smallest distance from the midpoint estimate is selected first. If a tie still exists, a reverse scan retest is performed to obtain a second reference flag count sequence. The consistency probability quality score is then recalculated from the candidate reference flag counts that appear simultaneously in both sequences, and the candidate reference flag count with the highest consistency probability quality score is locked as the electrical reference flag count.
[0060] S205: Write the zero-axis offset component calculation to the calibration log entry.
[0061] The shaft zero-offset component is defined by the count difference. The shaft zero-offset component equals the midpoint estimate minus the electrical reference flag count. The unit of the shaft zero-offset component is the encoder count. After the shaft zero-offset component is written into the shaft zero-offset vector storage area, the zero-offset compensation count is defined as the encoder count at the current position plus the shaft zero-offset component. The zero-offset compensation count serves as the count input for subsequent joint angle reference conversion.
[0062] Step S2 simultaneously generates calibration log entries. Each calibration log entry contains at least the joint axis number, midpoint estimate, hysteresis width estimate, confidence level, lower bound count of the safety corridor, upper bound count of the safety corridor, lower bound count of the scan interval, upper bound count of the scan interval, reference marker count sequence, consistency probability quality score sequence, electrical reference marker count, and axis zero-bias component. The calibration log entries form a complete chain of evidence from the probability distribution to the electrical reference and then to the axis zero-bias write.
[0063] After step S2 is completed, the electrical reference mark count corresponding to the joint axis has a unique and definite rule. The consistency probability quality score gives the sorting basis for the candidate reference mark count. The axis zero bias component is written into the axis zero bias vector storage area with the count difference. The scan interval and the reference mark count sequence, together with the consistency probability quality score sequence, are written into the calibration log entry. The electrical reference locking process driven by the midpoint posterior distribution table has a traceable path and result record.
[0064] After the production line robot completes step S2, the electrical reference flag count is locked, the axis zero offset vector is written, and the joint axis count coordinates have a unified zero-point reference. Interference determination, tooling insertion, and gripping posture reproduction within the confined space depend on the reliability of this reference. Discrete alignment obtained solely by the zero-return switch and reference flag may still mask subtle deviations caused by transmission backlash, brake slippage, and load changes. Step S3 introduces repeatable multi-segment motions within the safety corridor through a safety closed-loop trajectory, enabling the correctness of the axis zero offset vector to form accumulable evidence on an observable basis. Joint fine-tuning is performed as the evidence improves, thereby extending zero-point recovery from a one-time write to a self-verifiable closed-loop process.
[0065] S301: Logic for generating and executing the structure of a safe closed-loop trajectory segment.
[0066] The safety closed-loop trajectory is defined as a sequence of target count commands arranged according to control cycles. Each control cycle provides one target count command for each joint axis, and the target count command always falls between the lower and upper bounds of the safety corridor. The safety closed-loop trajectory is divided into several segments by segment numbering. Each segment corresponds to several consecutive control cycles, and each segment specifies a set of joint axes participating in the excitation. Within a segment, only the target count commands of the joint axes participating in the excitation are allowed to change monotonically; the target count commands of the joint axes not participating in the excitation remain constant. At the end of the segment, all joint axis target count commands are guided back to the initial attitude target count command, thus forming a closed-loop return to position. The design rationale for multi-axis time-sharing excitation is to establish a one-to-one correspondence between the observed response and the set of joint axes participating in the excitation, so that subsequent joint fine-tuning can locate the set of joint axes that produce evidence of change, rather than mixing the influence of all joint axes in the same observation.
[0067] S302: Construction of closed-loop residual sequence and generation of comparison with the previous reliable version.
[0068] During the execution of the safe closed-loop trajectory, the controller records the encoder count and drive current sampling values according to the control cycle. The closed-loop residual sequence is expressed in count coordinates, and the closed-loop residual is defined as the zero-bias compensation count minus the target count command. The zero-bias compensation count equals the encoder count plus the shaft zero-bias component. The shaft zero-bias component of the previous trusted version is read from the versioned archive. The closed-loop residual of the previous trusted version is constructed with the same encoder count and the same target count command, only replacing the shaft zero-bias component with the shaft zero-bias component of the previous trusted version.
[0069] This construction limits the difference between the two sets of closed-loop residuals to the difference in the axis zero-bias component, making it easier to attribute the explanatory power of the back-to-position error to the axis zero-bias vector. The closed-loop residual sequence is divided into segment residual segments according to segment number, and each segment residual segment maintains a correspondence with the segment number, providing an index basis for subsequent evidence fusion.
[0070] S303: Explanation of the mechanism for constructing segment energy difference and driving current consistency.
[0071] Drive current consistency is characterized using segment energy. The segment energy is constructed by first calculating the target count increment within the segment, which is equal to the difference between the target count commands of adjacent control cycles. The segment energy is then calculated by multiplying the absolute value of the drive current sample value in each control cycle within the segment by the absolute value of the target count increment, and summing the results to form an energy-type quantity related to the segment's motion amplitude. The segment energy of the previous trusted version is read from the versioned archive, and the segment energy difference is defined as the current segment energy minus the previous trusted version segment energy.
[0072] The segment energy difference and the closed-loop residual are complementary. The closed-loop residual reflects the counting tracking error, while the segment energy difference reflects the change in current consumption required to achieve the same target count increment. When the axis zero offset vector deviates from the true mechanical zero position, the systematic shift of the force state and friction state within the segment will form a repeatable deviation in the segment energy difference.
[0073] S304: Construction of log-sequential likelihood ratio accumulator and evidence fusion method.
[0074] The log-sequential likelihood ratio accumulation is used to transform the closed-loop residual and the segment energy difference into a unified evidence scalar. The closed-loop residual likelihood term uses a heavy-tailed fractional form, where the likelihood term is one divided by one plus the ratio of the square of the closed-loop residual to the square of the counting resolution unit, where the counting resolution unit is the inherent resolution unit of the encoder counting link. The previous trusted version closed-loop residual likelihood term is constructed using the same heavy-tailed fractional form, only replacing the closed-loop residual with the previous trusted version's closed-loop residual. The segment energy difference likelihood term uses the same heavy-tailed fractional form, where the likelihood term is one divided by one plus the ratio of the square of the segment energy difference to the square of the current resolution unit, where the current resolution unit is the inherent resolution unit of the drive current sampling link.
[0075] The single-cycle log-likelihood increment is obtained by adding three parts: the first part is the natural logarithm sum of the closed-loop residual likelihood terms within the set of joint axes involved in the excitation; the second part is the negative sum of the natural logarithms of the closed-loop residual likelihood terms of the previous reliable version within the set of joint axes involved in the excitation; and the third part is the natural logarithm sum of the segment energy difference likelihood terms within the set of joint axes involved in the excitation. The accumulated log-sequential likelihood ratio is equal to the accumulated single-cycle log-likelihood increment from the trajectory start point to the current control cycle. The logarithmic form uses additive recursion, which is suitable for long control cycle sequences. A positive accumulated log-sequential likelihood ratio indicates that the current axis zero bias vector has a stronger interpretive power for observations compared to the previous reliable version, while a negative accumulated log-sequential likelihood ratio indicates the opposite.
[0076] S305: Joint fine-tuning search strategy and high-density interval constraint writing rules.
[0077] The joint fine-tuning uses the axis zero-bias component increment as the variable, and the axis zero-bias component increment takes two candidate types, forward trial and reverse trial, with the counting resolution unit as the step size. Each trial applies a candidate increment to only one joint axis number, and the increments of other joint axes are set to zero, forming an axis-by-axis coordinate recursion.
[0078] For each candidate increment, the difference between the closed-loop residual sequence and the segment energy is recalculated, and the accumulated log-sequential likelihood ratio is recalculated accordingly. If the accumulated log-sequential likelihood ratio generated by the forward trial is greater than the accumulated log-sequential likelihood ratio before the trial, the axis zero-bias component is updated according to the forward candidate increment. If the accumulated log-sequential likelihood ratio generated by the reverse trial is greater than the accumulated log-sequential likelihood ratio before the trial, the axis zero-bias component is updated according to the reverse candidate increment. If neither type of trial produces improvement, the axis zero-bias component remains unchanged. The update of the axis zero-bias component is constrained by the high-density interval. The counts of the lower and upper bounds of the high-density interval are obtained from step S2, and the count of the electrical reference flag is obtained from step S2. The lower bound of the feasible region is the count of the lower bound of the high-density interval minus the count of the electrical reference flag, and the upper bound of the feasible region is the count of the upper bound of the high-density interval minus the count of the electrical reference flag. The axis zero-bias component after each update falls between the lower and upper bounds of the feasible region. After completing one round of recursive calculation of the axis coordinates, the safe closed-loop trajectory is executed again and the cumulative log-sequential likelihood ratio is recalculated. When no positive change occurs, the joint fine-tuning ends and the updated axis zero bias vector is written.
[0079] After step S3, the safety closed-loop trajectory maps the correctness of the axis zero bias vector to the difference between the closed-loop residual sequence and the segment energy. The log-sequential likelihood ratio accumulation aggregates the two types of observational evidence into a recursive scalar. Joint fine-tuning iteratively updates the axis zero bias component at the counting resolution unit scale and is constrained by the feasible region derived from the high-density interval. The output consists of the updated axis zero bias vector and the log-sequential likelihood ratio accumulation record. Versioning and drift detection are subsequently completed in step S4.
[0080] After the production line robot completes step S3, the axis zero offset vector has undergone self-verification and joint fine-tuning within the safe closed-loop trajectory, providing observable evidence for the zero-point recovery result. Continuous production still encounters temperature changes, load variations, brake holding, and external force disturbances. These disturbances can cause changes in the statistical structure of the hysteresis width in the zero-return switch transition zone, as well as changes in the evidence direction of the accumulated log-sequential likelihood ratio. Without version management and drift detection, zero-point recovery will gradually lose its consistent benchmark for tooling alignment and interference determination within the confined space. Step S4 uses the version record unit as the sole evidence carrier, writing the hysteresis width edge probability mass distribution, confidence level, axis zero offset vector, electrical reference flag count, and accumulated log-sequential likelihood ratio into the same record. Drift detection is then performed using the limits derived from the false alarm rate constraint parameter alpha, triggering rollback and recalibration accordingly.
[0081] S401: Version record unit generation and field writing logic.
[0082] The version record unit is used to store traceable evidence of a zero-point recovery. Different records are distinguished by version number, and multi-axis fields are organized by joint axis number. The written fields include axis zero-bias components, axis zero-bias vectors, midpoint estimates, hysteresis width estimates, confidence levels, electrical reference flag counts, log-sequential likelihood ratio accumulation, and hysteresis width marginal probability mass distribution. The hysteresis width marginal probability mass distribution is derived from the midpoint posterior distribution table. The derivation method is as follows: for each hysteresis width candidate value, the entire column of grid probability masses corresponding to that hysteresis width candidate value in the midpoint posterior distribution table is summed along the direction of all midpoint candidate values; the sum is used as the marginal probability mass of that hysteresis width candidate value. A set of marginal probability masses is obtained for all hysteresis width candidate values. The marginal probability mass values range from zero to one, and the sum of all marginal probability masses is one. The version record unit also writes a version confidence identifier and a baseline version identifier. The version confidence identifier is used to mark the drift discrimination result, and the baseline version identifier is used to lock the reference version.
[0083] S402: Baseline version locking and comparability constraint logic.
[0084] The baseline version is used to provide a reference for drift detection. The baseline version is determined by the version record unit pointed to by the baseline version identifier. The baseline version field includes the baseline version axis zero-bias component, the baseline version electrical reference flag count, the baseline version hysteresis width edge probability mass distribution, and the baseline version log-sequential likelihood ratio accumulation. The baseline version locking rule is divided into two parts: The first segment writes the baseline version identifier into the version record unit when the version trust identifier first appears as a trusted version record unit; In the second stage, the baseline version identifier remains unchanged until the drift judgment result triggers a rollback and completes recalibration. When a version record unit with a trusted version identifier first appears after recalibration, the baseline version identifier is transferred to the new version record unit.
[0085] The comparability constraint includes two items: The first item is the electrical reference consistency constraint. The current electrical reference flag count and the baseline version electrical reference flag count need to correspond to the same index position in the reference flag count sequence. Position consistency is obtained by comparing the reference flag count sequence log written in step S2. The second item is the safety closed-loop trajectory consistency constraint. The current safety closed-loop trajectory segment structure needs to be consistent with the baseline version segment structure. The segment structure consistency is obtained by comparing the segment number mapping log written in step S3.
[0086] When both constraints are met, the drift discrimination attributes the observation difference to zero-point drift rather than a change in trajectory structure.
[0087] S403: Construction of drift statistics and rules for numerical lower bound constants.
[0088] The drift statistic is used to quantify the structural changes of the current version relative to the baseline version. The drift statistic is obtained by adding three parts, which are derived from the change in the hysteresis width marginal probability quality distribution, the confidence penalty, and the log-sequential likelihood ratio penalty.
[0089] The numerical lower bound constant is used to handle probabilistic quality underflow. The numerical lower bound constant is defined as a positive constant and written into the version record unit as a calculation constraint.
[0090] The change in the hysteresis width marginal probability quality distribution is calculated in the expected form of the relative logarithmic density. The calculation method is to take the natural logarithm of the ratio of the current marginal probability quality to the baseline marginal probability quality for each hysteresis width candidate value, multiply it by the current marginal probability quality, and finally sum over all hysteresis width candidate values. During the calculation, if the current marginal probability quality and the baseline marginal probability quality are less than the lower limit constant, the lower limit constant is used instead of the ratio and natural logarithm calculation to keep the input of the natural logarithm positive and finite. The confidence penalty is constructed in the form of a natural logarithm and calculated by taking the natural logarithm of the confidence for each joint axis and taking the negative value, then summing over all joint axes. The log-sequential likelihood ratio penalty is used to reflect the direction of self-evident evidence. The calculation method is to take the opposite of the accumulated log-sequential likelihood ratio when it is negative, and take zero when it is zero or positive. The drift statistic is equal to the weighted sum of the change in hysteresis width, marginal probability, quality distribution, confidence penalty, and log-sequential likelihood ratio penalty. The drift statistic is a dimensionless quantity.
[0091] S404: Boundary function generation and drift detection logic.
[0092] The false alarm rate constraint parameter alpha is defined as the target false alarm rate for all-axis joint drift discrimination. The boundary function is obtained by calculating the negative natural logarithm of the false alarm rate constraint parameter alpha, and the boundary function is a dimensionless quantity. Drift discrimination is performed by comparing the drift statistic with the boundary function. When the drift statistic is not greater than the boundary function, the version trust identifier is set to trustworthy. When the drift statistic is greater than the boundary function, the version trust identifier is set to untrustworthy, and both the rollback trigger identifier and the recalibration trigger identifier are also set. This discrimination rule uniquely determines the boundary using the false alarm rate constraint parameter alpha.
[0093] The false alarm rate constraint parameter alpha originates from the engineering constraint on the risk of false alarms in drift discrimination. Its value is preset by the controller for the acceptable error backoff and recalibration trigger frequency within a unit operating cycle or given by the production line quality control specifications. It is used to transform the upper limit of the false alarm probability of drift discrimination into a unified discrimination boundary. The false alarm rate constraint parameter alpha represents the upper limit of the probability that the change point detection in step S4 will still determine drift and trigger backoff and recalibration under the condition that no substantial drift occurs at zero point and the observed statistics fluctuate only due to normal disturbances. It belongs to the target false alarm rate constraint of all-axis joint discrimination. The controller constructs a boundary function based on the false alarm rate constraint parameter alpha and compares it with the drift statistics to ensure that the discrimination rule maintains consistent false alarm control semantics under different operating conditions and different sampling information amounts.
[0094] S405: Rollback write recalibration trigger and sampling information adjustment logic.
[0095] When the version trust identifier is deemed untrustworthy, a rollback write restores the axis zero-bias component to the baseline version's axis zero-bias component, and the axis zero-bias vector is synchronously restored to the baseline version's axis zero-bias vector. The rollback write event is written to the version record unit. After the recalibration trigger identifier is written, the process proceeds to step S1 to perform bidirectional micro-oscillation sampling. The sampling information volume adjustment is used to map the drift intensity to the scale of the next sampling action. The adjustment factor is constructed based on the ratio of the drift statistic to the boundary function, and the adjustment factor equals one plus the drift statistic divided by the boundary function. The initial micro-oscillation amplitude count in step S1 is obtained by adding half of the hysteresis width estimate to the counting resolution unit to obtain the base amplitude count. The micro-oscillation amplitude count is updated to the product of the adjustment factor and the base amplitude count. The micro-oscillation amplitude count also conforms to the safety corridor constraint: the micro-oscillation center count minus the micro-oscillation amplitude count is not less than the lower bound count of the safety corridor, and the micro-oscillation center count plus the micro-oscillation amplitude count is not greater than the upper bound count of the safety corridor. When the version trust identifier is trusted, the rollback trigger identifier and recalibration trigger identifier remain in an untriggered state, the baseline version identifier remains unchanged, and the version record unit enters long-term archiving.
[0096] After step S4, the version recording unit saves the hysteresis width marginal probability quality distribution derived from the midpoint posterior distribution table, the confidence level, the electrical reference flag count and axis zero bias vector, and the accumulated log-sequential likelihood ratio. The drift statistic is based on the change in the hysteresis width marginal probability quality distribution, supplemented by the confidence level penalty and the log-sequential likelihood ratio penalty; these three are added together to form a single discriminant. The boundary function is uniquely derived from the false alarm rate constraint parameter alpha. The drift discrimination result drives the backoff write and recalibration trigger. The sampling information adjustment maps the drift intensity to the micro-oscillation amplitude count update, thus forming a sustainable version management and drift closed loop.
[0097] Specifically, the above are merely preferred embodiments of this application and are not intended to limit this application.
[0098] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0099] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. An automatic zero-point position calibration method for a robotic arm, characterized in that, Including the following steps: S1: In the safety corridor, bidirectional micro-oscillations cross the zero-return switch switching area, record the encoder counts at the upper and lower edges of the switch, and sequentially update the midpoint position and hysteresis width of the switching area using Bayesian methods to obtain the midpoint posterior distribution table and confidence level. S2: Obtain the midpoint estimate and high-density interval from the midpoint posterior distribution table, capture the encoder reference flag count in the high-density interval, select the electrical reference flag count according to the consistency probability and write it into the shaft zero bias vector; S3: After writing the axis zero bias vector, return to the initial attitude along the safe closed-loop trajectory, collect the closed-loop residual and drive current to construct the sequential likelihood ratio, and fine-tune the axis zero bias vector in the feasible region of the high-density interval when the sequential likelihood ratio is improved. S4: Write the axis zero bias vector, confidence level, hysteresis width statistic and sequential likelihood ratio into the version record unit, and determine the drift by the change point detection of the false alarm rate constraint parameter alpha. When drift occurs, revert to the baseline version and trigger the recalibration process.
2. The automatic zero-point position calibration method for a robotic arm according to claim 1, characterized in that: Step S1 includes: bidirectional micro-oscillations crossing the zero-return switch transition area in alternating directions within the safety corridor; latching the corresponding encoder count and incorporating it into the sequence when the upper and lower edges of the zero-return switch satisfy the constant de-jitter holding time; and adjusting the micro-oscillation amplitude and sampling number based on the incremental confidence level after each update of the midpoint posterior distribution table.
3. The automatic zero-point position calibration method for a robotic arm according to claim 2, characterized in that: Step S1 further includes: sequential Bayesian update using the midpoint position and hysteresis width of the transition region as latent content, using the grid probability quality representation of the midpoint posterior distribution table discrete by encoder count and initializing it with a uniform distribution, and updating the grid probability quality only with the observed edges and normalizing it when the upper or lower edge is missing, so that the sum of the grid probability quality remains one.
4. The automatic zero-point position calibration method for a robotic arm according to claim 3, characterized in that: Step S2 includes: the high-density interval is obtained by sorting the grid probability quality of the midpoint posterior distribution table from high to low and accumulating it. The accumulated probability quality stops when it reaches one minus the upper limit of the allowable erroneous decision probability. When there are ties in probability quality, the midpoint candidate value that is closer to the midpoint estimate is included first. The boundary of the high-density interval is taken as the minimum and maximum counts of the midpoint candidate values corresponding to the grid cells.
5. The automatic zero-point position calibration method for a robotic arm according to claim 4, characterized in that: Step S2 further includes: the capture of encoder reference flag counts is based on the high-density interval by introducing a hysteresis width estimate and a counting resolution unit to generate a scanning interval, and the scanning interval is cropped between the lower limit count of the safety corridor and the upper limit count of the safety corridor; the reference flag is determined to be valid by the reference flag debouncing holding time constant, and a reference flag count sequence is formed after repeated triggering and deduplication within the same control cycle.
6. The automatic zero-point position calibration method for a robotic arm according to claim 5, characterized in that: Step S2 further includes: when calculating the consistency probability for candidate reference mark counts, first determine the nearest midpoint candidate value for each candidate reference mark count, then sum the probability quality of all hysteresis width candidate values corresponding to the midpoint candidate value in the midpoint posterior distribution table to form a consistency probability quality score, and select the one with the largest score as the electrical reference mark count.
7. The automatic zero-point position calibration method for a robotic arm according to claim 6, characterized in that: When the consistency probability quality score is tied for the highest, the candidate reference mark count with the smallest count distance from the midpoint estimate is used as the priority criterion, and a reverse scan retest is performed to form a second reference mark count sequence. The consistency probability quality score is recalculated among the candidates in both sequences and the electrical reference mark count is locked. The candidate set before locking and the consistency probability quality score sequence are written into the calibration log entry.
8. The automatic zero-point position calibration method for a robotic arm according to claim 7, characterized in that: Step S3 includes: dividing the safe closed-loop trajectory into segments by segment number and configuring the set of joint axes participating in the excitation. Within a segment, only the target count command of the joint axes participating in the excitation is allowed to change monotonically; aligning the closed-loop residual with the drive current sample value by segment number, and summing the product of the absolute value of the drive current sample value and the absolute value of the target count increment for each segment to obtain the segment energy, and then subtracting the segment energy from the baseline version segment energy to obtain the segment energy difference value.
9. The automatic zero-point position calibration method for a robotic arm according to claim 8, characterized in that: Step S3 further includes: the sequential likelihood ratio is represented by the logarithmic sequential likelihood ratio accumulation, and for each control cycle, the logarithm of the ratio of the closed-loop residual likelihood term to the baseline version closed-loop residual likelihood term and the logarithm of the segment energy difference likelihood term are weighted and summed, and the axis zero bias vector is updated one axis at a time with the counting resolution unit as the step size. After the update, the axis zero bias component is constrained by the feasible region derived from the high-density interval boundary and the electrical reference flag count.
10. The automatic zero-point position calibration method for a robotic arm according to claim 9, characterized in that: Step S4 includes: the version recording unit writes the axis zero bias vector, electrical reference flag count, confidence level and hysteresis width estimate by joint axis number, and writes the hysteresis width marginal probability quality distribution obtained by summing along the midpoint candidate value direction from the midpoint posterior distribution table, and writes the log-sequential likelihood ratio accumulation, version confidence identifier and baseline version identifier at the same time; the change point detection determines the drift and triggers backoff and recalibration by using the boundary function derived from the false alarm rate constraint parameter alpha.