Rotation angle detection device and electric power steering system using the same

A bridge circuit includes a plurality of half-bridges formed of sensor elements, which change impedance in accordance with a rotation angle of a detection target. A control circuit acquires output signals of the half-bridges and calculates a phase correction value for correcting a phase deviation. A memory circuit stores the phase correction value. The control circuit corrects a pre-correction rotation angle by the phase correction value. Since the pre-correction rotation angle is corrected by the phase correction value, a rotation angle of the detection target is detected with high accuracy even if the sensor elements are assembled with some positional deviations.

CROSS REFERENCE TO RELATED APPLICATION

This application is based on and incorporates herein by reference Japanese patent application No. 2010-212909 filed on Sep. 23, 2010.

FIELD OF THE INVENTION

The present invention relates to a rotation angle detection device for detecting a rotation angle of a rotary member and an electric power steering apparatus using the same.

BACKGROUND OF THE INVENTION

A conventional rotation angle detection device, which detects a rotation angle of a rotary member, calculates a rotation angle based on output signals produced by sensor elements. In case that the output signals are a cosine signal and a sine signal, for example, it is required that the cosine signal and the sine signal produced from the sensor elements have a phase difference of 90°. The sensor element for producing the cosine signal and the sensor element for producing the sine signal need be arranged such that the directions of magnetization of the sensor elements are shifted 90°. However, since the direction of magnetization cannot be confirmed visually, it is hard to arrange the sensor elements such that respective directions of magnetization shift 90° exactly. It is therefore proposed in the patent document (JP 4194484, EP 1544579A1) to accurately calculate a rotation angle δ by correcting deviation of arrangement of the sensor elements by subtracting an approximation of trigonometric function from a rotation angle θ detected without phase correction.

According to the patent document, it is required to measure a correct rotation angle δ from an external side in calculating an approximation of a trigonometric function, which is used to correct phase. It is therefore necessary in the patent document to provide an external device for measuring the rotation angle δ. According to the patent document, in case that the number of signals used in calculating the rotation angle increases, it is required to store as many trigonometric functions as the number of combinations of the signals. Thus, storage capacity of a memory will correspondingly increase.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a rotation angle detection device for detecting a rotation angle of a detection target with high precision and an electric power steering apparatus using the same.

According to one aspect of the present invention, a rotation angle detection device comprises a sensor circuit, a control circuit and a memory circuit. The sensor circuit includes a plurality of sensor element pairs, each of which is formed of sensor elements and senses a rotating magnetic field varying with rotation of a detection target and changes impedance in accordance with a rotation angle of the detection target. The control circuit includes an output signal acquisition section for acquiring output signals produced by the plurality of sensor element pairs individually, a pre-correction rotation angle calculation section for calculating a pre-correction rotation angle of the detection target based on the output signals acquired by the output signal acquisition section, and a correction section for correcting the pre-correction rotation angle calculated by the pre-correction rotation angle calculation section by correction values. The memory circuit stores correction values.

The control circuit further includes a phase correction value calculation section for calculating phase correction values, as the correction values, for correcting phase deviations between the output signals based on the output signals acquired by the output signal acquisition section. The correction section corrects the pre-correction rotation angle by the phase correction values stored in the memory circuit. The output signal acquisition section acquires the output signals, which are a plurality of signals of different phases.

DETAILED DESCRIPTION OF THE EMBODIMENT

Referring toFIG. 1, a rotation angle detection device10is provided in an electric power steering system (EPS)1, which power-assists a steering operation in a vehicle.

The electric power steering system1forms a part of a steering system90of a vehicle, which has a steering wheel91and a steering shaft92coupled to the steering wheel91. A steering sensor94and a torque sensor95are attached to the steering shaft92. The steering sensor94detects a rotation angle (angular position in rotation) of the steering shaft92. The torque sensor95detects a steering torque applied to the steering wheel91. The end of the steering shaft92is coupled to a rack shaft97through a gear set96. A pair of tires (vehicle wheels)98is coupled to both ends of the rack shaft97through rods and the like. Rotary motion of the steering shaft92is converted into linear motion of the rack shaft97by the gear set96. The tires98are steered by an amount corresponding to the amount of linear movement of the rack shaft97.

The electric power steering system1includes an electric motor80for generating steering assist torque, a rotation angle detector (detection device)10for detecting a rotational angular position of the motor80, and gears89for transferring rotation of the motor80to the steering shaft92in reduced rotation. The motor is a three-phase brushless motor, which rotates the gears in both forward and reverse directions. The electric power steering system1transfers the steering assist torque to the steering shaft92in correspondence to the steering direction and steering torque of the steering wheel91.

As shown inFIG. 2schematically, the motor80includes a stator81, a rotor82, a shaft83and the like. The rotor82is a cylindrical body, which rotates with the shaft83. The rotor82has permanent magnets on its cylindrical surface and magnetic poles. The rotor82is provided radially inside the stator81and supported rotatably therein. The stator81has protrusions, which protrude in a radially inward direction and provided at a predetermined angular interval in a circumferential direction. Coils84are wound about the protrusions. The rotor82rotates with the shaft83and generates rotating magnetic fields, when currents are supplied to the coils84of the stator81. The stator81, the rotor82, the shaft83and the coils84are accommodated within a housing85. The shaft83protrudes outward from both axial ends of the housing85and has a detection target87at one of its axial ends. The detection target87is a target to be detected by the rotation detection device10and accommodated within a cover86. The detection target87is a two-pole magnet formed in a disk shape and rotates with the shaft83. The rotation angle detection device10is attached to the cover86at a position that faces the detection target87. In place of one rotation angle detection device10, a plurality of rotation angle detection devices may be provided on the cover86. The rotation angle of the detection target87indicates the rotation angle of the shaft83of the motor80.

The rotation angle detection device10is configured as shown inFIG. 3. The rotation detection device10has a first bridge circuit11, a second bridge circuit12, an amplifier circuit40, a microcomputer50and the like. The first bridge circuit11and the second bridge circuit12form a circuit part. The first bridge circuit11has a first half-bridge14and a second half-bridge15connected in parallel. The first half-bridge14is formed of two sensor elements21and22connected in series. A junction31between the sensor elements21and22is connected to a first operational amplifier41of the amplifier circuit40. The second half-bridge15is formed of two sensor elements23and24connected in series. A junction32between the sensor elements23and24is connected to a second operational amplifier42of the amplifier circuit40. The second bridge circuit12has a third half-bridge16and a fourth half-bridge17connected in parallel. The third half-bridge16is formed of two sensor elements25and26connected in series. A junction33between the sensor elements25and26is connected to a third operational amplifier43of the amplifier circuit40. The fourth half-bridge17is formed of two sensor elements27and28connected in series. A junction34between the sensor elements27and28is connected to a fourth operational amplifier44of the amplifier circuit40.

The sensor elements21to28are all magneto-resistive elements. Each magneto-resistive element varies its impedance in correspondence to rotating magnetic field, which varies with rotation of the detection target87. The magneto-resistive element is preferably a GMR element, for example. Each of the half-bridges14to17is a sensor element pair. The sensor element pair, which produces one signal, is referred to as a half-bridge. However, the number of sensor element pairs, which form a bridge circuit, is not limited to two. Further, the number of sensor elements, which form a sensor element pair, is not limited to two.

The sensor elements21to28are arranged so that the direction of magnetization of the first half-bridge14and the third half-bridge16is shifted about 90° from the direction of magnetization of the second half-bridge15and the third half-bridge17. The cosine signals are produced at the junction31of the first half-bridge14and the junction33of the third half-bridge16, and the sine signals are produced at the junction32of the second half-bridge15and the junction34of the fourth half-bridge17.

