A kind of angle value jump point suppressing method and device based on the fitting of single pair polar angle angle value
Technical field
Present invention relates in general to magnetism encoders, specifically, being related to a kind of for correcting multipair pole magnetoelectric encoder
The method of angle value jump point.
Background technique
Magnetism encoder is a kind of measuring device, and principle is using sensors such as magnetic resistance or Hall elements to magnetism
Perhaps displacement measures the angle of magnetic material or the variation of displacement and can cause resistance or voltage the angle of material
Variation, amplifies variable quantity by amplifying circuit, output pulse signal or analog quantity letter after being handled by single-chip microcontroller
Number, to achieve the purpose that measurement.Magnetism encoder have anti-vibration, anticorrosive, antipollution, anti-interference and wide temperature spy
Property, therefore, it can be widely applied to Industry Control, machine-building, ship, weaving, printing, Aeronautics and Astronautics, radar, communication, army
The fields such as work.
Traditional magnetism encoder of common measurement angle generally comprises stator, rotor, permanent magnet, Hall sensor
And signal-processing board.Permanent magnet is bonded on rotor, and Hall sensor is fixed on signal-processing board.Then, rotor rotates
When, permanent magnet synchronous rotary generates changing magnetic field in the air gap of permanent magnet and stator, and Hall sensor is by magnetic field
Signal is converted into voltage signal, is resolved by signal-processing board, to realize angle measurement.
However, the sensor of such as Hall element etc, at different temperature, characteristic can generate a little variation, this
The result for causing magnetism encoder to measure generates offset.That is, it is identical in mechanical location but in the case that temperature is different,
The variation of sensor characteristics will cause measurement result difference in magnetism encoder.For example, under conditions of temperature change, Hall
The signal value of element acquisition output is changed, and is caused single pair polar angle angle value and multipair polar angle angle value to generate and is resolved deviation.
The deviation of the single pair polar angle angle value as caused by temperature change and multipair polar angle angle value has randomness and inconsistency,
Cause single pair polar angle angle value and the mapping relations of multipair polar angle angle value to change, it is subdivided to eventually lead to multipair polar angle angle value
There is mistake in journey, generates angle value jump point.
Summary of the invention
In view of the above-mentioned problems, the present invention proposes a kind of scheme, it is intended to which the jump point error for correcting magnetism encoder is allowed to
In the course of work, even if temperature changes, measurement result is still smooth, generates without angle value jump point, therefore can be improved
The measurement accuracy of magnetism encoder.
The present invention conceives in this way:
It is a kind of based on single pair polar angle angle value fitting angle value jump point suppressing method, it is characterised in that: this method include with
Lower step:
(1) single pair polar angle angle value θ is resolved1With multipair polar angle angle value θ2;
(2) according to single pair polar angle angle value θ1With multipair polar angle angle value θ2Angle value subdivision is carried out to multipair polar angle angle value, is obtained
Multipair polar angle angle value θ after to subdivision3;
(3) by the multipair polar angle angle value θ after obtained subdivision3Equal proportion scaling is carried out, and then obtains angle amplitude range
Multipair polar angle angle value θ in 0~65535LSB4;
(4) by single pair polar angle angle value θ1By the multipair polar angle angle value θ of scaling after to Subdividing Processing4It is fitted, is intended
Single pair polar angle angle value θ after conjunction5;
(5) the single pair polar angle angle value θ after judgement fitting5With the multipair polar angle angle value θ after Subdividing Processing by scaling4Difference
It is worth range, determines and the specific location of multipair pole jump point occur and carry out multipair polar angle angle value jump point compensation.
Preferably, the resolving single pair polar angle angle value θ1With multipair polar angle angle value θ2Process are as follows:
Single pair pole Hall and multipair pole Hall on hall signal collection plate is respectively to single pair pole field signal and multipair pole
Magnetic field signal is acquired, and then obtains single pair polar angle angle value signal A+, A- and multipair polar angle angle value signal B+, B-;Then lead to
The analog-to-digital conversion channel built in single-chip microcontroller is crossed to carry out single pair polar angle angle value signal A+, A- and multipair polar angle angle value signal B+, B-
Number conversion, obtains digital signal HA+, HA-, HB+, HB-;Single pair polar angle degree is solved by arc tangent formula (1), (2)
Value θ1With multipair polar angle angle value θ2, wherein single pair polar angle angle value θ1For 16 integer type data:
θ1=arctg (HA+/HA-) (1)
θ2=arctg (HB+/HB-) (2)
Preferably, the angle value segmentation process of the multipair polar angle angle value includes:
Pass through single pair polar angle angle value θ1High 10 parallactic angle angle value table look-up and determine multipair polar angle angle value number of poles P, then by formula
(3) the multipair polar angle angle value θ after being segmented3:
θ3=65525P+ θ2 (3)
Preferably, the multipair polar angle angle value θ by after Subdividing Processing by scaling4It is fitted and includes:
By the multipair polar angle angle value θ after obtained Subdividing Processing3Scaling is carried out by formula (4), obtains scaling
Multipair polar angle angle value θ afterwards4:
θ4=θ3/(65535*P)*65535 (4)
By single pair polar angle angle value θ1By the multipair polar angle angle value θ of scaling after to Subdividing Processing4It is fitted, passes through formula
(5) single pair polar angle angle value θ is obtained1With the multipair polar angle angle value θ by scaling4Departure θerr:
θerr=θ1-θ4 (5)
With single pair pole magnetoelectric encoder angular value θ1High 10 parallactic angle angle value be to table look-up item, with angu-lar deviation θerrAs
By item of tabling look-up, obtained by formula (6) by the revised single pair pole magnetoelectric encoder angular value θ that tables look-up5:
θ5=θ1+θerr (6)
Preferably, the specific location of the multipair polar angle angle value jump point judge with compensation include:
Single pair polar angle angle value θ after being fitted by formula (7)5With the multipair polar angle angle value θ by scaling4Angular deviation
Value θerr_f:
θerr_f=θ5-θ4 (7)
θ at this timeerr_fRange and single pair polar angle angle value θ1And the single pair polar angle angle value θ after fitting5Noise range one
It causes, it is assumed that θerr_f∈[-N,+N];Multipair polar angle angle value when angle value jump point occurs, after Subdividing Processing is obtained by formula (8)
θ4Jump point numerical value θjump:
θjump=± 65535/P=± Δ Y (8)
Magnetism encoder angle value deviation θerr_fIn signal noise N will be much smaller than multipair polar angle degree jump point numerical value Y, so
Multipair polar angle angle value jump point position is judged afterwards, if the angle value deviation θ of magnetism encodererr_f∈[N+(Y-N)/2,Y+
Y/2] or θerr_f∈ [- Y-Y/2 ,-N- (Y-N)/2], then it is assumed that current angle value is jump point.
Bounce point value is compensated after judging angle value bounce point, if θerr_f∈ [N+ (Y-N)/2, Y+Y/
2], then the multipair polar angle angle value θ compensated by jump point is obtained by formula (9)6:
θ6=θ4+65535/P (9)
If θerr_f∈ [- Y-Y/2 ,-N- (Y-N)/2] then obtains the multipair polar angle angle value compensated by jump point by formula (10)
θ6:
θ6=θ4-65535/P (10)
Preferably, the device of the angle value jump point suppressing method based on the fitting of single pair polar angle angle value, feature exist
In, comprising:
Single pair pole Hall sensor for acquiring the magnetic field signal of single pair pole magnet steel generation, and is converted into voltage letter
Number;
Multipair pole Hall sensor, the magnetic field signal generated for acquiring multipair pole magnet steel, and it is converted into voltage letter
Number;
A/D converter is converted to multipair pole tension signal for single pair pole tension signal to be converted to digital signal
Digital signal;
Single pair pole angle calculation module, for obtained digital quantity to be converted to single pair polar angle angle value θ1;
Multipair pole angle calculation module, for obtained digital quantity to be converted to multipair polar angle angle value θ2;
Multipair polar angle angle value Subdividing Processing module is used for multipair polar angle angle value θ2It is finely divided integration, it is assumed that multipair pole
Magnet steel number of poles is 16, single pair polar angle angle value θ1Angle value range is in 0~65535 LSB, multipair polar angle angle value θ2Angle value range
Multipair polar angle angle value θ in 0~65535LSB, after subdivision integration3Angle value range is in 0~65535*16LSB;
Scaled down module, the multipair polar angle angle value θ for will obtain3Scaled down is to 0~65535LSB range
It is interior, output angle angle value θ4;
Single pair polar angle angle value fitting module is used for single pair polar angle angle value θ1To multipair pole θ4Fitting, and after exporting fitting
Single pair polar angle angle value θ5;
Angle value jump point processing module, for judging single pair polar angle angle value fitting module output angle angle value θ5With by etc.
The multipair polar angle angle value θ of scale smaller module4Difference range, and angle value jump point is handled, is obtained smoothly without jump point
Multipair polar angle angle value;
Beneficial effects of the present invention:
1. multipair polar angle angle value jump point compensation method provided by the invention is repaired by the measured value to magnetism encoder
Just, so that magnetism encoder is not influenced as far as possible by extraneous factors such as temperature, vibrations, protect measured value at different temperatures
Maintain an equal level and slide, there is no angle value jump point, to improve measurement accuracy.
2. multipair polar angle angle value jump point compensation method provided by the invention can be by hardware, software or software and hardware combining
Mode is realized.
Detailed description of the invention
The structural schematic diagram of the magnetism encoder of Fig. 1 embodiment of the present invention;
The single pair polar angle angle value of Fig. 2 embodiment of the present invention and multipair polar angle angle value;
Fig. 3 embodiment of the present invention by the multipair polar angle angle value in the temperature-resistant situation of Subdividing Processing;
The multipair polar angle degree of Fig. 4 embodiment of the present invention passed through in subdivision and the constant situation of scaled down treatment temperature
Value;
The multipair polar angle degree of Fig. 5 embodiment of the present invention passed through in subdivision and the constant situation of scaled down treatment temperature
Value;
Single pair polar angle angle value θ after the fitting of Fig. 6 embodiment of the present invention5And multipair polar angle angle value θ4;
The angle value jump point interval judgement range of Fig. 7 embodiment of the present invention;
Specific embodiment
In order to make the objectives, technical solutions and advantages of the present invention clearer, below by shown in the accompanying drawings specific
Embodiment describes the present invention.However, it should be understood that these descriptions are merely illustrative, and it is not intended to limit model of the invention
It encloses.In addition, in the following description, descriptions of well-known structures and technologies are omitted, it is of the invention to avoid unnecessarily obscuring
Concept.
As shown in Figure 1, Figure 2, shown in Fig. 3, Fig. 4, Fig. 5, Fig. 6, Fig. 7, present embodiment uses following technical scheme:
The structural schematic diagram of the magnetism encoder of the embodiment of the present invention is as shown in Figure 1:
Single pair pole Hall sensor module for acquiring the magnetic field signal of single pair pole magnet steel generation, and is converted into electricity
Signal is pressed, single pair pole signal A+, A- are obtained;
Multipair pole Hall sensor module, the magnetic field signal generated for acquiring multipair pole magnet steel, and it is converted into electricity
Signal is pressed, multipair polar angle angle value signal B+, B- are obtained;
A/D converter module believes multipair pole tension for single pair pole tension signal A+, A- to be converted to digital signal
Number B+, B- are converted to digital signal;By analog-to-digital conversion, digital signal HA+, HA-, HB+, HB- are obtained;
Single pair pole angle calculation module, for obtained digital quantity to be converted to single pair polar angle angle value θ1, pass through arc tangent
Formula (11) solves single pair polar angle angle value θ1:
θ1=arctg (HA+/HA-) (11)
Multipair pole angle calculation module, for obtained digital quantity to be converted to multipair polar angle angle value θ2, pass through arc tangent
Formula (12) solves multipair polar angle angle value θ2:
θ2=arctg (HB+/HB-) (12)
Obtained single pair polar angle angle value θ is solved by formula (11), (12)1And multipair polar angle angle value θ2As shown in Figure 2;
Multipair polar angle angle value Subdividing Processing module is used for multipair polar angle angle value θ2It is finely divided integration, it is assumed that multipair pole
Magnet steel number of poles is 16, single pair polar angle angle value θ1Angle value range is in 0~65535LSB, multipair polar angle angle value θ2Angle value range
In 0~65535LSB;Multipair polar angle angle value θ2Subdividing Processing process specifically following methods is used to implement:
Pass through single pair polar angle angle value θ1High 10 parallactic angle angle value table look-up and determine multipair polar angle angle value number of poles P, then by formula
(13) the multipair polar angle angle value θ after being segmented3:
θ3=65525P+ θ2 (13)
The multipair pole magnet steel number of poles of this example is 16, single pair polar angle angle value θ1High 10 parallactic angle angle value range (0~1023),
It is as shown in the table to obtain multipair polar angle angle value Subdividing Processing table:
High 10 bit value of single pair polar angle angle value |
Multipair pole number of poles (P) |
0 |
1 |
1 |
1 |
2 |
1 |
… |
|
… |
|
… |
|
1021 |
15 |
1022 |
16 |
1023 |
16 |
By above-mentioned implementation method, the multipair polar angle angle value θ by Subdividing Processing is obtained3As shown in Fig. 3;
Scaled down module, the multipair polar angle angle value θ for will obtain3Scaled down is to 0~65535LSB range
It is interior, the multipair polar angle angle value θ after scaling is obtained by formula (14)4:
θ4=θ3/ (65535*P) * 65535=θ3/(65535*16)*65535 (14)
Multipair polar angle angle value θ after the scaling of scaled down module output4As shown in Fig. 4;
Single pair polar angle angle value fitting module is used for single pair polar angle angle value θ1To the multipair polar angle angle value θ after scaling4
Fitting, and export the single pair polar angle angle value θ after fitting5, it is embodied as follows:
Single pair polar angle angle value θ is calculated by formula (15)1With the multipair polar angle angle value θ after Subdividing Processing4Between
Angular deviation θerr:
θerr=θ1-θ4 (15)
With single pair pole magnetoelectric encoder angular value θ1High 10 numerical value (0~1023) be to table look-up item, with angular deviation θerr
As by item of tabling look-up, it is as shown in the table to obtain angular deviation correction card:
Single pair polar angle angle value θ1High 10 bit value |
θerr(LSB) |
0 |
θerr_0 |
1 |
θerr_1 |
2 |
θerr_2 |
… |
|
… |
|
… |
|
1021 |
θerr_1021 |
1022 |
θerr_1022 |
1023 |
θerr_1023 |
By looking into angular deviation correction card, revised single pair pole magnetoelectric encoder angular value θ is obtained by formula (16)5:
θ5=θ1+θerr (16)
The revised single pair pole magnetoelectric encoder angular value θ exported by single pair polar angle angle value fitting module5And ratio
Multipair polar angle angle value θ after example scaling4As shown in Figure 5.
Encoder is put into cryogenic box at this time, and temperature is reduced to -30 DEG C, is kept for 2 hours, then will be passed through again
Revised single pair pole magnetoelectric encoder angular value θ5And the multipair polar angle angle value θ after scaling4Synchronism output, such as Fig. 6
It is shown;
Single pair pole initial angle angle value θ is caused due to temperature change1With multipair pole initial angle angle value θ2It changes, and by
The single pair pole caused by temperature and multipair polar angle angle value deviation be it is inconsistent, therefore, single pair polar angle angle value θ1With it is multipair extremely just
Beginning angle value θ2Mapping relations will change, at this time pass through multipair polar angle angle value Subdividing Processing table obtain multipair pole
There is mistake in number of poles, leads to the multipair polar angle angle value θ of multipair polar angle angle value Subdividing Processing module output4Generate jump point;
In the implementation case, multipair pole magnetoelectric encoder number of poles is 16, when angle value jump point occurs, is obtained by formula (17)
Multipair polar angle angle value θ after to scaling4Jump point numerical value θjumpFor fixed value Y=± 4095.9:
θjump=± 65535/16=± 4095.9 (17)
Setting is used for the angu-lar deviation θ of scan angle angle value jump pointerr_f∈ [N+ (Y-N)/2, Y+Y/2] or θerr_f∈[-
Y-Y/2 ,-N- (Y-N)/2];Revised single pair pole magnetoelectric encoder angular value θ5And the multipair polar angle degree after scaling
Value θ4Deviation range Δ N ∈ [- 200,200], therefore scanning range θerr_f∈ [2198,7144] and θerr_f∈[-
7144, -2198] position that jump point occurs can be accurately determined, as shown in Figure 7.
Further, pass through θerr_fMultipair polar angle angle value θ after locating range comparative example scaling4Angle value compensation is carried out,
If θerr_f∈ [2198,7144] is obtained the multipair polar angle angle value θ compensated by jump point by formula (18)6:
θ6=θ4+4095.9 (18)
Further, pass through θerr_fMultipair polar angle angle value θ after locating range comparative example scaling4Angle value compensation is carried out,
If θerr_f∈ [- 7144, -2198] is obtained the multipair polar angle angle value θ compensated by jump point by formula (19)6:
θ6=θ4-4095.9 (19)
It should be understood that above scheme described herein can be realized by various modes.For example, can with hardware, software or
The mode of software and hardware combining is realized.It, can be at one or more than one executes above-mentioned automatic correcting method for hardware realization
Application-specific IC (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable patrol
Collect device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, other electronics
Unit or its combine interior realization.
It should be noted that each embodiment above by reference to described in attached drawing is only to illustrate the present invention rather than limits
The scope of the present invention, those skilled in the art should understand that, under the premise without departing from the spirit and scope of the present invention
To modification or equivalent replacement that the present invention carries out, should all cover within the scope of the present invention.In addition, unless the context
Signified outer, the word occurred in the singular includes plural form, and vice versa.In addition, unless stated otherwise, then any reality
Apply example all or part of in combination with any other embodiment all or part of come using.