PCB type inductive encoder signal error compensation method and device

By implementing small-period and large-period error compensation, offset calibration and gain compensation in PCB-type inductive encoder, the signal error problem caused by the inability to be absolutely leveled between the stator board and the rotor board is solved, and the detection accuracy and installation efficiency of the encoder are significantly improved.

CN119915332AActive Publication Date: 2025-05-02安徽瑞控信光电技术股份有限公司

Patent Information

Application Number
CN202510378150.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-05-02
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

PCB-type inductive encoder has signal error problems in practical applications, including DC bias, amplitude difference and center point offset, which affects the accuracy of the measurement results.

Method used

Through operations such as small-period error compensation and large-period error compensation, offset calibration and gain compensation, the problem that the stator board and the rotor board cannot be absolutely flat, the detection accuracy of the encoder during angle detection is significantly improved.

Benefits of technology

It significantly improves the accuracy of SIN voltage signals and COS voltage signals, improves the accuracy of encoder angle measurement, shortens the sensor installation time, and maintains stable signal output during long-term operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119915332A_ABST
    Figure CN119915332A_ABST
Patent Text Reader

Abstract

The invention discloses a PCB type inductive encoder signal error compensation method and device, and the method comprises the steps: obtaining voltage original waveform signals in a plurality of corresponding signal sampling periods when a rotor plate rotates a circle, the voltage original waveform signal comprises a sinusoidal voltage signal corresponding to the inner-ring sinusoidal coil and a cosine voltage signal corresponding to the outer-ring sinusoidal coil; obtaining a small-period error compensation curve and a large-period error compensation curve based on the maximum value and the average value of the peak difference of the sine voltage signal and the cosine voltage signal in a plurality of signal sampling periods, and performing small-period error compensation and large-period error compensation on the voltage original waveform signal; wherein the small-period error compensation is used for compensating the peak difference error of the sine voltage signal and the cosine voltage signal in each signal sampling period, and the large-period error compensation is used for compensating the peak difference error of the sine voltage signal and the cosine voltage signal when the rotor plate rotates by one circle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of detection technology, and in particular to a PCB type inductive encoder signal error compensation method and device. Background Art

[0002] In the field of modern industrial automation and precision control, the accuracy of angle measurement is crucial to improving system performance. PCB-type inductive encoders have been widely used in the field of angle measurement due to their simple structure, fast response speed, and strong anti-interference ability. This sensor is manufactured using PCB technology, which can achieve a smaller sensor thickness, complex coil shape, and good batch consistency, which has obvious advantages over traditional winding sensors. At present, PCB-type inductive encoders are widely used in the automotive, automation, laser testing, and aerospace fields.

[0003] However, PCB inductive encoders also face the problem of signal errors in practical applications. In actual use, due to the imperfections in the manufacturing, installation, wiring, signal processing and other aspects of the sensor, errors such as DC bias, amplitude inequality and center point offset will be introduced; the existence of the above errors seriously affects the accuracy of the measurement results and limits the further performance of the sensor. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a PCB type inductive encoder signal error compensation method and device. In view of the problem that the stator and the rotor of the encoder cannot be absolutely installed flat in actual applications, the detection accuracy of the encoder during angle detection is significantly improved through small cycle error compensation and large cycle error compensation, and the installation time of the sensor is shortened.

[0005] In order to solve the above technical problems, a first aspect of an embodiment of the present invention provides a PCB type inductive encoder signal error compensation method, the PCB type inductive encoder comprises a stator plate and a rotor plate, the stator plate comprises: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil constitute an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil constitute an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have the same number of periods and are spatially orthogonal, the rotor plate comprises: an outer ring metal foil assembly and an inner ring metal foil assembly, the compensation method comprises the following steps: Acquire voltage original waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, wherein the voltage original waveform signals include: a sinusoidal voltage signal corresponding to the inner ring sinusoidal coil and a cosine voltage signal corresponding to the outer ring sinusoidal coil; Based on the maximum and average values ​​of the peak differences between the sine voltage signal and the cosine voltage signal within a number of signal sampling periods, a small cycle error compensation curve and a large cycle error compensation curve are obtained, and small cycle error compensation and large cycle error compensation are performed on the voltage original waveform signal; Among them, the small cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

[0006] Furthermore, after obtaining the voltage original waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, the method further includes: Performing offset calibration on the original voltage waveform signal, and offsetting the center points of the sine voltage signal and the cosine voltage signal to align with the 0 point respectively; The voltage original waveform signal after the offset calibration is subjected to gain compensation, and the amplitudes of the sine voltage signal and the cosine voltage signal are compensated to be the same value, and the phase difference between the sine voltage signal and the cosine voltage signal is 90°.

[0007] Further, the offset calibration of the voltage original waveform signal includes: Respectively obtaining the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal; Based on the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal, respectively obtaining offset calibration signals of the sine voltage signal and the cosine voltage signal; The offset calibration signal of the sinusoidal voltage signal is: ; ; in, is the maximum amplitude of the sinusoidal voltage signal, is the minimum amplitude of the sinusoidal voltage signal, is the offset calibration signal of the sinusoidal voltage signal, is the original signal of the sinusoidal voltage signal; The offset calibration signal of the cosine voltage signal is: ; ; in, is the maximum amplitude of the cosine voltage signal, is the minimum amplitude value of the cosine voltage signal, is the offset calibration signal of the cosine voltage signal, is the original signal of the cosine voltage signal.

[0008] Further, performing gain compensation on the voltage original waveform signal after offset calibration includes: Acquire the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate, and obtain the maximum value and the minimum value of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods; The offset calibration signal of the sinusoidal voltage signal or the cosine voltage signal is used as a gain reference signal, and the maximum and minimum values ​​of the sinusoidal voltage signal and the cosine voltage signal of several signal sampling periods are combined to calculate the gain compensation coefficient of the cosine voltage signal or the sinusoidal voltage signal, and gain compensation is performed on the cosine voltage signal or the sinusoidal voltage signal so that the amplitudes of the sinusoidal voltage signal and the cosine voltage signal after gain compensation are the same.

