CN114216486A - Magnetic encoder and detection method thereof - Google Patents

Magnetic encoder and detection method thereof Download PDF

Info

Publication number
CN114216486A
CN114216486A CN202210159658.1A CN202210159658A CN114216486A CN 114216486 A CN114216486 A CN 114216486A CN 202210159658 A CN202210159658 A CN 202210159658A CN 114216486 A CN114216486 A CN 114216486A
Authority
CN
China
Prior art keywords
component signal
magnetic
signal
component
magnetic sensor
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
Application number
CN202210159658.1A
Other languages
Chinese (zh)
Inventor
王超
武建峰
钱振煌
唐文江
郑荣昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Quanzhou Kuntaixin Microelectronic Technology Co ltd
Original Assignee
Quanzhou Kuntaixin Microelectronic Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Quanzhou Kuntaixin Microelectronic Technology Co ltd filed Critical Quanzhou Kuntaixin Microelectronic Technology Co ltd
Priority to CN202210159658.1A priority Critical patent/CN114216486A/en
Publication of CN114216486A publication Critical patent/CN114216486A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/14Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing the magnitude of a current or voltage
    • G01D5/142Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing the magnitude of a current or voltage using Hall-effect devices
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/14Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing the magnitude of a current or voltage
    • G01D5/16Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing the magnitude of a current or voltage by varying resistance

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

Disclosed are a magnetic encoder, a detection method for the magnetic encoder, an electronic device, and a processor-readable medium, wherein the magnetic encoder includes: a magnetic sensor that detects a changing magnetic field generated at the magnetic sensor by relative motion between the magnetic sensor and a magnetic medium and outputs first and second component signals indicative of the magnetic field; and a signal processing circuit configured to: calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal; obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal. Therefore, the detection precision of the magnetic encoder under various environments is improved, and the algorithm for compensating the detection precision is simplified.

Description

