An absolute value encoder for low latency optical magnetic signal transmission
By setting an optical encoder and a multi-pole magnetic ring on the motor shaft, and combining synchronous acquisition and coordinate rotation digital calculation, the problem that existing encoders cannot provide high-resolution and low-latency position feedback in high-bandwidth and high-precision scenarios is solved, thereby improving the dynamic performance and stability of the servo system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TITANIUM TIGER ROBOT TECH (SHANGHAI) CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-07
AI Technical Summary
Existing rotary encoders are difficult to provide position feedback with high resolution, absolute position information and low end-to-end delay in high-bandwidth, high-precision closed-loop control and complex operating environments. This results in the dynamic performance and stability of the servo system being limited by the encoder output delay and its time characteristics, which are difficult to compensate for accurately.
By coaxially setting an optical encoder and a multi-pole magnetic ring on the motor shaft, the optical encoder outputs two optical signals, and the magnetic ring outputs a digital absolute angle. The main controller performs synchronous acquisition and processing, and combines coordinate rotation digital calculation and fixed delay modeling to achieve high-resolution multi-turn absolute measurement and low-latency position feedback.
This technology enables high-resolution and multi-turn absolute position measurement while reducing encoder link latency, improving the dynamic performance and stability of the servo system, and ensuring the accuracy and timeliness of position feedback.
Smart Images

