Signal adjusting method and system based on multiple encoders

By acquiring and analyzing the phase difference and edge transition time of multi-encoder signals, and updating and adjusting the phase difference and edge transition time in real time, the problems of numerous parameters and insufficient dynamic tracking performance in multi-encoder signal conditioning are solved, and efficient signal conditioning and dynamic response are achieved.

CN122062731APending Publication Date: 2026-05-19SUZHOU SHENEN ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-17
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing multi-encoder signal conditioning methods, the differences in electrical characteristics of the output signals of each encoder lead to numerous adjustable parameters and a complex adjustment process. Furthermore, the large phase difference dispersion and inconsistency with the edge transition time result in a negative impact on dynamic tracking performance.

Method used

By collecting the phase difference and edge transition time of each encoder channel, it is determined whether there is a coupling discrete problem. Median trend slope analysis is performed to determine the prediction window type and length. The median of phase difference and edge transition time is updated in real time. Two-dimensional feature points are constructed and density clustering is performed to generate coarse adjustment reference and individual fine adjustment amount, which are applied to the phase compensation delay line and edge shaping circuit.

Benefits of technology

It enables simultaneous identification and adjustment of phase difference dispersion and edge time dispersion, avoiding mutual interference from independent adjustments and improving the dynamic tracking performance and response speed of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122062731A_ABST
    Figure CN122062731A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal processing and control, and particularly discloses a signal adjusting method and system based on multiple encoders, and the method comprises the steps: judging a coupling discrete problem through calculating a phase difference median sequence standard deviation of each encoder channel and an edge transition time median sequence standard deviation; then detecting the overall drift slope of the parameters, determining a window response lag period and adaptively adjusting the length of a sliding window; updating the median in real time through an annular buffer area, and predicting the characteristic value of the next period through linear regression of a recent sequence; finally, a two-dimensional feature point is constructed after a predicted value is normalized, coarse tuning reference and individual fine tuning quantity of each cluster are generated through density clustering, and meanwhile, the coarse tuning reference and the individual fine tuning quantity are applied to a phase compensation delay line and an edge shaping circuit; according to the invention, the problems of large phase difference dispersion, mutual coupling of edge jitter and slow drifting of characteristic parameters caused by rotating speed change or temperature drifting during mixed use of multiple encoders are solved, and the system response speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of signal processing and control technology, and specifically to a signal conditioning method and system based on multiple encoders. Background Technology

[0002] In multi-encoder signal conditioning, industrial servo systems, multi-axis industrial robots, and CNC machine tools typically use multiple types of encoders simultaneously, such as incremental encoders, absolute encoders, or rotary transformers. The electrical characteristics of the output signals from different encoders vary significantly, including inconsistent amplitudes, bias voltage drift, different edge steepness, unequal propagation delays, and discrete phase differences. Existing conditioning methods involve amplitude normalization, edge shaping, phase compensation, and zero-crossing correction for each signal channel to ensure that subsequent circuits can stably process the signals from each channel.

[0003] The electrical characteristics of output signals from different encoders vary significantly, including inconsistent amplitudes, bias voltage drift, varying edge steepness, unequal propagation delays, and discrete phase differences. Existing adjustment methods typically treat amplitude normalization, edge shaping, phase compensation, and zero-crossing correction as independent steps, with parameters set independently for each step. This results in numerous adjustable parameters and a complex adjustment process. More critically, large phase difference dispersion and inconsistent edge transition times often stem from common physical causes (such as differences in transmission line length or encoder drive capability), but current technologies lack assessment of their coupling, leading to mutual interference when adjusted separately and requiring multiple iterations to converge. Furthermore, when encoder speed changes or ambient temperature fluctuates, phase difference and edge transition time change slowly. Traditional fixed-window median statistical methods have inherent lag, causing adjustments to lag behind actual signal changes and impacting dynamic tracking performance.

[0004] Therefore, the present invention provides a method and system for signal conditioning based on multiple encoders. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for adjusting signals based on multiple encoders to solve the aforementioned background problems.

[0006] The objective of this invention can be achieved through the following technical solution: a multi-encoder signal conditioning method, comprising the following steps:

[0007] By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, it is determined whether there is a coupling discrete problem.

[0008] If present, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results;

[0009] Based on the determined prediction window type and prediction window length, the median phase difference and median edge transition time of each encoder channel are updated in real time, and the change slope is calculated. When the change slope exceeds the threshold, the predicted values ​​of phase difference and edge transition time of the next signal cycle are predicted.

[0010] Two-dimensional feature points are constructed by normalizing the predicted phase difference and edge transition time of each encoder channel. Density clustering is performed on the feature points to obtain multiple clusters. A coarse adjustment reference and an individual fine adjustment amount are generated for each cluster. The coarse adjustment reference and the individual fine adjustment amount are superimposed and applied to the phase compensation delay line and the edge shaping circuit.

[0011] Furthermore, the method for determining whether a coupled discrete problem exists is as follows:

[0012] The reference channel was determined through analysis;

