Angle sensor and angle sensor system

An angle sensor includes detection units and an angle computation unit. The detection units detect a composite magnetic field of a magnetic field to be detected and a noise magnetic field. Each detection unit generates a first detection signal representing the strength of a component in a first direction of the composite magnetic field, and a second detection signal representing the strength of a component in a second direction of the composite magnetic field. The angle computation unit generates a detected angle value by performing computations using a plurality of pairs of first and second detection signals generated at the detection units wherein an error of the detected angle value resulting from the noise magnetic field is made smaller than in the case of generating the detected angle value on the basis of only a pair of first and second detection signals generated at any one of the detection units.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an angle sensor and an angle sensor system for generating a detected angle value having a correspondence with an angle to be detected.

Description of the Related Art

In recent years, angle sensors have been widely used in various applications, such as detection of the rotational position of a steering wheel or a power steering motor in an automobile. The angle sensors generate a detected angle value having a correspondence with an angle to be detected. Examples of the angle sensors include a magnetic angle sensor. An angle sensor system using a magnetic angle sensor is typically provided with a magnetic field generation unit for generating a magnetic field to be detected, the direction of which rotates in response to the rotation or linear movement of an object. The magnetic field generation unit is a magnet, for example. The angle to be detected by the magnetic angle sensor has a correspondence with an angle that the direction of the magnetic field to be detected at a reference position forms with respect to a reference direction.

Among known magnetic angle sensors is one that includes a plurality of detection circuits for generating a plurality of detection signals of different phases and generates a detected angle value by performing computations using the plurality of detection signals, as disclosed in U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2. Each of the plurality of detection circuits detects a magnetic field to be detected. Each of the plurality of detection circuits includes at least one magnetic detection element.

In some magnetic angle sensors, as described in U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2, each detection circuit may be subjected to not only a magnetic field to be detected but also a noise magnetic field other than the magnetic field to be detected. Examples of the noise magnetic field include the earth's magnetic field and a leakage magnetic field from a motor. When subjected to such a noise magnetic field, each detection circuit detects a composite magnetic field of the magnetic field to be detected and the noise magnetic field. When the magnetic field to be detected and the noise magnetic field are in different directions, some error occurs in the detected angle value. The error occurring in the detected angle value will hereinafter be referred to as angular error.

U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2 describe rotating field sensors that are capable of reducing the angular error caused by the noise magnetic field. Each of the rotating field sensors described in U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2 is provided with a magnetic field generation unit for generating a rotating magnetic field, and a first and a second detection unit. The rotating magnetic field includes a first partial magnetic field present at a first position and a second partial magnetic field present at a second position. The first partial magnetic field and the second partial magnetic field are in directions different from each other by 180°, and rotate in the same rotational direction. The first detection unit is configured to detect, at the first position, a composite magnetic field of the first partial magnetic field and the noise magnetic field. The second detection unit is configured to detect, at the second position, a composite magnetic field of the second partial magnetic field and the noise magnetic field. The rotating field sensors described in U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2 perform computations using the outputs from the first and second detection units to thereby generate a detected angle value in which the angular error caused by the noise magnetic field is reduced.

The rotating field sensors described in U.S. Pat. Nos. 8,604,780 B2 and 8,659,289 B2 each require the particular magnetic field generation unit for generating a rotating magnetic field that includes the first and second partial magnetic fields defined as above. Furthermore, locations of the first and second detection units are limited depending on the pattern of the rotating magnetic field. These rotating field sensors thus have substantial limitations with respect to structure and installation.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide an angle sensor and an angle sensor system that enable reduction of an angular error caused by a noise magnetic field, without introducing any substantial limitations with respect to structure or installation.

An angle sensor of the present invention is configured to generate a detected angle value having a correspondence with an angle to be detected. The angle sensor of the present invention includes a plurality of detection units and an angle computation unit. The plurality of detection units are configured to detect, at a plurality of detection positions different from each other, a composite magnetic field of a magnetic field to be detected and a noise magnetic field other than the magnetic field to be detected. The angle computation unit is configured to generate the detected angle value.

At each of the plurality of detection positions, the magnetic field to be detected varies in direction according to the angle to be detected. The magnetic field to be detected has different strengths at the plurality of detection positions. Each of the plurality of detection units includes a first detection signal generation unit for generating a first detection signal representing the strength of a component in a first direction of the composite magnetic field, and a second detection signal generation unit for generating a second detection signal representing the strength of a component in a second direction of the composite magnetic field.

The angle computation unit generates the detected angle value by performing computations using a plurality of pairs of first and second detection signals generated at the plurality of detection units so that an error of the detected angle value resulting from the noise magnetic field is made smaller than in the case of generating the detected angle value on the basis of only a pair of first and second detection signals generated at any one of the plurality of detection units.

In the angle sensor of the present invention, the first direction and the second direction may be orthogonal to each other. Each of the first and second detection signal generation units may include at least one magnetic detection element.

In the angle sensor of the present invention, the plurality of detection units may be a first detection unit and a second detection unit. In such a case, the angle computation unit may generate the detected angle value using a difference between the first detection signal generated at the first detection unit and the first detection signal generated at the second detection unit, and a difference between the second detection signal generated at the first detection unit and the second detection signal generated at the second detection unit.

In the angle sensor of the present invention, the angle computation unit may generate the detected angle value using the method of least squares on the basis of the plurality of pairs of first and second detection signals. In such a case, the angle computation unit may assume first unknown magnetic field information, second unknown magnetic field information, a plurality of first assumed detection values, a plurality of second assumed detection values, a plurality of first residuals, and a plurality of second residuals. The first unknown magnetic field information corresponds to strengths, at a predetermined position, of a component in the first direction and a component in the second direction of the magnetic field to be detected. The second unknown magnetic field information corresponds to strengths of a component in the first direction and a component in the second direction of the noise magnetic field. Each of the plurality of first assumed detection values is a value that corresponds to one of the first detection signals generated at the plurality of detection units and is assumed on the basis of the first and second unknown magnetic field information. Each of the plurality of second assumed detection value is a value that corresponds to one of the second detection signals generated at the plurality of detection units and is assumed on the basis of the first and second unknown magnetic field information. Each of the plurality of first residuals is a difference between one of the first detection signals generated at the plurality of detection units and a corresponding one of the first assumed detection values. Each of the plurality of second residuals is a difference between one of the second detection signals generated at the plurality of detection units and a corresponding one of the second assumed detection values. The angle computation unit may then estimate the first and second unknown magnetic field information so as to minimize the sum of squares of the plurality of first residuals and to minimize the sum of squares of the plurality of second residuals, and may determine the detected angle value on the basis of the estimated first unknown magnetic field information. Further, the angle computation unit may perform computations to determine the detected angle value using a plurality of composite detection signals and a plurality of composite assumed detection values. Each of the plurality of composite detection signals is a complex number representing a pair of first and second detection signals generated at one of the plurality of detection units. Each of the plurality of composite assumed detection values is a complex number representing a pair of first and second assumed detection values corresponding to the pair of first and second detection signals.

An angle sensor system of the present invention includes the angle sensor of the present invention and a magnetic field generation unit for generating the magnetic field to be detected.

According to the angle sensor and the angle sensor system of the present invention, a plurality of pairs of first and second detection signals generated at a plurality of detection units are used to perform computations to generate a detected angle value. This allows the detected angle value to contain a smaller angular error caused by the noise magnetic field than in the case of generating the detected angle value on the basis of only a pair of first and second detection signals generated at any one of the plurality of detection units. The present invention has to satisfy the condition that a magnetic field to be detected has different strengths at a plurality of detection positions; however, this condition introduces no substantial limitations with respect to the structure or installation of the angle sensor or the angle sensor system. The present invention thus enables reduction of the angular error caused by the noise magnetic field, without introducing any substantial limitations with respect to the structure or installation of the angle sensor or the angle sensor system.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

First Embodiment

Preferred embodiments of the present invention will now be described in detail with reference to the drawings. First, reference is made toFIG. 1to describe the general configuration of an angle sensor system according to a first embodiment of the invention. The angle sensor system100according to the first embodiment includes an angle sensor1according to the first embodiment and a magnetic field generation unit5.

The angle sensor1is a magnetic angle sensor, in particular. The magnetic field generation unit5generates a magnetic field to be detected, which is an original magnetic field that the angle sensor1should detect.

The magnetic field generation unit5of the present embodiment is a magnet6of a cylindrical shape. The magnet6has an N pole and an S pole that are arranged symmetrically with respect to an imaginary plane including the central axis of the cylindrical shape. The magnet6rotates about the central axis of the cylindrical shape. Consequently, the direction of the magnetic field to be detected generated by the magnet6rotates about a center of rotation C including the central axis of the cylindrical shape.

The angle sensor1is configured to generate a detected angle value θs having a correspondence with an angle to be detected. In the present embodiment, the angle to be detected has a correspondence with an angle that the direction of the magnetic field to be detected at a reference position forms with respect to a reference direction. Hereinafter, the angle that the direction of the magnetic field to be detected at the reference position forms with respect to the reference direction will be referred to as rotating field angle, and denoted by the symbol θM. In the present embodiment, the rotating field angle θM is assumed to be equal to the angle to be detected.

The reference position is located within a reference plane P. As used herein, the reference plane P refers to an imaginary plane parallel to an end face of the magnet6. In the reference plane P, the direction of the magnetic field to be detected generated by the magnet6rotates about the reference position. The reference direction is located within the reference plane P and intersects the reference position. In the following description, the direction of the magnetic field to be detected at the reference position refers to a direction in the reference plane P.