[0009] Further, the acquiring of the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate, and obtaining the maximum and minimum values ​​of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods, comprises: Acquire the amplitude of the sinusoidal voltage signal of several signal sampling periods, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is less than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output the amplitude of the sinusoidal voltage signal of the previous signal sampling period, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output 0, and the maximum amplitude of the sinusoidal voltage signal can be known from the maximum values ​​of several output results; Acquire the amplitude of the sinusoidal voltage signal of several signal sampling periods, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output the amplitude of the sinusoidal voltage signal of the previous signal sampling period, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is less than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output 0, and the minimum value of the amplitude of the sinusoidal voltage signal can be known from the minimum values ​​of several output results; Acquire the amplitude of the cosine voltage signal of several signal sampling periods, when the amplitude of the cosine voltage signal of the next signal sampling period is less than the amplitude of the sine voltage signal of the previous signal sampling period, output the amplitude of the cosine voltage signal of the previous signal sampling period, when the amplitude of the cosine voltage signal of the next signal sampling period is greater than the amplitude of the cosine voltage signal of the previous signal sampling period, output 0, and the maximum amplitude of the cosine voltage signal can be known from the maximum values ​​of several output results; The amplitudes of the cosine voltage signal of several signal sampling periods are obtained. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is greater than the amplitude of the cosine voltage signal of the previous signal sampling period, the amplitude of the cosine voltage signal of the previous signal sampling period is output. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is less than the amplitude of the cosine voltage signal of the previous signal sampling period, 0 is output. The minimum amplitude of the cosine voltage signal can be known from several output results.

[0010] Furthermore, the gain compensation coefficient The calculation formula is: ; in, is the maximum amplitude value of the sinusoidal voltage signal in a number of signal sampling periods, is the minimum amplitude value of the sinusoidal voltage signal in a number of signal sampling periods, is the maximum amplitude value of the cosine voltage signal in a number of signal sampling periods, It is the minimum amplitude value of the cosine voltage signal in several signal sampling periods.

[0011] Furthermore, the performing small cycle error compensation on the voltage original waveform signal includes: The sinusoidal voltage signal is used as a voltage reference signal, and the peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained to obtain the maximum value of the peak value difference and the average value of the peak value difference in several signal sampling periods; Based on the maximum value of the peak difference, a compensation angle value of a small period error compensation curve is obtained; Based on the peak difference average value, calculating the amplitude coefficient of the small cycle error compensation curve; Based on the compensation angle value and amplitude coefficient of the small cycle error compensation curve, a fitting expression of the small cycle error compensation curve is obtained. The fitting expression of the small cycle error compensation curve is: for: ; ; in, is the average value of the small cycle peak difference, is the maximum amplitude of the small cycle of the sinusoidal voltage signal, is the small cycle amplitude coefficient, is the small cycle compensation angle value, is the actual angle value of the rotation of the rotor plate relative to the stator plate.

[0012] Furthermore, the large period error compensation of the voltage original waveform signal includes: The sinusoidal voltage signal is used as a voltage reference signal, and a peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained to obtain a maximum value of the peak value difference in several signal sampling periods; Based on the maximum value of the peak difference, a compensation angle value of a large period error compensation curve is obtained; Based on the peak difference average value, calculating the amplitude coefficient of the large period error compensation curve; Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, a fitting expression of the large period error compensation curve is obtained. The fitting expression of the large period error compensation curve is: for: ; ; in, is the average value of the large cycle peak difference, is the maximum value of the large cycle amplitude of the sinusoidal voltage signal, is the large cycle amplitude coefficient, is the large cycle compensation angle value, is the actual angle value of the rotation of the rotor plate relative to the stator plate.

[0013] Accordingly, a second aspect of an embodiment of the present invention provides a PCB type inductive encoder signal error compensation device, the PCB type inductive encoder comprises a stator plate and a rotor plate, the stator plate comprises: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil constitute an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil constitute an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have the same number of periods and are spatially orthogonal, the rotor plate comprises: an outer ring metal foil assembly and an inner ring metal foil assembly, the compensation device comprises: A signal acquisition module, which is used to obtain the voltage original waveform signal within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, wherein the voltage original waveform signal includes: a sinusoidal voltage signal corresponding to the inner ring sinusoidal coil and a cosine voltage signal corresponding to the outer ring sinusoidal coil; A signal compensation module, which is used to obtain a small cycle error compensation curve and a large cycle error compensation curve based on the maximum value and average value of the peak difference between the sine voltage signal and the cosine voltage signal in several signal sampling periods, and perform small cycle error compensation and large cycle error compensation on the voltage original waveform signal; Among them, the small cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

[0014] Accordingly, a third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the above-mentioned PCB type inductive encoder signal error compensation method.

[0015] Correspondingly, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned PCB type inductive encoder signal error compensation method.

[0016] The above technical solution of the embodiment of the present invention has the following beneficial technical effects: 1. Through small-cycle and large-cycle error compensation, offset calibration, and gain compensation, the error caused by the encoder stator plate and rotor plate not being able to be absolutely leveled is effectively eliminated. Small-cycle error compensation targets the peak difference error within each signal sampling cycle, and large-cycle error compensation solves the overall peak difference error of the rotor plate rotating one circle. Offset calibration aligns the signal center point to 0, and gain compensation makes the signal amplitude the same and the phase difference 90°. The combined effect significantly improves the accuracy of the SIN voltage signal and the COS voltage signal, thereby improving the accuracy of the encoder angle measurement; 2. During the entire error compensation process, the original voltage waveform signal is processed comprehensively and carefully. Whether it is error compensation based on signal peak difference or calibration of signal offset and gain, it helps to reduce signal fluctuations and uncertainties, so that the encoder can maintain stable signal output during long-term operation, reduce fluctuations in measurement results caused by signal errors, and provide stable and reliable angle information for devices and systems that rely on encoder signals, thereby enhancing the stability and reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1Schematic diagram of the structure of a PCB-type inductive encoder provided by an embodiment of the present invention; Figure 2 is a flow chart of a PCB type inductive encoder signal error compensation method provided by an embodiment of the present invention; Figure 3 It is a signal schematic diagram of a voltage original waveform, an offset calibration waveform and a gain compensation waveform provided by an embodiment of the present invention; Figure 4 is a schematic diagram of a signal after small period error compensation provided by an embodiment of the present invention; Figure 5 is a schematic diagram of a signal after large period error compensation provided by an embodiment of the present invention; Figure 6 Schematic diagram of a PCB-type inductive encoder test provided by an embodiment of the present invention; Figure 7 is a schematic diagram for comparing error curves provided by an embodiment of the present invention; Figure 8 is a schematic diagram comparing error curves before and after small period error compensation provided by an embodiment of the present invention; Fig. 9 is a schematic diagram of an error curve after large period error compensation provided by an embodiment of the present invention; Fig.10 is a schematic diagram of an original error and a compensated error curve provided by an embodiment of the present invention; Fig.11 It is a module block diagram of a PCB type inductive encoder signal error compensation device provided in an embodiment of the present invention.

