Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
MAGNETIC FIELD SENSOR HAVING ERROR CORRECTION
Document Type and Number:
WIPO Patent Application WO/2017/218157
Kind Code:
A1
Abstract:
A magnetic field sensor includes a first magnetic field sensing element configured to produce a first signal representing a detected external magnetic field; a circular vertical hall element configured to produce a second signal representing an amplitude of the external magnetic field; and an error compensation circuit coupled to receive the first and second signal, compute an error value based on the amplitude of the external magnetic field, and apply the error value to the first signal to compensate for an error in the first signal.

Inventors:
ROMERO HERNÁN D (AR)
Application Number:
PCT/US2017/034473
Publication Date:
December 21, 2017
Filing Date:
May 25, 2017
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
ALLEGRO MICROSYSTEMS LLC (US)
International Classes:
G01P21/02; G01D18/00; G01D5/14; G01P3/487
Domestic Patent References:
WO2013138942A12013-09-26
WO2008145662A12008-12-04
Foreign References:
US20100163333A12010-07-01
US20150176964A12015-06-25
US20120313635A12012-12-13
US201615012125A2016-02-01
US201615012131A2016-02-01
US201615012142A2016-02-01
US8890518B22014-11-18
EP2008056517W2008-05-28
Other References:
PAVEL RIPKA ET AL: "Advances in Magnetic Field Sensors", IEEE SENSORS JOURNAL, IEEE SERVICE CENTER, NEW YORK, NY, US, vol. 9, no. 6, June 2010 (2010-06-01), pages 1108 - 1116, XP011306891, ISSN: 1530-437X
Attorney, Agent or Firm:
MILMAN, Seth, A. et al. (US)
Download PDF:
Claims:
CLAIMS 1. A magnetic field sensor comprising:

a first magnetic field sensing element configured to produce a first signal representing a detected external magnetic field;

a circular vertical hall element configured to produce a second signal representing an amplitude of the external magnetic field; and

an error compensation circuit coupled to receive the first and second signal, compute an error value based on the amplitude of the external magnetic field, and apply the error value to the first signal to compensate for an error in the first signal. 2. The magnetic field sensor of claim 1 wherein the first magnetic field sensing element comprises a giant-magnetoresistive element. 3. The magnetic field sensor of claim 1 further comprising a peak detect circuit coupled to receive the second signal. 4. The magnetic field sensor of claim 3 wherein the peak detect circuit is a peak-to-peak detect circuit. 5. The magnetic field sensor of claim 1 wherein the error compensation circuit comprises a processor.

6. The magnetic field sensor of claim 1 wherein the error value is a function of the amplitude of the external magnetic field. 7. The magnetic field sensor of claim 1 further comprising a second magnetic field sensing element. 8. The magnetic field sensor of claim 7 wherein the first and second magnetic field

sensing elements are magnetoresistive elements each comprising a pinned layer. 9. The magnetic field sensor of claim 8 wherein the first and second magnetic field

sensing elements are arranged so that an axis of maximum sensitivity of the first magnetic field sensing element is substantially orthogonal to an axis of maximum sensitivity of the second magnetic field sensing element. 10. The magnetic field sensor of claim 7 wherein the second magnetic field sensing

element is configured to produce a second signal representing the detected external magnetic field. 11. The magnetic field sensor of claim 10 wherein the first and second signals representing the detected magnetic field are quadrature signals. 12. The magnetic field sensor of claim 1 wherein the first magnetic field sensing element is configured to operate in a saturation region.

13. The magnetic field sensor of claim 1 wherein the first magnetic field sensing element is configured to detect an angle of the magnetic field. 14. A magnetic field sensor comprising:

a magnetoresistive element configured to produce a first signal representing a detected external magnetic field, the magnetoresistive element having a first pinning layer arranged in a first direction and susceptible to alteration of the second direction in the presence of a sufficiently high amplitude of the external magnetic field;

a circular vertical hall element configured to produce a second signal representing an amplitude of the external magnetic field; and

an error compensation circuit coupled to receive the first and second signal, compute an error value based on the amplitude of the external magnetic field, and apply the error value to the first signal to compensate for an error in the first signal. 15. The magnetic field sensor of claim 14 further comprising a peak detect circuit coupled to receive the second signal. 16. The magnetic field sensor of claim 15 wherein the peak detect circuit is a peak-to-peak detect circuit. 17. The magnetic field sensor of claim 14 wherein the error compensation circuit