Magnetic encoder and detection method thereof
Technical Field
The present disclosure relates generally to detection processing of magnetic field signals, and more particularly to a magnetic encoder, a detection method for a magnetic encoder, and a processor-readable storage medium storing program instructions to execute the detection method.
Background
This section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present principles that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present principles. Accordingly, these statements are to be read in this light, and not as admissions of prior art.
In the field of detection, it is known to detect physical quantities such as a position and a speed of a moving body using an encoder. A rotary encoder is generally used when detecting a physical quantity such as an angular displacement of a moving body, and a linear encoder (i.e., a linear encoder) is generally used when detecting a physical quantity such as a linear displacement of a moving body; the rotary encoder is also referred to as a rotational position detector that detects a position (angle) and a speed (rotational speed) of a moving body (an object being rotated), and the linear encoder is also referred to as, for example, a linear position detector that detects a position and a speed of a moving body.
Encoders can be broadly classified into incremental encoders (hereinafter also referred to as "incremental encoders") and absolute encoders (hereinafter also referred to as "absolute encoders") according to their position detection methods and the like. Both rotary encoders or linear encoders, or incremental encoders or absolute encoders, can be based on both magnetic and optical measurement principles, i.e. encoders can be divided into magnetic encoders and optical encoders. Some of the above-described encoders are appropriately selected and used according to the characteristics required for practical use. Particularly, in servo motors (including rotary motors and linear motors) that perform position control and velocity control, encoders play an important role in acquiring physical parameters such as current position, velocity, and the like.
Magnetic encoders have good operating characteristics compared to optical encoders, such as being shock resistant, impact resistant, low in environmental impact from dust, oil, contamination, and the like, easy to maintain, durable, and reliable. In general, a magnetic encoder detects a changing magnetic field generated by a relative motion between a magnetic sensor and a magnetic medium by the magnetic sensor, and processes a magnetic signal by a signal processing circuit to calculate physical parameters such as a rotation angle (or a linear displacement amount) and a speed of a moving object.
However, in practical applications, the detection accuracy of the magnetic encoder may be adversely affected due to various factors, such as ambient temperature, electromagnetic interference, thermal noise, and the like. For this reason, it is necessary to mitigate or even eliminate the influence of factors such as ambient temperature, electromagnetic interference, thermal noise, and the like on the detection accuracy of the magnetic encoder.
Disclosure of Invention
In order to reduce or even eliminate the influence of the magnetic encoder on the detection precision of the magnetic encoder due to factors such as ambient temperature, electromagnetic interference and thermal noise, the disclosure provides a magnetic encoder, a detection method for the magnetic encoder and a processor readable storage medium, which can not only improve the detection precision of the magnetic encoder in various environments, but also simplify the algorithm for compensating the detection precision, improve the calculation speed and reduce the calculation cost.
According to an aspect of the present disclosure, there is provided a magnetic encoder including: a magnetic sensor that detects a changing magnetic field generated at the magnetic sensor by a relative motion between the magnetic sensor and a magnetic medium and outputs a first component signal and a second component signal that are indicative of the magnetic field, wherein the first component signal and the second component signal vary periodically and are orthogonal to each other; and a signal processing circuit configured to: calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal; obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
According to another aspect of the present disclosure, there is also provided a detection method for a magnetic encoder, including: detecting a changing magnetic field generated at the magnetic sensor by relative motion between the magnetic sensor and a magnetic medium and outputting a first component signal and a second component signal that are characteristic of the magnetic field, wherein the first component signal and the second component signal vary periodically and are orthogonal to each other; calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal; obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
According to another aspect of the present disclosure, there is also disclosed an electronic apparatus, comprising: the above-described magnetic encoder; and a controller that controls the position and/or speed of the moving body based on the relative position of the magnetic medium and the magnetic sensor determined by the magnetic encoder.
According to yet another aspect of the present disclosure, a processor-readable storage medium storing program instructions which, when executed by a processor, are capable of implementing the detection method described above is also disclosed.
The present disclosure provides a magnetic encoder, a detection method for the magnetic encoder, and a processor-readable storage medium, which can not only improve the detection accuracy of the magnetic encoder in various environments, but also simplify an algorithm for compensating the detection accuracy, improve the calculation speed, and reduce the calculation cost, compared to a known method for improving the detection accuracy of the magnetic encoder.
Drawings
Other features, objects, and advantages of the disclosure will be from the following description, which is intended to be illustrative only and not limiting, and which must be read in connection with the accompanying drawings, wherein:
FIG. 1 illustrates the detection principle of a magnetic encoder, exemplified by a rotary magnetic encoder;
FIG. 2 schematically illustrates a magnetic field component signal output by a magnetic sensor;
FIG. 3 in conjunction with FIG. 2 schematically illustrates the principle of calculating a magnetic field angle using a magnetic field component signal output by a magnetic sensor;
FIG. 4 schematically illustrates a block diagram of acquiring a zero point error and an amplitude offset of a magnetic field component signal output by a magnetic sensor, according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of acquiring a zero point error and an amplitude offset of a magnetic field component signal output by a magnetic sensor, in accordance with another embodiment of the present disclosure;
FIG. 6 schematically illustrates an architecture of a magnetic encoder detection principle according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a schematic configuration of a rotary magnetic encoder according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a schematic configuration of a linear magnetic encoder according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a flow chart of a detection method for a magnetic encoder according to an embodiment of the present disclosure;
10A-10B schematically illustrate a comparison of a corrected magnetic field component signal obtained by a magnetic encoder and method of detection thereof according to the present disclosure with an uncorrected magnetic field component signal and its accuracy of detection of the magnetic field angle.
Detailed Description
The subject matter is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the subject matter. It may be evident, however, that the present principles may be practiced without these specific details.
This description illustrates the principles of the disclosure. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the disclosure.
The present principles are naturally not limited to the embodiments described herein.
It should be noted that references in the specification to "one embodiment," "an example embodiment," or "a particular embodiment" means that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described. It will be understood that, although the terms first, second, third, etc. may be used herein to describe various information, components or features, these information, components or features should not be limited by these terms. These terms are only used to distinguish one type of information, component, or feature from another. For example, a first may also be termed a second, and vice versa, without departing from the scope of the present disclosure.
As described above, the magnetic encoder detects the varying magnetic signal by the sensor and supplies the detected magnetic signal to the signal processing circuit. As an example, various types of sensors may be employed, for example, a magnetoresistive sensor, a hall sensor, or the like.
By way of example, fig. 1 illustrates the detection principle of a magnetic encoder by taking a rotary magnetic encoder as an example. As shown in fig. 1, the first and second magnetic sensors 102 and 103 are arranged separated from the magnetic medium by a given gap, and a changing magnetic field generated due to relative movement between the magnetic medium and the magnetic sensors is detected by the first and second magnetic sensors 102 and 103. By way of example, the magnetic medium 101 may be any magnetic material that has been magnetized; the magnetic sensor may be a magneto-resistive effect sensor, a hall effect sensor, or the like that is capable of detecting a changing magnetic signal. For the sake of illustrating the working principle of the magnetic sensor, only two magnetic poles, i.e., an N pole and an S pole, on the magnetic medium 101 are shown in fig. 1; the first magnetic sensor 102 and the second magnetic sensor 103 are respectively disposed at positions spaced 90 degrees apart from each other in the circumferential direction of the magnetic medium 101.
The magnetic medium 101 is disposed with a central axis of a ring shape as a rotation axis so as to rotate together with the moving object to be detected, and a periodically changing magnetic signal is detected by the first and second magnetic sensors 102 and 103 due to the rotation of the magnetic medium 101.
Fig. 2 schematically shows that the first and second magnetic sensors 102 and 103 output magnetic field signals V that periodically changeyAnd VxFig. 3, in conjunction with fig. 2, schematically illustrates the principle of calculating the magnetic field angle using the magnetic field component signal output by the magnetic sensor. As shown in fig. 2, the rotation angle θ of the magnetic medium 101, that is, the rotation angle of the moving object to be measured is taken as the horizontal axis, and the outputs of the first magnetic sensor 102 and the second magnetic sensor 103 are taken as the vertical axis; the first magnetic sensor 102 and the second magnetic sensor 103 detect a periodically changing magnetic signal due to the rotation of the magnetic medium 101; in view of the positional relationship of the first magnetic sensor 102 and the second magnetic sensor 103 with respect to each other, the phases thereof are shifted by 90 degrees, for example, the first magnetic sensor 102 outputs a sinusoidal signal V y201, and the second magnetic sensor 103 outputs a cosine signal V x202. That is, the sinusoid V is acquired by the first magnetic sensor 102y(sin θ) signal, and the cosine curve V is acquired by the second magnetic sensor 103x(cos θ) signal. As shown in fig. 3, the rotation angle of the magnetic medium 101 can be calculated by the following mathematical formula:
Figure 153528DEST_PATH_IMAGE001
(1-1)
thus, the rotation angle of the magnetic medium 101 can be calculated from the magnetic field component signals output from the first and second magnetic sensors 102 and 103, and the rotation angle of the moving object can be acquired.
It should be noted that, for the sake of simplifying the description, when the detection principle of the magnetic sensor is described in conjunction with fig. 1 and fig. 2, only one pair of NS poles is disposed on the magnetic medium, and in practical application, P pairs of NS poles may be alternately disposed on the magnetic medium, where P ≧ 1. In this case, as known to those skilled in the art, the magnetic field angle (electrical angle) is P times the rotation angle (mechanical angle) of the magnetic medium.
As described above, the magnetic signal detected by the magnetic sensor and periodically changing, for example, the sine and cosine signals detected, are used to acquire the rotation angle of the moving object, and thus the physical parameters of the speed and acceleration of the moving object. However, if there is an error in the detection signal output by the magnetic sensor due to some factors, such as temperature variation, electromagnetic interference, thermal noise, etc., the calculation of the rotation angle of the magnetic medium is adversely affected, and thus the acquired physical parameters of the moving body, such as the rotation angle, speed, acceleration, etc., are deviated or even erroneous. For example, temperature variation, electromagnetic interference, thermal noise, etc. may cause the detection signal output by the magnetic sensor to have dc offset, i.e. zero-point error, that is, even if the actual magnetic field component is zero, the value of the detection signal output by the corresponding magnetic sensor is not zero, thereby generating zero-point error; for example, the midpoint of a sine signal or a cosine signal is offset from the horizontal axis. In addition, factors such as temperature variation, electromagnetic interference, thermal noise, and the like may also cause interference with the amplitude of the detection signal output from the magnetic sensor, thereby generating an amplitude deviation.
As an example, taking the position relationship of the first magnetic sensor 102 and the second magnetic sensor 103 shown in fig. 1, which are opposite to each other by 90 degrees, as an example, the detection magnetic signal output by the first magnetic sensor 102 is taken as the first component signal Y of the magnetic field signal in the first direction (for example, the Y direction)detThe detected magnetic signal output from the second magnetic sensor 103 is used as a second component signal X of the magnetic field signal in a second direction (for example, the X direction)detAnd y isdetAnd xdetHas a variation range of-Areal~Areal(positive or negative depending on the defined direction), wherein ArealIndicating the magnitude of the detection signal output by the magnetic sensor. In conjunction with the above equation (1-1), the rotation angle of the magnetic medium 101 can be calculated as follows:
Figure 53220DEST_PATH_IMAGE002
(1-2)
in an ideal case, when the value of the actual magnetic signal detected by the magnetic sensor is zeroIts output component signal should be 0. For example, when the value of the actual magnetic signal detected by the first magnetic sensor 102 is zero, the first component signal y it outputsdetShould be 0, and when the value of the actual magnetic signal detected by the second magnetic sensor 103 is zero, it outputs the second component signal xdetShould be 0. For example, taking the example shown in fig. 1, in the case of the positional relationship between the first magnetic sensor 102, the second magnetic sensor 103, and the magnetic medium 101 shown on the left side of fig. 1, the first component signal y output from the first magnetic sensor 102 isdetShould be 0; similarly, in the case where the magnetic medium 101 shown on the right side of fig. 1 is rotated by 90 degrees (i.e., the magnetic field is rotated by 90 degrees), the second component signal x output from the second magnetic sensor 103detShould be 0. Accordingly, in an ideal case, when the amplitude of the actual magnetic signal detected by the magnetic sensor is at a maximum, the component signal outputted therefrom should be-arealOr Areal(either positive or negative depending on the defined direction). For example, as described above, in the case of the relative positions of the first magnetic sensor 102 and the second magnetic sensor 103 in fig. 1, when the value of the actual magnetic signal detected by the first magnetic sensor 102 is zero, the first component signal y output therefromdetShould be 0, and the value of the actual magnetic signal detected by the magnetic sensor 103 at this time corresponds to the maximum value, the second component signal x which it outputsdetShould be-ArealOr Areal(either positive or negative depending on the defined direction). For example, taking the example shown in fig. 1, in the case of the positional relationship between the first and second magnetic sensors 102 and 103 and the magnetic medium 101 shown on the left side of fig. 1, the second component signal x output from the second magnetic sensor 103detShould be-ArealOr Areal(positive or negative depending on the defined direction); similarly, in the case where the magnetic medium 101 shown on the right side of fig. 1 is rotated by 90 degrees (i.e., the magnetic field is rotated by 90 degrees), the first component signal y output from the first magnetic sensor 102detShould be Arealor-Areal(either positive or negative depending on the defined direction).
As previously mentioned, the effects of certain factors, such as temperature changes, electromagnetic interference,Thermal noise and the like may cause errors in the detection signal output from the magnetic sensor, for example, resulting in zero point errors and/or amplitude deviations. As an example, zero point errors and/or amplitude deviations may occur in the component signals of the magnetic field output by both the first magnetic sensor 102 and the second magnetic sensor 103. For example, taking the example shown in fig. 1, when the value of the actual magnetic signal detected by the magnetic sensor is zero, the component signal output therefrom is not equal to 0. For example, when the value of the actual magnetic signal detected by the first magnetic sensor 102 is zero, the first component signal y it outputsdetIs equal to OyAnd O isyNot equal to 0, and outputs a second component signal x when the value of the actual magnetic signal detected by the second magnetic sensor 103 is zerodetIs equal to OxAnd O isxNot equal to 0. For example, taking the example shown in fig. 1, in the case of the positional relationship between the first magnetic sensor 102, the second magnetic sensor 103, and the magnetic medium 101 shown on the left side of fig. 1, the first component signal y output from the first magnetic sensor 102 isdetIs equal to OyAnd O isyNot equal to 0; similarly, in the case where the magnetic medium 101 shown on the right side of fig. 1 is rotated by 90 degrees (i.e., the magnetic field is rotated by 90 degrees), the second component signal x output from the second magnetic sensor 103detIs equal to OxAnd O isxNot equal to 0. Similarly, when the amplitude of the actual magnetic signal detected by the magnetic sensor is at its maximum, its output component signal is equal to-G arealOr G Areal(positive or negative depending on the defined direction), where G ≠ 1. For example, in the case of the relative positions of the first magnetic sensor 102 and the second magnetic sensor 103 in fig. 1, as described above, when the value of the actual magnetic signal detected by the first magnetic sensor 102 is zero, the first component signal y output therefromdetIs equal to OyAnd O isyNot equal to 0, and the value of the actual magnetic signal detected by the second magnetic sensor 103 at this time corresponds to the maximum value, the second component signal x of which is outputdetIs equal to-Gx*ArealOr Gx*Areal(positive or negative depending on the defined direction), wherein GxNot equal to 1. For example, taking the example shown in fig. 1 as an example, the first magnetic sensor 102 and the second magnetic sensor shown on the left side of fig. 1103 and the magnetic medium 101, the second component signal x output by the second magnetic sensor 103detIs equal to-Gx*ArealOr Gx*Areal(positive or negative depending on the defined direction), wherein GxNot equal to 1; similarly, in the case where the magnetic medium 101 shown on the right side of fig. 1 is rotated by 90 degrees (i.e., the magnetic field is rotated by 90 degrees), the first component signal y output from the first magnetic sensor 102detIs equal to-Gy*ArealOr Gy*Areal(positive or negative depending on the defined direction), wherein Gy≠1。
Thus, due to the influence of factors such as temperature variation, electromagnetic interference, thermal noise, etc., there is an error, such as a zero point error and/or an amplitude deviation, in the detection signal output by the magnetic sensor, so that the actual values y of the first component signal and the second component signal output by the magnetic sensordetAnd xdetIdeal values y of the first component signal and the second component signal output from the magnetic sensor in the absence of these disturbance factorsideal、xidealThe relationship between them is as follows:
Figure 977314DEST_PATH_IMAGE003
(2-1)
Figure 345978DEST_PATH_IMAGE004
(2-2)
Figure 380930DEST_PATH_IMAGE005
(2-3)
wherein, ydetAnd xdetRespectively representing the actual values, y, of the first and second component signals output by the magnetic sensor in the presence of an interference factoridealAnd xidealIdeal values, G, respectively representing the first and second component signals output by the magnetic sensor in the absence of disturbing factorsyAnd GxRespectively representing the amplitude deviation corresponding to the first component signal and the second component signal,Oyand OxRespectively representing zero point errors, A, corresponding to the first and second component signalsidealRepresenting the magnitude of the resultant ideal magnetic field signal.
From equations (2-1) to (2-3):
Figure 417020DEST_PATH_IMAGE006
(3-1)
when the magnetic sensor works, the actual values y of the first component signal and the second component signal output by the magnetic sensor can be detected in real timedetAnd xdetThereby obtaining amplitude deviation G corresponding to the first component signal and the second component signal respectivelyyAnd GxAnd acquiring zero point errors O corresponding to the first component signal and the second component signal, respectivelyyAnd Ox. In general, it can be considered that the amplitude deviation G is obtained by solving a simultaneous system of equationsyAnd GxAnd zero point error OyAnd OxFor example, the amplitude deviation G may be calculated by solving a simultaneous system of equations including the following 5 equationsyAnd GxAnd zero point error OyAnd Ox
Figure 259817DEST_PATH_IMAGE007
(4-1)
That is, by acquiring different detection values (x) of the first component signal and the second component signal output by the magnetic sensordet1, ydet1)、(xdet2, ydet2) 、(xdet3, ydet3) 、(xdet4, ydet4) 、(xdet5, ydet5) Substituting the simultaneous equations to calculate the amplitude deviation GyAnd GxAnd zero point error OyAnd Ox
However, the amplitude deviation G is obtained in this manneryAnd GxAnd zero point error OyAnd OxThe calculation is complex, for the first component signal output to the magnetic sensorCompared with a signal processing circuit for processing the detection value of the second component signal, the signal processing circuit has a large calculation amount and consumes time, and the cost of the signal processing circuit is increased to a certain extent.
Obtaining amplitude deviation G for simplicityyAnd GxAnd zero point error OyAnd OxThe embodiment of the disclosure provides a magnetic encoder and a detection method for the magnetic encoder, which are convenient for processing the detection value output by the magnetic sensor, so that the amplitude deviation and the zero point error of the magnetic sensor are obtained, the magnetic field angle can be accurately calculated, and the influence of factors such as temperature change, electromagnetic interference and thermal noise on the detection precision of the magnetic sensor is eliminated.
The working principle of the magnetic encoder and the detection method thereof proposed by the present disclosure is described in detail below with reference to specific examples. It should be noted that the following examples are merely exemplary illustrations of the principles of the magnetic encoder and the detection method thereof of the present disclosure and do not constitute any limitation on the principles of the present disclosure.
Specifically, combining the above equation (3-1), the detected values y of the first and second component signalsdetAnd xdetSatisfies the following conditions:
Figure 850199DEST_PATH_IMAGE008
(4-2)
to this end, the disclosure proposes to detect a value of at least one of the first and second component signals at a specific position in a periodic variation, for example, with the first component signal ydetFor example, in the second component signal xdetWhen the zero-crossing point is detected, the first component signal y can be acquireddetIn this case, since
Figure 688842DEST_PATH_IMAGE009
The above equation (4-2) is modified as:
Figure 579437DEST_PATH_IMAGE010
(5-1)
taking into account the first component signal ydetWith the second component signal xdetWill be in quadrature with each other, will be in the second component signal xdetTwo consecutive zero crossings of the first component signal ydetThe corresponding values are respectively denoted as ydet,pAnd ydet,nWherein y isdet,pCorresponding to the first component signal ydetPositive peak of (a), and ydet,nCorresponding to the first component signal ydetThe negative peak value of (a) is,
after processing equation (5-1), we obtain:
Figure 829022DEST_PATH_IMAGE011
(6-1)
then there is:
Figure 906699DEST_PATH_IMAGE012
(7-1)
Figure 283454DEST_PATH_IMAGE013
(7-2)
equations (7-1) and (7-2) are simultaneous, and y is considereddet,pAnd ydet,nRespectively corresponding to the first component signals ydetThe positive and negative amplitudes of (c) can be obtained:
Figure 762977DEST_PATH_IMAGE014
(8-1),
thereby obtaining a zero point error O corresponding to the first component signaly
Similarly, with a second component signal xdetFor example, in the first component signal ydetWhen a zero crossing point is detected, a second component signal x may be acquireddetThe value of (c), in this case,
Figure 465354DEST_PATH_IMAGE015
the above equation (4-2) is modified as:
Figure 781060DEST_PATH_IMAGE016
(9-1)
taking into account the first component signal ydetWith the second component signal xdetWill be in quadrature with each other, will be in the first component signal ydetTwo consecutive zero crossings of the second component signal xdetThe corresponding values are respectively expressed as xdet,pAnd xdet,nWherein x isdet,pCorresponding to the first component signal xdetPositive peak of (1), and xdet,nCorresponding to the first component signal xdetThe negative peak value of (a) is,
after processing equation (9-1), we obtain:
Figure 961505DEST_PATH_IMAGE017
(10-1)
then there is:
Figure 295535DEST_PATH_IMAGE018
(11-1)
Figure 903233DEST_PATH_IMAGE019
(11-2)
equations (11-1) and (11-2) are simultaneous, and x is considereddet,pAnd xdet,nRespectively corresponding to the second component signals xdetThe positive and negative amplitudes of (c) can be obtained:
Figure 204771DEST_PATH_IMAGE020
(12-1)
thereby obtaining a zero point error O corresponding to the second component signalx
Further, to calculate the amplitude deviation, equations (7-1) and (7-2) are connected, andand will be
Figure 454486DEST_PATH_IMAGE021
Is marked as
Figure 908601DEST_PATH_IMAGE022
The following can be obtained:
Figure 687202DEST_PATH_IMAGE023
(13-1)
Figure 492347DEST_PATH_IMAGE024
(13-2)
simultaneous equations (13-1) and (13-2), one can obtain:
Figure 280174DEST_PATH_IMAGE025
(14-1)
thereby, a first component signal y is obtaineddetCorresponding amplitude deviation Gy
In the actual operation, in view of
Figure 119954DEST_PATH_IMAGE026
And term corresponding to zero point error
Figure 600614DEST_PATH_IMAGE027
Terms corresponding with respect to magnitude
Figure 158634DEST_PATH_IMAGE028
Very small, in order to facilitate solving for GyCan omit
Figure 904480DEST_PATH_IMAGE027
Thereby obtaining:
Figure 333187DEST_PATH_IMAGE029
(15-1)
thereby, eliminating GyAnd GxAnd the coupling of (2) is reducedThe calculation complexity is increased, the calculation speed is increased, and the calculation cost is correspondingly reduced.
Similarly, equations (11-1) and (11-2) are simultaneous, and will
Figure 984748DEST_PATH_IMAGE030
Is marked as
Figure 748174DEST_PATH_IMAGE031
The following can be obtained:
Figure 612225DEST_PATH_IMAGE032
(16-1)
Figure 895439DEST_PATH_IMAGE033
(16-2)
simultaneous equations (16-1) and (16-2) can be obtained:
Figure 452322DEST_PATH_IMAGE034
(17-1)
thereby, a second component signal x is obtaineddetCorresponding amplitude deviation Gx
Similarly, in actual operation, in view of
Figure 453776DEST_PATH_IMAGE035
And term corresponding to zero point error
Figure 872250DEST_PATH_IMAGE036
Terms corresponding with respect to magnitude
Figure 275550DEST_PATH_IMAGE028
Very small, in order to facilitate solving for GxCan omit
Figure 3334DEST_PATH_IMAGE036
Thereby obtaining:
Figure 492084DEST_PATH_IMAGE037
(18-1)
thereby, eliminating GxAnd GyThe coupling performance of the method reduces the calculation complexity, improves the operation speed and correspondingly reduces the calculation cost.
FIG. 4 schematically illustrates a block diagram for acquiring zero point errors and amplitude deviations of magnetic field component signals output by a magnetic sensor, according to an embodiment of the present disclosure. As shown in fig. 4, the first component signal y output in real time to the magnetic sensor by the signal processing circuitdetAnd a second component signal xdetDetection is carried out, for example, when the second component signal x is detecteddetAcquiring a first component signal y when the zero-crossing occursdetAnd determines whether it is greater than zero, taking into account the first component signal ydetAnd a second component signal xdetIn phase quadrature with each other, in the second component signal xdetWhen the zero-crossing occurs, the first component signal ydetShould correspond to its positive or negative peak value, whereby the first component signal y obtained by the filter pairdetFiltering to obtain a filtered y representing a positive peak of the first component signaldet,pAnd y representing a negative peak of the first component signaldet,nSo that the first component signal y can be calculated by the above equations (8-1) and (15-1), respectivelydetCorresponding zero point error OyAnd the amplitude deviation Gy
Similarly, as shown in FIG. 4, when the first component signal y is detecteddetAcquiring a second component signal x when the zero-crossing time is overdetAnd determines whether it is greater than zero, taking into account the first component signal ydetAnd a second component signal xdetIn phase quadrature with each other, in the first component signal ydetAt zero-crossing, the second component signal xdetShould correspond to its positive or negative peak value, whereby the second component signal x obtained by the filter pairdetFiltering to obtain filtered x representing the positive peak of the second component signaldet,pAnd x representing a negative peak of the second component signaldet,nSo that they can be obtained by the above formulas (12-1) and (18-1), respectivelyCalculating a second component signal xdetCorresponding zero point error OxAnd the amplitude deviation Gx
Further, although in the embodiment described above in connection with fig. 4, it is by detecting a zero-crossing point of one of the first component signal and the second component signal, thereby obtaining an amplitude of the other of the first component signal and the second component signal corresponding to the zero-crossing point, and calculating a zero-point error and/or an amplitude deviation occurring in the other component signal; however, it is also possible to directly detect the maximum/minimum value of the first component signal and/or the second component signal in a period, thereby obtaining a positive/negative peak value.
FIG. 5 schematically illustrates a block diagram for acquiring a zero point error and an amplitude offset of a magnetic field component signal output by a magnetic sensor, according to another embodiment of the present disclosure. As shown in fig. 5, the first component signal y output in real time to the magnetic sensor by the signal processing circuitdetAnd a second component signal xdetPerforming detection, e.g. when detecting the first component signal ydetAt the time of a peak within one cycle, it is judged whether it is larger than zero, that is, the first component signal y is judgeddetCorresponds to its positive or negative peak, whereby the first component signal y obtained by the filter pairdetFiltering to obtain a filtered y representing a positive peak of the first component signaldet,pAnd y representing a negative peak of the first component signaldet,nSo that the first component signal y can be calculated by the above equations (8-1) and (15-1), respectivelydetCorresponding zero point error OyAnd the amplitude deviation Gy
Similarly, as shown in FIG. 5, when the second component signal x is detecteddetAt the time of a peak in one cycle, it is determined whether it is greater than zero, i.e., the second component signal x is determineddetIs corresponding to its positive or negative peak, whereby the second component signal x obtained by the filter pairdetFiltering to obtain filtered x representing the positive peak of the second component signaldet,pAnd x representing a negative peak of the second component signaldet,nThereby can be respectively communicatedThe second component signal x is calculated by the above equations (12-1) and (18-1)detCorresponding zero point error OxAnd the amplitude deviation Gx
In addition, it should be noted that in practical applications, digital circuits are generally used to detect and process magnetic field signals, so as to improve the immunity to detection and post-processing, and facilitate integration and reduce power consumption. Specifically, the first component signal and the second component signal of the magnetic field output by the magnetic sensor may be a/D converted, the first component signal and the second component signal may be converted into digital signals, and then the zero point error and the amplitude deviation thereof may be calculated by the signal processing circuit, and the calculated zero point error and the amplitude deviation may be used to perform corresponding correction. Alternatively, depending on the type of magnetic sensor employed, the a/D conversion process may also be integrated inside the magnetic sensor, so that the magnetic sensor can directly output the first component signal and the second component signal as digital signals.
In addition, the filters shown in fig. 4 and 5 may employ digital filters, so that the acquired first component signal and second component signal are digitally filtered to remove the detection noise. For example, various types of digital filters may be employed to achieve digital filtering of the first and second component signals. As an example, the present disclosure proposes a simple digital filter, facilitating the implementation of digital circuits. For example, the digital filter may be expressed as:
Figure 697938DEST_PATH_IMAGE038
(19-1)
where N denotes a filter depth coefficient, an appropriate value may be selected for N as needed, for example, N =64, N =128, N =512, and the like.
X will be as obtained in FIG. 4 or FIG. 5det,p,xdet,n,ydet,p,ydet,pRespectively as fin,nSubstituting into equation (19-1), digital filtering of the positive and negative peaks of the first and second component signals is achieved through iterative operations.
Fig. 6 schematically illustrates an architecture of a magnetic encoder detection principle according to an embodiment of the present disclosure. As shown in fig. 6, the magnetic sensor detects the magnetic field (magnetic field angle θ), and outputs a first component signal y reflecting the magnetic field angle θdetAnd a second component signal x reflecting the magnetic field angle thetadetThe first component signal y output by the magnetic sensor is subjected to various interference factors, such as ambient temperature, electromagnetic interference, heat noise, etcdetAnd a second component signal xdetThere may be errors, for example, zero point errors Oy, Ox and/or amplitude deviations Gy, Gx, i.e., zero point errors and/or amplitude deviations are superimposed on the ideal first and second component signals, as shown in the above equations (2-1) and (2-2):
Figure 955744DEST_PATH_IMAGE003
Figure 120009DEST_PATH_IMAGE039
converting the detected first component signal and second component signal into digital signals through A/D conversion, and then performing signal processing on the converted first component signal and second component signal based on the algorithm for acquiring the zero point error and/or the amplitude deviation to acquire the zero point error and the amplitude deviation; the detected magnetic signal can then be corrected using the obtained zero point error and amplitude deviation.
Optionally, as an example, for the first component signal ydetThe following correction may be made:
Figure 79743DEST_PATH_IMAGE040
(20-1);
similarly, for the second component signal xdetThe following correction may be made:
Figure 89288DEST_PATH_IMAGE041
(20-2);
the corrected first and second component signals may then be used to calculate the magnetic field angle:
Figure 201600DEST_PATH_IMAGE042
(21-1)
at this time, the calculated magnetic field angle eliminates the influence of factors such as temperature change, electromagnetic interference and thermal noise on the detection accuracy of the magnetic sensor, so that the physical quantities such as the position, the speed and the acceleration of the moving body can be further accurately calculated, and the moving body can be conveniently and accurately controlled to be in the position, the speed and the like.
Note that, when the corrected first component signal and second component signal are obtained using the above equations (20-1) and (20-2), a division operation is involved; considering that when calculating the magnetic field angle using equation (21-1), what is needed is the ratio of the corrected first and second component signals, and when implementing the algorithm using digital circuitry, multiplication is more convenient than division, the present disclosure proposes to change the division operation involved in (20-1) and (20-2) to multiplication when calculating the corrected first and second component signals. Specifically, formula (20-1) may be multiplied by Gx Gy to yield:
Figure 271187DEST_PATH_IMAGE043
(22-1)
similarly, equation (20-2) may be multiplied by Gx Gy to yield:
Figure 734530DEST_PATH_IMAGE044
(22-2)
thus, in calculating the magnetic field angle, the following can be modified from equation (21-1):
Figure 29989DEST_PATH_IMAGE045
(23-1)
accordingly, fig. 6 shows that, in calculating the corrected first and second component signals, the corrected first and second component signals are obtained based on equations (22-1) and (22-2), and the magnetic field angle is calculated based on the corrected first and second component signals.
As an example, the above algorithm proposed according to the present disclosure may eliminate zero point errors and/or amplitude deviations of the first and second component signals in real time while the magnetic encoder is running, and linearly correct the calculation of the magnetic field angle using the corrected first and second component signals. In this process, the correction of the first component signal and the second component signal may be performed using a plurality of cycles of the change of the magnetic field signal, thereby providing the accuracy of the magnetic field angle calculation.
Thus, according to an aspect of the present disclosure, there is provided a magnetic encoder comprising: a magnetic sensor that detects a changing magnetic field generated at the magnetic sensor by a relative motion between the magnetic sensor and a magnetic medium and outputs a first component signal and a second component signal that are indicative of the magnetic field, wherein the first component signal and the second component signal vary periodically and are orthogonal to each other; and a signal processing circuit configured to: calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal; obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
FIG. 7 schematically illustrates a schematic configuration of a rotary magnetic encoder according to an embodiment of the present disclosure. As shown in fig. 7, NS poles are alternately arranged on the magnetic medium. By way of example, only one pair of NS poles is shown in fig. 7, and in actual practice, multiple pairs of alternately arranged NS poles may be employed as desired, with the principles of the present disclosure being equally applicable. As shown in fig. 7, the magnetic sensor 401 detects a changing magnetic field generated by a relative rotational motion between the magnetic sensor 401 and a magnetic medium, and outputs a first component signal, i.e., an a-phase signal (sin), and a second component signal, i.e., a B-phase signal (cos) of the detected magnetic field; the signal processing circuit 402 acquires a value of a specific position in the periodic variation of at least one of the first component signal and the second component signal; and calculating at least one of a zero point error and an amplitude deviation of the at least one component signal based on the acquired value of the at least one component signal at a specific position in the periodic variation. Specifically, the signal processing circuit 402 acquires the zero point error and/or the amplitude deviation of the component signals based on the algorithm described above in connection with fig. 4 to 6, and calculates the magnetic field angle.
FIG. 8 schematically illustrates a schematic configuration of a linear magnetic encoder according to an embodiment of the present disclosure. As shown in fig. 8, NS poles are alternately arranged on a magnetic medium, a magnetic sensor 501 detects a changing magnetic field generated by a relative linear motion between the magnetic sensor 501 and the magnetic medium, and outputs a first component signal, i.e., an a-phase signal (sin), and a second component signal, i.e., a B-phase signal (cos), of the detected magnetic field; the signal processing circuit 502 acquires a value of a specific position in the periodic variation of at least one of the first component signal and the second component signal; and calculating at least one of a zero point error and an amplitude deviation of the at least one component signal based on the acquired value of the at least one component signal at a specific position in the periodic variation. Specifically, the signal processing circuit 502 acquires the zero point error and/or the amplitude deviation of the component signals based on the algorithm described above in connection with fig. 4-6, and calculates the magnetic field angle.
As an example, the signal processing circuit 402/502 is further configured to: the signal processing circuit is further configured to: a peak value of the first component signal and/or the second component signal in the periodic variation is acquired, and a zero point error and/or an amplitude deviation of the first component signal and/or the second component signal is calculated based on the acquired peak value of the first component signal and/or the second component signal in the periodic variation.
As an example, the signal processing circuit 402/502 is further configured to: acquiring a positive peak value and a negative peak value of one of the first component signal and the second component signal by detecting two consecutive zero-crossing points of the other of the first component signal and the second component signal in a periodic variation.
As an example, the signal processing circuit 402/502 is further configured to: the positive peak value and the negative peak value of the first component signal and/or the second component signal are obtained by detecting the maximum value and the minimum value of the first component signal and/or the second component signal in the periodic variation.
As an example, the first and second component signals are a sine signal and a cosine signal, respectively.
As an example, the signal processing circuit is further configured to: and carrying out first linearization processing on positive peaks and negative peaks of the first component signal and/or the second component signal in periodic variation to obtain zero point errors of the first component signal and/or the second component signal.
As an example, the first linearization process includes arithmetically averaging the sum of positive and negative peaks of the first component signal and/or the second component signal in the periodic variation.
As an example, the signal processing circuit 402/502 is further configured to: and carrying out second linear processing on positive peaks and negative peaks of the first component signal and/or the second component signal in the periodic variation to obtain the amplitude deviation of the first component signal and/or the second component signal.
As an example, the second linearization process comprises a weighted average of the difference of positive and negative peaks in the periodic variation of the first component signal and/or the second component signal.
As an example, the signal processing circuit 402/502 is further configured to: and digitally filtering positive peaks and negative peaks of the acquired first component signal and/or second component signal in periodic variation.
As an example, the magnetic sensor is a magneto-resistive effect sensor or a hall effect sensor.
As an example, N poles and S poles are alternately arranged on the magnetic medium, and the magnetic sensor performs linear motion or rotational motion with respect to the magnetic medium in a direction in which the N poles and S poles are alternately arranged.
According to another aspect of the present disclosure, there is also provided an electronic device, including: the above-described magnetic encoder; and a controller that controls the position and/or speed of the moving body based on the relative position of the magnetic medium and the magnetic sensor determined by the magnetic encoder.
According to another aspect of the present disclosure, a detection method for a magnetic encoder is also presented. Accordingly, fig. 9 schematically illustrates a flow chart of a detection method for a magnetic encoder according to an embodiment of the present disclosure. As shown in fig. 9, the method includes: s910, detecting a changing magnetic field generated at the magnetic sensor by relative motion between the magnetic sensor and a magnetic medium, and outputting a first component signal and a second component signal which are characteristic of the magnetic field, wherein the first component signal and the second component signal are periodically changed and are orthogonal to each other; s920, calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal; s930, obtaining a correction value of the first component signal and a correction value of the second component signal using the calculated zero point error and/or amplitude deviation; and S940, determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
As an example, the detection method further comprises: a peak value of the first component signal and/or the second component signal in the periodic variation is acquired, and a zero point error and/or an amplitude deviation of the first component signal and/or the second component signal is calculated based on the acquired peak value of the first component signal and/or the second component signal in the periodic variation.
As an example, the detection method further comprises: detecting two consecutive zero-crossings in a periodic variation of one of the first and second component signals to obtain positive and negative peaks of the other of the first and second component signals.
As an example, the detection method further comprises: the positive peak value and the negative peak value of the first component signal and/or the second component signal are obtained by detecting the maximum value and the minimum value of the first component signal and/or the second component signal in the periodic variation.
As an example, the first and second component signals are a sine signal and a cosine signal, respectively.
As an example, the detection method further comprises: and carrying out first linearization processing on positive peaks and negative peaks of the first component signal and/or the second component signal in periodic variation to obtain zero point errors of the first component signal and/or the second component signal.
As an example, the detection method further comprises: and carrying out second linear processing on positive peaks and negative peaks of the first component signal and/or the second component signal in the periodic variation to obtain the amplitude deviation of the first component signal and/or the second component signal.
As an example, the detection method further comprises: and digitally filtering positive peaks and negative peaks of the acquired first component signal and/or second component signal in periodic variation.
As an example, the first linearization process includes arithmetically averaging the sum of positive and negative peaks of the first component signal and/or the second component signal in the periodic variation.
As an example, the second linearization process comprises a weighted average of the difference of positive and negative peaks in the periodic variation of the first component signal and/or the second component signal.
According to yet another aspect of the present disclosure, a processor-readable storage medium is also presented, in which program instructions are stored, which when executed by a processor, are capable of implementing the above-described detection method.
10A-10B schematically illustrate the results of comparing a corrected magnetic field signal with an uncorrected magnetic field signal obtained by a magnetic encoder and detection method according to the present disclosure. Fig. 10A shows a lissajous figure synthesized on the XY plane with the value of the first component signal as the vertical axis in the y direction and the value of the second component signal as the horizontal axis in the x direction. As shown in fig. 10A, in the case where the magnetic sensor is not disturbed, i.e., in the ideal case, the synthesized lissajous figure is a standard circle whose center is at the origin (0,0) and whose radius is 1 (normalized for the amplitude of the magnetic field signal); in the case where the magnetic sensor is disturbed, for example, when the magnetic sensor has zero point errors and/or amplitude deviations due to temperature, electromagnetic interference, thermal noise, etc., the synthesized lissajous figure is an ellipse whose center is not at the origin (0,0) if not corrected, wherein the deviation of the center from the origin (0,0) actually reflects the zero point errors Ox and Oy of the first and second component signals, and the major and minor axes of the ellipse reflect the amplitude deviations Gx and Gy of the first and second component signals, respectively. When the magnetic field angle is calculated using such uncorrected first and second component signals, an angular deviation as shown in fig. 10B occurs, i.e., the calculated magnetic field angle value will no longer be linear with sampling time. In other words, the accuracy of the magnetic field angle calculated using the first component signal and the second component signal that have not been corrected is significantly reduced, thereby causing errors or even errors in the calculation of the physical parameters such as the position and the velocity of the moving body, and adversely affecting the subsequent control. In contrast, when the magnetic sensor and the detection method thereof proposed by the present disclosure are utilized, the first component signal and the second component signal output by the magnetic sensor can be corrected, thereby avoiding a decrease in accuracy caused when the magnetic sensor is disturbed. As shown in fig. 10A, after the correction, the synthesized lissajous figure is also a circle whose center is at the origin (0,0), and although the radius may no longer be 1, the ratio of the first component signal and the second component signal is used in the calculation of the magnetic field angle, so that the accuracy of the calculation of the magnetic field angle is not affected. Accordingly, as shown in fig. 10B, the change of the magnetic field angle calculated by using the corrected first component signal and second component signal with the change of the sampling time is very close to the change in the ideal case, that is, the zero point error and the amplitude deviation of the first component signal and the second component signal due to the disturbance of the magnetic sensor are eliminated, and the calculation accuracy of the magnetic field angle is improved.
In addition, according to the embodiment of the disclosure, the zero point error and/or the amplitude deviation of the component signal are/is calculated by acquiring the value of the specific position of the component signal reflecting the changed magnetic field signal in the periodic change, so that the zero point error and/or the amplitude deviation are avoided being solved by adopting a complex simultaneous equation system, the calculation process is simplified, and the operation speed is improved.
As will be appreciated by one skilled in the art, the embodiments described herein may be implemented as a method or process, an apparatus, a computer program product, a data stream, or a signal. Even if only a single embodiment is discussed in the context (e.g., as a method or device), embodiments of the features discussed may be implemented in other forms (e.g., a program). An apparatus may be implemented in, for example, appropriate hardware, software, and firmware. The method may be implemented in, for example, an apparatus such as a processor, which refers generally to a processing device including, for example, a computer, microprocessor, integrated circuit, or programmable logic device. Processors also include communication devices, such as smart phones, tablets, computers, cell phones, portable/personal digital assistants ("PDAs"), and other devices that facilitate the communication of information between end-users.
Additionally, the methods may be implemented by instructions being executed by a processor, and such instructions (and/or data values resulting from the implementation) may be stored in a processor-readable medium, such as an integrated circuit, software carrier, or other storage device; other storage devices may be, for example, a hard disk, a Compact Disc (CD), an optical disc (e.g., a DVD, commonly referred to as a digital versatile disc or a digital video disc), a Random Access Memory (RAM), or a Read Only Memory (ROM). The instructions may form an application program tangibly embodied on a processor-readable medium. The instructions may be in, for example, hardware, firmware, software, or a combination thereof. The instructions may be found in, for example, an operating system, a separate application, or a combination of both. Thus, a processor may be characterized, for example, as a device configured to perform a process and a device including a processor-readable medium (such as a storage device) having instructions for performing a process. Further, a processor-readable medium may store data values produced by an embodiment in addition to or in place of instructions.
A number of embodiments have been described. Nevertheless, it will be understood that various modifications may be made. For example, elements of different embodiments may be combined, supplemented, modified, or removed to produce other embodiments. In addition, it will be appreciated by those of ordinary skill in the art that other structures and processes may be substituted for the disclosed structures and processes, and that the resulting embodiments will perform at least substantially the same function in at least substantially the same way to achieve at least substantially the same result as the disclosed embodiments. Accordingly, this application contemplates these and other embodiments.
The various embodiments described above can be combined to provide further embodiments. Aspects of the embodiments can be modified, if necessary to employ concepts of the various patents, applications and publications to provide yet further embodiments.
These and other changes can be made to the embodiments in light of the above detailed description. In general, in the following claims, the terms used should not be construed to limit the claims to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled. Accordingly, the claims are not limited by the disclosure.