[0018] Reference numerals: 1. Signal acquisition module, 2. Signal compensation module. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0020] The PCB type inductive encoder in the present invention is mainly composed of a stator plate and a rotor plate. Figure 1, the stator plate structure is divided into two groups of sensor channels, the inner and outer rings; among them, the outer ring coil and the outer ring sinusoidal coil constitute the outer ring sensor channel, the inner ring coil and the two groups of inner ring sinusoidal coils constitute the inner ring sensor channel, the inner and outer ring two groups of sinusoidal coils have the same number of periods and are orthogonal in space, called SIN coils and COS coils. The combination of the two groups of sensor channels can achieve absolute angle measurement. In order to increase the distribution area and density of the magnetic field, the outer ring adopts a sinusoidal coil with a period of 16, and the inner ring adopts a sinusoidal coil with a period of 1. The stator plate structure is as follows Figure 1 The rotor plate structure is also divided into inner and outer ring magnetic field sensing areas. The outer ring is composed of 16 fan-shaped metal copper foils, and the inner ring is composed of 1 semicircular metal copper foil, which are evenly distributed on the PCB board. The rotor plate structure is as shown in FIG. Figure 1 As shown in 1b of the figure, for the subsequent processing circuit of the sensor, the IPS2550 angle sensor chip and the STM32H723 main control chip can be used to improve the detection accuracy.

[0021] The sensor based on the above-mentioned PCB-type inductive encoder adopts the amplitude detection signal processing method to resolve the displacement, with the annular coil as the excitation coil and the sinusoidal coil as the induction coil. A high-frequency AC excitation source is simultaneously passed through the annular excitation coils of the inner and outer rings. At this time, the excitation coil will generate a continuous alternating magnetic field, and the receiving coil will achieve zero output on each pair of ports after compensating the induced voltage. If the rotor plate is placed above the stator plate, the conductor will generate an induced voltage under the action of the electromagnetic field. In the absence of a rotor, due to the anti-serial connection and balance between the line segments, the magnetic field induces eddy currents on the surface of the metal target, and the eddy currents generate an anti-magnetic field, thereby reducing the total magnetic flux density below, thereby reducing the induced voltage in the receiver coil area below the target, thereby generating a voltage imbalance in the anti-serial coil, and outputting a voltage signal, whose amplitude and polarity change with the target position.

[0022] The annular coil is used as an excitation coil. When an alternating current is passed through the annular coil, an approximately uniform radially symmetrical alternating magnetic field can be generated. The rotor is made of conductive material, which generates eddy currents in the alternating magnetic field generated by the excitation coil. The eddy currents will weaken the magnetic lines of force perpendicular to the rotor plane where the rotor is covered, and the magnetic field amplitude at the corresponding position will also decrease. Therefore, there is a difference in the magnetic field amplitude between the rotor covered and uncovered positions, and this difference will be sensed by the receiving coil. As the rotor rotates, the induced voltage of the receiving coil changes accordingly, realizing the induction of the angle change. The receiving coil is composed of an even number of coils with opposite polarities arranged radially symmetrically around its center, so that when there is no external interference, the total induced electromotive force generated by the receiving coil is always 0, but after the rotor rotates, due to the presence of eddy currents in the rotor, the induced voltages in the coils with opposite polarities are different, so the generated induced electromotive forces cannot cancel each other out, and as the rotor rotates, the generated induced electromotive force will also be different, so the angle of rotation of the rotor can be judged according to the magnitude of the induced electromotive force of the receiving coil.

[0023] In an optional embodiment, the circuit of the sensor mainly includes an excitation circuit, a demodulation circuit, an analog-to-digital conversion circuit and a main control circuit. The excitation circuit generates the sine signal required by the excitation coil, the demodulation circuit demodulates the modulation signal (sine and cosine signals reflecting the angle) from the amplitude modulation wave, and the analog-to-digital conversion circuit converts the modulation signal into a digital signal that can be recognized by the main control circuit. The main control circuit not only controls the excitation circuit, the demodulation circuit and the analog-to-digital conversion circuit, but also performs an inverse tangent operation based on the obtained sine and cosine data to obtain and output the angle information. The angle formula is the encoder angle As shown, is the AD sampling value of the sinusoidal coil (SIN coil), It is the AD sampling value of the sinusoidal coil (COS coil).

[0024] Ideally, the amplitudes of the SIN coil and COS coil should be equal and the phase difference should be 90° after the analog-to-digital conversion circuit. However, in actual situations, whether it is the manufacturing, installation, wiring, or signal processing of the sensor, it is possible that the amplitudes of the sine voltage signal and the cosine voltage signal are not equal and the phase difference is not 90° after the analog-to-digital conversion. These problems will cause the sensor to introduce errors in measurement.

[0025] Please refer to Figure 2A first aspect of an embodiment of the present invention provides a PCB type inductive encoder signal error compensation method, the PCB type inductive encoder comprises a stator plate and a rotor plate, the stator plate comprises: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil constitute an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil constitute an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have equal sine and cosine periods and are spatially orthogonal, the rotor plate comprises: an outer ring metal foil assembly and an inner ring metal foil assembly, the compensation method comprises the following steps: Step S100, obtaining the original voltage waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, wherein the original voltage waveform signals include: the corresponding sinusoidal voltage signal of the inner ring sinusoidal coil and the corresponding cosine voltage signal of the outer ring sinusoidal coil.

[0026] During the rotation of the rotor plate, its inner and outer ring metal foil components interact with the two sets of sensor channels of the stator plate. The outer ring sensor channel of the stator plate is composed of an outer ring coil and an outer ring sinusoidal coil, while the inner ring sensor channel is composed of an inner ring coil and an inner ring sinusoidal coil. Due to the principle of electromagnetic induction, the outer ring sinusoidal coil and the inner ring sinusoidal coil will generate SIN voltage and COS voltage signals, which carry core information such as the encoder rotor position and rotation angle. In order to accurately obtain these signals, it is necessary to use signal acquisition equipment, such as analog-to-digital conversion circuits, to convert analog voltage signals into digital signals for subsequent processing. Considering the rotation speed of the integrated encoder, the sampling period needs to be shortened when the rotation is fast; the signal frequency characteristics, high-frequency signals also require shorter sampling periods; and the accuracy requirements of the actual application scenarios, such as aerospace equipment has extremely high requirements for encoder accuracy, so it is necessary to set a very small sampling period to ensure that the collected voltage original waveform signal is both comprehensive and accurate, laying a solid foundation for subsequent error compensation work.

