Control device for motor, and electric power steering system

11005402 ยท 2021-05-11

Assignee

Inventors

Cpc classification

International classification

Abstract

A control device for a motor, comprising: a power converter for performing ON/OFF control on an upper switching element and a lower switching element in accordance with a drive command from a current controller, and thereby supplying power to a motor; a current sensor provided to the lower switching element; and a fault determining unit for determining a fault in the current sensor. When the lower switching element for each phase is OFF, the current sensor detects the current error in each phase. The fault determining unit obtains a current error determination value on the basis of the value obtained by converting, to Cartesian coordinates, the current error for each phase or the magnitude of the sum of current error vectors for each phase in which the value for the current error for each phase is held as the magnitude, and determines a fault.

Claims

1. A control device for a motor configured to control a motor, the motor including windings in m phases, where m is an integer of three or more, the control device comprising: a current control unit configured to input a current command value from an outside of the control device, and output a drive command so that a current detection value matches the current command value; a power converter, which includes an upper switching element and a lower switching element provided in correspondence to each of the phases of the motor, and is configured to control the upper switching elements and the lower switching elements to turn on and off in accordance with the drive command from the current control unit, to thereby supply electric power to the motor; a current sensor, which is connected in series to the lower switching element in each of the phases, and is configured to detect a current value in each of the phases to output the current value to the current control unit as the current detection value; and a failure determination unit configured to determine whether the current sensor has a failure, wherein, when each of the lower switching elements in at least m1 phases out of the m phases is turned off, the current sensor detects current errors in the at least m1 phases, wherein the failure determination unit is configured to calculate a current error determination value based on the current errors, and determine whether the current sensor has a failure based on the current error determination value, and wherein the current error determination value is calculated based on any one of: a magnitude of a sum of current error vectors in the respective phases each having a value of the current error in each of the phases as a magnitude; values obtained by converting the detected current errors in the respective phases to currents in an -axis and a -axis which are fixed Cartesian coordinates; and values obtained by converting the detected current errors in the respective phases to currents in a d-axis and a q-axis which are rotating Cartesian coordinates.

2. The control device for a motor according to claim 1, wherein, when each of the lower switching elements in each of the phases is turned on, the current sensor detects a current in each of the phases of the motor to output the current detection value, and wherein the control device further comprises an angle calculation unit configured to calculate an estimation value of a rotation angle of the motor based on the current detection value output from the current sensor to output the estimation value as an angle signal.

3. The control device for a motor according to claim 1, wherein the current error determination value is calculated based on the magnitude of the sum, and wherein the magnitude of the sum is calculated based on a sum of squares of the current errors in the respective phases.

4. The control device for a motor according to claim 1, wherein the current error determination value is calculated based on the magnitude of the sum, and wherein the magnitude of the sum is calculated based on a sum of squares of values each obtained by subtracting an average value of the current errors in the respective phases from the current error in each of the phases.

5. The control device for a motor according to claim 1, wherein the current error determination value is calculated based on the magnitude of the sum, and wherein the magnitude of the sum is calculated as a sum of squares of values each being a difference between the current errors in respective two phases out of the phases.

6. The control device for a motor according to claim 1, wherein the current error determination value is calculated based on a sum of squares of values of Cartesian coordinates obtained by converting the current errors in the respective phases.

7. The control device for a motor according to claim 1, wherein m is three, and the motor includes windings in three phases, and wherein the current error determination value includes any one of:
I.sub.j={square root over (i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2i.sub.ui.sub.vi.sub.vi.sub.wi.sub.wi.sub.u)}, which is a magnitude of a sum of current error vectors in the respective phases each having a value iu, iv, or iw of a current error in each of the phases as a magnitude;
I.sub.j={square root over (i.sub..sup.2+i.sub..sup.2)}, which is a value calculated from values i and i on an axis and a axis, which are said fixed Cartesian coordinates, the values i and i being obtained by converting the current errors iu, iv, and iw in the respective phases; and
I.sub.j={square root over (i.sub.d.sup.2+i.sub.q.sup.2)}, which is a value calculated from values id and iq on a d axis and a q axis, which are said rotating Cartesian coordinates, the values id and iq being obtained by converting the current errors iu, iv, and iw in the respective phases.

8. An electric power steering system, comprising: a motor configured to generate an assist force for assisting steering by a driver; and the control device for a motor of claim 1, which is configured to control the motor.

Description

BRIEF DESCRIPTION OF DRAWINGS

(1) FIG. 1 is a block diagram for illustrating a configuration of a control device for a motor according to a first embodiment of the present invention.

(2) FIG. 2 is a diagram for illustrating an example of current error vectors in respective phases and a current error resultant vector in the first embodiment of the present invention.

(3) FIG. 3 is an example of a vector diagram for illustrating current error vectors on an axis and axis, which are fixed Cartesian coordinate axes, and the current error resultant vector in the first embodiment of the present invention.

(4) FIG. 4 is a flowchart for illustrating failure determination processing to be executed by a failure determination unit in the first embodiment of the present invention.

(5) FIG. 5 is a block diagram for illustrating a configuration of a control device for a motor according to a second embodiment of the present invention.

(6) FIG. 6 is a diagram for illustrating an example of current error vectors on a d axis and a q axis, which are rotating Cartesian coordinate axes, and the current error resultant vector in the second embodiment of the present invention.

(7) FIG. 7 is a block diagram for illustrating a configuration of a control device for a motor according to a third embodiment of the present invention.

(8) FIG. 8 is a diagram for illustrating a configuration of an electric power steering system according to a fourth embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

First Embodiment

(9) FIG. 1 is a configuration diagram for illustrating a configuration of a control device for a motor according to a first embodiment of the present invention. The control device for a motor is hereinafter simply referred to as control device 2. The control device 2 is configured to control a motor 1. The motor 1 is a motor including windings in m phases (m is an integer of three or more). As the motor 1, a generally well-known motor, such as a permanent magnet synchronous motor or an induction motor, may be used. In the first embodiment, a description is given of, as an example, a case in which the motor its formed of a three-phase AC permanent magnet synchronous motor as a motor including three-phase windings U, V, and W.

(10) The control device 2 includes a current control unit 3, a power converter 4, a current sensor 5, a failure determination unit 6, and an angle calculation unit 7.

(11) The current control unit 3 includes a voltage command calculation unit 31 and a coordinate conversion unit 32.

(12) A d-axis current command id* and u q-axis current command iq* are input from the outside to the voltage command calculation unit 31. A d-axis detected current id and a q-axis detected current iq are input from the coordinate conversion unit 32 to the current command calculation unit 31. The voltage command calculation unit 31 is configured to generate a d-axis voltage command vd* and a g-axis voltage command vq* so that the d-axis current command id* and the g-axis current command iq* and the d-axis detected current id and the q-axis detected current iq match each other in respective axis components.