Claims (22)

1. A magnetic encoder, comprising:
a magnetic sensor that detects a changing magnetic field generated at the magnetic sensor by a relative motion between the magnetic sensor and a magnetic medium and outputs a first component signal and a second component signal that are indicative of the magnetic field, wherein the first component signal and the second component signal vary periodically and are orthogonal to each other; and
a signal processing circuit configured to:
calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal;
obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and
determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
2. The magnetic encoder of claim 1, wherein the signal processing circuitry is further configured to: a peak value of the first component signal and/or the second component signal in the periodic variation is acquired, and a zero point error and/or an amplitude deviation of the first component signal and/or the second component signal is calculated based on the acquired peak value of the first component signal and/or the second component signal in the periodic variation.
3. The magnetic encoder of claim 2, wherein the signal processing circuit obtains the positive and negative peaks of one of the first and second component signals by detecting two consecutive zero crossings of the other of the first and second component signals in a periodic variation.
4. The magnetic encoder of claim 2, wherein the signal processing circuit obtains the positive and negative peaks of the first and/or second component signals by detecting the maximum and minimum values of the first and/or second component signals in the periodic variation.
5. The magnetic encoder of any of claims 1-4, wherein the first and second component signals are sine and cosine signals, respectively.
6. The magnetic encoder of any of claims 2-4, wherein the signal processing circuitry is further configured to: and carrying out first linearization processing on positive peaks and negative peaks of the first component signal and/or the second component signal in periodic variation to obtain zero point errors of the first component signal and/or the second component signal.
7. The magnetic encoder of claim 6, wherein the first linearization process includes arithmetically averaging the sum of positive and negative peaks of the first component signal and/or the second component signal in the periodic variation.
8. The magnetic encoder of any of claims 2-4, wherein the signal processing circuitry is further configured to: and carrying out second linear processing on positive peaks and negative peaks of the first component signal and/or the second component signal in the periodic variation to obtain the amplitude deviation of the first component signal and/or the second component signal.
9. The magnetic encoder of claim 8, wherein the second linearization process includes a weighted average of the differences of the positive and negative peaks of the first and/or second component signals in the periodic variation.
10. The magnetic encoder of any of claims 2-4, wherein the signal processor circuit is further configured to: and digitally filtering positive peaks and negative peaks of the acquired first component signal and/or second component signal in periodic variation.
11. The magnetic encoder of any of claims 1-4, wherein the magnetic sensor is a magneto-resistive effect sensor or a Hall effect sensor.
12. The magnetic encoder according to any one of claims 1 to 4, wherein the magnetic medium has N poles and S poles alternately arranged thereon, and the magnetic sensor performs linear motion or rotational motion with respect to the magnetic medium in a direction along which the N poles and the S poles are alternately arranged.
13. An electronic device, comprising:
the magnetic encoder of any of claims 1-12; and
a controller to control a position and/or a speed of the moving body based on the relative position of the magnetic medium and the magnetic sensor determined by the magnetic encoder.
14. A detection method for a magnetic encoder, comprising:
detecting a changing magnetic field generated at the magnetic sensor by relative motion between the magnetic sensor and a magnetic medium and outputting a first component signal and a second component signal that are characteristic of the magnetic field, wherein the first component signal and the second component signal vary periodically and are orthogonal to each other;
calculating a zero error and/or an amplitude deviation of the first component signal and/or the second component signal;
obtaining a correction value for the first component signal and a correction value for the second component signal using the calculated zero point error and/or amplitude offset; and
determining a relative position of the magnetic medium and the magnetic sensor based on the obtained correction value of the first component signal and the correction value of the second component signal.
15. The detection method of claim 14, further comprising:
a peak value of the first component signal and/or the second component signal in the periodic variation is acquired, and a zero point error and/or an amplitude deviation of the first component signal and/or the second component signal is calculated based on the acquired peak value of the first component signal and/or the second component signal in the periodic variation.
16. The detection method of claim 15, further comprising:
detecting two consecutive zero-crossings in a periodic variation of one of the first and second component signals to obtain positive and negative peaks of the other of the first and second component signals.
17. The detection method of claim 15, further comprising:
the positive peak value and the negative peak value of the first component signal and/or the second component signal are obtained by detecting the maximum value and the minimum value of the first component signal and/or the second component signal in the periodic variation.
18. The detection method according to any one of claims 14-17, wherein the first and second component signals are sine and cosine signals, respectively.
19. The detection method according to any one of claims 15-17, further comprising: and carrying out first linearization processing on positive peaks and negative peaks of the first component signal and/or the second component signal in periodic variation to obtain zero point errors of the first component signal and/or the second component signal.
20. The detection method according to any one of claims 15-17, further comprising: and carrying out second linear processing on positive peaks and negative peaks of the first component signal and/or the second component signal in the periodic variation to obtain the amplitude deviation of the first component signal and/or the second component signal.
21. The detection method according to any one of claims 15-17, further comprising: and digitally filtering positive peaks and negative peaks of the acquired first component signal and/or second component signal in periodic variation.
22. A processor readable storage medium having stored thereon program instructions which, when executed by a processor, implement the detection method according to any one of claims 14-21.
CN202210159658.1A 2022-02-22 2022-02-22 Magnetic encoder and detection method thereof Pending CN114216486A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210159658.1A CN114216486A (en) 2022-02-22 2022-02-22 Magnetic encoder and detection method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210159658.1A CN114216486A (en) 2022-02-22 2022-02-22 Magnetic encoder and detection method thereof