Figure CN122062736B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of position measurement technology, specifically to an absolute encoder with low-delay optical-magnetic signal transmission. Background Technology
[0002] With the development of industrial automation and high-end equipment, motor servo control is widely used in industrial robots, semiconductor equipment, precision machine tools, electric transportation, and medical devices. Controllers need to calculate drive commands based on rotor position and speed within a short control cycle. Rotary encoders, as key components for position feedback, directly affect the system's trajectory and stability through their output accuracy and timing characteristics. To achieve absolute position memory and simplify use and maintenance, absolute encoders are widely used in these fields. However, under high speed, high acceleration, and long-term operating conditions, existing products still struggle to balance high resolution, environmental adaptability, and low-latency feedback.
[0003] Existing photoelectric encoders utilize code disk gratings and photoelectric devices to achieve position detection, offering high resolution and good linearity. However, the optical path is sensitive to dust, oil mist, condensation, and vibration. In engineering, improving the signal-to-noise ratio and anti-interference capability is often achieved by increasing the front-end amplification, adding filtering, and shaping and anti-shaking techniques. While these improvements enhance output stability, they introduce propagation delay and group delay. Under high-speed conditions, the incremental signal frequency approaches the circuit's processing capacity limit, potentially requiring a reduction in counting margin and the adoption of a conservative triggering strategy, resulting in a significant time lag between the output position and the actual mechanical position. Magnetoelectric encoders obtain angular information by detecting the magnetic field formed by multi-pole magnetic rings. Their enclosed structure and resistance to contamination make them suitable for installation in harsh environments. However, due to factors such as magnetic field distribution, nonlinearity of the magnetic sensing element, hysteresis, and temperature changes, their absolute position accuracy and resolution are typically lower than those of comparable photoelectric encoders. In practical applications, calibration compensation and digital filtering are often relied upon to improve linearity and repeatability, which also increases computation time, making the position feedback lag more pronounced under high-dynamic conditions.
[0004] Meanwhile, existing photoelectric or magnetoelectric encoders often design sensing, analog conditioning, analog-to-digital conversion, digital computing, and communication interfaces in separate segments. Some products also use general serial or fieldbus protocols with periodic polling and node arbitration mechanisms, making it difficult to accurately predict and compensate for the fixed delay and jitter in end-to-end position feedback. Under conditions with high control bandwidth or large external disturbances, this can easily manifest as phase lag in the closed-loop system, increased trajectory error, and increased risk of oscillation or instability.
[0005] Therefore, the current technical problem is that in application scenarios that require high bandwidth, high precision closed-loop control and have complex operating environments, existing rotary encoders cannot provide timely and accurate position feedback with high resolution, absolute position information, low end-to-end delay and modelable characteristics. As a result, the dynamic performance and stability of the servo system are limited by the encoder output delay and its time characteristics that are difficult to compensate for accurately. Summary of the Invention
[0006] (a) Technical problems to be solved
[0007] To address the shortcomings of existing technologies, this invention provides an absolute encoder with low-latency optical-magnetic signal transmission. Two optical signals are pre-amplified and low-pass filtered before being fed into a synchronous sampling analog-to-digital converter. These signals are then acquired in conjunction with magnetic angle data under a unified clock from the main controller. The main controller uses coordinate rotation digital calculations to resolve the optical subdivision angles, converting the magnetic absolute angles to the same numerical range. It calculates the subdivision cycle number to generate multi-turn absolute positions and performs predictive compensation based on the fixed delay of the processing link, combined with angular velocity, outputting the compensated absolute position. This achieves high-resolution multi-turn absolute measurement and low encoder link latency, solving the technical problems described in the background art.
[0008] (II) Technical Solution
[0009] To achieve the above objectives, the present invention provides the following technical solution:
[0010] An absolute encoder with low-delay optical-magnetic signal transmission includes a photoelectric code disk and a multi-pole magnetic ring coaxially arranged on a motor shaft, a photoelectric sensor array on one side of the photoelectric code disk outputting two optical analog signals, and a magnetic angle sensing chip near the magnetic ring outputting a digital absolute angle.
[0011] After being processed by the analog conditioning circuit, the two optical signals are sent to the synchronous sampling analog-to-digital converter chip. In each control cycle, the encoder main controller triggers the analog-to-digital converter chip to synchronously sample and obtain digital optical sampling values, and reads the digital absolute angle.
[0012] The main controller calculates the optical subdivision angle based on the digital optical sampling value, converts the digital absolute angle to the same range as the optical subdivision angle, determines the cycle number based on the relationship between the two, and generates the absolute position value.
[0013] The main controller determines a fixed delay based on the fixed time of the processing stage, obtains an estimated angular velocity value based on the absolute position values of adjacent cycles, and performs predictive compensation on the absolute position value based on the estimated angular velocity value and the fixed delay. The compensated absolute position value is then output through a synchronous serial interface with a small delay.
[0014] Furthermore, the photoelectric code disk is arranged radially with multiple concentric absolute Gray code channels and grating channels. Each Gray code channel in the photoelectric sensor array is equipped with a set of infrared light-emitting diodes and phototransistors to output absolute encoded signals. The photoelectric code disk and the multipole magnetic ring are aligned with the zero position reference in the circumferential direction through a mechanical positioning structure so that the zero position of the photoelectric code disk and the zero position of the magnetic pole of the multipole magnetic ring are coaxially coincident.
[0015] Furthermore, the magnetic angle sensing chip integrates a Hall element array, a signal conditioning circuit, and a digital interface circuit. The digital interface circuit is connected to the serial peripheral interface of the main controller to output a digital absolute angle covering a range from zero to one revolution. The main controller divides the control cycle based on the internal system clock and sends reading commands to the magnetic angle sensing chip in a fixed sequence within each control cycle to obtain the current digital absolute angle.
[0016] Furthermore, the analog conditioning circuit includes a preamplifier circuit and a low-pass filter circuit respectively configured to correspond to the two optical signals. The preamplifier circuit adopts a high-speed, low-noise operational amplifier to form a transimpedance amplification or in-phase amplification structure. The low-pass filter circuit is an active low-pass filter structure and is cascaded with the preamplifier circuit to amplify the amplitude and limit the spectrum of the two optical signals within the same bandwidth.
[0017] Furthermore, the synchronous sampling analog-to-digital converter chip has two synchronous sampling channels, which are connected to the output terminals of the two optical signals respectively, so as to generate corresponding digital optical sampling values at the same sampling instant. The digital output terminal of the synchronous sampling analog-to-digital converter chip is connected to the main controller through a parallel bus, so that the main controller can read the complete two digital optical sampling values at once in each control cycle.
[0018] Furthermore, the main controller is equipped with a coordinate rotation digital calculation unit. In each control cycle, the coordinate rotation digital calculation unit receives two digital optical sample values output by the synchronous sampling analog-to-digital converter chip, performs coordinate rotation digital calculation, maps the two digital optical sample values into a single-turn optical subdivision angle digital quantity, and provides the optical subdivision angle digital quantity to the main controller to generate absolute position values.
[0019] Furthermore, during the factory calibration phase, the scaling factor is calculated by the main controller when the motor shaft rotates at a low speed and constant speed by continuously acquiring multiple sets of digital absolute angles and optical subdivision angles, and storing them in non-volatile memory based on the correspondence between the signals. During normal operation, the main controller calls the scaling factor to convert the digital absolute angles to obtain the absolute position value.
[0020] Furthermore, when generating absolute position values, the main controller performs consistency verification on the cycle number calculated based on the optical subdivision angle and the digital absolute angle. When the difference between the optical subdivision angle and the angle calculated from the digital absolute angle exceeds the preset tolerance range, the absolute position value is marked as an abnormal value. If the abnormality continues to exceed the preset number of cycles, a backup absolute position value is generated only based on the digital absolute angle.
[0021] Furthermore, the fixed delay is determined by the main controller based on the conversion time of the photoelectric sensor array, analog conditioning circuit, synchronous sampling analog-to-digital conversion chip, and the fixed time of the digital operation and synchronous serial interface transmission timing within the main controller. Each fixed time is obtained by adding the rated processing time given in the device datasheet to the compensation amount measured using a standard position calibration device, and stored in the main controller as a parameter.
[0022] Furthermore, the synchronous serial interface is implemented using the open-source bidirectional synchronous serial encoder interface standard. In each control cycle, the main controller combines the compensation absolute position value, the estimated angular velocity value, and the abnormal flag into a fixed-length data frame, which is then sent to the upper control system in sequence via differential signal lines according to the clock edge specified by the synchronous serial encoder interface standard. A verification field for transmission integrity is set in each data frame.
[0023] (III) Beneficial Effects
[0024] This invention provides an absolute encoder for low-latency optical-magnetic signal transmission, which has the following advantages:
[0025] A photoelectric encoder and a multi-pole magnetic ring are coaxially mounted on the motor shaft. The photoelectric sensor array outputs optical subdivision signals, and the magnetic angle sensor chip outputs digital absolute angles. The two share a unified mechanical zero position, thus obtaining high-resolution subdivision angles and multi-turn absolute position information in a single structure, ensuring that the position can be restored without returning to zero when power is off and then on.
[0026] A high-speed, low-noise preamplifier circuit and a low-pass filter circuit are set in the optical signal path, and an analog-to-digital converter chip with synchronous sampling capability is used to acquire two optical signals at the same time. The main controller performs amplitude and bias self-calibration so that the amplitude of the optical digital signal entering the digital processing is matched, the phase is consistent, and the delay is controlled.
[0027] The main controller is equipped with a coordinate rotation type digital calculation logic to calculate the single-cycle optical subdivision angle of the two synchronously acquired optical digital signals. The angular velocity is estimated based on the difference between the subdivision angles of adjacent cycles. The digital absolute angle of the magnetic angle sensor chip is converted to the subdivision angle numerical domain. The cycle number is determined by comparing the two angles to generate multi-cycle absolute position values. When the comparison deviation exceeds the threshold, the optical and magnetic data consistency judgment and fault-tolerant switching are performed.
[0028] The encoder measures and models the fixed processing time generated by the optical acquisition link, analog-to-digital conversion link, digital computing link, and serial interface transmission link. The main controller uniformly configures these as fixed processing delay parameters. After obtaining the absolute position values and angular velocity estimates of multiple revolutions, the position is forward predicted and compensated based on this fixed processing delay, and the compensated absolute position value is output. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the operation process of the absolute encoder for low-latency optical-magnetic signal transmission according to the present invention.
[0030] Figure 2 This is a schematic diagram of the absolute encoder structure of the present invention;
[0031] Figure 3 This is a schematic diagram of the construction process structure of the absolute encoder of the present invention. Detailed Implementation
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] Please see Figures 1 to 3 This invention provides an absolute encoder for low-latency optical-magnetic signal transmission, comprising:
[0034] Step 1: Construct a coaxial optical-magnetic structure on the motor shaft, and simultaneously obtain subdivided optical signals and single-turn digital absolute angles under a unified mechanical zero-position reference through an optoelectronic encoder, a multi-pole magnetic ring and its corresponding optoelectronic sensor array and magnetic angle sensing chip, providing synchronous and consistent original measurement information for subsequent digital fusion and multi-turn absolute position reconstruction.
[0035] In industrial robot joint motors, direct-drive platform motors, and other applications, encoders are often directly mounted on the motor's tail shaft extension. If the photoelectric code disk and magnetic ring are installed using independent supports or different clamping methods, their relative angle will gradually shift after experiencing temperature changes, long-term vibration, or maintenance disassembly and reassembly. This causes the subsequent optical subdivision angle and the magnetic absolute angle to no longer correspond to the same mechanical zero point, fundamentally compromising the reliability of the coarse-to-fine combination.
[0036] Therefore, it is necessary to construct a stable integrated coaxial structure from the very beginning of the mechanical design, so that the two types of turntables can only be adjusted relative to the axis of rotation, and cannot move independently of each other.
[0037] During the mechanical design phase, the end face and axis of the rotating shaft serve as a unified mechanical zero-position reference. A positioning shoulder and end face step are machined on the rotating shaft. The positioning sleeve is press-fitted onto the rotating shaft via an interference fit. The perpendicularity between the sleeve end face and the shaft axis is achieved through a single turning operation. The photoelectric code disk is fitted onto the outer circle of the positioning sleeve through a precision inner hole, with the back of the code disk resting against the sleeve shoulder. The auxiliary magnetic ring is fitted onto the outer circle of the front end of the positioning sleeve through an inner hole, with its inner end face resting against a specially machined second shoulder. Finally, a common pressure ring and a locking nut secure the photoelectric code disk and magnetic ring together onto the positioning sleeve. During assembly, the axial clamping force is transmitted to the rotating shaft through the positioning sleeve, preventing direct stress deformation on the glass code disk substrate.
[0038] To describe the angular relationships resulting from this assembly, we can introduce the mechanical zero-position angle. Optical zero angle and assembly angle deviation And agree on the mechanical zero angle The corresponding key geometric features of the rotor (such as keyways or locating holes) point to a fixed spatial direction. Therefore, the optical zero-position angle... With mechanical zero angle The interval can be described by the following formula:
[0039]
[0040] Among them, mechanical zero angle : Zero-position orientation of the rotating shaft when used as a geometric reference for the control system; optical zero-position angle The instantaneous orientation of a specific code track on the optical code disk, used for absolute encoding or interpolation reference, relative to a spatial reference; assembly angle deviation. The remaining angular deviation of the photoelectric encoder disk relative to the mechanical zero position during assembly;
[0041] Therefore, the photoelectric encoder and magnetic ring maintain a coaxial and oriented relationship with the rotating shaft for a long time, and the mechanical zero-position angle... It serves as the sole reference angle for the entire encoder system, and the assembly angle deviation... Compressed to a smaller area and recorded once during factory calibration, this lays the foundation for the fusion of subsequent optical and magnetic measurement results in the same angular coordinate system, reducing systematic errors caused by relative looseness during long-term operation.
[0042] Furthermore, after forming a stable coaxial structure, it is necessary to establish a clear zero-position marking system between the photoelectric code disk, magnetic ring, and rotating shaft or housing. The optical zero position, magnetic zero position, and mechanical zero position can be corresponded on-site through visible engraving lines or hole positions. This can be used to check whether the encoder zero position has shifted during factory calibration and subsequent maintenance.
[0043] However, if the photoelectric encoder disk only has internal coding patterns and no exposed markings, and the magnetic ring has no visible angle reference, it can only be positioned by indirect positioning on the tooling, making it difficult to intuitively judge whether the zero position correspondence is correct after assembly.
[0044] However, if a significant angular deviation occurs during the initial assembly, all subsequent optical and magnetic measurements will deviate from the mechanical zero point. Although compensation can be made in the software, once the encoder is removed and reinstalled, the original compensation parameters will be difficult to match with the on-site assembly state. Therefore, a visible zero-point marking system needs to be pre-set in the mechanical design so that the angular correspondence between the mechanical zero point, optical zero point, and magnetic zero point can be verified on-site by visual inspection and simple measuring tools.
[0045] Therefore, a radial zero-position engraving line is machined on the end face of the rotating shaft, an extended engraving line is engraved at the corresponding position on the outer circle of the positioning sleeve, a marking line aligned with a specific encoding boundary of the absolute Gray code is printed on the outer edge of the photoelectric code disk glass substrate, and a marking line corresponding to a certain magnetic pole boundary is laser-etched on the outer edge of the magnetic ring.
[0046] During assembly, align the zero-position mark of the rotating shaft with the preset reference direction, and sequentially adjust the positioning sleeve mark, the photoelectric encoder mark, and the magnetic ring mark until they coincide. Then, tighten them as described above. During factory calibration, the main controller reads the photoelectric and magnetoelectric signals while the rotating shaft is stationary. It records the optical and magnetic angles sampled at this moment as zero-position reference values and stores them together with the angles corresponding to the mechanical zero-position mark in non-volatile memory.
[0047] It is easy to align during initial assembly and convenient to perform zero-position verification and maintenance after long-term operation, avoiding the loss of traceability of zero-position angle relationship due to repeated disassembly or component replacement, and reducing the workload of subsequent calibration.
[0048] After establishing the mechanical zero position of the photoelectric code disk, the photoelectric sensor array is rationally arranged in the circumferential and axial positions of the outer edge of the code disk, so that each photoelectric channel corresponds to a specific Gray code loop or grating area, and the geometric relationship between the light-transmitting slit, the light source illumination area and the photosensitive surface is stabilized, so that the change of optical signal strictly reflects the change of the rotation axis angle.
[0049] During assembly, photoelectric sensor arrays are often soldered onto small circuit boards, which are then fixed to the housing by support pillars. If they are installed only in approximate positions without considering precise correspondence with each track of the code disk, problems may arise such as some channels having light spots deviating from the grating center or some channels being blocked by adjacent tracks. This can lead to uneven optical signal amplitude or even cross-interference. Especially in high-speed motors, if the light spot wobbles at the edge of the code track, the output pulse edge time becomes highly sensitive to axial and radial runout, causing functional jitter.
[0050] Therefore, it is necessary to establish a clear field-of-view geometry in the design so that the center observation angle of each photoelectric channel corresponds strictly to the encoding unit on the code disk.
[0051] The outer edge of the code disk is divided into several concentric rings according to the number of channels. Photosensitive elements are arranged in rows and columns on the substrate. The observation angle corresponding to the center of each photosensitive element is determined through 3D modeling. Available observation angles... and number of ring roads Description of the The correspondence between each photoelectric channel and the encoder:
[0052]
[0053] Among them, observation angle : No. The azimuth angle of the center line of sight of each photoelectric channel relative to the mechanical zero position within the code disk plane; number of loops. The total number of coding units or effective sampling points along the circumferential direction of the code disk; index. : Photoelectric channel number, with a value range from arrive .
[0054] This allows the actual position of the photosensitive element to be aligned with the center of the corresponding coding unit in the 3D model, ensuring that the light-transmitting area of each channel covers the correct code track.
[0055] When using it, by constructing the observation angle A stable mapping between the optical encoder and the encoder unit allows each signal output by the photoelectric sensor array to clearly reflect the optical state of a specific loop. Even under conditions of high-speed rotation and slight mechanical vibration, the optical encoder maintains good edge consistency and amplitude balance.
[0056] After determining the field-of-view relationship of the photoelectric components, the magnetic angle sensing chip is positioned appropriately near the magnetic ring, ensuring that the Hall element array within the chip faces the center of the magnetic ring and obtains a stable magnetic field signal within a certain air gap range. Furthermore, a unified time reference is established through the main controller, aligning the sampling instant of the optical signal with the update instant of the magnetic angle data, ensuring that both types of sensing channels observe the state of the same rotor angle at the corresponding moment.
[0057] If the air gap between the magnetic angle sensing chip and the magnetic ring is too large or the eccentricity is obvious, it will cause uneven magnetic signal amplitude and waveform distortion, thus affecting the absolute angle accuracy. If optical sampling and magnetic data reading are performed independently, a time misalignment will occur between them. Especially when the motor is rotating at high speed, even a time difference of tens of microseconds will correspond to a considerable angle difference, resulting in systematic deviations during subsequent optical-magnetic fusion.
[0058] Therefore, in terms of spatial arrangement, mechanical design ensures that the sensing plane of the magnetic angle sensing chip is concentric with the axis of the magnetic ring, and the air gap is controlled within the target range by adjusting the shims.
[0059] Furthermore, a control period can be introduced to describe the time base. and the Second sampling time The main controller is configured to drive the analog-to-digital converter to acquire optical signals at a fixed cycle, and simultaneously trigger a magnetic angle data readout at a fixed time point within each cycle. The relationship is as follows:
[0060]
[0061] Among them, sampling time : No. The reference time for the main controller to perform optical sampling and magnetic reading within each control cycle; control cycle : Fixed interval time of servo control cycle; sampling sequence number : Controls the loop count, and is a non-negative integer.
[0062] Furthermore, the change of rotor angle over time can be expressed as rotor angular velocity. and mechanical zero angle describe:
[0063]
[0064] Among them, rotor angular position : in the Each sampling time The angle of the rotor relative to the mechanical zero position; the rotor angular velocity. The average rotor speed during this stage can be considered a piecewise constant; mechanical zero-position angle. The meaning is the same as before.
[0065] This ensures that the optical and magnetic channels correspond to the same [channel name] in each sampling period. That is, the rotor position is measured at the same moment.
[0066] In use, by simultaneously controlling the spatial arrangement and sampling time of the magnetic angle sensing chip, the air gap range is stabilized and the magnetic field signal quality is reliable, and a unified control cycle is achieved. and sampling time The definition of this method locks photoelectric signal sampling and magnetic angle reading onto the same time reference, avoiding uncompensable systematic errors caused by time misalignment.
[0067] Step 2: Under a unified time reference, the two weak optical analog signals generated by the photoelectric sensor array are amplified and shaped in amplitude by a preamplifier circuit and a low-pass filter circuit. The synchronous sampling analog-to-digital converter chip is used to convert them into digital optical sample values at the same sampling instant. At the same time, the output of the magnetic angle sensor chip is read to provide low-latency and time-aligned input data for the digital processing stage.
[0068] To address the issues of amplitude compression, rising edge tailing, and phase distortion that easily occur in the first and second phase signals output by the photoelectric encoder during preamplification, the preamplifier circuit is treated as a linear time-invariant network. Group delay is used as a design constraint, and the operational amplifier type, feedback resistor, capacitor matching relationship, and power supply method are determined around this constraint.
[0069] This allows for controllable time alignment of optical information from the same mechanical rotation angle at different frequency components after pre-amplification, avoiding phase errors that are difficult to characterize due to the front-end circuitry during subsequent digital computation.
[0070] The effect of the preamplifier circuit on the optical signal can be abstracted as a transfer function with frequency response. The corresponding phase frequency characteristic can be represented by a phase function, thereby defining the group delay function of the preamplifier stage. ,in ω is the angular frequency.
[0071] Group delay describes the time delay of different frequency components passing through an amplifier circuit, and can therefore be characterized by the following formula:
[0072]
[0073] Where: Front-end group delay The preamplifier circuit at angular frequency The time delay of the phase of the optical signal;
[0074] Front-end phase response The preamplifier circuit at angular frequency The phase offset generated by the input signal; obtained through circuit simulation or frequency response testing;
[0075] angular frequency Angular frequencies corresponding to each frequency component in an optically quadrature signal; phase response of a preamplifier circuit. The group delay function can be obtained through circuit simulation software or network analyzer testing. The phase response is derived with respect to frequency and is used only as a design specification for device selection and parameter configuration.
[0076] In practical processing, the highest operating frequency of the optical signal is first derived based on the maximum target rotational speed and the number of lines on the photoelectric encoder. Then, a high-speed operational amplifier with a sufficient gain-bandwidth product is selected, ensuring that the phase response slope of the amplifier is relatively gentle within the target frequency band, thus compressing the group delay function. The amplitude of fluctuation within the operating frequency band.
[0077] Then, by selecting appropriate feedback resistors and parallel compensation capacitors, the pole positions of the transimpedance amplifier are adjusted so that the front-end bandwidth can cover the optical signal frequency band without excessively amplifying high-frequency noise. Circuit simulation software is used to calculate the effects of different component combinations. The curve is obtained from the above formula. This allows for estimations, enabling the assessment of front-end latency during the design phase, rather than reactive corrections afterward.
[0078] When using it, use the group delay function As a core constraint, the photodiode current signal not only meets the amplitude requirements during amplification, but also its time delay behavior can be quantitatively analyzed and controlled. This helps to ensure that the overall delay between the rotor mechanical angle and the digital angle output can be modeled, avoiding phase distortion that cannot be compensated in the digital domain due to arbitrary combination of front-end components.
[0079] Even after preamplification, the optical signal still carries some high-frequency noise and harmonic components. If it is directly input into the analog-to-digital converter chip, a spectrum folding phenomenon will occur during the discrete sampling process, causing noise in different frequency bands to be folded into the effective frequency band, resulting in a decrease in the accuracy of subsequent digital angle calculation.
[0080] On the other hand, while overly aggressive low-pass filtering can significantly reduce high-frequency components, it exacerbates the phase roll-off of the effective signal, thereby increasing the overall delay. Therefore, by adjusting the cutoff frequency of the anti-aliasing filter... With sampling frequency and maximum mechanical signal frequency Establish constraints to achieve a balance between amplitude and phase.
[0081] The constraint interval is given by the following formula:
[0082]
[0083] Where: Maximum mechanical signal frequency The upper limit of the fundamental frequency of the optical signal, determined by the maximum motor speed and the grating density of the encoder disk; cutoff frequency. The frequency at which the amplitude-frequency response of the anti-aliasing low-pass filter drops to a predetermined proportion.
[0084] sampling frequency The frequency at which the analog-to-digital converter chip performs discrete sampling of the optical signal is set by the main controller and is synchronized with the unified sampling period. Having a relationship .
[0085] The constraint shown makes the cutoff frequency of the anti-aliasing low-pass filter higher than the maximum mechanical signal frequency. This avoids premature attenuation of the amplitude and phase of the effective signal; at the same time, it is below half the sampling frequency, so that noise and harmonics above this frequency point are sufficiently suppressed before entering the sampling process, reducing the risk of aliasing.
[0086] The actual order and topology of the filter can be further determined within this constraint framework, for example, by choosing a second- or third-order active low-pass structure and distributing the poles to achieve a more refined trade-off between phase roll-off and amplitude roll-off.
[0087] As an example: first estimate based on the motor's maximum speed. Then, according to the unified sampling period Obtain the sampling frequency Next, in the circuit design software, select appropriate operational amplifiers and combinations of resistors and capacitors to achieve the target cutoff frequency. During the debugging phase, the drive motor was run at multiple speed points, and the spectra of the pre-amplified signal and the filtered signal were extracted using a spectrum analyzer or software tools to check the signal. Check whether the amplitude and phase characteristics at the point meet the expected constraints. If there is a deviation, correct it by replacing the component or fine-tuning the capacitor value.
[0088] Ultimately, the parameter selection of the anti-aliasing filter can be freed from empirical dependence and become an interpretable constraint within the overall low-latency signal chain design. While suppressing high-frequency noise and aliasing, the phase impact on the effective signal is limited to an acceptable range, facilitating subsequent unified modeling and compensation of the total delay, and enabling the encoder to exhibit stable amplitude-frequency characteristics in high-bandwidth control scenarios.
[0089] After preamplification and anti-aliasing filtering, the first and second phase signals of the optical channel are confined to a predetermined frequency band. However, due to factors such as light source aging, optical axis misalignment, and temperature drift, the DC bias and amplitude ratio of the two signals will still change slowly over time. Without calibration, angle calculations based on the two orthogonal signals will deviate from the ideal circular trajectory, causing elliptical distortion and introducing systematic errors in the subdivided angle calculation.
[0090] Therefore, by setting up an optical channel self-calibration process in the main controller, the bias and amplitude parameters are estimated and normalization transformation is performed using the original digital sequence obtained in multiple sampling periods, so that the signal sent to the subsequent angle calculation is closer to the ideal state in terms of numerical value.
[0091] To characterize this normalization process, a certain optical signal can be expressed in the first... The digital output corresponding to each sampling sequence number is denoted as The DC bias estimated during the calibration phase will be denoted as The amplitude estimate is denoted as Then the normalized dimensionless signal can be written as:
[0092]
[0093] Where: original sampled value The analog-to-digital converter chip has a sampling sequence number of The digital code value output for a specific optical signal at any given time; the offset estimate. During the calibration phase, the estimated DC component of the channel is calculated based on several sampling sequences; the estimated amplitude value is... During the calibration phase, the effective amplitude of the channel is calculated based on the statistical results of the maximum and minimum values in several sampling sequences or based on an orthogonal fitting algorithm.
[0094] Normalized signal : Dimensionless signal value after bias removal and amplitude scaling; amplitude estimation One can use half the difference between the maximum and minimum values of a sampling cycle, or use a binary ellipse fitting algorithm to fit the elliptical trajectory of the optical orthogonal signal, and then extract the amplitude of each channel from the major and minor axis parameters of the ellipse.
[0095] As an example: During the factory or maintenance phase, the encoder rotates the motor at a low, constant speed, and the main controller records the raw sampling sequences of the two optical channels over multiple consecutive sampling periods. And calculate the bias estimate internally. and amplitude estimation value Bias estimation can be achieved by averaging all sampled values over a complete mechanical revolution. Amplitude estimation can be achieved by taking the upper and lower envelopes of the sampled values over a revolution and taking their half difference, or by using a binary fitting method to fit the two signals into an ellipse and then deriving their respective amplitudes from the ellipse parameters.
[0096] After completing the bias and amplitude estimation, the main controller will and Write to non-volatile memory, and during the runtime phase, write each new sample value. Both input signals are normalized according to the above formula, so that the two input signals entering the coordinate rotation digital calculation method are always constrained to a uniform scale in terms of value.
[0097] Through the aforementioned bias and amplitude self-calibration mechanism, the slow-varying offset caused by changes in the light source and assembly of the optical channel is transformed into a set of fixed parameters, so that the subsequent angle calculation process does not have to directly deal with these unstable factors, but always faces a normalized signal trajectory with a similar structure.
[0098] To apply the above normalization process to the simultaneously acquired first and second phase signals, and to ensure that the two signals correspond to a unified time scale in time. It is necessary to select a multi-channel analog-to-digital converter chip with synchronous sampling capability and send its output data to the main controller at a sufficient bit rate.
[0099] During this process, if the data transmission capacity of the digital interface is insufficient, the data within the sampling interval cannot be fully transferred to the main controller, forcing the system to reduce the sampling frequency. Alternatively, the quantization bit width may be compressed, thereby disrupting the balance between the aforementioned sampling frequency, mechanical frequency, and filter cutoff frequency.
[0100] By establishing data link bandwidth With the number of channels Quantization bit width and sampling frequency The coordination relationship between them provides a quantitative basis for the interface design of the analog-to-digital converter chip and the main controller:
[0101]
[0102] Where: data link bandwidth Effective bit transmission rate of the digital interface between the analog-to-digital converter chip and the main controller; Number of channels The number of optical channels that the analog-to-digital converter chip simultaneously samples and outputs, including at least two channels: the first phase signal and the second phase signal; quantization bit width. The number of binary bits used in a single sampling conversion result directly corresponds to the resolution of the analog-to-digital converter chip. Sampling frequency. With uniform sampling period Satisfying Relationships , which represents the number of samples completed per second.
[0103] In selected and Then, determine according to the control strategy. Based on the target range, the required data link bandwidth is then calculated backwards. Based on this, a parallel bus, differential serial interface, or time-division multiplexing structure can be selected. If improvements cannot be made under engineering constraints... Therefore, it is necessary to reallocate the margin between the sampling frequency and the quantization bit width to avoid creating a bottleneck.
[0104] In a preferred embodiment, a multi-channel analog-to-digital converter chip with internal sample-and-hold and channel synchronization triggering functions is selected to control the sampling and conversion of the two optical signals under the same conversion command, ensuring the same sampling sequence number. The corresponding first phase signal and second phase signal come from the same source. The analog-to-digital conversion results are transmitted to the main controller via a parallel interface or a high-speed serial interface, and the specific solution is selected based on the number of pins available on the main controller and its clock resources. For applications with a large number of channels or high resolution, multiple analog-to-digital conversion chips can be connected in a star configuration to multiple high-speed interfaces on the main controller to ensure that the overall data link bandwidth meets the requirement of no loss of data.
[0105] Thus, by quantifying the relationship between data link bandwidth and sampling parameters, it is ensured that the synchronous analog-to-digital conversion process will not become a hidden bottleneck in the entire signal link, and that both optical signals are completely and synchronously sent to the main controller in each sampling period, forming a digital sampling sequence with a clear structure and controllable timing.
[0106] Step 3: The main controller performs coordinate rotation digital calculation on the two synchronously acquired digital optical sample values to obtain the single-circle optical subdivision angle, and forms an angular velocity estimate based on the difference between adjacent samples. At the same time, the digital absolute angle output by the magnetic angle sensor chip is scaled to the same numerical range as the optical subdivision angle. The cycle number is determined by optical-magnetic coarse-fine fusion, and finally, the continuous absolute position value and corresponding angular velocity across multiple circles are generated.
[0107] The optical first phase signal and the second phase signal have been converted into two digital sequences with a uniform sampling period through pre-amplification, active low-pass filtering and amplitude and bias self-calibration. Each sequence corresponds to a curve on the numerical plane that approximates a unit circle trajectory.
[0108] The main controller needs to convert these two orthogonal digital sequences into angle values corresponding to each control cycle, while ensuring that this conversion process has a fixed computation timing and predictable delay so that it can be incorporated into the overall delay model later. Therefore, a coordinate rotation-based digital calculation method is adopted, treating the two orthogonal channels as vector components on the numerical plane. Through a series of shift and addition / subtraction operations, the system gradually approximates the coordinate axes to obtain the corresponding subdivided angles.
[0109] The main controller is numbered in each control cycle as follows: At that time, the normalized first phase sample value is obtained from the optical channel. Second phase sample value We can consider these two coordinates as the x and y coordinates of a point on the numerical plane. Ideally, this point rotates along the vicinity of the unit circle over time, and the main controller needs to... The corresponding optical subdivision angle variables are given above. This relationship can be expressed as follows:
[0110]
[0111] Where: Optical subdivision angle variable In the control cycle numbered At that time, the instantaneous angle is determined jointly by the first and second optical phase signals, and its value range covers a complete angular interval; the normalized sample value of the first phase... In the control cycle numbered At that time, the optical first phase signal is the value after amplitude and bias self-calibration; the second phase normalized sample value. In the control cycle numbered At that time, the value of the second phase optical signal after the same self-calibration process; control cycle number Unified control of indices in periodic sequences.
[0112] In use, the main controller can obtain a clear optical subdivision angle variable from two optical digital samples in each control cycle. This angle not only has high resolution but also exhibits a fixed delay output in terms of timing, providing a reliable angular basis for subsequent angular velocity estimation, optical-magnetic coarse-fine fusion, and delay compensation.
[0113] The main controller should obtain the optical subdivision angle variable. At the same time, the estimated value of angular velocity is calculated based on the angle change between continuous control cycles, and this estimation process is kept numerically stable so that directional misjudgment will not occur under high acceleration conditions.
[0114] Among them, the main controller is in the control cycle numbered as At that time, in addition to calculating the optical subdivision angle variable In addition, it will retrieve the control cycle number from the previous control cycle. Optical subdivision angle variable left over time The difference between the two represents the total angle change within a sampling period. A uniform sampling period is used. After normalization, the estimated average angular velocity within this interval is obtained. The format is:
[0115]
[0116] Where: Estimated angular velocity In the control cycle numbered The average angular velocity is derived from two optical subdivision angle samples; uniform sampling period. The fixed sampling interval used in analog-to-digital conversion and digital processing over time; optical subdivision angle variable. and The meaning is the same as before, corresponding to the angle values of two adjacent control cycles respectively.
[0117] The main controller has an internal ring buffer structure to store the optical subdivision angle variables from the most recent control cycles. At the start of each new control cycle, the main controller stores the current cycle's... Write to the buffer and read from the buffer the data from the previous cycle. Calculated according to the above relationship .
[0118] For cases near the boundary of the entire circle, when When numerically jumping from near the end of a revolution to the beginning of a revolution, the main controller first determines whether the change is a forward or reverse revolution based on the angle range before calculating the difference. If necessary, it adds or subtracts one revolution's angle range to the difference to ensure that the estimated angular velocity direction is consistent with the actual rotation direction. To reduce the impact of quantization noise, the main controller can also internally adjust the values of the most recent [number of] [radius values]. A simple finite-length averaging process is performed to make the angular velocity estimation curve smoother while maintaining responsiveness.
[0119] Therefore, relying on a unified sampling period in terms of time. Maintaining strict correspondence allows for direct use of estimation when considering fixed processing delays. Estimate the angle drift over a delay period.
[0120] Optical subdivision angle variable The subdivision angle is determined by the high-density optical grating, and its value range is divided into subdivision units within one revolution, lacking multi-revolution information; the digital absolute angle variable output by the magnetic angle sensing chip... It directly covers the entire mechanical angle range, but its subdivision capability within a circle is limited by chip resolution.
[0121] To obtain a numerical description with both optical resolution and absolute position information over multiple orbits, it is necessary to integrate the following within the main controller: Mapping to On the same numerical scale, the optical subdivision period number variable is determined based on the difference between the two values on the same scale. This achieves a blend of coarse and fine textures.
[0122] First, a scaling factor variable is introduced. and single-lap subdivision count variables Scaling factor variable Used to measure magnetic absolute angle variables Mapping from the original counting space of the sensor chip to the optical subdivision angle variable Consistent subdivision counting space; single-loop subdivision counting variable The total count range corresponding to the optical subdivision angle within one revolution.
[0123] The main controller can first calculate the magnetic angle at the optical subdivision scale: variables Then, based on the optical subdivision angle variable and The difference between them determines the subdivision period number variable. Its form can be written as:
[0124]
[0125]
[0126] In the formula: magnetic angle scaling represents the variable. In the control cycle numbered At that time, the digital absolute angle variable output by the magnetic angle sensing chip will be... The numerical results mapped to the optical subdivision scale have dimensions that are the same as the optical subdivision angle variable. Consistency; scaling factor variable The scaling factor from the internal encoding space of the magnetic angle chip to the optical subdivision encoding space is a constant determined during factory calibration and written into the main controller; magnetic absolute angle variable. The magnetic angle sensing chip is numbered in the control cycle. The absolute angle value within a circumference output at any time;
[0127] Single-lap subdivision count variable : The total numerical span of the optical subdivision angle over a full circle, corresponding to the maximum subdivision count supported by the optical channel; subdivision period number variable. In the control cycle numbered At that time, the number of the subdivision period in which the optical subdivision angle is located is usually an integer, calculated by rounding. Mapping from a continuous difference space to an integer space.
[0128] During the encoder's factory calibration phase, the main controller records the magnetic absolute angle variables at multiple angular positions by slowly rotating the shaft one revolution. With optical subdivision angle variable The relationship between the variables was determined using a simple linear fitting method to identify the scaling factor variable. and single-lap subdivision count variables And write it to non-volatile memory.
[0129] During operation, at the beginning of each control cycle, the main controller first reads the magnetic absolute angle variable for the current cycle. Calculate Then, using the optical subdivision angle variable of the current period Calculate the subdivision period number variable .
[0130] The main controller achieves scale unification between the magnetic absolute angle and the optical subdivision angle at the numerical level, and uses subdivision period numbering variables. Introducing multi-turn information into the optical subdivision space enables subsequent absolute position reconstruction to combine the advantages of optical resolution and magnetic absoluteness, significantly improving the encoder's usability across multiple turns.
[0131] Each control cycle is numbered as At that time, the subdivided period number variable will be used. With optical subdivision angle variable Combining to construct absolute position variables .
[0132] Furthermore, each subdivision cycle is considered as a subdivision count variable with a length of one lap. The interval, subdivided into period number variables Determine which interval the current location is in, where the optical subdivision angle variable is involved. This indicates the subdivision progress within that interval. The main controller adds the length of the entire interval to the position within that interval to form a continuous absolute position variable spanning multiple intervals. At the same time, the main controller reuses the data from the previous control cycle. Determine whether the current change is within a reasonable range to prevent misjudgment of the number of revolutions under high acceleration or instantaneous disturbances.
[0133] Therefore, in each control cycle, not only the absolute position variable is calculated. Furthermore, the difference between the equivalent magnetic angle and the equivalent optical angle can be calculated.
[0134] Among them, the absolute position variable just calculated is used A corresponding optical angle is derived by inverse calculation and scaled with the magnetic angle of the current period to represent the variable. The two are compared. If the difference is within the preset tolerance band, the optical channel and the magnetic channel are considered to be working in sync. If the difference exceeds the tolerance band for multiple consecutive control cycles, the main controller will trigger an alarm and, depending on the system configuration, select to enter the mode of using only the magnetic absolute angle variable. The simplified absolute position degradation mode can be reconfigured, or the output of position data to the upper control system can be stopped directly, prompting maintenance personnel to check the encoder status.
[0135] As an example: when the encoder operates for extended periods in a robotic welding workstation environment containing oil mist and fine dust, the transmittance of a certain section of the grating may abruptly change due to localized contamination. In this case, the optical subdivision angle variable... When passing through a contaminated area, a short-term distortion change occurs, but the magnetic angle sensing chip's measurement of the magnetic ring is basically unaffected.
[0136] The main controller can quickly identify this distortion through optical-magnetic consistency detection, activate the fault-tolerant strategy, temporarily reduce the reliance on optical channel subdivision information, and base the absolute position variable more on the magnetic absolute angle variable. Based on this, the incorrect subdivision position is avoided from being directly transmitted to the servo control system.
[0137] Thus, through optical-magnetic consistency detection and degraded output strategies, a multi-layered safety boundary is provided for the encoder under complex operating conditions. This reconstruction and detection mechanism enables the present invention to not only possess high-resolution characteristics in multi-turn absolute position output, but also to maintain reliable output to the control system even when encountering local faults or contamination.
[0138] Step 4: The fixed processing time generated by each link of optical acquisition, analog-to-digital conversion, digital calculation and interface transmission is uniformly modeled to obtain fixed processing delay parameters. In each control cycle, the estimated angular velocity value is used to perform forward prediction compensation for the absolute position value of multiple revolutions. The compensated absolute position data and status information are output through a low-latency serial interface, so that the encoder provides feedback to the outside world that is closer to the actual rotor position in time.
[0139] From the moment the measured rotor actually undergoes an angular change until the main controller calculates the absolute position count Then, the count is prepared for output and then encoded into a data frame at the industrial interface and sent out. In this process, there will inevitably be some time intervals introduced by physical devices and digital calculations.
[0140] These time intervals can be considered as steady constants under a specific sampling frequency and fixed algorithm configuration. Without quantization and modeling, it will be difficult to accurately use the estimated angular velocity values in subsequent steps. Constructing Predicted Location Counts .
[0141] The fixed processing delay is broken down into four main parts: optical and magnetic sensing response time. Analog-to-digital conversion processing time Digital processing time and interface sending time During a uniform sampling period Given the given conditions, the four time quantities can be considered constants in engineering that do not change rapidly with rotational speed and load, and the total delay is the sum of them:
[0142]
[0143] Fixed processing delay The total time interval from the occurrence of a rotor angle change to the encoder outputting the corresponding position data through the industrial interface; optical and magnetic sensing response time. The time required for the photoelectric encoder, photoelectric sensor, magnetic ring, and magnetic angle sensing chip to reach a stable electrical signal output after the rotor angle changes includes the carrier response of the photoelectric device, the response of the magnetic element, and the local buffer delay.
[0144] Analog-to-digital conversion processing time The sum of the propagation and holding times of the optical first phase signal and the second phase signal during preamplification, low-pass filtering, and analog-to-digital conversion sampling and conversion is estimated by combining the group delay analysis in step two with the conversion time of the analog-to-digital conversion chip.
[0145] Digital processing time Field-programmable logic devices (FPGAs) or digital signal processing units (DSPs) perform coordinate rotation digital calculations, optical-magnetic coarse-fine fusion, and absolute position counting. Compared with the estimated value of angular velocity The time consumed during the calculation process is converted into time, in units of time.
[0146] Interface sending time The time interval from when the digital processing unit prepares the output data to when the industrial interface protocol completes the transmission of the start, data segment, and end markers of a data frame;
[0147] A model of the sum of fixed processing delays is established by segmenting the signal chain, and then the fixed processing delay is used. By unifying the timing of each stage, the temporal behavior of the entire encoder signal chain, from physical sensing to interface output, becomes calculable and traceable, providing a basis for subsequent use of angular velocity estimation values. Predictive location compensation provides an accurate time reference and a structured framework for re-estimating some sub-items as needed during future on-site maintenance.
[0148] Although fixed processing delay While delays can be estimated during the design phase using component data and clock configuration, variations in assembly tolerances, temperature, power supply conditions, and wiring lengths in actual products can cause discrepancies between the model and the actual delay. If not... Perform factory calibration and predict position counts. There may be a systematic time offset. Therefore, it is necessary to compare the total delay with the reference position source when the encoder is in its finished state. Perform one or more calibrations to align the time parameters in the model with the actual behavior.
[0149] As an example, a reference position testing environment is established on the production line. This environment includes a drive platform with a high-precision reference encoder, the optical-magnetic encoder under test, and a data acquisition system. During testing, the drive platform drives the rotating shaft to change angles according to a preset sequence of actions, and the reference encoder outputs a high-precision position sequence. The encoder under test outputs an absolute position count. Alternatively, an angle sequence calculated using a simple proportional conversion can be used. By aligning the two sequences on the time axis, the stable time offset of the encoder output under test relative to the reference encoder can be obtained, which can be used as the actual fixed processing delay. The estimated values from the replacement design phase are written into the encoder's internal non-volatile memory.
[0150] By introducing a reference location source calibration process during the production phase, and using the measured time offset as a fixed processing delay. The final value ensures that the delay model is no longer merely a theoretical estimate, but is strictly aligned with the actual behavior of the product. This allows for subsequent use of the estimated angular velocity value... When performing predictive position compensation, it can be ensured that the time parameters are highly consistent with the encoder's own characteristics, reducing the predicted position deviation caused by delay estimation errors.
[0151] If the encoder only outputs the absolute position count at the current sampling time When an external servo controller uses this position data, the actual rotor position is still lagging behind the current moment. In high-bandwidth servo applications, this lag directly manifests as reduced phase margin and increased following error.
[0152] Therefore, it is necessary to use angular velocity estimation values inside the encoder. right Perform time-based predictions to output predicted position counts. Represent the current moment as much as possible plus a fixed processing delay The theoretical position of the rotor is determined, thereby numerically offsetting the effect of signal chain delay.
[0153] Angular velocity estimate Already counting with absolute position Given under the same subdivision counting scale, it can be regarded as the change in absolute position count per unit time.
[0154] Therefore, by estimating the angular velocity With fixed processing delay Multiplying these two numbers yields the theoretical increase or decrease in the absolute position count during this delay time. This increase is then added to the current absolute position count. The above yields the predicted position count. :
[0155]
[0156] Where: Predicted position count : In the sampling sequence number is The unified sampling time is used to calculate the fixed-processing delay based on the current absolute position count and angular velocity estimate. Theoretical absolute position count after time; absolute position count : In the sampling sequence number is At any given moment, the total number of subdivision counts accumulated by the rotating body from the mechanical zero position;
[0157] Angular velocity estimate : In the sampling sequence number is At any given time, the absolute position count difference between adjacent sampling periods is divided by the uniform sampling period. The obtained rate of change of count; fixed processing delay The meaning is the same as before;
[0158] The main controller completes within each sampling period. and The calculation is performed, and then a fixed processing delay stored in an internal register is invoked. According to the above relationship, we can obtain Under high-speed rotation conditions, to prevent the estimated angular velocity from being... Because transient disturbances generate abnormal spikes, they can be used in calculation and prediction. Previous estimate Apply a limiting operation to restrict it to the maximum acceleration and deceleration range allowed by the shaft, in order to prevent the predicted position count from producing unexplained jumps in a short period of time.
[0159] As an example, in an embodiment of a joint servo system for a high-load collaborative robot, the encoder, through the internal logic of a field-programmable logic device, operates at a uniform sampling period. The optical subdivision angle calculation, optical-magnetic coarse-fine fusion, and absolute position counting are performed sequentially. and angular velocity estimates The calculation is performed, and then the fixed processing delay that has already been calibrated is invoked. Calculate the predicted location count The servo drive reads from the encoder. Then, it is used as the joint position of this control cycle, and the drive current is generated by combining its own current loop and speed loop algorithms.
[0160] Because the predicted position counting incorporates a fixed processing delay within the encoder, the error curve between the joint position observed by the servo drive and the commanded position is smoother during rapid motion, and the mechanical vibration of the joint during start-up and emergency stop is significantly suppressed. For equivalent implementations using different interface protocols, such as two-wire high-speed interfaces or high-performance industrial Ethernet interfaces, as long as the interface transmission time can be incorporated into the fixed processing delay... The above-described calculation logic for predicting position counts still applies.
[0161] Constructing predicted location counts at a subdivided counting scale Fixed processing delay The effect is estimated as angular velocity within the encoder. Compensation is applied to the medium to make the position output to the servo control system closer to the actual rotor position on the time axis. Thus, while keeping the physical hardware delay constant, the equivalent delay perceived by the control system is significantly reduced, creating space for increasing control bandwidth and reducing following errors.
[0162] Furthermore, complete the predicted location counting. After the calculation, if the start time and frame structure of the data frame are arbitrarily arranged in the interface output stage, additional uncertain delays or jitters will be introduced, which will greatly reduce the effect of the aforementioned fixed processing delay modeling and prediction compensation.
[0163] Therefore, regarding the existing unified sampling period and fixed processing delay This makes the triggering time, bit width allocation, and encoding method of the data frame deterministic, and ensures that the predicted position count carried in each frame is deterministic. Both correspond to the same type of time reference. For situations requiring simultaneous output of angle and count values, an output angle variable calculated from the predicted position count can be appended to the interface frame. However, the conversion relationship should be consistent with the total count of the subdivisions. Maintain consistency:
[0164]
[0165] Where: Output angle variable : In the sampling sequence number is At that time, count according to the predicted position. The converted mechanical angle output value; subdivision total count : Same meaning as before; predicted position count The meaning is the same as before; it is the absolute position prediction value calculated by the encoder at the subdivision counting scale to compensate for fixed processing delays.
[0166] As an example for high-end CNC machine tool spindles, the encoder uses a serial interface protocol with low latency, and the communication frame structure within each control cycle is designed as follows: start bit, status and diagnostic bits, and predicted position count field. Optional output angle field And check bits. The interface state machine inside the field-programmable logic device uses a unified sampling period. The specific phase is the trigger moment, and the predicted position counting for the next cycle is prepared immediately after the data transmission of the previous cycle is completed. This ensures that the transmission time of each frame maintains a fixed offset relative to a unified sampling reference, thereby guaranteeing that the transmission time of newly added interfaces is always included in the fixed processing delay. middle.
[0167] By counting the predicted locations With optional output angle variable Embed low-latency industrial interface data frames with strictly controlled timing, and synchronize the frame trigger time with a unified sampling period. and fixed processing delay This coordination ensures that the encoder's output position data exhibits high consistency in both the temporal and numerical dimensions. The control system can read position information corresponding to the same type of prediction time within a fixed time window in each cycle, reducing additional position errors caused by interface-level uncertainties. Together with the aforementioned prediction compensation, this forms a complete low-latency link from sampling and calculation to output.
[0168] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0169] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0170] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0171] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An absolute encoder for low-delay optical-magnetic signal transmission, characterized in that: include, A photoelectric encoder and a multi-pole magnetic ring are coaxially mounted on the motor shaft. The photoelectric sensor array on one side of the photoelectric encoder outputs two optical analog signals, and the magnetic angle sensing chip near the magnetic ring outputs a digital absolute angle. After being processed by the analog conditioning circuit, the two optical signals are sent to the synchronous sampling analog-to-digital converter chip. In each control cycle, the encoder main controller triggers the analog-to-digital converter chip to synchronously sample and obtain digital optical sampling values, and reads the digital absolute angle. The main controller calculates the optical subdivision angle based on the digital optical sampling value, converts the digital absolute angle to the same range as the optical subdivision angle, determines the cycle number based on the relationship between the two, and generates the absolute position value. The main controller determines a fixed delay based on the fixed time of the processing stage, obtains an estimated angular velocity value based on the absolute position values of adjacent cycles, and performs predictive compensation on the absolute position value based on the estimated angular velocity value and the fixed delay. The compensated absolute position value is then output through a synchronous serial interface with a small delay. The fixed delay is determined by the main controller based on the conversion time of the photoelectric sensor array, analog conditioning circuit, synchronous sampling analog-to-digital converter chip, and the fixed time of digital operation and synchronous serial interface transmission within the main controller. Each fixed time is obtained by adding the rated processing time given in the device datasheet to the compensation amount measured by the standard position calibration device, and stored in the main controller as a parameter.
2. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 1, characterized in that: The photoelectric code disk is arranged radially with multiple concentric absolute Gray code channels and grating channels. Each Gray code channel in the photoelectric sensor array is equipped with a set of infrared light-emitting diodes and phototransistors to output absolute encoded signals. The photoelectric code disk and the multipole magnetic ring are aligned with the zero position reference in the circumferential direction through a mechanical positioning structure so that the zero position of the photoelectric code disk and the zero position of the magnetic pole of the multipole magnetic ring are coaxially coincident.
3. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 2, characterized in that: The magnetic angle sensing chip integrates a Hall element array, signal conditioning circuit, and digital interface circuit. The digital interface circuit is connected to the serial peripheral interface of the main controller to output a digital absolute angle covering the range from zero to one revolution. The main controller divides the control cycle based on the internal system clock and sends reading commands to the magnetic angle sensing chip in a fixed sequence within each control cycle to obtain the current digital absolute angle.
4. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 3, characterized in that: The analog conditioning circuit includes a preamplifier circuit and a low-pass filter circuit, which are respectively set up to correspond to the two optical signals. The preamplifier circuit adopts a high-speed, low-noise operational amplifier to form a transimpedance amplification or non-inverting amplification structure. The low-pass filter circuit is an active low-pass filter structure and is cascaded with the preamplifier circuit to amplify the amplitude and limit the spectrum of the two optical signals within the same bandwidth.
5. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 4, characterized in that: The synchronous sampling analog-to-digital converter chip has two synchronous sampling channels, which are connected to the output terminals of two optical signals respectively, so as to generate corresponding digital optical sampling values at the same sampling instant. The digital output terminal of the synchronous sampling analog-to-digital converter chip is connected to the main controller through a parallel bus, so that the main controller can read the complete digital optical sampling values of the two channels at once in each control cycle.
6. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 5, characterized in that: The main controller is equipped with a coordinate rotation digital calculation unit. In each control cycle, the coordinate rotation digital calculation unit receives two digital optical sample values output by the synchronous sampling analog-to-digital converter chip, performs coordinate rotation digital calculation, maps the two digital optical sample values into a single-turn optical subdivision angle digital quantity, and provides the optical subdivision angle digital quantity to the main controller to generate absolute position values.
7. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 6, characterized in that: During the factory calibration phase, the scaling factor is calculated by the main controller when the motor shaft rotates at a low and constant speed by continuously acquiring multiple sets of digital absolute angles and optical subdivision angles. The scaling factor is then stored in non-volatile memory based on the correspondence between the signals. During normal operation, the main controller calls the scaling factor to convert the digital absolute angles to obtain the absolute position value.
8. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 7, characterized in that: When generating absolute position values, the main controller performs consistency verification on the cycle number calculated from the optical subdivision angle and the digital absolute angle. When the difference between the optical subdivision angle and the angle calculated from the digital absolute angle exceeds the preset tolerance range, the absolute position value is marked as an abnormal value. If the abnormality continues to exceed the preset number of cycles, a backup absolute position value is generated only based on the digital absolute angle.
9. The absolute encoder for low-delay optical-magnetic signal transmission according to claim 8, characterized in that: The synchronous serial interface is implemented using the open-source bidirectional synchronous serial encoder interface standard. In each control cycle, the main controller combines the compensation absolute position value, the estimated angular velocity value, and the abnormal flag into a fixed-length data frame, which is then sent to the upper control system in sequence via differential signal lines according to the clock edge specified by the synchronous serial encoder interface standard. A verification field for transmission integrity is set in each data frame.