A PCB type inductive encoder signal error compensation method and device
Through small-period and large-period error compensation, offset calibration and gain compensation methods, the signal error problem of PCB-type inductive encoder is solved, and the detection accuracy and system stability of the encoder are improved.
Patent Information
- Application Number
- CN202510378150.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-03-28
AI Technical Summary
PCB-type inductive encoder has signal error problems in practical applications, resulting in inaccurate measurement results and limiting the performance of sensor performance.
Through small-period error compensation and large-period error compensation methods, combined with offset calibration and gain compensation, signal error compensation is performed for assembly errors between the stator plate and the rotor plate, thereby improving the detection accuracy of the encoder.
It significantly improves the angle detection accuracy of the encoder, reduces signal fluctuations and uncertainties, and enhances the stability and reliability of the system.
Smart Images

Figure CN119915332B_ABST
Abstract
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 modern industrial automation and precision control, accurate angle measurement is crucial for improving system performance. PCB-based inductive encoders are widely used in angle measurement due to their simple structure, fast response, and strong anti-interference capabilities. These sensors, manufactured using PCB technology, enable smaller sensor thicknesses, complex coil shapes, and excellent batch consistency, offering significant advantages over traditional wire-wound sensors. PCB-based inductive encoders are currently widely used in the automotive, automation, laser testing, and aerospace industries.
[0003] However, PCB inductive encoders also face signal error issues in practical applications. Imperfections in sensor manufacturing, installation, wiring, signal processing, and other aspects of the process can introduce errors such as DC offset, amplitude inequality, and center point offset. These errors severely impact measurement accuracy and limit sensor performance. 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. To address the problem that the stator and rotor of the encoder cannot be absolutely installed flat in actual applications, the encoder's detection accuracy during angle detection is significantly improved by compensating for small and large cycle errors, thereby shortening the sensor installation time.
[0005] To solve the above technical problems, a first aspect of an embodiment of the present invention provides a signal error compensation method for a PCB-type inductive encoder. 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, while 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 periods and are spatially orthogonal. The rotor plate includes an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation method includes the following steps:
[0006] 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;
[0007] Based on the maximum value and average value of the peak difference between the sine voltage signal and the cosine voltage signal within 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;
[0008] 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 within 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.
[0009] 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:
[0010] Performing offset calibration on the original voltage waveform signal to shift the center points of the sine voltage signal and the cosine voltage signal to zero and align them;
[0011] The voltage original waveform signal after the offset calibration is gain compensated, 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°.
[0012] Furthermore, the offset calibration of the original voltage waveform signal includes:
[0013] respectively obtaining a maximum amplitude value and a minimum amplitude value of the sine voltage signal and the cosine voltage signal;
[0014] 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;
[0015] The offset calibration signal of the sinusoidal voltage signal is:
[0016] ;
[0017] ;
[0018] 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;
[0019] The offset calibration signal of the cosine voltage signal is:
[0020] ;
[0021] ;
[0022] 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.
[0023] Furthermore, performing gain compensation on the original voltage waveform signal after offset calibration includes:
[0024] 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 maximum and minimum values of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods;
[0025] The offset calibration signal of the sine voltage signal or the cosine voltage signal is used as a gain reference signal, and the maximum and minimum values of the sine 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 sine voltage signal, and gain compensation is performed 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.
[0026] Furthermore, 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 maximum and minimum values of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods, includes:
[0027] Acquire the amplitudes of the sinusoidal voltage signal for several signal sampling periods, and when the amplitude of the sinusoidal voltage signal in a subsequent signal sampling period is less than the amplitude of the sinusoidal voltage signal in a previous signal sampling period, output the amplitude of the sinusoidal voltage signal in the previous signal sampling period; and when the amplitude of the sinusoidal voltage signal in the subsequent signal sampling period is greater than the amplitude of the sinusoidal voltage signal in the previous signal sampling period, output 0, and the maximum value of the amplitude of the sinusoidal voltage signal can be determined from the maximum values of the several output results;
[0028] Acquire the amplitudes of the sinusoidal voltage signal for several signal sampling periods, and when the amplitude of the sinusoidal voltage signal in a subsequent signal sampling period is greater than the amplitude of the sinusoidal voltage signal in a previous signal sampling period, output the amplitude of the sinusoidal voltage signal in the previous signal sampling period; and when the amplitude of the sinusoidal voltage signal in the subsequent signal sampling period is less than the amplitude of the sinusoidal voltage signal in the previous signal sampling period, output 0, and the minimum value of the amplitude of the sinusoidal voltage signal can be determined from the minimum values of the several output results;
[0029] Acquire the amplitudes of the cosine voltage signal for several signal sampling periods, and when the amplitude of the cosine voltage signal in a subsequent signal sampling period is less than the amplitude of the sine voltage signal in a previous signal sampling period, output the amplitude of the cosine voltage signal in the previous signal sampling period; and when the amplitude of the cosine voltage signal in the subsequent signal sampling period is greater than the amplitude of the cosine voltage signal in the previous signal sampling period, output 0, and the maximum value of the amplitude of the cosine voltage signal can be determined from the maximum values of the several output results;
[0030] The amplitudes of the cosine voltage signal are obtained for several signal sampling periods. When the amplitude of the cosine voltage signal in a subsequent signal sampling period is greater than the amplitude of the cosine voltage signal in a previous signal sampling period, the amplitude of the cosine voltage signal in the previous signal sampling period is output. When the amplitude of the cosine voltage signal in the subsequent signal sampling period is less than the amplitude of the cosine voltage signal in the previous signal sampling period, 0 is output. The minimum amplitude of the cosine voltage signal can be known from the several output results.
[0031] Furthermore, the gain compensation coefficient The calculation formula is:
[0032] ;
[0033] in, is the maximum amplitude value of the sinusoidal voltage signal in several signal sampling periods, is the minimum amplitude value of the sinusoidal voltage signal in several signal sampling periods, is the maximum amplitude value of the cosine voltage signal in several signal sampling periods, It is the minimum amplitude value of the cosine voltage signal in several signal sampling periods.
[0034] Furthermore, performing small cycle error compensation on the original voltage waveform signal includes:
[0035] Using 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;
[0036] Based on the maximum value of the peak difference, a compensation angle value of the small period error compensation curve is obtained;
[0037] Calculating an amplitude coefficient of a small period error compensation curve based on the average value of the peak difference;
[0038] Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, the fitting expression of the small period error compensation curve is obtained. The fitting expression of the small period error compensation curve is: for:
[0039] ;
[0040] ;
[0041] 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 rotor plate rotating relative to the stator plate.
[0042] Furthermore, the compensating the large period error of the original voltage waveform signal includes:
[0043] Using the sinusoidal voltage signal as a voltage reference signal, obtaining a peak value difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period, and obtaining a maximum value of the peak value difference in several signal sampling periods;
[0044] Based on the maximum value of the peak difference, a compensation angle value of the large period error compensation curve is obtained;
[0045] Calculating an amplitude coefficient of a large period error compensation curve based on the average value of the peak difference;
[0046] Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, the fitting expression of the large period error compensation curve is obtained. The fitting expression of the large period error compensation curve is: for:
[0047] ;
[0048] ;
[0049] in, is the average value of the large cycle peak difference, is the maximum amplitude of the sinusoidal voltage signal in a large cycle, is the large cycle amplitude coefficient, is the large cycle compensation angle value, is the actual angle value of the rotor plate rotating relative to the stator plate.
[0050] 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 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, while 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 periods and are spatially orthogonal. The rotor plate includes an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation device includes:
[0051] a signal acquisition module, configured to acquire voltage original waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, the voltage original waveform signals comprising: a sinusoidal voltage signal corresponding to the inner sinusoidal coil and a cosine voltage signal corresponding to the outer sinusoidal coil;
[0052] 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 within several signal sampling periods, and perform small cycle error compensation and large cycle error compensation on the original voltage waveform signal;
[0053] 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 within 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.
[0054] 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 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 above-mentioned PCB type inductive encoder signal error compensation method.
[0055] Accordingly, 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.
[0056] The above technical solutions of the embodiments of the present invention have the following beneficial technical effects:
[0057] 1. Through operations such as small-cycle and large-cycle error compensation, offset calibration, and gain compensation, errors caused by the encoder stator plate and rotor plate not being able to be absolutely aligned are effectively eliminated. Small-cycle error compensation addresses the peak difference error within each signal sampling cycle, while large-cycle error compensation addresses the overall peak difference error during one rotation of the rotor plate. Offset calibration aligns the signal center point to zero, and gain compensation ensures that the signal amplitudes are the same and the phase difference is 90°. This combined effect significantly improves the accuracy of the SIN and COS voltage signals, thereby improving the accuracy of the encoder's angle measurement.
[0058] 2. Throughout the error compensation process, the original voltage waveform signal is comprehensively and meticulously processed. Whether it's error compensation based on signal peak difference or calibration of signal offset and gain, this helps reduce signal fluctuations and uncertainties, enabling the encoder to maintain stable signal output during long-term operation. This reduces fluctuations in measurement results caused by signal errors, provides stable and reliable angle information for devices and systems that rely on encoder signals, and enhances the stability and reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Schematic diagram of the structure of a PCB-type inductive encoder provided by an embodiment of the present invention;
[0060] Figure 2 This is a flow chart of a signal error compensation method for a PCB-type inductive encoder provided by an embodiment of the present invention;
[0061] Figure 3 1 is a signal diagram of an original voltage waveform, an offset calibration waveform, and a gain compensation waveform provided by an embodiment of the present invention;
[0062] Figure 4 Schematic diagram of a signal after small period error compensation provided by an embodiment of the present invention;
[0063] Figure 5 1 is a schematic diagram of a signal after large period error compensation provided by an embodiment of the present invention;
[0064] Figure 6 This is a schematic diagram of a PCB-type inductive encoder test provided by an embodiment of the present invention;
[0065] Figure 7 is a schematic diagram for comparing error curves provided by an embodiment of the present invention;
[0066] Figure 8 1 is a schematic diagram comparing error curves before and after small period error compensation provided by an embodiment of the present invention;
[0067] Figure 9 Schematic diagram of an error curve after large period error compensation provided by an embodiment of the present invention;
[0068] Figure 10 is a schematic diagram of original error and compensated error curves provided by an embodiment of the present invention;
[0069] Figure 11 This is a module block diagram of a PCB-type inductive encoder signal error compensation device provided by an embodiment of the present invention.
[0070] Reference numerals:
[0071] 1. Signal acquisition module, 2. Signal compensation module. DETAILED DESCRIPTION
[0072] To make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention will be 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 merely exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present invention.
[0073] 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, and the inner ring coil and the two groups of inner ring sinusoidal coils constitute the inner ring sensor channel. The number of periods between the two groups of inner and outer ring sinusoidal coils is equal and they are spatially orthogonal, called SIN coils and COS coils. The combination of the two groups of sensor channels can achieve absolute angle measurement. In order to improve 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 Figure 1b, the sensor's subsequent processing circuit uses the IPS2550 angle sensor chip and the STM32H723 main control chip to improve detection accuracy.
[0074] The sensor based on the aforementioned PCB-type inductive encoder uses amplitude-detection signal processing to resolve displacement, with a ring coil serving as the excitation coil and a sinusoidal coil serving as the induction coil. A high-frequency AC excitation source is simultaneously applied to the inner and outer ring excitation coils, generating a continuous alternating magnetic field. The receiving coil compensates for the induced voltage, achieving zero output at each pair of ports. If the rotor plate is placed above the stator plate, the conductor generates an induced voltage under the influence of the electromagnetic field. In the absence of a rotor, due to the anti-serial connection and balancing between the wire segments, the magnetic field induces eddy currents on the surface of the metal target. These eddy currents generate a counter-magnetic field, reducing the total magnetic flux density below. This reduces the voltage induced in the receiver coil region below the target, resulting in a voltage imbalance in the anti-serial coil and an output voltage signal whose amplitude and polarity vary with the target position.
[0075] The toroidal coil, acting as the excitation coil, generates a nearly uniform, radially symmetric alternating magnetic field when an alternating current is passed through it. The rotor is made of a conductive material, which generates eddy currents in the alternating magnetic field generated by the excitation coil. These eddy currents weaken the magnetic field lines perpendicular to the rotor plane in locations covered by the rotor, reducing the magnetic field amplitude at corresponding locations. Consequently, there is a difference in magnetic field amplitude between locations covered and uncovered by the rotor. This difference is sensed by the receiving coil. As the rotor rotates, the induced voltage in the receiving coil changes accordingly, sensing angle changes. The receiving coil consists of an even number of coils of opposite polarity arranged radially symmetrically about its center. In the absence of external interference, the total induced electromotive force generated by the receiving coils is always zero. However, as the rotor rotates, the eddy currents in the rotor cause the induced voltages in the coils of opposite polarity to differ, resulting in the induced electromotive forces not canceling each other out. Furthermore, the induced electromotive force generated varies with rotor rotation, allowing the rotor's rotation angle to be determined based on the magnitude of the induced electromotive force in the receiving coils.
[0076] In an optional embodiment, the sensor circuit 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 calculation 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).
[0077] Ideally, the amplitudes of the SIN and COS coils should be equal and their phases should differ by 90° after passing through the analog-to-digital conversion circuit. However, in practice, errors in sensor manufacturing, installation, wiring, or signal processing may result in unequal amplitudes and non-90° phase differences between the sine and cosine voltage signals after analog-to-digital conversion. These problems will introduce errors into the sensor's measurement.
[0078] Please refer to Figure 2 A first aspect of an embodiment of the present invention provides a signal error compensation method for a PCB-type inductive encoder. 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, and 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 sine and cosine periods and are spatially orthogonal. The rotor plate includes an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation method includes the following steps:
[0079] Step S100 , obtaining 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: a sinusoidal voltage signal corresponding to the inner ring sinusoidal coil and a cosine voltage signal corresponding to the outer ring sinusoidal coil.
[0080] As the rotor plate rotates, its inner and outer metal foil assemblies interact with the two sensor channels on the stator plate. The outer sensor channel on the stator plate consists of an outer ring coil and an outer sinusoidal coil, while the inner sensor channel consists of an inner ring coil and an inner sinusoidal coil. Due to the principle of electromagnetic induction, the outer and inner sinusoidal coils generate SIN and COS voltage signals, which carry key information such as the encoder's rotor position and rotation angle. To accurately acquire these signals, signal acquisition equipment, such as analog-to-digital conversion circuits, is required to convert the analog voltage signals into digital signals for subsequent processing. Considering the encoder's rotational speed, the sampling period should be shortened for faster rotation. High-frequency signals also require shorter sampling periods. Furthermore, the accuracy requirements of the actual application scenario—for example, aerospace equipment requires extremely high encoder accuracy—requires an extremely short sampling period to ensure that the acquired voltage waveform is both comprehensive and accurate, laying a solid foundation for subsequent error compensation.
[0081] Step S300 : Based on the maximum and average values of the peak differences between the sine and cosine voltage signals 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 original voltage waveform signal. The small cycle error compensation compensates for the peak difference error between the sine and cosine voltage signals within each signal sampling period, while the large cycle error compensation compensates for the peak difference error between the sine and cosine voltage signals during one rotation of the rotor plate.
[0082] According to the maximum and average values of the peak differences between the SIN and COS voltage signals in many signal sampling periods, the small cycle error compensation curve and the large cycle error compensation curve are constructed to compensate the original voltage waveform signal.
[0083] In actual operation, the peak values of the SIN and COS voltage signals within each sampling cycle are susceptible to interference from various factors. By calculating the peak difference error and applying algorithms such as polynomial fitting and least squares, a small-cycle error compensation curve can be generated. This small-cycle error compensation curve specifies how to adjust the signal amplitude, phase, and other aspects within each sampling cycle to effectively eliminate or reduce the peak difference error. Taking polynomial fitting as an example, by analyzing peak difference error data across a large number of sampling cycles, a polynomial function expression is constructed, accurately indicating the compensation method for each sampling cycle. Regarding large-cycle error compensation, even if small-cycle error compensation is performed within each sampling cycle, due to signal transmission and cumulative effects, the overall peak difference between the SIN and COS voltage signals may still contain errors after the rotor plate completes one full rotation. In this case, by carefully analyzing the peak difference within this cycle, key data such as the maximum and average error values can be accurately calculated. Similarly, a suitable algorithm, such as Fourier transform combined with curve fitting, is used to generate the large-cycle error compensation curve.
[0084] 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 install the stator plate and the rotor plate absolutely level in actual application of the encoder is effectively eliminated, which significantly improves the accuracy of the sensor and shortens the installation time of the encoder.
[0085] 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, the method further includes:
[0086] In step S210 , the original voltage waveform signal is offset calibrated to align the center points of the sine voltage signal and the cosine voltage signal to zero.
[0087] Due to variations in the encoder installation environment and the spacing between the rotor and stator plates, the center points of the SIN and COS voltage signals may not be at the ideal zero-point position. This center-point offset can adversely affect subsequent signal processing and angle calculation, potentially leading to a fixed deviation in angle measurement. Therefore, the purpose of offset calibration is to accurately offset the center points of the SIN and COS voltage signals to zero. To perform this operation, the collected raw voltage waveform signals must first be analyzed 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. The signal is then shifted accordingly based on the calculated deviation between the center point and zero. Figure 3 3a is the original voltage waveform signal, Figure 3 3b is the waveform signal after offset calibration.
[0088] 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°.
[0089] Ideally, after passing through the analog-to-digital conversion circuit, the SIN and COS voltage signals should have equal amplitudes and a 90° phase difference. However, in actual manufacturing, installation, wiring, and signal processing, the amplitudes of these two signals may not be equal, and the phase difference may not be 90°. This amplitude inequality can cause errors in the angle value obtained by the inverse tangent calculation, while a non-90° phase difference can affect the precision and accuracy of the angle measurement. Gain compensation compensates the amplitudes of the SIN and COS voltage signals to the same value and shifts their phases by 90°. To perform amplitude compensation, the amplitudes of the SIN and COS voltage signals must first be calculated and peak values detected. Then, based on the difference in the amplitudes of the two signals, the smaller signal is amplified or the larger signal is attenuated until the amplitudes of the two signals are equal. Phase compensation requires determining the current phase difference between the two signals. This can be achieved by comparing the zero-crossing times of the two signals or using a phase detection algorithm. Based on the obtained phase difference, one of the signals is phase-adjusted, for example by delaying or advancing the signal, so that the phase difference between the two signals reaches 90°. This gain compensation significantly improves the accuracy and reliability of the encoder's angle measurement, ensuring that the angle information output by the encoder more accurately reflects the actual position and rotation of the rotor. Figure 3 3c is the waveform signal after gain wavelength is increased.
[0090] Furthermore, the offset calibration of the original voltage waveform signal in step S210 includes:
[0091] Step S211 , obtaining the maximum amplitude value and the minimum amplitude value of the sine voltage signal and the cosine voltage signal respectively.
[0092] The maximum and minimum amplitudes of the SIN and COS voltage signals are obtained for offset calibration. The maximum and minimum amplitudes of the SIN voltage signal within 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, providing basic data for subsequent offset calibration calculations.
[0093] Step S212 : obtaining offset calibration signals 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.
[0094] Among them, the offset calibration signal of the sinusoidal voltage signal is:
[0095] ;
[0096] ;
[0097] 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.
[0098] Among them, the offset calibration signal of the cosine voltage signal is:
[0099] ;
[0100] ;
[0101] 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.
[0102] Furthermore, performing gain compensation on the original voltage waveform signal after the offset calibration in step S220 includes:
[0103] Step S221 , obtaining the sine voltage signal and 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.
[0104] In step S222, the offset calibration signal of the sine voltage signal or the cosine voltage signal is used as a gain reference signal, and the maximum and minimum values of the sine 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 sine voltage signal, and gain compensation is performed 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.
[0105] 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:
[0106] 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 less 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 greater than the amplitude of the sinusoidal voltage signal of the previous signal sampling period, 0 is output. The maximum value of the amplitude of the sinusoidal voltage signal can be known from the maximum value of several output results.
[0107] 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.
[0108] 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 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. The maximum value of the amplitude of the cosine voltage signal can be known from the maximum value of several output results.
[0109] 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, output the amplitude of the cosine voltage signal of the previous signal sampling period. 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, output 0. The minimum amplitude of the cosine voltage signal can be known from several output results.
[0110] Among them, the gain compensation coefficient The calculation formula is:
[0111] ;
[0112] in, is the maximum amplitude of the sinusoidal voltage signal in several signal sampling periods, 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 periods, It is the minimum amplitude of the cosine voltage signal in several signal sampling periods.
[0113] In the above process, gain compensation is performed on the two sets of sine and cosine waveforms of the original data. 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 the signal of each cycle 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 value 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:
[0114] ;
[0115] ;
[0116] ;
[0117] .
[0118] 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 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,
[0119] .
[0120] Please refer to Figure 4 The step S300 of performing small cycle error compensation on the original voltage waveform signal includes:
[0121] In step S311 , the sinusoidal voltage signal is used as a voltage reference signal, and the peak difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained to obtain the maximum value and the average value of the peak difference in several signal sampling periods.
[0122] Step S312: obtaining a compensation angle value of the small period error compensation curve based on the maximum value of the peak difference.
[0123] Step S313: Calculate the amplitude coefficient of the small period error compensation curve based on the average value of the peak difference.
[0124] Step S314: Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, a fitting expression of the small period error compensation curve is obtained. The fitting expression of the small period error compensation curve is: for:
[0125] ;
[0126] ;
[0127] 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.
[0128] Figure 4 The 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°, it generates a large-period sinusoidal error and superimposes 16 small sinusoidal errors. Therefore, when dealing with small-period errors, the small-period error compensation method is used to process the amplitude difference of its sine and cosine signals.
[0129] From the above analysis, we can see that after the signal is calibrated, the amplitude of each cycle is still not equal. 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 need to find The corresponding angle is the angle of the compensation curve Continue to calculate the average value of the peak difference between 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.
[0130] ;
[0131] 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. This is the small cycle error compensation curve.
[0132] .
[0133] Please refer to Figure 5 The step S300 of performing large cycle error compensation on the original voltage waveform signal includes:
[0134] Step S321 : Using 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 of the peak difference in several signal sampling periods.
[0135] Step S322: obtaining a compensation angle value of the large period error compensation curve based on the maximum value of the peak difference.
[0136] Step S323 : calculating the amplitude coefficient of the large period error compensation curve based on the average value of the peak difference.
[0137] Step S324: 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:
[0138] ;
[0139] ;
[0140] in, is the average value of the large cycle peak difference, is the maximum amplitude of the sinusoidal voltage signal in a large cycle, 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.
[0141] Figure 5The following graph shows the large-cycle error curve measured in previous experiments. The fitted curve shows that the large-cycle error is a complete sine cycle (0° to 360°). Similarly, when dealing with large-cycle errors, the peak difference between the original output sine and cosine AD sampling values is compensated.
[0142] 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 be , 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,
[0143] ;
[0144] Find 、 The following expression of the large period compensation curve can be obtained. Subtracting the compensation angle from the original angle, the angle error is significantly reduced after experimental verification. is the large cycle error compensation curve,
[0145] .
[0146] Please refer to Figure 6 ,The following provides a specific test example, in order to test the encoder as much as possible under the lower level of installation conditions can also use the above compensation method to make the sensor can achieve a high test accuracy, the stator plate and rotor plate (such as Figure 6 6a) keep the test platform tilted at a small angle. Figure 6 As shown in Figure 6b, the system primarily consists of a sensor prototype, a CNC turntable, a high-precision grating (with an accuracy of ±1 arc second), a micrometer (for adjusting the gap between the stator and rotor), data acquisition and processing circuitry, and an optical platform. The test sample and the grating are coaxially mounted, and their rotors rotate synchronously, driven by the turntable. Measurement data is received via a serial port through a host computer.
[0147] The experiment used a grating with an accuracy of ±1 arc second as the calibration benchmark. The prototype's 1-cycle inner loop channel and 16-cycle outer loop channel were tested for errors ranging from 0° to 360° throughout the entire cycle. That is, the following measurement errors are all obtained by comparison with the benchmark grating, and the errors are all original measurement errors.
[0148] The sensor uses 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 stator and rotor spacing is controlled at 0.7mm. This embodiment starts testing under this condition.
[0149] First, the prototype was tested at a working gap of 0.7 mm. The full cycle error curve measured without preliminary calibration was as follows: Figure 7 As shown in 7a, 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 Figure 7b, the error of the sinusoidal and cosine signals is reduced from ±0.17° to ±0.06° after preliminary calibration. Analysis of the error sources reveals that the primary cause is the inconsistent amplitude of the sinusoidal and cosine signals fed back by the induction coils.
[0150] 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.
[0151] The specific method used in the experiment is that after the prototype is powered on, the initial sine and cosine calibration is first performed, and then the prototype is rotated 360 degrees. The peak value of the sine and cosine signals of 16 cycles is 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 calculate the corresponding angle to be the phase angle Substitute the formula for compensation, rotate the test sample 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 Figure 8a), 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.
[0152] 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 , substitute into the large cycle compensation formula. The prototype rotates 360°, and the measured full cycle error curve is as follows Figure 9 As shown in the figure, 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.
[0153] In summary, the test results show that after the error compensation of small and large cycles, 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: Figure 10 shown.
[0154] Accordingly, please refer to Figure 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, and 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 periods and are spatially orthogonal. The rotor plate includes an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation device includes:
[0155] Signal acquisition module 1, which is used to obtain 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;
[0156] Signal compensation module 2, 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 within several signal sampling periods, and perform small cycle error compensation and large cycle error compensation on the original voltage waveform signal;
[0157] 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 within 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.
[0158] 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 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 above-mentioned PCB type inductive encoder signal error compensation method.
[0159] Accordingly, 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.
[0160] The embodiments of the present invention are intended to protect a PCB-type inductive encoder signal error compensation method and 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, and 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 periods and are spatially orthogonal. The rotor plate includes: an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation method includes the following steps: obtaining a voltage original waveform within a number of signal sampling periods corresponding to one rotation of the rotor plate Signal, the original voltage waveform signal includes: the sinusoidal voltage signal corresponding to the inner ring sinusoidal coil and the cosine voltage signal corresponding to the outer ring sinusoidal coil; based on the maximum value and average value 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:
[0161] 1. Through operations such as small-cycle and large-cycle error compensation, offset calibration, and gain compensation, errors caused by the encoder stator plate and rotor plate not being able to be absolutely aligned are effectively eliminated. Small-cycle error compensation addresses the peak difference error within each signal sampling cycle, while large-cycle error compensation addresses the overall peak difference error during one rotation of the rotor plate. Offset calibration aligns the signal center point to zero, and gain compensation ensures that the signal amplitudes are the same and the phase difference is 90°. This combined effect significantly improves the accuracy of the SIN and COS voltage signals, thereby improving the accuracy of the encoder's angle measurement.
[0162] 2. Throughout the error compensation process, the original voltage waveform signal is comprehensively and meticulously processed. Whether it's error compensation based on signal peak difference or calibration of signal offset and gain, this helps reduce signal fluctuations and uncertainties, enabling the encoder to maintain stable signal output during long-term operation. This reduces fluctuations in measurement results caused by signal errors, provides stable and reliable angle information for devices and systems that rely on encoder signals, and enhances the stability and reliability of the entire system.
[0163] 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 take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0164] 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 block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0165] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The function specified in one or more boxes.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the 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 by 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: A 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, while 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 periods and are spatially orthogonal. The rotor plate includes an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation method includes the following steps: Obtaining original voltage waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, the original voltage waveform signals including: 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 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 within 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 shifting the center points of the sine voltage signal and the cosine voltage signal to 0 to align them; The voltage original waveform signal after the offset calibration is gain compensated, 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 performing offset calibration on the voltage original waveform signal includes: respectively obtaining a maximum amplitude value and a 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 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 maximum and minimum values of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods; The offset calibration signal of the sine voltage signal or the cosine voltage signal is used as a gain reference signal, and the maximum and minimum values of the sine 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 sine voltage signal, and gain compensation is performed 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.
5. The PCB type inductive encoder signal error compensation method according to claim 4, characterized in that: 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 value and the minimum value of the sine voltage signal and the cosine voltage signal of the plurality of signal sampling periods, comprises: Acquire the amplitudes of the sinusoidal voltage signal for several signal sampling periods, and when the amplitude of the sinusoidal voltage signal in a subsequent signal sampling period is less than the amplitude of the sinusoidal voltage signal in a previous signal sampling period, output the amplitude of the sinusoidal voltage signal in the previous signal sampling period; and when the amplitude of the sinusoidal voltage signal in the subsequent signal sampling period is greater than the amplitude of the sinusoidal voltage signal in the previous signal sampling period, output 0, and the maximum value of the amplitude of the sinusoidal voltage signal can be determined from the maximum values of the several output results; Acquire the amplitudes of the sinusoidal voltage signal for several signal sampling periods, and when the amplitude of the sinusoidal voltage signal in a subsequent signal sampling period is greater than the amplitude of the sinusoidal voltage signal in a previous signal sampling period, output the amplitude of the sinusoidal voltage signal in the previous signal sampling period; and when the amplitude of the sinusoidal voltage signal in the subsequent signal sampling period is less than the amplitude of the sinusoidal voltage signal in the previous signal sampling period, output 0, and the minimum value of the amplitude of the sinusoidal voltage signal can be determined from the minimum values of the several output results; Acquire the amplitudes of the cosine voltage signal for several signal sampling periods, and when the amplitude of the cosine voltage signal in a subsequent signal sampling period is less than the amplitude of the sine voltage signal in a previous signal sampling period, output the amplitude of the cosine voltage signal in the previous signal sampling period; and when the amplitude of the cosine voltage signal in the subsequent signal sampling period is greater than the amplitude of the cosine voltage signal in the previous signal sampling period, output 0, and the maximum value of the amplitude of the cosine voltage signal can be determined from the maximum values of the several output results; The amplitudes of the cosine voltage signal are obtained for several signal sampling periods. When the amplitude of the cosine voltage signal in a subsequent signal sampling period is greater than the amplitude of the cosine voltage signal in a previous signal sampling period, the amplitude of the cosine voltage signal in the previous signal sampling period is output. When the amplitude of the cosine voltage signal in the subsequent signal sampling period is less than the amplitude of the cosine voltage signal in the previous signal sampling period, 0 is output. The minimum amplitude of the cosine voltage signal can be known from the 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 several signal sampling periods, is the minimum amplitude value of the sinusoidal voltage signal in several signal sampling periods, is the maximum amplitude value of the cosine voltage signal in several 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 original voltage waveform signal includes: The sinusoidal voltage signal is used as a voltage reference signal, and the peak difference between the sinusoidal voltage signal and the cosine voltage signal in each signal sampling period is obtained, and the maximum value and average value of the small-cycle peak difference in several signal sampling periods are obtained; Based on the maximum value of the small-cycle peak difference, a compensation angle value of the small-cycle error compensation curve is obtained; Calculating an amplitude coefficient of a small cycle error compensation curve based on the small cycle peak value difference average value; Based on the compensation angle value and amplitude coefficient of the small period error compensation curve, the fitting expression of the small period error compensation curve is obtained. The fitting expression of the small period 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 at which the rotor plate rotates relative to the stator plate.
8. The PCB type inductive encoder signal error compensation method according to claim 7, characterized in that: The performing large cycle error compensation on the original voltage 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 large-cycle peak value difference in several signal sampling periods; Based on the maximum value of the large-cycle peak difference, a compensation angle value of the large-cycle error compensation curve is obtained; Calculate the amplitude coefficient of the large cycle error compensation curve based on the average value of the large cycle peak difference; Based on the compensation angle value and amplitude coefficient of the large period error compensation curve, the 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 amplitude of the sinusoidal voltage signal in a large cycle, is the large cycle amplitude coefficient, is the large cycle compensation angle value, is the actual angle at which the rotor plate rotates 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. 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, and 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 periods and are spatially orthogonal. The rotor plate includes: an outer ring metal foil assembly and an inner ring metal foil assembly. The compensation device includes: a signal acquisition module, configured to acquire voltage original waveform signals within a plurality of signal sampling periods corresponding to one rotation of the rotor plate, the voltage original waveform signals comprising: a sinusoidal voltage signal corresponding to the inner sinusoidal coil and a cosine voltage signal corresponding to the outer 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 within several signal sampling periods, and perform small cycle error compensation and large cycle error compensation on the original voltage waveform signal; 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 within 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.
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 to enable the at least one processor to execute 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
Method for Detecting Errors in a Rotating Position Sensor System Having Sine and Cosine Signals
US20200116532A1