Publications (1)

Publication Number Publication Date
CN114216486A true CN114216486A (en) 2022-03-22

Family

ID=80709152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210159658.1A Pending CN114216486A (en) 2022-02-22 2022-02-22 Magnetic encoder and detection method thereof

Country Status (1)

Country Link
CN (1) CN114216486A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114910112A (en) * 2022-07-15 2022-08-16 泉州昆泰芯微电子科技有限公司 Signal error correction method, magnetic encoder, and optical encoder
CN115355937A (en) * 2022-10-24 2022-11-18 泉州昆泰芯微电子科技有限公司 Self-calibration method of magnetic encoder and motor
CN115388925A (en) * 2022-07-27 2022-11-25 山东麦格智芯机电科技有限公司 Method, device, equipment and medium for detecting performance of code disc of magnetic encoder
CN116772904A (en) * 2023-08-22 2023-09-19 杭州辰控智能控制技术有限公司 Signal compensation method of magnetic encoder, magnetic encoder and calibration system
CN117041145A (en) * 2023-06-29 2023-11-10 荣耀终端有限公司 Router, detection method thereof and intelligent home system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130307609A1 (en) * 2012-05-15 2013-11-21 Infineon Technologies Ag Hall Effect Device
CN104730474A (en) * 2015-03-05 2015-06-24 上海兴工微电子有限公司 Magnetic sensor and current sensor
CN109708681A (en) * 2019-02-19 2019-05-03 深圳市盛泰奇科技有限公司 Encoder calibration method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130307609A1 (en) * 2012-05-15 2013-11-21 Infineon Technologies Ag Hall Effect Device
CN104730474A (en) * 2015-03-05 2015-06-24 上海兴工微电子有限公司 Magnetic sensor and current sensor
CN109708681A (en) * 2019-02-19 2019-05-03 深圳市盛泰奇科技有限公司 Encoder calibration method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李蕊: "单对磁极磁编码器信号处理的研究", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
郭庆伟: "磁阻传感器应用误差分析及补偿方法研究", 《价值工程》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114910112A (en) * 2022-07-15 2022-08-16 泉州昆泰芯微电子科技有限公司 Signal error correction method, magnetic encoder, and optical encoder
CN114910112B (en) * 2022-07-15 2022-09-23 泉州昆泰芯微电子科技有限公司 Signal error correction method, magnetic encoder, and optical encoder
CN115388925A (en) * 2022-07-27 2022-11-25 山东麦格智芯机电科技有限公司 Method, device, equipment and medium for detecting performance of code disc of magnetic encoder
CN115355937A (en) * 2022-10-24 2022-11-18 泉州昆泰芯微电子科技有限公司 Self-calibration method of magnetic encoder and motor
CN115355937B (en) * 2022-10-24 2022-12-27 泉州昆泰芯微电子科技有限公司 Self-calibration method of magnetic encoder and motor
CN117041145A (en) * 2023-06-29 2023-11-10 荣耀终端有限公司 Router, detection method thereof and intelligent home system
CN116772904A (en) * 2023-08-22 2023-09-19 杭州辰控智能控制技术有限公司 Signal compensation method of magnetic encoder, magnetic encoder and calibration system

Similar Documents

Publication Publication Date Title
CN114216486A (en) Magnetic encoder and detection method thereof
US8368392B2 (en) Magnetic encoder and method of detecting absolute rotational position
JP5105200B2 (en) Angle detection apparatus and angle detection method
WO2008020231A2 (en) Methods of processing encoder signals
JP7338099B2 (en) Multi-level rotary resolver with inductive sensors
JP2010054495A (en) Angle detecting apparatus and angle detecting method
JPS62204118A (en) Magnetically detecting device for position or speed
JP6969581B2 (en) Rotation angle detector
JP6350834B2 (en) Angle sensor and angle sensor system
CN111721326A (en) Angle sensor and detection device
JP6194914B2 (en) Position prediction apparatus and position detection apparatus
WO2008056793A1 (en) Rotation angle determining apparatus
US10697798B2 (en) Position forecasting apparatus and position detection apparatus
TW201944031A (en) Encoder that comprises multiple magneto-sensitive element transducer sections each including a first magneto-sensitive element and a second magneto-sensitive element
JP2012230021A (en) Rotation angle measuring device
Yamamoto et al. Development of absolute magnetic rotary encoder with eccentric rotation
JP7242352B2 (en) A system for determining at least one rotational parameter of a rotating member
JP4048207B2 (en) Position detection device
JP2020153980A (en) System for determining at least one rotation parameter of rotating member
JP6395062B2 (en) Angle sensor correction device and angle sensor
JP3920896B2 (en) Linear position detector
TW201944032A (en) Encoder that comprises multiple magneto-sensitive element transducer sections each including a first magneto-sensitive element and a second magneto-sensitive element
JPH0552583A (en) Magnetic encoder
JP4211278B2 (en) Encoder
JP3733399B2 (en) Tilt detection device

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