The angle sensor1includes a plurality of detection units. The plurality of detection units detect, at a plurality of detection positions different from each other, a composite magnetic field of the magnetic field to be detected and a noise magnetic field other than the magnetic field to be detected. At each of the plurality of detection positions, the direction of the magnetic field to be detected varies according to the angle to be detected and the rotating field angle θM. The magnetic field to be detected has different strengths at the plurality of detection positions.

The number of the plurality of detection positions is at least two. The following description deals with a case where the plurality of detection positions are a first detection position P1and a second detection position P2, and the plurality of detection units are a first detection unit10and a second detection unit20. The first detection unit10detects the composite magnetic field at the first detection position P1. The second detection unit20detects the composite magnetic field at the second detection position P2.

In the present embodiment, the first and second detection positions P1and P2are located in the reference plane P. In the present embodiment, in particular, the first and second detection positions P1and P2are defined to be at different distances from the point of intersection of the reference plane P and the center of rotation C. The positional relationship between the magnet6and the first and second detection positions P1and P2is not limited to the example shown inFIG. 1. For example, the first and second detection positions P1and P2may be two positions located at different distances from the magnet6.

Hereinafter, the magnetic field to be detected at the first detection position P1will be referred to as the first partial magnetic field MFa, and the magnetic field to be detected at the second detection position P2will be referred to as the second partial magnetic field MFb. The directions of the first and second partial magnetic fields MFa and MFb vary according to the angle to be detected and the rotating field angle θM. Since the first and second detection positions P1and P2are different from each other, the strengths of the first and second partial magnetic fields MFa and MFb are different from each other.

The direction and the strength of the noise magnetic field at the second detection position P2are respectively the same as the direction and the strength of the noise magnetic field at the first detection position P1. The noise magnetic field will be denoted by the symbol Mex. The noise magnetic field Mex may be a magnetic field whose direction and strength are temporally constant, a magnetic field whose direction and strength temporally vary in a periodic manner, or a magnetic field whose direction and strength temporally vary in a random fashion.

The composite magnetic field at the first detection position P1will be referred to as the first composite magnetic field MF1, and the composite magnetic field at the second detection position P2will be referred to as the second composite magnetic field MF2. The first composite magnetic field MF1is a composite magnetic field of the first partial magnetic field MFa and the noise magnetic field Mex. The second composite magnetic field MF2is a composite magnetic field of the second partial magnetic field MFb and the noise magnetic field Mex.

Definitions of directions and angles used in the present embodiment will now be described with reference toFIG. 1andFIG. 2. First, Z direction is the direction parallel to the center of rotation C shown inFIG. 1and upward inFIG. 1.FIG. 2illustrates the Z direction as the direction out of the plane ofFIG. 2. Next, X and Y directions are two directions that are perpendicular to the Z direction and orthogonal to each other.FIG. 2illustrates the X direction as the rightward direction, and the Y direction as the upward direction. Further, −X direction is the direction opposite to the X direction, and −Y direction is the direction opposite to the Y direction.

The rotating field angle θM is expressed with respect to the reference direction DR. In the present embodiment, the reference direction DR is the X direction. Further, in the present embodiment the reference position is the point of intersection of the reference plane P and the center of rotation C.

Assume that the directions of the first and second composite magnetic fields MF1and MF2both rotate counterclockwise inFIG. 2. As shown inFIG. 2, θ1represents an angle that the direction of the first composite magnetic field MF1forms with respect to the reference direction DR, and θ2represents an angle that the direction of the second composite magnetic field MF2forms with respect to the reference direction DR. The angles θ1and θ2are expressed in positive values when seen counterclockwise from the reference direction DR, and in negative values when seen clockwise from the reference direction DR.

The main component of the first composite magnetic field MF1is the first partial magnetic field MFa. The main component of the second composite magnetic field MF2is the second partial magnetic field MFb. In the present embodiment, the direction of each of the first and second partial magnetic fields MFa and MFb is assumed to be the same as the direction of the magnetic field to be detected at the reference position. In this case, the angle that each of the first and second partial magnetic fields MFa and MFb forms with respect to the reference direction DR is equal to the rotating field angle θM. The positive and negative signs of the aforementioned angle are defined in the same manner as those of the angles θ1and θ2.

FIG. 1illustrates an example in which the reference position and the first detection position P1are identical. As far as the above-described relationships between the first and second partial magnetic fields MFa and MFb and the magnetic field to be detected at the reference position are satisfied, the reference position may be different from the point of intersection of the reference plane P and the center of rotation C.

Reference is now made toFIG. 3to describe the configuration of the angle sensor1in detail.FIG. 3is a functional block diagram illustrating the configuration of the angle sensor1. As previously mentioned, the angle sensor1includes the plurality of detection units. Each of the plurality of detection units includes a first detection signal generation unit for generating a first detection signal representing the strength of a component in a first direction of the composite magnetic field, and a second detection signal generation unit for generating a second detection signal representing the strength of a component in a second direction of the composite magnetic field. In the present embodiment, in particular, the first direction and the second direction are orthogonal to each other. In the present embodiment, the first direction is the X direction, and the second direction is the Y direction. The first detection signals generated at the plurality of detection units have the same phase The second detection signals generated at the plurality of detection units have the same phase.

Each of the first and second detection signal generation units includes at least one magnetic detection element. The at least one magnetic detection element may include at least one magnetoresistance element. The magnetoresistance element may be a giant magnetoresistance (GMR) element, a tunneling magnetoresistance (TMR) element, or an anisotropic magnetoresistance (AMR) element. The at least one magnetic detection element may further include at least one other element for magnetic field detection than the magnetoresistance element, such as a Hall element.

In the present embodiment, the plurality of detection units are the first detection unit10and the second detection unit20. The first detection unit10includes a first detection signal generation unit11and a second detection signal generation unit12. The first detection signal generation unit11generates a first detection signal S11representing the strength of a component in the first direction (X direction) of the first composite magnetic field MF1. The second detection signal generation unit12generates a second detection signal S12representing the strength of a component in the second direction (Y direction) of the first composite magnetic field MF1.

The second detection unit20includes a first detection signal generation unit21and a second detection signal generation unit22. The first detection signal generation unit21generates a first detection signal S21representing the strength of a component in the first direction (X direction) of the second composite magnetic field MF2. The second detection signal generation unit22generates a second detection signal S22representing the strength of a component in the second direction (Y direction) of the second composite magnetic field MF2.

As the direction of the magnetic field to be detected rotates with a predetermined period, the rotating field angle θM varies with the predetermined period. In this case, all the detection signals S11, S12, S21and S22vary periodically with a signal period equal to the aforementioned predetermined period. The first detection signal S11and the first detection signal S21have the same phase. The second detection signal S12and the second detection signal S22have the same phase. The phase of the second detection signal S12is different from the phase of the first detection signal S11by an odd number of times ¼ the signal period. The phase of the second detection signal S22is different from the phase of the first detection signal S21by an odd number of times ¼ the signal period. In the light of the production accuracy of the magnetic detection elements or other factors, the relationships among the phases of the detection signals may be slightly different from the above-described relationships.

In the present embodiment, it is required that the detection signal generation units11,12,21and22be used under the condition that the magnitudes of the detection signals S11, S12, S21and S22do not become saturated within the range of the strengths of the first and second composite magnetic fields MF1and MF2.

The configuration of the detection signal generation units11,12,21and22will now be described.FIG. 4illustrates an example of the specific configuration of the first detection signal generation unit11of the first detection unit10. In this example, the first detection signal generation unit11includes a Wheatstone bridge circuit17and a difference detector18. The Wheatstone bridge circuit17includes a power supply port V1, a ground port G1, two output ports E11and E12, a first pair of serially connected magnetic detection elements R11and R12, and a second pair of serially connected magnetic detection elements R13and R14. One end of each of the magnetic detection elements R11and R13is connected to the power supply port V1. The other end of the magnetic detection element R11is connected to one end of the magnetic detection element R12and the output port E11. The other end of the magnetic detection element R13is connected to one end of the magnetic detection element R14and the output port E12. The other end of each of the magnetic detection elements R12and R14is connected to the ground port G1. A power supply voltage of predetermined magnitude is applied to the power supply port V1. The ground port G1is grounded.

The first detection signal generation unit21of the second detection unit20has the same configuration as the first detection signal generation unit11of the first detection unit10. Thus, in the following description, components of the first detection signal generation unit21are denoted by the same reference signs as those used for the components of the first detection signal generation unit11.

FIG. 5illustrates an example of the specific configuration of the second detection signal generation unit12of the first detection unit10. In this example, the second detection signal generation unit12includes a Wheatstone bridge circuit27and a difference detector28. The Wheatstone bridge circuit27includes a power supply port V2, a ground port G2, two output ports E21and E22, a first pair of serially connected magnetic detection elements R21and R22, and a second pair of serially connected magnetic detection elements R23and R24. One end of each of the magnetic detection elements R21and R23is connected to the power supply port V2. The other end of the magnetic detection element R21is connected to one end of the magnetic detection element R22and the output port E21. The other end of the magnetic detection element R23is connected to one end of the magnetic detection element R24and the output port E22. The other end of each of the magnetic detection elements R22and R24is connected to the ground port G2. A power supply voltage of predetermined magnitude is applied to the power supply port V2. The ground port G2is grounded.