The first bridge circuit11, which is formed of the first half-bridge14producing the cosine signal and the second half-bridge15producing the sine signal, and the second bridge circuit12, which is formed of the third half-bridge16producing the cosine signal and the fourth half-bridge17producing the sine signal, are connected to different power sources of the same power supply voltage Vcc. Thus, even if one of the bridge circuits11and12fails, the rotation angle δ of the detection target87can be continuously calculated by using the cosine signal and the sine signal produced from the other bridge circuit.

The amplifier circuit40is formed of the first amplifier41, the second amplifier42, the third amplifier43and the fourth amplifier44. The first amplifier41amplifies the cosine signal produced at the junction31of the first half-bridge14and applies its output signal Vx1, which is a positive cosine signal (+cos) to the microcomputer50. The second amplifier42amplifies the signal produced at the junction32of the second half-bridge15and applies its output signal Vy1, which is a positive sine signal (+sin) to the microcomputer50. The third amplifier43amplifies the signal produced at the junction33of the third half-bridge16and applies its output signal Vx2, which is a negative cosine signal (−cos) to the microcomputer50. The fourth amplifier44amplifies the signal produced at the junction34of the fourth half-bridge17and applies its output signal Vy2, which is a negative sine signal (−sin) to the microcomputer50.

In case that the power source voltage Vcc supplied to the rotation angle detection device10is 5V, the four output signals Vx1, Vx2, Vy1and Vy2are expressed by the following equations (1) to (4).
Vx1=cos δ+2.5  (1)
Vx2=−cos δ+2.5  (2)
Vy1=sin δ+2.5  (3)
Vy2=−sin δ+2.5  (4)

The output signals Vx1and Vx2, which are cosine signals, may often be referred to as +cosine signal Vx1and −cosine signal Vx2, respectively. Similarly, the output signals Vy1and Vy2, which are sine signals, may often be referred to as +sine signal Vy1and −sine signal Vy2, respectively.

The microcomputer50includes a control circuit (CPU, etc.)51and a memory circuit (memories, etc.)52. The control circuit51performs a variety of calculation processing including phase correction value calculation processing, pre-correction rotation angle calculation processing, correction processing and the like. The memory circuit52is provided to store the phase correction values and the like calculated by the control circuit51. The output signals produced from the junctions31to34of the half-bridges14to17are inputted to the control circuit51after being individually amplified in the amplifier circuit40. That is, the output signal of one half-bridge is not subjected to processing of addition, differential amplification and the like with any of the output signals of the other half-bridges before being inputted to the control circuit51.

Here, the cosine signal and the sine signal will be described with reference toFIG. 4. InFIG. 4, one cycle of each of a cosine signal (COS) and a sine signal (SIN) is shown. The sensor elements21to28are arranged so that the direction of magnetization of the first half-bridge14and the third half-bridge16is shifted 90° from the direction of magnetization of the second half-bridge15and the fourth half-bridge17. As a result, the cosine signals produced from the first half-bridge14and the third half-bridge16differ from the sine signals produced from the second half-bridge15and the fourth half-bridge17by 90° in phase. However, since the direction of magnetization cannot be confirmed visually, it is hard to arrange so that the direction of magnetization of the first half-bridge41and the third half-bridge16crosses the direction of magnetization of the second half-bridge15and the fourth half-bridge17with exactly 90°.

Therefore, the difference in phase between the cosine signal and the sine signal is actually about 90°, that is, 90±α°, as indicated inFIG. 4. In the following description, the cosine signal is assumed to be a reference signal, and a difference α, which is determined to be a value by subtracting 90 from the difference in phase between the cosine signal and the sine signal, is referred to as a phase deviation. For example, if the phase difference between the cosine signal and the sine signal is 89°, the phase deviation α is −1°. If the phase difference between the cosine signal and the sine signal is 91°, the phase deviation α is +1°.

A phase correction value φ, which is provided to correct the phase deviation α is calculated based on the output signals Vx1, Vx2, Vy1and Vy2. Here, phase correction value calculation processing for calculating the phase correction value φ will be described with reference to a flowchart shown inFIG. 5. This phase correction value calculation processing is performed before rotation angle detection processing, which is performed in driving the electric power steering (EPS) apparatus1and shown inFIG. 6andFIG. 7. It is performed, for example, when the rotation angle detection device10is assembled to the motor80.

At first step S11(hereinafter step is simply denoted by S), the four output signals Vx1, Vx2, Vy1and Vy2are acquired. The output signals Vx1, Vx2, Vy1and Vy2vary in correspondence to rotation of the detection target87and are acquired for a period of at least one cycle.

The detection target87may be rotated by current supply to the coils84or manually. The cosine signal Vx and the sine signal Vy are calculated by subtraction between cosine signals and between sine signals, respectively. The cosine signal Vx and the sine signal Vy are expressed by the following equations (5) and (6). By subtraction between the cosine signals Vx1and Vx2and the sine signals Vy1and Vy2, sensor error caused by temperature characteristic and the like is cancelled out.
Vx=Vx1−Vx2=2 cos δ  (5)
Vy=Vy1−Vy2=2 sin δ  (6)

At S12, the phase correction value φ for correcting the phase deviation α is calculated based on the output signals Vx1, Vx2, Vy1and Vy2acquired at S11and the cosine signal Vx and the sine signal Vy calculated at S11.

Nine phase correction values φ0to φ8are calculates as constants for different combinations of signals. The phase correction values φ0to φ8are calculated in a manner described below. It is preferred that the phase correction value φ is calculated for each combination of signals in accordance with the number of acquired signals. At S13, the phase correction values φ0to φ8calculated at S12are stored in the memory circuit52. Thus this processing is finished.

The phase correction values φ0to φ8are calculated as follows.

The phase correction value φ0is calculated based on the cosine signal Vx and the sine signal Vy, which are free from sensor errors. Assuming that the phase deviation between the cosine signal Vx and the sine signal Vy with the cosine signal Vx being the reference is α0, the cosine signal Vx and the sine signal Vy are expressed as follows.
Vx=2 cos δ  (5)
Vy=2 sin(δ+α0)  (7)

The phase correction value φ0is calculated as follows by using the cosine signal Vx expressed by equation (5) and the sine signal Vy expressed by equation (7). First, a subtraction value Vs0is calculated by subtracting the sine signal Vy from the cosine signal Vx. The subtraction value Vs0is expressed by the following equation (8).
Vs0=Vx−Vy=2 cos δ−2 sin(δ+α0)=2{ cos δ+cos(δ+90+α0)}  (8)
By transforming equation (8) by the product formula (9), the subtraction value Vs0is expressed by the following equation (10).

Further, an addition value (sum) Va0is calculated by adding the sine signal Vy to the cosine signal Vx. The addition value Va0is expressed by the following equation (11).
Va0=Vx+Vy=2 cos δ+2 sin(δ+α0)=2{ cos δ−cos(δ+90+α0)}  (11)

By transforming the equation (11) by the product formula, the addition value Va0is expressed by the following equation (13).

The maximum value Vs0max of the subtraction value Vs0and the maximum value Va0max of the addition value Va0are expressed by the following equations (14) and (15), respectively.
Vs0max=4 cos {(45+α0/2)}  (14)
Va0max=4 sin {(45+α0/2)}  (15)

The maximum value Vs0max of the subtraction value Vs0and the maximum value Va0max of the addition value Va0may be acquired as constants by rotating the detection target87.

The arctangent (ATAN) of a quotient, which is calculated by dividing the maximum value Va0max of the addition value Va0by the maximum value Vs0max of the subtraction value Vs0, is calculated as the phase correction value φ0as expressed by the following equation (16).

As described above, since the maximum value Vs0max of the subtraction value Vs0and the maximum value Va0max of the addition value Va0are constants, the phase correction value φ0is calculated also as a constant.