comprises a processor. 18. The magnetic field sensor of claim 14 wherein the error value is a function of the amplitude of the external magnetic field.

19. The magnetic field sensor of claim 14 further comprising a second magnetoresistive element configured to produce a second signal representing the detected external magnetic field, the second magnetoresistive element having a second pinning layer arranged in a second direction and susceptible to alteration of the second direction in the presence of a sufficiently high amplitude of the external magnetic field. 20. The magnetic field sensor of claim 19 wherein the first and second directions are substantially orthogonal directions. 21. The magnetic field sensor of claim 19 wherein the first and second signals representing the detected magnetic field are quadrature signals.

Description:
MAGNETIC FIELD SENSOR HAVING ERROR

CORRECTION RELATED APPLICATIONS

[0001] This application claims priority to and benefit of U.S. Patent Application No.15/181,889 (filed June 14, 2016), which is incorporated here by reference. FIELD

[0002] This disclosure relates to magnetic field sensors and, more particularly, for calibration of and compensation for error in magnetic field sensors. BACKGROUND

[0003] Magnetic field sensors can be used to detect the angle of a rotating magnetic field. Such sensors are used in various applications such as robotics, automobiles, automated manufacturing systems, etc. They are often used as a type of encoder to determine the position or speed of a rotating object. For example, a magnetic sensor can be used to detect a magnet placed on the end of a rotating cam shaft to determine the angular position or rotational speed of the shaft.

[0004] Certain magnetic field sensors use magnetoresistance or giant- magnetoresistance elements to detect the magnetic field. These elements are multilayer structures often consisting a magnetic sensing layer, a non-magnetic layer, and a magnetic fixed or pinned layer. During operation, an external magnetic field may alter the magnetic direction (i.e. the direction of the magnetic moment) of the sensing layer, thus altering an electrical resistance through the magnetoresistance element. Typically, the magnetic direction of the pinned layer remains fixed. However, a strong magnetic field can alter or reverse the magnetic direction of the pinned layer, which can cause so-called spin-flop errors in the output of the magnetic field sensor. SUMMARY

[0005] In an embodiment, a magnetic field sensor includes a first magnetic field sensing element configured to produce a first signal representing a detected external magnetic field; a circular vertical hall element configured to produce a second signal representing an amplitude of the external magnetic field; and an error compensation circuit coupled to receive the first and second signal, compute an error value based on the amplitude of the external magnetic field, and apply the error value to the first signal to compensate for an error in the first signal.

[0006] One or more of the following features may be included.

[0007] The first magnetic field sensing element may comprise a giant- magnetoresistive element.

[0008] A peak detect circuit may be coupled to receive the second signal.

[0009] The peak detect circuit may be a peak-to-peak detect circuit.

[0010] The error compensation circuit may comprise a processor.

[0011] The error value may be a function of the amplitude of the external magnetic field.

[0012] A second magnetic field sensing element may be included.

[0013] The first and second magnetic field sensing elements may be

magnetoresistive elements each comprising a pinned layer.

[0014] The first and second magnetic field sensing elements may be arranged so that an axis of maximum sensitivity of the first magnetic field sensing element is substantially orthogonal to an axis of maximum sensitivity of the second magnetic field sensing element.

[0015] The second magnetic field sensing element may be configured to produce a second signal representing the detected external magnetic field.

[0016] The first and second signals representing the detected magnetic field may be quadrature signals.

[0017] The first magnetic field sensing element may be configured to operate in a saturation region.

[0018] The first magnetic field sensing element may be configured to detect an angle of the magnetic field.

[0019] In another embodiment, an magnetic field sensor includes a

magnetoresistive element configured to produce a first signal representing a detected external magnetic field, the magnetoresistive element having a first pinning layer arranged in a first direction and susceptible to alteration of the second direction in the presence of a sufficiently high amplitude of the external magnetic field; a circular vertical hall element configured to produce a second signal representing an amplitude of the external magnetic field; and an error compensation circuit coupled to receive the first and second signal, compute an error value based on the amplitude of the external magnetic field, and apply the error value to the first signal to compensate for an error in the first signal.