[0013] The absolute value of the phase difference and the edge transition time of each encoder are continuously collected for multiple signal cycles. The median of the phase difference and the median of the edge transition time of each encoder channel are calculated.

[0014] The median phase differences of all encoder channels are used to construct a sequence and the standard deviation is calculated. If the standard deviation is greater than 0.02 times the signal period, it is determined that there is a problem of excessive phase difference dispersion.

[0015] The median edge transition times of all encoder channels are used to construct a sequence and the standard deviation is calculated. If the standard deviation is greater than 0.005 times the signal period, it is determined that there is a problem with poor edge jitter consistency.

[0016] When both excessive phase difference dispersion and poor edge jitter consistency exist simultaneously, it is determined that there is a coupling dispersion problem.

[0017] Furthermore, the reference channel is determined as follows:

[0018] During the stable operation of the encoder at a constant speed, the peak value of the signal amplitude, the jitter width of the signal zero crossing point, and the standard deviation of the edge transition time of each channel are continuously collected in multiple signal cycles.

[0019] Calculate the average amplitude, zero-crossing jitter index, and edge transition time standard deviation for each channel. After normalization, sum them to obtain the overall channel quality score. Select the channel with the highest score as the initial reference channel. If they are tied, select the channel with the largest average amplitude.

[0020] Furthermore, the prediction window type is determined as follows:

[0021] Multiple signal cycles were continuously acquired, and the phase difference measurement value and edge transition time measurement value of each encoder channel were recorded in each signal cycle.

[0022] For each encoder channel, extract the median phase difference sequence and the median edge transition time sequence of the most recent multiple signal cycles, and calculate the overall slope of the median phase difference and the overall slope of the median edge transition time using the least squares method, respectively.

[0023] The drift threshold is set to 0.001 times the initial signal period duration per signal period. If the absolute value of the overall slope of the median phase difference is greater than the drift threshold, or the absolute value of the overall slope of the median edge transition time is greater than the drift threshold, then the prediction window type is a sliding window.

[0024] Conversely, if the absolute value of the overall slope of the median phase difference and the absolute value of the overall slope of the median edge transition time sequence are both less than or equal to the drift threshold, then the prediction window type is a fixed window.

[0025] Furthermore, the prediction window length is determined as follows:

[0026] If the prediction window type is a sliding window, then:

[0027] The lag period D is defined as the number of periods required for the median to track 63% of the change in the true value from the point where the median begins to change.

[0028] For linear drift, the number of hysteresis cycles is approximately equal to half the window length;

[0029] When the data within the window is uniformly weighted, the rise time of the median step response is approximately 0.5 times the window length.

[0030] The target lag period is set to be no more than ten signal periods. Since the lag period is proportional to the prediction sliding window length, the prediction sliding window length is determined to be twice the target lag period.

[0031] The calculation result is limited to between ten and one hundred: if the number of lag periods of twice the target is less than ten, take ten; if it is greater than one hundred, take one hundred; otherwise, take the calculated value.

[0032] If the prediction window type is a fixed window, then the sliding window length is fixed at one hundred.

[0033] Furthermore, the update process for the median phase difference and median edge transition time of each encoder channel is as follows:

[0034] At the end of each new signal cycle, the phase difference measurement value and edge transition time measurement value of each channel within the signal cycle and the duration of the current signal cycle are obtained;

[0035] Based on the determined prediction window type and prediction window length, a circular buffer with a length equal to the prediction window length is maintained for each encoder channel. New values ​​are pushed in and the oldest values ​​are removed. After sorting the buffer in ascending order, the median is taken to obtain the median phase difference and median edge transition time of the current signal period.

[0036] Furthermore, the prediction method for the phase difference and edge transition time prediction value of the next signal cycle is as follows:

[0037] For each channel, extract the median sequence of the most recent K periods, where K is the larger of five and one-quarter of the sliding window length;

[0038] The phase difference slope and edge time slope are calculated using the least squares method.

[0039] Set the slope threshold to 0.001 times the current signal period duration. If the absolute value of the phase difference slope is greater than this threshold, predict the median phase difference of the next period to be equal to the current value plus the slope; otherwise, it is equal to the current value.

[0040] The edge time slope threshold is taken as the current signal period duration in microseconds per cycle, and the edge time prediction value is generated after comparison.

[0041] Furthermore, the process of performing density clustering on feature points to obtain multiple clusters is as follows:

[0042] Using the phase difference prediction value as the horizontal axis and the edge time prediction value as the vertical axis, the normalization factor of the horizontal axis is taken as the current signal period duration, and the normalization factor of the vertical axis is taken as zero times the current signal period duration, to obtain the normalized feature points.

[0043] Set the cluster radius to 0.03, calculate the Euclidean distance between all pairs of feature points, count the number of points whose distance is less than the radius, mark the points whose number is greater than or equal to the radius as core points, and connect the core points into connected clusters according to the distance less than the radius.

[0044] Within each cluster, the arithmetic mean of the normalized coordinates is calculated and then inversely normalized to obtain the cluster center phase difference and cluster center edge time.