The phase correction value φ0is calculated as described above by using the cosine signal Vx and the sine signal Vy. The other phase correction values φ1to φ8are calculated in the similar manner by using other cosine signals and other sine signals as described with reference to the equations (8) to (16). The phase correction values φ1to φ8are described further.

The phase correction value φ1is calculated based on the −cosine signal Vx2and the sine signal Vy. Assuming that the phase deviation is α1with the −cosine signal Vx2being the reference, the −cosine signal Vx2and the sine signal Vy are expressed as follows. The −cosine signal Vx2is subjected to cancellation of an offset value in the control circuit51and is converted to the +cosine signal, that is, −Vx2a.
Vx2a=−cos δ−Vx2a=cos δ  (17)
Vy=2 sin(δ+α1)  (18)

A subtraction value Vs1is calculated by subtracting the sine signal Vy from the cosine signal −Vx2a. In this example, the cosine signal −Vx2ais doubled so that the amplitude of the cosine signal −Vx2aand the amplitude of the sine signal Vy equal. However, the sine signal Vy may be halved. This is also true for other examples to follow.
Vs1=−2Vx2a−Vy=2 cos δ−2 sin(δ+α1)=2{ cos δ+cos(δ+90+α1)}  (19)

By transforming the equation (19) by the product formula, the subtraction value Vs1is expressed by the following equation (20).
Vs1=4 cos(δ+45+α1/2)cos(45+α1/2)  (20)

The sum Va1, which is calculated by adding the cosine signal −Vx2aand the sine signal Vy after equalizing the amplitudes, is expressed by the following equation (21).
Vx=2 cos δ  (5)
Vy=2 sin(δ+α0)  (7)
Va1=−2Vx2a+Vy=2 cos δ+2 sin(δ+α1)=2{ cos δ−cos(δ+90+α1)}  (21)

By transforming the equation (21) by the product formula, the addition value Va1is expressed by the following equation (22).
Va1=4 sin(δ+45+α1/2)sin(45+α1/2)  (22)

The maximum value Vs1max of the subtraction value Vs1and the maximum value Va1max of the addition value Va0are expressed by the following equations (23) and (24), respectively.
Vs1max=4 cos(45+α1/2)  (23)
Va1max=4 sin(45+α1/2)  (24)

The arctangent of a quotient, which is calculated by dividing the maximum value Va1max of the addition value Va1by the maximum value Vs1max of the subtraction value Vs1, is calculated as the phase correction value φ1as expressed by the following equation (25).
φ1=ATAN(Va1max/Vs1max)=45+α1/2  (25)
<Phase Correction Value φ2>

The phase correction value φ2is calculated based on the +cosine signal Vx1and the sine signal Vy. Assuming that the phase deviation is α2with the +cosine signal Vx1being the reference, the +cosine signal Vx1and the sine signal Vy are expressed as follows. The +cosine signal Vx1is subjected to cancellation of an offset value in the control circuit51and is Vx1a.
Vx1a=cos δ  (26)
Vy=2 sin(δ+α2)  (27)

A subtraction value Vs2is calculated as follows by subtracting the sine signal Vy from the +cosine signal Vx1a.
Vs2=2Vx1a−Vy=2 cos δ−2 sin(δ+α2)=2{ cos δ+cos(δ+90+α2)}  (28)

By transforming the equation (28) by the product formula, the subtraction value Vs2is expressed by the following equation (29).
Vs2=4 cos(δ+45+α2/2)cos(45+α2/2)  (29)

The sum Va2, which is calculated by adding the +cosine signal Vx1aand the sine signal Vy after equalizing the amplitudes, is expressed as follows.
Va2=2Vx1a+Vy=2 cos δ+2 sin(δ+α2)=2{ cos δ−cos(δ+90+α2)}  (30)

By transforming the equation (30) by the product formula, the addition value Va2is expressed by the following equation (31).
Va2=4 sin(δ+45+α2/2)sin(45+α2/2)  (31)

The maximum value Vs2max of the subtraction value Vs2and the maximum value Va2max of the addition value Va2are expressed by the following equations (32) and (33), respectively.
Vs2max=4 cos(45+α2/2)  (32)
Va2max=4 sin(45+α2/2)  (33)

The arctangent of a quotient, which is calculated by dividing the maximum value Va2max of the addition value Va2by the maximum value Vs2max of the subtraction value Vs2, is calculated as the phase correction value φ2as expressed by the following equation (34).
φ2=ATAN(Va2max/Vs2max)=45+α2/2  (34)
<Phase Correction Value φ3>

The phase correction value φ3is calculated based on the cosine signal Vx and the −sine signal Vy2. Assuming that the phase deviation is α3with the cosine signal Vx being the reference, the cosine signal Vx and the −sine signal Vy2are expressed as follows. The −sine signal Vy2is subjected to cancellation of an offset value in the control circuit51and is converted to the +sine signal, which is −Vy2a.
Vx=2 cos δ  (5)
Vy2a=−sin(δ+α3)−Vy2a=sin(δ+α3)  (35)

A subtraction value Vs3is calculated as follows by subtracting the sine signal −Vy2afrom the cosine signal Vx.
Vs3=Vx−(−2Vy2a)=2 cos δ−2 sin(δ+α3)=2{ cos δ+cos(δ+90+α3)}  (36)

By transforming the equation (36) by the product formula, the subtraction value Vs3is expressed by the following equation (37).
Vs3=4 cos(δ+45+α3/2)cos(45+α3/2)  (37)

The addition value Va3, which is calculated by adding the cosine signal Vx and the sine signal −Vy2aafter equalizing the amplitudes, is expressed by the following equation (38).
Va3=Vx+(−2Vy2a)=2 cos δ+2 sin(δ+α3)=2{ cos δ−cos(δ+90+α3)}  (38)

By transforming the equation (38) by the product formula, the addition value Va3is expressed by the following equation (39).
Va3=4 sin(δ+45+α3/2)sin(45+α3/2)  (39)

The maximum value Vs3max of the subtraction value Vs3and the maximum value Va3max of the addition value Va3are expressed by the following equations (40) and (41), respectively.
Vs3max=4 cos(45+α3/2)  (40)
Va3max=4 sin(45+α3/2)  (41)

The arctangent of a quotient, which is calculated by dividing the maximum value Va3max of the addition value Va3by the maximum value Vs3max of the subtraction value Vs3, is calculated as the phase correction value φ3as expressed by the following equation (42).
φ3=ATAN(Va3max/Vs3max)=45+α3/2  (42)
<Phase Correction Value φ4>

The phase correction value φ4is calculated based on the cosine signal Vx and the +sine signal Vy1. Assuming that the phase deviation is α4with the cosine signal Vx being the reference, the cosine signal Vx and the +sine signal Vy1are expressed as follows. The +sine signal Vy1is subjected to cancellation of an offset value in the control circuit51and is Vy1a.
Vx=2 cos δ  (5)
Vy1a=sin(δ+α4)  (43)

A subtraction value Vs4is calculated as follows by subtracting the +sine signal Vy1afrom the cosine signal Vx.
Vs4=Vx−2Vy1a=2 cos δ−2 sin(δ+α4)=2{ cos δ+cos(δ+90+α4)}  (44)

By transforming the equation (44) by the product formula, the subtraction value Vs4is expressed by the following equation (45).
Vs4=4 cos(δ+45+α4/2)cos(45+α4/2)  (45)

The addition value Va4, which is calculated by adding the cosine signal Vx and the +sine signal Vy2aafter equalizing the amplitudes, is expressed as follows.
Va4=Vx+2Vy1a=2 cos δ+2 sin(δ+α4)=2{ cos δ−cos(δ+90+α4)}  (46)