[0020] One or more of the following features may be included.

[0021] A peak detect circuit may be coupled to receive the second signal.

[0022] The peak detect circuit may be a peak-to-peak detect circuit.

[0023] The error compensation circuit may include a processor.

[0024] The error value may be a function of the amplitude of the external magnetic field. [0025] A second magnetoresistive element may be configured to produce a second signal representing the detected external magnetic field. Rhw second magnetoresistive element may have a second pinning layer arranged in a second direction and may be susceptible to alteration of the second direction in the presence of a sufficiently high amplitude of the external magnetic field.

[0026] The first and second directions may be substantially orthogonal directions.

[0027] The first and second signals representing the detected magnetic field may be quadrature signals BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The foregoing features may be more fully understood from the following description of the drawings. The drawings aid in explaining and understanding the disclosed technology. Since it is often impractical or impossible to illustrate and describe every possible embodiment, the provided figures depict one or more exemplary embodiments. Accordingly, the figures are not intended to limit the scope of the invention. Like numbers in the figures denote like elements.

[0029] FIG.1 is a block diagram of a system for measuring a magnetic field.

[0030] FIG.2 is a block diagram of a magnetic field sensor.

[0031] FIG.3 is a graph of an error associated with signals of FIG.2.

[0032] FIG.4 is a block diagram of a magnetic field sensor including a compensation circuit.

[0033] FIG.5 is a diagram of a circular vertical Hall (CVH) element.

[0034] FIG.6 is a graph of an output of the CVH element of FIG.5. DETAILED DESCRIPTION

[0035] As used herein, the term "magnetic field sensing element" is used to describe a variety of electronic elements that can sense a magnetic field. The magnetic field sensing element can be, but is not limited to, a Hall Effect element, a

magnetoresistance element, or a magnetotransistor. 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, 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).

[0036] As is known, some of the above-described magnetic field sensing elements tend to have an axis of maximum sensitivity parallel to a substrate that supports the magnetic field sensing element, and others of the above-described magnetic field sensing elements tend to have an axis of maximum sensitivity perpendicular to a substrate that supports the magnetic field sensing element. In particular, planar Hall elements tend to have axes of sensitivity perpendicular to a substrate, while metal based or metallic magnetoresistance elements (e.g., GMR, TMR, AMR) and vertical Hall elements tend to have axes of sensitivity parallel to a substrate. [0037] As used herein, the term“magnetic field sensor” is used to describe a circuit that uses a magnetic field sensing element, generally in combination with other circuits. Magnetic field sensors are used in a variety of applications, including, but not limited to, an angle sensor that senses an angle of a direction of a magnetic field, a current sensor that senses a magnetic field generated by a current carried by a current-carrying conductor, a magnetic switch that senses the proximity of a ferromagnetic object, a rotation detector that senses passing ferromagnetic articles, for example, magnetic domains of a ring magnet or a ferromagnetic target (e.g., gear teeth) where the magnetic field sensor is used in combination with a back-biased or other magnet, and a magnetic field sensor that senses a magnetic field density of a magnetic field.

[0038] As used herein, the terms“target” and“magnetic target” are used to describe an object to be sensed or detected by a magnetic field sensor or magnetic field sensing element.

[0039] FIG.1 is a block diagram of a system 100 for detecting a target 102.

System 100 includes a magnetic sensor 104 placed adjacent to a rotating magnetic field (represented by magnetic moment arrow 102) so that a magnetic field 102 can be sensed by magnetic sensor 104. In an embodiment, magnetic field 102 may be produced by a magnetic target, such as a permanent magnet placed on an end of a rotation shaft, for example. Magnetic field 102 may rotate with respect to magnetic sensor 104. Magnetic sensor 104 may be configured to detect the angle of magnetic field 102 and produce a signal 104a representing the detected angle.