[0027] Step S300, based on the maximum and average values ​​of the peak difference between the sine voltage signal and the cosine voltage signal in several signal sampling periods, a small cycle error compensation curve and a large cycle error compensation curve are obtained, and the voltage original waveform signal is subjected to small cycle error compensation and large cycle error compensation. Among them, the small cycle error compensation is to compensate for the peak difference error between the sine voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error between the sine voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

[0028] According to the maximum and average values ​​of the peak differences of the SIN voltage signal and the COS voltage signal in many signal sampling cycles, a small cycle error compensation curve and a large cycle error compensation curve are constructed to compensate the original voltage waveform signal.

[0029] Small cycle error compensation, in the actual operation process, the peak values ​​of the SIN voltage signal and the COS voltage signal in each signal sampling cycle are easily interfered by various factors. By calculating the peak difference error and using algorithms such as polynomial fitting and least squares method, a small cycle error compensation curve can be generated. The small cycle error compensation curve clarifies how to adjust the amplitude, phase and other aspects of the signal in each sampling cycle to effectively eliminate or reduce the peak difference error. Taking polynomial fitting as an example, by analyzing the peak difference error data in a large number of sampling cycles, a polynomial function expression is constructed to accurately indicate the compensation method for each sampling cycle. As for large cycle error compensation, even if small cycle error compensation has been performed in each sampling cycle, due to signal transmission, cumulative effects and other reasons, when the rotor plate rotates a full circle, the overall peak difference of the SIN voltage signal and the COS voltage signal may still have errors. At this time, by carefully analyzing the peak difference of the signal in this week, the key data such as the maximum and average values ​​of the error are accurately calculated, and the large cycle error compensation curve is also generated using appropriate algorithms, such as Fourier transform combined with curve fitting algorithm.

[0030] By combining the small cycle error compensation curve and the large cycle error compensation curve to compensate for the encoder signal error, the signal error problem caused by the inability to absolutely level the stator plate and the rotor plate of the encoder in actual applications is effectively eliminated, the accuracy of the sensor is significantly improved, and the installation time of the encoder is shortened.

[0031] Please refer to Figure 3 3a, 3b and 3c, in a specific implementation of the embodiment of the present invention, after obtaining the voltage original waveform signal within a plurality of signal sampling periods corresponding to one rotation of the rotor plate in step S100, it also includes: Step S210, performing offset calibration on the original voltage waveform signal, and offsetting the center points of the sine voltage signal and the cosine voltage signal to align with the zero point respectively.

[0032] Due to the change in the installation environment of the encoder, the different installation spacing between the rotor plate and the stator plate will cause the center point of the SIN voltage signal and the COS voltage signal to be not at the ideal 0-point position. This center point offset will have an adverse effect on subsequent signal processing and angle resolution, and may cause a fixed deviation in angle measurement. Therefore, the purpose of offset calibration is to accurately offset the center points of the SIN voltage signal and the COS voltage signal to 0-point alignment. In specific operations, it is necessary to first perform data analysis on the collected original voltage waveform signal to determine the current center point position of each signal. The center point position can be approximated by calculating the average value of the signal over a period of time. Then, according to the calculated deviation value between the center point and the 0-point, the signal is translated accordingly. Figure 3 3a is the original voltage waveform signal, Figure 3 3b is the waveform signal after offset calibration.

[0033] Step S220 , performing gain compensation on the original voltage waveform signal after the offset calibration, compensating the amplitudes of the sine voltage signal and the cosine voltage signal to the same value, and making the phase difference between the sine voltage signal and the cosine voltage signal 90°.

[0034] Ideally, the amplitudes of the SIN voltage signal and the COS voltage signal should be equal after passing through the analog-to-digital conversion circuit, and the phase difference should be 90°. However, in actual manufacturing, installation, wiring, and signal processing, the amplitudes of the two signals will be unequal, and the phase difference will not be 90°. Unequal amplitudes will cause errors in the angle value obtained by the inverse tangent operation, and a phase difference of 90° will affect the precision and accuracy of the angle measurement. Gain compensation is to compensate the amplitudes of the SIN voltage signal and the COS voltage signal to the same value and make their phases differ by 90°. When performing amplitude compensation, it is necessary to first calculate the amplitudes of the SIN voltage signal and the COS voltage signal respectively, and obtain the amplitude by detecting the peak value of the signal; then, according to the difference in the amplitudes of the two signals, amplify the signal with a smaller amplitude, or attenuate the signal with a larger amplitude, until the amplitudes of the two signals are equal. For phase compensation, it is necessary to first determine the current phase difference between the two signals. The phase difference can be obtained by comparing the zero-crossing time of the two signals or by using a related phase detection algorithm. According to the obtained phase difference, the phase of one of the signals is adjusted, for example, by delaying or advancing the signal, so that the phase difference of the two signals reaches 90°. Through such gain compensation, the accuracy and reliability of the encoder angle measurement can be significantly improved, so that the angle information output by the encoder can more accurately reflect the actual position and rotation of the rotor. Figure 3 3c is the waveform signal after gain wavelength is increased.

[0035] Furthermore, the offset calibration of the voltage original waveform signal in step S210 includes: Step S211, respectively obtaining the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal.

[0036] The maximum and minimum amplitudes of the SIN voltage signal and the COS voltage signal are obtained respectively for offset calibration; the maximum and minimum amplitudes of the SIN voltage signal in the entire signal sampling period are found to reflect the fluctuation range of the signal; similarly, the same operation is performed on the COS voltage signal to determine its maximum and minimum amplitudes, which provides basic data for subsequent offset calibration calculations.

[0037] Step S212: based on the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal, respectively obtain offset calibration signals of the sine voltage signal and the cosine voltage signal.

[0038] Among them, the offset calibration signal of the sinusoidal voltage signal is: ; ; in, is the maximum amplitude of the sinusoidal voltage signal, is the minimum amplitude of the sinusoidal voltage signal, is the offset calibration signal of the sinusoidal voltage signal, is the original signal of the sinusoidal voltage signal.