[0045] Furthermore, the process of generating the coarse adjustment benchmark and the individual fine adjustment amount is as follows:

[0046] The coarse-tuned delay voltage is obtained by multiplying the cluster center phase difference by the delay line gain factor of one volt per millisecond.

[0047] The reference charging current is obtained by subtracting the nominal edge time of 80 microseconds from the cluster center edge time, multiplying it by the charging current adjustment coefficient of 0.5 mA per microsecond, and then adding the nominal charging current of 2 mA.

[0048] The phase prediction deviation of each channel within the cluster is multiplied by the delay line gain coefficient and then multiplied by the phase fine-tuning coefficient zero-two to obtain the fine-tuning delay voltage;

[0049] The charging current adjustment amount is obtained by multiplying the time prediction deviation by the charging current adjustment coefficient and then by the edge fine-tuning coefficient of 0.3.

[0050] The final delay control voltage is the coarse adjustment delay voltage plus the fine adjustment delay voltage, and the final charging current is the reference charging current plus the charging current fine adjustment amount.

[0051] A multi-encoder-based signal conditioning system includes the following modules:

[0052] Coupling Discrete Detection Module: By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, it determines whether there is a coupling discrete problem.

[0053] Prediction window determination module: If it exists, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results;

[0054] Trend prediction module: Based on the determined prediction window type and prediction window length, it updates the median phase difference and median edge transition time of each encoder channel in real time, calculates the change slope, and predicts the phase difference and edge transition time of the next signal cycle when the change slope exceeds the threshold.

[0055] Adjustment generation module: After normalizing the predicted phase difference and edge transition time of each encoder channel, two-dimensional feature points are constructed. Density clustering is performed on the feature points to obtain multiple clusters. Coarse adjustment reference and individual fine adjustment amount are generated for each cluster. The coarse adjustment reference and individual fine adjustment amount are superimposed and applied to the phase compensation delay line and edge shaping circuit.

[0056] The beneficial effects of this invention are as follows:

[0057] By simultaneously calculating the phase difference dispersion and edge time dispersion, and comparing them with engineering thresholds, it is possible to clearly identify whether the two problems originate from the same physical mechanism, providing a basis for subsequent joint adjustment and avoiding blind independent adjustment.

[0058] By detecting the overall drift slope of the parameters, the window response lag period is quantitatively calculated, and the window length is automatically adjusted. When there is drift, the window is shortened to improve the response speed (the lag is reduced from 50 periods to 10 periods), and when there is no drift, a large window is maintained to ensure statistical stability.

[0059] Linear regression of the recent median sequence is used to extrapolate a period to generate a predicted value when the change is significant, which effectively overcomes the inherent lag of the median and makes the adjustment amount lead the actual change.

[0060] Phase difference and edge time are used to construct normalized two-dimensional feature points, and density clustering automatically groups similar channels into a cluster. Each cluster independently generates a coarse-tuning baseline, and individuals within the cluster only need fine-tuning. One clustering simultaneously improves phase consistency and edge consistency, avoiding mutual interference and iteration from independent adjustments. Attached Figure Description

[0061] The invention will now be further described with reference to the accompanying drawings.

[0062] Figure 1 This is a flowchart of a multi-encoder signal conditioning method according to Embodiment 1 of the present invention;

[0063] Figure 2 This is the logic diagram for determining whether a coupled discrete problem exists in Embodiment 1 of the present invention;

[0064] Figure 3 This is a functional block diagram of a multi-encoder signal conditioning system in Embodiment 2 of the present invention. Detailed Implementation

[0065] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.

[0066] Example 1: Please refer to Figure 1 As shown in the figure, the multi-encoder signal conditioning method described in this embodiment of the invention specifically includes the following steps:

[0067] Step 1: By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, determine whether there is a coupling discrete problem;

[0068] Please see Figure 2 As shown, in step one, the process for determining whether a coupled discrete problem exists includes:

[0069] The first point to clarify is the setting of the reference channel, specifically as follows:

[0070] During the stable operation of the encoder at a constant speed, data from multiple signal cycles are continuously collected. Within each cycle, the peak signal amplitude (average of the absolute values ​​of the positive peak and the negative peak), the jitter width at the zero-crossing point (standard deviation of the zero-crossing time in each cycle), and the standard deviation of the edge transition time are recorded for each encoder channel.

[0071] For each encoder channel:

[0072] Calculate the average of the absolute values ​​of the positive and negative peak values ​​of the signal within each signal period to obtain the channel average amplitude;

[0073] The time when the rising edge crosses zero voltage in each signal cycle is detected, and the standard deviation of the time when the rising edge crosses zero voltage in each signal cycle is calculated as the zero-crossing jitter index.

[0074] Calculate the standard deviation of the edge transition time for each signal period;

[0075] The channel average amplitude, zero-crossing jitter index, and edge transition time standard deviation are normalized and then added together to obtain the channel comprehensive quality score. The encoder channel with the highest comprehensive quality score is selected as the initial reference channel. If there is a tie for the highest comprehensive quality score, the encoder channel with the largest average amplitude is selected.