[0040] Magnetic sensor 104 is coupled to a computer 108, which may be a general purpose processor executing software or firmware, a custom processor, or an electronic circuit for processing output signal 104a from magnetic sensor 104. Output signal 104a may provide information about the angular speed, direction, and/or angular position of target 102 to computer 108, which may then perform operations based on the received information. In an embodiment, computer 108 is an automotive computer installed in a vehicle and magnetic field 102 is produced by a moving part within the vehicle, such as a transmission shaft, a brake rotor, etc. In this example, magnetic sensor 104 may detect the angle of magnetic field 102 and computer 108 may use that information to control automotive functions (like all-wheel drive, ABS, throttle control, etc.).

[0041] Referring to FIG.2, a magnetic field sensor 200 may be configured to detect an angle of rotating magnetic field 102. Magnetic field sensor 200 may include a magnetic field sensing element 202 to detect the field. Magnetic field sensing element 202 may detect the magnetic field and produce a signal 202a representing the strength of the detected magnetic field. In an embodiment, magnetic field sensing element 202 has an axis of maximum sensitivity. When the magnetic field is aligned with the axis of maximum sensitivity, the value of signal 202a is high, and when the magnetic field is not aligned with the axis, the value of signal 202a is low. As the direction of the magnetic field approaches the axis of maximum sensitivity, the value of signal 202a increase, and as it falls away from the axis of maximum sensitivity, the value of signal 202a decreases. Thus, the amplitude of signal 202a may provide an indication of the angle of the magnetic field. In other embodiments, magnetic field sensing element 202 may include multiple magnetic field sensing elements and/or other schemes for detecting the angle of the magnetic field.

[0042] Magnetic field sensor 200 may also include processor 204, which may receive signal 202a, compute the angle of magnetic field 102, and provide signal 204a representing the angle of magnetic field 102.

[0043] Magnetic field sensor 200 may also include an amplitude detection circuit 206 to measure the amplitude of magnetic field 102. In certain instances, the accuracy of magnetic field sensing element 202 may be affected by the amplitude of magnetic field 102. For example, if magnetic field sensing element 202 is a magnetoresistive element, the presence of a strong magnetic field 102 can generate a so-called“spin-flop” error where the pinned layer of the magnetoresistor changes direction as a function of the magnetic field angle and strength. Magnetoresistor elements may also be susceptible to so-called anisotropy error due to amplitude of the magnetic field. However, these errors occur at relatively low magnetic field levels.

[0044] Amplitude detection circuit 206 may include Hall effect elements 208 and 210 and processor 212. Hall effect elements 208 and 210 may be used to detect the strength of magnetic field 102 and produce a signal 209a representing the detected magnetic field. In an embodiment, Hall effect elements 208 and 201 are not susceptible to errors due to the strength of magnetic field 102. Although shown as a single line in FIG.2, signal 209a may include multiple signal lines.

[0045] Processor 212 may receive signal 209a and produce an error compensation signal 212a. Error compensation signal 212a, which may be a function of the strength of detected magnetic field 102, may be received and used by processor circuit 204 to compensate for spin-flop and or anisotropy errors in output signal 204a.

[0046] FIG.3 is a graph illustrating a spin-flop error of a magnetoresistor. The horizontal axis in graph 300 represents magnetic field strength and the vertical axis represents the amount of error. As shown, the error spikes when the magnetic field strength reaches a value represented by the point x1. This value may vary for

magnetoresistors of different designs. In an embodiment, a typical error may be up to 5-6 degrees of error at 600 Gauss of the external magnetic field.

[0047] The result of the spin-flop error is a triangular transfer function (shown in graph 304) of the magnetic field sensing element instead of an ideal sine (or cosine) function. [0048] Referring to FIG.4, a magnetic field sensor 400 includes a circular vertical Hall (CVH) element 402 to compensate for spin-flop (or other types of) errors caused by the amplitude of the detected magnetic field 102. Two magnetoresistance magnetic field sensing elements 404 and 406 are included to detect the angle of magnetic field 102. In embodiments, magnetic field sensing elements 404 and 406 are magnetoresistance bridges that produce differential output signals. In an embodiment, magnetic field sensing elements 404 and 406 are aligned so that their respective axes of maximum sensitivity are offset from each other. For example, the axis of maximum sensitivity of magnetic field sensing element 404 may be offset by 45 or 90 degrees from the axis of maximum sensitivity of magnetic field sensing element 406.

[0049] CVH elements may be described in U.S. Patent Application Publication 2012/0313635 and U.S. Patent Applications 15/012,125; 15/012,131; and 15/012,142; which are incorporated here by reference.