(13) The d-axis voltage command vd*, the q-axis voltage command vq*, and an angle signal output from the angle calculation unit 7 are input to the coordinate conversion unit 32. The coordinate conversion unit 32 is configured to apply coordinate conversion to the d-axis voltage command vd* and the q-axis voltage command vq* based on the angle signal , to thereby generate a u-phase voltage command vu*, a v-phase voltage command vv*, and a w-phase voltage command vw*. The u-phase voltage command vu*, the v-phase voltage command vv*, and the w-phase voltage command vw* are input to the power converter 4 as a drive command.

(14) Further, a U-phase detected current iu, a V-phase detected current iv, and a W-phase detected current iw, which are output from the current sensor 5, are input to the coordinate conversion unit 32. The coordinate conversion unit 32 is configured to apply coordinate conversion to the u-phase detected current iu, the v-phase detected current iv, and the w-phase detected current iw based on the angle signal , to thereby generate the d-axis detected current id and the q-axis detected current iq. The d-axis detected current id and the c-axis detected current iq are input to the voltage command calculation unit 31.

(15) A DC power supply 8 is configured to output a DC voltage Vdc to the power converter 4.

(16) The power converter 4 includes a plurality of switching elements, and a switching element drive circuit 41 configured to apply on/off control to the plurality of switching elements. The power converter 4 is configured to use the DC voltage Vdc from the DC power supply 8, and apply the on/off control to the plurality of switching elements through the switching element drive circuit 41 based on the u-phase voltage command vu*, the v-phase voltage command vv*, and the w-phase voltage command vw* from the current control unit 3, to thereby supply electric power to the motor 1. The plurality of switching elements are provided in correspondence to the respective phases of the three phases of the U phase, the V phase, and the W phase of the motor 1. The plurality of switching elements include upper switching elements UP, VP, and WP, and lower switching elements UN, VN, and WN. The upper switching elements UP, VP, and WP and the lower switching elements UN, VN, and WN are connected in series to each other in the respective phases. As each of the switching elements, a switching element formed of a semiconductor switch such as an IGET, a bipolar transistor, and a MOS power transistor and a diode inversely connected to the semiconductor switch in parallel is used.

(17) Phase current sensors CSu, CSv, and CSw for detecting the currents in the respective phases are provided in the current sensor 5. The phase current sensors CSu, CSv, and CSw are connected in series to the lower switching elements UN, VN, and WN on a low electric potential side (ground side) in the respective phases. The phase current sensors CSu, CSv, and CSw are formed of, for example, current detection resistor devices Ru, Rv, and Rw, and amplifiers, for example, operational amplifiers, provided for the respective current detection resistor devices Ru, Rv, and Rw. The phase current detection sensors CSu, CSv, and CSw are configured to acquire values obtained by using the amplifiers to amplify voltages between both ends of the current detection resistor devices Ru, Rv, and Rv, as the values of the currents in the respective phases. The phase current sensors CSu, CSv, and CSw acquires the values of the currents in the respective phases when the lower switching elements UN, UN, WN in the respective phases are each turned on, and outputs the values as the detected currents iu, iv, and iw. Further, the phase current sensors CSu, CSv, and CSw acquires the values of the currents in the respective phases when the lower switching elements UN, VN, and WN in the respective phases are each turned off, and outputs the values as current errors iu, iv, and iw in the respective phases. When the lower switching elements UN, VN, and WN in the respective phases are each turned off, the values of the currents detected by the respective phase current sensors CSu, CSv, and CSw are each theoretically supposed to be zero. Therefore, when a value other than zero is detected while the lower switching elements UN, VN, and WN in the respective phases are each turned off, the value indicates the current error contained in the value of the current detected by each of the phase current sensors CSu, CSv, and CSw. For example, when resistance values of the current detection resistor devices Ru, Rv, and Rw are not uniform due to variation caused by individual differences, or the resistance values have changed due to temperature characteristics, the current error occurs.

(18) The angle calculation unit 7 is configured to detect the rotation angle of the motor 1, and output the angle signal . The angle calculation unit 7 is formed of an angle sensor, for example, a resolver. The angle calculation unit 7 outputs the value detected by the angle sensor as the angle signal . The angle signal is input to the coordinate conversion unit 32.

(19) The failure determination unit 6 is configured to determine whether or not the current sensor 5 has a failure.

(20) A description is now given of the failure determination unit 6. The current errors iu, iv, and iw in the respective phases are input from the current sensor 5 to the failure determination unit 6. The failure determination unit 6 is configured to calculate a current error determination value Ij based on the current errors iu, iv, and iw in the respective phases, and determine whether or not the current sensor 5 has a failure based on the current error determination value Ij.

(21) A description is now given of the current error determination value Ij. Current error vectors:

(22) {right arrow over (i)}.sub.u,{right arrow over (i)}.sub.v,{right arrow over (i)}.sub.w

(23) in the respective phases having positive/negative signs and magnitudes of the current errors iu, iv, and iw the respective phases are given by Expression (13). The unit vectors:

(24) {right arrow over (u)},{right arrow over (v)},{right arrow over (w)}

(25) correspond to the U phase, V phase, and the W phase, respectively. The V phase leads the U phase by 120 degrees. The W phase lags behind the U phase by 120 degrees.