[0076] Secondly, it should be noted that determining whether there is an issue of excessively large phase difference dispersion involves the following steps:

[0077] During the stable operation of the encoder at a constant speed, data from multiple signal cycles are continuously acquired. Within each cycle, the absolute value of the phase difference between each non-reference channel and the reference channel is measured using a time-to-digital converter.

[0078] Simultaneously, a high-speed comparator and a timer are used to measure the time from the rising edge of the signal to 10% amplitude to 90% amplitude and the corresponding time of the falling edge for each encoder channel signal. The arithmetic mean of the two is taken as the edge transition time of this cycle.

[0079] For each encoder channel:

[0080] The median phase difference and median edge transition time of the encoder channel are obtained by calculating the phase difference measurement values ​​and the median edge transition time of multiple signal cycles respectively.

[0081] The median phase difference of all encoder channels is integrated into a median phase difference sequence, and the standard deviation of the median phase difference sequence is calculated.

[0082] Set the phase difference dispersion threshold to 0.02 times the signal period duration (the time interval between two adjacent rising edges). Compare the standard deviation of the median phase difference sequence with the dispersion threshold. If the standard deviation of the median phase difference sequence is greater than the dispersion threshold, it is determined that there is a problem of excessive phase difference dispersion.

[0083] It is understandable that the basis for setting the phase difference dispersion threshold is: industrial servo systems typically require that the phase error between encoder channels does not exceed 2% of the signal period, and this value is used as the upper limit of allowable error.

[0084] Thirdly, it should be noted that determining whether there is a problem with poor consistency in edge jitter involves the following steps:

[0085] The median edge transition times of all encoder channels are integrated into a median edge transition time sequence, and the standard deviation of the median edge transition time sequence is calculated. The edge jitter consistency threshold is set to 0.005 times the standard deviation.

[0086] It is understandable that the edge jitter consistency threshold is set based on the fact that if the difference in edge transition time exceeds 0.5% of the signal period, it will cause a significant shift in the comparator decision time, so it is set as a threshold.

[0087] The standard deviation of the median edge transition time sequence is compared with the edge jitter consistency threshold. If the standard deviation of the median edge transition time sequence is greater than the edge jitter consistency threshold, it is determined that there is a problem with poor edge jitter consistency.

[0088] If both excessive phase difference dispersion and poor edge jitter consistency exist simultaneously, then a coupling dispersion problem is identified.

[0089] It should be noted that the purpose of determining whether coupling discrepancies exist is to establish a signal quality benchmark and determine whether coupling discrepancies exist, thereby providing a basis for subsequent targeted adjustments and avoiding unnecessary complex processing when there are no coupling issues.

[0090] Step 2: If present, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results;

[0091] In step two, the process of determining the prediction window type includes:

[0092] In actual operation of the encoder, multiple signal cycles are continuously acquired, and the phase difference measurement value and edge transition time measurement value of each encoder channel in each signal cycle are recorded. At the same time, the instantaneous speed of each cycle is obtained through the pulse frequency output by the encoder or an external speed sensor.

[0093] For each encoder channel, extract the median sequence of phase differences from its most recent multiple signal cycles (update the median once per cycle, using a temporary window of length 100).

[0094] Using the signal period sequence as the independent variable and the median phase difference as the dependent variable, the least squares method is used to perform linear regression on the median phase difference sequence to calculate the overall slope of the median phase difference.

[0095] Similarly, calculate the overall slope of the median sequence of edge transition times;

[0096] Set a drift threshold. If the absolute value of the overall slope of the median phase difference is greater than the drift threshold, or the absolute value of the overall slope of the median edge transition time sequence is greater than the drift threshold, then the prediction window type is a sliding window.

[0097] Conversely, if the absolute value of the overall slope of the median phase difference and the absolute value of the overall slope of the median edge transition time sequence are both less than or equal to the drift threshold, then the prediction window type is a fixed window.

[0098] In step two, the process of determining the prediction window length includes:

[0099] If the prediction window type is a sliding window, then:

[0100] The lag period D is defined as the number of periods required for the median to track 63% of the change in the true value from the point where the median begins to change.

[0101] For linear drift, the number of hysteresis cycles is approximately equal to half the window length;

[0102] When the data within the window is uniformly weighted, the rise time of the median step response is approximately 0.5 times the window length.

[0103] The target lag period is set to be no more than ten signal periods. Since the lag period is proportional to the prediction sliding window length, the prediction sliding window length is determined to be twice the target lag period.

[0104] The calculation result is limited to between ten and one hundred: if the number of lag periods of twice the target is less than ten, take ten; if it is greater than one hundred, take one hundred; otherwise, take the calculated value.

[0105] If the prediction window type is a fixed window, then the sliding window length is fixed at one hundred.

[0106] It should be noted that the purpose of determining the prediction window type and prediction window length is to dynamically evaluate the time-varying characteristics of the system and adaptively configure the sliding window length to ensure that subsequent real-time updates have both noise resistance (long window) and fast response capability (short window).