The second detection signal generation unit22of the second detection unit20has the same configuration as the second detection signal generation unit12of the first detection unit10. Thus, in the following description, components of the second detection signal generation unit22are denoted by the same reference signs as those used for the components of the second detection signal generation unit12.

In the present embodiment, each of the magnetic detection elements R11to R14and R21to R24includes a plurality of magnetoresistance (MR) elements connected in series. Each of the plurality of MR elements is a spin-valve MR element, for example. The spin-valve MR element includes a magnetization pinned layer whose magnetization direction is pinned, a free layer which is a magnetic layer whose magnetization direction varies according to the direction of the magnetic field to be detected, and a nonmagnetic layer located between the magnetization pinned layer and the free layer. The spin-valve MR element may be a TMR element or a GMR element. In the TMR element, the nonmagnetic layer is a tunnel barrier layer. In the GMR element, the nonmagnetic layer is a nonmagnetic conductive layer. The spin-valve MR element varies in resistance according to the angle that the magnetization direction of the free layer forms with respect to the magnetization direction of the magnetization pinned layer, and has a minimum resistance when the foregoing angle is 0° and a maximum resistance when the foregoing angle is 180°. InFIG. 4andFIG. 5, the filled arrows indicate the magnetization directions of the magnetization pinned layers of the MR elements, and the hollow arrows indicate the magnetization directions of the free layers of the MR elements.

In the first detection signal generation unit11of the first detection unit10, the magnetization pinned layers of the MR elements included in the magnetic detection elements R11and R14are magnetized in the first direction, i.e., in the X direction, and the magnetization pinned layers of the MR elements included in the magnetic detection elements R12and R13are magnetized in the opposite direction to the first direction, i.e., in the −X direction. In this case, the potential difference between the output ports E11and E12varies according to the strength of the component in the first direction (X direction) of the first composite magnetic field MF1. The difference detector18outputs a signal corresponding to the potential difference between the output ports E11and E12as the first detection signal S11. Thus, the first detection signal generation unit11detects the strength of the component in the first direction (X direction) of the first composite magnetic field MF1and generates the first detection signal S11representing the strength.

In the second detection signal generation unit12of the first detection unit10, the magnetization pinned layers of the MR elements included in the magnetic detection elements R21and R24are magnetized in the second direction, i.e., in the Y direction, and the magnetization pinned layers of the MR elements included in the magnetic detection elements R22and R23are magnetized in the opposite direction to the second direction, i.e., in the −Y direction. In this case, the potential difference between the output ports E21and E22varies according to the strength of the component in the second direction (Y direction) of the first composite magnetic field MF1. The difference detector28outputs a signal corresponding to the potential difference between the output ports E21and E22as the second detection signal S12. Thus, the second detection signal generation unit12detects the strength of the component in the second direction (Y direction) of the first composite magnetic field MF1and generates the second detection signal S12representing the strength.

In the first detection signal generation unit21of the second detection unit20, the potential difference between the output ports E11and E12varies according to the strength of the component in the first direction (X direction) of the second composite magnetic field MF2. The difference detector18outputs a signal corresponding to the potential difference between the output ports E11and E12as the first detection signal S21. Thus, the first detection signal generation unit21detects the strength of the component in the first direction (X direction) of the second composite magnetic field MF2and generates the first detection signal S21representing the strength.

In the second detection signal generation unit22of the second detection unit20, the potential difference between the output ports E21and E22varies according to the strength of the component in the second direction (Y direction) of the second composite magnetic field MF2. The difference detector28outputs a signal corresponding to the potential difference between the output ports E21and E22as the second detection signal S22. Thus, the second detection signal generation unit22detects the strength of the component in the second direction (Y direction) of the second composite magnetic field MF2and generates the second detection signal S22representing the strength.

In the light of the production accuracy of the MR elements and other factors, the magnetization directions of the magnetization pinned layers of the plurality of MR elements in the detection signal generation units11,12,21and22may be slightly different from the above-described directions.

An example of the configuration of the magnetic detection elements will now be described with reference toFIG. 6.FIG. 6is a perspective view illustrating a portion of a magnetic detection element in the detection signal generation units11and12shown inFIG. 4andFIG. 5. In this example, the magnetic detection element includes a plurality of lower electrodes162, a plurality of MR elements150and a plurality of upper electrodes163. The plurality of lower electrodes162are arranged on a substrate (not illustrated). Each of the lower electrodes162has a long slender shape. Every two lower electrodes162that are adjacent to each other in the longitudinal direction of the lower electrodes162have a gap therebetween. As shown inFIG. 6, MR elements150are provided on the top surfaces of the lower electrodes162, near opposite ends in the longitudinal direction. Each of the MR elements150includes a free layer151, a nonmagnetic layer152, a magnetization pinned layer153, and an antiferromagnetic layer154which are stacked in this order, the free layer151being closest to the lower electrode162. The free layer151is electrically connected to the lower electrode162. The antiferromagnetic layer154is formed of an antiferromagnetic material. The antiferromagnetic layer154is in exchange coupling with the magnetization pinned layer153so as to pin the magnetization direction of the magnetization pinned layer153. The plurality of upper electrodes163are arranged over the plurality of MR elements150. Each of the upper electrodes163has a long slender shape, and establishes electrical connection between the respective antiferromagnetic layers154of two adjacent MR elements150that are arranged on two lower electrodes162adjacent in the longitudinal direction of the lower electrodes162. With such a configuration, the plurality of MR elements150in the magnetic detection element shown inFIG. 6are connected in series by the plurality of lower electrodes162and the plurality of upper electrodes163. It should be appreciated that the layers151to154of the MR elements150may be stacked in the reverse order to that shown inFIG. 6.

The angle sensor1further includes an angle computation unit50for generating the detected angle value θs. As mentioned previously, the magnetic field to be detected has different strengths at the plurality of detection positions. Thus, the plurality of first detection signals have mutually different amplitudes, and the plurality of second detection signals have mutually different amplitudes. The angle computation unit50generates the detected angle value θs by performing computations using a plurality of pairs of first and second detection signals generated at the plurality of detection units so that an error of the detected angle value θs resulting from the noise magnetic field Mex is made smaller than in the case of generating the detected angle value θs on the basis of only a pair of first and second detection signals generated at any one of the plurality of detection units.

In the present embodiment, the angle computation unit50generates the detected angle value θs using the difference between the first detection signal S11generated at the first detection unit10and the first detection signal S21generated at the second detection unit20, and the difference between the second detection signal S12generated at the first detection unit10and the second detection signal S22generated at the second detection unit20.

FIG. 3shows an example configuration of the angle computation unit50. In this example, the angle computation unit50includes a first computation unit51, a second computation unit52, and an angle determination unit53. The first computation unit51performs a computation to determine the difference between the first detection signal S11and the first detection signal S21to generate a signal Sa. The signal Sa is expressed by the following Eq. (1).
Sa=S11−S21  (i)

The second computation unit52performs a computation to determine the difference between the second detection signal S12and the second detection signal S22to generate a signal Sb. The signal Sb is expressed by the following Eq. (2).
Sb=S12−S22  (2)

The angle determination unit53calculates the detected angle value θs on the basis of the signals Sa and Sb. To be more specific, the angle determination unit53calculates θs by the following Eq. (3). In Eq. (3), “a tan” represents arctangent.
θs=atan(Sb/Sa)  (3)

For θs within the range of 0° to less than 360°, Eq. (3) yields two solutions that are 180° different in value. Which of the two solutions for θs in Eq. (3) is the true value of θs can be determined from the combination of positive and negative signs of Sa and Sb. The angle determination unit53determines θs within the range of 0° to less than 360° using Eq. (3) and on the basis of the foregoing determination on the combination of positive and negative signs of Sa and Sb.

The angle determination unit53can be implemented by an application-specific integrated circuit (ASIC) or a microcomputer, for example. Note that the entirety of the angle computation unit50may be formed of an ASIC or a microcomputer.

According to the present embodiment, the detection signals S11, S12, S21and S22generated at the first and second detection units10and20are used to perform the computations to generate the detected angle value θs. This allows the detected angle value θs to contain a smaller angular error caused by the noise magnetic field Mex than in the case of generating the detected angle value on the basis of only the first and second detection signals S11and S12or only the first and second detection signals S21and22. The reason therefor will be described in detail below.

The first detection signal S11represents the strength of the component in the first direction of the first composite magnetic field MF1. The first composite magnetic field MF1is a composite magnetic field of the first partial magnetic field MFa and the noise magnetic field Mex. Thus, the first detection signal S11contains a main component resulting from a component in the first direction of the first partial magnetic field MFa, and an error component resulting from a component in the first direction of the noise magnetic field Mex. The main component of the first detection signal S11represents the strength of the component in the first direction of the first partial magnetic field MFa.

The first detection signal S21represents the strength of the component in the first direction of the second composite magnetic field MF2. The second composite magnetic field MF2is a composite magnetic field of the second partial magnetic field MFb and the noise magnetic field Mex. Thus, the first detection signal S21contains a main component resulting from a component in the first direction of the second partial magnetic field MFb, and an error component resulting from the component in the first direction of the noise magnetic field Mex. The main component of the first detection signal S21represents the strength of the component in the first direction of the second partial magnetic field MFb.

