CN117833565A - Online compensation method of magnetoelectric encoder - Google Patents
Online compensation method of magnetoelectric encoder Download PDFInfo
- Publication number
- CN117833565A CN117833565A CN202410014644.XA CN202410014644A CN117833565A CN 117833565 A CN117833565 A CN 117833565A CN 202410014644 A CN202410014644 A CN 202410014644A CN 117833565 A CN117833565 A CN 117833565A
- Authority
- CN
- China
- Prior art keywords
- channel
- offset
- amplitude
- magneto
- compensation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000005070 sampling Methods 0.000 claims abstract description 30
- 238000001514 detection method Methods 0.000 claims abstract description 11
- 230000008569 process Effects 0.000 claims abstract description 8
- 238000010606 normalization Methods 0.000 claims abstract description 4
- XEBWQGVWTUSTLN-UHFFFAOYSA-M phenylmercury acetate Chemical compound CC(=O)O[Hg]C1=CC=CC=C1 XEBWQGVWTUSTLN-UHFFFAOYSA-M 0.000 claims description 6
- 230000008859 change Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 239000000696 magnetic material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Landscapes
- Transmission And Conversion Of Sensor Element Output (AREA)
Abstract
The invention discloses an online compensation method of a magneto-electric encoder, which comprises the following steps: s1, in the process of rotating a first turn of a motor rotor, performing off-line compensation on an analog quantity signal obtained through detection, and simultaneously obtaining a plurality of sampling points; s2, calculating a plurality of sampling points to obtain an average offset, and compensating the offset by using the average offset; s3, calculating the amplitude corresponding to each sampling point, finding the maximum amplitude in the amplitude, and dividing the amplitude of each sampling point by the maximum amplitude to complete normalization; s4, calculating initial phases of the X channel and the Y channel, zeroing the initial phases, and carrying out non-orthogonal correction on the X channel and the Y channel to correct an orthogonality error; s5, obtaining an accurate rotor angle position according to the corrected X and Y channel functions; and S6, in the continuous rotation process of the motor rotor, a plurality of sampling points are acquired every time of rotation, the steps S2-S5 are repeatedly executed, the operation is continuously carried out, the result is iterated, and the online compensation is realized.
Description
Technical Field
The invention relates to the technical field of magnetoelectric encoders, in particular to an online compensation method of a magnetoelectric encoder.
Background
A magneto-electric encoder is a sensor for measuring the rotation angle, which is composed of a magnetic material and an inductor, and the rotation angle is determined mainly by measuring the change of a magnetic field. The basic principle of the magneto-electric encoder is that a change magnetic field generated when the rotor rotates is sensed through a related magnetic sensor chip, the change magnetic field is converted into a sine and cosine signal of analog quantity to be output, the sine and cosine signal is then sent to an ADC (analog-to-digital conversion) channel of a singlechip to be sampled, and the sampled value is subjected to subdivision decoding to finally obtain the accurate position of the rotor. The working principle of the magnetic sensor chip is that the motor rotor is coaxially connected with the circular magnet and the centers of the motor rotor and the circular magnet are coincident, when the rotor rotates, the sensor chip and the circular magnet which is parallel to the sensor chip generate a periodically-changed magnetic field, the rotating angle of the rotor is the same as the angle of the magnetic field, the direction of the magnetic field is parallel to the surface of the chip, and the sensor chip captures the changed magnetic field and then detects the angle information of the rotor.
The indexes such as sine and cosine signal amplitude, direct current bias and the like generated by the common matched magnetic sensor chip are larger along with the temperature change according to a manual; magneto-electric encoder application scope is extensive, but the magnetic sensor chip temperature stability who cooperates the use is lower. Under a wide temperature range, sine and cosine signals output by the magneto-electric encoder have deviation from a true value, so that the deviation between the position of a rotor obtained by decoding after ADC (analog-to-digital converter) sampling sent to the singlechip and the accurate position is larger.
To eliminate the temperature sensitivity, two methods are currently in common use. Firstly, an error compensation table at each temperature is obtained through an off-line experiment, and compensation is carried out by comparing with an actual temperature table look-up when the method is used, but the resource consumption of the method is larger; secondly, device parameters are compensated by using a device manual, and the accuracy of the method is low because the consistency of devices is difficult to ensure.
Disclosure of Invention
In order to solve the problems in the background art, the invention adopts the following technical scheme:
an online compensation method of a magneto-electric encoder is used for improving the detection precision of the magneto-electric encoder on the angular position of a motor rotor, and comprises the following steps:
s1, in the process of rotating a first turn of a motor rotor, performing off-line compensation on an analog quantity signal obtained through detection, and simultaneously obtaining a plurality of sampling points;
s2, calculating a plurality of sampling points to obtain an average offset, and compensating the offset by using the average offset;
s3, calculating the amplitude corresponding to each sampling point, finding the maximum amplitude in the amplitude, and dividing the amplitude of each sampling point by the maximum amplitude to complete normalization;
s4, calculating initial phases of the X channel and the Y channel, zeroing the initial phases, and carrying out non-orthogonal correction on the X channel and the Y channel to correct an orthogonality error;
s5, obtaining an accurate rotor angle position according to the corrected X and Y channel functions;
and S6, in the continuous rotation process of the motor rotor, a plurality of sampling points are acquired every time of rotation, the steps S2-S5 are repeatedly executed, the operation is continuously carried out, the result is iterated, and the online compensation is realized.
In some embodiments, 1024 points are sampled with a step size of 360 °/1024= 0.3515625 ° during each rotation of the motor rotor in step S1 and step S6.
In some embodiments, in step S2, the average offset is calculated by the following equation:
wherein, X, Y is the X, Y channel function value corresponding to the sampling point n, n=1, 2,3 … 1024;
n n
O x ,O y for the average of X, Y channelsAn offset;
after offset compensation is performed by using the average offset, the obtained X and Y channel functions are as follows: x1=x-O x ,Y1=Y-O y Wherein X, Y represents the X, Y channel functions for offset compensation, and X1, Y1 represents the X, Y channel functions after offset compensation.
In some embodiments, in step S3, the maximum amplitude in the amplitudes of the sampling points of the X and Y channels is denoted by Ax and Ay, respectively, and the normalized X and Y channel functions are: x2=x1/Ax, y2=y2/Ay.
In some embodiments, in step S4, the X, Y channels are non-orthogonally corrected, correcting for orthogonality errors by:
X3=(X2+sin(phiy)*sin(z))/cos(phix);
Y3=(Y2-sin(phiy)*cos(z))/cos(phiy);
wherein phix is the difference between the phase of the X channel and the phase of zero, phiy is the difference between the phase of the Y channel and the phase of zero, z is the angle position value returned according to the sampling value, and X3 and Y3 represent the X and Y channel functions after non-orthogonal correction.
Compared with the prior art, the invention has the beneficial effects that:
the online compensation method of the magneto-electric encoder provided by the invention has the advantages that the algorithm is low in consumption and high in speed, and the influence of temperature on the detection precision can be compensated online, so that the detection precision of the magneto-electric encoder on the motor rotor position can be improved within a wide temperature range with low consumption.
Drawings
Fig. 1 is a schematic flow chart of an online compensation method of a subway magneto-electric encoder.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement of the purpose and the effect of the present invention easy to understand, the following further describes how the present invention is implemented with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, the invention provides an online compensation method of a magneto-electric encoder, which is used for improving the detection precision of the magneto-electric encoder on the angular position of a motor rotor, and comprises the following steps:
s1, in the process of rotating the motor rotor for the first time, off-line compensation is carried out on the analog quantity signals obtained through detection, and a plurality of sampling points are obtained.
In a specific embodiment, when offline compensation is performed, the prior art is adopted, and the offline compensation is performed by referring to a manual or other modes; during each rotation of the motor rotor, 1024 points can be sampled with a step size of 360 °/1024= 0.3515625 °.
S2, calculating a plurality of sampling points to obtain an average offset, and compensating the offset by using the average offset.
Specifically, the average offset is calculated by the following formula:
wherein, X, Y is the X, Y channel function value corresponding to the sampling point n, n=1, 2,3 … 1024;
n n O x ,O y the average offset of X and Y channels; after offset compensation is performed by using the average offset, the obtained X and Y channel functions are as follows: x1=x-O x ,Y1=Y-O y Wherein X, Y represents the X, Y channel functions for offset compensation, and X1, Y1 represents the X, Y channel functions after offset compensation.
S3, calculating the amplitude corresponding to each sampling point, finding the maximum amplitude in the amplitude, and dividing the amplitude of each sampling point by the maximum amplitude to complete normalization.
Specifically, the maximum amplitude in the amplitudes of the sampling points of the X and Y channels is represented by Ax and Ay respectively, and the normalized X and Y channel functions are as follows: x2=x1/Ax, y2=y2/Ay.
S4, calculating initial phases of the X channel and the Y channel, zeroing the initial phases, and carrying out non-orthogonal correction on the X channel and the Y channel to correct an orthogonality error.
Specifically, the non-orthogonality correction is performed on the X, Y channels, correcting the orthogonality error by:
X3=(X2+sin(phiy)*sin(z))/cos(phix);
Y3=(Y2-sin(phiy)*cos(z))/cos(phiy);
wherein phix is the difference between the phase of the X channel and the phase of zero, phiy is the difference between the phase of the Y channel and the phase of zero, z is the angle position value returned according to the sampling value, and X3 and Y3 represent the X and Y channel functions after non-orthogonal correction.
S5, after the steps, direct current offset, amplitude error and quadrature error are respectively calculated and compensated, so that the accurate rotor angle position can be obtained according to the corrected X and Y channel functions.
And S6, in the continuous rotation process of the motor rotor, a plurality of sampling points are acquired every time of rotation, the steps S2-S5 are repeatedly executed, the operation is continuously carried out, the result is iterated, and the online compensation is realized.
In summary, the online compensation method of the magneto-electric encoder provided by the invention has the advantages of low algorithm consumption and high speed, and can online compensate the influence of temperature on the detection precision, thereby ensuring that the detection precision of the magneto-electric encoder on the motor rotor position is improved with low consumption in a wide temperature range.
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the technical solution of the present invention, which is intended to be covered by the scope of the claims of the present invention.
Claims (5)
1. An online compensation method of a magneto-electric encoder is used for improving the detection precision of the magneto-electric encoder on the angular position of a motor rotor and is characterized by comprising the following steps:
s1, in the process of rotating a first turn of a motor rotor, performing off-line compensation on an analog quantity signal obtained through detection, and simultaneously obtaining a plurality of sampling points;
s2, calculating a plurality of sampling points to obtain an average offset, and compensating the offset by using the average offset;
s3, calculating the amplitude corresponding to each sampling point, finding the maximum amplitude in the amplitude, and dividing the amplitude of each sampling point by the maximum amplitude to complete normalization;
s4, calculating initial phases of the X channel and the Y channel, zeroing the initial phases, and carrying out non-orthogonal correction on the X channel and the Y channel to correct an orthogonality error;
s5, obtaining an accurate rotor angle position according to the corrected X and Y channel functions;
and S6, in the continuous rotation process of the motor rotor, a plurality of sampling points are acquired every time of rotation, the steps S2-S5 are repeatedly executed, the operation is continuously carried out, the result is iterated, and the online compensation is realized.
2. The on-line compensation method of a magneto-electric encoder according to claim 1, wherein 1024 points are sampled with a step size of 360 °/1024= 0.3515625 ° during each rotation of the motor rotor in step S1 and step S6.
3. The on-line compensation method of a magneto-electric encoder according to claim 2, wherein in step S2, the average offset is calculated by the following formula:
wherein, X, Y is the X, Y channel function value corresponding to the sampling point n, n=1, 2,3 … 1024;
n n
O x ,O y the average offset of X and Y channels;
after offset compensation is performed by using the average offset, an obtained X-Y channel functionThe number is as follows: x1=x-O x ,Y1=Y-O y Wherein X, Y represents the X, Y channel functions for offset compensation, and X1, Y1 represents the X, Y channel functions after offset compensation.
4. The online compensation method of a magneto-electric encoder according to claim 3, wherein in the step S3, the maximum amplitude of the X and Y channel sampling point amplitudes is represented by Ax and Ay, respectively, and the normalized X and Y channel functions are: x2=x1/Ax, y2=y2/Ay.
5. The online compensation method of a magneto-electric encoder of claim 4, wherein in step S4, the X, Y channels are non-orthogonally corrected, correcting the orthogonality error by:
X3=(X2+sin(phiy)*sin(z))/cos(phix);
Y3=(Y2-sin(phiy)*cos(z))/cos(phiy);
wherein phix is the difference between the phase of the X channel and the phase of zero, phiy is the difference between the phase of the Y channel and the phase of zero, z is the angle position value returned according to the sampling value, and X3 and Y3 represent the X and Y channel functions after non-orthogonal correction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410014644.XA CN117833565A (en) | 2024-01-05 | 2024-01-05 | Online compensation method of magnetoelectric encoder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410014644.XA CN117833565A (en) | 2024-01-05 | 2024-01-05 | Online compensation method of magnetoelectric encoder |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117833565A true CN117833565A (en) | 2024-04-05 |
Family
ID=90507543
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410014644.XA Pending CN117833565A (en) | 2024-01-05 | 2024-01-05 | Online compensation method of magnetoelectric encoder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117833565A (en) |
-
2024
- 2024-01-05 CN CN202410014644.XA patent/CN117833565A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1773220B (en) | Encoder output signal correction apparatus and method | |
WO2021114419A1 (en) | Calibration method, apparatus and device for rotary magnetoelectric encoder | |
CN101521480B (en) | Resolution method and resolver for signals of rotating transformer | |
Benammar et al. | A novel PLL resolver angle position indicator | |
Ye et al. | Ratiometric-linearization-based high-precision electronic interpolator for sinusoidal optical encoders | |
Du et al. | A Hall sensor-based position measurement with on-line model parameters computation for permanent magnet synchronous linear motor | |
CN112066863B (en) | Moving-coil linear motor position calibration device and method | |
Ye et al. | Precise phase demodulation algorithm for sinusoidal encoders and resolvers | |
Zhao et al. | Electronic interpolation interface based on linear subdivision method for sinusoidal optical encoders | |
JP2008304249A (en) | Encoder signal processing device and its signal processing method | |
Feng et al. | Development of a combined magnetic encoder | |
Ye et al. | Development of a digital interpolation module for high-resolution sinusoidal encoders | |
JP2839340B2 (en) | Calibration device for position signal | |
CN117833565A (en) | Online compensation method of magnetoelectric encoder | |
Wang et al. | Research on angle subdivision method of multi-pole magnetic encoder based on pole number quotient remainder | |
CN205537692U (en) | Vernier resolver's signal processing system | |
Yu et al. | Error compensation for low-density circular gratings based on linear image-type angular displacement measurements | |
CN117516596B (en) | High-precision online compensation method of magnetoelectric encoder | |
CN111368584A (en) | Self-correcting high-resolution position information splicing method for sine and cosine encoder | |
CN112729100A (en) | Rotary variable angle sensor | |
Benammar et al. | Angular position measurement using resolvers together with a robust linearization technique | |
Zhao et al. | Compensation for Dynamic Subdivision Error When the Grating Displacement Sensor Code Disk is Stained | |
CN111800638A (en) | Decoding method and decoding device | |
CN117781847A (en) | Hall effect-based absolute position detection method for double-code-channel multi-pole magnetic ring encoder | |
CN114234793B (en) | Method for measuring axle angle of gyroscope |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |