As is known, sensors are used to perform various functions in a variety of applications. Some sensors include one or magnetic field sensing elements, such as a Hall effect element or a magnetoresistive element, to sense a magnetic field associated with proximity or motion of a target object, such as a ferromagnetic object in the form of a gear or ring magnet, or to sense a current, as examples. Sensor integrated circuits are widely used in automobile control systems and other safety-critical applications. There are a variety of specifications that set forth requirements related to permissible sensor quality levels, failure rates, and overall functional safety.
According to aspects of the disclosure, a sensor is provided, comprising: a processing circuitry configured to: receive a first signal that is generated by a first magnetic field sensing element, the first signal being generated in response to a magnetic field that is indicative of rotation of a target; identify N local maxima of the first signal, each of the local maxima of the first signal including the largest value of the first signal during a different respective one of N electrical periods of the first signal, where N is a positive integer, and N>1; identify N local minima of the first signal, each of the local minima of the first signal including the smallest value of the first signal during a different respective one of the N electrical periods of the first signal; generate a first offset adjustment signal and a first gain adjustment signal based on: (i) a first sum of the local maxima of the first signal and (ii) a second sum of the local minima of the first signal; and adjust the first signal based on the first offset adjustment signal and the first gain adjustment signal.
According to aspects of the disclosure, a method is provided for use in a sensor, the method comprising: receiving a first signal that is generated by a first magnetic field sensing element, the first signal being generated in response to a magnetic field that is indicative of rotation of a target; identifying N local maxima of the first signal, each of the local maxima of the first signal including the largest value of the first signal during a different respective one of N electrical periods of the first signal, where N is a positive integer, and N>1; identifying N local minima of the first signal, each of the local minima of the first signal including the smallest value of the first signal during a different respective one of the N electrical periods of the first signal; generating a first offset adjustment signal and a first gain adjustment signal based on: (i) a first sum of the local maxima of the first signal and (ii) a second sum of the local minima of the first signal; and adjusting the first signal based on the first offset adjustment signal and the first gain adjustment signal.
According to aspects of the disclosure, a non-transitory computer-readable medium storing one or more processor-executable instructions, which, when executed by at least one processor, cause the at least one processor to perform the operations of: receiving a signal, the signal being generated by a sensing element in response to a magnetic field that is indicative of rotation of a target; identifying N local maxima of the signal, each of the local maxima of the signal including the largest value of the signal during a different respective one of N electrical periods of the signal, where N is a positive integer, and N>1; identifying N local minima of the signal, each of the local minima of the signal including the smallest value of the signal during a different respective one of the N electrical periods of the signal; generating an offset adjustment signal and a gain adjustment signal based on: (i) a first sum of the local maxima of the signal and (ii) a second sum of the local minima of the signal; and adjusting the signal based on the offset adjustment signal and the gain adjustment signal.
According to aspects of the disclosure, a sensor is provided, comprising; means for receiving a signal, the signal being generated by a sensing element in response to a magnetic field that is indicative of rotation of a target; means for identifying N local maxima of the signal, each of the local maxima of the signal including the largest value of the signal during a different respective one of N electrical periods of the signal, where N is a positive integer, and N>1; means for identifying N local minima of the signal, each of the local minima of the signal including the smallest value of the signal during a different respective one of the N electrical periods of the signal; means for generating an offset adjustment signal and a gain adjustment signal based on: (i) a first sum of the local maxima of the signal and (ii) a second sum of the local minima of the signal; and means for adjusting the signal based on the offset adjustment signal and the gain adjustment signal.
The foregoing features may be more fully understood from the following description of the drawings in which:
The sensor 100 may be configured to drive the excitation coil 12 in a well-known fashion. The excitation coil 12 may generate a first magnetic field, as noted above. The first magnetic field may induce eddy currents in the rotating target 14, which in turn may cause the rotating target 14 to produce a second magnetic field. The receiver coil 16A may generate a signal 17A in response to the second magnetic field and apply the signal 17A at pins R1P and R1N. The receiver coil 16B may generate a signal 17B in response to the second magnetic field and apply the signal 17B at pins R2P and R2N. The sensor 100 may generate signals 125A and 125B based on the signals 17A and 17B. The signal 125A may be output on pins SINP and SINN of the sensor 100. The signal 125A may a reconstructed sinusoid signal. The signal 125A may be indicative of at least one of angular position, speed, direction, and/or acceleration of the rotating target 14. The signal 125B may be output on pins COSP and COSN of the sensor 100. The signal 125B may a reconstructed co-sinusoid signal. The signal 125B may be indicative of at least one of angular position, speed, direction, and/or acceleration of the rotating target 14.
A misalignment between the target 14 and the sensor 100 may impart a mechanical modulation on the signal 17A (and the signal 17B). The effects of the mechanical modulation of the signal 17A are illustrated in
According to the example of
The phrase “mechanical misalignment between a target and a sensor” shall refer to at least one of (i) a misalignment between the target and the sensor, and/or or (ii) a misalignment between the target and a sensing element that is used by the sensor to sense a magnetic field that is produced by the target. The sensing element may be part of the sensor or it may be provided externally of the sensor (as in the example of
According to aspects of the disclosure, the sensor 100 employs a signal processing technique that corrects, at least in part, the effects of mechanical modulation that is imparted on the signal as a result of a misalignment between the target 14 and the sensor 100.
The EMI filter 108A may receive the signal 17A over pins R1P and R1N. The EMI filter 108A may filter the signal 17A to produce a filtered signal 109A. The ADC 110A may digitize the signal 109A to produce a signal 111A. The adjustment unit 112A may adjust the gain and/or offset of the signal 111A to produce a signal 113A. The EMI filter 108B may receive the signal 17B over pins R2P and R2N. The EMI filter 108B may filter the signal 17B to produce a filtered signal 109B. The ADC 110B may digitize the signal 109B to produce a signal 111B. The adjustment unit 112B may adjust the gain and/or offset of the signal 111B to produce a signal 113B.
The calculator 114 may generate signals 115A and 115B based on signals 113A and 113B. In some implementations, each of signals 115A and 115B may include a stream of angle values, wherein each of the angle values corresponds to a current angular position of the target. The delay compensation unit 118 may perform delay compensation on the signal 115A to produce a signal 119A. In some implementations, the delay compensation unit 118 may adjust the signal 115A to compensate for the effective path latency of the sensor 100. The delay compensation unit 118 may also perform delay compensation on the signal 115B to produce a signal 119B. In some implementations, the delay compensation unit 118 may adjust the signal 115B to compensate for the effective path latency of the sensor 100.
The sine element 120A may transform the signal 119A into a differential sine signal 121A. The digital-to-analog converter (DAC) 122A may convert the signal 121A to analog signal 123A. The output driver 124A may generate a signal 125A based on the signal 123A. The output driver 124A may output the signal 125A on pins SINP and SINN, as shown. The cosine element 120B may transform the signal 119B into a differential cosine signal 121B. The digital-to-analog converter (DAC) 122B may convert the signal 121B to analog signal 123B. The output driver 124B may generate a signal 125B based on the signal 123B. The output driver 124B may output the signal 125B on pins COSP and COSN, as shown.
Although in the example of
The adjustment unit 112A is configured to receive the signal 111A and output the signal 113A. As noted above, the signal 111A is generated by conditioning (or processing) the signal 17A. Accordingly, the signal 111A is subject to the same mechanical modulation as the signal 17A. The adjustment unit 112A may adjust the signal 111A to compensate for the effects of the mechanical modulation. Accordingly, the signal 113A may be the same or similar to the signal 17A′, which is discussed above with respect to
To correct (at least partially) for the effects of mechanical modulation, the adjustment unit 112A may: (i) adjust the offset of the signal 111A based on an offset adjustment signal 309A, and (ii) adjust the gain of the signal 111A based on a gain adjustment signal 309B. In some implementations, the offset adjustment signal 309A and the gain adjustment signal 309B may be calculated in accordance with Equations 1 and 2, below:
where N is a count of electrical periods in the signal 111A that occur during one full rotation of the target 14, Maxi is the local maximum of the first signal for the i-th electrical period of the first signal, and Mini is the local minimum of the first signal for the i-th electrical period of the first signal.
The terms “gain adjustment coefficient” and “gain adjustment signal” may be used interchangeably, when the context permits. The gain adjustment signal 309B may be a stream of values of a gain adjustment coefficient. In this regard, at any given time, adjusting the gain of the signal 111A based on the gain adjustment signal 309B may include multiplying the instant value of the signal 111A by the (inverse of the) instant value of the gain adjustment coefficient (i.e., the instant value of the gain adjustment signal 309B). The terms “offset adjustment coefficient” and “offset adjustment signal” may be used interchangeably, when the context permits. The offset adjustment signal 309A may be a stream of values of an offset adjustment coefficient. In this regard, at any given time, adjusting the offset of the signal 111A based on the offset adjustment signal 309A may include subtracting the instant value of the offset adjustment coefficient (i.e., the instant value of the offset adjustment signal 309A) from the instant value of the signal 111B.
As illustrated in
The max detector 302A may include any suitable type of processing circuitry that is configured to identify local maxima in the signal 111A. The accumulator register 304A may include any suitable type of accumulator register that is configured to calculate the sum of N most recent local maxima of the signal 111A. According to the present example, the value of N is equal to the number of electrical periods in the signal 111A that correspond to one mechanical period of a target. The min detector 302B may include any suitable type of processing circuitry that is configured to identify local minima in the signal 111A. The accumulator register 304B may include any suitable type of accumulator register that is configured to calculate the sum of N most recent local minima of the signal 111A.
The max detector 302A may generate a signal 303A, and provide the signal 303A to the accumulator register 304A. The signal 303A may include a stream of values, wherein each value corresponds to a different local maximum of the signal 111A. The accumulator register 304A may generate a signal 305A, and provide the signal 305A to summation units 306A and 306B. The signal 305A may include a stream of values, wherein each value is equal to the sum of the N most recent values of the signal 303A.
The min detector 302B may generate a signal 303B, and provide the signal 303B to the accumulator register 304B. The signal 303B may include a stream of values, wherein each value corresponds to a different local minimum of the signal 111A. The accumulator register 304B may generate a signal 305B, and provide the signal 305B to summation units 306A and 306B. The signal 305B may include a stream of values, wherein each value is equal to the sum of the N most recent values of the signal 303B.
The summation unit 306A may add signals 305A and 305B to produce a signal 307A. The signal 307A may include a stream of values, wherein each value corresponds to the sum of a value of the signal 305A and a value of the signal 305B. The summation unit 306B may subtract the signal 305B from the signal 305A to produce a signal 307B. The signal 307B may include a stream of values, wherein each value corresponds to the difference between a value of the signal 305A and a value of the signal 305B.
The multiplication unit 308A may multiply the signal 307A by ‘1/2N’ to produce a signal 309A. The offset adjustment signal 309A may include a stream of values, wherein each value is equal to the quotient of a value of the signal 307A and ‘2N’. The summation unit 310 may subtract the signal 309A from the signal 111A to produce a signal 311. The signal 311 may include a stream of values, wherein each value is equal to the difference of a value of the signal 111A and a value of the offset adjustment signal 309A. The division unit may divide the signal 311 by the gain adjustment signal 309B to produce the signal 113A.
At step 402, a first signal is received that is generated by a first magnetic field sensing element. The first magnetic field sensing element may be the same or similar to the receiver coil 16A (shown in
At step 404, a second signal is received that is generated by a second magnetic field sensing element. The second magnetic field sensing element may be the same or similar to the receiver coil 16B (shown in
At step 406, the first signal is adjusted to compensate for a misalignment of the sensor and the target. In some implementations, the first signal may be adjusted in accordance with a process 500, which is discussed further below with respect to
At step 408, the second signal is adjusted to compensate for a misalignment of the sensor and the target. In some implementations, the second signal may be adjusted in accordance with a process 500, which is discussed further below with respect to
At step 410, an output signal is generated based on at least one of the first signal and the second signal. The output signal may be generated after the first and/or second signals are adjusted at steps 406 and 408, respectively. The output signal may be indicative of at least one of angular position, speed, direction, and/or acceleration of the target. The output signal may be generated in a well-known fashion. In some implementations, the output signal may be generated after additional compensations are performed on the first and/or second signals, such as temperature compensation, humidity compensation, pressure compensation, etc.
According to the example of
According to the example of
According to the example of
According to the example of
According to the example of
As used throughout the disclosure, the term “processing circuitry” may refer to one or more of analog circuitry, digital circuitry, digital logic, a general-purpose processor, a special-purpose processor, an application-specific processor, a digital circuit processor, a field-programmable gate array (FPGA), and/or any other suitable type of electronic circuit. A non-limiting example of processing circuitry includes at least one of the adjustment units 112A-B and/or the calculator 114, which are shown in
At step 502, a plurality of samples of the first signal is acquired over at least N electrical periods of the first signal. According to the present example, N is a positive integer, and N>1.
At step 504, N local maxima of the first signal are identified. According to the present example, each of the local maxima includes a local maximum of the first signal that occurs during a different one of the N electrical periods. In some implementations, the local maximum of the first signal for a particular electrical period of the first signal may include the value of the positive peak of the first signal in that electrical period. Additionally or alternatively, in some implementations, the local maximum of the first signal for a particular electrical period of the first signal may include the smallest sample of the first signal that is obtained during that electrical period. In some implementations, identifying the largest sample for a given electrical period and using it as a local maximum is advantageous because the largest sample can be obtained more easily than the exact value of the local maximum, while the error resulting from using the largest sample instead of a local maximum is low (provided that the signal is sampled at a sufficient rate).
At step 506, N local minima of the first signal are identified. According to the present example, each of the local minima includes a local minimum of the first signal that occurs during a different one of the N-sampling periods. In some implementations, the local minimum of the first signal for a particular electrical period of the first signal may include the value of the negative peak of the first signal in that electrical period. Additionally or alternatively, in some implementations, the local minimum of the first signal for a particular electrical period of the first signal may include the smallest sample of the first signal that is obtained during that electrical period. In some implementations, identifying the smallest sample for a given electrical period and using it as a local minimum is advantageous because the smallest sample can be obtained more easily than the exact value of the local minimum, while the error resulting from using the smallest sample instead of the exact value of the local minimum is low (provided that the signal is sampled at a sufficient rate).
At step 508, a gain adjustment coefficient is generated based on the N local maxima (identified at step 504) and the N local minima (identified at step 506). The gain adjustment coefficient may be generated in accordance with Equation 1, above. More particularly, the gain adjustment coefficient may be calculated by: (i) calculating a first sum of the N local maxima, (ii) calculating a second sum of the N local minima, (iii) calculating a difference of the first sum and the second sum, and (iv) dividing the difference by 2N.
At step 510, an offset adjustment coefficient is generated based on the N local maxima (identified at step 504) and the N local minima (identified at step 506). The offset adjustment coefficient may be generated in accordance with Equation 2, above. More particularly, the gain adjustment coefficient may be calculated by: (i) calculating a first sum of the N local maxima, (ii) calculating a second sum of the N local minima, (iii) calculating a third sum of the first sum and the second sum, and (iv) dividing the third sum by 2N.
At step 512, the first signal is adjusted based on at least one of the gain adjustment coefficient and the offset adjustment coefficient. Specifically, the first signal may be adjusted by subtracting the offset adjustment coefficient (calculated at step 510) from the first signal to produce an offset-adjusted signal, and then dividing the offset-adjusted signal by the gain adjustment coefficient (calculated at step 508).
An approach is now described for deriving the model that is represented by the equations for calculating the gain and offset adjustment coefficients (i.e., Equations 1 and 2). The approach is presented in the context of processing the signal 17A (shown in
Signal 17A may be represented by Equation 3 below:
S
17A
=M
mod
·S
125A
=M
mod·sin(θe+ϕS) (3)
where S17A is signal 17A, S125A is signal 125A, and Mmod is the model for the mechanical modulation that is imparted on the output of the receiver coil 16A as a result of a misalignment between the target 14 and the sensor 100, θe is the electrical angle of the signal 17A, and ϕS is the phase of signal 125A. Signal S125A, according to the example of Equation 3, is what would ideally be output by the receiver coil 16A if no mechanical modulation were imparted on the output of the receiver coil 16A.
The mechanical modulation Mmod may be modeled in accordance with Equations 4-7 below:
where θm is the mechanical angle of the target 14, H is the number of relevant harmonic terms, am
Based on equations, 3-7, the signal 17A may be also expressed by equation 8 below:
S
17A=Sensc·Mmod·sin(θe+ϕC)+OffsetC (8)
where SensC is the amplitude of the mechanical modulation that is imparted on the output of the receiver coil 16A, and OffsetC is the offset of the mechanical modulation that is imparted on the output of the receiver coil 16A.
Applying Fourier's transform, Equation 8 can be re-written as Equations 9 and 11, below:
where Ac is the mean amplitude of the signal 17A.
If signal 17A is sampled at sin(θe+ϕC)=±1, Min samples for the signal 17A will be obtained at θe=2·π·
and Max samples for the signal 17A will be obtained at θe=2·π·
(i∈Z indicating the index of the electrical period). The minimum and maximum samples may or may not be the actual positive and negative peaks of the signal 17A as they are affected by the modulation term.
The minimum and maximum samples of the signal 17A may be expressed by equations 12 and 13 below:
where MaxC is a maximum sample and MinC is a minimum sample.
To obtain the mean values and cancel the mechanical modulation, the following sums of N samples must be defined for one period of Mmod (or N electrical periods).
In the present example,
for ∀ψ and for N≥2·H, because: (A) equations 14 and 15 are defined for one period of Mmod and
Accordingly, Equations 14 and 15 can be rewritten as equations 16 and 17, respectively.
Equations 16 and 17 can be re-written as equations 1 and 2, respectively.
In some respects, Equations 1 and 2 are based on the fact that the mechanical modulation that is imparted on signals 17A and 17B (shown in
the samples taken from the signals 17A and 17B can be used to sample the signal Mmod at a constant angle step (which is an integer divisor of the mechanical period), thus reducing (or ideally removing) mechanical modulation effect from channel Max/Min samples. This requires each of the signals 17A and 17B to satisfy a kind of spatial Nyquist theorem, in which
where H is the number of relevant harmonic terms of Mmod (as determined by the particular application in which Equations 1 and 2 are used).
The concepts and ideas described herein may be implemented, at least in part, via a computer program product, (e.g., in a non-transitory machine-readable storage medium such as, for example, a non-transitory computer-readable medium), for execution by, or to control the operation of, data processing apparatus (e.g., a programmable processor, a computer, or multiple computers). Each such program may be implemented in a high-level procedural or object-oriented programming language to work with the rest of the computer-based system. However, the programs may be implemented in assembly, machine language, or Hardware Description Language. The language may be a compiled or an interpreted language, and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or another unit suitable for use in a computing environment. A computer program may be deployed to be executed on one computer or multiple computers at one site or distributed across multiple sites and interconnected by a communication network. A computer program may be stored on a non-transitory machine-readable medium that is readable by a general or special purpose programmable computer for configuring and operating the computer when the non-transitory machine-readable medium is read by the computer to perform the processes described herein. For example, the processes described herein may also be implemented as a non-transitory machine-readable storage medium, configured with a computer program, where upon execution, instructions in the computer program cause the computer to operate in accordance with the processes. A non-transitory machine-readable medium may include but is not limited to a hard drive, compact disc, flash memory, non-volatile memory, or volatile memory. The term unit (e.g., a addition unit, a multiplication unit, etc.), as used throughout the disclosure may refer to hardware (e.g., an electronic circuit) that is configured to perform a function (e.g., addition or multiplication, etc.), software that is executed by at least one processor, and configured to perform the function, or a combination of hardware and software.
According to the present disclosure, a magnetic field sensing element can include one or more magnetic field sensing elements, such as Hall effect elements, magnetoresistance elements, or magnetoresistors, and can include one or more such elements of the same or different types. As is known, there are different types of Hall effect elements, for example, a planar Hall element, a vertical Hall element, and a Circular Vertical Hall (CVH) element. As is also known, there are different types of magnetoresistance elements, for example, a semiconductor magnetoresistance element such as Indium Antimonide (InSb), a giant magnetoresistance (GMR) element, for example, a spin valve, an anisotropic magnetoresistance element (AMR), a tunneling magnetoresistance (TMR) element, and a magnetic tunnel junction (MTJ). The magnetic field sensing element may be a single element or, alternatively, may include two or more magnetic field sensing elements arranged in various configurations, e.g., a half bridge or full (Wheatstone) bridge. Depending on the device type and other application requirements, the magnetic field sensing element may be a device made of a type IV semiconductor material such as Silicon (Si) or Germanium (Ge), or a type III-V semiconductor material like Gallium-Arsenide (GaAs) or an Indium compound, e.g., Indium-Antimonide (InSb).
Having described preferred embodiments, which serve to illustrate various concepts, structures and techniques, which are the subject of this patent, it will now become apparent that other embodiments incorporating these concepts, structures and techniques may be used. Accordingly, it is submitted that the scope of the patent should not be limited to the described embodiments but rather should be limited only by the spirit and scope of the following claims.