[0107] Step 3: Based on the determined prediction window type and prediction window length, update the median phase difference and median edge transition time of each encoder channel in real time, and calculate the change slope. When the change slope exceeds the threshold, predict the phase difference and edge transition time of the next signal cycle.

[0108] In step three, the process of real-time updating the median phase difference and median edge transition time of each encoder channel includes:

[0109] Each encoder runs continuously. At the end of each new signal cycle, the phase difference measurement value and edge transition time measurement value of each encoder channel within that signal cycle are obtained, as well as the duration of the current signal cycle.

[0110] If the prediction window type is a sliding window, then the calculated prediction sliding window length value is used; if the prediction window type is a fixed window, then the prediction window length value is taken as one hundred.

[0111] For each encoder channel, maintain a circular buffer with a length equal to the prediction sliding window length. Initially, fill it with data from the most recent prediction sliding window length. For each new signal period, push the new phase difference measurement into the phase difference buffer and remove the oldest value. Simultaneously, push the new edge transition time measurement into the edge transition time buffer and remove the oldest value.

[0112] Sort all values ​​in the circular buffer in ascending order to determine the median phase difference and median edge transition time of the current signal period;

[0113] In step three, the process of predicting the phase difference and edge transition time prediction value of the next signal period includes:

[0114] For each encoder channel, extract the data of the most recent K signal cycles from the historical median sequence, where K is the larger of five and one-quarter of the sliding window length;

[0115] The sequence is extracted using the median phase difference of the most recent K signal periods, where the latest value is the median phase difference of the current signal period. The slope of the linear regression is calculated using the least squares method.

[0116] Calculate the mean of the independent variable and the mean of the dependent variable;

[0117] The numerator is the sum of the differences between the period number and the mean of the independent variable, multiplied by the median and the mean of the dependent variable, and the denominator is the sum of the squares of the differences between the period number and the mean of the independent variable. The slope is equal to the numerator divided by the denominator.

[0118] Similarly, calculate the slope of the median edge transition time;

[0119] Set the slope threshold to 0.001 times the current signal cycle duration. Note that the units should be consistent: the current signal cycle duration is in milliseconds and the edge transition time is in microseconds. When making actual comparisons, convert the edge transition time to milliseconds or the threshold to microseconds. That is, the edge slope threshold is equal to the current signal cycle duration in microseconds per cycle.

[0120] If the absolute value of the phase difference slope is greater than the slope threshold, then the median phase difference for the next signal period is predicted to be equal to the median phase difference for the current period plus (phase difference slope × 1); otherwise, the median phase difference for the next signal period is equal to the median phase difference for the current period.

[0121] If the absolute value of the edge transition time slope is greater than the duration of the current signal period in microseconds per cycle, then the median edge transition time of the predicted next signal period = the median edge transition time of the current period + (edge ​​transition time slope × 1); otherwise, the median edge transition time of the predicted next period is equal to the median edge transition time of the current period.

[0122] It should be noted that the role of trend prediction advance compensation is to achieve real-time tracking and advance prediction of feature parameters, effectively compensate for the lag characteristics of the median itself, and enable subsequent clustering to be adjusted based on future states rather than past states.

[0123] Step 4: After normalizing the predicted phase difference and edge transition time of each encoder channel, construct two-dimensional feature points. Perform density clustering on the feature points to obtain multiple clusters, and generate a coarse adjustment reference and individual fine adjustment amount for each cluster. After superimposing the coarse adjustment reference and individual fine adjustment amount, apply them to the phase compensation delay line and edge shaping circuit.

[0124] In step four, the process of constructing the two-dimensional feature points includes:

[0125] For each encoder channel, the horizontal axis is defined as the predicted phase difference value in milliseconds, and the vertical axis is defined as the predicted edge transition time value in microseconds. Since the two have different units, they need to be normalized.

[0126] The normalization factor for the horizontal axis is the duration of the current signal cycle in milliseconds. After normalization, the horizontal axis is equal to the predicted phase difference value divided by the duration of the current signal cycle. It is dimensionless and ranges from zero to 0.5 (because the absolute value of the phase difference does not exceed half a cycle).

[0127] The normalization factor for the ordinate is 0.1 times the duration of the current signal period, in milliseconds. The predicted edge transition time is converted from microseconds to milliseconds and then divided by this factor. That is, the normalized ordinate is equal to the predicted edge transition time divided by 1000 and then divided by 0.1 times the duration of the current signal period, or it is equal to the predicted edge transition time divided by 100 times the duration of the current signal period. It is dimensionless and its value range is usually from 0 to 0.1.

[0128] Finally, the normalized feature points of each encoder channel are obtained, which consist of normalized horizontal coordinates and normalized vertical coordinates;

[0129] In step four, the process of performing density clustering on feature points to obtain multiple clusters includes:

[0130] The cluster radius is set to 0.03, which is dimensionless.