[0039] Among them, the offset calibration signal of the cosine voltage signal is: ; ; in, is the maximum amplitude of the cosine voltage signal, is the minimum amplitude of the cosine voltage signal, is the offset calibration signal of the cosine voltage signal, is the original signal of the cosine voltage signal.

[0040] Furthermore, the step S220 of performing gain compensation on the original voltage waveform signal after the offset calibration includes: Step S221, acquiring the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate, and obtaining the maximum value and the minimum value of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods.

[0041] Step S222, using the offset calibration signal of the sine voltage signal or the cosine voltage signal as a gain reference signal, combining the maximum and minimum values ​​of the sine voltage signal and the cosine voltage signal of several signal sampling periods, calculating the gain compensation coefficient of the cosine voltage signal or the sine voltage signal, and performing gain compensation on the cosine voltage signal or the sine voltage signal so that the amplitudes of the sine voltage signal and the cosine voltage signal after gain compensation are the same.

[0042] Furthermore, in step S221, the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate are obtained, and the maximum and minimum values ​​of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods are obtained, including: Step S221a, obtain the amplitude of the sinusoidal voltage signal of several signal sampling periods. When the amplitude of the sinusoidal voltage signal of the subsequent signal sampling period is smaller than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, the amplitude of the sinusoidal voltage signal of the previous signal sampling period is output. When the amplitude of the sinusoidal voltage signal of the subsequent signal sampling period is larger than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, 0 is output. The maximum amplitude of the sinusoidal voltage signal can be known from the maximum values ​​of several output results.

[0043] Step S221b, obtain the amplitude of the sinusoidal voltage signal of several signal sampling periods. When the amplitude of the sinusoidal voltage signal of the subsequent signal sampling period is greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, the amplitude of the sinusoidal voltage signal of the previous signal sampling period is output. When the amplitude of the sinusoidal voltage signal of the subsequent signal sampling period is less than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, 0 is output. The minimum value of the amplitude of the sinusoidal voltage signal can be known from the minimum values ​​of several output results.

[0044] Step S221c, obtain the amplitude of the cosine voltage signal of several signal sampling periods. When the amplitude of the cosine voltage signal of the next signal sampling period is smaller than the amplitude of the sine voltage signal of the previous signal sampling period, output the amplitude of the cosine voltage signal of the previous signal sampling period. When the amplitude of the cosine voltage signal of the next signal sampling period is larger than the amplitude of the cosine voltage signal of the previous signal sampling period, output 0. The maximum amplitude of the cosine voltage signal can be known from the maximum values ​​of several output results.

[0045] Step S221d, obtain the amplitude of the cosine voltage signal of several signal sampling periods. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is greater than the amplitude of the cosine voltage signal of the previous signal sampling period, the amplitude of the cosine voltage signal of the previous signal sampling period is output. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is less than the amplitude of the cosine voltage signal of the previous signal sampling period, 0 is output. The minimum amplitude of the cosine voltage signal can be known from several output results.

[0046] Among them, the gain compensation coefficient The calculation formula is: ; in, is the maximum amplitude of the sinusoidal voltage signal in several signal sampling cycles, is the minimum amplitude of the sinusoidal voltage signal in several signal sampling cycles, is the maximum amplitude of the cosine voltage signal in several signal sampling cycles, It is the minimum amplitude of the cosine voltage signal in several signal sampling periods.

[0047] In the above process, the two groups of sine and cosine waveforms of the original data are gain compensated. Since the rotor rotates one circle and generates 16 cycles of sine and cosine signals, there are some differences in the signal amplitude of each cycle. Therefore, the peak-to-peak value of each cycle signal is first identified and then the average value is calculated. This can reduce the impact of the amplitude difference on the gain calibration to a certain extent. The specific process is: compare the original signals after the offset correction is completed. Taking the sine signal as an example, define and Respectively represent and data, if Less than , then the output , otherwise output Next, if the output of the previous step is , then continue to output , otherwise output Then find the maximum and minimum values ​​in the output data. The maximum and minimum values ​​are the extreme values ​​of the maximum values ​​of the sine and cosine signals of 16 cycles. The average value of the maximum and minimum values ​​is the required maximum value of the signal, which is recorded as , The same method is used to select the minimum value of the signal. Select the sine voltage signal gain as the standard value, and the cosine voltage signal gain calibration formula is as follows: ; ; ; .

[0048] At this point, the waveform correction is basically completed. It can be seen that the amplitudes of the sine voltage signal and the cosine voltage signal in the corrected waveform are basically equal, and the phase difference is 90°. The signals after offset and gain correction are as follows: Figure 5 The expressions of sine voltage signal and cosine voltage signal are shown in the following formula, where , is the AD sampling value of the sine voltage signal and the cosine voltage signal, , is the maximum value of AD sampling value, The angle measured by the sensor, , is the phase angle between the sine voltage signal and the cosine voltage signal, .

[0049] Please refer to Figure 4 The step S300 of performing small cycle error compensation on the original voltage waveform signal includes: Step S311, taking the sinusoidal voltage signal as a voltage reference signal, obtaining the peak difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and obtaining the maximum value and average value of the peak difference in several signal sampling periods.

[0050] Step S312, obtaining a compensation angle value of a small period error compensation curve based on the maximum value of the peak difference.

[0051] Step S313, calculating the amplitude coefficient of the small cycle error compensation curve based on the peak difference average value.

[0052] Step S314, based on the compensation angle value and amplitude coefficient of the small cycle error compensation curve, obtain the fitting expression of the small cycle error compensation curve. for: ; ; in, is the average value of the small cycle peak difference, is the maximum amplitude of the small cycle of the sinusoidal voltage signal, is the small cycle amplitude coefficient, is the small cycle compensation angle value, is the actual angle of rotation of the rotor plate relative to the stator plate.

[0053] Figure 4The figure shows the error curve obtained from the previous cumulative array experiment. From the fitted error curve above, it can be seen that when the encoder rotates 360°, a large-period sinusoidal error is generated and 16 small sinusoidal errors are superimposed. Therefore, when dealing with small-period errors, a small-period error compensation method is used to process the amplitude difference of the sine and cosine signals.