By transforming the equation (46) by the product formula, the addition value Va4is expressed by the following equation (47).
Va4=4 sin(δ+45+α4/2)sin(45+α4/2)  (47)

The maximum value Vs4max of the subtraction value Vs4and the maximum value Va4max of the addition value Va4are expressed by the following equations (48) and (49), respectively.
Vs4max=4 cos(45+α4/2)  (48)
Va4max=4 sin(45+α4/2)  (49)

The arctangent of a quotient, which is calculated by dividing the maximum value Va4max of the addition value Va4by the maximum value Vs4max of the subtraction value Vs4, is calculated as the phase correction value φ4as expressed by the following equation (50).
φ4=ATAN(Va4max/Vs4max)=45+α4/2  (50)
<Phase Correction Value φ5>

The phase correction value φ5is calculated based on the −cosine signal Vx2and the −sine signal Vy2. Assuming that the phase deviation is α5with the −cosine signal Vx2being the reference, the −cosine signal Vx2and the −sine signal Vy2are expressed as follows. The −cosine signal Vx2and the −sine signal Vy2are subjected to cancellation of offset values in the control circuit51and are converted to the +cosine signal and the +sine signal, which are −Vx2aand −Vy2a, respectively.
Vx2a=−cos δ
−Vx2a=cos δ  (51)
Vy2a=−sin(δ+α5)−Vy2a=sin(δ+α5)  (52)

A subtraction value Vs5is calculated as follows by subtracting the +sine signal Vy1afrom the cosine signal Vx.
Vs5=−Vx2a−(−Vy2a)=cos δ−sin(δ+α5)=cos δ+cos(δ+90+α5)  (53)

By transforming the equation (53) by the product formula, the subtraction value Vs5is expressed by the following equation (54).
Vs5=2 cos(δ+45+α5/2)cos(45+α5/2)  (54)

The addition value Va5, which is calculated by adding the cosine signal −Vx2aand the sine signal −Vy2a, is expressed as follows.
Va5=−Vx2a+(−Vy2a)=cos δ+sin(δ+α5)=cos δ−cos(δ+90+α5)  (55)

By transforming the equation (55) by the product formula, the addition value Va5is expressed by the following equation (56).
Va5=2 sin(δ+45+α5/2)sin(45+α5/2)  (56)

The maximum value Vs5max of the subtraction value Vs5and the maximum value Va5max of the addition value Va5are expressed by the following equations (57) and (58), respectively.
Vs5max=2 cos(45+α5/2)  (57)
Va5max=2 sin(45+α5/2)  (58)

The arctangent of a quotient, which is calculated by dividing the maximum value Va5max of the addition value Va5by the maximum value Vs5max of the subtraction value Vs5, is calculated as the phase correction value φ5as expressed by the following equation (59).
φ5=ATAN(Va5max/Vs5max)=45+α5/2  (59)
<Phase Correction Value φ6>

The phase correction value φ6is calculated based on the −cosine signal Vx2and the +sine signal Vy1. Assuming that the phase deviation is α6with the −cosine signal Vx2being the reference, the −cosine signal Vx2and the +sine signal Vy1are expressed as follows. The −cosine signal Vx2and the +sine signal Vy1are subjected to cancellation of offset values in the control circuit51and the −cosine signal Vx2is converted to the +cosine signal, which is −Vx2a.
Vx2a=−cos δ−Vx2a=cos δ  (60)
Vy1a=sin(δ+α6)  (61)

A subtraction value Vs6is calculated as follows by subtracting the +sine signal Vy1afrom the cosine signal −Vx2a.
Vs6=−Vx2a−Vy1a=cos δ−sin(δ+α6)=cos δ+cos(δ+90+α6)}  (62)

By transforming the equation (62) by the product formula, the subtraction value Vs6is expressed by the following equation (63).
Vs6=2 cos(δ+45+α6/2)cos(45+α6/2)  (63)

The addition value Va6, which is calculated by adding the cosine signal −Vx2aand the +sine signal Vy1a, is expressed as follows.
Va6=−Vx2a+Vy1a=cos δ+sin(δ+α6)=cos δ−cos(δ+90+α6)  (64)

By transforming the equation (64) by the product formula, the addition value Va6is expressed by the following equation (65).
Va6=2 sin(δ+45+α6/2)sin(45+α6/2)  (65)

The maximum value Vs6max of the subtraction value Vs6and the maximum value Va6max of the addition value Va6are expressed by the following equations (66) and (67), respectively.
Vs6max=2 cos(45+α6/2)  (66)
Va6max=2 sin(45+α6/2)  (67)

The arctangent of a quotient, which is calculated by dividing the maximum value Va6max of the addition value Va6by the maximum value Vs6max of the subtraction value Vs6, is calculated as the phase correction value φ6as expressed by the following equation (68).
φ6=ATAN(Va6max/Vs6max)=45+α6/2  (68)
<Phase Correction Value φ7>

The phase correction value φ7is calculated based on the +cosine signal Vx1and the −sine signal Vy2. Assuming that the phase deviation is α7 with the +cosine signal Vx1being the reference, the +cosine signal Vx1and the −sine signal Vy2are expressed as follows. The +cosine signal Vx1and the −sine signal Vy2are subjected to cancellation of offset values in the control circuit51and the −sine signal Vy2is converted to the +sine signal, which is −Vy2a.
Vx1a=cos δ  (69)
Vy2a=−sin(δ+α7)−Vy2a=sin(δ+α7)  (70)

A subtraction value Vs7is calculated as follows by subtracting the sine signal −Vy2afrom the +cosine signal Vx1a.
Vs7=Vx1a−(−Vy2a)=cos δ−sin(δ+α7)=cos δ+cos(δ+90+α7)  (71)

By transforming the equation (71) by the product formula, the subtraction value Vs7is expressed by the following equation (72).
Vs7=2 cos(δ+45+α7/2)cos(45+α7/2)  (72)

The addition value Va7, which is calculated by adding the cosine signal +Vx1aand the sine signal −Vy2a, is expressed as follows.
Va7=Vx1a+(−Vy2a)=cos δ+sin(δ+α7)=cos δ−cos(δ+90+α7)  (73)

By transforming the equation (73) by the product formula, the addition value Va7is expressed by the following equation (74).
Va7=2 sin(δ+45+α7/2)sin(45+α7/2)  (74)

The maximum value Vs7max of the subtraction value Vs7and the maximum value Va7max of the addition value Va7are expressed by the following equations (75) and (76), respectively.
Vs7max=2 cos(45+α7/2)  (75)
Va7max=2 sin(45+α7/2)  (76)

The arctangent of a quotient, which is calculated by dividing the maximum value Va7max of the addition value Va7by the maximum value Vs7max of the subtraction value Vs7, is calculated as the phase correction value φ7as expressed by the following equation (77).
φ7=ATAN(Va7max/Vs6max)=45+α7/2  (77)
<Phase Correction Value φ8>

The phase correction value φ8is calculated based on the +cosine signal Vx1and the +sine signal Vy1. Assuming that the phase deviation is α8with the +cosine signal Vx1being the reference, the +cosine signal Vx1and the +sine signal Vy1are expressed as follows. The +cosine signal Vx1and the +sine signal Vy1are subjected to cancellation of offset values in the control circuit51and are Vx1aand Vy1a, respectively.
Vx1a=cos δ  (78)
Vy1a=sin(δ+α8)  (79)

A subtraction value Vs8is calculated as follows by subtracting the +sine signal Vy1afrom the +cosine signal Vx1a.
Vs8=Vx1a−Vy1a=cos δ−sin(δ+α8)=cos δ+cos(δ+90+α8)  (80)

By transforming the equation (80) by the product formula, the subtraction value Vs8is expressed by the following equation (81).
Vs8=2 cos(δ+45+α8/2)cos(45+α8/2)  (81)