The direction and strength of the noise magnetic field Mex at the second detection position P2are the same as the direction and strength of the noise magnetic field Mex at the first detection position P1, respectively. Accordingly, the error component of the first detection signal S11and the error component of the first detection signal S21are equal or nearly equal. Thus, by defining the signal Sa as the difference between the first detection signal S11and the first detection signal S21by Eq. (1), the error component of the first detection signal S11and the error component of the first detection signal S21cancel each other out, thereby allowing the signal Sa to contain a significantly reduced error component that originates from the component in the first direction of the noise magnetic field Mex, as compared with the first detection signals S11and S21.

However, if the main component of the first detection signal S11and the main component of the first detection signal S21are equal to each other, obtaining the signal Sa by Eq. (1) causes also the main components of the first detection signals S11and S21to cancel each other out. This makes the signal Sa zero or almost zero regardless of the rotating field angle θM, thus causing the signal Sa to contain no information about the rotating field angle θM.

In the present embodiment, in contrast, since the first and second partial magnetic fields MFa and MFb have different strengths, the main component of the first detection signal S11and the main component of the first detection signal S21have different amplitudes. Thus, the signal Sa obtained by Eq. (1) does not become zero or almost zero regardless of the rotating field angle θM, but varies according to the rotating field angle θM.

The foregoing description concerning the first detection signals S11and S21holds true for the second detection signals S12and S22. To be more specific, the second detection signal S12represents the strength of the component in the second direction of the first composite magnetic field MF1, and contains a main component resulting from a component in the second direction of the first partial magnetic field MFa and an error component resulting from a component in the second direction of the noise magnetic field Mex. The main component of the second detection signal S12represents the strength of the component in the second direction of the first partial magnetic field MFa. The second detection signal S22represents the strength of the component in the second direction of the second composite magnetic field MF2, and contains a main component resulting from a component in the second direction of the second partial magnetic field MFb and an error component resulting from the component in the second direction of the noise magnetic field Mex. The main component of the second detection signal S22represents the strength of the component in the second direction of the second partial magnetic field MFb.

The error component of the second detection signal S12and the error component of the second detection signal S22are equal or nearly equal. Thus, by defining the signal Sb as the difference between the second detection signal S12and the second detection signal S22by Eq. (2), the error component of the second detection signal S12and the error component of the second detection signal S22cancel each other out, thereby allowing the signal Sb to contain a significantly reduced error component that originates from the component in the second direction of the noise magnetic field Mex, as compared with the second detection signals S12and S22.

In the present embodiment, since the first and second partial magnetic fields MFa and MFb have different strengths, the main component of the second detection signal S12and the main component of the second detection signal S22have different amplitudes. Thus, the signal Sb obtained by Eq. (2) does not become zero or almost zero regardless of the rotating field angle θM, but varies according to the rotating field angle θM.

Now, a description will be given of an ideal case in which the error component of the first detection signal S11and the error component of the first detection signal S21cancel each other out completely by Eq. (1), and the error component of the second detection signal S12and the error component of the second detection signal S22cancel each other out completely by Eq. (2).

In the present embodiment, the first direction and the second direction are orthogonal to each other. In the present embodiment, in particular, the first direction is the X direction, and the second direction is the Y direction. The strengths of the components in the first and second directions of the first partial magnetic field MFa can thus be expressed using, for example, the strength of the first partial magnetic field MFa and the angle that the direction of the first partial magnetic field MFa forms with respect to the first direction. To be more specific, the strength of the component in the first direction of the first partial magnetic field MFa is equal to the product of the strength of the first partial magnetic field MFa and the cosine of the angle that the direction of the first partial magnetic field MFa forms with respect to the first direction. The strength of the component in the second direction of the first partial magnetic field MFa is equal to the product of the strength of the first partial magnetic field MFa and the sine of the angle that the direction of the first partial magnetic field MFa forms with respect to the first direction.

Similarly, the strengths of the components in the first and second directions of the second partial magnetic field MFb can be expressed using, for example, the strength of the second partial magnetic field MFb and the angle that the direction of the second partial magnetic field MFb forms with respect to the first direction. To be more specific, the strength of the component in the first direction of the second partial magnetic field MFb is equal to the product of the strength of the second partial magnetic field MFb and the cosine of the angle that the direction of the second partial magnetic field MFb forms with respect to the first direction. The strength of the component in the second direction of the second partial magnetic field MFb is equal to the product of the strength of the second partial magnetic field MFb and the sine of the angle that the direction of the second partial magnetic field MFb forms with respect to the first direction.

In the present embodiment, the direction of each of the first and second partial magnetic fields MFa and MFb is the same as the direction of the magnetic field to be detected at the reference position. The reference direction DR is the X direction. Thus, the angle that the direction of the first partial magnetic field MFa forms with respect to the first direction and the angle that the direction of the second partial magnetic field MFb forms with respect to the first direction are equal to the rotating field angle θM, which is the angle that the direction of the magnetic field to be detected at the reference position forms with respect to the reference direction DR.

As described previously, the main component of the first detection signal S11represents the strength of the component in the first direction of the first partial magnetic field MFa. Thus, the main component of the first detection signal S11represents the product of the strength of the first partial magnetic field MFa and the cosine of the rotating field angle θM. The main component of the first detection signal S21represents the strength of the component in the first direction of the second partial magnetic field MFb. Thus, the main component of the first detection signal S21represents the product of the strength of the second partial magnetic field MFb and the cosine of the rotating field angle θM. Ideally, the signal Sa represents the product of a virtual strength that corresponds to the difference between the strength of the first partial magnetic field MFa and the strength of the second partial magnetic field MFb, and the cosine of the rotating field angle θM.

As described previously, the main component of the second detection signal S12represents the strength of the component in the second direction of the first partial magnetic field MFa. Thus, the main component of the second detection signal S12represents the product of the strength of the first partial magnetic field MFa and the sine of the rotating field angle θM. The main component of the second detection signal S22represents the strength of the component in the second direction of the second partial magnetic field MFb. Thus, the main component of the second detection signal S22represents the product of the strength of the second partial magnetic field MFb and the sine of the rotating field angle θM. Ideally, the signal Sb represents the product of the aforementioned virtual strength and the sine of the rotating field angle θM.

Thus, ideally, Sb/Sa represents the tangent of the rotating field angle θM, and Eq. (3) represents the rotating field angle θM. In this way, the present embodiment enables generation of the detected angle value θs in which the angular error resulting from the noise magnetic field Mex is reduced.

To generate the detected angle value θs as described above in the present embodiment, it is required to satisfy the condition that the strength of the first partial magnetic field MFa and the strength of the second partial magnetic field MFb are different from each other; however, this condition introduces no substantial limitations with respect to the structure or installation of the angle sensor1or the angle sensor system100. The aforementioned condition can easily be satisfied by, for example, making the first detection position P1and the second detection position P2differ from each other as in the present embodiment. The present embodiment thus enables reduction of the angular error resulting from the noise magnetic field Mex, without introducing any substantial limitations with respect to the structure or installation of the angle sensor1or the angle sensor system100.

The effects of the present embodiment will now be described with reference to simulation results. The simulation obtained a first detected angle value θs1, a second detected angle value θs2, and a detected angle value θs in the presence of a noise magnetic field Mex having a constant direction and strength. The first and second detected angle values θs1and θs2were calculated by the following Eqs. (4) and (5), respectively. As with the detected angle value θs, the first and second detected angle values θs1and θs2were obtained within the range of 0° to less than 360°.
θs1=atan(S12/S11)  (4)
θs2=atan(S22/S21)  (5)

The simulation also obtained an angular error of the first detected angle value θs1(hereinafter, “the first angular error AE1”), an angular error of the second detected angle value θs2(hereinafter, “the second angular error AE2”), and an angular error AEs of the detected angle value θs. The simulation assumed the difference between the first detected angle value θs1and the rotating field angle θM as the first angular error AE1, the difference between the second detected angle value θs2and the rotating field angle θM as the second angular error AE2, and the difference between the detected angle value θs and the rotating field angle θM as the angular error AEs of the detected angle value θs.

In the simulation, a magnetic field whose strength decreases with increasing distance from the center of rotation C (seeFIG. 1) in the reference plane P was assumed as a magnetic field generated by the magnetic field generation unit5.FIG. 7is an explanatory diagram schematically illustrating the distribution of the strength of the magnetic field. InFIG. 7, the vertical axis is in units of mT, and two axes orthogonal to the vertical axis are in units of mm. InFIG. 7, the origin point of the two axes orthogonal to the vertical axis is set at the reference position, that is, the point of intersection of the reference plane P and the center of rotation C (seeFIG. 1). In the simulation, the first detection position P1was set at the aforementioned origin point, and the second detection position P2was set at the position that is 1 mm distant from the first detection position P1in the X direction. The strength of the noise magnetic field Mex was set at 0.5 mT, and the direction of the noise magnetic field Mex was set in the direction rotated by 60° from the X direction toward the Y direction.

FIG. 8AtoFIG. 9Dare explanatory diagrams illustrating the simulation contents.FIG. 8Ashows the strength B11of the component in the first direction (X direction) of the first composite magnetic field MF1and the strength B12of the component in the second direction (Y direction) of the first composite magnetic field MF1.FIG. 8Bshows the first and second detection signals S11and S12.FIG. 8Cshows the first detected angle value θs1.FIG. 8Dshows the first angular error AE1. In each ofFIGS. 8A to 8D, the horizontal axis represents the rotating field angle θM, which is equal to the angle to be detected. The vertical axis ofFIG. 8Arepresents the values of the strengths B11and B12(in mT). InFIG. 8A, the curve81represents the strength B11, and the curve82represents the strength B12. The vertical axis ofFIG. 8Brepresents the values of the first and second detection signals S11and S12(in V). InFIG. 8B, the curve83represents the first detection signal S11, and the curve84represents the second detection signal S12. The vertical axis ofFIG. 8Crepresents the first detected angle value θs1. (in degrees). The vertical axis ofFIG. 8Drepresents the value of the first angular error AE1(in degrees).