[0054] From the above analysis, it can be seen that after the signal is calibrated, the amplitude of each cycle is still unequal. The sinusoidal voltage signal is selected as the standard state, and the signal amplitude difference is set to , find the maximum value of the sine and cosine amplitude difference within 16 cycles , because the amplitude difference of the sine and cosine signals is the source of sensor measurement error, so we can find The corresponding angle is the angle of the compensation curve . Continue to calculate the average value of the peak difference of sine and cosine of 16 small cycles , substitute into the following formula to find , the compensation fitting curve amplitude coefficient is obtained, where It is the maximum value of the AD sampling value of the sinusoidal voltage signal.

[0055] ; Find , The compensation curve fitting expression can be obtained as shown in the following formula. Subtract the compensation angle from the original angle, and the error can be significantly reduced through experimental research. It is the small cycle error compensation curve.

[0056] .

[0057] Please refer to Figure 5 The step S300 of performing large cycle error compensation on the original voltage waveform signal includes: Step S321, taking the sinusoidal voltage signal as a voltage reference signal, obtaining the peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and obtaining the maximum value of the peak value difference in several signal sampling periods.

[0058] Step S322, obtaining a compensation angle value of a large period error compensation curve based on the maximum value of the peak difference.

[0059] Step S323, calculating the amplitude coefficient of the large period error compensation curve based on the peak difference average value.

[0060] Step S324, based on the compensation angle value and amplitude coefficient of the small period error compensation curve, obtain the fitting expression of the large period error compensation curve. for: ; ; in, is the average value of the large cycle peak difference, is the maximum value of the large cycle amplitude of the sinusoidal voltage signal, is the large cycle amplitude coefficient, is the large cycle compensation angle value, is the actual angle of rotation of the rotor plate relative to the stator plate.

[0061] Figure 5 The following is a large cycle error curve obtained from the previous cumulative experiments. From the fitting curve, we can see that the large cycle error is (0°~360°) a complete sine cycle. When processing the large cycle error, similarly, the peak value difference of the original output sine and cosine AD sampling values ​​is also compensated.

[0062] First, consider the case where the amplitudes of the two received signals are not equal after analog-to-digital conversion. Select the sinusoidal voltage signal as the standard state and set the signal amplitude difference to , respectively find and maximum value ,Will Substitute into the following formula to calculate , find The corresponding angle is the large cycle compensation phase angle , where is the maximum value of the AD sampling value of the sinusoidal voltage signal, ; Find , The following expression of the large period compensation curve can be obtained. Subtract the compensation angle from the original angle. After experimental verification, the angle error is significantly reduced. is the large cycle error compensation curve, .

[0063] Please refer to Figure 6 , a specific test embodiment is provided below. In order to test whether the encoder can achieve a high test accuracy by using the above compensation method under a lower installation condition, the stator plate and rotor plate (such as Figure 6 6a) keep a small angle of inclination, the test platform is as Figure 6As shown in Figure 6b, it mainly consists of a sensor prototype, a CNC turntable, a high-precision grating (accuracy is ±1 arc second), a micrometer (used to adjust the gap between the stator and the rotor), a data acquisition and processing circuit, an optical platform, etc. The prototype to be tested is coaxially installed with the grating, and the rotors of the two rotate synchronously under the drive of the turntable, and the measurement data is received by the serial port through the host computer.

[0064] The experiment used a grating with an accuracy of ±1 arc second as the calibration benchmark, and performed a full-circle 0° to 360° error test on the 1-cycle inner loop channel and 16-cycle outer loop channel of the prototype. That is, the following measurement errors are all obtained by comparing with the reference grating, and the errors are all original measurement errors.

[0065] The sensor adopts a signal processing method based on the amplitude detection principle, so the frequency of the excitation signal is relatively high, usually between 2MHz and 5MHz. Based on accumulated experimental research, the performance is best when the distance between the stator and the rotor is controlled at 0.7mm. This embodiment starts testing under this condition.

[0066] First, the prototype was tested at a working gap of 0.7 mm. The full-cycle error curve measured without preliminary calibration is as follows: Figure 7 As shown in 7a in Figure 1, it can be seen that without calibration, the whole cycle error is ±0.17°. After calibration, the whole cycle error curve is measured as follows Figure 7 As shown in 7b, the error of the sine and cosine signals is reduced from ±0.17° to ±0.06° after the preliminary calibration. According to the analysis of the error source, the main reason is the inconsistent amplitude of the sine and cosine signals fed back by the induction coil.

[0067] In order to reduce the impact of small cycle errors, it is necessary to reduce the amplitude difference of the sine and cosine signals fed back by the receiving coil. After performing a first-order fitting on the small cycle error curve, this experiment substituted the compensation parameters into the compensation formula to measure the full cycle error of the prototype.

[0068] The specific method used in the experiment is that after the prototype is powered on, the sine and cosine are calibrated first, and then the prototype is rotated 360°. The peak values ​​of the sine and cosine signals of 16 cycles are read by the lower machine, and the peak value difference of 16 cycles is calculated and averaged. The difference is substituted into the formula to obtain the amplitude of the compensation fitting curve. Find the maximum value of the peak difference within 16 cycles, and the corresponding angle is the phase angle Substitute the formula for compensation, rotate the sample to be tested 360°, and measure the error curve of the whole circle as follows: Figure 8 As shown in 8b, it can be seen that the error before comparison compensation (such as Figure 8 As shown in 8a in Figure ), after small-cycle compensation, the error is reduced from the original ±0.06° to ±0.04°, indicating that the small-cycle error suppression effect is significant.

[0069] According to the analysis of large cycle error, the algorithm compensation is also performed on the sine and cosine amplitude difference. The small cycle error fitting formula uses 16 cycles, while the large cycle error takes 1 cycle which is consistent with the number of inner loop cycles. Similarly, the large cycle compensation coefficient is calculated. and phase angle , substituted into the large cycle compensation formula. The prototype rotates 360°, and the measured full cycle error curve is as follows Fig. 9 As shown, it can be seen that after the large-cycle correction, the error is reduced from the original ±0.04° to ±0.015°, which has a very obvious inhibitory effect.

[0070] In summary, the test results show that after small-cycle and large-cycle error compensation, the test error is significantly reduced. This shows that the compensation measures are effective and can significantly improve the test accuracy and ensure the accuracy and reliability of the results. The error curves before and after compensation are as follows: Fig.10 shown.