The addition value Va8, which is calculated by adding the +cosine signal Vx1aand the +sine signal Vy1a, is expressed as follows.
Va8=Vx1a+Vy1a=cos δ+sin(δ+α8)=cos δ−cos(δ+90+α8)  (82)

By transforming the equation (82) by the product formula, the addition value Va8is expressed by the following equation (83).
Va8=2 sin(δ+45+α8/2)sin(45+α8/2)  (83)

The maximum value Vs8max of the subtraction value Vs8and the maximum value Va8max of the addition value Va8are expressed by the following equations (84) and (85), respectively.
Vs8max=2 cos(45+α8/2)  (84)
Va8max=2 sin(45+α8/2)  (85)

The arctangent of a quotient, which is calculated by dividing the maximum value Va8max of the addition value Va8by the maximum value Vs8max of the subtraction value Vs8, is calculated as the phase correction value φ8as expressed by the following equation (86).
φ8=ATAN(Va8max/Vs8max)=45+α8/2  (86)

The phase correction values φ0to φ8calculated as described above are all constants and are stored in the memory circuit52(S13inFIG. 5).

The rotation angle detection processing for detecting the rotation angle of the detection target87will be described next with reference to flowcharts shown inFIG. 6andFIG. 7. The rotation angle detection processing shown inFIG. 6andFIG. 7is performed at a predetermined interval, for example 200 μs, while the EPS is in operation.

At S101inFIG. 6, four output signals Xx1, Vx2, Vy1and Vy2are acquired. The cosine signal Vx calculated by subtraction between cosine signals and the sine signal Vy calculated by subtraction between sine signals are calculated (refer to equations (1) to (6)).

At S102, the four output signals Vx1, Vx2, Vx3and Vx4are checked whether normal or abnormal, and any signal which is not normal is determined to be abnormal. The output signal, which is abnormal, may be determined by a conventional method. For example, the output signal may be determined to be abnormal if the output signal rises above a predetermined upper limit value or falls below a predetermined lower limit value.

At S103, it is checked whether all the output signals are normal. If at least one of the output signal is abnormal (S103: NO), S106is performed. If all the output signals are normal (S103: YES), S104is performed. At S104, since all the output signals are normal, a pre-correction rotation angle θ0, which is as detected and not corrected, is calculated based on the cosine signal Vx and the sine signal Vy.

The pre-correction rotation angle θn is calculated as follows. The pre-correction rotation angle θn is calculated in correspondence to the phase correction values φ0to φ8at steps in the rotation angle detection processing shown inFIG. 6andFIG. 7. Specifically, the pre-correction rotation angle θ0is calculated based on the output signals used to calculate the phase correction value φ0and calculation values calculated by using the output signals. First, before calculation of the pre-correction rotation angle θn, a quotient Vsdn is calculated by dividing the subtraction value Vsn by the maximum value Vsnmax of the subtraction value Vsn, and a quotient Vadn is calculated by dividing the addition value Van by the maximum value Vanmax of the addition value Van for equalizing the amplitudes. In this calculation of the quotients Vsdn and the Vadn, the subtraction value Vsn, the addition value Van, the maximum value Vsnmax of the subtraction value Vsn and the maximum value Vanmax of the addition value Van, which are used to calculate the phase correction values φ0to φ8are used.
Vsdn=Vsn/Vsnmax=cos(δ+45+αn/2)  (87)
Vadn=Van/Vanmax=sin(δ+45+αn/2)  (88)

It is noted that, with respect to the quotients Vsdn and Vadn, “n” is variable from 0 to 8. In case of n=0, for example, the quotient Vsd0is calculated by dividing Vs0by Vs0max, and the quotient Vad0is calculated by dividing Va0by Va0max.

Next, the pre-correction rotation angle θn is calculated from an angle γn, which is the arctangent calculated by using the quotients Vsdn and Vadn, as described next with reference toFIG. 8andFIG. 9.FIG. 8shows angular ranges related to the calculation of the pre-correction rotation angle θn. InFIG. 8, the sine signal corresponds to Vadn and the cosine signal corresponds to Vsdn.FIG. 9shows a table, by which the pre-correction rotation angle θn is calculated based on the angle γn. The pre-correction rotation angle θn is calculated based on the angle γn (n=0 to 8), which is the arctangent calculated by using Vsdn and Vadn. The angle γn is calculated as expressed by the following equations (89) and (90).
γn=ATAN(Vadn/Vsdn)  (89)
γn=ATAN(Vsdn/Vadn)  (90)

As expressed by equations (89) and (90), the angle γn is calculated as the arctangent of the quotient (hereinafter referred to as tangent value), which is calculated by dividing the sine signal, Vadn, by the cosine signal, Vsdn, or as arctangent of the quotient (hereinafter referred to as cotangent value), which is calculated by dividing the cosine signal, Vsdn, by the sine signal, Vadn. Since Vadn and Vsdn may take 0, it is necessary to avoid division by 0. For this reason, the angle γn is calculated based on the tangent value, which is calculated by dividing by the cosine signal, over an angular range including the angle at which the sine signal Vadn is 0. Similarly, the angle γn is calculated based on the cotangent value, which is calculated by dividing by the sine signal, over an angular range including the angle at which the cosine signal Vsdn is 0. In case that Vadn or Vsdn is a negative signal, the tangent value and the cotangent value are calculated after converting it to a positive value by multiplying −1, for example. If the pre-correction rotation angle θn is assumed to vary from 0° to 360°, the tangent value and the cotangent value become equal at different pre-correction rotation angle θn. For this reason, the pre-correction rotation angle θn is calculated based on the tangent value or the cotangent value after specifying an angular range of the pre-correction rotation angle θn based on a magnitude relation between the absolute value of Vadn and the absolute value of Vsdn, sign of Vadn and sign of Vsdn.

Specifically, as shown inFIG. 8andFIG. 9, based on the magnitude relation between the absolute value of Vadn and the absolute value of Vsdn, the sign of Vadn and the sign of Vsdn, the pre-correction rotation angle θn is determined to which one of eight areas1to8in the range of 0 degree to 360 degrees. By comparing the absolute value of Vadn and the absolute value Vsdn, the tangent value or the cotangent value is used so that the Vadn or Vsdn of the greater absolute value becomes a denominator. The angle γn, which is the arctangent value of the tangent value or the cotangent value, is calculated. InFIG. 9, γn-calculation indicates a method of calculating γn and specifies which one of the tangent value or the cotangent value is used to calculate the arctangent value. Since the angular range of the pre-correction rotation angle θn is specified, the pre-correction rotation angle θn is calculated by adding or subtracting the angle γn, which is calculated at each reference angle, 0° (360°), 90°, 180° and 270°. The pre-correction rotation angle θn is expressed by the following equation (91).
θn=δ+45+αn/2  (91)

Referring toFIG. 6, at S104, the pre-correction rotation angle θ0calculated from the angle γ0, which is the arctangent value of the tangent value and the cotangent value based on Vad0and Vsd0is calculated as expressed by the following equation (92).
θ0=δ+45+α0/2  (92)
At S105, the phase correction value φ0, which is calculated based on the cosine signal Vx and the sine signal Vy and stored in the memory circuit52, is acquired. The pre-correction rotation angle θ0calculated at S104is corrected based on the acquired phase correction value φ0. Specifically, by subtracting the phase correction value φ0from the pre-correction rotation angle θ0, the rotation angle δ of the detection target87is calculated as expressed by the equation (93).
θ0−φ0=(δ+45+α0/2)−(45+α0/2)=δ  (93)