FIG. 9Ashows the strength B21of the component in the first direction (X direction) of the second composite magnetic field MF2and the strength B22of the component in the second direction (Y direction) of the second composite magnetic field MF2.FIG. 9Bshows the first and second detection signals S21and S22.FIG. 9Cshows the second detected angle value θs2.FIG. 9Dshows the second angular error AE2. In each ofFIGS. 9A to 9D, the horizontal axis represents the rotating field angle θM, which is equal to the angle to be detected. The vertical axis ofFIG. 9Arepresents the values of the strengths B21and B22(in mT). InFIG. 9A, the curve91represents the strength B21, and the curve92represents the strength B22. The vertical axis ofFIG. 9Brepresents the values of the first and second detection signals S21and S22(in V). InFIG. 9B, the curve93represents the first detection signal S21, and the curve94represents the second detection signal S22. The vertical axis ofFIG. 9Crepresents the second detected angle value θs2(in degrees). The vertical axis ofFIG. 9Drepresents the value of the second angular error AE2(in degrees).

FIG. 10is a waveform diagram illustrating an example of the waveform of the angular error AEs obtained in the simulation. InFIG. 10the horizontal axis represents the rotating field angle θM, and the vertical axis represents the value of the angular error AEs (in degrees).

As shown inFIG. 8AandFIG. 9A, the strength B11of the component in the first direction of the first composite magnetic field MF1and the strength B21of the component in the first direction of the second composite magnetic field MF2are different from each other, and the strength B12of the component in the second direction of the first composite magnetic field MF1and the strength B22of the component in the second direction of the second composite magnetic field MF2are different from each other. Accordingly, as shown inFIG. 8BandFIG. 9B, the first detection signals S11and S21are different in amplitude from each other, and the second detection signals S12and S22are different in amplitude from each other.

Further, as shown inFIG. 8D,FIG. 9DandFIG. 10, the angular error AEs of the detected angle value θs is extremely smaller than the first and second angular errors AE1and AE2. The first and second angular errors AE1and AE2result mainly from the noise magnetic field Mex. On the other hand, the angular error AEs of the detected angle value θs results mainly from factors other than the noise magnetic field Mex. The results of the simulation described above indicate that the present embodiment enables reduction of angular errors caused by the noise magnetic field Mex.

Second Embodiment

A second embodiment of the present invention will now be described. First, reference is made toFIG. 11to describe the configuration of the angle sensor1according to the second embodiment. The angle sensor1according to the second embodiment differs from the angle sensor1according to the first embodiment in the following ways. The angle sensor1according to the second embodiment includes, as the plurality of detection units, a third detection unit30and a fourth detection unit40in addition to the first and second detection units10and20described in relation to the first embodiment. The angle sensor1according to the second embodiment further includes an angle computation unit250in place of the angle computation unit50of the first embodiment. The angle computation unit250can be implemented by an ASIC or a microcomputer, for example. The angle computation unit250will be described in detail later.

The third detection unit30detects the composite magnetic field of the magnetic field to be detected and the noise magnetic field at a third detection position P3. The fourth detection unit40detects the composite magnetic field of the magnetic field to be detected and the noise magnetic field at a fourth detection position P4. In the present embodiment, the first to fourth detection positions P1to P4are located in one plane, specifically, in the reference plane P (seeFIG. 1.). In the present embodiment, the first to fourth detection positions P1to P4are particularly defined to be at different distances from the center of rotation C (seeFIG. 1).

Hereinafter, the magnetic field to be detected at the third detection position P3will be referred to as the third partial magnetic field MFc, and the magnetic field to be detected at the fourth detection position P4will be referred to as the fourth partial magnetic field MFd. Like the directions of the first and second partial magnetic fields MFa and MFb described in relation to the first embodiment, the directions of the third and fourth partial magnetic fields MFc and MFd vary according to the angle to be detected and the rotating field angle θM. Since the first to fourth detection positions P1to P4are different from each other, the strengths of the first to fourth partial magnetic fields MFa to MFd are different from each other.

The composite magnetic field at the third detection position P3will be referred to as the third composite magnetic field MF3, and the composite magnetic field at the fourth detection position P4will be referred to as the fourth composite magnetic field MF4. The third composite magnetic field MF3is a composite magnetic field of the third partial magnetic field MFc and the noise magnetic field Mex. The fourth composite magnetic field MF4is a composite magnetic field of the fourth partial magnetic field MFd and the noise magnetic field Mex. The noise magnetic field Mex is in the same direction and has the same strength at the first to fourth detection positions P1to P4.

The third and fourth composite magnetic fields MF3and MF4and the third and fourth partial magnetic fields MFc and MFd will now be described in more detail. Assume that the directions of the third and fourth composite magnetic fields MF3and MF4rotate in the same direction (counterclockwise direction inFIG. 2) as the directions of the first and second composite magnetic fields MF1and MF2described in relation to the first embodiment. The positive and negative signs of the angle that each of the third and fourth composite magnetic fields MF3and MF4forms with respect to the reference direction DR (seeFIG. 2) are defined in the same manner as those of the angles θ1and θ2described in relation to the first embodiment.

The main component of the third composite magnetic field MF3is the third partial magnetic field MFc. The main component of the fourth composite magnetic field MF4is the fourth partial magnetic field MFd. The first and second partial magnetic fields MFa and MFb are in the same direction. In the present embodiment, the direction of each of the first to fourth partial magnetic fields MFa to MFd is assumed to be the same as the direction of the magnetic field to be detected at the reference position. In this case, the angle that each of the first to fourth partial magnetic fields MFa to MFd forms with respect to the reference direction DR is equal to the rotating field angle θM. The positive and negative signs of the aforementioned angle are defined in the same manner as those of the angles θ1and θ2.

Reference is now made toFIG. 11to describe the configuration of the third and fourth detection units30and40in detail. The third detection unit30includes a first detection signal generation unit31and a second detection signal generation unit32. The first detection signal generation unit31generates a first detection signal S31representing the strength of a component in the first direction of the third composite magnetic field MF3. The second detection signal generation unit32generates a second detection signal S32representing the strength of a component in the second direction of the third composite magnetic field MF3.

The fourth detection unit40includes a first detection signal generation unit41and a second detection signal generation unit42. The first detection signal generation unit41generates a first detection signal S41representing the strength of a component in the first direction of the fourth composite magnetic field MF4. The second detection signal generation unit42generates a second detection signal S42representing the strength of a component in the second direction of the fourth composite magnetic field MF4.

The first detection unit10and the second detection unit20are configured in the same manner as in the first embodiment. To be more specific, the first detection unit10includes the first detection signal generation unit11and the second detection signal generation unit12. The first detection signal generation unit11generates the first detection signal S11. The second detection signal generation unit12generates the second detection signal S12. The second detection unit20includes the first detection signal generation unit21and the second detection signal generation unit22. The first detection signal generation unit21generates the first detection signal S21. The second detection signal generation unit22generates the second detection signal S22.

In the present embodiment, as in the first embodiment, the first direction is the X direction (seeFIG. 2) and the second direction is the Y direction (seeFIG. 2). As the direction of the magnetic field to be detected rotates with a predetermined period, the rotating field angle θM varies with the predetermined period. In this case, all the detection signals S11, S12, S21, S22, S31, S32, S41and S42vary periodically with a signal period equal to the aforementioned predetermined period. The first detection signals S11, S21, S31and S41have the same phase. The second detection signals S12, S22, S32and S42have the same phase. The phase of the second detection signal S32is different from the phase of the first detection signal S31by an odd number of times ¼ the signal period. The phase of the second detection signal S42is different from the phase of the first detection signal S41by an odd number of times ¼ the signal period. In the light of the production accuracy of the magnetic detection elements or other factors, the relationships among the phases of the detection signals may be slightly different from the above-described relationships.

In the present embodiment, it is required that the detection signal generation units11,12,21,22,31,32,41and42be used under the condition that the magnitudes of the detection signals S11, S12, S21, S22, S31, S32, S41and S42do not become saturated within the range of the strengths of the first to fourth composite magnetic fields MF1to MF4.

The configuration of the detection signal generation units31,32,41and42will now be described. Each of the first detection signal generation units31and41has the same configuration as that of the first detection signal generation unit11described in relation to the first embodiment. Thus, in the following description, components of the first detection signal generation units31and41are denoted by the same reference signs as those used for the components of the first detection signal generation unit11of the first embodiment shown inFIG. 4.

Each of the second detection signal generation units32and42has the same configuration as that of the second detection signal generation unit12described in relation to the first embodiment. Thus, in the following description, components of the second detection signal generation units32and42are denoted by the same reference signs as those used for the components of the second detection signal generation unit12of the first embodiment shown inFIG. 5.

In the first detection signal generation unit31of the third detection unit30, the potential difference between the output ports E11and E12varies according to the strength of the component in the first direction (X direction) of the third composite magnetic field MF3. The difference detector18outputs a signal corresponding to the potential difference between the output ports E11and E12as the first detection signal S31. Thus, the first detection signal generation unit31detects the strength of the component in the first direction (X direction) of the third composite magnetic field MF3and generates the first detection signal S31representing the strength.