[0071] Accordingly, please refer to Fig.11 A second aspect of an embodiment of the present invention provides a PCB type inductive encoder signal error compensation device. The PCB type inductive encoder includes a stator plate and a rotor plate. The stator plate includes: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil. The outer ring coil and the outer ring sinusoidal coil constitute an outer ring sensor channel. The inner ring coil and the inner ring sinusoidal coil constitute an inner ring sensor channel. The number of periods of the outer ring sinusoidal coil and the inner ring sinusoidal coil is equal and spatially orthogonal. The rotor plate includes: an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation device includes: The signal acquisition module 1 is used to obtain the original voltage waveform signal within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, wherein the original voltage waveform signal includes: the corresponding sinusoidal voltage signal of the inner ring sinusoidal coil and the corresponding cosine voltage signal of the outer ring sinusoidal coil; A signal compensation module 2 is used to obtain a small cycle error compensation curve and a large cycle error compensation curve based on the maximum value and average value of the peak difference between the sine voltage signal and the cosine voltage signal in several signal sampling periods, and to perform small cycle error compensation and large cycle error compensation on the voltage original waveform signal; Among them, the small cycle error compensation is to compensate for the peak difference error of the sine voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error of the sine voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

[0072] Accordingly, a third aspect of an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the above-mentioned PCB type inductive encoder signal error compensation method.

[0073] Correspondingly, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-mentioned PCB type inductive encoder signal error compensation method.

[0074] The embodiment of the present invention aims to protect a PCB type inductive encoder signal error compensation method and device, the PCB type inductive encoder comprises a stator plate and a rotor plate, the stator plate comprises: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil constitute an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil constitute an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have the same number of periods and are spatially orthogonal, the rotor plate comprises: an outer ring metal foil assembly and an inner ring metal foil assembly, the compensation method comprises the following steps: obtaining the original voltage waveform within a number of signal sampling periods corresponding to one rotation of the rotor plate Signal, the original voltage waveform signal includes: the corresponding sinusoidal voltage signal of the inner ring sinusoidal coil and the corresponding cosine voltage signal of the outer ring sinusoidal coil; based on the maximum and average values ​​of the peak difference between the sinusoidal voltage signal and the cosine voltage signal in several signal sampling cycles, a small cycle error compensation curve and a large cycle error compensation curve are obtained to perform small cycle error compensation and large cycle error compensation on the original voltage waveform signal; wherein, the small cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling cycle, and the large cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal when the rotor plate rotates one circle. The above technical solution has the following effects: 1. Through small-cycle and large-cycle error compensation, offset calibration, and gain compensation, the error caused by the encoder stator plate and rotor plate not being able to be absolutely leveled is effectively eliminated. Small-cycle error compensation targets the peak difference error within each signal sampling cycle, and large-cycle error compensation solves the overall peak difference error of the rotor plate rotating one circle. Offset calibration aligns the signal center point to 0, and gain compensation makes the signal amplitude the same and the phase difference 90°. The combined effect significantly improves the accuracy of the SIN voltage signal and the COS voltage signal, thereby improving the accuracy of the encoder angle measurement; 2. During the entire error compensation process, the original voltage waveform signal is processed comprehensively and carefully. Whether it is error compensation based on signal peak difference or calibration of signal offset and gain, it helps to reduce signal fluctuations and uncertainties, so that the encoder can maintain stable signal output during long-term operation, reduce fluctuations in measurement results caused by signal errors, and provide stable and reliable angle information for devices and systems that rely on encoder signals, thereby enhancing the stability and reliability of the entire system.

[0075] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0076] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A PCB type inductive encoder signal error compensation method, characterized in that: The PCB type inductive encoder includes a stator plate and a rotor plate, the stator plate includes: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil form an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil form an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have the same number of periods and are spatially orthogonal, the rotor plate includes: an outer ring metal foil assembly and an inner ring metal foil assembly, and the compensation method includes the following steps: Obtaining the original voltage waveform signal within a number of signal sampling periods corresponding to one rotation of the rotor plate, the original voltage waveform signal including: the corresponding sinusoidal voltage signal of the inner ring sinusoidal coil and the corresponding cosine voltage signal of the outer ring sinusoidal coil; Based on the maximum and average values ​​of the peak differences between the sine voltage signal and the cosine voltage signal in several signal sampling periods, a small cycle error compensation curve and a large cycle error compensation curve are obtained, and small cycle error compensation and large cycle error compensation are performed on the original voltage waveform signal; Among them, the small cycle error compensation is to compensate for the peak difference error of the sine voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error of the sine voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

2. The PCB type inductive encoder signal error compensation method according to claim 1, characterized in that: After obtaining the voltage original waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, the method further includes: Performing offset calibration on the original voltage waveform signal, and offsetting the center points of the sine voltage signal and the cosine voltage signal to align with the 0 point respectively; The voltage original waveform signal after the offset calibration is subjected to gain compensation, and the amplitudes of the sine voltage signal and the cosine voltage signal are compensated to be the same value, and the phase difference between the sine voltage signal and the cosine voltage signal is 90°.

3. The PCB type inductive encoder signal error compensation method according to claim 2, characterized in that: The offset calibration of the voltage original waveform signal comprises: Respectively obtaining the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal; Based on the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal, respectively obtaining offset calibration signals of the sine voltage signal and the cosine voltage signal; The offset calibration signal of the sinusoidal voltage signal is: ; ; in, is the maximum amplitude of the sinusoidal voltage signal, is the minimum amplitude of the sinusoidal voltage signal, is the offset calibration signal of the sinusoidal voltage signal, is the original signal of the sinusoidal voltage signal; The offset calibration signal of the cosine voltage signal is: ; ; in, is the maximum amplitude of the cosine voltage signal, is the minimum amplitude value of the cosine voltage signal, is the offset calibration signal of the cosine voltage signal, is the original signal of the cosine voltage signal.

4. The PCB type inductive encoder signal error compensation method according to claim 2, characterized in that: The step of performing gain compensation on the original voltage waveform signal after the offset calibration comprises: Acquire the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate, and obtain the maximum value and the minimum value of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods; The offset calibration signal of the sinusoidal voltage signal or the cosine voltage signal is used as a gain reference signal, and the maximum and minimum values ​​of the sinusoidal voltage signal and the cosine voltage signal of several signal sampling periods are combined to calculate the gain compensation coefficient of the cosine voltage signal or the sinusoidal voltage signal, and gain compensation is performed on the cosine voltage signal or the sinusoidal voltage signal so that the amplitudes of the sinusoidal voltage signal and the cosine voltage signal after gain compensation are the same.