[0050] Magnetic field sensing elements 404 and 406 may generate respective signals 404a and 406a representing magnetic field 102. Amplifier stage 408 receives and amplifies signals 404a and 406a. Analog-to-digital converters 410 and 412 receive the amplified signals and convert them to digital signals 410a and 412a. In the case where the axes of maximum sensitivity of magnetic field sensing elements 404 and 406 are offset by 90 degrees, signals 410a and 412a may be quadrature signals having a 90-degree phase offset from each other.

[0051] A digital signal processing (DSP) circuit 414 receives signals 410a and 412b and calculates an angle of the detected magnetic field 102. DSP circuit 414 may include processor 416, which may be a Coordinate Rotational Digital Computer

(CORDIC) processor. Processor 416 may perform various trigonometric functions that can be used to compute an angle of magnetic field 102 from signals 410a and 412a. DSP circuit 414 may produce an output signal 414a that represents the computed angle of magnetic field 102.

[0052] In embodiments, magnetic field sensor 400 may also include other supporting circuits such as an I/O module 418 that may send and receive external signals, bias and reference voltage circuits 420, ESD protection circuits 422, memory and register circuits 424, oscillators, power circuits, an EEPROM, a temp sensor, etc.

[0053] In an embodiment, magnetic field sensor 400 comprises an amplitude detection circuit 426 that includes CVH element 402. Amplitude detection circuit 426 may also include CVH controller circuit, coupled to CVH element 402 to control and switch the individual magnetic field sensing elements within CVH element 402. An amplifier 428 and ADC circuit 402 may be included to amplify and convert CVH output signal 402a to a digital signal 430a that is received by DSP circuit 414.

[0054] Referring to FIG.5, a circular vertical Hall (CVH) sensing element 10, which may be the same as or similar to CVH element 402, includes a common circular implant region 18 having a plurality of vertical Hall elements disposed thereon, of which a vertical Hall element 12a is but one example. Each vertical Hall element has a plurality of Hall element contacts (e.g., four or five contacts), of which a vertical Hall element contact 12aa is but one example.

[0055] The term“common” circular implant region indicates that the plurality of vertical Hall elements of the CVH sensing element can have no diffused barriers between the plurality of vertical Hall elements.

[0056] A particular vertical Hall element (e.g., 12a) within the CVH sensing element 12, which, for example, can have five adjacent contacts, can share some, for example, four, of the five contacts with a next vertical Hall element (e.g., 12b). Thus, a next vertical Hall element can be shifted by one contact from a prior vertical Hall element. For such shifts by one contact, it will be understood that the number of vertical Hall elements is equal to the number of vertical Hall element contacts, e.g., 32. However, it will also be understood that a next vertical Hall element can be shifted by more than one contact from the prior vertical Hall element, in which case, there are fewer vertical Hall elements than there are vertical Hall element contacts in the CVH sensing element.

[0057] A center of a vertical Hall element 0 is positioned along an x-axis 20 and a center of vertical Hall element 8 is positioned along a y-axis 22. In the example shown in FIG.1, there are thirty-two vertical Hall elements and thirty-two vertical Hall element contacts. However, a CVH sensing element can have more than or fewer than thirty-two vertical Hall elements and more than or fewer than thirty-two vertical Hall element contacts.

[0058] In some applications, a circular magnet 14 having a south side 14a and a north side 14b can be disposed over the CVH sensing element 12. In an embodiment, circular magnet 14 may produce rotating magnetic field 102 shown in FIG.1. The circular magnet 14 may generate a magnetic field 16, which may be the same as or similar to magnetic field 102, having a direction from the north side 14b to the south side 14a, here shown to be pointed to a direction of about forty-five degrees relative to x-axis 20. Other magnets having other shapes and configurations are possible.

[0059] In some applications, the circular magnet 14 is mechanically coupled to a rotating object (a target object), for example, an automobile crankshaft or an automobile camshaft, and is subject to rotation relative to the CVH sensing element 12. With this arrangement, the CVH sensing element 12 in combination with an electronic circuit described below can generate a signal related to the angle of rotation of the magnet 14.