In the second detection signal generation unit32of the third detection unit30, the potential difference between the output ports E21and E22varies according to the strength of the component in the second direction (Y direction) of the third composite magnetic field MF3. The difference detector28outputs a signal corresponding to the potential difference between the output ports E21and E22as the second detection signal S32. Thus, the second detection signal generation unit32detects the strength of the component in the second direction (Y direction) of the third composite magnetic field MF3and generates the second detection signal S32representing the strength.

In the first detection signal generation unit41of the fourth detection unit40, the potential difference between the output ports E11and E12varies according to the strength of the component in the first direction (X direction) of the fourth composite magnetic field MF4. The difference detector18outputs a signal corresponding to the potential difference between the output ports E11and E11as the first detection signal S41. Thus, the first detection signal generation unit41detects the strength of the component in the first direction (X direction) of the fourth composite magnetic field MF4and generates the first detection signal S41representing the strength.

In the second detection signal generation unit42of the fourth detection unit40, the potential difference between the output ports E21and E22varies according to the strength of the component in the second direction (Y direction) of the fourth composite magnetic field MF4. The difference detector28outputs a signal corresponding to the potential difference between the output ports E21and E22as the second detection signal S42. Thus, the second detection signal generation unit42detects the strength of the component in the second direction (Y direction) of the fourth composite magnetic field MF4and generates the second detection signal S42representing the strength.

Now, the angle computation unit250will be described in detail. The angle computation unit250generates the detected angle value θs using the method of least squares on the basis of a plurality of pairs of first and second detection signals generated at the first to fourth detection units10,20,30and40. The generation method for the detected angle value θs in the present embodiment will be conceptually described below. In the present embodiment, the reference sign S1is used to represent any of the first detection signals, and the reference sign S2is used to represent any of the second detection signals. The angle computation unit250assumes first unknown magnetic field information M, second unknown magnetic field information E, a plurality of first assumed detection values ES1, a plurality of second assumed detection values ES2, a plurality of first residuals R1, and a plurality of second residuals R2.

The first unknown magnetic field information M corresponds to the strengths, at a predetermined position, of a component in the first direction and a component in the second direction of the magnetic field to be detected. The predetermined position is a virtual position at which the direction of the magnetic field to be detected is the same as the direction thereof at the reference position, as with the first to fourth detection positions P1to P4, and at which the direction and strength of the noise magnetic field Mex are the same as the direction and strength of the noise magnetic field at the first to fourth detection positions P1to P4. The second unknown magnetic field information E corresponds to the strengths of the component in the first direction and the component in the second direction of the noise magnetic field Mex. Each of the plurality of first assumed detection values ES1is a value that corresponds to one of the first detection signals S1generated at the plurality of detection units and is assumed on the basis of the first and second unknown magnetic field information M and E. Each of the plurality of second assumed detection values ES2is a value that corresponds to one of the second detection signals S2generated at the plurality of detection units and is assumed on the basis of the first and second unknown magnetic field information M and E. Each of the plurality of first residuals R1is a difference between one of the first detection signals S1generated at the plurality of detection units and a corresponding one of the first assumed detection values ES1. Each of the plurality of second residuals R2is a difference between one of the second detection signals S2generated at the plurality of detection units and a corresponding one of the second assumed detection values ES2.

The angle computation unit250estimates the first and second unknown magnetic field information M and E so as to minimize the sum of squares of the plurality of first residuals R1and to minimize the sum of squares of the plurality of second residuals R2, and determines the detected angle value θs on the basis of the estimated first unknown magnetic field information M.

In the present embodiment, the plurality of first assumed detection values ES1are modeled by the following Eq. (6).
z1=11x1(6)

In Eq. (6), z1is an m-dimensional column vector containing m-number of elements having correspondences with the plurality of first assumed detection values ES1generated on the basis of the first and second unknown magnetic field information M and E to be obtained. Note that m is an integer that represents the number of the plurality of first assumed detection values ES1, and is equal to the number of the plurality of first detection signals S1, in other words, the number of the plurality of detection units. In Eq. (6), H is a matrix with m-number of rows and two columns defined according to the patterns of the magnetic field to be detected and the noise magnetic field Mex at the plurality of detection positions. In Eq. (6), x1is a 2-dimensional column vector containing, as its elements, the strength M1of a component in the first direction of the first unknown magnetic field information M and the strength E1of a component in the first direction of the second unknown magnetic field information E.

The present embodiment estimates the strengths M1and E1, which are the elements of the column vector x1. Here, let y1represent an m-dimensional column vector containing m-number of elements having correspondences with the plurality of first detection signals S1. The column vector x1is estimated so as to minimize the sum of squares of differences between respective corresponding ones of the m-number of elements of the column vector y1and the m-number of elements of the column vector z1. In the concrete, this is accomplished by defining a least squares cost function F for estimating the column vector x1, and obtaining the column vector x1that minimizes the value of the function F. The function F is defined by the following Eq. (7).

Partial differentiation of Eq. (7) with respect to x1yields the following Eq. (8).
∂F/∂x1=2(−HTy1+HTHx1)  (8)

When x1minimizes the value of the function F, ∂F/∂x1=0 is satisfied. Thus, x1that minimizes the value of the function F is represented by the following Eq. (9).
x1=(HTH)−1HTy1(9)

Further, in the present embodiment, the plurality of second assumed detection values ES2are modeled by the following Eq. (10).
z2=Hx2(10)

In Eq. (10), z2is an m-dimensional column vector containing m-number of elements having correspondences with the plurality of second assumed detection values ES2generated on the basis of the first and second unknown magnetic field information M and E to be obtained. In Eq. (10), x2is a 2-dimensional column vector containing, as its elements, the strength M2of a component in the second direction of the first unknown magnetic field information M and the strength E2of a component in the second direction of the second unknown magnetic field information E.

The present embodiment estimates the strengths M2and E2, which are the elements of the column vector x2. Here, let y2represent an m-dimensional column vector containing m-number of elements having correspondences with the plurality of second detection signals S2. The column vector x2is estimated so as to minimize the sum of squares of differences between respective corresponding ones of the m-number of elements of the column vector y2and the m-number of elements of the column vector z2. A concrete estimation method for the column vector x2is the same as the estimation method for the column vector x1described with reference to Eqs. (7) to (9). Replacing x1, y1, and z1in the description of the estimation method for the column vector x1with x2, y2, and z2, respectively, provides a description of the estimation method for the column vector x2. Eq. (11) below gives x2that minimizes the value of the least squares cost function F for estimating the column vector x2.
x2=(HTH)−1HTy2(11)
In the present embodiment, the angle computation unit250determines the detected angle value θs on the basis of the strength M1, which is one of the two elements of the column vector x1calculated by Eq. (9), and the strength M2, which is one of the two elements of the column vector x2calculated by Eq. (11).

As described above, the column vector y1contains a plurality of elements having correspondences with the plurality of first detection signals S1, and the column vector z1contains a plurality of elements having correspondences with the plurality of first assumed detection values ES1. The column vector y2contains a plurality of elements having correspondences with the plurality of second detection signals S2, and the column vector z2contains a plurality of elements having correspondences with the plurality of second assumed detection values ES2. Thus, the estimation method for the column vectors x1and x2, which has been described with reference to Eqs. (7) to (9) and (11), corresponds to the method of estimating the first and second unknown magnetic field information M and E so as to minimize the sum of squares of the plurality of first residuals R1and to minimize the sum of squares of the plurality of second residuals R2.

Reference is now made toFIG. 11to specifically describe the configuration of the angle computation unit250and the generation method for the detected angle value θs.FIG. 11illustrates an example configuration of the angle computation unit250. In this example, the angle computation unit250includes a first strength estimation unit251, a second strength estimation unit252, and an angle determination unit253.

The first strength estimation unit251uses the first detection signals S11, S21, S31and S41to estimate the strength M1of the component in the first direction of the first unknown magnetic field information M, and the strength E1of the component in the first direction of the second unknown magnetic field information E. In the present embodiment, the foregoing reference position is the foregoing predetermined position. Here, let z11represent a first one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S11, and z21represent a second one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S21. Let z31represent a third one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S31, and z41represent a fourth one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S41. In the present embodiment, the first assumed detection values z11, z21, z31and z41are modeled by the following Eq. (12).

The four-dimensional column vector on the left side of Eq. (12) corresponds to z1of Eq. (6).

The matrix with four rows and two columns on the right side of Eq. (12) corresponds to H of Eq. (6). This matrix is hereinafter represented by Hc. The four elements Amp1to Amp4of the first column of the matrix Hc are defined according to the patterns of the magnetic field to be detected at the first to fourth detection positions P1to P4, in other words, the patterns of the first to fourth partial magnetic fields MFa to MFd. For example, the strengths of the first to fourth partial magnetic fields MFa to MFd may be measured, and Amp1to Amp4may be defined on the basis of the measurement results. Alternatively, Amp1to Amp4may be defined by modeling the distribution of the strength of the magnetic field to be detected in the reference plane P. Amp1to Amp4can be modeled by the following Eq. (13), for example.
Ampn=c{1−(xn2/a+yn2/b)}  (13)