At S106, which is performed if at least one output signal is abnormal (S103: NO), it is checked whether only the +cosine signal Vx1is abnormal. If the +cosine signal Vx1is not abnormal or other output signal is also abnormal in addition to abnormality of the +cosine signal Vx1(S106: NO), S109is performed. If only the +cosine signal Vx1is abnormal (S106: YES), S107is performed.

At S107, since only the +cosine signal Vx1is abnormal, the pre-correction rotation angle θ1is calculated based on the normal signals, that is, −cosine signal Vx2and the singe signal Vy, from which sensor error is removed by subtraction between the sine signals. The pre-correction rotation angle θ1calculated from the angle γ1, which is the arctangent value of the tangent value or the cotangent value based on Vad1and Vsd1, is expressed by the following equation (94).
θ1=δ+45+α1/2  (94)

At S108, the phase correction value φ1, which is calculated based on the −cosine signal Vx2and the sine signal Vy and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ1calculated at S107is corrected based on the acquired phase correction value φ1. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ1from the pre-correction rotation angle θ1as expressed by the equation (95).
θ1−φ1−(δ+45+α1/2)−(45+α1/2)=δ  (95)

At S109, which is performed if the +cosine signal Vx1is not abnormal or other output signal is also abnormal in addition to abnormality of the +cosines signal Vx1(S106: NO), it is checked whether only the −cosine signal Vx2is abnormal. If the −cosine signal Vx2is not abnormal or other output signal is also abnormal in addition to the abnormality of the −cosine signal Vx2(S109: NO), S112is performed. If only the −cosine signal Vx2is abnormal (S109: YES), S110is performed.

At S110, since only the −cosine signal Vx2is abnormal, the pre-correction rotation angle θ2is calculated based on the normal signals, that is, the +cosine signal Vx1and the sine signal Vy, from which sensor error is removed by subtraction between the sine signals. The pre-correction rotation angle θ2calculated from the angle γ2, which is the arctangent value of the tangent value or the cotangent value of Vad2and Vsd2, is expressed by the following equation (96).
θ2=δ+45+α2/2  (96)

At S111, the phase correction value φ2, which is calculated based on the +cosine signal Vx1and the sine signal Vy and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ2calculated at S110is corrected based on the acquired phase correction value φ2. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ2from the pre-correction rotation angle θ2as expressed by the equation (97).
θ2−φ2=(δ+45+α2/2)−(45+θ2/2)=δ  (97)

At S112, which is performed if the −cosine signal Vx2is not abnormal or other output signal is also abnormal in addition to abnormality of the −cosine signal Vx2(S109: NO), it is checked whether only the +sine signal Vy1is abnormal. If the +sine signal Vy1is not abnormal or other output signal is also abnormal in addition to the abnormality of the +sine signal Vy1(S112: NO), S115is performed. If only the +sine signal Vy1is abnormal (S112: YES), S113is performed. At S113, since only the +sine signal Vy1is abnormal, the pre-correction rotation angle θ3is calculated based on the normal signals, that is, the −sine signal Vy2and the cosine signal Vx, from which sensor error is removed by subtraction between the cosine signals. The pre-correction rotation angle θ3calculated from the angle γ3, which is the arctangent value of the tangent value or the cotangent value of Vad3and Vsd3, is expressed by the following equation (98).
θ3=δ+45+α3/2  (98)

At S114, the phase correction value φ3, which is calculated based on the cosine signal Vx and the −sine signal Vy2and stored in the memory circuit52, is acquired.

Then the pre-correction rotation angle θ3calculated at S113is corrected based on the acquired phase correction value φ3. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ3from the pre-correction rotation angle θ3as expressed by the equation (99).
θ3−φ3=(δ+45+α3/2)−(45+α3/2)=δ  (99)

At S115, which is performed if the +sine signal Vy1is not abnormal or other output signal is also abnormal in addition to abnormality of the +sine signals Vy1(S112: NO), it is checked whether only the −sine signal Vy2is abnormal.

If the −sine signal Vy2is not abnormal or other output signal is also abnormal in addition to the abnormality of the −sine signal Vy2(S115: NO), S118shown inFIG. 7is performed. If check result at S115is NO, at least two output signals are abnormal. If only the −sine signal Vy2is abnormal (S115: YES), S116is performed.

At S116, since only the −sine signal Vy2is abnormal, the pre-correction rotation angle θ4is calculated based on the normal signals, that is, the +sine signal Vy1and the cosine signal Vx, from which sensor error is removed by subtraction between the cosine signals. The pre-correction rotation angle θ4calculated from the angle γ4, which is the arctangent value of the tangent value or the cotangent value of Vad4and Vsd4, is expressed by the following equation (100).
θ4=δ+45+α4/2  (100)

At S117, the phase correction value φ4, which is calculated based on the cosine signal Vx and the +sine signal Vy1and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ4calculated at S116is corrected based on the acquired phase correction value φ4. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ4from the pre-correction rotation angle θ4as expressed by the equation (101).
θ4−φ4=(δ+45+α4/2)−(45+α4/2)=δ  (101)

As shown inFIG. 7, at S118, which is performed if at least two output signals are abnormal (103: NO, S106: NO, S109: NO, S112: NO and S115: NO), it is checked whether only the output signals Vx1and Vy1are abnormal. If the abnormal output signal is other than the output signals Vx1and Vy1(S118: NO), S121is performed. If only the output signals Vx1and Vy1are abnormal (S118: YES), S191is performed.

At S119, the pre-correction rotation angle θ5is calculated based on the normal signals, that is, the −cosine signal Vx2and the −sine signal Vy2. The pre-correction rotation angle θ5calculated from the angle γ5, which is the arctangent value of the tangent value or the cotangent value of Vad5and Vsd5, is expressed by the following equation (102).
θ5=δ+45+α5/2  (102)

At S120, the phase correction value φ5, which is calculated based on the −cosine signal Vx2and the −sine signal Vy2and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ5calculated at S119is corrected based on the acquired phase correction value φ5. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ5from the pre-correction rotation angle θ5as expressed by the equation (103).
θ5−φ5=(δ+45+α5/2)−(45+α5/2)=δ  (103)

At S121, which is performed if the abnormal signal is other than the output signals Vx1and Vy1(S118: NO), it is checked whether only the output signals Vx1and Vy2are abnormal. If the abnormal signal is other than the output signals Vx1and Vy2(S121: NO), S124is performed. If only the output signals Vx1and Vy2are abnormal (S121: YES), S122is performed.

At S122, the pre-correction rotation angle θ6is calculated based on the normal signals, that is, the −cosine signal Vx2and the +sine signal Vy1. The pre-correction rotation angle θ6calculated from the angle γ6, which is the arctangent value of the tangent value or the cotangent value of Vad6and Vsd6, is expressed by the following equation (104).
θ6=δ+45+α6/2  (104)

At S123, the phase correction value φ6, which is calculated based on the −cosine signal Vx2and the +sine signal Vy1and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ6calculated at S122is corrected based on the acquired phase correction value φ6. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ6from the pre-correction rotation angle θ6as expressed by the equation (106).
θ6−φ6=(δ+45+α6/2)−(45+α6/2)=δ  (105)

At S124, which is performed if the abnormal signal is other than the output signals Vx1and Vy2(S121: NO), it is checked whether only the output signals Vx2and Vy1are abnormal. If the abnormal signal is other than the output signals Vx2and Vy1(S124: NO), S127is performed. If only the output signals Vx2and Vy1are abnormal (S124: YES), S125is performed.

At S125, the pre-correction rotation angle θ7is calculated based on the normal signals, that is, the +cosine signal Vx1and the −sine signal Vy2. The pre-correction rotation angle θ7calculated from the angle γ7, which is the arctangent value of the tangent value or the cotangent value of Vad7and Vsd7, is expressed by the following equation (106).
θ7=δ+45+α7/2  (106)