5. The PCB type inductive encoder signal error compensation method according to claim 4, characterized in that: The step of acquiring the sine voltage signal and the cosine voltage signal of a plurality of signal sampling periods corresponding to one rotation of the rotor plate, and obtaining the maximum and minimum values ​​of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods, comprises: Acquire the amplitude of the sinusoidal voltage signal of several signal sampling periods, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is less than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output the amplitude of the sinusoidal voltage signal of the previous signal sampling period, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output 0, and the maximum amplitude of the sinusoidal voltage signal can be known from the maximum values ​​of several output results; Acquire the amplitude of the sinusoidal voltage signal of several signal sampling periods, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output the amplitude of the sinusoidal voltage signal of the previous signal sampling period, when the amplitude of the sinusoidal voltage signal of the next signal sampling period is less than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, output 0, and the minimum value of the amplitude of the sinusoidal voltage signal can be known from the minimum values ​​of several output results; Acquire the amplitude of the cosine voltage signal of several signal sampling periods, when the amplitude of the cosine voltage signal of the next signal sampling period is less than the amplitude of the sine voltage signal of the previous signal sampling period, output the amplitude of the cosine voltage signal of the previous signal sampling period, when the amplitude of the cosine voltage signal of the next signal sampling period is greater than the amplitude of the cosine voltage signal of the previous signal sampling period, output 0, and the maximum amplitude of the cosine voltage signal can be known from the maximum values ​​of several output results; The amplitudes of the cosine voltage signal of several signal sampling periods are obtained. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is greater than the amplitude of the cosine voltage signal of the previous signal sampling period, the amplitude of the cosine voltage signal of the previous signal sampling period is output. When the amplitude of the cosine voltage signal of the subsequent signal sampling period is less than the amplitude of the cosine voltage signal of the previous signal sampling period, 0 is output. The minimum amplitude of the cosine voltage signal can be known from several output results.

6. The PCB type inductive encoder signal error compensation method according to claim 4, characterized in that: The gain compensation coefficient The calculation formula is: ; in, is the maximum amplitude value of the sinusoidal voltage signal in a number of signal sampling periods, is the minimum amplitude value of the sinusoidal voltage signal in a number of signal sampling periods, is the maximum amplitude value of the cosine voltage signal in a number of signal sampling periods, It is the minimum amplitude value of the cosine voltage signal in several signal sampling periods.

7. The PCB type inductive encoder signal error compensation method according to any one of claims 1 to 6, characterized in that: The performing small cycle error compensation on the voltage original waveform signal comprises: The sinusoidal voltage signal is used as a voltage reference signal, and the peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained to obtain the maximum value of the peak value difference and the average value of the peak value difference in several signal sampling periods; Based on the maximum value of the peak difference, a compensation angle value of a small period error compensation curve is obtained; Based on the peak difference average value, calculating the amplitude coefficient of the small cycle error compensation curve; Based on the compensation angle value and amplitude coefficient of the small cycle error compensation curve, a fitting expression of the small cycle error compensation curve is obtained. The fitting expression of the small cycle error compensation curve is: for: ; ; in, is the average value of the small cycle peak difference, is the maximum amplitude of the small cycle of the sinusoidal voltage signal, is the small cycle amplitude coefficient, is the small cycle compensation angle value, is the actual angle value of the rotation of the rotor plate relative to the stator plate.

8. The PCB type inductive encoder signal error compensation method according to claim 7, characterized in that: The large cycle error compensation of the voltage original waveform signal comprises: The sinusoidal voltage signal is used as a voltage reference signal, and a peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained to obtain a maximum value of the peak value difference in several signal sampling periods; Based on the maximum value of the peak difference, a compensation angle value of a large period error compensation curve is obtained; Based on the peak difference average value, calculating the amplitude coefficient of the large period error compensation curve; Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, a fitting expression of the large period error compensation curve is obtained. The fitting expression of the large period error compensation curve is: for: ; ; in, is the average value of the large cycle peak difference, is the maximum value of the large cycle amplitude of the sinusoidal voltage signal, is the large cycle amplitude coefficient, To compensate for the large cycle angle value, is the actual angle value of the rotation of the rotor plate relative to the stator plate.

9. A PCB type inductive encoder signal error compensation device, characterized in that: The PCB type inductive encoder includes a stator plate and a rotor plate, wherein the stator plate includes: an outer ring coil, an outer ring sinusoidal coil, an inner ring coil and an inner ring sinusoidal coil, the outer ring coil and the outer ring sinusoidal coil form an outer ring sensor channel, the inner ring coil and the inner ring sinusoidal coil form an inner ring sensor channel, the outer ring sinusoidal coil and the inner ring sinusoidal coil have the same number of periods and are spatially orthogonal, the rotor plate includes: an outer ring metal foil assembly and an inner ring metal foil assembly, and the compensation device includes: A signal acquisition module, which is used to obtain the voltage original waveform signal within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, wherein the voltage original waveform signal includes: a sinusoidal voltage signal corresponding to the inner ring sinusoidal coil and a cosine voltage signal corresponding to the outer ring sinusoidal coil; A signal compensation module, which is used to obtain a small cycle error compensation curve and a large cycle error compensation curve based on the maximum value and average value of the peak difference between the sine voltage signal and the cosine voltage signal in several signal sampling periods, and perform small cycle error compensation and large cycle error compensation on the voltage original waveform signal; Among them, the small cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and the large cycle error compensation is to compensate for the peak difference error between the sinusoidal voltage signal and the cosine voltage signal when the rotor plate rotates one circle.

10. An electronic device, characterized in that: include: at least one processor; And a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the PCB type inductive encoder signal error compensation method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Accuracy compensating device for sine-cosine encoder

    CN201548256U

  • Encoder and rotation angle position calculation method

    JP2016099164A

  • Method for Detecting Errors in a Rotating Position Sensor System Having Sine and Cosine Signals

    US20200116532A1

  • Error correction method, terminal device, and computer-readable storage medium

    WO2024139068A1

Cited By

  • Laser precision angle rotation system constructed based on multi-layer PCB

    CN120909346A

  • A laser precision angle rotation system based on multilayer PCB

    CN120909346B

  • Inductance encoder precision adjusting and measuring device and method

    CN120991930A