In Eq. (13), n is an integer between 1 and 4 inclusive. Now, a position in the reference plane P is represented in a rectangular coordinate system with its origin set at the reference position, that is, the point of intersection of the reference plane P and the center of rotation C (seeFIG. 1). When the first to fourth detection positions P1to P4are represented in the aforementioned rectangular coordinate system, xnand ynrepresent positions in the X direction and in the Y direction, respectively. In Eq. (13), a, b, and c are constants that are determined on the basis of the distribution of the strength of the magnetic field to be detected in the reference plane P. For example, a, b, and c may be determined so as to minimize the sum of squares of the differences between a plurality of measured strengths of the magnetic field to be detected and a plurality of values obtained by Eq. (13), at a plurality of positions in the reference plane P.

Ideally, Amp1to Amp4are defined by measuring the strengths of the magnetic field to be detected at a plurality of positions in the reference plane P in the absence of the noise magnetic field Mex. If, however, the strength of the noise magnetic field Mex is sufficiently lower than that of the magnetic field to be detected, Amp1to Amp4may be defined in the above-described manner, with the strengths of the composite magnetic field of the magnetic field to be detected and the noise magnetic field Mex at the plurality of positions taken as the strengths of the magnetic field to be detected at the plurality of positions.

The four elements of the second column of the matrix Hc are defined according to the patterns of the noise magnetic field Mex at the first to fourth detection positions P1to P4. In the present embodiment, the four elements of the second column of the matrix Hc are defined on the assumption that the noise magnetic field Mex is in the same direction and has the same strength at the first to fourth detection positions P1to P4. More specifically, as represented by Eq. (12), all of the four elements of the second column of the matrix Hc are set at 1.

The two-dimensional column vector on the right side of Eq. (12) corresponds to x1of Eq. (6). This column vector is hereinafter represented by xc1. The column vector xc1 contains the strengths M1and E1as its elements.

The first strength estimation unit251estimates the column vector xc1 on the basis of Eq. (9). Here, let y11, y21, y31and y41represent the values of the first detection signals S11, S21, S31and S41, respectively, and let yc1 represent a four-dimensional column vector containing y11, y21, y31and y41as its elements. The column vector yc1 is represented by the following Eq. (14).
yc1T=[y11,y21,y31,y41]  (14)

The first strength estimation unit251calculates xc1 using an equation that replaces H, x1, and y1in Eq. (9) with Hc, xc1, and yc1, respectively. The strengths M1and E1are thereby estimated.

The second strength estimation unit252estimates the strength M2of the component in the second direction of the first unknown magnetic field information M, and the strength E2of the component in the second direction of the second unknown magnetic field information E. Here, let z12represent a first one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S12, and z22represent a second one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S22. Let z32represent a third one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S32, and z42represent a fourth one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S42. In the present embodiment, the second assumed detection values z12, z22, z32and z42are modeled by the following Eq. (15).

The four-dimensional column vector on the left side of Eq. (15) corresponds to z2of Eq. (10). The matrix with four rows and two columns on the right side of Eq. (15) corresponds to H of Eq. (10). This matrix is the same as the matrix Hc mentioned above.

The two-dimensional column vector on the right side of Eq. (15) corresponds to x2of Eq. (10). This column vector is hereinafter represented by xc2. The column vector xc2 contains the strengths M2and E2as its elements.

The second strength estimation unit252estimates the column vector xc2 on the basis of Eq. (11). Here, let y12, y22, y32and y42represent the values of the second detection signals S12, S22, S32and S42, respectively, and let yc2 represent a four-dimensional column vector containing y12, y22, y32and y42as its elements. The column vector yc2 is represented by the following Eq. (16).
yc2T=[y12,y22,y32,y42]  (16)

The angle determination unit253determines the detected angle value θs on the basis of the first unknown magnetic field information M estimated by the first and second strength estimation units251and252. To be more specific, the angle determination unit253calculates θs by the following Eq. (17) using the strengths M1and M2, for example.
θs=atan(M2/M1)  (17)

For θs within the range of 0° to less than 360°, Eq. (17) yields two solutions that are 180° different in value. Which of the two solutions for θs in Eq. (17) is the true value of θs can be determined from the combination of positive and negative signs of M1and M2. The angle determination unit253obtains θs within the range of 0° to less than 360° using Eq. (17) and on the basis of the foregoing determination on the combination of positive and negative signs of M1and M2.

In the present embodiment, the detected angle value θs is generated using the method of least squares on the basis of the detection signals S11, S12, S21, S22, S31, S32, S41and S42generated by the first to fourth detection units10,20,30and40.

In the present embodiment, the strengths of the first to fourth partial magnetic fields MFa to MFd are different from each other. The present embodiment thus provides four pairs of corresponding ones of the first detection signals S1and the first assumed detection values ES1, and four pairs of corresponding ones of the second detection signals S2and the second assumed detection values ES2. They can be used to estimate the first and second unknown magnetic field information M and E by the method of least squares.

In the present embodiment, the strength M1estimated by the first strength estimation unit251corresponds to the strength of the component in the first direction of the magnetic field to be detected at the predetermined position, and the strength E1estimated by the first strength estimation unit251corresponds to the strength of the component in the first direction of the noise magnetic field Mex at the predetermined position. The strength M2estimated by the second strength estimation unit252corresponds to the strength of the component in the second direction of the magnetic field to be detected at the predetermined position, and the strength E2estimated by the second strength estimation unit252corresponds to the strength of the component in the second direction of the noise magnetic field Mex at the predetermined position. In the present embodiment, the detected angle value θs is determined on the basis of the strengths M1and M2. The present embodiment thus enables estimation of the detected angle value θs with the effect of the noise magnetic field Mex eliminated. In other words, the present embodiment enables reduction of the angular error resulting from the noise magnetic field Mex.

To determine the detected angle value θs in the above-described manner, it is required to satisfy the condition that the first to fourth partial magnetic fields MFa to MFd have different strengths from each other; however, this condition introduces no substantial limitations with respect to the structure or installation of the angle sensor1or the angle sensor system100. The aforementioned condition can easily be satisfied by, for example, defining the first to fourth detection positions P1to P4to be at different distances from the center of rotation C (seeFIG. 1) in the reference plane P as in the present embodiment.

For the foregoing reasons, the present embodiment enables reduction of the angular error resulting from the noise magnetic field Mex, without introducing any substantial limitations with respect to the structure or installation of the angle sensor1or the angle sensor system100.

The effects of the present embodiment will now be described with reference to simulation results. The simulation obtained the angular error AEs of a detected angle value θs that was generated in the presence of a noise magnetic field Mex having a constant direction and strength. In the simulation, the difference between the detected angle value θs and the rotating field angle θM was assumed to be the angular error AEs of the detected angle value θs.

In the simulation, as in the case of the simulation described in relation to the first embodiment, a magnetic field having a strength distribution as shown inFIG. 7in the reference plane P was assumed as a magnetic field generated by the magnetic field generation unit5. The strength of the noise magnetic field Mex was set at 1 mT, and the direction of the noise magnetic field Mex was set in the direction rotated by 60° from the X direction toward the Y direction.FIG. 12schematically illustrates the distribution of the strength and direction of a composite magnetic field in the reference plane P in the simulation. The composite magnetic field is a composite of the magnetic field generated by the magnetic field generation unit5and the noise magnetic field Mex. InFIG. 12, the origin point is set at the reference position, that is, the point of intersection of the reference plane P and the center of rotation C. InFIG. 12, each axis is in units of mm. InFIG. 12, each arrow represents the strength and direction of the composite magnetic field when the rotating field angle θM is 0°. The length of the arrow represents the strength of the composite magnetic field, and the direction of the arrow represents the direction of the composite magnetic field.

FIG. 13is a waveform diagram illustrating an example of the angular error AEs obtained in the simulation. InFIG. 13the horizontal axis represents the rotating field angle θM, and the vertical axis represents the value of the angular error AEs (in degrees). As shown inFIG. 13, the angular error AEs of the detected angle value θs is extremely small. The angular error AEs of the detected angle value θs results mainly from factors other than the noise magnetic field Mex. The foregoing simulation results indicate that the present embodiment enables reducing the angular error resulting from the noise magnetic field Mex.

The other configuration, function and effects of the second embodiment are the same as those of the first embodiment.

Third Embodiment

A third embodiment of the present invention will now be described. First, reference is made toFIG. 14to describe the configuration of the angle sensor1according to the third embodiment. The angle sensor1according to the third embodiment is different from the angle sensor1according to the second embodiment in the following ways. The angle sensor1according to the third embodiment includes an angle computation unit350in place of the angle computation unit250of the second embodiment. Like the angle computation unit250, the angle computation unit350generates the detected angle value θs using the method of least squares on the basis of the plurality of pairs of first and second detection signals generated at the plurality of detection units. Like the angle computation unit250, the angle computation unit350assumes the first unknown magnetic field information M, the second unknown magnetic field information E, the plurality of first assumed detection values ES1, the plurality of second assumed detection values ES2, the plurality of first residuals R1, and the plurality of second residuals R2.

The angle computation unit350uses a plurality of composite detection signals and a plurality of composite assumed detection values. Each of the composite detection signals is a complex number representing a pair of first and second detection signals S1and S2generated at any one of the plurality of detection units. Each of the composite assumed detection values is a complex number representing a pair of first and second assumed detection values ES1and ES2corresponding to the aforementioned pair of first and second detection signals S1and S2. As will be described later, in the present embodiment, for each of the plurality of composite detection signals, the value of the first detection signal S1corresponds to the real part of the composite detection signal, and the value of the second detection signal S2corresponds to the imaginary part of the composite detection signal. For each of the plurality of composite assumed detection values, the value of the first assumed detection value ES1corresponds to the real part of the composite assumed detection value, and the value of the second assumed detection value ES2corresponds to the imaginary part of the composite assumed detection value.