At S126, the phase correction value φ7, which is calculated based on the +cosine signal Vx1and the −sine signal Vy2and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ7calculated at S125is corrected based on the acquired phase correction value φ7. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ7from the pre-correction rotation angle θ7as expressed by the equation (107).
θ7−φ7=(δ+45+α7/2)−(45+α7/2)=δ  (107)

At S127, which is performed if the abnormal signal is other than the output signals Vx2and Vy1(S124: NO), it is checked whether only the output signals Vx2and Vy2are abnormal. If the abnormal signal is other than the output signals Vx2and Vy2(S127: NO), S130is performed. If only the output signals Vx2and Vy2are abnormal (S127: YES), S128is performed.

At S128, the pre-correction rotation angle θ8is calculated based on the normal signals, that is, the +cosine signal Vx1and the +sine signal Vy1. The pre-correction rotation angle θ8calculated from the angle γ8, which is the arctangent value of the tangent value or the cotangent value of Vad8and Vsd8, is expressed by the following equation (108).
θ8=δ+45+α8/2  (108)

At S129, the phase correction value φ8, which is calculated based on the +cosine signal Vx1and the +sine signal Vy1and stored in the memory circuit52, is acquired. Then the pre-correction rotation angle θ8calculated at S128is corrected based on the acquired phase correction value φ8. Specifically, the rotation angle δ of the detection target87is calculated by subtracting the phase correction value φ8from the pre-correction rotation angle θ8as expressed by the equation (109).
θ8−φ8=(δ+45+α8/2)−(45+α8/2)=δ  (109)

At S127, which is performed if the abnormal signal is other than the output signals Vx2and Vy2(S127: NO), all the cosine signals, all the sine signals or all the cosine signals and the sine signals are abnormality is checked whether only the output signals Vx2and Vy2are. Hence, the angle detection is terminated. The rotation angle δ calculated at S105, S108, S111, S114, S117, S120, S123, S126or S129is used to control driving of the motor80.

As described above, the control circuit51of the rotation angle detection device10acquires the output signals Vx1, Vx2, Vy1and Vy2, which are produced from the junctions of the half-bridges14to17, individually. The acquired output signals Vx1, Vx2, Vy1and Vy2are different in phase one another. The control circuit51calculates the pre-correction rotation angles θ0to θ8of the detection target87based on the output signals Vx1, Vx2, Vy1and Vy2(S104, S107, S110, S113, S116inFIG. 6, and S119, S122, S125, S126inFIG. 7).

The control circuit51calculates the phase correction values φ0to φ8in accordance with the output signals Vx1, Vx2, Vy1and Vy2(S12inFIG. 5). The calculated phase correction values φ0to φ8are stored in the memory circuit52(S13). The control circuit51acquires the phase correction values φ0to φ8stored in the memory circuit52, corrects the pre-correction rotation angles θ0to θ8based on the acquired phase correction values φ0to φ8, and calculates the rotation angles δ of the detection target87(S105, S108, S111, S114, S117inFIG. 6and S120, S123, S126, S129inFIG. 7). Thus, since the pre-correction rotation angles θ0to θ8are corrected based on the phase correction values φ0to φ8, the rotation angle δ of the detection object87is calculated accurately. Since the phase correction values φ0to φ8are calculated based on the acquired output signals Vx1, Vx2, Vy1and Vy2, it is not necessary to measure precisely the rotation angle from an external part.

The output signals according to the present embodiment include the cosine signal and the sine signal. The four output signals Vx1, Vx2, Vy1and Vy2are acquired. Thus, even if one or some of the output signals Vx1, Vx2, Vy1and Vy2becomes abnormal, the rotation angle δ of the detection target87is detected continuously with high accuracy. The output signals Vx1, Vx2, Vy1and Vy2are the +cosine signal, the −cosine signal, the +sine signal and the −sine signal, respectively. Therefore, even if one or some of the output signals becomes abnormal, the rotation angle δ of the detection target87is detected continuously as long as either one of the +cosine signal Vx1and the −cosine signal Vx2is normal and either one of the +sine signal Vy1and −sine signal Vy2is normal.

If all the output signals Vx1, Vx2, Vy1and Vy2are normal (S103: YES), the pre-correction angle θ0is calculated based on the cosine signal Vx, which is calculated based on the +cosine signal Vx1and −cosine signal Vx2, and the sine signal Vy, which is calculated based on the +sine signal Vy1and the −sine signal Vy2(S104).

The control circuit51calculates the phase correction value φ0based on the cosine signal Vx, which is calculated based on the +cosine signal Vx1and the −cosine signal Vx2, and the sine signal Vy, which is calculated based on the +sine signal Vy1and the −sine signal Vy2. The control circuit51corrects the pre-correction rotation angle θ0based on the phase correction value φ0and calculates the rotation angle δ of the detection target87. Thus, the pre-correction rotation angle θ0and the phase correction value φ0are calculated based on the cosine signal Vx and the sine signal Vy, which are free from the sensor error, and the rotation angle δ of the detection object87is calculated with high accuracy.

If only the +cosine signal Vx1is abnormal (S106: YES), the pre-correction angle θ1is calculated based on the −cosine signal Vx2(S107). The pre-correction rotation angle θ1is corrected based on the phase correction value φ1, which is calculated based on the −cosine signal. The rotation angle δ of the detection object87is thus calculated (S108). If only the −cosine signal Vx2is abnormal (S109: YES), the pre-correction angle θ2is calculated based on the +cosine signal Vx1(S110). The pre-correction rotation angle θ2is corrected based on the phase correction value φ2, which is calculated based on the +cosine signal. The rotation angle δ of the detection object87is thus calculated (S111). Thus, even if the +cosine signal or the −cosine signal is abnormal, the rotation angle δ of the detection target87is calculate with high accuracy based on the pre-correction rotation angle and the phase correction value calculated based on the +cosine signal or the −cosine signal, which is normal.

If only the +sine signal Vy1is abnormal (S112: YES), the pre-correction angle θ3is calculated based on the −sine signal Vy2(S113). The pre-correction rotation angle θ3is corrected based on the phase correction value φ3, which is calculated based on the −sine signal Vy2. The rotation angle δ of the detection object87is thus calculated (S114). If only the −sine signal Vy2is abnormal (S116: YES), the pre-correction angle θ4is calculated based on the +sine signal Vy1(S116). The pre-correction rotation angle θ4is corrected based on the phase correction value φ2, which is calculated based on the +sine signal Vy1. The rotation angle δ of the detection object87is thus calculated (S117). Thus, even if the +sine signal Vy1or the −sine signal Vy2is abnormal, the rotation angle δ of the detection target87is calculated with high accuracy based on the pre-correction rotation angle and the phase correction value calculated based on the +sine signal Vy1or the −sine signal Vy2, which is normal.

If both the +cosine signal Vx1and the +sine signal Vy1are abnormal (S118: YES), the pre-correction angle θ5is calculated based on the −cosine signal Vx2and the −sine signal Vy2(S119). The pre-correction rotation angle θ5is corrected based on the phase correction value φ5, which is calculated based on the −cosine signal Vx2and the −sine signal Vy2. The rotation angle δ of the detection object87is thus calculated (S120).

If both the +cosine signal Vx1and the −sine signal Vy2are abnormal (S121: YES), the pre-correction angle θ6is calculated based on the −cosine signal Vx2and the +sine signal Vy1(S122). The pre-correction rotation angle θ6is corrected based on the phase correction value φ6, which is calculated based on the −cosine signal Vx2and the +sine signal Vy1. The rotation angle δ of the detection object87is thus calculated (S123).

