Method for measuring subdivision angle of rotation axis of robot servo system
By adjusting the relationship between the sampling clock signal frequency of the analog-to-digital converter and the frequency of the sine and cosine signals output by the encoder, and utilizing the linear and periodic changes in the phase difference, the problems of high hardware cost and slow measurement speed in the existing technology are solved, and high-precision measurement of the subdivision angle of the rotating shaft is realized.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- TANGSHAN COLLEGE
- Filing Date
- 2024-11-04
- Publication Date
- 2026-05-07
AI Technical Summary
In the prior art, the accuracy of rotating axis angle measurement in robot servo systems depends on the increase in encoder lines and analog-to-digital converter bits, resulting in high circuit costs and affecting measurement speed.
By adjusting the sampling clock signal frequency of the analog-to-digital converter to make it a multiple of the frequency of the encoder output sine and cosine signals, and using a CPLD to generate a phase detector to detect the phase difference, linear and periodic changes in the phase difference are achieved for digital correction.
Without increasing hardware costs, the number and speed of sampling points were increased, achieving high-precision measurement of the subdivision angle of the rotating axis and a servo system that adapts to changes in rotational speed.
Smart Images

Figure CN2024129621_07052026_PF_FP_ABST
Abstract
Description
A method for measuring the subdivision angle of a rotating axis in a robot servo system Technical Field
[0001] This invention relates to a method for measuring the subdivision angle of a rotating axis in a robot servo system. It utilizes the linear change in the phase difference corresponding to each cycle of the encoder's sine and cosine signals in the rotating axis angle measurement to perform high-precision digital correction on the sampled values, thereby achieving high-precision measurement of small angles of the robot's rotating axis. This method belongs to the technical field of digital rotating axis angle measurement using analog-to-digital converters and sine and cosine encoders. Background Technology
[0002] The positioning accuracy and angle measurement accuracy of robot servo systems are becoming increasingly demanding. The accuracy of angle measurement in servo systems significantly impacts the servo's response bandwidth and control precision. Incremental sine and cosine encoders are precision sensors used to measure angular displacement and angular velocity, commonly used for measuring the angles of rotating axes in servo systems. The direct tangent calculation method based on sine and cosine encoders is one such common method for measuring rotating axis angles. Sine and cosine encoders are based on grating moiré fringe technology. When the encoder disk rotates with the working shaft, the optical signal is converted into a periodically changing sine wave signal after photoelectric conversion. Each cycle of the signal represents the measured object moving by an angle θ. Recording the output sine wave signal yields the measured angle. The recorded sine wave signal includes both integer and non-integer cycles. For example, when the measured angle is Mθ+θ′, M is the number of cycles of the sine wave signal, and the angle less than one cycle is θ′. If the sine signal moves less than one cycle, the direct tangent calculation method is often used for high-precision phase angle subdivision. The encoder output sine signal is U... s The cosine signal is U c The expressions are as follows:
[0003] (1)
[0004] (2)
[0005] In the above formula, θ′ represents the subdivision angle, which refers to the phase of the sine and cosine waves. The sine and cosine signals output by the encoder are simultaneously sampled by an analog-to-digital converter, according to U s and U c The sampled values can be used to derive θ′ as:
[0006] (3)
[0007] As mentioned earlier, the key technology in the direct tangent calculation method based on sine and cosine encoders is the determination of the subdivision angle, which in turn depends on the high-precision sampling of the encoder's sine and cosine signals. Conventional angle subdivision designs heavily rely on increasing the encoder line count and the number of bits in the analog-to-digital converter, failing to fully utilize the phase difference variation characteristics of the sampled values in digital measurement. This invention proposes a new angle subdivision measurement method that controls the stable phase difference relationship between the sampled signal and the sine and cosine signals, establishing a new approach to digital correction of sampled values in rotating shaft angle subdivision measurement.
[0008] Summary of the Invention
[0009] The purpose of this invention is to provide a method for measuring the subdivision angle of a rotating axis in a robot servo system. The encoder outputs sine and cosine signals with the same frequency. By adjusting the relationship between the sampling clock signal frequency of the analog-to-digital converter and the frequency of the encoder's output sine signal, the phase difference between the sampled values of the sine and cosine signals exhibits a linear change characteristic. This linear change characteristic of the phase difference is used to digitally correct the sampled values, improving the angle subdivision accuracy. This invention offers high measurement accuracy, a simple circuit structure, and ease of implementation. It solves the problems of high circuit cost, high dependence of angle subdivision accuracy on increasing the encoder line count and the analog-to-digital converter bit depth, and the impact on measurement speed in the prior art.
[0010] The technical solution of this invention is:
[0011] A method for measuring the subdivision angle of a rotation axis in a robot servo system includes the following steps:
[0012] ① The frequency of the sampling clock signal is adjustable, so that the frequency of the sampling clock signal of the analog-to-digital converter is a multiple of the frequency of the encoder output sine wave signal with a slight deviation.
[0013] When the frequencies of two signals are multiples of each other and have a small deviation, the phase difference generated by comparing the phases of the two signals exhibits a linear change, and this linear change is periodic. For a simple example, consider a pulse signal f1 with a frequency of 13Hz and a pulse signal f2 with a frequency of 40Hz. 40Hz = 13Hz × 3 + 1Hz, meaning the frequency of signal f2 is three times the frequency of signal f1, with a small deviation of 1Hz. Taking the rising edge of the pulse signal as the moment of phase comparison, and phase overlap as the first comparison, the next phase comparison is as follows: Since signal f2 needs three cycles to be compared with signal f1, the phase difference at the time of the second phase comparison is... And so on, with the phase difference successively reaching 0. s, s, ..., s, s, where 0 indicates that the two signals are in phase. The phase difference between pulse signal f1 and pulse signal f2 will appear periodically in the previous order.
[0014] ② A phase detector is generated using a CPLD to detect the phase difference between the sampling clock signal and the pulse signal generated by the sine wave. The frequency of the sampling clock signal is adjusted so that the phase difference is periodic within one revolution of the encoder as it rotates along the shaft. The computer then stores the phase difference information with periodic characteristics.
[0015] The sinusoidal signal is shaped into a pulse signal, and this pulse signal is compared with the sampling clock signal in terms of phase. This is to store the periodically changing phase difference, because each sampling signal of the analog-to-digital converter moves linearly according to the phase difference. As shown in Figure 1, the sampling signal of the analog-to-digital converter corresponding to sampling point a0 moves to sampling point a1 in the next sinusoidal signal, and the phase difference between sampling points a0 and a1 is Δt. Similarly, the sampling signal of the analog-to-digital converter corresponding to sampling point a1 moves to sampling point a2 in the next sinusoidal signal, and the phase difference between the two sampling points is 2Δt. The reason for this linear change in phase difference is due to the relationship between the frequency values of the two signals mentioned above.
[0016] Further analysis reveals that all sampling points within a single period of a sinusoidal signal move linearly according to their phase differences, as shown in Figure 1. Point b0 moves to point b1, and point b1 moves to point b2, with corresponding phase differences of Δt and 2Δt, respectively. Utilizing this characteristic of the sampled signal moving linearly according to its phase difference, more sampling points can be generated under the same hardware conditions. This sampling method reduces reliance on high-frequency sampling devices, lowers hardware costs, and increases sampling speed. Each change in phase difference signifies a shift in the sampling point. When the phase difference occurs periodically, it means the sampling point has been repeatedly sampled. The encoder generates multiple sinusoidal signals with each rotation of the shaft; these are referred to as a sinusoidal signal group. By allowing the sampling point to perform moving sampling within this sinusoidal signal group, and then repeating the sampling process as the shaft rotates for the next cycle, sampling efficiency is improved. As mentioned earlier, adjusting the frequency relationship between the sampling clock signal of the analog-to-digital converter and the frequency of the encoder's output sinusoidal signal allows for highly efficient repetitive sampling.
[0017] ③ The analog-to-digital converter samples the sine and cosine signals output by the encoder. The sampled value of the sine and cosine signals in each cycle is a sampling unit, and each sampling unit corresponds to a phase difference information. The computer stores the sampling units.
[0018] The direct tangent calculation method requires sampling sine and cosine signals. The sine and cosine signals output by the encoder have the same frequency value, and the cosine and sine signals change synchronously. The linear phase difference characteristic and the characteristic that the sampling points move according to the linear phase difference, as mentioned earlier, also apply to the cosine signal. Each sampling unit corresponds to a phase difference information, as shown in Figure 1. The sampling unit [a1, b1, ...] corresponds to a phase difference Δt, the sampling unit [a2, b2, ...] corresponds to a phase difference 2Δt, and the sampling unit [a3, b3, ...] corresponds to a phase difference 3Δt. When the phase difference repeats, the sampling unit also repeats, which means that the moving sampling is completed.
[0019] ④ The rotation shaft stop signal and the sampling clock signal work together on the phase detector. The valid value output by the phase detector indicates that the sine and cosine values of the encoder linked to the rotation shaft were not sampled and need to be digitized to obtain the final output sine and cosine values.
[0020] The encoder rotates along with the rotating shaft, outputting sine and cosine signals. When the rotating shaft stops rotating, the encoder also stops outputting sine and cosine signals. The moment the rotating shaft stops outputting the sine and cosine signals is the moment the encoder stops outputting the sine and cosine signals. Generally, the last stored sampled value is not the final value of the encoder's output sine and cosine signals. That is, the sampling clock signal of the analog-to-digital converter is difficult to synchronize with the rotating shaft's stop signal. The phase detector detects this asynchrony. As shown in Figure 1, the encoder's sine signal stops at b. x The sampling point b3 of the analog-to-digital converter (ADC) did not coincide with the sampling point b3 of the ADC because the encoder's sinusoidal signal stopped, and the ADC did not generate a sampling point b3. The final sampling point generated by the ADC was b3. x Point a3 before point b, i.e., the stop point of the encoder's sine signal. x The point falls between sampling point a3 generated by the analog-to-digital converter and sampling point b3 that was not generated. Due to the periodicity of the sampling unit, sampling point b3 can be extracted from the sampling unit of the previous cycle.
[0021] ⑤ Using the stored phase difference information and the rotation shaft stop signal, the computer quickly locks onto the sampling unit containing the last sine and cosine signal values output by the encoder, and extracts the last sine signal sample value U from the analog-to-digital converter within the locked sampling unit. a and its next sampled value U b Extract the last cosine signal sample value U from the analog-to-digital converter. c and its next sampled value U d The final sinusoidal signal value U output by the encoder s Take as (U) a +U b ) / 2, the cosine signal value U output by the encoder at the end. cTake as (U) c +U d ) / 2. The computer uses the sine value U s Sum of cosine values U c Find the subdivided perspective.
[0022] As mentioned above, the subdivision angle in the tangent calculation method is arctan(U s / U c This invention achieves U s and U c Low-cost and fast sampling. Through analog-to-digital converter sampling, each sine and cosine signal output by the encoder has its own sampling unit, and each sampling unit corresponds to a phase difference value. As shown in Figure 1, the sampling unit [a1, b1, ...] corresponds to the phase difference Δt, the sampling unit [a2, b2, ...] corresponds to the phase difference 2Δt, and so on. Because the phase difference changes linearly and appears periodically, the sampling unit also appears periodically. Therefore, the computer locks the sampling unit of the last sine and cosine signal value output by the encoder to the same sampling unit as the previous cycle. The reason for locking the sampling unit of the previous cycle is that the sampling unit of the previous cycle contains complete information about the last sine and cosine signal sample value output by the analog-to-digital converter and the sample value at the next moment.
[0023] The main innovation of this invention is that by utilizing the relationship between the sampling clock signal frequency value of the analog-to-digital converter and the output sine and cosine signal frequency values of the encoder, the phase difference corresponding to the sampled values of the sine and cosine signals exhibits linear and periodic characteristics, and the sampling unit composed of the sampled values also exhibits periodicity. This allows for the rapid and low-cost acquisition of sampled values. This invention has a wide measurement range and can perform high-precision dynamic measurement of the subdivision angle of the rotating shaft of a servo system with varying rotation speed.
[0024] The positive effects of this invention are: the instrument structure is simple and easy to implement; under the same sampling hardware conditions, there are more sampling points for sine and cosine signals; by utilizing the stable periodically changing phase difference information and the sine and cosine signal sampling unit, the sine and cosine signal values output by the encoder are quickly digitally corrected; and this periodically linearly changing phase difference is computer-controllable.
[0025] Attached Figure Description
[0026] Figure 1 is a schematic diagram of encoder signal sampling according to the present invention;
[0027] Figure 2 is a block diagram of the rotary axis subdivision angle measurement system of the present invention.
[0028] Detailed Implementation
[0029] The present invention will be further illustrated by the following embodiments.
[0030] As shown in Figure 2:
[0031] In the rotary axis subdivision angle measurement system of this robot servo system, since the sine signal and cosine signal output by the encoder have the same frequency, the system's operation process for the sine signal is also applied to the cosine signal. The following explanation uses the measurement system's operation on the sine signal as an example.
[0032] The computer adjusts the sampling clock signal of the analog-to-digital converter (ADC) to ensure that the frequency of the ADC sampling clock signal is a multiple of the frequency of the encoder's output sine wave signal with a slight deviation, and that the phase difference of the encoder during one revolution of the rotating shaft exhibits periodicity.
[0033] The sinusoidal signal is converted into a pulse signal to provide a pulse comparison signal for generating a periodically linearly varying phase difference. The CPLD in the system performs two functions: one is to compare the rising edge of the pulse signal with the sampling clock signal to perform phase detection and extract the phase difference after phase detection; the other is to perform phase detection between the rotating shaft stop signal and the sampling clock signal. The effective value of the phase detection output indicates that the final sinusoidal signal value output by the encoder linked to the rotating shaft needs to be digitally corrected.
[0034] By observing the periodic changes in phase difference information using a computer, if no periodicity is observed, the computer adjusts the sampling clock signal of the analog-to-digital converter (ADC). This process is equivalent to a closed-loop control process for the phase difference. Once periodic changes in the phase difference occur, the computer stores the phase difference information and the sampled values of the sinusoidal signal. These stored sampled values exhibit the periodicity of the sampling unit. This method, which generates periodic linear changes in phase difference by controlling the frequency relationship between the ADC sampling clock signal and the encoder output sinusoidal signal, can efficiently obtain a large number of sampling points without increasing the cost of the sampling hardware, or can obtain even more sampling points with the same hardware requirements.
[0035] If the sine signal output by the encoder when it stops rotating does not occur at the same time as the sampled signal, the system needs to use a computer to define the sampling interval where the rotating shaft stops, i.e., the computer locks the sampling unit. This sampling unit contains important sampled value information, and the last sampled value is closest to the sine signal value output by the encoder.
[0036] Based on the periodicity of the sampling units and phase differences, the computer locks onto the same sampling units from the previous cycle and extracts the required sampling values from those units. Using the final sampling value and the sampling value from the previous cycle, the computer calculates the final sinusoidal signal value output by the encoder, and then applies the tangent algorithm to determine the subdivision angle of the rotating shaft.
[0037] In the process of subdividing angle measurement, since the relationship between the sampling clock signal frequency value and the sine signal frequency value is controllable, a periodically linearly changing phase difference and periodic sampling units can be generated. The computer can use the phase difference information and sampling unit information to perform fast and efficient digital correction, and then obtain the subdivided angle of the rotation axis of the robot servo system.
Claims
1. A method for measuring the subdivision angle of a rotary axis in a robot servo system: ① The frequency of the sampling clock signal is adjustable, so that the frequency of the sampling clock signal of the analog-to-digital converter is a multiple of the frequency of the sinusoidal signal output by the encoder with a slight deviation; ② Use CPLD to generate a phase detector to detect the phase difference between the sampling clock signal and the pulse signal generated by the sine wave. Adjust the frequency of the sampling clock signal so that the phase difference is periodic within one revolution of the encoder as it rotates along the shaft. Then the computer stores the phase difference information with periodic characteristics. ③ The analog-to-digital converter samples the sine and cosine signals output by the encoder. The sampled value of the sine and cosine signals in each cycle is a sampling unit, and each sampling unit corresponds to a phase difference information. The computer stores the sampling units. ④ The rotating shaft stop signal and the sampling clock signal work together on the phase detector. The effective value output by the phase detector indicates that the sine and cosine values of the encoder linked to the rotating shaft were not sampled and need to be digitized to obtain the sine and cosine values of the final output. ⑤ Using the stored phase difference information and the rotation shaft stop signal, the computer quickly locks onto the sampling unit containing the last sine and cosine signal values output by the encoder, and extracts the last sine signal sample value U from the analog-to-digital converter within the locked sampling unit. a and its next sampled value U b Extract the last cosine signal sample value U from the analog-to-digital converter. c and its next sampled value U d The final sinusoidal signal value U output by the encoder s Take as (U) a +U b ) / 2, the cosine signal value U output by the encoder at the end. c Take as (U) c +U d ) / 2; The computer uses the sine value U s Sum of cosine values U c Find the subdivided perspective.
Citation Information
Patent Citations
Signal subdivision method and subdivision device for sine and cosine encoders, and motor control device
CN102270961A
Photomagnetic absolute encoder and position determination method and device of motion equipment
CN112880712A
Digital precise voltage measurement and waveform sampling method
CN115166346A
High-precision digital measurement method and measurement system for battery pulse charging
CN115932390A
Digital phase difference wind speed measurement method based on ultrasonic waves
CN116930549A