In the present embodiment, the plurality of composite assumed detection values are modeled by the following Eq. (18).
z=Hx(18)

In Eq. (18), z is an m-dimensional column vector containing m-number of elements having correspondences with the plurality of composite assumed detection values. Note that m is an integer that represents the number of the composite assumed detection values, and is equal to the number of the composite detection signals, in other words, the number of the detection units. In Eq. (18), H is a matrix with m-number of rows and two columns defined according to the patterns of the magnetic field to be detected and the noise magnetic field Mex at the plurality of detection positions. In Eq. (18), x is a 2-dimensional column vector containing the first unknown magnetic field information M and the second unknown magnetic field information E as its elements. In the present embodiment, both of the first unknown magnetic field information M and the second unknown magnetic field information E are complex numbers. The real part of the first unknown magnetic field information M, which is a complex number, corresponds to the strength M1in the second embodiment, and the imaginary part of the first unknown magnetic field information M, which is a complex number, corresponds to the strength M2in the second embodiment. The real part of the second unknown magnetic field information E, which is a complex number, corresponds to the strength E1in the second embodiment, and the imaginary part of the second unknown magnetic field information E, which is a complex number, corresponds to the strength E2in the second embodiment.

The present embodiment estimates the first unknown magnetic field information M and the second unknown magnetic field information E, which are the elements of the column vector x. Here, let y represent an m-dimensional column vector containing m-number of elements having correspondences with the plurality of composite detection signals. The elements of the column vectors y and z are complex numbers. The column vector x is estimated so as to minimize the sum of squares of the differences between the real parts of corresponding ones of the m-number of elements of the column vector y and the m-number of elements of the column vector z, and to minimize the sum of squares of the differences between the imaginary parts of corresponding ones of the m-number of elements of the column vector y and the m-number of elements of the column vector z. A concrete estimation method for the column vector x is the same as the estimation method for the column vector x1described with reference to Eqs. (7) to (9) in relation to the second embodiment. Replacing x1, and z1in the description of the estimation method for the column vector x1with x, y, and z, respectively, provides a description of the estimation method for the column vector x. Eq. (19) below gives x that minimizes the value of the least squares cost function F for estimating the column vector x.
x=(HTH)−1HTy(19)

In the present embodiment, the angle computation unit350determines the detected angle value θs on the basis of the first unknown magnetic field information M, in which is one of the two elements of the column vector x calculated by Eq. (19). In the present embodiment, the differences between the real parts of corresponding ones of the m-number of elements of the column vector y and the m-number of elements of the column vector z correspond to the plurality of first residuals R1, and the differences between the imaginary parts of corresponding ones of the m-number of elements of the column vector y and the m-number of elements of the column vector z correspond to the plurality of second residuals R2. Thus, the estimation method for the column vector x, which has been described with reference to Eqs. (18) and (19), corresponds to a method of estimating the first and second unknown magnetic field information M and E so as to minimize the sum of squares of the plurality of first residuals R1and to minimize the sum of squares of the plurality of second residuals R2. In the estimation method for the column vector x, an computation to estimate the real part of each of the first and second unknown magnetic field information M and E and a computation to estimate the imaginary part of each of the first and second unknown magnetic field information M and E are performed at the same time.

Reference is now made toFIG. 14to specifically describe the configuration of the angle computation unit350and the generation method for the detected angle value θs.FIG. 14illustrates an example configuration of the angle computation unit350. In this example, the angle computation unit350includes an unknown magnetic field information estimation unit351and an angle determination unit352.

Now, let ya1 represent a first one of the plurality of composite detection signals that corresponds to the first and second detection signals S11and S12generated at the first detection unit10, and let ya2 represent a second one of the plurality of composite detection signals that corresponds to the first and second detection signals S21and S22generated at the second detection unit20. Further, let ya3 represent a third one of the plurality of composite detection signals that corresponds to the first and second detection signals S31and S32generated at the third detection unit30, and let ya4 represent a fourth one of the plurality of composite detection signals that corresponds to the first and second detection signals S41and S42generated at the fourth detection unit40. All of the composite detection signals ya1 to ya4 are complex numbers. The unknown magnetic field information estimation unit351treats the values y11and y12of the first and second detection signals S11and S12as the real part and the imaginary part of the composite detection signal ya1, respectively; the values y21and y22of the first and second detection signals S21and S22as the real part and the imaginary part of the composite detection signal ya2, respectively; the values y31and y32of the first and second detection signals S31and S32as the real part and the imaginary part of the composite detection signal ya3, respectively; and the values y41and y42of the first and second detection signals S41and S42as the real part and the imaginary part of the composite detection signal ya4, respectively.

The unknown magnetic field information estimation unit351estimates the first and second unknown magnetic field information M and E using the composite detection signals ya1 to ya4. Here, let za1 represent a first one of the plurality of composite assumed detection values that corresponds to the composite detection signal ya1, and let za2 represent a second one of the plurality of composite assumed detection values that corresponds to the composite detection signal ya2. Further, let za3 represent a third one of the plurality of composite assumed detection values that corresponds to the composite detection signal ya3, and let za4 represent a fourth one of the plurality of composite assumed detection values that corresponds to the composite detection signal ya4. The composite assumed detection values za1 to za4 are all complex numbers.

The real part of the composite assumed detection value za1 represents a first one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S11, and the imaginary part of the composite assumed detection value za1 represents a first one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S12. The real part of the composite assumed detection value za2 represents a second one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S21, and the imaginary part of the composite assumed detection value za2 represents a second one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S22. The real part of the composite assumed detection value za3 represents a third one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S31, and the imaginary part of the composite assumed detection value za3 represents a third one of the plurality of second assumed detection values ES2that corresponds to the second detection signal S32. The real part of the composite assumed detection value za4 represents a fourth one of the plurality of first assumed detection values ES1that corresponds to the first detection signal S41, and the imaginary part of the composite assumed detection value za4 represents a fourth one of the plurality of second assumed detection value ES2that corresponds to the second detection signal S42.

In the present embodiment, the composite assumed detection values za1, za2, za3 and za4 are modeled by the following Eq. (20).

The four-dimensional column vector on the left side of Eq. (20) corresponds to z of Eq. (18). The matrix with four rows and two columns on the right side of Eq. (20) corresponds to H of Eq. (18). This matrix is the same as the matrix Hc of the second embodiment.

The two-dimensional column vector on the right side of Eq. (20) corresponds to x of Eq. (18). This column vector is hereinafter represented by xac. The column vector xac contains the first unknown magnetic field information M and the second unknown magnetic field information E as its elements. As previously mentioned, in the present embodiment both of the first unknown magnetic field information M and the second unknown magnetic field information E are complex numbers. The argument of the first unknown magnetic field information M corresponds to direction information corresponding to the detected angle value θs. The absolute value of the first unknown magnetic field information M corresponds to magnitude information corresponding to the strength of the magnetic field to be detected at a predetermined position. In the present embodiment, the predetermined position is the reference position mentioned previously. The argument of the second unknown magnetic field information E corresponds to direction information corresponding to the direction of the noise magnetic field Mex. The absolute value of the second unknown magnetic field information E corresponds to magnitude information corresponding to the strength of the noise magnetic field Mex.

The unknown magnetic field estimation unit351estimates the column vector xac on the basis of Eq. (19). Here, let yac represent a four-dimensional column vector containing the composite detection signals ya1 to ya4 as its elements. The column vector yac is represented by the following Eq. (21).
yacT=[ya1,ya2,ya3,ya4]  (21)

The unknown magnetic field information estimation unit351calculates xac using an equation replacing H, x, and y in Eq. (19) with Hc, xac, and yac, respectively. The first unknown magnetic field information M and the second unknown magnetic field information E are thereby estimated.

The angle determination unit352determines the detected angle value θs on the basis of the first unknown magnetic field information M estimated by the unknown magnetic field estimation unit351. In the present embodiment, the argument of the estimated first unknown magnetic field information M is determined as the detected angle value θs. The angle determination unit352thus calculates the detected angle value θs by obtaining the argument of the estimated first unknown magnetic field information M. To be more specific, the angle determination unit352calculates θs by the following Eq. (22) using the strengths M1and M2, which are the real part and the imaginary part of the estimated first unknown magnetic field information M, respectively.
θs=atan(M2/M1)  (22)

For θs within the range of 0° to less than 360°, Eq. (22) yields two solutions that are 180° different in value. Which of the two solutions for θs in Eq. (22) is the true value of θs can be determined from the combination of positive and negative signs of M1and M2. The angle determination unit352obtains θs within the range of 0° to less than 360° using Eq. (22) and on the basis of the foregoing determination on the combination of positive and negative signs of M1and M2.

The other configuration, function and effects of the third embodiment are the same as those of the second embodiment.

The present invention is not limited to the foregoing embodiments, and various modifications may be made thereto. For example, as far as the requirements of the appended claims are met, the numbers and layouts of the plurality of detection positions and the plurality of detection units can be freely chosen without being limited to the examples illustrated in the foregoing embodiments. The distribution of the strength of the magnetic field to be detected, and the positional relationship between the magnetic field generation unit and the plurality of detection positions are not specifically limited as long as the magnetic field to be detected has different strengths at the plurality of detection positions.

Obviously, many modifications and variations of the present invention are possible in the light of the above teachings. Thus, it is to be understood that, within the scope of the appended claims and equivalents thereof, the invention may be practiced in other embodiments than the foregoing most preferable embodiments.