[0131] Calculate the Euclidean distance between all pairs of feature points. The Euclidean distance is equal to the square root of the sum of the squares of the differences in the normalized x-coordinates and the squares of the differences in the normalized y-coordinates.

[0132] For each feature point, count the number of points (including itself) whose distance to the feature is less than the cluster radius. If the number is greater than or equal to two, then the feature point is marked as a core point.

[0133] Connect all core points into connected clusters according to the rule that the distance between them is less than the cluster radius: if the distance between two core points is less than the cluster radius, they belong to the same cluster; if the distance is greater than or equal to the cluster radius, they belong to different clusters.

[0134] Within each cluster, the arithmetic mean of the normalized x-coordinates of all feature points is calculated as the normalized x-coordinate of the cluster center. Then, the cluster center phase difference is obtained by inverse normalization. The cluster center phase difference is equal to the normalized x-coordinate of the cluster center multiplied by the current signal period duration, in milliseconds.

[0135] Similarly, the arithmetic mean of the normalized ordinates of all feature points is calculated as the normalized ordinate of the cluster center. The inverse normalization yields the transition time of the cluster center edge, which is equal to the normalized ordinate of the cluster center multiplied by one hundred times the duration of the current signal period, in microseconds.

[0136] Isolated points that do not contain any core points are considered noise channels and will not be processed for the time being.

[0137] In step four, the process of generating a coarse-tuned delay voltage and a reference charging current for each cluster includes:

[0138] For each cluster, the cluster center phase difference is converted into a coarse-adjustment delay voltage. The coarse-adjustment delay voltage is equal to the cluster center phase difference multiplied by the delay line gain coefficient, which is one volt per millisecond. That is, one volt of control voltage is needed to produce the corresponding delay for each millisecond of phase difference.

[0139] The cluster center edge transition time is converted into a reference charging current. The reference charging current is equal to the nominal charging current plus the difference between the cluster center edge transition time and the nominal edge transition time multiplied by the charging current adjustment coefficient. The nominal charging current is set to 2 mA, the nominal edge transition time is set to 80 microseconds, and the charging current adjustment coefficient is 0.5 mA per microsecond. That is, the edge transition time deviation per microsecond requires an adjustment of 0.5 mA of charging current.

[0140] In step four, the process of generating fine-tuning delay voltage and charging current fine-tuning amounts for each encoder channel within the cluster includes:

[0141] For each encoder channel within a cluster, calculate the phase prediction deviation, which is equal to the predicted phase difference of the encoder channel minus the cluster center phase difference. Calculate the time prediction deviation, which is equal to the predicted edge transition time of the encoder channel minus the cluster center edge transition time.

[0142] The fine-tuning delay voltage is equal to the phase prediction deviation multiplied by the delay line gain coefficient and then multiplied by the phase fine-tuning coefficient, with the phase fine-tuning coefficient set to 0.2.

[0143] The charging current fine-tuning amount is equal to the time prediction deviation multiplied by the charging current adjustment coefficient and then multiplied by the edge fine-tuning coefficient, with the edge fine-tuning coefficient set to 0.3.

[0144] If the encoder channel belongs to a certain cluster, the final delay control voltage is equal to the coarse adjustment delay voltage plus the fine adjustment delay voltage, and the final charging current is equal to the reference charging current plus the charging current fine adjustment amount.

[0145] If the encoder channel is a noise channel, the final delay control voltage will remain at the value of the previous cycle or use the default value, and the final charging current will use the nominal charging current.

[0146] In step four, the process of superimposing the coarse and fine adjustments and applying them to the phase compensation delay line and edge shaping circuit includes:

[0147] The final delay control voltage is sent to the control terminal of the voltage-controlled delay line in the encoder channel. The voltage-controlled delay line applies a corresponding delay to the signal according to the voltage value to complete the phase compensation.

[0148] The final charging current is fed into the charging current source of the encoder channel edge shaping circuit. The shaping circuit adjusts the rising and falling edge steepness of the output signal according to the charging current to complete the edge consistency adjustment.

[0149] The adjustment value is updated once per signal cycle, following the update frequency of the sliding window.

[0150] It should be noted that the role of cluster adjustment is to perform joint clustering based on predicted values ​​and two-dimensional collaborative adjustment, so as to achieve the joint optimization effect of improving phase consistency and edge consistency at the same time in a single clustering, avoiding mutual interference and iterative convergence problems when the two are adjusted independently.

[0151] The technical solution and advantages of this application embodiment are as follows: by collecting the phase difference and edge transition time of each encoder channel and performing stability analysis respectively, it is determined whether there is a coupling discrete problem;