[0060] Referring now to FIG.6, a graph 600 has a horizontal axis with a scale in units of CVH vertical Hall element position, n, around a CVH sensing element, for example, the CVH sensing element 12 of FIG.5. The graph 600 also has a vertical axis with a scale in units of amplitude in units of millivolts. The vertical axis is representative of output signal levels from the plurality of vertical Hall elements of the CVH sensing element.

[0061] The graph 600 includes a signal 602 representative of output signal levels from the plurality of vertical Hall elements of the CVH taken sequentially with the magnetic field 16 of FIG.5 stationary and pointing in a direction of forty-five degrees. Signal 602 may be the same as or similar to signal 402a in FIG.4.

[0062] The graph 600 shows one CVH sensing element cycle, i.e. one revolution of the CVH sensing element where each Hall element is activated in sequence around the circumference of the CVH sensing element. For example, the portion of signal 602 shown in graph 600 is produced during one CVH cycle as each of the Hall elements are activated around the circumference of the CVH sensing element. In this example, the CVH cycle starts with Hall element position 0, and ends with Hall element position 31. Of course, in this example, a CVH cycle can have any start and end point as long as the CVH cycle includes one revolution of the CVH sensing element.

[0063] Referring briefly to FIG.5, as described above, vertical Hall element 0 is centered along the x-axis 20 and vertical Hall element 8 is centered along the y-axis 22. In the exemplary CVH sensing element 12, there are thirty-two vertical Hall element contacts and a corresponding thirty-two vertical Hall elements, each vertical Hall element having a plurality of vertical Hall element contacts, for example, five contacts.

[0064] In FIG.6, a maximum positive signal is achieved from a vertical Hall element centered at position 4, which is aligned with the magnetic field 16 of FIG.5, such that a line drawn between the vertical Hall element contacts (e.g., five contacts) of the vertical Hall element at position 4 is perpendicular to the magnetic field 16. A maximum negative signal is achieved from a vertical Hall element centered at position 20, which is also aligned with the magnetic field 16 of FIG.5, such that a line drawn between the vertical Hall element contacts (e.g., five contacts) of the vertical Hall element at position 20 is also perpendicular to the magnetic field 16.

[0065] A sine wave 604 is provided to more clearly show the ideal behavior of the signal 602. The signal 602 has variations due to vertical Hall element offsets, which tend to somewhat randomly cause element output signals to be too high or too low relative to the sine wave 604, in accordance with offset errors for each element. In embodiments, the offset signal errors may be undesirable. In some embodiments, the offset errors can be reduced by“chopping” each vertical Hall element. Chopping will be understood to be a process by which vertical Hall element contacts of each vertical Hall element are driven in different configurations and signals are received from different ones of the vertical Hall element contacts of each vertical Hall element to generate a plurality of output signals from each vertical Hall element. The plurality of signals can be arithmetically processed (e.g., summed or otherwise averaged) resulting in a signal with less offset. Chopping is described more fully in U.S. Patent No.8,890,518 (filed June 8, 2011), which is incorporated here by reference in its entirety.

[0066] Further operation of the CVH sensing element 12 of FIG.5 and generation of the signal 602 of FIG.6 are described in more detail in the above-described PCT Patent Application No. PCT/EP2008/056517 which is published in the English language as PCT Publication No. WO 2008/145662, and is incorporated here by reference.

[0067] Referring again to FIG.4, signal 430a may be a digital representation of signal 602. DSP circuit 414 may include a peak detection circuit 432 that receives signal 430a and produce signal 432a. Signal 432a may include information about when a peak is detected on signal 430a, i.e. when signal 430a has a high (or low) amplitude. In other words, signal 432a may provide information about the amplitude of signal 430a, and thus the amplitude of magnetic field 102, to processor 416. Processor 416 may then, during its operation, compensate for any spin-flop error in signals 410a and 412a caused by the amplitude of magnetic field 102.

[0068] Returning to FIG.4, signal 430a represents the magnetic field as detected by CVH element 402. In embodiments, signal 430a can be expressed as:

^^^^^^^ ^ ^ ^ ^^^^^^^^ ^ ^^ ^ ^^^^^^^^^

