An encoder latency measurement method and apparatus
Patent Information
- Application Number
- CN202611176304.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]本发明旨在至少解决现有技术中存在的技术问题之一,提出一种编码器时延测量方法及装置,通过采用未经过引入时延的硬件处理的原始传感信号作为基准,从物理源头上切断了基准链路自身延时对测量结果的污染,解决了传统对标测试中基准不准的问题
[0034]本发明通过采用未经过引入时延的硬件处理的原始传感信号作为基准,从物理源头上切断了基准链路自身延时对测量结果的污染,解决了传统对标测试中基准不准的问题。本发明能够在复杂工况下稳定、精确地提取出纯硬件传输延时,显著提升了测量结果的置信度与重复性,为高性能运动控制系统的参数整定与误差补偿提供了可靠的技术支撑。
Smart Images

Figure CN122961475A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of measurement technology, and specifically to an encoder delay measurement method and apparatus. Background Technology
[0002] In motion control systems, the signal links of position sensors such as encoders and resolvers typically include hardware processing stages such as filtering, protocol conversion, and analog-to-digital conversion. These stages introduce significant hardware delays. Accurately measuring these delays is crucial for achieving high-precision closed-loop control. Current technologies for delay measurement often use standard sensors as benchmarks for comparison testing. However, on the one hand, the standard sensors themselves often undergo internal signal processing, resulting in unknown inherent delays. This means the benchmark signal is not absolutely zero-delay, thus limiting the upper limit of measurement accuracy. On the other hand, existing methods often directly compare position signal curves. However, since it is difficult to guarantee absolute consistency in the initial physical positions of the two sensors during installation, and position signals are susceptible to integral drift during low-speed or uniform motion, it is difficult to distinguish between initial position deviations and time delays during curve registration, leading to inaccurate or even invalid delay calculations. Summary of the Invention
[0003] This invention aims to solve at least one of the technical problems existing in the prior art by proposing an encoder delay measurement method and device. By using the original sensor signal without hardware processing that introduces delay as a reference, the invention cuts off the pollution of the measurement results by the delay of the reference link itself from the physical source, thus solving the problem of inaccurate reference in traditional benchmarking tests.
[0004] This invention proposes an encoder delay measurement method, the encoder delay measurement method comprising:
[0005] During the dynamic movement of the target object, the measured position signal and the reference position signal are acquired simultaneously.
[0006] The position signal to be measured and the reference position signal are respectively converted into the rate of change signal to be measured and the rate of change signal to the reference;
[0007] Based on the same time axis, time series registration with error minimization is performed on the measured rate of change signal and the reference rate of change signal to determine the time delay of the measured position signal relative to the reference position signal.
[0008] Furthermore, acquiring the reference position signal includes:
[0009] The original analog signal is acquired from the sensor output terminal as the reference position signal; or
[0010] In the bypass group delay processing stage of the digital signal link, the original digital signal is obtained as the reference position signal;
[0011] The group delay processing includes at least one of digital filtering processing, protocol conversion processing, or analog-to-digital conversion processing.
[0012] Furthermore, the acquisition of the raw analog signal from the sensor output includes:
[0013] The incremental analog signal is directly acquired from the rotary transformer as the reference position signal; or
[0014] The raw photoelectric signal, which has not undergone subdivision processing, is acquired from the photoelectric encoder and used as the reference position signal.
[0015] Further, the step of converting the target position signal and the reference position signal into a target rate of change signal and a reference rate of change signal, respectively, includes:
[0016] Perform a first-order or higher-order derivative operation on the position signal to be measured to obtain the rate of change signal to be measured.
[0017] Perform a first-order or higher-order derivative operation on the reference position signal to obtain the reference rate of change signal.
[0018] Furthermore, the step of performing time series registration to minimize the error between the measured rate of change signal and the reference rate of change signal based on the same time axis, in order to determine the time delay of the measured position signal relative to the reference position signal, includes:
[0019] The measured rate of change signal is translated along the time axis, and the sum of squared residuals or cross-correlation function values between the measured rate of change signal and the reference rate of change signal are calculated at each translation position. The translation time interval that minimizes the sum of squared residuals or maximizes the cross-correlation function value is determined as the time delay.
[0020] Furthermore, the step of translating the measured rate of change signal along the time axis and calculating the sum of squared residuals between the measured rate of change signal and the reference rate of change signal at each translation position includes:
[0021] The search iterates through multiple candidate delay values according to a preset search step size. For each candidate delay value, the sum of squared residuals is calculated using the following formula:
[0022] ;
[0023] in, For the sum of squared residuals, The candidate delay value, The total number of sampling points. To shift the measured rate of change signal by the candidate time delay value to the first... The rate of change at each time point The reference rate of change signal at the 1st The rate of change at each time point For the first Each sampling time;
[0024] The candidate delay value that minimizes the sum of squared residuals is selected from all candidate delay values as the delay.
[0025] Furthermore, the step of simultaneously acquiring the target position signal and the reference position signal during the dynamic movement of the target object includes:
[0026] The target object is controlled to perform variable speed motion, acceleration / deceleration motion, or vibration motion with a specific frequency excitation, so that the measured rate of change signal and the reference rate of change signal exhibit time-varying characteristics on the time axis;
[0027] During the motion performed by the target object, the position signal to be measured and the reference position signal are acquired simultaneously.
[0028] Furthermore, after determining the time delay of the measured position signal relative to the reference position signal, the method further includes:
[0029] Perform time compensation processing on the measured position signal based on the time delay; or...
[0030] The time delay is output as a calibration parameter to the motion controller so that the motion controller can compensate for the time delay during motion control.
[0031] The present invention also provides an encoder delay measurement device, including a CNC rotary table and a host computer; a first code disk is provided on the bottom end face of the rotary table, and a first encoder corresponding to the first code disk is provided on the top plate of the CNC rotary table; a second code disk is fixed on the bottom end face of the motor mover of the CNC mounting table, and a second encoder is fixed on the bottom plate of the CNC mounting table corresponding to the second code disk; the host computer adopts the encoder delay measurement method.
[0032] Furthermore, the second code disk is located on the bottom end face of the motor mover near the shaft core, and the second encoder is located directly below the second code disk; an inspection port is provided at the bottom of the base plate, and the second encoder is fixed inside the inspection port.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] This invention uses the raw sensor signal without any hardware processing to prevent time delay as a reference, thus eliminating the contamination of measurement results by the reference link's own delay at the physical source and solving the problem of inaccurate references in traditional benchmarking tests. This invention can stably and accurately extract pure hardware transmission delay under complex operating conditions, significantly improving the confidence and repeatability of measurement results, and providing reliable technical support for parameter tuning and error compensation in high-performance motion control systems. Attached Figure Description
[0035] Figure 1 This is one of the schematic diagrams of the three-dimensional structure of a CNC rotary table.
[0036] Figure 2 This is a schematic diagram of the internal structure of a CNC rotary table.
[0037] Figure 3 This is a schematic diagram of the second encoder mounted on the base plate.
[0038] Figure 4 This is the second schematic diagram of the three-dimensional structure of a CNC rotary table;
[0039] Figure 5 This is a flowchart of the encoder delay measurement method;
[0040] Figure 6 This is a waveform diagram of encoder delay measurement data. Detailed Implementation
[0041] To further illustrate the technical means and effects adopted by this application to achieve its intended purpose, the specific implementation methods, structures, features, and effects according to this application are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "an embodiment" or "an embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0042] The encoder delay measurement device disclosed in this invention includes a CNC rotary table and a host computer. Analog measurement signals from a first encoder and a second encoder are output from the CNC rotary table to the host computer, which then determines the delay parameters of the second encoder based on the analog measurement signals.
[0043] Among them, combined Figures 1-3As shown, the CNC rotary table includes a housing 11, a base plate 12 fixed to the bottom of the housing 11, a top plate 13 fixed to the top of the housing 11, a shaft core 2 located inside the housing 11 and fixedly connected to the inner periphery of the base plate 12, a motor stator 3 fixed to the inner wall of the housing 11, a motor mover 4 coaxially spaced from the motor stator 3, a bearing 5 disposed between the motor mover 4 and the shaft core 2, and a turntable 6 fixedly connected to the motor mover 4. The motor stator 3 drives the motor mover 4 to rotate relative to the shaft core 2 according to the bearing 5, thereby driving the turntable 6 to rotate.
[0044] In some embodiments, an axially overlapping staggered step is provided between the top plate 13 and the turntable 6. A first code disk 81 is provided on the staggered step on the bottom surface of the turntable 6, and a first encoder 7 corresponding to the first code disk 81 is provided on the staggered step of the top plate 13. A second code disk 82 is fixed on the bottom surface of the motor mover 4, and a second encoder 9 is fixed on the bottom plate 12 corresponding to the second code disk 82.
[0045] The code disk, also called a grating disk or encoder disk, rotates together with the motor stator 3 or turntable 6. The encoder, also called a reading head, is set up in correspondence with the code disk. The encoder reads the scale of the code disk to obtain the rotational characteristic parameters of the CNC turntable in real time.
[0046] In this design, the first encoder 7 is a reference encoder with a known time delay, and the second encoder 9 is the encoder under test. The second encoder 9 is mounted on the base plate 12, and an access port 121 is provided at the bottom of the base plate 12. Opening the access port 121 allows the second encoder 9 to be replaced, enabling time delay testing of different encoders under test using a CNC rotary table. Furthermore, the second code disk 82 is located on the bottom end face of the motor mover 4 near the shaft core 2, and the second encoder 9 is located directly below the second code disk 82.
[0047] Please refer to Figure 5 This invention also provides an encoder delay measurement method, the measurement method comprising:
[0048] Step S100: During the dynamic movement of the target object, the position signal to be measured and the reference position signal are acquired simultaneously.
[0049] Specifically, dynamic motion refers to the process by which the motion state of a target object changes over time, such as acceleration, deceleration, or vibration, rather than uniform motion. This is because only under dynamic motion does the rate of change of the position signal have time-varying characteristics, thus providing the necessary information entropy for subsequent time series registration. If the target object is in uniform motion, its rate of change signal is constant, and translation registration will fail to find a unique extreme point, leading to the failure of time delay calculation. Simultaneously, synchronous acquisition requires that the measured position signal and the reference position signal be acquired based on the same time reference to ensure that their alignment on the time axis has physical meaning. Regarding the reference position signal, it is defined as the raw sensor signal without any hardware processing that introduces time delay. This means that the signal directly reflects the instantaneous physical quantity sensed by the sensing element, without undergoing digital filtering, protocol encapsulation, or analog-to-digital conversion, which introduce group delay. This functional definition ensures the absolute authenticity of the reference signal in the time dimension, cutting off the contamination of the measurement results by the reference link's own delay at the source, making it a reliable reference with zero or known delay.
[0050] In this embodiment, a rotary motor is used as the measurement object. A first encoder 7 and a second encoder 9 are installed on the rotary motor. The first encoder 7, which uses time delay confirmation, collects a reference position signal, and the second encoder 9 collects the position signal to be measured simultaneously. Based on the reference position signal and the position signal to be measured, the time delay of the second encoder 9 is measured.
[0051] Step S200: The position signal to be measured and the reference position signal are converted into the rate of change signal to be measured and the rate of change signal to the reference, respectively.
[0052] Specifically, the rate of change signal is the derivative of the position signal with respect to time; it can be the first derivative (e.g., velocity) or a higher-order derivative (e.g., acceleration). Please refer to [reference needed]. Figure 6 The vertical axis, "arcseconds / milliseconds," represents the physical dimension of the rate of change. The core mechanism for converting the position domain signal into a rate of change domain signal lies in using differential operations to eliminate initial state deviations. In actual engineering assembly, it is difficult to guarantee that the initial physical positions of the second encoder 9 and the first encoder 7 are absolutely consistent, and the position signal is easily affected by low-frequency integral drift. If the position curves are directly compared, the algorithm has difficulty distinguishing whether the waveform misalignment is caused by time delay or by initial installation deviation. However, by differentiating the position signal, the initial position deviation is eliminated as a constant term, and the low-frequency trend term is also suppressed, so that the converted rate of change signal retains only the characteristics related to the dynamic response of motion. In this way, the subsequent registration process is only sensitive to time offset, thereby significantly improving the robustness and accuracy of time delay calculation.
[0053] Step S300: Based on the same time axis, perform time series registration to minimize the error between the measured rate of change signal and the reference rate of change signal to determine the time delay of the measured position signal relative to the reference position signal.
[0054] Specifically, time series registration that minimizes error is a general mathematical optimization process, which essentially involves finding the optimal overlap point between the measured rate of change signal and the reference rate of change signal on the time axis. For example... Figure 6 As shown, the blue curve represents the measured rate of change signal, and the orange curve represents the reference rate of change signal. Due to hardware transmission delay, the two curves are significantly misaligned horizontally on the time axis. By translating the measured rate of change signal along the time axis and calculating the degree of difference (e.g., residual sum of squares) or similarity (e.g., cross-correlation function value) between the two curves at each translation position, the matching state can be quantitatively characterized. When the difference metric reaches its minimum or the similarity metric reaches its maximum, it indicates that the two curves have reached the maximum degree of overlap in waveform shape. The corresponding translation time interval is the true hardware delay of the measured position signal relative to the reference position signal. This registration method does not depend on a specific sensor type or specific mathematical formula. As long as the two core conditions of "based on the same time axis" and "error minimization" are met, it falls within the protection scope of this embodiment.
[0055] Through the coordinated execution of steps S100 to S300, this embodiment constructs a complete high-precision time delay measurement logic closed loop. Dynamic motion provides the information entropy required for registration, the original reference signal ensures the purity of the reference system, the rate of change conversion eliminates initial deviation interference, and the error minimization registration criterion accurately locks the time offset. These four steps are indispensable and together solve the dual problems of inaccurate reference and registration disturbance in the prior art, realizing accurate measurement of the hardware time delay of the motion state signal link.
[0056] Specifically, acquiring the reference position signal includes: directly acquiring the raw analog signal from the sensor output as the reference position signal; or, bypassing the group delay processing stage in the digital signal link to acquire the raw digital signal as the reference position signal; wherein, the group delay processing includes at least one of digital filtering processing, protocol conversion processing, or analog-to-digital conversion processing. These two methods correspond to two different hardware implementation paths: direct acquisition in the analog domain and bypassing in the digital domain, respectively, aiming to adapt to the needs of different sensor interfaces and system architectures.
[0057] The first approach involves directly acquiring the raw analog signal from the sensor output, suitable for scenarios where the sensor itself outputs analog signals and the system has an analog acquisition channel. This method completely avoids any digital signal processing at the physical level. Signal transmission is only limited by the propagation speed of the wires and the bandwidth of the analog front-end. The delay it introduces is typically in the nanosecond range, which is negligible compared to the microsecond or even millisecond delays of the encoder signal processing link. Therefore, it can be considered an ideal zero-latency benchmark.
[0058] The second approach involves bypassing the group delay processing stage in the digital signal link, primarily applicable to scenarios where the sensor has integrated digital circuitry or the system only provides a digital interface. In this scenario, although the signal has already undergone preliminary digitization, processing modules that introduce significant phase lag are intentionally skipped through hardware design or firmware configuration. For example, within an FPGA or DSP, the raw data stream after ADC conversion can be directly extracted without passing through an FIR low-pass filter, a Cordic computation unit, or a communication protocol encapsulation layer. The essence of this "bypass" operation is to preserve the digital form of the signal while eliminating artificially introduced computational delays, ensuring that the acquired raw digital signal faithfully reflects the instantaneous sensing state of the sensing element in terms of timestamps.
[0059] Specifically, directly acquiring raw analog signals from the sensor output includes: directly acquiring incremental analog signals from the rotary transformer as reference position signals; or acquiring raw photoelectric signals without subdivision processing from the photoelectric encoder as reference position signals.
[0060] The first encoder 7 can be selected as either a rotary transformer or a photoelectric encoder depending on actual needs. When the first encoder 7 is a rotary transformer, its stator winding directly senses changes in the rotor magnetic field and outputs continuous sine and cosine analog waveforms. These incremental analog signals are direct products of electromagnetic induction and have not undergone any RDC (resolver-to-digital converter) chip processing, therefore they naturally lack the group delay characteristics brought by digital processing algorithms. The processor or its external analog front end can directly sample the sine / cosine signal at high speed and use it as a reference position signal for subsequent time delay calculations. When the first encoder 7 is a photoelectric encoder, its photosensitive element receives the optical signal modulated by the grating disk and outputs the original A / B phase quadrature pulses or analog photocurrent signals. The emphasis here on "without subdivision processing" is because modern high-precision photoelectric encoders typically perform electronic subdivision of the original photoelectric signal internally to improve resolution, and the subdivision circuit often includes filtering and interpolation operations, which introduces a non-negligible fixed delay.
[0061] Furthermore, in this embodiment, the original photoelectric signal before subdivision is selected as the reference. Even though the resolution of this signal is low, its real-time time response is far superior to the high-resolution position signal after subdivision, which precisely meets the special requirement of time delay measurement that "time reference accuracy" is higher than "position amplitude accuracy". Through the above-mentioned signal extraction strategy for specific sensor types, this embodiment ensures that a reliable, delay-free reference signal can be obtained under different hardware configurations, enhancing the applicability and robustness of the technical solution in industrial settings.
[0062] Specifically, the process of converting the measured position signal and the reference position signal into a measured rate of change signal and a reference rate of change signal, respectively, includes: performing first-order or higher-order derivative operations on the measured position signal and the reference position signal, respectively, to obtain the measured rate of change signal and the reference rate of change signal. Specifically, the choice of the order of the derivative operation depends on the signal-to-noise ratio characteristics of the signal and the measurement accuracy requirements. First-order derivative operations convert the position signal into a velocity signal, effectively eliminating the initial position constant deviation caused by different installation angles between the two sensors; higher-order derivative operations (such as second-order derivatives) convert the position signal into an acceleration signal, further suppressing the influence of low-frequency drift trend terms, but are more sensitive to high-frequency noise. Figure 6 As shown, the vertical axis is labeled "arcseconds / milliseconds," which represents the rate of change of angular velocity obtained after first-order differentiation. By mapping position domain information to the rate of change domain, the registration algorithm is no longer limited to the alignment of absolute positions, but focuses on the consistency of dynamic response waveforms, thereby fundamentally decoupling spatial installation errors from time transmission delays and significantly improving the robustness of time delay measurements.
[0063] Based on the same time axis, time series registration is performed to minimize the error between the measured rate of change signal and the reference rate of change signal to determine the time delay of the measured position signal relative to the reference position signal. This includes: translating the measured rate of change signal along the time axis and calculating the sum of squared residuals or cross-correlation function values between the measured and reference rate of change signals at each translation position. The translation time interval that minimizes the sum of squared residuals or maximizes the cross-correlation function value is determined as the time delay. Specifically, the physical essence of this registration process is to search for the optimal matching point of the two signal waveforms in the time dimension. Due to the existence of hardware link delay, the measured rate of change signal has a fixed lag relative to the reference rate of change signal on the time axis. By artificially translating the measured signal in the reverse direction along the time axis, when the translation amount is exactly equal to the actual hardware delay, the peaks, troughs, and zero-crossing points of the two curves will be precisely aligned on the time axis. At this point, the difference metric (such as the sum of squared residuals) between the two reaches a global minimum, or the similarity metric (such as the cross-correlation function value) reaches a global maximum. This registration strategy based on extreme value optimization does not depend on the absolute amplitude accuracy of the signal, but only on the morphological similarity of the waveform. Therefore, it has good immunity to sensor gain error or amplitude attenuation.
[0064] To more accurately quantify the above registration process, as one implementation method, the measured rate of change signal is translated along the time axis, and the residual sum of squares between the measured rate of change signal and the reference rate of change signal at each translation position is calculated. This includes: traversing multiple candidate time delay values according to a preset search step size, and for each candidate time delay value, calculating the residual sum of squares according to the following formula:
[0065]
[0066] in, For the sum of squared residuals, Candidate delay values, The total number of sampling points. To shift the measured rate of change signal by the candidate time delay value to the first... The rate of change at each time point The reference rate of change signal at the 1st The rate of change at each time point For the first At each sampling time point, the candidate delay value that minimizes the sum of squared residuals is selected from all candidate delay values as the delay value.
[0067] Please refer to Figure 6 The blue curve represents the measured rate of change signal. The orange curve represents the baseline rate of change signal. Without translation, due to hardware delay, the blue curve is generally located to the right of the orange curve (i.e., in the direction of time lag). In the formula... That is, the amount of time compensation to be applied, traversed. The process is essentially to slide the blue curve to the left on the time axis, gradually approaching the orange curve. This indicates that the signal to be measured after translation is in The value at time, This represents the value of the reference signal at the same moment; the difference between the two reflects the instantaneous error under the current translation. For all sampling points... From 1 to The sum of the squared errors yields the total residual sum of squares for that candidate time delay value. .when When the time delay is less than the actual time delay, the two curves do not completely overlap, and the residual is relatively large; when When the time delay is greater than the actual time delay, the blue curve passes over the orange curve, and the residual increases again; only when... Precision equals actual hardware latency; the two curves overlap to the greatest extent possible. Find the global minimum value. The point corresponding to this minimum value is... This is the precise delay we seek. The search step size determines the resolution of the delay measurement, and can usually be configured according to the system sampling period or interpolation accuracy. Through this discrete traversal optimization method, even in the presence of measurement noise, the statistical averaging effect of a large number of sampling points can be used to suppress random interference and stably extract the true hardware transmission delay.
[0068] Specifically, during the dynamic motion of the target object, the measured position signal and the reference position signal are acquired simultaneously, including: controlling the target object to perform variable speed motion, acceleration and deceleration motion, or vibration motion with specific frequency excitation, so that the measured rate of change signal and the reference rate of change signal exhibit time-varying characteristics on the time axis; and simultaneously acquiring the measured position signal and the reference position signal during the motion of the target object.
[0069] Specifically, the choice of the aforementioned dynamic motion mode directly determines the convergence and accuracy of the time delay measurement algorithm. The first effective dynamic motion mode is variable speed motion, such as using an S-shaped acceleration / deceleration curve to control the motor shaft rotation. In this mode, the motor's angular acceleration changes continuously with time, causing the converted rate of change signal (i.e., angular velocity) to exhibit smooth, non-linear fluctuations. This rich spectral composition provides sufficient information entropy for error-minimizing registration, avoiding interference from local minima.
[0070] The second effective dynamic motion mode is acceleration / deceleration motion, such as using trapezoidal velocity planning. This mode includes clearly defined acceleration, constant velocity, and deceleration phases, with significant abrupt changes in velocity slope at the transition points. These sharp feature points on the waveform have high recognizability on the time axis, facilitating the registration algorithm to quickly locate the optimal overlap position, making it particularly suitable for testing environments with relatively low signal-to-noise ratios. The third effective dynamic motion mode is vibrational motion with injected specific frequency excitation, such as sinusoidal frequency sweep testing. By injecting sinusoidal position commands with gradually changing frequencies into the motion control system, the target object is forced to reciprocate across a wide frequency band. This method can excite the system's dynamic response at different frequencies, not only helping to measure steady-state time delay but also revealing the phase hysteresis characteristics of sensor links at different frequency bands, making it suitable for precision calibration scenarios with stringent frequency domain performance requirements.
[0071] Specifically, this embodiment further explains the application of the measurement results. After determining the time delay of the position signal to be measured relative to the reference position signal, the method further includes: performing time compensation processing on the position signal to be measured according to the time delay; or, outputting the time delay as a calibration parameter to the motion controller so that the motion controller can compensate for the time delay during motion control.
[0072] Specifically, the above steps construct a complete technical closed loop from "time delay measurement" to "error elimination," enabling measurement results to be directly translated into improved system performance. The first application path is online real-time compensation, where the precise time delay value measured in the aforementioned embodiments is used to dynamically correct the currently acquired position signal in the real-time control loop of the motion equipment. For example, the processor can use this time delay value to estimate the true position feedback value after time delay compensation using a time-lead interpolation algorithm (such as linear interpolation, spline interpolation, or observer-based state prediction); or in the frequency domain control algorithm, a corresponding phase lead element can be introduced based on this time delay value to offset the phase lag caused by the hardware link. The advantage of this online compensation method is that it can eliminate the time misalignment of the feedback signal in real time, effectively reducing the phase margin loss of the closed-loop control system, thereby allowing for increased servo gain and control bandwidth, and significantly improving the dynamic response speed and tracking accuracy of the motion equipment.
[0073] The second application path is offline parameter calibration, which involves persistently storing and configuring the measured delay as a fixed system characteristic parameter. For example, after completing a high-precision delay measurement, the processor can write the delay value into the motion controller's non-volatile memory (such as EEPROM or Flash) or configuration file as part of the motion device's factory calibration data. After subsequent power-on operation or sensor component replacement, the motion controller can directly read this calibration parameter and automatically load the delay compensation coefficient during the internal control algorithm initialization phase, without requiring manual input or repeated execution of complex measurement procedures. This approach is particularly suitable for mass production scenarios or industrial environments with limited maintenance windows, transforming laboratory-level precision measurement results into inherent product performance attributes, significantly reducing debugging costs and ensuring product consistency.
[0074] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for measuring encoder delay, characterized in that, The encoder delay measurement method includes: During the dynamic movement of the target object, the measured position signal and the reference position signal are acquired simultaneously. The position signal to be measured and the reference position signal are respectively converted into the rate of change signal to be measured and the rate of change signal to the reference; Based on the same time axis, time series registration with error minimization is performed on the measured rate of change signal and the reference rate of change signal to determine the time delay of the measured position signal relative to the reference position signal.
2. The encoder delay measurement method according to claim 1, characterized in that, The acquisition of the reference position signal includes: The original analog signal is acquired from the sensor output terminal as the reference position signal; or In the bypass group delay processing stage of the digital signal link, the original digital signal is obtained as the reference position signal; The group delay processing includes at least one of digital filtering processing, protocol conversion processing, or analog-to-digital conversion processing.
3. The encoder delay measurement method according to claim 2, characterized in that, The acquisition of the raw analog signal from the sensor output includes: The incremental analog signal is directly acquired from the rotary transformer as the reference position signal; or The raw photoelectric signal, which has not undergone subdivision processing, is acquired from the photoelectric encoder and used as the reference position signal.
4. The encoder delay measurement method according to claim 1, characterized in that, The step of converting the target position signal and the reference position signal into a target rate of change signal and a reference rate of change signal, respectively, includes: Perform a first-order or higher-order derivative operation on the position signal to be measured to obtain the rate of change signal to be measured. Perform a first-order or higher-order derivative operation on the reference position signal to obtain the reference rate of change signal.
5. The encoder delay measurement method according to claim 1, characterized in that, The step of performing time series registration based on the same time axis to minimize the error between the measured rate of change signal and the reference rate of change signal, in order to determine the time delay of the measured position signal relative to the reference position signal, includes: The measured rate of change signal is translated along the time axis, and the sum of squared residuals or cross-correlation function values between the measured rate of change signal and the reference rate of change signal are calculated at each translation position. The translation time interval that minimizes the sum of squared residuals or maximizes the cross-correlation function value is determined as the time delay.
6. The encoder delay measurement method according to claim 5, characterized in that, The process of translating the measured rate of change signal along the time axis and calculating the sum of squared residuals between the measured rate of change signal and the reference rate of change signal at each translation position includes: The search iterates through multiple candidate delay values according to a preset search step size. For each candidate delay value, the sum of squared residuals is calculated using the following formula: ; in, For the sum of squared residuals, The candidate delay value, The total number of sampling points. To shift the measured rate of change signal by the candidate time delay value to the first... The rate of change at each time point For the reference rate of change signal in the th The rate of change at each time point For the first Each sampling time; The candidate delay value that minimizes the sum of squared residuals is selected from all candidate delay values as the delay.
7. The encoder delay measurement method according to claim 1, characterized in that, The process of simultaneously acquiring the target position signal and the reference position signal during the dynamic movement of the target object includes: The target object is controlled to perform variable speed motion, acceleration / deceleration motion, or vibration motion with a specific frequency excitation, so that the measured rate of change signal and the reference rate of change signal exhibit time-varying characteristics on the time axis; During the motion performed by the target object, the position signal to be measured and the reference position signal are acquired simultaneously.
8. The encoder delay measurement method according to claim 1, characterized in that, After determining the time delay of the measured position signal relative to the reference position signal, the method further includes: Perform time compensation processing on the measured position signal based on the time delay; or... The time delay is output as a calibration parameter to the motion controller so that the motion controller can compensate for the time delay during motion control.
9. An encoder delay measurement device, comprising a CNC rotary table and a host computer; a first code disk is provided on the bottom end face of the rotary table, and a first encoder corresponding to the first code disk is provided on the top plate of the CNC rotary table; a second code disk is fixed on the bottom end face of the motor actuator of the CNC mounting table, and a second encoder is fixed on the bottom plate of the CNC mounting table corresponding to the second code disk; characterized in that, The host computer uses the encoder delay measurement method as described in any one of claims 1-8.
10. The encoder delay measurement device according to claim 9, characterized in that, The second code disk is located on the bottom end face of the motor mover near the shaft core, and the second encoder is located directly below the second code disk; an inspection port is provided at the bottom of the base plate, and the second encoder is fixed inside the inspection port.