[0152] If present, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and length based on the analysis results, and update the median phase difference and median edge transition time of each encoder channel in real time based on the determined prediction window type and length. Calculate the change slope, and predict the phase difference and edge transition time of the next signal cycle when the change slope exceeds a threshold. After normalizing the predicted phase difference and edge transition time of each encoder channel, construct two-dimensional feature points, perform density clustering on the feature points to obtain multiple clusters, and generate a coarse adjustment reference and individual fine adjustment amount for each cluster. After superimposing the coarse adjustment reference and individual fine adjustment amount, apply them to the phase compensation delay line and edge shaping circuit. This invention identifies coupled discrete problems by calculating the standard deviation of the median sequence of phase difference and the standard deviation of the median sequence of edge transition time for each encoder channel; then, it detects the overall drift slope of the parameters, determines the window response lag period, and adaptively adjusts the sliding window length; next, it updates the median in real time through a circular buffer and predicts the feature value of the next period by linear regression on the recent sequence; finally, it normalizes the predicted values ​​and constructs two-dimensional feature points, generates coarse adjustment benchmarks for each cluster and fine adjustment values ​​for each individual by density clustering, and applies them simultaneously to the phase compensation delay line and the edge shaping circuit. This invention solves the problem of large phase difference dispersion and edge jitter coupling when multiple encoders are used in combination, and the slow drift of feature parameters caused by speed changes or temperature drift, thereby improving the system response speed.

[0153] Example 2: Please refer to Figure 3 As shown in the embodiment of the present invention, a multi-encoder signal conditioning system includes the following modules:

[0154] Coupling Discrete Detection Module: By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, it determines whether there is a coupling discrete problem.

[0155] Prediction window determination module: If it exists, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results;

[0156] Trend prediction module: Based on the determined prediction window type and prediction window length, it updates the median phase difference and median edge transition time of each encoder channel in real time, calculates the change slope, and predicts the phase difference and edge transition time of the next signal cycle when the change slope exceeds the threshold.

[0157] Adjustment generation module: After normalizing the predicted phase difference and edge transition time of each encoder channel, two-dimensional feature points are constructed. Density clustering is performed on the feature points to obtain multiple clusters. Coarse adjustment reference and individual fine adjustment amount are generated for each cluster. The coarse adjustment reference and individual fine adjustment amount are superimposed and applied to the phase compensation delay line and edge shaping circuit.

[0158] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the scope of the present invention.

Claims

1. A method for conditioning signals based on multiple encoders, characterized in that: Includes the following steps: By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, it is determined whether there is a coupling discrete problem. If present, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results; Based on the determined prediction window type and prediction window length, the median phase difference and median edge transition time of each encoder channel are updated in real time, and the change slope is calculated. When the change slope exceeds the threshold, the predicted values ​​of phase difference and edge transition time of the next signal cycle are predicted. Two-dimensional feature points are constructed by normalizing the predicted phase difference and edge transition time of each encoder channel. Density clustering is performed on the feature points to obtain multiple clusters. A coarse adjustment reference and an individual fine adjustment amount are generated for each cluster. The coarse adjustment reference and the individual fine adjustment amount are superimposed and applied to the phase compensation delay line and the edge shaping circuit.

2. The method for conditioning signals based on multiple encoders according to claim 1, characterized in that: The method for determining whether a coupled discrete problem exists is as follows: The reference channel was determined through analysis; The absolute value of the phase difference and the edge transition time of each encoder are continuously collected for multiple signal cycles. The median of the phase difference and the median of the edge transition time of each encoder channel are calculated. The median phase differences of all encoder channels are used to construct a sequence and the standard deviation is calculated. If the standard deviation is greater than 0.02 times the signal period, it is determined that there is a problem of excessive phase difference dispersion. The median edge transition times of all encoder channels are used to construct a sequence and the standard deviation is calculated. If the standard deviation is greater than 0.005 times the signal period, it is determined that there is a problem with poor edge jitter consistency. When both excessive phase difference dispersion and poor edge jitter consistency exist simultaneously, it is determined that there is a coupling dispersion problem.

3. The method for conditioning signals based on multiple encoders according to claim 2, characterized in that: The reference channel is determined as follows: During the stable operation of the encoder at a constant speed, the peak value of the signal amplitude, the jitter width of the signal zero crossing point, and the standard deviation of the edge transition time of each channel are continuously collected in multiple signal cycles. Calculate the average amplitude, zero-crossing jitter index, and edge transition time standard deviation for each channel. After normalization, sum them to obtain the overall channel quality score. Select the channel with the highest score as the initial reference channel. If they are tied, select the channel with the largest average amplitude.

4. The method for conditioning signals based on multiple encoders according to claim 1, characterized in that: The method for determining the prediction window type is as follows: Multiple signal cycles were continuously acquired, and the phase difference measurement and edge transition time measurement of each encoder channel were recorded in each signal cycle. For each encoder channel, extract the median phase difference sequence and the median edge transition time sequence of the most recent multiple signal cycles, and calculate the overall slope of the median phase difference and the overall slope of the median edge transition time using the least squares method, respectively. The drift threshold is set to 0.001 times the initial signal period duration per signal period. If the absolute value of the overall slope of the median phase difference is greater than the drift threshold, or the absolute value of the overall slope of the median edge transition time is greater than the drift threshold, then the prediction window type is a sliding window. Conversely, if the absolute value of the overall slope of the median phase difference and the absolute value of the overall slope of the median edge transition time sequence are both less than or equal to the drift threshold, then the prediction window type is a fixed window.