[0069] In the equation above, KCVH represents the sensitivity of the CVH sensing element 12, Off CVH represents an offset of the CVH sensing element 12, T represents the temperature of the system, t represents time, f represents the frequency of the detected magnetic field 102, ^ represents the angle of the detected magnetic field 102, and B represents the amplitude (e.g. strength) of the detected magnetic field. Peak detector circuit 432 may provide signal 432a, which represents a peak (i.e. maximum value) of signal 430a. In embodiments, the Offset term Off CVH (T) can be ignored because signal 430a is a sinusoidal or alternating signal. Thus, the amplitude B can be calculated as, for example, a peak-to-peak value of the signal such that the DC offset will not affect the calculation. Processor 114 can evaluate signal 432a to determine whether to compensate for a spin-flop error in signals 410a and/or 412a. This maximum value can be used as an estimate for the magnetic field strength of magnetic field 102.

[0070] Referring again to FIG.4, spin-flop errors may cause a fourth-harmonic error in the angle domain of output signal 416a. In an embodiment, processor 114 may use the estimated magnetic field strength represented by signal 432a to generate a fourth harmonic signal that matches the error signal, which can be subtracted from output signal 416a to compensate for the spin-flop error. In embodiments, processor 416 may generate the matching fourth-harmonic signal and subtract it from signals 410a and 412a (and or from signal 416a) to compensate for any spin-flop error. In other embodiments, another signal processing circuit may perform these functions.

[0071] The matching fourth-harmonic signal may be generated via a lookup table. The lookup table may be stored in a volatile or non-volatile memory associated with processor 416. For example, the lookup table may be stored in ROM 417. In an embodiment, the lookup table may associate angles of magnetic field 102 with error values, as follows:

Table 1 [0072] For ease of illustration, the table above may be a partial table showing error values at five-degree increments between 0 and 45. In embodiments, the table stored in memory 417 may associate error values with angles of magnetic field 102 from 0 to 90, 0 to 180, or 0 to 360 degrees. One skilled in the art will recognize that, because the error function is a fourth-harmonic function, the table may only store values for 1/16 of a complete cycle of magnetic field 102 or, in other words, from 0 to 22.5 degrees of magnetic field 102. Also, although Table 1 includes values at increments of five degrees of magnetic field 102, any increment can be used including, but not limited to: every degree, every half-degree, etc.

[0073] In an embodiment, the error values in the right column represent a harmonic signal. Thus, the angles in the left column may be incremented by the Nyquist frequency of the error signal. However, a finer increment may produce more accurate error compensation.

[0074] Processor 416 may use the table to apply an error compensation to signal 416a by, for example, multiplying the error value by a function of the detected amplitude of magnetic field 102. In an embodiment, processor 416 may use the lookup table to retrieve the error value for a particular magnetic field angle, then multiply the error value by a scalar value based on the amplitude of the magnetic field (which may be provided by peak detection circuit 432 as signal 432a).

[0075] The error values shown in the table above correspond to a sinusoidal function with a peak value of one. However, Table 1 may contain other functions and/or amplitudes depending on the error signal to be compensated. The function in Table 1 may be configured to match any error signal that is present in signal 416a so that the function in Table 1 can be subtracted from signal 416a in order to compensate for the error signal. In embodiments, Table 1 may contain a function that has the same harmonic frequency as the error signal to be compensated. Table 1 may contain a first-harmonic function, second- harmonic function, third-harmonic function, or a function of any harmonic depending on the error. In certain instances, Table 1 may contain a non-harmonic function and/or a non- continuous function having one or more discontinuities, including but not limited to asymptotic and jump discontinuities, depending on the error signal to be compensated.

[0076] One skilled in the art will recognize that using a CVH element 402 to detect amplitude of magnetic field 102 requires one CVH channel, rather than two Hall element channels as shown in FIG.2. Also, because the strength of magnetic field 102 is encoded as amplitude of signal 402a and/or 430a, any offset in the output of the CVH element 402 may be ignored in calculating the amplitude, as mentioned above.

[0077] Having described various embodiment(s), which serve to illustrate various concepts, structures and techniques, which are the subject of this patent, it will now become apparent to those of ordinary skill in the art that other embodiments incorporating these concepts, structures and techniques may be used. Accordingly, it is submitted that that 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. All references cited in this document are incorporated by reference in their entirety.