(26) { i .fwdarw. u = i u .Math. u .fwdarw. i .fwdarw. v = i v .Math. v .fwdarw. i .fwdarw. w = i w .Math. w .fwdarw. ( 13 )

(27) The current error determination value Ij is determined based on a magnitude:

(28) |{right arrow over (I)}|

(29) of a current error resultant vector:

(30) {right arrow over (I)},

(31) which is a sum of the current error vectors in the respective phases:

(32) {right arrow over (i)}.sub.u, {right arrow over (i)}.sub.v, {right arrow over (i)}.sub.w

(33) The current error resultant vector:

(34) {right arrow over (I)}

(35) is given by Expression (14). FIG. 2 is a diagram for illustrating an example of the current error vectors in the respective phases and the current error resultant vector. In FIG. 2, a case in which the current errors iu, iv, and iw in the respective phases are given by iu=, iv=, and iw=, respectively, is illustrated.
{right arrow over (I)}{right arrow over (i)}.sub.u+{right arrow over (i)}.sub.v+{right arrow over (i)}.sub.w(14)
In order to obtain the magnitude:
|{right arrow over (I)}
of the current error resultant vector:
{right arrow over (I)},
the current errors iu, iv, and iw in the respective phases are converted to currents on an axis and a axis, which are fixed Cartesian coordinate axes. FIG. 3 is an example of a vector diagram for illustrating the current error vectors on the axis and the axis, which are the fixed Cartesian coordinate axes, and the current error resultant vector. The currant error vectors on the axis and the axis:
{right arrow over (i)}.sub., {right arrow over (i)}.sub.
are obtained by applying, to the current error vectors in the respective phases:
{right arrow over (i)}.sub.u, {right arrow over (i)}.sub.v, {right arrow over (i)}.sub.w,
coordinate conversion to the axis and the axis. The current error vectors on the axis and the axis:
{right arrow over (i)}.sub., {right arrow over (i)}.sub.
are given by Expression (15) through use of unit vectors:
{right arrow over ()},{right arrow over ()}
corresponding to the axis and the axis.
In Expression (15), the current errors on the axis and the axis:
i.sub.,i.sub.
is given by Expression (16).
In Expression (16), Cab represents a conversion matrix for the coordinate conversion from the current errors iu, iv, and iw in the respective phases to current errors i and i on the axis and the axis, and is given by Expression (17).

(36) { i .fwdarw. = i .Math. .fwdarw. i .fwdarw. = i .Math. .fwdarw. ( 15 ) [ i i ] = 2 3 [ 1 - 1 2 - 1 2 0 3 2 - 3 2 ] [ i u i v i w ] = C ab [ i u i v i w ] ( 16 ) C ab = 2 3 [ 1 - 1 2 - 1 2 0 3 2 - 3 2 ] ( 17 )

(37) In this case, the current error resultant vector:

(38) {right arrow over (I)}

(39) is given by Expression (18). The magnitude:

(40) |{right arrow over (I)}

(41) of the current error resultant vector:

(42) {right arrow over (I)}

(43) is obtained by Expression (19).

(44) .fwdarw. I = i .fwdarw. + i .fwdarw. ( 18 ) .Math. I .fwdarw. .Math. = i 2 + i 2 = 2 3 .Math. ( i u - 1 2 i v - 1 2 i w ) 2 + ( 3 2 i v - 3 2 i w ) 2 = 2 3 .Math. i u 2 + i v 2 + i w 2 - i u i v - i v i w - i w i u = 2 3 .Math. I amp ( 19 )

(45) From the description given above, the current error determination value Ij is given by Expression (20), which is based on the magnitude:

(46) |{right arrow over (I)}

(47) of the current error resultant vector:

(48) {right arrow over (I)},

(49) which is the sum of the vectors in the respective phases having the current errors in the respective phases as the magnitude. In Expression (20), the current error determination value Ij is calculated based on a sum of squares:

(50) (i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2)

(51) of the current errors in the respective phases. The value given by Expression (20) is the same as Iamp, which is the element indicating the magnitude of the torque ripple given by Expression (6), and can thus be used to appropriately detect such a failure that the torque ripple is excessively large.
I.sub.j={square root over (i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2i.sub.ui.sub.vi.sub.vi.sub.wi.sub.wi.sub.u)}(20)

(52) A description is now given of an effect of the first embodiment of the present invention while the first embodiment is compared with a related-art method described in Patent Literature 1 in order to describe the effect in a plain manner. The description is given assuming that an excessive torque ripple to be determined as a failure is occurring when the current error per phase is equal to or larger than .

(53) First, in the first embodiment, the failure determination threshold value Ith is set to Ith= so that the current error determination value Ij given by Expression (20) can be used to determine that a failure exists under the condition of iu=, and iv=iw=0, which is determined as a failure by the method described in Patent Literature 1. When iu=, and iv=iw=0, the current error determination value Ij is given by Expression (21). Such a condition IjIth is thus satisfied, and a failure can be determined to exist also in the first embodiment in the same manner as in the related-art method described in Patent Literature 1.
I.sub.j={square root over (i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2i.sub.ui.sub.vi.sub.vi.sub.wi.sub.wi.sub.u)}={square root over (.sup.2)}=(21)

(54) A description is now given of the effect with a case in which iu=iv=iw= as an example. The current errors iu, iv, and iw in the respective phases are each equal to or larger than the failure determination threshold value Ith=, and the method described in Patent Literature 1 thus determines that a failure exists. Meanwhile, a failure is not determined to exist in the first embodiment. A description is now given of a reason for that. As described above, Iamp=0 in accordance with Expression (6) when the same current errors exist in the respective phases, and a torque ripple does not thus occur. Moreover, the current error determination value Ij set in Expression (20) is 0 as given by Expression (22), and hence a failure is not determined to exist. That is, in the first embodiment, a failure is not determined to exist for current errors that do not cause occurrence of a torque ripple, and the control of the motor can thus be continued.
I.sub.j={square root over (i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2i.sub.ui.sub.vi.sub.vi.sub.wi.sub.wi.sub.u)}={square root over (3.Math..sup.23.Math..sup.2)}0(22)

(55) Further, a description is now given of the effect with a case in which iu=iv=/2 iw=/2 as an example. The current errors iu, iv, and iw in the respective phases are each smaller than the failure determination threshold value Ith=, and the method described in Patent Literature 1 does not thus determine that a failure exists. Meanwhile, a failure is determined to exist in the first embodiment. A description is now given of a reason for that. Iamp is in accordance with Expression (6), and the magnitude of the torque ripple to occur is the same as the level determined so that a failure exists. Thus, an excessive torque ripple occurs. The current error determination value Ij set in Expression (20) is as given by Expression (23), and is equal to or larger than the failure determination threshold value Ith=, and a failure can thus be determined to exist. In such a manner, in the first embodiment, the determination for the failure of the current sensor 5 can appropriately be made through use of the current error determination value Ij set based on the magnitude of the torque ripple to occur.

(56) I j = i u 2 + i v 2 + i w 2 - i u i v - i v i w - i w i u = 4 .Math. ( .Math. 2 ) 2 = .Math. ( 23 )

(57) A description is now given of processing to be executed by the failure determination unit 6. FIG. 4 is a flowchart for illustrating a flow of the processing for the failure determination to be executed by the failure determination unit 6. In FIG. 4, an initial value of a failure determination counter cnt in the failure determination unit 6 is zero, and an initial state of a failure fixing flag F is OFF (F=0).

(58) In FIG. 4, first, in Step S1, it is determined whether or not the lower switching elements in x phases (x phases: U phase, V phase, and W phase) are turned off in order to acquire current errors in the respective phases. That is, it is determined whether or not all of the lower switching elements in the U phase, the V phase, and the W phase are turned off.

(59) When all of the lower switching elements in the x phases are turned off (YES in Step S1), in Step S2, the current errors Ix in the x phases are acquired from the current sensor 5, and the values of the current errors Ix in the x phases are updated. Then, the processing proceeds to Step S3.

(60) Otherwise (NO in Step S1), the processing is immediately finished.

(61) In Step S3, the current error determination value Ij is calculated, and the processing proceeds to Step S4.

(62) In Step S4, it is determined whether or not the current error determination value Ij is equal to or larger than the failure determination threshold value Ith.

(63) When the current error determination value Ij is equal to or larger than the failure determination threshold value Ith (YES in Step S4), in Step S5, the failure determination counter cnt is incremented. Then, the processing proceeds to Step S6.

(64) Meanwhile, when the current error determination value Ij is smaller than the failure determination threshold value Ith (NO in Step S4), in Step S8, the failure determination counter cnt is reset so that cnt becomes 0. Then, the processing is finished.

(65) In Step S6, it is determined whether or not the failure determination counter cnt is equal to or larger than a failure fixing threshold value Cth set in advance.

(66) When the failure determination counter cnt is equal to or larger than the failure fixing threshold value Cth (YES in Step S5), in Step S7, a failure is determined to exist, and the failure fixing flag F is set to ON (F=1).

(67) Meanwhile, when the failure determination counter cnt is smaller than the failure fixing threshold value Cth (NO in Step S6), the processing is immediately finished.

(68) The failure determination unit 6 makes the failure determination in such a manner, and transmits the failure fixing flag F obtained by the failure determination to the voltage command calculation unit 31 of the current control unit 3.

(69) In the description given above, it is determined in Step S1 of FIG. 4 whether or not all of the lower switching elements in the U phase, the V phase, and the W phase are turned off. However, the determination is not limited to this example, and it may be determined whether or not the lower switching elements in at least two phases out of the U phase, the V phase, and the W phase are turned off. That is, when the motor 1 has m phases, it may be determined whether or not the lower switching elements in at least m1 phases out of the m phases are turned off.

(70) The current control unit 3 stops the control of the motor 1 in response to the state in which the failure fixing flag F has become ON (F=1). As a result, the operation of the motor 1 is stopped. Alternatively, when the control is desired to be continued without stopping the control of the motor 1, the control method may be changed from the normal control method to a backup control method. It is assumed that the backup control method is a control method without using the detected currents iu, iv, and iw in the respective phases, in an example of the backup control method, for example, the current control unit 3 obtains estimated current idest and igest given by Expression (24), based on the d-axis voltage command vd* and the q-axis voltage command vq* in place of the d-axis detected current id and the q-axis detected current iq calculated from the detected currents iu, iv, and iw in the respective phases, and uses the estimated currents idest and iqest to execute the current control. In Expression (24), represents a speed obtained by differentiating the angle signal , represents a magnetic flux, R represents a resistance value, L represents an inductance, and s represents a differential operator.

(71) [ i dest i qest ] = [ R + L .Math. s - .Math. L .Math. L R + L .Math. s ] - 1 [ v d * v q * - .Math. ] ( 24 )

(72) In such a manner, in the first embodiment, when the failure determination unit 6 determines that the current sensor 5 has a failure, an abnormal behavior of the motor 1 is prevented by stopping the control of the motor 1, or changing the control method therefor.

(73) As described above, the control device 2 according to the first embodiment includes the current control unit 3 configured to generate the drive command based on a current command value input from the outside, the power converter 4 configured to control the upper switching elements and the lower switching elements to turn on and off in accordance with the drive command from the current control unit 3, to thereby supply the electric power to the motor 1, the current sensor 5 arranged in series to the lower switching elements in the respective phases, and the failure determination unit 6 configured to determine whether or not the current sensor 5 has a failure. Moreover, the motor 1 has the windings in the m phases.

(74) The current sensor 5 is configured to detect the currents in the respective phases, and detect the current errors iu, iv, and iw in the respective phases when at least m1 lower switching elements in the phases are each turned off. The failure determination unit 6 is configured to calculate the current error determination value Ij based on the current errors iu, iv, and iw in the respective phases, and determine whether or not the current sensor 5 has a failure based on the current error determination value Ij. The current error determination value Ij is calculated based on the magnitude of the sum of the current error vectors in the respective phases having the current errors iu, iv, and iw in the respective phases as the magnitudes thereof, or the values of Cartesian coordinates obtained by converting the current errors iu, iv, and iw in the respective phases. In the first embodiment, as given by Expression (20), the current error determination value Ij is calculated based on the sum of the squares of the current errors in the respective phases as the magnitude of the sum of the current error vectors in the respective phases having the current errors iu, iv, and iw in the respective phases as the magnitudes thereof.

(75) With this configuration, when the lower (low electric potential side) switching elements in the respective phases are each turned off, the detected values of the currents are theoretically zero, and hence the values of the current errors iu, iv, and iw can be acquired by acquiring the values detected when the switching elements are turned off. Through use of the magnitude of the sum of the current error vectors in the respective phases having the current errors iu, iv, and iw in the respective phases as the magnitudes thereof, or the values on the axis and the axis obtained by converting the current errors in the respective phases, which are the fixed Cartesian coordinates, to determine whether or not the current sensor 5 has a failure, the magnitude of the torque ripple is evaluated to be able to determine the absence/presence of a failure. As a result, for values of the current errors iu, iv, and iw that do not cause a torque ripple, the control can be continued through use of the normal control method without stopping the control of the motor 1, or changing the control method therefor. Meanwhile, for the current errors iu, iv, and iw that cause an excessive torque ripple, the current sensor 5 is determined to have a failure, to thereby be able to stop the control of the motor 1, or change the control method from the normal control method to the backup control method. In such a manner, in the first embodiment, the determination of the absence/presence of the failure of the current sensor 5 can appropriately be made, and the motor 1 can thus stably be controlled without an occurrence of an excessive torque ripple.

(76) Even when the lower switching elements UN, VN, and WN are turned off, the values of the currents detected in the respective phases may not be zero due to regeneration by the motor 1 depending on the configurations of the motor 1 and the power converter 4 and an operation state of the motor 1, and consequently the current errors iu, iv, and iw in the respective phases cannot accurately be acquired. This is a case in which the upper switching elements UP, VP and WP in the respective phases are turned off and the lower switching elements UN, VN, and WN corresponding to the upper phases, in which the upper switching elements are turned off, are turned off. For example, this case includes a case in which the upper switching element UP and the lower switching element UN in the U phase are turned off. In the case of a configuration susceptible to the influence of the regeneration, the current errors iu, iv, and iw in the respective phases can more precisely be acquired by adding a condition corresponding to a state in which the rotation speed of the motor 1 is low as the condition for updating the current errors iu, iv, and iw in the respective phases. Moreover, the current errors iu, iv, and iw in the respective phases may be updated only when the upper switching elements UP, VP and WP in the respective phases are turned on and the lower switching elements UN, VN, and WN corresponding to the upper phases, in which the upper switching elements are turned on, are turned off. In such a case, specifically, for example, the current error in the U phase is updated only when the upper switching element UP in the U phase is turned on and the lower switching element UN in the U phase is turned off.

(77) The current error determination value Ij may be set based on the converted values on the axis and the axis, which are the fixed Cartesian coordinate axes. In Expression (19), when the magnitude:

(78) |{right arrow over (I)}| of the current error resultant vector:

(79) {right arrow over (I)}

(80) is obtained, the current error determination value Ij is calculated through use of Expression (25) based on, as intermediate variables, the converted values I and I on the axis and the axis, which are the fixed orthogonal coordinate axes, and the failure can thus be determined through use of a value similarly indicating the magnitude of the torque ripple. In this case, similar determination can be made by setting the failure determination threshold value Ith to Ith=(()), and determining that a failure exists when the current error determination value Ij is equal to or larger than the failure determination threshold value Ith.
I.sub.j={square root over (i.sub..sup.2+i.sub..sup.2)}(25)

(81) In such a manner, whether or not a failure exists is determined through use of the current error determination value Ij calculated based on the sum of the squares of the current errors converted to the orthogonal coordinates, to thereby be able to determine that a failure exists by evaluating the magnitude of the torque ripple. As a result, for values of the current errors that do not cause a torque ripple, the control of the motor 1 can be continued without stopping the control or changing the control method therefor. Meanwhile, for the current errors that cause an excessive torque ripple, the current sensor 5 can be determined to have a failure, to thereby be able to stop the control of the motor 1 or change the control method therefor. In such a manner, in the first embodiment, the determination of the failure of the current sensor 5 can appropriately be made, and the motor 1 can thus stably be controlled without occurrence of an excessive torque ripple.

(82) Moreover, as given by Expression (26) and Expression (27), values obtained without calculating the square root can be used as the current error determination value Ij for the sake of simpler calculation. In this case, it may be determined that a failure exists when the current error determination value Ij is equal to or larger than a value (=Ith.sup.2) obtained by squaring the failure determination threshold value Ith in the case of including the calculation of the square root.
I.sub.j=i.sub.u.sup.2+i.sub.v.sup.2+i.sub.w.sup.2i.sub.ui.sub.vi.sub.vi.sub.wi.sub.wi.sub.u(26)
I.sub.j=i.sub..sup.2+i.sub..sup.2(27)

(83) In the first embodiment, the current error determination value Ij is set based on the magnitude:

(84) |{right arrow over (I)}|

(85) the current error resultant vector:

(86) {right arrow over (I)},

(87) which is the sum of the vectors in the respective phases having the current errors in the respective phases as the magnitudes thereof. However, the magnitude:

(88) |{right arrow over (I)}|

(89) of the current error resultant vector:

(90) {right arrow over (I)}

(91) may be calculated based on a sum of squares of values obtained by subtracting an average value iavg of the current errors in the respective phases from each of the current errors iu, iv, and iw in the respective phases. The average value iavg is obtained as below.
i avg=(iu+iv+iw)/3(28)

(92) Thus, the square root of the sum of the squares of the values obtained by subtracting the average value iavg from the current errors in the respective phases is obtained through use of Expression (29). In Expression (29), Iamp represents a value indicating the magnitude of the torque ripple, and appropriate failure detection can thus be achieved in the same manner as described above also with this method. In this case, it is only required that the failure determination threshold value Ith be set to Ith=(()).

(93) I j = ( i u - i avg ) 2 + ( i v - i avg ) 2 + ( i w - i avg ) 2 = ( i u - i u + i v + i w 3 ) 2 + ( i v - i u + i v + i w 3 ) 2 + ( i w - i u + i v + i w 3 ) 2 = 2 3 .Math. i u 2 + i v 2 + i w 2 - i u i v - i v i w - i w i u = 2 3 .Math. I amp ( 29 )

(94) In such a manner, the magnitude of the torque ripple can be evaluated to be able to determine whether or not a failure exists by calculating the sum of the squares of the values obtained by subtracting the average value from each of the current errors in the respective phases as the magnitude of the current error resultant vector, which is the sum of the current error vectors in the respective phases. As a result, the failure of the current sensor 5 can appropriately be determined, and the motor can thus stably be controlled without occurrence of an excessive torque ripple.

(95) Moreover, the current error determination value Ij is set so as to be based on the magnitude:

(96) |{right arrow over (I)}|

(97) of the current error resultant vector:

(98) {right arrow over (I)},

(99) which is the sum of the vectors in the respective phases having the current errors in the respective phases as the magnitudes thereof. However, the magnitude:

(100) |{right arrow over (I)}|

(101) of the current error resultant vector:

(102) {right arrow over (I)}

(103) may be calculated based on a sum of squares of differences between the current errors in respective two phases out of the respective phases. A square root of the sum of the squares of the differences between the current errors in the respective two phases out of the respective phases is given by Expression (30). In Expression (30), Iamp represents a value indicating the magnitude of the torque ripple, and appropriate failure detection can thus be achieved in the same manner as described above also with this method. In this case, it is only required that the failure determination threshold value ith be set to Ith=(2).

(104) I j = ( i u - i v ) 2 + ( i v - i w ) 2 + ( i w - i u ) 2 = 2 .Math. i u 2 + i v 2 + i w 2 - i u i v - i v i w - i w i u = 2 .Math. I amp ( 30 )

(105) In such a manner, the magnitude of the torque ripple can be evaluated to be able to determine whether or not a failure exists by calculating, based on the sum of the squares of differences between the current errors in the two phases, the magnitude of the current error resultant vector, which is the sum of the current error vectors in the respective phases. As a result, the failure can appropriately be determined, and the motor can thus stably be controlled without occurrence of an excessive torque ripple.

(106) As described above, the magnitude of the torque ripple can be evaluated to be able to determine whether or not the current sensor 5 has a failure by obtaining the current error determination value Ij through use of any one of Expressions (20), (25), (26) (27), (29), and (30) described in the first embodiment. As a result, a failure can appropriately be determined, and the motor 1 can thus stably be controlled without occurrence of an excessive torque ripple.

Second Embodiment

(107) FIG. 5 is a block diagram for illustrating a configuration of a control device for a motor according to a second embodiment of the present invention. A difference between the second embodiment and the first embodiment is only a configuration of the failure determination unit 6. The other configurations and operations are the same as those of the first embodiment, and a description thereof is omitted herein.

(108) Specifically, in the second embodiment, the failure determination unit 6 is different from the first embodiment in that the failure determination unit 6 is configured to convert the current errors in the respective phases to values on the d axis and the q axis, which are the rotating Cartesian coordinate axes. In the first embodiment, only the current errors in the respective phases from the current sensor 5 are input to the failure determination unit 6. However, in the second embodiment, as illustrated in FIG. 5, in addition to the current errors in the respective phases from the current sensor 5, the angle signal from the angle calculation unit 7 is input to the failure determination unit 6.

(109) The failure determination unit 6 obtains a d-axis current error id and a q-axis current error iq by applying coordinate conversion based on the angle signal to the current errors iu, iv, and iw in the respective phases through use of Expression (5), for example, and calculates the current error determination value Ij based on the d-axis current error id and the q-axis current error iq. Thus, a flow of processing to be executed by the failure determination unit 6 is basically the same as that of FIG. 4, but the calculation method described in Step S3 and the value of the failure determination threshold value Ith in Step S4 are different from those in the first embodiment.

(110) Also in the second embodiment, the angle calculation unit 7 is formed of an angle sensor, for example, a resolver. The angle calculation unit 7 outputs the value of the rotation angle of the motor 1 detected by the angle sensor as the angle signal . However, the configuration is not limited to this example, and the angle calculation unit 7 may calculate an estimation value of the rotation angle, and the failure determination unit 6 may use the estimation value of the rotation angle.

(111) Current error vectors:

(112) {right arrow over (i)}.sub.d, {right arrow over (i)}.sub.q

(113) on the d axis and the q axis are obtained by applying the coordinate conversion of converting the current error vectors in the respective phases:

(114) {right arrow over (i)}.sub.u, {right arrow over (i)}.sub.v, {right arrow over (i)}.sub.w

(115) based on the angle signal to the current error vectors on the d axis and the q axis. The current error vectors on the d axis and the q axis:

(116) {right arrow over (i)}.sub.d, {right arrow over (i)}.sub.q

(117) can be given by Expression (31) through use of unit vectors corresponding to the d axis and the q axis:

(118) {right arrow over (d)},{right arrow over (q)}

(119) 0 { i .fwdarw. d = i d .Math. d .fwdarw. i .fwdarw. q = i q .Math. q .fwdarw. ( 31 )

(120) FIG. 6 is a diagram for illustrating an example of the current error vectors on the d axis and the q axis, which are the rotating Cartesian coordinate axes, and a current error resultant vector in the second embodiment. The magnitude:

(121) |{right arrow over (I)}|

(122) of the current error resultant vector:

(123) {right arrow over (I)},

(124) which is the sum of the vectors in the respective phases having the current errors in the respective phases as the magnitudes thereof can be obtained also based on the d-axis current error id and the q-axis current error iq obtained through use of the coordinate conversion. Therefore, the current error determination value Ij is calculated as given by Expression (32) based on the d-axis current error id and the q-axis current error iq obtained through use of the coordinate conversion. In this case, it is only required to set the failure determination threshold value Ith to (Ith=(()), and determine that a failure exists when the current error determination value Ij is equal to or larger than the failure determination threshold value Ith. Also in Expression (32), Iamp represents a value indicating the magnitude of the torque ripple, and hence appropriate failure determination can be made also with this method similarly to the first embodiment.

(125) I j = i d 2 + i q 2 = 2 3 I amp ( 32 )

(126) The values of id and iq change depending on the angle signal as given by Expression (5). The current error determination value Ij given by Expression (32) can be considered as being independent of the angle signal through use of the relationship of (sin ).sup.2+(cos ).sup.2=1. That is, such an effect is obtained that a failure can be determined independently of the angle signal through the determination using the current error determination value Ij given by Expression (32) based on the d-axis current error id and the q-axis current error Iq.

(127) Moreover, in order to simplify the calculation, a current error determination value Ij obtained without the calculation of the square root may be used as given by Expression (33). In such a case, it is only required to determine that a failure exists when the current error determination value Ij is equal to or larger than a square (=Ith.sup.2) of the error determination threshold value Ith.
I.sub.j=i.sub.d.sup.2+i.sub.q.sup.2(33)

(128) Moreover, the d-axis current error id and the q-axis current error iq may be set to current error determination values Ijd and Ijq, respectively, to thereby be able to determine whether or not a failure exists. In such a case, for example, the number of times for which any one of the current error determination values Ijd and Ijq has become larger than the failure determination threshold value Ith is counted for a certain period t set in advance, and the counted number is set as the failure determination counter cnt. Then, it is determined whether or not the failure determination counter cnt is equal to or larger than the failure fixing threshold value Cth. When the failure determination counter cnt is equal to or larger than the failure fixing threshold value Cth, the current sensor 5 is determined to have a failure. At this time, the current error determination values Ijd and Ijq change depending on the angle signal , and hence it can be determined whether or not a failure exists through such setting that the counter cnt is not reset for the certain period t.

(129) Moreover, failure determination counters cntd and cntq corresponding to the current error determination values Ijd and Ijq, respectively, may be used in place of the failure determination counter cnt. The number of times for which the current error determination value Ijd has become larger than the failure determination threshold value Ith is counted for the certain period t set in advance, and it is determined whether or not the failure determination counter cntd is equal to or larger than the failure fixing threshold value Cth. Similarly, the number of times for which the current error determination value Ijq has become larger than the failure determination threshold value Ith is counted for the certain period t set in advance, and it is determined whether or not the failure determination counter cntq is equal to or larger than the failure fixing threshold value Cth. Then, when the failure determination counter cntd or the failure determination counter cntq is equal to or larger than the failure fixing threshold value Cth, the current sensor 5 is determined to have a failure. Also in this case, it can be determined whether or not the current sensor 5 has a failure through such setting that the failure determination counters cntd and cntq are not reset for the certain period t.

(130) Whether or not a failure exists is determined in accordance with the magnitudes of the converted values on the d axis and the q axis, which are the rotating Cartesian coordinate axes, to thereby able to evaluate the magnitude of the torque ripple to determine whether or not a failure exists. As a result, for values of the current errors that do not cause a torque ripple, the control of the motor can be continued without stopping the control or changing the control method therefor. Meanwhile, for the current errors that cause an excessive torque ripple, the current sensor 5 can be determined to have a failure, to thereby be able to stop the control of the motor 1 or change the control method therefor. In such a manner, in the second embodiment, the determination of the failure of the current sensor 5 can appropriately be made, and the motor 1 can thus stably be controlled without occurrence of an excessive torque ripple.

Third Embodiment

(131) FIG. 7 is a block diagram for illustrating a configuration of a control device for a motor according to a third embodiment of the present invention. A difference between the third embodiment and the second embodiment is only that an angle calculation unit 7A is provided in place of the angle calculation unit 7 in the third embodiment. The other configurations and operations are the same as those of the second embodiment, and a description thereof is thus omitted herein.

(132) In the third embodiment, the angle calculation unit 7A is configured to calculate the angle signal based on the detected currents in the respective phases detected by the current sensor 5. That is, the angle calculation unit 7 is configured not to detect the rotation angle of the motor 1, but to calculate an estimation value of the rotation angle of the motor 1 to output the estimation value as the angle signal . A calculation method for the angle signal is only required to be a method based on the detected currents in the respective phases detected by the current sensor 5, and is not particularly limited. As an example, a description is given of a configuration that uses an induced voltage for the estimation as described in Patent Literature 3.

(133) First, as described above, the current sensor 5 acquires the currents in the respective phases of the motor 1 when the lower switching elements UN, VN, and WN in the respective phases are each turned on, and outputs the detected currents iu, iv, and iw. The detected currents iu, iv, and iw are input to the coordinate conversion unit 32.

(134) The calculation method described in Patent Literature 3 uses a fact that an induced voltage of the motor 1 is proportional to the rotation speed of the electric motor 1, namely, a derivative of the rotation angle. First, the coordinate conversion unit 32 calculates the d-axis detected current id and the q-axis detected current iq from the d-axis voltage command vd*, the q-axis voltage command vq*, and the detected currents iu, iv, and iw in the respective phases based on the angle signal . The angle calculation unit 7A inputs the d-axis detected current id and the q-axis detected current iq, and forms an observer given by Expressions (34) to (38), to thereby calculate an estimated speed . In Expressions (34) to (38), kp, ki, g11, g12, g21, g22, g31, g32, g41, and g42 represent feedback gains for calculating the estimated speed . The angle signal is calculated by integrating the estimated speed through use of Expression (39).

(135) = wr 0 - e 0 4 pdr 0 ( 34 ) wr 0 = ( kp + ki s ) ( eq .Math. pdr 0 ) ( 35 ) d dt ( id 0 iq 0 pdr 0 ) = ( - R Ld Lq Ld 0 - Ld Lq - R Lq - wr 0 Lq 0 0 0 ) ( id 0 iq 0 pdr 0 ) + ( 1 Ld 0 0 1 Lq 0 0 ) ( vd * vq * ) - ( e 01 e 02 e 03 ) ( 36 ) ( e 01 e 02 e 03 e 04 ) = ( g 11 g 12 g 21 g 22 g 31 g 32 g 41 g 42 ) ( ed eq ) ( 37 ) ( ed eq ) = ( id 0 - id iq 0 - iq ) ( 38 ) = dt ( 39 )

(136) The angle signal is calculated based on the d-axis detected current id and the q-axis detected current ig calculated from the detected currents iu, iv, and iw in the respective phases, and the angle signal thus contains an estimation error due to the current errors contained in the detected currents in the respective phases. In particular, when a magnitude of the estimation error of the angle signal exceeds 90 deg, a torque is generated toward an opposite direction.

(137) Therefore, it is required to estimate, in advance, a permissible range of the current error so that the estimation error of the angle signal is equal to or less than 90 deg, and determine that a failure exists when the estimation error exceeds the permissible range of the current error, to thereby stop the control of the motor or change the control method therefor.

(138) Moreover, even when the estimation error of the angle signal is equal to or less than 90 deg, a torque ripple occurs due to a change in the estimation error of the angle signal caused by changes in the current errors id and iq on the d axis and q axis. The current errors id and iq on the d axis and q axis change depending on the angle signal as given by Expression (5). Meanwhile, the angle signal is calculated from the d-axis detected current id and the q-axis detected current iq, and the estimation error of the angle signal thus changes depending on the current errors id and iq on the d axis and q axis.

(139) The voltage command calculation unit 31 executes the current control so that the current commands id* and iq* and the detected currents id and iq on the d axis and q axis match each other, respectively. However, currents ide and iqe on the rotating Cartesian coordinate axes dependent on the actual rotation angle are given by Expression (40). The torque generated by the motor 1 is determined by the currents ide and iqe on the rotating Cartesian coordinate axes dependent on the actual rotation angle , and a torque ripple thus occurs when the estimation error in the angle signal changes. Therefore, when an excessive torque ripple occurs, it is required to determine that the motor 1 has a failure, to thereby stop the control of the motor 1 or change the control method therefor.

(140) [ i de i qe ] = [ cos sin - sin cos ] [ i d i q ] ( 40 )

(141) The failure determination unit 6 converts the current errors iu, iv, and iw in the respective phases to the current errors id and iq on the d axis and the q axis, which are the rotating Cartesian coordinate axes, based on the angle signal , and determines whether or not a failure exists based on the current error determination value Ij calculated through use of Expression (32).

(142) The values of id and iq change depending on the angle signal similarly to Expression (5). The current error determination value Ij given by Expression (32) can be considered as being independent of the angle signal through use of the relationship of (sin ).sup.2+(cos ).sup.2=1. That is, such an effect is obtained that a failure can be determined independently of the angle signal through the determination using the current error determination value Ij given by Expression (32) based on the d-axis current error id and the q-axis current error iq.

(143) Moreover, the d-axis current error id and the q-axis current error iq may be set to current error determination values Ijd and Ijq, respectively, to thereby be able to determine whether or not a failure exists. In such a case, for example, the number of times for which any one of the current error determination values Ijd and Ijq has become larger than the failure determination threshold value Ith is counted for a certain period t set in advance. Then, it is determined whether or not the failure determination counter cnt is equal to or larger than the failure fixing threshold value Cth. When the failure determination counter cnt is equal to or larger than the failure fixing threshold value Cth, the current sensor 5 is determined to have a failure. At this time, the current error determination values Ijd and Ijq change depending on the angle signal , and hence it can be determined whether or not a failure exists in the current sensor 5 through such setting that the counter cnt is not reset for the certain period t.

(144) Moreover, failure determination counters cntd and cntq corresponding to the current error determination values Ijd and Ijq, respectively, may be used in place of the failure determination counter cnt. The number of times for which the current error determination value Ijd has become larger than the failure determination threshold value ith is counted for the certain period t set in advance, and it is determined whether or not the failure determination counter cntd is equal to or larger than the failure fixing threshold value Cth. Similarly, the number of times for which the current error determination value Ijq is larger than the failure determination threshold value ith is counted for the certain period t set in advance, and it is determined whether or not the failure determination counter cntq is equal to or larger than the failure fixing threshold value Cth. Then, when the failure determination counter cntd or the failure determination counter cntq is equal to or larger than the failure fixing threshold value Cth, the current sensor 5 is determined to have a failure. Also in this case, it can be determined whether or not the current sensor 5 has a failure through such setting that the failure determination counters cntd and cntq are not reset for the certain period t.

(145) In the description given above, the current error determination value Ij is determined based on the current errors id and iq on the d axis and q axis through use of Expression (32). This is because the angle signal is calculated based on the d-axis detected current id and the q-axis detected current iq, and the current errors can thus be determined in consideration of the influence on the angle signal . However, similar determination can be made without using the current errors id and iq on the d axis and q axis. Irrespective of which of the magnitude of the vector calculated through use of Expression (20) and the magnitude of the vector calculated through use of Expression (25) is used, only the coordinate systems to be used for the calculation are different from each other between those cases, and the same value can be consequently obtained. Thus, the failure of the current sensor 5 can similarly be determined.

(146) With the above-mentioned configuration, the control of the motor can be continued without stopping the control or changing the control method therefor for the values of the current errors that do not cause a torque ripple by evaluating the magnitude of the torque ripple to determine whether or not a failure exists. Meanwhile, for current errors that cause an excessive torque ripple, the current sensor is determined to have a failure, to thereby be able to stop the control of the motor 1 or change the control method therefor. As described above, the third embodiment is also effective for the torque ripple caused by the estimation error in the angle signal, and can thus appropriately determine a failure in the current sensor 5 for the current errors that cause an excessive torque ripple. Therefore, the motor 1 can stably be controlled without the occurrence of an excessive torque ripple.

(147) In the third embodiment, the rotation angle of the motor 1 is estimated based on the d-axis detected current and the q-axis detected current, but the rotation angle may be estimated based on an -axis current and a -axis current. In such a case, it is only required that whether or not a failure exists be determined based on the current error determination value Ij obtained through use of Expression (25).

(148) Irrespective of which of the magnitude of the vector calculated based on the current errors in the respective phases through use of Expression (20) and the magnitude of the vector calculated based on the d-axis current error and the q-axis current error through use of Expression (32) is used, only the coordinate systems to be used for the calculation are different from each other between those cases, and the similar values, namely, the values indicating the magnitude of the torque ripple, can consequently be obtained.

Fourth Embodiment

(149) A fourth embodiment of the present invention relates to an electric power steering system including the control device for a motor described in any one of the first embodiment to the third embodiment. The configuration of the electric power steering system is illustrated in FIG. 8. In FIG. 8, in the electric power steering system, a steering wheel 101, a steering shaft 103, a rack-and-pinion gear 105, wheels 104, a motor 1, a control device 2, and a torque sensor 102 are provided. The motor 1 is configured to assist steering by the driver. The control device 2 is configured to control the motor 1. The torque sensor 102 is configured to detect a steering torque of the driver. In FIG. 8, the motor 1 and the control device 2 correspond to the motor 1 and the control device 2, respectively, in the first embodiment to the third embodiment. In this embodiment, the control device 2 is formed of, for example, an electronic control unit (ECU).

(150) In FIG. 8, the steering torque applied from a driver (not shown) to the steering wheel 101 is transmitted to a rack through a torsion bar of the torque sensor 102, the steering shaft 103, and the rack-and-pinion gear 105, to thereby steer the wheels 104.

(151) The motor 1 generates an assist force as output through use of the electric power supplied from the power converter 4 provided in the control device 2. The assist force is transmitted to the steering shaft 103, to thereby reduce the steering torque applied by the driver during the steering.

(152) With the above-mentioned configuration, also in the fourth embodiment, as in the first embodiment to the third embodiment, the current sensor 5 is not determined to have a failure for current errors that do not cause an excessive torque ripple, and the control of the motor 1 can thus be continued. Therefore, the assist by the motor 1 can be continuously provided, and the steering by the driver is eased. Moreover, the current sensor 5 can be determined to have a failure for current errors that cause an excessive torque ripple, and a sense of discomfort caused by the excessive torque ripple can be eliminated by stopping the control of the motor 1 or switching the control method to another control method.

(153) As described above, the electric power steering system according to the fourth embodiment includes the motor 1 configured to generate the assist force for assisting the steering by the driver, and the control device 2 configured to control the motor 1 according to any one of the first embodiment to the third embodiment. Therefore, as in the first embodiment to the third embodiment, it can be determined whether or not a failure exists by evaluating the magnitude of the torque ripple, and such a determination that a failure exists can thus appropriately be made for current errors that cause an excessive torque ripple. Further, it is not determined that a failure exists for current errors that do not cause an excessive torque ripple, and the control of the motor can thus be continued. Therefore, the assist by the motor can be continuously provided, and the steering by the driver is eased. Moreover, it can be determined that a failure exists for current errors that cause an excessive torque ripple, and a sense of discomfort caused by the excessive torque ripple can be eliminated by stopping the control of the motor or switching the control method to another control method.

(154) Moreover, the first embodiment to the fourth embodiment may be changed as described below.

(155) The current sensor 5 in the first embodiment to the fourth embodiment described above is configured to detect the U-phase detected current iu, the V-phase detected current iv, and the W-phase detected current iw as the currents flowing in the respective phases of the motor 1. Herein, the currents in the three phases are detected, but the currents in a part of the phases may not be detected, and may be estimated only from the currents in the detected phases. For example, the current in the W phase is calculated from the U-phase detected current iu and the V-phase detected current iv based on the Kirchhoff'circuit law through use of Expression (41).
iw=iuiv(41)

(156) In this case, the current error iw in the W phase is given by Expression (42). It is only required that the current error determination value Ij be calculated based on the U-phase current error iu and the V-phase current error iw acquired from the current sensor 5, and on the current error iw obtained through use of Expression (42), to determine whether or not the current sensor 5 has a failure. Also in this case, for current errors that cause an excessive torque ripple, whether or not the current sensor 5 has a failure can appropriately be determined based on the current errors in the respective phases.
iw=iuiv(42)

(157) In the first embodiment to the fourth embodiment, for the sake of simple description, the motor 1 having the windings in the three phases is described, but as long as the phases is equal to or larger than three, the sum of the vectors having the magnitude of the current errors in the respective phases can be obtained. Therefore, whether or not a failure exists can appropriately be determined for current errors that cause an excessive torque ripple by applying the first embodiment to the third embodiment of the present invention also to a motor in m phases, which are four phases or twelve phases, for example, as the electric motor 1. In this case, m is any integer of three or more. Moreover, when current errors in the respective phases detected from at least m1 phase current sensors out of the m phases are available, a current error in the remaining one phase is calculated, to thereby be able to obtain the current error determination value. Thus, in the processing in Step S1 of FIG. 4, it is only required to determine whether or not at least m1 lower switching elements in the respective phases are turned off.

(158) The failure determination described in the first embodiment to the fourth embodiment of the present invention can be applied not only to the determination for the failure of the current sensor 5 but also to the determination for a failure of the power converter 4. For example, the respective switching elements are controlled to be turned on and off by the switching element drive circuit 41 included in the power converter 4. With this configuration, when the respective switching elements are not normally controlled to be turned on and off in accordance with an instruction of the switching element drive circuit 41, the current errors in the respective phases acquired when the lower switching elements are turned off are not zero, and hence whether or not the power converter 4 has a failure can be determined based on the current errors in the respective phases.

REFERENCE SIGNS LIST

(159) 1 motor, 2 control device, 3 current control unit, 4 power converter, 5 current sensor, 6 failure determination unit, 7, 7A angle calculation unit, 8 DC power supply, 31 voltage command calculation unit, 32 coordinate conversion unit, 41 switching element drive circuit, 101 steering wheel, 102 torque sensor, 103 steering shaft, 104 wheel, 105 rack-and-pinion gear