5. The method for conditioning signals based on multiple encoders according to claim 4, characterized in that: The prediction window length is determined as follows: If the prediction window type is a sliding window, then: The lag period D is defined as the number of periods required for the median to track 63% of the change in the true value from the point where the median begins to change. For linear drift, the number of hysteresis cycles is approximately equal to half the window length; When the data within the window is uniformly weighted, the rise time of the median step response is approximately 0.5 times the window length. The target lag period is set to be no more than ten signal periods. Since the lag period is proportional to the prediction sliding window length, the prediction sliding window length is determined to be twice the target lag period. The calculation result is limited to between ten and one hundred: if the number of lag periods of twice the target is less than ten, take ten; if it is greater than one hundred, take one hundred; otherwise, take the calculated value. If the prediction window type is a fixed window, then the sliding window length is fixed at one hundred.

6. The method for conditioning signals based on multiple encoders according to claim 1, characterized in that: The update process for the median phase difference and median edge transition time of each encoder channel is as follows: At the end of each new signal cycle, the phase difference measurement value and edge transition time measurement value of each channel within the signal cycle and the duration of the current signal cycle are obtained; Based on the determined prediction window type and prediction window length, a circular buffer with a length equal to the prediction window length is maintained for each encoder channel. New values ​​are pushed in and the oldest values ​​are removed. After sorting the buffer in ascending order, the median is taken to obtain the median phase difference and median edge transition time of the current signal period.

7. The method for conditioning signals based on multiple encoders according to claim 6, characterized in that: The prediction method for the phase difference and edge transition time prediction value of the next signal cycle is as follows: For each channel, extract the median sequence of the most recent K periods, where K is the larger of five and one-quarter of the sliding window length; The phase difference slope and edge time slope are calculated using the least squares method. Set the slope threshold to 0.001 times the current signal period duration. If the absolute value of the phase difference slope is greater than this threshold, predict the median phase difference of the next period to be equal to the current value plus the slope; otherwise, it is equal to the current value. The edge time slope threshold is taken as the current signal period duration in microseconds per cycle, and the edge time prediction value is generated after comparison.

8. The method for conditioning signals based on multiple encoders according to claim 1, characterized in that: The process of performing density clustering on feature points to obtain multiple clusters is as follows: Using the phase difference prediction value as the horizontal axis and the edge time prediction value as the vertical axis, the normalization factor of the horizontal axis is taken as the current signal period duration, and the normalization factor of the vertical axis is taken as zero times the current signal period duration, to obtain the normalized feature points. Set the cluster radius to 0.03, calculate the Euclidean distance between all pairs of feature points, count the number of points whose distance is less than the radius, mark the points whose number is greater than or equal to the radius as core points, and connect the core points into connected clusters according to the distance less than the radius. Within each cluster, the arithmetic mean of the normalized coordinates is calculated and then inversely normalized to obtain the cluster center phase difference and cluster center edge time.

9. The method for signal conditioning based on multiple encoders according to claim 8, characterized in that: The process of generating the coarse adjustment baseline and individual fine adjustment amounts is as follows: The coarse-tuned delay voltage is obtained by multiplying the cluster center phase difference by the delay line gain factor of one volt per millisecond. The reference charging current is obtained by subtracting the nominal edge time of 80 microseconds from the cluster center edge time, multiplying it by the charging current adjustment coefficient of 0.5 mA per microsecond, and then adding the nominal charging current of 2 mA. The phase prediction deviation of each channel within the cluster is multiplied by the delay line gain coefficient and then multiplied by the phase fine-tuning coefficient zero-two to obtain the fine-tuning delay voltage; The charging current adjustment amount is obtained by multiplying the time prediction deviation by the charging current adjustment coefficient and then by the edge fine-tuning coefficient of 0.

3. The final delay control voltage is the coarse adjustment delay voltage plus the fine adjustment delay voltage, and the final charging current is the reference charging current plus the charging current fine adjustment amount.

10. A signal conditioning system based on multiple encoders, characterized in that: Includes the following modules: Coupling Discrete Detection Module: By collecting the phase difference and edge transition time of each encoder channel and performing stability analysis, it determines whether there is a coupling discrete problem. Prediction window determination module: If it exists, perform median trend slope analysis on the phase difference and edge transition time of each encoder channel, determine the prediction window type and prediction window length based on the analysis results; Trend prediction module: Based on the determined prediction window type and prediction window length, it updates the median phase difference and median edge transition time of each encoder channel in real time, calculates the change slope, and predicts the phase difference and edge transition time of the next signal cycle when the change slope exceeds the threshold. Adjustment generation module: After normalizing the predicted phase difference and edge transition time of each encoder channel, two-dimensional feature points are constructed. Density clustering is performed on the feature points to obtain multiple clusters. Coarse adjustment reference and individual fine adjustment amount are generated for each cluster. The coarse adjustment reference and individual fine adjustment amount are superimposed and applied to the phase compensation delay line and edge shaping circuit.