If both the −cosine signal Vx2and the +sine signal Vy1are abnormal (S124: YES), the pre-correction angle θ7is calculated based on the +cosine signal Vx1and the −sine signal Vy2(S125). The pre-correction rotation angle θ7is corrected based on the phase correction value φ7, which is calculated based on the +cosine signal Vx1and the −sine signal Vy2. The rotation angle δ of the detection object87is thus calculated (S126). If both the −cosine signal Vx2and the −sine signal Vy2are abnormal (S127: YES), the pre-correction angle θ8is calculated based on the +cosine signal Vx1and the +sine signal Vy1(S128). The pre-correction rotation angle θ8is corrected based on the phase correction value φ8, which is calculated based on the +cosine signal Vx1and the +sine signal Vy1. The rotation angle δ of the detection object87is thus calculated (S129). Thus, even if the +cosine signal Vx1or the −cosine signal Vx2is abnormal, and the +sine signal Vy1or the −sine signal Vy2is abnormal, the rotation angle δ of the detection target87is calculated with high accuracy based on the pre-correction rotation angle and the phase correction value, which are calculated based on the normal signals, that is, either one of the +cosine signal and the −cosine signal and either one of the +sine signal Vy1and the −sine signal Vy2.

According to the present embodiment, the pre-correction rotation angle θ is calculated as follows assuming that the rotation angle and the phase deviation of the detection target87are δ and α, respectively.
θ=δ+45+α/2

The phase correction value φ is calculated as follows.
φ=45+α/2

Thus, by subtracting the phase correction value φ from the pre-correction rotation angle θ, the rotation angle δ of the detection object87is calculated by a simple equation. Since the phase correction value φ is a constant, it is stored in the memory circuit52in a reduced number of storage areas in comparison to a case that the phase correction value is a function.

The rotation angle detection device10is used in the electric power steering apparatus1. The rotation angle of the motor80in the electric power steering apparatus1is thus calculated with high accuracy, and hence driving of the electric power steering apparatus1is controlled accurately. Even if the output signals Vx1, Vx2, Vy1and Vy2are abnormal, the rotation angle is calculated precisely by correcting phase deviations among the output signals and driving of the power steering apparatus1is continued.

The control circuit51operates as an output signal acquisition section, a pre-correction rotation angle calculation section, a phase correction value calculation section and a correction section. The memory circuit52operates as a memory section. S11inFIG. 5and S101inFIG. 6correspond to a function of the output signal acquisition section. S104, S107, S110, S113, S116inFIG. 6and S119, S122, S125, S129inFIG. 7correspond to a function of the pre-correction rotation angle calculation section. S12inFIG. 5corresponds to the phase correction value calculation section. S105, S108, S111, S114, S117inFIG. 6and S120, S123, S126and S129inFIG. 7correspond to a function of the correction section.

(A) According to the present embodiment, if only the +cosine signal Vx1is abnormal (S106: YES), the rotation angle δ is calculated based on the pre-correction rotation angle θ1and the phase correction value φ1. However, the rotation angle δ may be calculated based on the pre-correction rotation angle θ5and the phase correction value φ5, which are calculated based on the −cosine signal Vx2and the −sine signal Vy2. Alternatively, the rotation angle δ may be calculated based on the pre-correction rotation angle θ6and the phase correction value φ6, which are calculated based on the −cosine signal Vx2and the +sine signal Vy1. Similarly, if only the −cosine signal Vx2is abnormal (S109: YES), the rotation angle δ may be calculated based on the pre-correction rotation angle θ7and the phase correction value φ7, which are calculated based on the +cosine signal Vx1and the −sine signal Vy2. Alternatively, the rotation angle δ may be calculated based on the pre-correction rotation angle θ8and the phase correction value φ8, which are calculated based on the +cosine signal Vx1and the +sine signal Vy1. That is, if either the +cosine signal or the −cosine signal is abnormal, the pre-correction rotation angle and the phase correction angle may be calculated based on two normal signals. One normal signal is the +sine signal, the −sine signal or the +sine signal and the −sine signal. The other normal signal is the normal one of the +cosine signal and the −cosine signal. The rotation angle of the detection target is calculated based on the calculated pre-correction rotation angle and the phase correction value.

If only the +sine signal Vy1is abnormal (S112: YES), the rotation angle δ may be calculated based on the pre-correction rotation angle θ5and the phase correction value φ5, which are calculated based on the −cosine signal Vx2and the −sine signal Vy2. Alternatively, the rotation angle δ may be calculated based on the pre-correction rotation angle θ7and the phase correction value φ7, which are calculated based on the +cosine signal Vx1and the −sine signal Vy2. Similarly, if only the −sine signal Vy2is abnormal (S115: YES), the rotation angle δ may be calculated based on the pre-correction rotation angle θ6and the phase correction value φ6, which are calculated based on the −cosine signal Vx2and the +sine signal Vy1. Alternatively, the rotation angle δ may be calculated based on the pre-correction rotation angle θ8and the phase correction value φ8, which are calculated based on the +cosine signal Vx1and the +sine signal Vy1. That is, if either the +sine signal or the −sine signal is abnormal, the pre-correction rotation angle and the phase correction angle may be calculated based on two normal signals. One normal signal is the +cosine signal, the −cosine signal or the +cosine signal and the −cosine signal. The other normal signal is the normal one of the +cosine signal and the −cosine signal. The rotation angle of the detection target is calculated based on the calculated pre-correction rotation angle and the phase correction value.

According to the present embodiment, if all the cosine signals and the sine signals are normal, the pre-correction rotation angle and the phase correction angle are calculated based on the cosine signal acquired by subtraction between the cosine signals and the sine signal acquired by subtraction between the sine signals. However, if all the cosine signals and the sine signals are normal, the pre-correction rotation angle and the phase correction value may be calculated by any combination of the cosine signal and the sine signal. The pre-correction rotation angle and the phase correction value may be calculated in other methods.

(B) According to the present embodiment, the phase correction value is calculated to correct the phase deviation relative to the cosine signal as the reference. However, the phase correction value may be calculated to correct the phase deviation relative to the sine signal as the reference. The output signals are not limited to the cosine signal and the sine signal, but may be a plurality of output signals which are different in phase. In this case, one output signal may be set as the reference signal and the phase correction value may be calculated to correct the phase deviation of other signals relative to the reference signal.
(C) According to the present embodiment, the amplitudes of the cosine signal and the sine signal are 1 and the offset values added to the amplifier circuit40are 2.5. However, the amplitudes and the offset values may be set to other values as far as the microcomputer50can acquire them. According to the present embodiment, the +cosine signal, the −cosine signal, the +sine signal and the −sine signal have the same amplitude. However, the amplitudes may be different among the output signals. In this instance, the amplitudes may be corrected by the control circuit51as far as the respective amplitudes are known and the pre-correction rotation angle and the phase correction value may be calculated to calculate the rotation angle of the detection target in the similar manner as the present embodiment.
(D) According to the present embodiment, the amplifier circuit40is provided. However, the output signals of the half-bridges may be inputted to the microcomputer50without the amplifier circuit40.
(E) According to the present embodiment, two bridge circuits are connected to different power sources respectively. However, both of the bridge circuits may be connected to the same power source. The output signals produced from one bridge circuit may be the +cosine signal and the −cosine signal, and the output signals produced from the other bridge circuit may be the +sine signal and the −sine signal.
(F) According to the present embodiment, two bridge circuits are provided. However, the number of the bridge circuits may be one, three or more. The number of the output signals produced from the half-bridges and inputted to the microcomputer may be other than four as far as at least two output signals of different phases are produced. A plurality of output signals may be produced from one half-bridge.
(G) According to the present embodiment, the rotation angle detection device is provided in the electric power steering apparatus. However, the rotation angle detection device may be used in other fields.

The present invention is not limited to the above-described embodiment and modifications.