Abstract: Provided are a motor control device and an electrical power steering device which are configured to perform a correction for advancing an estimated motor electrical angle in response to a steering torque, and are thus capable of correcting an estimated angle error, acting in a delaying direction with respect to the steering direction, with a simple configuration. This motor control device (25) is provided with a backup electrical angle detection circuit (24B), wherein: an inter-sensor error correction unit (54) calculates at least one advance gain (Gad) with respect to an input of a steering torque (Th) of at least predetermined torque value (Tht), and multiplies the advance gain (Gad) to an output shaft angular velocity (?os) to calculate a post-advance steering angular velocity (?osc) for correcting an estimated angle error in a delaying direction with respect to the steering direction. In addition, an estimated angle calculation unit (55) of the backup electrical angle detection circuit (24B) integrates the post-advance steering angular velocity (?osc) and calculates a second motor rotation angle (?m2), which is an estimated value of a motor rotation angle (?), on the basis of the integrated value.
- 2 - DESCRIPTION MOTOR CONTROL DEVICE AND ELECTRIC POWER STEERING DEVICE INCLUDING THE SAME 5 Technical Field [0001] The present invention relates to a motor control device configured to drive control an electric motor mounted in an 10 electric power steering device. Background Art [0002] Conventionally, as backup technologies for when a motor 15 position sensor has broken down that detects a motor electrical angle of an electric motor mounted in an electric power steering device, for example, there are technologies disclosed by PTL 1 to 2. In the technology of PTL 1, an electric power steering 20 device includes a steering angle sensor mounted on a column output shaft side, in which an estimated angle calculated from counter electromotive force information of an electric motor that generates a steering assist force and an estimated angle calculated from detection information of the steering angle 25 sensor are used by being switched in accordance with steering velocity. [0003] - 3 - Here, usually, in an electric power steering device, a steering shaft is connected to an electric motor via a reduction gear. Thus, between output shaft steering angle information and motor electrical angle, there are error 5 factor characteristics, such as mechanical compliance characteristics (such as backlash, nonlinear elasticity characteristics, and elastic deformation) of gears and the like and detection error characteristic of a steering angle sensor. Additionally, in the structure with the interposed 10 reduction gear, when estimating a motor electrical angle is estimated using the output shaft steering angle information, influence due to an error of the steering angle sensor is multiplied by gear ratio, and therefore appears as a large motor angle calculation error. In addition, influence of an 15 error due to an error factor such as the reduction gear or the steering angle sensor tends to more significantly appear in handling feeling, as the steering torque becomes larger. In other words, in the conventional technology of PTL 1 described above, when a steering situation and an 20 environmental situation occur in which an angle error due to the error factor appears, an error may occur in the estimated angle calculated from the output shaft steering angle, which may consequently cause behavior such as the loss of synchronism or the shortage of assist due to reduced torque 25 generation efficiency. [0004] Additionally, the technology of PTL 2 utilizes a correlation between the mechanical compliance - 4 - characteristics and motor output torque, and when the motor position sensor is normal, learns a relationship between output torque-related information and an error characteristic between an estimated electrical angle 5 obtained from the output shaft steering angle and an actual electrical angle. Then, when the motor position sensor becomes abnormal, the estimated angle is corrected by the error characteristic obtained from the output torque-related information, and the corrected estimated angle is used as an 10 estimated electrical angle. Citation List Patent Literature [0005] 15 PTL 1: JP 2016-96608 A PTL 2: JP Pat. No. 6183424 Summary of Invention Technical Problem 20 [0006] It is possible for the conventional technology of PTL 2 described above to eliminate the influence of an angle error due to the error factor. However, learning of error characteristics often requires much memory and a complicated 25 leaning method. Besides, when considering a self-evaluation method for validity on learning results, there is a concern about the complication of an achievement method. - 5 - Here, as mentioned above, the mechanical compliance characteristics are mainly backlash, nonlinear elasticity characteristics, and elastic deformation, which can be approximately seen as hysteresis plus spring characteristics. 5 Thus, seen from input/output characteristics, it is physically obvious that output with respect to input can be approximated as delay characteristics. In other words, when motor angle is an input and steering angle is an output, influence due to the mechanical compliance characteristics 10 can be considered to always cause an error of the delay side. The present invention has been made in view of the above problem. It is an object of the present invention to provide a motor control device that is configured to perform correction of advancing an estimated angle in response to a 15 steering torque, and thereby capable of correcting an estimated angle error that acts in a direction delayed with respect to a steering direction in a simple structure and an electric power steering device including the motor control device. 20 Solution to Problem [0007] In order to achieve the object mentioned above, according to an aspect of the present invention, there is provided a motor control device including: a steering angular velocity 25 calculation unit configured to calculate a steering angular velocity on a basis of a steering angle detected by a steering angle detection unit configured to detect the steering angle of a steering wheel; a motor electrical angle estimation unit - 6 - configured to estimate a motor electrical angle of an electric motor providing a steering assist force to a steering shaft on a basis of the steering angular velocity calculated by the steering angular velocity calculation unit; a motor drive 5 control unit configured to, when a motor electrical angle detection unit configured to detect the motor electrical angle of the electric motor is normal, drive control the electric motor on a basis of the motor electrical angle detected by the motor electrical angle detection unit and, 10 when the motor electrical angle detection unit is abnormal, drive control the electric motor on a basis of an estimated motor electrical angle estimated by the motor electrical angle estimation unit; an advance gain setting unit configured to set an advance gain for correcting an advance 15 amount of the estimated motor electrical angle on a basis of a steering torque detected by a steering torque detection unit configured to detect the steering torque transmitted to the steering shaft; and a post-advance steering angular velocity calculation unit configured to calculate a post-advance 20 steering angular velocity on a basis of a multiplication result obtained by multiplying the steering angular velocity by the advance gain set by the advance gain setting unit, wherein the motor electrical angle estimation unit integrates the post-advance steering angular velocity calculated by the 25 post-advance steering angular velocity calculation unit, and estimates the motor electrical angle on a basis of a value of the integration, and only upon input of a steering torque equal to or more than a pre-set predetermined torque value, - 7 - the advance gain setting unit sets the advance gain for advancing the estimated motor electrical angle in a direction cancelling an angle error of a direction delayed with respect to a steering direction. 5 [0008] Further, in order to achieve the object mentioned above, the motor control device according to the aspect of the present invention includes an advance correction limit value calculation unit configured to, on a basis of an error 10 characteristic that is a characteristic of at least one error factor causing the angle error, calculate an advance correction limit value that is a limit value of an advance correction amount that is an integrated amount of an increased amount of the post-advance steering angular velocity due to 15 the advance gain; and an advance correction amount control unit configured to control integration processing of the post-advance steering angular velocity by the motor electrical angle estimation unit such that the advance correction amount does not exceed the advance correction 20 limit value calculated by the advance correction limit value calculation unit. Further, in order to achieve the object mentioned above, an electric power steering device according to another aspect of the present invention includes the motor control device 25 described above. Advantageous Effects of Invention [0009] - 8 - According to the present invention, the structure configured to estimate a motor electrical angle on the basis of a steering angular velocity can, upon input of a steering torque equal to or more than a predetermined torque value, 5 calculate a post-advance steering angular velocity for advancing the estimated motor electrical angle in a direction cancelling an angle error of a direction delayed with respect to a steering direction. For example, by setting the predetermined torque value to a boundary value indicating 10 whether or not influence due to the angle error appears as handling feeling, correction can be performed only when the influence appears as handling feeling. As a result, the angle error of the direction delayed with respect to the steering direction due to the error factor can be reduced by the 15 structure simpler than the conventional ones. Furthermore, since the amount of advance is limited on the basis of the error characteristic of the error factor, occurrence of an angle error due to excessive advance can be suppressed, so that favorable advance correction can be 20 performed. Still furthermore, the electric power steering device is configured by including the motor control device having the above advantageous effects. Thus, even when abnormality occurs in the motor electrical angle detection unit, the 25 electric motor can be drive controlled using an estimated motor electrical angle value, so that a steering assist function of the electric power steering device can be continued. - 9 - Brief Description of Drawings [0010] FIG. 1 is a diagram illustrating one structural example 5 of a vehicle mounted with an electric power steering device according to a first embodiment; FIG. 2 is a schematic structural diagram illustrating a steering torque sensor according to the first embodiment; FIG. 3 is a circuit diagram illustrating a specific 10 structure of a motor control device according to the first embodiment; FIG. 4 is a block diagram illustrating a specific structure of a control calculation device according to the first embodiment; 15 FIG. 5 is a block diagram illustrating a specific structure of a motor electrical angle detection circuit according to the first embodiment; FIG. 6 is a diagram illustrating one example of an abnormality determination map; 20 FIG. 7 is a block diagram illustrating a specific structure of a backup electrical angle detection circuit according to the first embodiment; FIG. 8A is a diagram illustrating waveform examples of respective line counter electromotive forces when in positive 25 rotation, and FIG. 8B illustrates waveform examples of the respective line counter electromotive forces when in reverse rotation; - 10 - FIG. 9 is a diagram illustrating a relationship among motor rotation direction, signs of the respective line counter electromotive forces, intermediate angle, and absolute angle region; 5 FIG. 10 is a flowchart illustrating one example of a processing procedure of absolute angle region determination processing; FIG. 11 is a flowchart illustrating one example of a processing procedure of intermediate angle shift calculation 10 processing; FIG. 12 is a flowchart illustrating one example of a processing procedure of corrected electrical angle calculation processing; FIG. 13 is a schematic diagram for describing influence 15 due to a reduction gear; FIG. 14 is a diagram illustrating one example of mechanical compliance characteristics of the reduction gear; FIG. 15 is a diagram illustrating one example of an advance gain map according to the first embodiment; 20 FIG. 16 is a diagram illustrating one example of a reduction gear error characteristic map; FIG. 17 is a flowchart illustrating one example of a processing procedure of advance correction limit value calculation processing according to the first embodiment; 25 FIGS. 18A and 18B are diagrams for describing a method for calculating an advance correction limit value; - 11 - FIG. 19 is a block diagram illustrating a specific structure of an advance permission determination unit according to the first embodiment; FIG. 20 is a diagram for describing a method for 5 calculating an advance correction amount; FIG. 21 is a flowchart illustrating one example of a processing procedure of advance permission determination processing; FIG. 22 is a diagram for describing a specific operation 10 of the advance permission determination unit, which diagram is a time chart illustrating a relationship among advance correction limit value, advance correction amount, motor output torque, and steering direction; FIG. 23 is a block diagram illustrating a specific 15 structure of a backup electrical angle detection circuit according to a second embodiment; FIG. 24 is a diagram for describing a detection error of an output shaft rotation angle sensor; FIG. 25 is a diagram illustrating a relationship between 20 output shaft angular velocity (steering angular velocity) and sensor detection error; FIG. 26 is a flowchart illustrating one example of a processing procedure of synthetic error characteristic calculation processing according to the second embodiment; 25 FIG. 27 is a flowchart illustrating one example of a processing procedure of advance correction limit value calculation processing according to the second embodiment; - 12 - FIG. 28 is a block diagram illustrating a specific structure of an advance permission determination unit according to a third embodiment; and FIG. 29 is a diagram illustrating one example of an 5 advance gain map according to the third embodiment. Description of Embodiments [0011] Next, a first to third embodiments of the present 10 invention will be described based on the drawings. In the drawings below, identical or similar symbols are assigned to identical or similar portions. However, it should be noted that the drawings are schematic, and the relationship between dimensions and the ratios of dimensions and the like may be 15 different from the actual ones. In addition, the first to third embodiments described below illustrate devices and methods to embody the technical idea of the present invention by way of example. The technical idea of the present invention is not limited to the 20 materials, shapes, structures, arrangements, or the like of the constituent components to those described below. The technical idea of the present invention can be subjected to a variety of modifications and changes within the technical scope prescribed by the claims. 25 [0012] (First Embodiment) (Structure) - 13 - A vehicle 2 according to an embodiment of the present invention includes front wheels 2FR and 2FL serving as right and left steered wheels and rear wheels 2RR and 2RL, as depicted in FIG. 1. The front wheels 2FR and 2FL are steered 5 by an electric power steering device 1. The electric power steering device 1 includes a steering wheel 11, and a steering force applied to the steering wheel 11 by a driver is transmitted to a steering shaft 12. The steering shaft 12 includes an input shaft 12a and an output 10 shaft 12b. One end of the input shaft 12a is connected to the steering wheel 11 and the other end thereof is connected to one end of the output shaft 12b via a steering torque sensor 13. [0013] 15 Then, the steering force transmitted to the output shaft 12b is transmitted to a lower shaft 15 via a universal joint 14, and furthermore transmitted to a pinion shaft 17 via a universal joint 16. The steering force transmitted to the pinion shaft 17 is transmitted to a tie rod 19 via a steering 20 gear 18 to steer the front wheels 2FR and 2FL as the steered wheels. Here, the steering gear 18 is formed in a rack and pinion form having a pinion 18a connected to the pinion shaft 17 and a rack 18b engaged with the pinion 18a. Accordingly, the steering gear 18 converts a rotational movement 25 transmitted to the pinion 18a to a translatory movement in a vehicle width direction at the rack 18b. A steering assisting mechanism 20 that transmits a steering assist force to the output shaft 12b is connected - 14 - to the output shaft 12b of the steering shaft 12. The steering assisting mechanism 20 includes a reduction gear 21 connected to the output shaft 12b and formed by, for example, a worm gear mechanism, and an electric motor 22 that is connected 5 to the reduction gear 21 and that generates the steering assist force. [0014] The steering torque sensor 13 detects a steering torque Th applied to the steering wheel 11 and transmitted to the 10 input shaft 12a. As illustrated in FIG. 2, the steering torque sensor 13 includes a torsion bar 13a interposed between the input shaft 12a and the output shat 12b, an input shaft rotation angle sensor 13b arranged on the input shaft 12a side, and an output shaft rotation angle sensor 13c arranged on the 15 output shaft 12b side. The input shaft rotation angle sensor 13b detects an is that is a rotation angle ofinput shaft rotation angle the input shaft 12a. The output shaft rotation angle sensor 13c detects an os that is a rotation angle of20 output shaft rotation angle the output shaft 12b. Then, the steering torque sensor 13 is configured so as to detect a steering torque Th by calculating from a twist angular displacement of the torsion bar 13a, i.e., an angular 25 difference between the input shaft rotation angle sensor 13b and the output shaft rotation angle sensor 13c, and a stiffness value of the torsion bar 13a. [0015] - 15 - In addition, the electric motor 22 is a three-phase brushless motor in the present embodiment, and includes a ring-shaped motor rotor and a ring-shaped motor stator that are unillustrated. The motor stator includes a plurality of 5 pole teeth protruding inward in a radial direction and provided at equal intervals in a circumferential direction, in which an excitation coil (A-phase motor winding La, B-phase motor winding Lb, and C-phase motor winding Lc illustrated in FIG. 3) is wound around each pole tooth. Then, the motor 10 rotor is coaxially arranged inside the motor stator. The motor rotor is configured to face the pole teeth of the motor stator with a small gap (air gap) and include a plurality of magnets provided at equal intervals in a circumferential direction on an outer peripheral surface thereof. 15 Hereinafter, the A-phase motor winding La, the B-phase motor winding Lb, and the C-phase motor winding Lc may be simply referred to as “three-phase motor windings La to Lc”. The motor rotor is fixed to a motor rotating shaft. A three-phase AC current is supplied to the three-phase motor 20 windings La to Lc of the motor stator via a motor control device 25, whereby each of the teeth of the motor stator is excited in a predetermined sequence to rotate the motor rotor, thereby rotating the motor rotating shaft. [0016] 25 Furthermore, as illustrated in FIG. 1 and FIG. 3, the electric motor 22 includes a rotation position sensor 23 formed by a resolver configured to detect a rotation position of the rotor. A detected value from the rotation position - 16 - sensor 23 is supplied to a motor electrical angle detection circuit 24, and the motor electrical angle detection circuit m. Hereinafter, the24 detects a motor electrical angle rotation position sensor 23 may be referred to as “resolver 5 23”. Note that the rotation position sensor 23 is not limited to resolver, and may be formed by another sensor such as, for example, a rotary encoder. Direct current is input to the motor control device 25 from a battery 27 as a direct current source. Here, a negative 10 electrode of the battery 27 is grounded, and a positive electrode thereof is connected to the motor control device 25 via an ignition switch 28 (hereinafter may be referred to as “IGN switch 28”) configured to start engine, and also directly connected to the motor control device 25, not via 15 the IGN switch 28. [0017] (Structure of Motor Control Device 25) Next, a description will be given of a specific structure of the motor control device 25. 20 As illustrated in FIG. 3, the motor control device 25 includes the motor electrical angle detection circuit 24 m, a controlconfigured to detect the motor electrical angle calculation device 31 configured to calculate a motor voltage command value, and a motor drive circuit 32 to which 25 three-phase motor voltage command values Va*, Vb*, and Vc* to be described later output from the control calculation device 31 are input. Hereinafter, when it is unnecessary to distinguish the motor voltage command values Va*, Vb*, and - 17 - Vc*, they may be simply referred to as “motor voltage command values V*”. Furthermore, the motor control device 25 includes a motor phase current cut-off circuit 33 interposed between an output 5 side of the motor drive circuit 32 and the three-phase motor windings La to Lc of the electric motor 22, a voltage detection circuit 40 provided between the motor drive circuit 32 and the motor phase current cut-off circuit 33, and a noise filter 43 provided between the battery 27 and the motor drive circuit 10 32. [0018] The motor drive circuit 32 includes a gate drive circuit 41 to which the three-phase motor voltage command values V* output from the control calculation device 31 are input and 15 thereby which forms a gate drive signal and an inverter circuit 42 to which the gate drive signal output from the gate drive circuit 41 is input. The motor drive circuit 32 further includes a power source cut-off circuit 44 interposed between the noise filter 20 43 and the inverter circuit 42. In addition, the motor drive circuit 32 includes current detection circuits 45A, 45B, and 45C interposed between lower arms and a ground and configured to detect direct current flowing from the lower arms to the ground. 25 Hereinafter, the current detection circuits 45A, 45B, and 45C may be simply referred to as “current detection circuits 45A to 45C”. [0019] - 18 - Specifically, the current detection circuit 45A detects an A-phase motor current Ia output from the A-phase motor winding La, the current detection circuit 45B detects a B-phase motor current Ib output from the B-phase motor winding 5 Lb, and the detection circuit 45C detects a C-phase motor current Ic output from the C-phase motor winding Lc. Hereinafter, the A, B, and C-phase motor currents Ia, Ib, and Ic may be simply referred to as “motor phase currents Ia to Ic”. 10 The voltage detection circuit 40 detects each voltage of connection lines that connect connection points between respective upper arms and the respective lower arms of inverter circuit 42 to the three-phase motor windings La to Lc of the electric motor 22. 15 [0020] Specifically, the voltage detection circuit 40 detects a motor phase voltage Va that is a voltage of the connection line connecting to the A-phase motor winding La, a motor phase voltage Vb that is a voltage of the connection line connecting 20 to the B-phase motor winding Lb, and a motor phase voltage Vc that is a voltage of the connection line connecting to the C-phase motor winding Lc. Hereinafter, the motor phase voltages Va, Vb, and Vc may be simply referred to as “motor phase voltages Va to Vc”. 25 Upon input of the motor voltage command values V* from the control calculation device 31, the gate drive circuit 41 forms six gate drive signals subjected to pulse width modulation (PWM) on the basis of the motor voltage command - 19 - values V* and a triangular wave carrier signal Sc, and then, outputs the gate drive signals to the inverter circuit 42. Battery power of the battery 27 is input to the inverter circuit 42 via the noise filter 43 and the power source cut-off 5 circuit 44. In addition, a smoothing capacitor CA that is an electrolytic capacitor for smoothing is interposed between a connection line of an input side connecting to the power source cut-off circuit 44 and the ground. The smoothing capacitor CA has a noise removal function and a power source 10 supply assist function for the inverter circuit 42. [0021] The inverter circuit 42 includes six field effect transistors Q1 to Q6 as switching elements, each two of which field effect transistors are connected in series to form three 15 switching arms SWAa, SWAb, and SWAc that are connected in parallel. Then, the gate drive signals output from the gate drive circuit 41 are input to gates of the respective field effect transistors Q1 to Q6, whereby the A-phase motor current Ia, the B-phase motor current Ib, and the C-phase motor 20 current Ic are conducted to the three-phase motor windings La, Lb, and Lc of the electric motor 22 via the motor phase current cut-off circuit 33 from connection points between the field effect transistors of the respective switching arms SWAa, SWAb, and SWAc. 25 [0022] Note that since pulse width modulated (PWM) signals as the gate drive signals are input to the gates of the field effect transistors of the inverter circuit 42, the A-phase - 20 - current Ia, the B-phase current Ib, and the C-phase current Ic output from the inverter circuit 42 become rectangular signals whose duty ratios are controlled. The power source cut-off circuit 44 has a series circuit 5 structure in which sources of two field effect transistors QC1 and QC2 are connected to each other so that parasitic diodes are oriented in reverse directions. Additionally, a drain of the field effect transistor QC1 is connected to an output side of the noise filter 43, and a drain of the field 10 effect transistor QC2 is connected to drains of the respective field effect transistors Q1, Q3, and Q5 of the inverter circuit 42. [0023] The motor phase current cut-off circuit 33 includes three 15 field effect transistors QA1, QA2, and QA3 for current cut off. A source of the field effect transistor QA1 is connected to a connection point between the field effect transistors Q1 and Q2 of the switching arm SWAa of the inverter circuit 42 via the voltage detection circuit 40, and a drain thereof 20 is connected to the A-phase motor winding La. Additionally, a source of the field effect transistor QA2 is connected to a connection point between the field effect transistors Q3 and Q4 of the switching arm SWAb of the inverter circuit 42 via the voltage detection circuit 40, and a drain thereof is 25 connected to the B-phase motor winding Lb. In addition, a source of the field effect transistor QA3 is connected to a connection point between the field effect transistors Q5 and Q6 of the switching arm SWAc of the inverter circuit 42 via - 21 - the voltage detection circuit 40, and a drain thereof is connected to the C-phase motor winding Lc. Then, each of the field effect transistors QA1 to QA3 of the motor phase current cut-off circuit 33 is connected 5 in the same direction, with an anode of a parasitic diode D being arranged on the inverter circuit 42 side. [0024] (Structure of Control Calculation Device 31) Next, a description will be given of a specific structure 10 of the control calculation device 31 Here, as illustrated in FIG. 3, the motor phase voltages Va to Vc detected by the voltage detection circuit 40 and the motor phase currents Ia, Ib, and Ic output from the current detection circuits 45A to 45C are input to the control 15 calculation device 31 via an A/D conversion unit 31c. m output from theAdditionally, the motor electrical angle motor electrical angle detection circuit 24 is input to the control calculation device 31. Note that, furthermore, as illustrated in FIG. 4, the 20 steering torque Th detected by the steering torque sensor 13 and a vehicle speed Vs detected by a vehicle speed sensor 26 are input to the control calculation device 31. Furthermore, although illustration is omitted, the control calculation device 31 includes a CPU, a ROM previously 25 storing a control program to be executed by the CPU, data to be used when executing the control program, and the like in a predetermined region, and a RAM as work memory for storing - 22 - data read from the ROM and calculation results necessary in a calculation process of the CPU. [0025] Still furthermore, as illustrated in FIG. 4, the control 5 calculation device 31 includes a steering assist current command value calculation unit 34 configured to calculate steering assist current command values I* and a motor velocity information calculation unit 35 configured to calculate velocity information of the electric motor 22. In addition, 10 the control calculation device 31 includes a compensation value generation unit 36 configured to, on the basis of the motor velocity information calculated by the motor velocity information calculation unit 35, generate a compensation value with respect to the steering assist current command 15 value I* calculated by the steering assist current command value calculation unit 34 and an addition unit 37. Additionally, the control calculation device 31 includes a d-q axis current command value calculation unit 38 configured to, on the basis of a post-compensation steering assist 20 current command value I*’ compensated by the compensation value generation unit 36, calculate a d-q axis current command value and convert it to a three-phase current command value. Moreover, the control calculation device 31 includes a voltage command value calculation unit 39 configured to 25 calculate the motor voltage command values V* for the motor drive circuit 32. [0026] - 23 - The steering assist current command value calculation unit 34 calculates, on the basis of the steering torque Th and the vehicle speed Vs input, the steering assist current command value I* formed by a current command value with 5 reference to a steering assist current command value calculation map (unillustrated). The steering assist current command value calculation map is formed by a characteristic chart represented by parabolic curves, whose horizontal axis represents steering torque Th and whose 10 vertical axis represents steering assist current command value I*. The steering assist current command value calculation unit 34 outputs the calculated steering assist current command value I* to the addition unit 37 and the compensation 15 value generation unit 36, respectively. The motor velocity information calculation unit 35 includes a motor angular velocity calculation unit 35a and a motor angular acceleration calculation unit 35b. The motor angular velocity calculation unit 35a m by differentiating20 calculates a motor angular velocity m. Then, the calculatedthe input motor electrical angle m is output to each of pre-set outputmotor angular velocity destinations, such as the motor angular acceleration calculation unit 35b and the compensation value generation 25 unit 36. [0027] The motor angular acceleration calculation unit 35b m by differentiatingcalculates a motor angular acceleration - 24 - m. Then, the calculatedthe input motor angular velocity m is output to each of presetmotor angular acceleration output destinations, such as the compensation value generation unit 36. 5 The compensation value generation unit 36 includes a convergence compensation unit 36a, an inertia compensation unit 36b, a SAT estimation feedback unit 36c, and addition units 36d and 36e. The convergence compensation unit 36a calculates, on the m input from the motor10 basis of the motor angular velocity angular velocity calculation unit 35a, a convergence compensation value Ico such that a brake is applied to a swinging and rotating action of the steering wheel 11 so as to improve yaw convergence of the vehicle. The convergence 15 compensation unit 36a outputs the calculated convergence compensation value Ico to the addition unit 36e. [0028] m inputOn the basis of the motor angular acceleration from the motor angular acceleration calculation unit 35b, the 20 inertia compensation unit 36b calculates an inertia compensation value Ii for compensating for an amount equivalent to a torque generated due to inertia of the electric motor 22 to prevent deterioration of control responsiveness. The inertia compensation unit 36b outputs 25 the calculated inertia compensation value Ii to the addition unit 36d. The SAT estimation feedback unit 36c estimates and calculates a self-aligning torque SAT on the basis of the - 25 - m, motorinput steering torque Th, motor angular velocity m, and steering assist current commandangular acceleration value I*. The SAT estimation feedback unit 36c outputs the calculated self-aligning torque SAT to the addition unit 36d. 5 [0029] The addition unit 36d adds the input inertia compensation value Ii and self-aligning torque SAT together, and outputs an addition result to the addition unit 36e. The addition unit 36e adds the addition results of the 10 addition unit 36d and the convergence compensation value Ico calculated by the convergence compensation unit 36a together, and outputs an addition result as a command compensation value Icom to the addition unit 37. The addition unit 37 adds the command compensation value 15 Icom input from the compensation value generation unit 36 to the steering assist current command value I* input from the steering assist current command value calculation unit 34, and outputs the post-compensation steering assist current command value I*’ to the d-q axis current command value 20 calculation unit 38. [0030] The d-q axis current command value calculation unit 38 includes a d-axis command current calculation unit 38a, an induced voltage model calculation unit 38b, a q-axis command 25 current calculation unit 38c, and a two-phase/three-phase conversion unit 38d. The d-axis command current calculation unit 38a calculates a d-axis current command value Id* on the basis - 26 - of the post-compensation steering assist current command m.value I*’ and the motor angular velocity The induced voltage model calculation unit 38b ) and a q-axis EMFcalculates a d-axis EMF component Ed( ) of a d-q axis induced voltage model5 component Eq( electromotive force (EMF) on the basis of the motor electrical m.m and the motor angular velocity angle [0031] The q-axis command current calculation unit 38c 10 calculates a q-axis current command value Iq* on the basis ) and the q-axis EMF componentof the d-axis EMF component Ed( ) output from the induced voltage model calculation unitEq( 38b, the d-axis current command value Id* output from the d-axis command current calculation unit 38a, the 15 post-compensation steering assist current command value I*’, m.and the motor angular velocity The two-phase/three-phase conversion unit 38d converts the d-axis current command value Id* output from the d-axis command current calculation unit 38a and the q-axis current 20 command value Iq* output from the q-axis command current calculation unit 38c to an A-phase current command value Ia*, a B-phase current command value Ib*, and a C-phase current command value Ic*. Then, the three-phase current command values Ia*, Ib*, and Ic* are output to the voltage command 25 value calculation unit 39. [0032] The voltage command value calculation unit 39 calculates motor voltage command values V* on the basis of the input - 27 - A-phase current command value Ia*, B-phase current command value Ib*, and C-phase current command value Ic* and the motor phase currents Ia to Ic detected by the current detection circuits 45A to 45C. 5 Specifically, the voltage command value calculation unit 39 subtracts respective detected values of the A-phase motor current Ia, the B-phase motor current Ib, and the C-phase motor current Ic input from the current detection circuits 45A to 45C from the A-phase current command value 10 Ia*, the B-phase current command value Ib*, and the C-phase current command value Ic* input from the two-phase/three-phase conversion unit 38d to calculate Ic. Additionally, theIb, and Ia, current deviations voltage command value calculation unit 39 performs, for 15 example, a PI control calculation or a PID control calculation Ic to calculate theIb, and Ia, on the current deviations three-phase motor voltage current values V* for the motor drive circuit 32. Then, the calculated three-phase motor voltage current values V* are output to the gate drive circuit 20 41. [0033] (Motor Electrical Angle Detection Circuit 24) Next, a description will be given of a specific structure of the motor electrical angle detection circuit 24 according 25 to the first embodiment. The motor electrical angle detection circuit 24 includes a main electrical angle detection circuit 24A configured to m1 on the basis ofcalculate a first motor electrical angle - 28 - a signal from the resolver 23 and a backup electrical angle detection circuit 24B configured to calculate a second motor m2 on the basis of a signal from the outputelectrical angle shaft rotation angle sensor 13c, as illustrated in FIG. 5. 5 In addition, the motor electrical angle detection circuit 24 includes an electrical angle selection unit 24C configured to select a motor electrical angle to be output from the first m1 and the second motor electricalmotor electrical angle m2 on the basis of an abnormality determination resultangle 10 of the resolver 23. Additionally, although illustration is omitted, the motor electrical angle detection circuit 24 includes a CPU, a ROM previously storing a control program to be executed by the CPU, data to be used when executing the control program, 15 and the like in a predetermined region, and a RAM as work memory for storing data read from the ROM and calculation results necessary in a calculation process of the CPU. [0034] The main electrical angle detection circuit 24A includes 20 an angle calculation unit 51 and a resolver abnormality determination unit 52. The angle calculation unit 51 calculates the first motor m1 on the basis of a sine wave signal sinelectrical angle in accordance with a rotationand a cosine wave signal cos 25 angle of the electric motor 22 output from the resolver 23. m1 isThen, the calculated first motor electrical angle output to the electrical angle selection unit 24C. - 29 - The resolver abnormality determination unit 52 determines abnormality of the resolver 23, and outputs an abnormality detection signal SAr indicating a determination result to the electrical angle selection unit 24C. 5 Specifically, an abnormality determination map is referred input from the resolver and the costo on the basis of the sin and the cos23 to determine whether a combination of the sin is normal or abnormal. [0035] 10 Here, in the abnormality determination map, horizontal , respectively, and cosaxis and vertical axis represent sin and the map is formed such that three concentric circles and two quadrangles are drawn centering on the origin G (0, 0), as illustrated in FIG. 6. Firstly, with regard to the three )2)2 + (cos15 concentric circles, there are a circle of (sin )2)2 + (cos= Pmin drawn on the innermost side, a circle of (sin )2)2 + (cos= 1 drawn on the middle side, and a circle of (sin is= Pmax drawn on the outermost side. Large quadrangle Pmax, and small quadranglea square whose one side length is 2 2). Here, (Pmin/ is a quadrangle whose one side length is 2 20 normal region indicates the range of a hatched portion and the small quadranglesurrounded by the large quadrangle , and the region other than that indicates an abnormal range. Note that Pmin and Pmax of the determination reference 25 mentioned above are set by considering influences of detection accuracy, the number of motor poles, and the like, and abnormality detection accuracy can be adjusted by Pmin and Pmax. Appropriately setting Pmax and Pmin enables - 30 - detection of motor breakdown during operation and abnormality )2 = 1 is)2 + (cosof the resolver 23. Additionally, (sin )2 +a usual normality determination reference, and (sin )2 = Pmax are used to indicate)2 + (cos)2 = Pmin and (sin(cos Pma)2 )2 + (cos (sin5 a normality range of Pmin x, which is thus wider than the usual normality determination reference. [0036] When the resolver 23 is determined to be abnormal, the 10 resolver abnormality determination unit 52 outputs the abnormality detection signal SAr of a logical value “1” to the electrical angle selection unit 24C. When resolver 23 is determined to be normal, the resolver abnormality determination unit 52 outputs the abnormality detection 15 signal SAr of a logical value “0” to the electrical angle selection unit 24C. Referring back to FIG. 5, the backup electrical angle detection circuit 24B includes a counter electromotive force angle correction value calculation unit 53 configured to e for correcting the second20 calculate a correction angle m2 that is an estimated angle of themotor electrical angle m on the basis of line countermotor electrical angle electromotive forces of the electric motor 22. In addition, the backup electrical angle detection circuit 24B includes 25 an inter-sensor error correction unit 54 configured to os that is ancorrect an output shaft angular velocity os on theangular velocity of an output shaft rotation angle basis of mechanical compliance characteristics of the - 31 - reduction gear 21. Furthermore, the backup electrical angle detection circuit 24B includes an estimated angle calculation unit 55 configured to calculate the second motor electrical m2 by integrating the output shaft angular velocityangle oscos and a post-correction output shaft angular velocity 5 (hereinafter referred to as “post-advance steering angular osc).velocity [0037] e calculated by the counterHere, the correction angle 10 electromotive force angle correction value calculation unit 53 is calculated from motor-side information, and therefore, is more accurate and reliable than the estimated electrical angle calculated by the integration of the output shaft os and the post-advance steering angularangular velocity osc. Thus, the estimated angle calculation unit15 velocity 55 of the first embodiment is configured to, when the e is input at a time of permission ofcorrection angle correction, perform a correction for forcibly changing a e.present integration value to the correction angle 20 [0038] The electrical angle selection unit 24C selects the first m1 output from the main electricalmotor electrical angle angle detection circuit 24A when the abnormality detection signal SAr output from the resolver abnormality determination 25 unit 52 of the main electrical angle detection circuit 24A has the logical value “0” representing that there is no abnormality. Then, the selected first motor electrical m to them1 is output as the motor electrical angle angle - 32 - above-described control calculation device 31. On the other hand, when the abnormality detection signal SAr has the logical value “1” representing that there is abnormality, the electrical angle selection unit 24C selects the second motor m2 output from the backup electrical angle5 electrical angle detection circuit 24B. Then, the selected second motor m2 is output as the motor electrical angleelectrical angle m to the control calculation device 31. [0039] 10 (Counter Electromotive force Angle Correction Value Calculation Unit 53) Next, a description will be given of a specific structure of the counter electromotive force angle correction value calculation unit 53. 15 As illustrated in FIG. 7, the counter electromotive force angle correction value calculation unit 53 includes an output shaft angular velocity calculation unit 53a, a counter electromotive force calculation unit 53b, an absolute angle region determination unit 53c, and a correction angle 20 calculation unit 53d. The output shaft angular velocity calculation unit 53a os bycalculates the output shaft angular velocity os from thedifferentiating the output shaft rotation angle output shaft rotation angle sensor 13c. Then, the calculated os is output to the absolute25 output shaft angular velocity angle region determination unit 53c, the correction angle calculation unit 53d, and the inter-sensor error correction unit 54, respectively. - 33 - [0040] Firstly, the counter electromotive force calculation unit 53b performs calculations of the following formulae (1) to (3) on the basis of the motor phase voltages Va to Vc input 5 from the voltage detection circuit 40 to calculate line voltages Vab, Vbc, and Vca. Vab = Va − Vb … … (1) Vbc = Vb − Vc … … (2) Vca = Vc − Va … … (3) 10 [0041] Next, the counter electromotive force calculation unit 53b performs calculations of the following formulae (4) to (6) on the basis of the calculated line voltages Vab, Vbc, and Vca and the motor phase currents Ia to Ic input from the 15 current detection circuits 45A to 45C to calculate an A-B counter electromotive force EMFab, a B-C counter electromotive force EMFbc, and a C-A counter electromotive force EMFca. Hereinafter, the A-B counter electromotive force EMFab, the B-C counter electromotive force EMFbc, and 20 the C-A counter electromotive force EMFca may be generally referred to as “respective line counter electromotive force values EMF”. Ib} Lb) Ia − (Rb + s La) EMFab = Vab − {(Ra + s … (4) Ic} Lc) Ib − (Rc + s Lb) 25 EMFbc = Vbc − {(Rb + s … (5) - 34 - Ia} La) Ic − (Ra + s Lc) EMFca = Vca − {(Rc + s … (6) [0042] 5 Here, Ra, Rb, and Rc are winding resistances of the respective phases of the motor; La, Lb, and Lc are inductances of the respective phases of the motor; and s is a Laplace operator, and herein represents a differential operation (d/dt). 10 The counter electromotive force calculation unit 53b outputs the calculated respective line counter electromotive force values EMF to the absolute angle region determination unit 53c. On the basis of the input output shaft angular velocity os and the input respective line counter electromotive force15 values EMF, the absolute angle region determination unit 53c mestimates a region where an actual motor electrical angle is positioned (hereinafter referred to as “absolute angle region Z”) from among angle regions obtained by dividing an 20 electrical angle region of 360 [deg_el] of the electric motor 22 by 60 [deg]. [0043] Hereinafter, a description will be given of a principle for estimating the absolute angle region where the actual m is positioned.25 motor electrical angle As illustrated in FIGs. 8A, 8B, and FIG. 9, in a relationship between the respective line counter electromotive force values EMF and the motor electrical angle - 35 - m of the electric motor 22, a sign relationship among the respective line counter electromotive force values EMF differs between positive rotation and reverse rotation. For m isexample, assume that the actual motor electrical angle 5 present within the absolute angle region Z of from 0 to 60 [deg_el], and the rotation direction is reversed (from positive rotation to reverse rotation). Then, as illustrated in FIG. 9, the plus-or-minus sign relationship among the respective line counter electromotive force values 10 EMF of the electric motor 22 will change from “+, −, +” to “−, +, −”, as indicated in order from top to bottom in the drawing. Accordingly, when the rotation direction of the electric motor 22 is determined, the angular region where the m is present (the absolute anglemotor electrical angle 15 region Z) can be estimated from the sign relationship among the respective line counter electromotive force values EMF. [0044] Additionally, at a time when the absolute angle region shifts to an adjacent region in the respective absolute angle m20 regions divided by 60 [deg], the motor electrical angle to be estimated is positioned at a boundary angle between the regions. On the basis of the fact, in the first embodiment, when the absolute angle region has shifted to the adjacent e is calculated on the basisregion, the correction angle 25 of the boundary angle between the absolute angle region before shifting and the absolute angle region after shifting. However, if noise is mixed in the calculated values of the respective line counter electromotive force values EMF, - 36 - the sign relationship among the respective line counter electromotive force values EMF is easily switched around a switching boundary line between the absolute angle regions. Due to that, there is a concern that hunting easily occurs 5 upon region determination with respect to the adjacent region. [0045] Thus, in the first embodiment, as illustrated in FIG. c of each of the absolute angle9, an intermediate angle c has10 regions is calculated, and when the intermediate angle c_sht, whichchanged, a new post-shifting intermediate angle c,is an angle after shifting from the intermediate angle is calculated on the basis of an amount of the change and a direction of the shifting. The post-shifting intermediate c_sht is configured not to shift when hunting occurs.15 angle In other words, by determining not only shifting of the absolute angle region Z but also the presence or absence of c_sht, thea change in the post-shifting intermediate angle e is more accurately calculated.correction angle 20 That is, the absolute angle region determination unit 53c of the first embodiment estimates the absolute angle m is present,region Z where the actual motor electrical angle c_sht, andcalculates the post-shifting intermediate angle outputs the estimated absolute angle region Z and the c_sht to the25 calculated post-shifting intermediate angle correction angle calculation unit 53d. [0046] - 37 - On the basis of the input absolute angle region Z, the correction angle calculation unit 53d determines whether or not the present absolute angle region Z has shifted to an adjacent region with respect to a previous absolute angle 5 region Z(n − 1). In addition, when it has been determined that the absolute angle region Z has shifted, the correction angle calculation unit 53d determines, on the basis of the c_sht, whether or notinput post-shifting intermediate angle c_sht hasthe present post-shifting intermediate angle 10 changed with respect to a previous post-shifting intermediate c_sht(n − 1). Furthermore, in the first embodiment,angle when it has been determined that the post-shifting c_sht has changed, the correction angleintermediate angle calculation unit 53d determines, on the basis of a sign 15 representing the direction of the change and a sign of the os, whether or not theinput output shaft angular velocity direction (sign) of the change is the same as the direction os. Then,(sign) of the input output shaft angular velocity when it has been determined that the directions (signs) are 20 the same, the correction angle calculation unit 53d sets a boundary angle between the previous absolute angle region Z(n − 1) and the present absolute angle region Z to the correction e.angle [0047] 25 The correction angle calculation unit 53d further sets correction timing information indicating timing for e andperforming a correction using the correction angle - 38 - timing for performing no correction using the correction e.angle Specifically, when performing the correction, the correction angle calculation unit 53d outputs correction 5 timing information indicating permission of the correction to the inter-sensor error correction unit 54 and the estimated angle calculation unit 55, respectively, and outputs the e to the estimated angle calculation unitcorrection angle 55. On the other hand, when not performing the correction, 10 the correction angle calculation unit 53d outputs correction timing information indicating non-permission of the correction to the inter-sensor error correction unit 54 and the estimated angle calculation unit 55, respectively. [0048] 15 (Absolute Angle Region Determination Processing) Next, with reference to FIG. 10, a detailed description will be given of absolute angle region determination processing that is executed by the above-described absolute angle region determination unit 53c. Here, the absolute 20 angle region determination processing is a subprogram that is called by a main program and executed, the main program being configured to calculate the second motor electrical m2 and executed by the CPU (unillustrated) of the motorangle electrical angle detection circuit 24. 25 Upon execution of the absolute angle region determination processing by the CPU of the motor electrical angle detection circuit 24, the processing first proceeds to step S101, as illustrated in FIG. 10. - 39 - At step S101, the absolute angle region determination unit 53c reads the respective line counter electromotive force values EMF calculated by the counter electromotive force calculation unit 53b and the output shaft angular os calculated by the output shaft angular velocity5 velocity calculation unit 53a, and the processing proceeds to step S103. [0049] At step S103, the absolute angle region determination 10 unit 53c compares a maximum value of absolute values of the read respective line counter electromotive force values EMF with a predetermined threshold value Thv. When rotation speed of the electric motor 22 is low, the absolute values of the respective line counter electromotive force values EMF 15 are small. Due to that, the predetermined threshold value Thv is pre-set to treat acquired values considered to be low reliable in the sign relationship as a determination dead zone. Then, when the maximum value of the absolute values of the respective line counter electromotive force values EMF has 20 been determined to be equal to or more than the predetermined threshold value Thv (Yes), the processing proceeds to step S105. On the other hand, when the maximum value of the absolute values of the respective line counter electromotive force values EMF has been determined to be less than the 25 predetermined threshold value Thv (No), the processing proceeds to step S115. [0050] - 40 - When the processing has proceeded to step S105, the absolute angle region determination unit 53c sets a dead zone state value “F = 0” that is a state value of the determination dead zone, and the processing proceeds to S107. 5 At step S107, the absolute angle region determination unit 53c acquires sign information of the read respective line counter electromotive force values EMF, and the processing proceeds to step S109. At step S109, the absolute angle region determination 10 unit 53c acquires sign information of the read output shaft os, and the processing proceeds to stepangular velocity S111. At step S111, the absolute angle region determination unit 53c refers to the table illustrated in FIG. 9, and 15 determines the absolute angle region Z and the intermediate c on the basis of the sign information of the respectiveangle line counter electromotive force values EMF acquired at step S107 and the sign information of the output shaft angular os acquired at step S109. After that, thevelocity 20 processing proceeds to step S113. [0051] cAt step S113, on the basis of the intermediate angle determined at step S111, the absolute angle region determination unit 53c executes intermediate angle shifting 25 calculation processing to calculate the post-shifting c_sht. Then, the absolute angle regionintermediate angle determination unit 53c outputs the calculated post-shifting c_sht, the dead zone state value “F = 0”intermediate angle - 41 - set at step S105, and the absolute angle region Z determined at step S111 to the correction angle calculation unit 53d, ends the series of processing, and returns to the calling processing. 5 [0052] On the other hand, when the maximum value thereof has been determined to be less than the threshold value at step S103, and then the processing has proceeded to step S115, the absolute angle region determination unit 53c sets a dead zone 10 state value “F = 1”. Then, the absolute angle region determination unit 53c outputs the set dead zone state value “F = 1” to the correction angle calculation unit 53d, ends the series of processing, and returns to the calling processing. 15 In other words, when the respective line counter electromotive force values EMF are small, and thus the reliability of the acquired values of the sign relationship is considered to be low, the absolute angle region determination unit 53c outputs the dead zone state value “F 20 = 1” without executing the processing after that, and then returns to the calling processing. [0053] (Intermediate Angle Shifting Calculation Processing) Next, with reference to FIG. 11, a detailed description 25 will be given of intermediate angle shifting calculation processing that is executed by step S113 described above. Upon execution of the intermediate angle shifting calculation processing at step S113 described above, the - 42 - processing first proceeds to step S201, as illustrated in FIG. 11. At step S201, the absolute angle region determination c(nc − unit 53c calculates a difference value Sht (Sht = c determined5 − 1)) between the present intermediate angle at step S111 described above and a previous intermediate angle c(n - 1), and the processing proceeds to step S203. [0054] At step S203, the absolute angle region determination 10 unit 53c determines whether the difference value Sht is “0” or not to determine whether or not the present intermediate c is coincident with the previous intermediate angleangle c(n - 1). Then, when it has been determined that the difference value Sht is “0”, and thus both are coincident 15 (Yes), the processing proceeds to step S205. When it has been determined that the difference value Sht is not “0”, and thus both are not coincident (No), the processing proceeds to step S207. When the processing has proceeded to step S205, the 20 absolute angle region determination unit 53c determines that c, sets athere is no shifting of the intermediate angle c_sht(n − 1) asprevious post-shifting intermediate angle c_sht, ends the seriesthe post-shifting intermediate angle of processing, and returns to the calling processing. 25 [0055] On the other hand, when the processing has proceeded to step S207, the absolute angle region determination unit 53c determines that there is shifting of the intermediate angle - 43 - c, and determines whether or not the difference value Sht is 60 [deg] or −300 [deg]. Then, when the difference value Sht has been determined to be 60 [deg] or −300 [deg] (Yes), the processing proceeds to step S209, whereas when not (No), 5 the processing proceeds to step S211. When the processing has proceeded to step S209, the absolute angle region determination unit 53c sets a value obtained by subtracting 30 [deg] from the intermediate angle c_sht, ends thec as the post-shifting intermediate angle 10 series of processing, and returns to the calling processing. [0056] On the other hand, when the processing has proceeded to step S211, the absolute angle region determination unit 53c determines whether or not the difference value Sht is −60 15 [deg] or 300 [deg]. Then, when the difference value Sht has been determined to be −60 [deg] or 300 [deg] (Yes), the processing proceeds to step S213, whereas when not (No), the processing proceeds to step S215. When the processing has proceeded to step S213, the 20 absolute angle region determination unit 53c sets a value c asobtained by adding 30 [deg] to the intermediate angle c_sht, ends the seriesthe post-shifting intermediate angle of processing, and returns to the calling processing. On the other hand when the processing has proceeded to 25 step S215, the absolute angle region determination unit 53c c as the post-shiftingsets the present intermediate angle c_sht, ends the series of processing, andintermediate angle returns to the calling processing. - 44 - [0057] (Correction Electrical Value Calculation Processing) Next, with reference to FIG. 12, a detailed description will be given of a specific processing content of correction 5 electrical angle calculation processing that is executed by the above-described correction angle calculation unit 53d. The correction electrical angle calculation processing is processing of a subprogram that is executed following the above-described absolute angle region determination 10 processing in the above main program. Upon execution of the correction electrical angle calculation processing by the CPU of the motor electrical angle detection circuit 24, the processing first proceeds to step S301, as illustrated in FIG. 12. 15 At step S301, the correction angle calculation unit 53d determines whether the input dead zone state value F is “F = 0” or not. When it has been determined to be “F = 0” (Yes), the processing proceeds to step S303, whereas when not (No), the processing proceeds to step S315. 20 [0058] When the processing has proceeded to step S303, the correction angle calculation unit 53d determines whether or not the absolute angle region Z has shifted to an adjacent region, on the basis of the input present absolute angle 25 region Z and the previous absolute angle region Z(n − 1) stored in memory such as RAM. Then, when it has been determined that the absolute angle region Z has shifted thereto (Yes), the - 45 - processing proceeds to step S305, whereas when not (No), the processing proceeds to step S315. When the processing has proceeded to step S305, the correction angle calculation unit 53d determines whether the 5 post-shifting intermediate angle has changed or not, on the basis of the input present post-shifting intermediate angle c_sht and the previous post-shifting intermediate angle c_sht(n − 1) stored in memory such as RAM. Then, when it has been determined that the post-shifting intermediate angle 10 has changed (Yes), the processing proceeds to step S307, whereas when not (No), the processing proceeds to step S315. [0059] When the processing has proceeded to step S307, the correction angle calculation unit 53d acquires sign 15 information corresponding to a shifting direction of the absolute angle region and sign information of the input output os. Here, the sign information isshaft angular velocity “+” when rotation direction is a positive rotation direction based on a motor rotation direction, whereas the sign 20 information is “−” when it is a reverse rotation direction. Furthermore, the correction angle calculation unit 53d determines whether both sines are coincident or not to determine whether or not the shifting direction of the absolute angle region is the same as the direction of output 25 shaft rotation. Then, when it has been determined that the sines are coincident and the directions are the same (Yes), the processing proceeds to step S309, and when it has been determined that the sines are not coincident and the - 46 - directions are not the same (No), the processing proceeds to step S315. [0060] When the processing has proceeded to step S309, the 5 correction angle calculation unit 53d sets a correction timing flag CTF to “1” indicating permission of correction, and the processing proceeds to step S311. At step S311, the correction angle calculation unit 53d e, a boundary angle betweensets, as the correction angle 10 the previous absolute angle region Z(n − 1) and the present absolute angle region Z. After that, the processing proceeds to step S313. At step S313, the correction angle calculation unit 53d e to the estimated angleoutputs the correction angle 15 calculation unit 55, and also outputs the correction timing flag CTF with the value of “1” to the inter-sensor error correction unit 54 and the estimated angle calculation unit 55, respectively. After that, the correction angle calculation unit 53d ends the series of processing, and 20 returns to the calling processing. [0061] On the other hand, when the determination has been “No” at steps S301, S303, S305, and S307, and then the processing has proceeded to step S315, the correction angle calculation 25 unit 53d sets the correction timing flag CTF to “0” indicating non-permission of correction, and the processing proceeds to step S317. - 47 - At step S317, the correction angle calculation unit 53d outputs the correction timing flag CTF with the value of “0” to the inter-sensor error correction unit 54 and the estimated angle calculation unit 55, respectively. After that, the 5 correction angle calculation unit 53d ends the series of processing, and returns to the calling processing. [0062] (Inter-Sensor Error Correction Unit 54) Next, a description will be given of a specific structure 10 of the inter-sensor error correction unit 54. Here, as illustrated in FIG. 13, the electric power steering device 1 according to the first embodiment includes the reduction gear 21 interposed between the output shaft rotation angle sensor 13c and the electric motor 22. The 15 reduction gear 21 usually has mechanical compliance characteristics such as backlash and elastic deformation. [0063] In the mechanical compliance characteristics, for example, as illustrated in FIG. 14, torsion angle (motor 20 mechanical angle) changes in response to motor output torque Tm. Additionally, the center part represents hysteresis characteristics, which are characteristics mainly due to backlash and the like of the reduction gear 21. The torsion characteristics change also depending on environmental 25 conditions and manufacturing conditions, and have a large variation width between a minimum value indicated by a dotted line and a maximum value indicated by a broken line with respect to a median value indicated by a solid line. In the - 48 - example of the present characteristics, occurrence of an angle estimation error up to around 30 [deg] is expected. Due to the influence, motor torque efficiency is reduced, and thus effective assist cannot be provided, as a result of which 5 steering operation becomes heavy, which affects vehicle steering. [0064] In addition, as illustrated in FIG. 13, the mechanical compliance characteristics of the reduction gear 21 are the 10 torsion characteristics. Thus, error estimated from the output shaft rotation angle sensor 13c side is always error of a side delayed with respect to the direction of steering. In the first embodiment, the inter-sensor error correction unit 54 is configured to perform processing for 15 correcting error due to the mechanical compliance oscharacteristics on the output shaft angular velocity before being input to the estimated angle calculation unit 55. [0065] 20 The inter-sensor error correction unit 54 includes an advance gain calculation unit 61, a multiplication unit 62, a motor torque equivalent value calculation unit 63, a reduction gear error characteristic calculation unit 64, an advance correction limit value calculation unit 65, and an 25 advance permission determination unit 66, as illustrated in FIG. 7. The advance gain calculation unit 61 calculates an advance gain Gad for advance correcting the output shaft - 49 - os input by using an advance gain map, onangular velocity the basis of the steering torque Th from the steering torque sensor 13. Then, the advance gain calculation unit 61 outputs the calculated advance gain Gad to the multiplication unit 5 62. [0066] Specifically, as illustrated in FIG. 15, in the advance gain map, there is a dead zone where when an absolute value of the steering torque Th is less than a predeterminedTh 10 torque value Tht, the advance gain Gad is “1”. Then, the first embodiment is characterized in that when the absolute value is equal to or more than the predetermined torque valueTh Tht, the advance gain Gad linearly increases to values larger becomesThthan “1” with a pre-set slope as the absolute value 15 larger. The predetermined torque value Tht is set to a boundary value indicating whether or not, for example, an error due to the mechanical compliance characteristics appears as handling feeling of a driver. Specifically, for example, experiments or the like are conducted in advance to 20 confirm an actual steering feel of the vehicle, whereby the of an allowable steering torque Th is setThabsolute value as a predetermined value. Note that the advance gain map is not limited to a map having the structure in which the advance gain Gad linearly changes with a constant slope, and may have 25 another structure such as a structure in which the advance gain Gad linearly changes with a plurality of slopes in multiple steps or nonlinearly changes. [0067] - 50 - The multiplication unit 62 multiplies the input output os by the input advance gain Gad toshaft angular velocity perform advance correction of the output shaft angular os, and outputs, to the advance permissionvelocity 5 determination unit 66, a post-advance steering angular ososc that is an output shaft angular velocity velocity after the advance correction. Here, advance correction is a correction in which when of the steering torque Th is equal toThthe absolute value 10 or more than the predetermined torque value Tht, the input os is multiplied by an advanceoutput shaft angular velocity gain Gad larger than 1 to increase (largely in the direction os so thatof steering) the output shaft angular velocity an advance amount in a direction cancelling an error increases. 15 Note that since the advance gain Gad is “1” in the dead zone is less than the predeterminedThwhere the absolute value ostorque value Tht, the input output shaft angular velocity will be output directly as the post-advantage steering osc to the advance permission determinationangular velocity 20 unit 66. [0068] The motor torque equivalent value calculation unit 63 calculates a motor torque equivalent value Tm’ equivalent to the motor output torque Tm. In the first embodiment, on the 25 basis of the motor phase currents Ia to Ic, the motor torque equivalent value calculation unit 63 calculates a q-axis current Iq as the motor torque equivalent value Tm’. Then, the motor torque equivalent value calculation unit 63 outputs - 51 - the calculated motor torque equivalent value Tm’ (Iq) to the reduction gear error characteristic calculation unit 64. Specifically, the motor torque equivalent value calculation unit 63 calculates the q-axis current Iq by using 5 a known three-phase to two-phase conversion method. For example, a three-phase static coordinate system of the motor -phase currents Ia to Ic is first converted to a two-phase coordinate system (two-phase orthogonal static coordinate coordinate system is converted to-system), and next, the 10 a d-q coordinate system (rotation coordinate system) to obtain the q-axis current Iq. Note that a structure may be employed in which an actual motor output torque Tm is directly measured, and the measured motor output torque Tm is used instead of the motor torque 15 equivalent value Tm’ if it is mountable. [0069] The reduction gear error characteristic calculation unit 64 calculates a reduction gear error characteristic Sg by using a reduction gear error characteristic map on the 20 basis of the input motor torque equivalent value Tm’. Then, the reduction gear error characteristic calculation unit 64 outputs the calculated reduction gear error characteristic Sg to the advance correction limit value calculation unit 65. Specifically, in the first embodiment, as the reduction 25 gear error characteristic map, there is prepared a map using median values of a variation width, as illustrated in FIG. 16. However, a deviation width between the median values and maximum/minimum values causes an angle estimation error, - 52 - reducing assist efficiency. Thus, the width needs to be reduced to an allowable reduction amount of assist efficiency, so that it is preferable to prepare a reduction gear error characteristic map subjected to the adjustment. 5 [0070] Additionally, in a motor output torque range at the center of the reduction gear error characteristic map, the hysteresis characteristics are used for the calculation. Specifically, as indicated by arrow lines in FIG. 16, map 10 values on lower and right sides are used in a direction in which the motor output torque changes from a minus side to a plus side, whereas map values on upper and left sides are used in a direction in which the motor output torque changes from the plus side to the minus side. 15 [0071] The advance correction limit value calculation unit 65 calculates an advance correction limit value SgL that is a limit value of an advance correction amount from the timing e, on the basis ofof correction using the correction angle 20 the correction timing flag CTF input from the counter electromotive force angle correction value calculation unit 53 and the reduction gear error characteristic Sg input from the reduction gear error characteristic calculation unit 64. Then, the advance correction limit value calculation unit 65 25 outputs the calculated advance correction limit value SgL to the advance permission determination unit 66. Here, when angle correction is performed using the e calculated on the basis of ancorrection angle - 53 - m2electromotive force, the second motor electrical angle e regardless of an erroris corrected to the correction angle state due to the mechanical compliance characteristics at that time. In other words, there occurs a state where 0 [deg] 5 in FIG. 16 is not always an initial position. Accordingly, in the first embodiment, with reference to an error state in e has beentiming where correction using the correction angle performed, the advance correction limit value SgL is obtained from a difference between an error due to the mechanical 10 compliance characteristics in the reference timing and a present error. [0072] Here, when the steering torque Th increases, error due to the mechanical compliance characteristics occurs. 15 However, other than the occurrence of such error, the following two situations are considered to be those increasing the steering torque Th. S1) Increased steering velocity S2) Pressing abutment against a rack end, hitting a curb with 20 tire, and the like With regard to the above situation S1), due to the increased steering velocity, it is possible to perform an e calculated byangle correction using the correction angle the counter electromotive force angle correction value 25 calculation unit 53 on the basis of the line counter electromotive force values EMF, so that influence can be ignored. On the other hand, with regard to the situation S2), due to decreased steering velocity, the electric motor 22 also - 54 - rotates at low speed, whereby the dead zone state value F becomes “1”, so that the angle correction function using the e cannot be executed. In this state,correction angle advance correction using the advance gain Gad causes m2,5 excessive advance of the second motor electrical angle which may cause assist efficiency reduction and the loss of synchronization. [0073] To avoid the problem, the first embodiment is configured 10 such that the advance correction limit value calculation unit 65 calculates the advance correction limit value SgL, and the advance permission determination unit 66 treats the advance correction limit value SgL as an advance amount limit that allows advance using the advance gain Gad, whereby excessive 15 advance is suppressed. [0074] Specifically, the advance permission determination unit 66 performs control for not permitting an advance such that a total amount (hereinafter referred to as “advance 20 correction amount Ct”) of an amount of advance (an advance correction update amount Cr) using the advance gain Gad from e exceedsthe timing of correction using the correction angle the advance correction limit value SgL. Besides, the advance permission determination unit 66 performs control for not 25 permitting advance in a direction away from the advance correction limit value SgL. In other words, the advance permission determination unit 66 performs control for permitting advance in a direction approaching the advance - 55 - correction limit value SgL as long as the advance correction amount Ct does not exceed the advance correction limit value SgL. Accordingly, when permitting advance, the advance permission determination unit 66 outputs the post-advance osc as a final steering angular5 steering angular velocity sc to the estimated angle calculation unit 55,velocity whereas when not permitting advance, it outputs directly the os as the final steeringoutput shaft angular velocity sc to the estimated angle calculation unitangular velocity 10 55. [0075] (Advance Correction Limit Value Calculation Processing) Next, with reference to FIG. 17, FIGS. 18A and 18B, a specific processing content of advance correction limit value 15 calculation processing that is executed by the advance correction limit value calculation unit 65. The advance correction limit value calculation processing is processing of a subprogram that is called by the main program and executed. 20 Upon execution of the advance correction limit value calculation processing by the CPU of the motor electrical angle detection circuit 24, the processing first proceeds to step S501, as illustrated in FIG. 17. At step S501, the advance correction limit value 25 calculation unit 65 reads the reduction gear error characteristic Sg and the correction timing flag CTF, and the processing proceeds to step S503. [0076] - 56 - At step S503, the advance correction limit value calculation unit 65 determines whether or not the correction timing flag CTF has changed from “0” to “1”. When the correction timing flag CTF has been determined to have changed 5 from “0” to “1” (Yes), the processing proceeds to step S505, whereas when not (No), the processing proceeds to step S507. Here, the first embodiment is configured such that a previous correction timing flag CTF(n − 1) is stored and retained in memory such as RAM. 10 [0077] When the processing has proceeded to step S505, the advance correction limit value calculation unit 65 uses the timing of changing of the correction timing flag CTF from “0” to “1” as reference timing, and sets the reduction gear error 15 characteristic Sg corresponding to the motor torque equivalent value Tm’ at the reference timing as a reference error characteristic Sg0. After that, the processing proceeds to step S507. Specifically, the advance correction limit value 20 calculation unit 65 sets the reduction gear error characteristic Sg read at step S501 as the reference error characteristic Sg0, and stores and retains the reference error characteristic Sg0 in memory such as RAM. [0078] 25 At step S507, the advance correction limit value calculation unit 65 subtracts the reference error characteristic Sg0 stored in the memory from the reduction gear error characteristic Sg read at step S501 to calculate - 57 - the advance correction limit value SgL. Then, the processing proceeds to step S509. At step S509, the advance correction limit value calculation unit 65 outputs the advance correction limit 5 value SgL calculated at step S507 to the advance permission determination unit 66, ends the series of processing, and returns to the calling processing. [0079] Here, with reference to FIGs. 18A and 18B, a description 10 will be given of a specific example regarding the processing of advance correction limit value calculation. For example, as illustrated in FIG. 18A, assume that e has been performedcorrection using the correction angle in timing of “ON” in FIG. 18A where torsion angle has a minus 15 maximum value on a reduction gear error characteristic map. In this case, a value of the torsion angle corresponding to the timing of “ON” indicated by a square mark in FIG. 18A is set as the reference error characteristic Sg0. Then, assume that the motor output torque Tm has changed in a plus direction, 20 and the torsion angle has passed through a hysteresis portion of lower and right sides on the reduction gear error characteristic map, and has changed to a value of (1) indicated by a white circle in FIG. 18A where the torsion angle has a plus maximum value. In this case, a value obtained by 25 subtracting the value (the reference error characteristic Sg0) indicated by the square mark from the value indicated by the white circle in FIG. 18A is the advance correction limit value SgL at the time of (1). In other words, an angle amount - 58 - equivalent to a length of an upward arrow line (a) in FIG. 18A is the advance correction limit value SgL. Note that the upward arrow line indicates a case where the advance correction limit value SgL has the plus sign. 5 [0080] Assume that next, the motor output toque Tm has decreased and has changed in a minus direction, and the torsion angle has passed through a hysteresis portion of upper and left sides on the reduction gear error characteristic map, and has 10 changed to a value of (2) indicated by a triangle mark in FIG. 18A. In this case, a value obtained by subtracting the value (the reference error characteristic Sg0) indicated by the square mark from the value indicated by the triangle mark in FIG. 18A is the advance correction limit value SgL at the time 15 of (2). In other words, an angle amount equivalent to a length of an upward arrow line (b) in FIG. 18A is the advance correction limit value SgL. [0081] On the other hand, for example, as illustrated in FIG. 20 18B, assume that during the increase of the motor output torque Tm in the plus side, the torsion angle has had a value of the hysteresis portion on the right side of the reduction gear error characteristic map, and then, correction using the e has been performed in timing of “ON” incorrection angle 25 FIG. 18B. In this case also, a value of the timing of “ON” indicated by a square mark in FIG. 18B is set as the reference error characteristic Sg0. Then, assume that the motor output torque Tm has increased in the plus direction, and the torsion - 59 - angle has changed to a value of (1) indicated by a white circle in FIG. 18B. In this case, a value obtained by subtracting the value (the reference error characteristic Sg0) indicated by the square mark from the value indicated by the white circle 5 in FIG. 18B is the advance correction limit value SgL at the time of (1). In other words, an angle amount equivalent to a length of an upward arrow line (a) in FIG. 18B is the advance correction limit value SgL. [0082] 10 Assume that next, the motor output toque Tm has had a plus maximum value and then has changed toward a minus direction side, and the torsion angle has passed through a hysteresis portion of upper and left sides on the reduction gear error characteristic map, and has changed to a value of 15 (2) indicated by a triangle mark in FIG. 18B. In this case also, a value obtained by subtracting the value (the reference error characteristic Sg0) indicated by the square mark from the value indicated by the triangle mark in FIG. 18B is the advance correction limit value SgL at the time of (2). 20 However, in the example illustrated in FIG. 18B, the value indicated by the triangle mark is larger than the value (the reference error characteristic Sg0) indicated by the square mark in the minus side, so that the subtraction result has the minus sign. In other words, an angle amount equivalent 25 to a length of a downward arrow line (b) in FIG. 18B is the advance correction limit value SgL and has a minus value. Note that the reduction gear error characteristic maps of FIGs. 18A and 18B are those simplified for description, - 60 - and are different from the reduction gear error characteristic map of FIG. 16. [0083] (Advance Permission Determination Unit 66) 5 Next, with reference to FIG. 19, a description will be given of a specific structure of the advance permission determination unit 66. The advance permission determination unit 66 includes subtraction units 66a and 66c, an addition unit 66b, sign 10 acquisition units 66d and 66e, a coincidence determination unit 66f, an angular velocity switching unit 66g, an advance correction amount past value switching unit 66h, and a signal delay unit 66i, as illustrated in FIG. 19. The subtraction unit 66a subtracts the output shaft os input from the output shaft angular15 angular velocity velocity calculation unit 53a from the post-advance steering osc input from the multiplication unit 62angular velocity to calculate the advance correction update amount Cr. Then, the subtraction unit 66a outputs the calculated advance 20 correction update amount Cr to the addition unit 66b. In other words, the subtraction unit 66a calculates an increased os in eachamount of the output shaft angular velocity steering direction by advance correction. [0084] 25 The addition unit 66b adds, to the advance correction update amount Cr input from the subtraction unit 66a, an advance correction amount past value Ct(n - 1) that is a previous advance correction amount Ct input from the signal - 61 - delay unit 66i to calculate the advance correction amount Ct. Then, the addition unit 66b outputs the calculated advance correction amount Ct to the subtraction unit 66c. The subtraction unit 66c subtracts the advance 5 correction amount Ct input from the addition unit 66b from the advance correction limit value SgL input from the advance correction limit value calculation unit 65 to calculate advance direction information ds. Then, the subtraction unit 66c outputs the calculated advance direction information 10 ds to the sign acquisition unit 66e. [0085] The sign acquisition unit 66d acquires a sign of the os input from the output shaftoutput shaft angular velocity angular velocity calculation unit 53a, and outputs the 15 acquired sign information to the coincidence determination unit 66f. For example, the sign acquisition unit 66d outputs, “steering direction = 1” in the case of the plus sign, “steering direction = -1” in the case of the minus sign, and os = 0” to the“steering direction = 0” in the case of “ 20 coincidence determination unit 66f. The sign acquisition unit 66e acquires a sign of the advance direction information ds input from the subtraction unit 66c, and outputs the acquired sign information as an advance direction to the coincidence determination unit 66f. 25 For example, the sign acquisition unit 66e outputs, “advance direction = 1” in the case of the plus sign, “advance direction = -1” in the case of the minus sign, and “advance direction - 62 - = 0” in the case of “ds = 0” to the coincidence determination unit 66f. [0086] The coincidence determination unit 66f compares the 5 steering direction input from the sign acquisition unit 66d with the advance direction input from the sign acquisition unit 66e to determine whether both are coincident or not. Then, the coincidence determination unit 66f outputs a determination result Pa to the angular velocity switching 10 unit 66g and the advance correction amount past value switching unit 66h, respectively. For example, the coincidence determination unit 66f outputs “Pa = 1” when both have been determined to be coincident, and outputs “Pa = 0” when both have been determined not to be coincident. 15 On the basis of the determination result Pa input from the coincidence determination unit 66f, the angular velocity switching unit 66g switches an angular velocity that is to sc to thebe output as the final steering angular velocity estimated angle calculation unit 55 to any one of the output os input from the output shaft angular20 shaft angular velocity velocity calculation unit 53a or the post-advance steering osc input from the multiplication unit 62.angular velocity [0087] Specifically, the angular velocity switching unit 66g osc as25 outputs the post-advance steering angular velocity sc when thethe final steering angular velocity determination result Pa is “1” indicating coincidence, and os as the finaloutputs the output shaft angular velocity - 63 - sc when the determination resultsteering angular velocity Pa is “0” indicating noncoincidence. In other words, when the steering direction is coincident with the advance direction, advance amount correction using the post-advance osc is permitted, whereas when5 steering angular velocity the directions are not coincident, advance amount correction is not permitted. [0088] Specifically, when “the present advance correction advance correction limit value SgL”, advance is10 amount Ct permitted only when the advance direction is “-1”. On the other hand, when “the present advance correction amount Ct advance correction limit value SgL”, advance is permitted only when the advance direction is “1”. 15 On the basis of the determination result Pa input from the coincidence determination unit 66f, the advance correction amount past value switching unit 66h switches an advance correction amount to be output to the signal delay unit 66i to any one of the advance correction amount Ct input 20 from the addition unit 66b or the advance correction amount past value Ct(n - 1) input from the signal delay unit 66i. [0089] Specifically, the advance correction amount past value switching unit 66h outputs the advance correction amount Ct 25 when the determination result Pa is “1” indicating coincidence, and outputs the advance correction amount past value Ct(n - 1) when the determination result Pa is “0” indicating noncoincidence. In other words, when performing - 64 - advance correction, the advance correction amount past value Ct(n - 1) retained in the signal delay unit 66i is updated to a present advance correction amount Ct, whereas when not performing advance correction, the previous value (Ct(n - 1)) 5 is retained as it is. The signal delay unit 66i outputs the value input from the advance correction amount past value switching unit 66h by delaying the value for one control period. In other words, the signal delay unit 66i outputs the advance correction 10 amount past value Ct(n - 1) that is an advance correction amount delayed for one control period to the addition unit 66b and the advance correction amount past value switching unit 66h. [0090] 15 In addition, the signal delay unit 66i performs processing for resetting the retained advance correction amount past value Ct(n - 1) to “0” in timing of input of “CTF = 1” on the basis of the correction timing flag CTF input from the correction angle calculation unit 53d. In other words, 20 the signal delay unit 66i resets the advance correction amount Ct to “0” by resetting the advance correction amount past value Ct(n - 1) to “0”. Here, in the first embodiment, the addition unit 66b adds the advance correction amount past value Ct(n - 1) to the 25 advance correction update amount Cr to calculate the advance correction amount Ct. This means that the advance correction amount Ct is calculated by integration of the advance correction update amount Cr. - 65 - [0091] Additionally, in timing (CTF = 0 → 1) where correction e has been performed, theusing the correction angle reference error characteristic Sg0 is updated, as well as the 5 advance correction limit value SgL is reset to “0”. As a result, the reference position is updated, so that the advance correction amount Ct needs to be reset to “0” in accordance with the update. Specifically, in the first embodiment, as illustrated in FIG. 20, the advance correction amount Ct is 10 reset to “0” in timing of the correction using the correction e, and the advance correction update amount Cr fromangle that time up to the present is integrated to calculate the advance correction amount Ct up to the present. [0092] 15 (Advance Permission Determination Processing) Next, with reference to FIG. 21, a description will be given of a specific processing content of advance permission determination processing that is executed by the advance permission determination unit 66. The advance permission 20 determination processing is processing of a subprogram that is called by the main program and executed. Upon execution of the advance permission determination processing by the CPU of the motor electrical angle detection circuit 24, the processing first proceeds to step S601, as 25 illustrated in FIG. 21. At step S601, the subtraction unit 66a subtracts the os from the inputinput output shaft angular velocity osc to calculate thepost-advance steering angular velocity - 66 - advance correction update amount Cr. Then, the subtraction unit 66a outputs the calculated advance correction update amount Cr to the addition unit 66b, and the processing proceeds to step S603. 5 [0093] At step S603, the addition unit 66b adds the input advance correction amount past value Ct(n - 1) to the input advance correction update amount Cr to calculate the advance correction amount Ct. Then, the addition unit 66b outputs 10 the calculated advance correction amount Ct to the subtraction unit 66c and the advance correction amount past value switching unit 66h, respectively. After that, the processing proceeds to step S604. At step S604, the sign acquisition unit 66d calculates 15 the steering direction from the input output shaft angular os, and outputs the calculated steering directionvelocity to the coincidence determination unit 66f. Then, the processing proceeds to step S605. Specifically, the sign acquisition unit 66d uses, for 20 example, a sign function “sign” to calculate the steering os)”.direction from “steering direction = sign ( [0094] At step S605, the subtraction unit 66c subtracts the input advance correction amount Ct from the input advance 25 correction limit value SgL to calculate the advance direction information ds, and outputs the calculated advance direction information ds to the sign acquisition unit 66e. Next, the sign acquisition unit 66e calculates the advance direction - 67 - from the advance direction information ds, and outputs the calculated advance direction to the coincidence determination unit 66f. Then, the processing proceeds to step S607. 5 Specifically, the sign acquisition unit 66e uses, for example, a sign function “sign” to calculate the advance direction from “advance direction = sign(ds = SgL - Ct)”. [0095] At step S607, the coincidence determination unit 66f 10 determines whether or not the advance direction is coincident with the steering direction, on the basis of the input steering direction and the input advance direction. Then, when both directions have been determined to be coincident (Yes), the coincidence determination unit 66f outputs the 15 determination result “Pa = 1” indicating permission of advance to the angular velocity switching unit 66g and the advance correction amount past value switching unit 66h, respectively. Then, the processing proceeds to step S609. On the other hand, when the directions have been determined 20 not to be coincident (No), the coincidence determination unit 66f outputs the determination result “Pa = 0” indicating non-permission of advance to the angular velocity switching unit 66g and the advance correction amount past value switching unit 66h, respectively. Then, the processing 25 proceeds to step S613. [0096] When the processing has proceeded to step S609, the angular velocity switching unit 66g outputs, on the basis of - 68 - the input determination result “Pa = 1”, the post-advance osc as the final steering angularsteering angular velocity sc to the estimated angle calculation unit 55.velocity Then, the processing proceeds to step S611. 5 At step S611, on the basis of the input determination result “Pa = 1”, the advance correction amount past value switching unit 66h updates the retained value (Ct(n - 1)) of the signal delay unit 66i to the advance correction amount Ct calculated at step S603, ends the series of processing, 10 and returns to the calling processing. [0097] On the other hand, when both directions have been determined not to be coincident at step S607, and the processing has proceeded to step S613, the angular velocity 15 switching unit 66g outputs, on the basis of input determination result “Pa = 0”, the output shaft angular os as the steering angular velocity to the estimatedvelocity angle calculation unit 55. Then, the processing proceeds to step S615. 20 At step S615, on the basis of input determination result “Pa = 0”, the advance correction amount past value switching unit 66h retains the retained value (Ct(n - 1)) of the signal delay unit 66i as it is, without updating. Then, the advance correction amount past value switching unit 66h ends the 25 series of processing, and returns to the calling processing. [0098] (Estimated Angle Calculation Unit 55) - 69 - Next, with reference to FIG. 19, a description will be given of a specific structure of the estimated angle calculation unit 55. As illustrated in FIG. 19, the estimate angle calculation 5 unit 55 includes a matching unit 55a and an integration unit 55b. Since the reduction gear 21 is interposed between the output shaft rotation angle sensor 13c and the electric motor 22, the matching unit 55a performs calculation for matching sc to that after the10 the final steering angular velocity interposition. Specifically, the matching unit 55a sc input frommultiplies the final steering angular velocity the advance permission determination unit 66 by a reduction ratio RGr and a number of pole pairs P. Then, the matching 15 unit 55a outputs a post-multiplication final steering angular sc’ to the integration unit 55b.velocity [0099] The integration unit 55b integrates the input final sc’, and outputs a value of thesteering angular velocity m2 to the20 integration as the second motor electrical angle electrical angle selection unit 24C. Additionally, on the basis of the correction timing flag CTF input from the correction angle calculation unit 53d and e, the integration unit 55b performsthe correction angle 25 processing of changing the value of the integration to the e when the input correction timinginput correction angle flag CTF is “1”. In other words, the integration unit 55b - 70 - performs processing of correcting the second motor electrical e.m2 to the correction angle angle [0100] (Operation) 5 Next, operations of the first embodiment will be described with reference to FIG. 22. When in an operation stopped state where the IGN switch 28 is in an OFF state and the vehicle 2 is not running, as well as steering assist control processing also is not running, 10 the control calculation device 31 and the motor electrical angle detection circuit 24 of the motor control device 25 are in non-operating states. Due to that, various kinds of processing to be executed by the control calculation device 31 and the motor electrical 15 angle detection circuit 24 are not running. In this state, the electric motor 22 is in a non-operating state, so that no steering assist force is being output to a steering mechanism. [0101] 20 When the IGN switch 28 is turned ON from the operation stopped state, the control calculation device 31 and the motor electrical angle detection circuit 24 are brought into operating states, thereby starting the various kinds of processing such as detection processing of the motor m and the steering assist control25 electrical angle processing. In this case, the resolver 23 is assumed to be normal. - 71 - At that time, the abnormality detection signal SAr has a value indicating that there is no abnormality, and the electrical angle selection unit 24C outputs, as the motor m1m, the first motor electrical angle electrical angle 5 calculated by the main electrical angle detection circuit 24A to the control calculation device 31. [0102] The control calculation device 31 calculates a d-axis current command value Id* and a q-axis current command value m. Then, on10 Iq* on the basis of the motor electrical angle the basis of the d-axis current command value Id* and the q-axis current command value Iq*, the control calculation device 31 calculates three-phase motor voltage command values Va*, Vb*, and Vc* for the motor drive circuit 32, and outputs 15 the calculated three-motor voltage command values Va*, Vb*, and Vc* to the motor drive circuit 32. As a result, the motor drive circuit 32 drive controls the inverter circuit 42, whereby the electric motor 22 is drive controlled (commutated controlled). 20 [0103] On the other hand, when the resolver 23 becomes abnormal, the backup electrical angle detection circuit 24B performs calculation processing of the second motor electrical angle c andm2. Here, initial values of the intermediate angle c_sht are set to values25 the post-shifting intermediate angle close to normal values before the resolver 23 becomes abnormal. Other signals are initialized with an initial value “0”. - 72 - Specifically, the counter electromotive force angle correction value calculation unit 53 of the backup electrical angle detection circuit 24B first calculates the output shaft os by differentiating the output shaftangular velocity os, and calculates the respective line5 rotation angle counter electromotive force values EMF on the basis of the motor phase voltages Va to Vc and the motor phase currents Ia to Ic. Next, the counter electromotive force angle correction value calculation unit 53 compares the absolute 10 values of the respective line counter electromotive force values EMF with the predetermined threshold value Thv. When the absolute values thereof have been determined to be equal to or more than the predetermined threshold value Thv, a determination is made that it is not the dead zone state (F 15 =0) (Yes at step S103, and step S105). On the other hand, when the absolute values thereof have been determined to be less than the predetermined threshold value Thv, a determination is made that it is the dead zone state (F = 1) (No at step S103, and step S115). 20 [0104] When it has been determined not to be the dead zone state, next, signs of the respective line counter electromotive force values EMF are acquired (step S107), and a sign of the os is acquired (step S109).output shaft angular velocity 25 Then, on the basis of the acquired sign information and the map information illustrated in FIG. 9, the absolute angle c are determined (stepregion Z and the intermediate angle S111). Here, since the motor rotation direction (positive - 73 - direction or reverse direction) is obtained from the sign of os, the absolute anglethe output shaft angular velocity c can be uniquelyregion Z and the intermediate angle determined from the motor rotation direction and the sign 5 relationship among the respective line counter electromotive force values EMF. For example, when the motor rotation direction is the positive direction and the sign relationship between the respective line counter electromotive force values EMF represent (+, −, −), the absolute angle region Z c is “9010 is “60 to 120 [deg_el]”, and the intermediate angle [deg]”. [0105] Next, on the basis of the determined present intermediate c(n − 1), and thec, the previous intermediate angle angle c_sht(n − 1), the15 previous post-shifting intermediate angle c_sht is calculated (steppost-shifting intermediate angle S113). c(n − 1) is 30 [deg] andFor example, when the previous cc is 90 [deg], the difference value Sht (= the present c(n − 1)) is 60 [deg] (step S201, and No at step S203).20 − Therefore, the present post-shifting intermediate angle c − 30 [deg] (step S209)”.c_sht = c_sht is 60 [deg] from “ [0106] Next, since the dead zone state value is “F = 0” (Yes 25 at step S301), the counter electromotive force angle correction value calculation unit 53 determines whether or not the present absolute angle region Z is one that has shifted - 74 - to an adjacent region with respect to the previous absolute angle region Z(n − 1) (step S303). Here, assume that the previous absolute angle region Z(n − 1) is “0 to 60 [deg_el]”, and the present absolute angle 5 region Z is “60 to 120 [deg_el]”. This case indicates that it is the one that has shifted to the adjacent region (Yes at step S303). Thus, it is next determined whether or not c_sht has changed (stepthe post-shifting intermediate angle S305). 10 [0107] Additionally, assume that the post-shifting c_sht is 0 [deg]. As described above,intermediate angle c_sht issince the present post-shifting intermediate angle 60 [deg] when shifting from 0 to 60 [deg_el] to 60 to 120 15 [deg_el], a determination is made that the post-shifting c_sht has changed (Yes at step S305).intermediate angle Next, on the basis of the sign of the output shaft angular os and the sign of region shifting direction (invelocity which the positive direction is defined as “+”), it is 20 determined whether or not the shifting direction is the same as the output shaft rotation direction (step S307). Here, osassume that the sign of the output shaft angular velocity is “+”, and therefore the directions have been determined to be the same (Yes at step S307). As a result, the shifting 25 to the adjacent region is determined. [0108] Next, a boundary angle between the previous and present e (stepabsolute angle regions is set as the correction angle - 75 - S309), and then, the correction timing flag CTF is set to “1” e is set to 60 [deg](step S311). Here, the correction angle that is the boundary angle between the absolute angle regions 0 to 60 [deg_el] and 60 to 120 [deg_el]. After that, the 5 correction timing flag CTF with the value of “1” (hereinafter referred to as “correction timing flag CTF (1)” is output to the inter-sensor error correction unit 54 and the estimated angle calculation unit 55, respectively, and the correction e is output to the estimated angle calculation unitangle 10 55 (step S313). [0109] On the other hand, in the inter-sensor error correction unit 54 of the backup electrical angle detection circuit 24B, the advance gain calculation unit 61 calculates the advance 15 gain Gad from the input steering torque Th by using map information of FIG. 15. Then, the calculated advance gain Gad is output to the multiplication unit 62. In the first embodiment, when the steering torque Th is equal to or more than the predetermined torque value Tht, a value larger than 20 “1” is output as the advance gain Gad, whereas when it is less than the predetermined torque value Tht, “1” is output as the advance gain Gad (see FIG. 15). [0110] The multiplication unit 62 multiplies the input output os by the input advance gain Gad to25 shaft angular velocity osc.calculate the post-advance steering angular velocity Then, the multiplication unit 62 outputs the calculated - 76 - osc to the advancepost-advance steering angular velocity permission determination unit 66. In addition, the motor torque equivalent value calculation unit 63 of the inter-sensor error correction unit 5 54 calculates the q-axis current Iq as the motor torque equivalent value Tm’ on the basis of the motor phase currents Ia to Ic. Then, the calculated motor torque equivalent value Tm’ is output to the reduction gear error characteristic calculation unit 64. 10 The reduction gear error characteristic calculation unit 64 calculates, as the reduction gear error characteristic Sg, an angle error (torsion angle) corresponding to the input motor torque equivalent value Tm’ by using map information illustrated in FIG. 16, and outputs 15 the calculated reduction gear error characteristic Sg to the advance correction limit value calculation unit 65. [0111] The advance correction limit value calculation unit 65 calculates the advance correction limit value SgL on the basis 20 of the input reduction gear error characteristic Sg and the correction timing flag CTF. Specifically, every time the correction timing flag CTF becomes “1” from “0”, the input reduction gear error characteristic Sg is set to the reference error 25 characteristic Sg0 in that timing (step S501, Yes at step S503, and step S505). In other word, every time the correction timing flag CTF changes from “0” to “1”, the set reference - 77 - error characteristic Sg0 is updated to the input reduction gear error characteristic Sg. [0112] Then, in timing of each calculation of the advance 5 correction limit value SgL thereafter, a subtraction result obtained by subtracting the set reference error characteristic Sg0 from the input reduction gear error characteristic Sg in timing of each calculation is calculated as the advance correction limit value SgL (step S507). Then, 10 the calculated advance correction limit value SgL is output to the advance permission determination unit 66 (step S509). [0113] Additionally, in the advance permission determination unit 66, the subtraction unit 66a subtracts the input output os from the input post-advance15 shaft angular velocity osc to calculate the advancesteering angular velocity correction update amount Cr. Then, the calculated advance correction update amount Cr is output to the addition unit 66b (step S601). Next, the addition unit 66b adds the advance 20 correction amount past value Ct(n − 1) to the advance correction update amount Cr to calculate the advance correction amount Ct. Then, the calculated advance correction amount Ct is output to the subtraction unit 66c (step S603). 25 [0114] Next, using a sign function, the sign acquisition unit os)) of the output66e calculates sign information (sign( os. Then, the calculated signshaft angular velocity - 78 - information is output as steering direction to the coincidence determination unit 66f (step S604). Subsequently, the subtraction unit 66c subtracts the advance correction amount Ct from the advance correction 5 limit value SgL to calculate the advance direction information ds. Then, the calculated advance direction information ds is output to the sign acquisition unit 66d. Next, by using a sign function, the sign acquisition unit 66d calculates sign information (sign(ds)) of the advance 10 direction information ds. Then, the calculated sign information is output as advance direction to the coincidence determination unit 66f (step S605). [0115] Subsequently, the coincidence determination unit 66f 15 determines whether or not the input advance direction is the same as the input steering direction (step S607). Then, when both directions have been determined to be the same, the coincidence determination unit 66f outputs the determination result “Pa = 1” to the angular velocity switching unit 66g 20 and the advance correction amount past value switching unit 66h, respectively (Yes at step S607). On the other hand, when they have been determined not to be the same direction, the coincidence determination unit 66f outputs the determination result “Pa = 0” to the angular velocity switching unit 66g 25 and the advance correction amount past value switching unit 66h, respectively (No at step S607). Next, when “Pa =1”, the angular velocity switching unit sc, the66g outputs, as the final steering angular velocity - 79 - osc to the estimatedpost-advance steering angular velocity angle calculation unit 55 (step S609), and when “Pa = 0”, sc, theoutputs, as the final steering angular velocity os to the estimated angleoutput shaft angular velocity 5 calculation unit 55 (step S613). [0116] sc,Upon input of the final steering angular velocity in the estimated angle calculation unit 55, the matching unit sc55a multiplies the input final steering angular velocity 10 by the reduction ratio RGr and the number of pole pairs P, sc’ to the integrationand outputs the multiplication result unit 55b. The integration unit 55b integrates the input sc’. On the other hand, when themultiplication result correction timing flag CTF input from the counter 15 electromotive force angle correction value calculation unit 53 has changed from “0” to “1”, the integration unit 55b changes a value of the integration at that time to the e input from the counter electromotivecorrection angle force angle correction value calculation unit 53. 20 Specifically, the estimated angle calculation unit 55 oscintegrates the post-advance steering angular velocity when the advance direction is coincident with the steering direction, and integrates the output shaft angular velocity os when the advance direction is not coincident with the 25 steering direction. [0117] On the other hand, when “Pa = 1”, the advance correction amount past value switching unit 66h outputs the advance - 80 - correction amount Ct to the signal delay unit 66i, and the signal delay unit 66i updates the retained advance correction amount past value Ct(n − 1) to the advance correction amount Ct (step S611). On the other hand, when “Pa = 0”, the advance 5 correction amount past value switching unit 66h outputs the advance correction amount past value Ct(n − 1) to the signal delay unit 66i. In other words, the signal delay unit 66i retains the retained advance correction amount past value Ct(n − 1) as it is (step S615). 10 Additionally, when the correction timing flag CTF input from the counter electromotive force angle correction value calculation unit 53 has changed from “0” to “1”, the signal delay unit 66i resets the retained value at that time to “0”. [0118] 15 Next, operation of the advance permission determination unit 66 will be described by using a specific example. An example of FIG. 22 illustrates steering in a situation where, for example, motor output increases to some extent in steering during parking. 20 In FIG. 22, in an upper diagram of the drawing, the vertical axis represents angle [deg]; in a middle diagram of the drawing, the vertical axis represents motor output torque Tm [Nm]; and in a lower diagram of the drawing, the vertical axis represents steering direction (“1” when the sign of the os is the + sign, and “−1” when25 output shaft angular velocity it is the − sign). In addition, in all the diagrams, the horizontal axis represents time [s]. Additionally, in the upper diagram of the drawing, the solid line indicates the - 81 - advance correction amount Ct, and the broken line indicates the advance correction limit value SgL. [0119] In a period (1) of FIG. 22, the motor output torque Tm 5 has increased on a plus side in accordance with steering of a driver in the “+” direction, and along with this, the advance correction limit value SgL also has increased on the plus side. Additionally, the sign of the steering direction is “+”, and the sign of the advance direction (sign(ds = SgL − Ct)) also 10 is “+”. Thus, since the steering direction is coincident with the advance direction, the advance permission determination unit 66 permits advance by integration of the post-advance osc.steering angular velocity Next, in a period (2) of FIG. 22, the driver goes into 15 a steering holding state, and thereby change of the motor output torque Tm is stopped, so that change of the advance correction limit value SgL also is stopped. On the other hand, the sign of the steering direction is “+”, and that of the advance direction (sign(ds)) also is “+”. Thus, since the 20 steering direction is coincident with the advance direction, the advance permission determination unit 66 permits advance by integration of the post-advance steering angular velocity osc. [0120] 25 Subsequently, in a period (3) of FIG. 22, the steering holding state of the driver is continuing, and the change of the motor output torque Tm and the change of the advance correction limit value SgL still remain stopped. - 82 - Additionally, due to the advance by the integration of the osc in the periodpost-advance steering angular velocity (2), the advance correction amount Ct is substantially coincident with the advance correction limit value SgL. Thus, 5 the advance direction (sign(ds)) when performing the integration of the post-advance steering angular velocity osc becomes “−”. In addition, since the steering direction at that time is “+”, the steering direction is not coincident with the advance direction. Accordingly, the advance 10 permission determination unit 66 does not permit advance by integration of the post-advance steering angular velocity osc. [0121] Subsequently, in a period (4) of FIG. 22, while the driver 15 is maintaining the steering holding state, the motor output torque Tm begins to decrease. Along with this, the advance correction limit value SgL also decreases. In this period, the steering direction is “+”, whereas the advance direction (sign(ds)) is “−”. Thus, since the steering direction is not 20 coincident with the advance direction, the advance permission determination unit 66 does not permit advance by the integration of the post-advance steering angular velocity osc. [0122] 25 Next, in a period (5) of FIG. 22, the driver performs return-to-center steering operation, whereby the motor output torque Tm further decreases, and soon goes into the minus direction, where the sign thereof becomes “−”. Along - 83 - with this, the advance correction limit value SgL also decreases, and then becomes a minus value, so that the sign thereof is “−”. In this period, the steering direction is “−”, and the advance direction (sign(ds)) is “−”. Thus, since 5 the steering direction is coincident with the advance direction, the advance permission determination unit 66 permits advance by integration of the post-advance steering osc.angular velocity [0123] 10 Herein, the output shaft rotation angle sensor 13c corresponds to a steering angle detection unit; the output shaft angular velocity calculation unit 53a corresponds to a steering angular velocity calculation unit; the estimated angle calculation unit 55 corresponds to a motor electrical 15 angle estimation unit; and the control calculation device 31 corresponds to a motor drive control unit. Additionally, the resolver 23 and the main electrical angle detection circuit 24A correspond to a motor electrical angle detection unit; the advance gain calculation unit 61 20 corresponds to an advance gain setting unit; the multiplication unit 62 corresponds to a post-advance steering angular velocity calculation unit; and the second motor m2 corresponds to an estimated motorelectrical angle electrical angle. 25 [0124] In addition, the steering torque sensor 13 corresponds to a steering torque detection unit; the advance permission determination unit 66 corresponds to an advance correction - 84 - osamount control unit; the output shaft angular velocity corresponds to motor rotation direction information; and the correction timing flag CTF with the value of “1” corresponds to correction timing information. 5 Furthermore, the counter electromotive force angle correction value calculation unit 53 and the estimated angle calculation unit 55 correspond to a counter electromotive force angle correction unit; the motor output torque Tm and the motor torque equivalent value Tm’ correspond to motor 10 output torque information;, the reduction gear error characteristic Sg corresponds to an angle error; and the reference error characteristic Sg0 corresponds to a reference angle error. [0125] 15 (Functions and Effects of First Embodiment) In the motor control device 25 according to the first embodiment, the output shaft angular velocity calculation osunit 53a calculates the output shaft angular velocity os detectedon the basis of the output shaft rotation angle 20 by the output shaft rotation angle sensor 13c. On the basis os, the estimated angleof the output shaft angular velocity calculation unit 55 calculates the second motor electrical m2 that is an estimated value of the motor electricalangle m of the electric motor 22. When the resolver 23 isangle 25 normal, the control calculation device 31 drive controls the electric motor 22 on the basis of the first motor electrical m1 calculated by the main electrical angle detectionangle circuit 24A. When the resolver 23 is abnormal, the control - 85 - calculation device 31 drive controls the electric motor 22 m2on the basis of the second motor electrical angle calculated by the estimated angle calculation unit 55. On the basis of the steering torque Th, the advance gain 5 calculation unit 61 calculates the advance gain Gad for correcting an advance amount of the second motor electrical m2. Specifically, only upon iangle nput of the steering torque Th equal to or more than the pre-set predetermined torque value Tht, the advance gain calculation unit 61 10 calculates the advance gain Gad for advancing the second motor m2 in a direction cancelling an angle errorelectrical angle of a direction delayed with respect to a steering direction. In addition, the set predetermined torque value Tht is a boundary value indicating whether or not influence due to the 15 angle error appears as handling feeling of a driver. The multiplication unit 62 multiplies the output shaft angular os by the advance gain Gad calculated by the advancevelocity gain calculation unit 61 to calculate the post-advance osc. Then, the estimated anglesteering angular velocity 20 calculation unit 55 integrates the post-advance steering osc calculated by the multiplication unitangular velocity m2 on the62 to calculate the second motor electrical angle basis of a value of the integration. [0126] 25 With respect to input of the steering torque Th equal to or more than the pre-set predetermined torque value Tht, the above structure enables calculation of the post-advance osc for advancing the second motorsteering angular velocity - 86 - m2 in a direction cancelling an angle errorelectrical angle of a direction delayed with respect to a steering direction. In the first embodiment, the predetermined torque value Tht has been set to the boundary value indicating whether or not 5 influence due to the angle error appears as handling feeling. Thus, correction can be performed only in timing where influence due to the angle error appears as handling feeling. This can reduce an angle error of a direction delayed with respect to a steering direction in a simpler structure than 10 the conventional ones. [0127] Additionally, in the motor control device 25 according to the first embodiment, furthermore, the counter electromotive force angle correction value calculation unit 15 53 and the estimated angle calculation unit 55 correct the m2 on the basis of thesecond motor electrical angle respective line counter electromotive force values EMF of the electric motor 22. Specifically, in the first embodiment, the counter 20 electromotive force angle correction value calculation unit 53 and the estimated angle calculation unit 55 calculate the absolute angle regions Z by dividing an angle range (the range m by 60) of one cycle of the motor electrical angle of 360 (see FIG. 9). In addition, on the basis of the output shaft os that is motor rotation information and25 angular velocity the sign relationship among the respective line counter electromotive force values EMF, the absolute angle region Z m is present iswhere an actual motor electrical angle - 87 - determined, and the timing of shifting of the absolute angle region Z to an adjacent region is detected. Then, in the detected timing (correction timing), the second motor m2 is corrected on the basis of the boundaryelectrical angle e) between the absolute angle5 angle (correction angle regions before and after the shifting. In the first embodiment, correction to change the value of the integration by the integration unit 55b to the boundary angle (correction e) is performed.angle 10 [0128] With this structure, the second motor electrical angle m2 can be corrected, at the timing of shifting of the absolute angle region to the adjacent region, by using the boundary angle between the absolute angle regions before and after the 15 shifting. Here, the boundary angle is a known electrical angle, and therefore is more reliable angle information than angle information obtained from the output shaft angular os. Then, since the second motor electrical anglevelocity m2 can be corrected by the highly reliable angle information, m can20 accuracy in estimation of the motor electrical angle be improved. [0129] In addition, in the motor control device 25 according to the first embodiment, furthermore, the absolute angle EMF25 region determination unit 53c compares an absolute value of the maximum value of the respective line counter electromotive force values EMF with the predetermined threshold value Thv, and performs correction using the - 88 - is equal toEMFboundary angle only when the absolute value or more than the predetermined threshold value Thv. Here, at low motor rotation speeds, the respective line counter electromotive forces are very small, which reduces 5 reliability of the acquired values of the sign relationship. The above structure can prevent correction using a low-reliable boundary angle from being performed at low motor rotation speeds, so that reduction in estimation accuracy at low motor rotation speeds can be prevented. 10 [0130] Additionally, in the motor control device 25 according to the first embodiment, the absolute angle region determination unit 53c further calculates the intermediate c of the absolute angle region Z. In addition, theangle 15 absolute angle region determination unit 53c determines the c hasshifting direction in which the intermediate angle shifted, and calculates a new post-shifting intermediate c inc_sht by shifting the intermediate angle angle accordance with the determined shifting direction. The 20 correction angle calculation unit 53d sets the above correction timing to the time when the absolute angle region Z has shifted to the adjacent region and the post-shifting c_sht has changed.intermediate angle [0131] 25 Here, the sign relationship among the respective line counter electromotive force values EMF is easily switched around the switching boundary angle of the absolute angle - 89 - region Z, so that the absolute angle region determination may cause hunting between the adjacent regions. In the above structure, the post-shifting intermediate c_sht is configured not to shift when the hunting occurs.angle 5 Thus, adding as a correction timing condition enables more m2.accurate correction of the second motor electrical angle [0132] Additionally, in the motor control device 25 according to the first embodiment, furthermore, the advance correction 10 limit value calculation unit 65 calculates the advance correction limit value SgL that is the limit value of the advance correction amount Ct that is the integrated amount of an increased portion of the post-advance steering angular osc, on the basis of the error characteristic ofvelocity 15 the error factor causing an angle error. The advance permission determination unit 66 controls integration oscprocessing of the post-advance steering angular velocity in the estimated angle calculation unit 55 so that the advance correction amount Ct does not exceed the advance correction 20 limit value SgL calculated by the advance correction limit value calculation unit 65. [0133] Specifically, every time the above shifting time is detected, the counter electromotive force angle correction 25 value calculation unit 53 outputs the correction timing flag CTF (1) indicating correction timing of the second motor m2 to the advance correction limit valueelectrical angle calculation unit 65 and the advance permission determination - 90 - unit 66. In timing of each correction on the basis of the input correction timing flag CTF (1), the advance correction limit value calculation unit 65 calculates the reduction gear error characteristic Sg corresponding to the motor torque 5 equivalent value Tm’ (q-axis current Iq) at that time, as the reference error characteristic Sg0. Then, a difference value between the calculated reference error characteristic Sg0 and the reduction gear error characteristic Sg in timing of each calculation thereafter is calculated as the advance 10 correction limit value SgL in timing of each calculation. The advance permission determination unit 66 integrates the advance correction update amount Cr to calculate the advance correction amount Ct, and resets the value of the integration of the advance correction update amount Cr to 0 in timing of 15 each correction on the basis of the correction timing flag CTF (1). In other words, the advance correction amount past value Ct(n − 1) retained in the signal delay unit 66i is reset to 0. [0134] 20 With this structure, the advance correction limit value SgL is calculated on the basis of the reduction gear error characteristic Sg, whereby integration processing of the osc can be controlledpost-advance steering angular velocity so that the advance correction amount Ct does not exceed the 25 advance correction limit value SgL. As a result, in situations where the steering torque Th increases at low motor rotation speed, such as pressing abutment against the rack end and hitting a curb with tire, it is possible to prevent - 91 - occurrence of excessive advance such that exceeds the amount of angle error caused by the reduction gear 21. As a result, assist efficiency reduction and the loss of synchronism due to the excessive advance can be prevented. 5 [0135] In addition, the reference error characteristic Sg0 is configured to be updated in timing of each correction using the boundary angle. Thus, even when correction using the boundary angle has been performed and thereby the second motor m2 has suddenly changed, the advance10 electrical angle correction limit value SgL can be calculated from a new reference, so that prevention of occurrence of excessive advance can be further ensured. Furthermore, the electric power steering device 1 15 according to the first embodiment includes the motor control device 25. With the structure, there can be obtained the same functions and effects as those of the motor control device 25. In addition, even when abnormality occurs in the resolver 20 23 and the motor electrical angle detection circuit 24, the electric motor 22 can be drive controlled by the second motor m2, whereby the steering assist functionelectrical angle of the electric power steering device 1 can be continued. [0136] 25 (Second Embodiment) Next, the second embodiment of the present invention will be described. (Structure) - 92 - The first embodiment has been configured so that the advance correction limit value SgL is calculated by considering only the reduction gear error characteristic of the reduction gear 21. However, the second embodiment is 5 different from the first embodiment in that the second embodiment considers a detection error characteristic of the output shaft rotation angle sensor 13c as well as the reduction gear error characteristic. Other than that, the second embodiment has the same structure as that of the first 10 embodiment. Hereinafter, the same component units as those of the first embodiment are denoted by the same reference signs, and descriptions thereof will be omitted as appropriate, whereas different points will be described in detail. 15 [0137] (Inter-Sensor Error Correction Unit 54) The inter-sensor error correction unit 54 according to the second embodiment has a structure in which a sensor error characteristic calculation unit 67 and an addition unit 68 20 are added to the structure of the first embodiment, as illustrated in FIG. 23. The sensor error characteristic calculation unit 67 calculates a sensor error characteristic Ss on the basis of os. Then, the sensorthe output shaft angular velocity 25 error characteristic calculation unit 67 outputs the calculated sensor error characteristic Ss to the addition unit 68. [0138] - 93 - Here, as detection error of the output shaft rotation angle sensor 13c, mainly, there are linearity error and hysteresis error, as illustrated in FIG. 24. Note that, in FIG. 24, the horizontal axis represents time, and the vertical 5 axis represents steering angle (output shaft rotation angle os). The linearity error indicates error with a wave-like characteristic against a true value, and the hysteresis error indicates an error characteristic like a dead zone against a direction in which the true value changes. Particularly, 10 the hysteresis characteristic is an error characteristic that frequently occurs due to attachment rigidity of the output shaft 12b or the like, and therefore is a characteristic desired to be previously corrected. Additionally, the linearity error and the hysteresis 15 error can be presented as illustrated in FIG. 25 when the horizontal axis represents steering velocity (output shaft os), and the vertical axis representsangular velocity electrical angle error. [0139] 20 As illustrated in FIG. 25, a combined error of both becomes a plus error when the sign of the steering velocity is minus, whereas it becomes a minus error when the sign of the steering velocity is plus. On the basis of the fact, the sensor error characteristic 25 calculation unit 67 of the second embodiment calculates, as the sensor error characteristic Ss, a maximum value (a value at a peak of a wavy line) of errors on a plus side at the time of the minus sign in accordance with the sign (i.e., steering - 94 - direction) of the steering velocity. On the other hand, at the time of the plus sign, a maximum value (a value at a peak of a wavy line) of errors on a minus side is calculated as the sensor error characteristic Ss. In other words, in the 5 second embodiment, the sensor error characteristic Ss has a fixed value whose sign is different with respect to the steering direction. [0140] The addition unit 68 adds the sensor error characteristic 10 Ss input from the sensor error characteristic calculation unit 67 to the reduction gear error characteristic Sg input from the reduction gear error characteristic calculation unit 64, and outputs the addition result as a synthetic error characteristic Sgs to the advance correction limit value 15 calculation unit 65. In the addition of the sensor error characteristic Ss to the reduction gear error characteristic Sg, when the sign of the steering velocity is “+”, a state occurs in which the entire part of the reduction gear error characteristic map 20 illustrated in FIG. 16 has gone down. On the other hand, when the sign of the steering velocity is “−”, he entire part of the reduction gear error characteristic map illustrated in FIG. 16 has gone up. In other words, it becomes a map added with sensor error. 25 [0141] The advance correction limit value calculation unit 65 of the second embodiment uses the synthetic error characteristic Sgs input from the addition unit 68 to - 95 - calculate an advance correction limit value SgsL instead of the advance correction limit value SgL of the first embodiment. Then, the advance correction limit value calculation unit 65 outputs the calculated advance correction limit value SgsL 5 to the advance permission determination unit 66. Specifically, in timing of each correction on the basis of the input correction timing flag CTF, the synthetic error characteristic Sgs input at that time is set to a reference error characteristic Sgs0 (stored and retained in memory). 10 Then, in timing of each calculation of the advance correction limit value SgsL thereafter, the reference error characteristic Sgs0 is subtracted from the synthetic error characteristic Sgs input at that time to calculate the advance correction limit value SgsL. 15 [0142] (Synthetic Error Characteristic Calculation Processing) Next, with reference to FIG. 26, a description will be given of a specific processing content of synthetic error characteristic calculation processing that is executed by the 20 addition unit 68. The synthetic error characteristic calculation processing is processing of a subprogram that is called by the main program and executed. Upon execution of the synthetic error characteristic calculation processing by the CPU of the motor electrical 25 angle detection circuit 24, the processing first proceeds to step S701, as illustrated in FIG. 26. At step S701, the addition unit 68 reads the reduction gear error characteristic Sg from the reduction gear error - 96 - characteristic calculation unit 64 and the sensor error characteristic Ss from the sensor error characteristic calculation unit 67, and the processing proceeds to step S703. At step S703, the addition unit 68 adds the read sensor 5 error characteristic Ss to the read the reduction gear error characteristic Sg to calculate the synthetic error characteristic Sgs. Then, the processing proceeds to step S705. At step S705, the addition unit 68 outputs the synthetic 10 error characteristic Sgs calculated at step S703 to the advance correction limit value calculation unit 65, ends the series of processing, and returns to the calling processing. [0143] (Advance Correction Limit Value Calculation Processing) 15 Next, with reference to FIG. 27, a description will be given of a specific processing content of advance correction limit value calculation processing that is executed by the advance correction limit value calculation unit 65 of the second embodiment. The advance correction limit value 20 calculation processing is processing of a subprogram that is called by the main program and executed. [0144] Upon execution of the advance correction limit value calculation processing by the CPU of the motor electrical 25 angle detection circuit 24, the processing first proceeds to step S801, as illustrated in FIG. 27. At step S801, the advance correction limit value calculation unit 65 reads the synthetic error characteristic - 97 - Sgs and the correction timing flag CTF, and the processing proceeds to step S803. [0145] At step S803, the advance correction limit value 5 calculation unit 65 determines whether or not the correction timing flag CTF has changed from “0” to “1”. When the correction timing flag CTF has been determined to have changed from “0” to “1” (Yes), the processing proceeds to step S805, whereas when not (No), it proceeds to step S807. 10 [0146] When the processing has proceeded to step S805, the advance correction limit value calculation unit 65 sets, in timing of changing of the correction timing flag CTF from “0” to “1” as reference timing, the synthetic error 15 characteristic Sgs that is an added value of the reduction gear error characteristic Sg and the sensor error characteristic Ss corresponding to the motor torque equivalent value Tm’ and the output shaft angular velocity os at that time, as the reference error characteristic Sgs0. 20 After that, the processing proceeds to step S807. Specifically, the advance correction limit value calculation unit 65 sets the synthetic error characteristic Sgs read at step S801 to the reference error characteristic Sgs0, and stores and retains the reference error 25 characteristic Sgs0 in memory. [0147] At step S807, the advance correction limit value calculation unit 65 subtracts the reference error - 98 - characteristic Sgs0 stored in memory from the synthetic error characteristic Sgs read at step S801 to calculate the advance correction limit value SgsL. Then, the processing proceeds to step S809. 5 At step S809, the advance correction limit value calculation unit 65 outputs the advance correction limit value SgsL calculated at step S807 to the advance permission determination unit 66, ends the series of processing, and returns to the calling processing. 10 [0148] (Operation) Hereinafter, operations of the second embodiment will be described. Note that the same operations as those of the first embodiment will be omitted as appropriate, and 15 operations different from those of the first embodiment will be described in detail. Using the map information illustrated in FIG. 16, the reduction gear error characteristic calculation unit 64 calculates an angle error (torsion angle) corresponding to 20 the input motor torque equivalent value Tm’ as the reduction gear error characteristic Sg, and outputs the calculated reduction gear error characteristic Sg to the addition unit 68. On the other hand, using the error characteristic 25 illustrated in FIG. 25, the sensor error characteristic calculation unit 67 calculates an angle error (fixed value) oscorresponding to the input output shaft angular velocity as the sensor error characteristic Ss, and outputs the - 99 - calculated sensor error characteristic Ss to the addition unit 68. [0149] The addition unit 68 adds the input sensor error 5 characteristic Ss to the input reduction gear error characteristic Sg to calculate the synthetic error characteristic Sgs (steps S701 to S703). Then, the addition unit 68 outputs the calculated synthetic error characteristic Sgs to the advance correction limit value calculation unit 10 65 (step S705). The advance correction limit value calculation unit 65 calculates the advance correction limit value SgL on the basis of the input synthetic error characteristic Sgs and the input correction timing flag CTF. 15 [0150] Specifically, every time the correction timing flag CTF changes from “0” to “1”, the synthetic error characteristic Sgs input in this timing is set as the reference error characteristic Sgs0 (step S801, Yes at step S803, and step 20 S805). In other words, the reference error characteristic Sgs0 set every time the correction timing flag CTF changes from “0” to “1” is updated to the input synthetic error characteristic Sgs. [0151] 25 Then, in timing of each calculation of the advance correction limit value SgsL thereafter, a subtraction result obtained by subtracting the set reference error characteristic Sgs0 from the input synthetic error - 100 - characteristic Sgs in timing of each calculation is calculated as the advance correction limit value SgsL (step S807). Then, the calculated advance correction limit value SgsL is output to the advance permission determination unit 5 66 (step S809). Operations of the advance permission determination unit 66 and the estimated angle calculation unit 55 are the same as those of the first embodiment except that the advance correction limit value SgsL is used instead of the advance 10 correction limit value SgL, so that descriptions thereof will be omitted. [0152] (Functions and Effects of Second Embodiment) The second embodiment provides the following effects in 15 addition to the effects of the first embodiment. In the motor control device 25 according to the second embodiment, the counter electromotive force angle correction value calculation unit 53 detects the timing of shifting of the absolute angle region Z where the actual motor electrical m is present to an adjacent region. Then, every time20 angle the timing is detected, the correction timing flag CTF (1) indicating correction timing for the second motor electrical m2 is output to the advance correction limit valueangle calculation unit 65 and the advance permission determination 25 unit 66. In timing of each correction on the basis of the input correction timing flag CTF (1), the advance correction limit value calculation unit 65 calculates, as the reference error characteristic Sgs0, the synthetic error - 101 - characteristic Sgs obtained by adding the sensor error characteristic Ss corresponding to the output shaft angular os at that time to the reduction gear errorvelocity characteristic Sg corresponding to the motor torque 5 equivalent value Tm’ (q-axis current Iq) at that time. Then, the advance correction limit value calculation unit 65 calculates a difference value between the calculated reference error characteristic Sgs0 and the synthetic error characteristics Sgs in timing of each calculation thereafter, 10 as the advance correction limit value SgsL in timing of each calculation. [0153] The advance permission determination unit 66 integrates the advance correction update amount Cr to calculate the 15 advance correction amount Ct, and resets the value of the integration of the advance correction update amount Cr to 0 in timing of each correction on the basis of the correction timing flag CTF (1). In other words, the advance correction amount past value Ct(n − 1) retained in the signal delay unit 20 66i is reset to 0. [0154] With this structure, the advance correction limit value SgsL is calculated on the basis of the synthetic error characteristic Sgs obtained by adding the sensor error 25 characteristic Ss to the reduction gear error characteristic Sg, whereby integration processing of the post-advance osc can be controlled so that thesteering angular velocity advance correction amount Ct does not exceed the advance - 102 - correction limit value SgsL. Thus, even when steering to right and left in the situations where the steering torque Th increases at low motor rotation speed, such as pressing abutment against the rack end and hitting a curb with tire, 5 it is possible to prevent occurrence of excessive advance such that exceeds a total amount of angle errors caused by the reduction gear 21 and the output shaft rotation angle sensor 13c. As a result, prevention of assist efficiency reduction and occurrence of loss of synchronism due to excessive advance 10 can be further ensured. In addition, the reference error characteristic Sgs0 is configured to be updated in timing of each correction using the boundary angle. Thus, even when correction using the boundary angle has been performed and thereby the second motor m2 has suddenly changed, the advance15 electrical angle correction limit value SgsL can be calculated from a new reference, so that prevention of occurrence of excessive advance can be further ensured. [0155] 20 (Third Embodiment) Next, the third embodiment of the present invention will be described. (Structure) The first embodiment has had the structure in which the 25 advance gain is set to be equal to or more than “1”, by which os is multiplied tothe output shaft angular velocity osc.calculate the post-advance steering angular velocity However, the third embodiment is different from the first - 103 - embodiment in that the advance gain is set to be equal to or osmore than “0”, by which the output shaft angular velocity is multiplied to calculate the advance correction update amount Cr. Additionally, the third embodiment is also 5 different from the first embodiment in that the advance correction update amount Cr is added to the output shaft os to calculate the post-advance steeringangular velocity osc. Other structures than those are theangular velocity same as those of the first embodiment. 10 Hereinafter, the same component units as those of the first embodiment are denoted by the same reference signs, and descriptions thereof will be omitted as appropriate, whereas different points will be described in detail. [0156] 15 (Advance Gain Calculation Unit 61) The advance gain calculation unit 61 according to the third embodiment is configured to calculate an advance gain Gad’ instead of the advance gain Gad of the first embodiment by using an advance gain map illustrated in FIG. 29 instead 20 of the advance gain map illustrated in FIG. 15 of the first embodiment. Specifically, as illustrated in FIG. 29, the advance gain map of the third embodiment is characterized in that the advance gain Gad’ is “0” in a range of the dead zone where of the steering torque Th is less thanTh25 the absolute value the predetermined torque value Tht, whereas the advance gain Gad’ has a value larger than “0” in a range where the absolute thereof is equal to or more than the predeterminedThvalue - 104 - torque value Tht. It is particularly characterized in that, is equal to or moreThin the range where the absolute value than the predetermined torque value Tht, the advance gain Gad’ linearly increases with a constant slope as the absolute value becomes larger. Note that the advance gain map is notTh5 limited to one having the structure in which the advance gain Gad’ linearly changes with a constant slope, and may have another structure such as a structure in which the advance gain Gad’ linearly changes with a plurality of slopes in 10 multiple steps or nonlinearly changes. [0157] (Multiplication Unit 62) The multiplication unit 62 according to the third osembodiment multiplies the output shaft angular velocity 15 input from the output shaft angular velocity calculation unit 53a by the advance gain Gad’ input from the advance gain calculation unit 61 to calculate the advance correction update amount Cr. Then, the multiplication unit 62 outputs the calculated advance correction update amount Cr to the 20 advance permission determination unit 66. Note that in the of the steering torque ThThrange where the absolute value is less than the predetermined torque value tht, the advance gain Gad’ is “0”, and therefore, the advance correction update amount Cr is also “0”. 25 [0158] (Advance Permission Determination Unit 66) The advance permission determination unit 66 according to the third embodiment is configured to include an addition - 105 - unit 66j instead of the subtraction unit 66a in the advance permission determination unit 66 of the first embodiment, as illustrated in FIG. 28. The addition unit 66b of the third embodiment adds the 5 advance correction amount past value Ct(n - 1) input from the signal delay unit 66i to the advance correction update amount Cr input from the multiplication unit 62 to calculate the advance correction amount Ct. Then, the addition unit 66b outputs the calculated advance correction amount Ct to the 10 subtraction unit 66c and the advance correction amount past value switching unit 66h, respectively. [0159] The addition unit 66j adds the advance correction update amount Cr input from the multiplication unit 62 to the output os input from the output shaft angular15 shaft angular velocity velocity calculation unit 53a to calculate the post-advance osc. Then, the addition unit 66jsteering angular velocity outputs the calculated post-advance steering angular osc to the angular velocity switching unit 66g.velocity of the steering torqueTh20 Here, when the absolute value Th is less than the predetermined torque value Tht, the advance correction update amount Cr becomes “0”. In this case, os is output as thethe output shaft angular velocity osc.post-advance steering angular velocity 25 [0160] On the basis of the determination result Pa input from the coincidence determination unit 66f, the angular velocity switching unit 66g of the third embodiment switches the final - 106 - sc that is to be output as thesteering angular velocity sc to the estimated anglefinal steering angular velocity calculation unit 55 to any one of the output shaft angular os input from the output shaft angular velocityvelocity 5 calculation unit 53a or the post-advance steering angular osc input from the addition unit 66j. Thevelocity switching method is the same as that of the angular velocity switching unit 66g of the first embodiment. [0161] 10 Processing contents of the respective component units other than the component units described above are the same as those in the first embodiment, and therefore descriptions thereof will be omitted. Additionally, regarding the operations, the only one different point is that the advance 15 correction update amount Cr is obtained from the output shaft os by using the advance gain Gad’ obtainedangular velocity from the advance gain map illustrated in FIG. 29, and then the advance correction update amount Cr is added to the output os to obtain the post-advanceshaft angular velocity osc. Other operations than that20 steering angular velocity are the same as those of the first embodiment. Therefore, descriptions of the operations also will be omitted. Here, the multiplication unit 62 and the addition unit 66j correspond to a post-advance steering angular velocity 25 calculation unit. [0162] (Functions and Effects of Third Embodiment) - 107 - In the motor control device 25 according to the third embodiment, the output shaft angular velocity calculation osunit 53a calculates the output shaft angular velocity os detectedon the basis of the output shaft rotation angle 5 by the output shaft rotation angle sensor 13c. On the basis os, the estimated angleof the output shaft angular velocity calculation unit 55 calculates the second motor electrical m2 that is an estimated value of the motor electricalangle m of the electric motor 22. When the resolver 23 isangle 10 normal, the control calculation device 31 drive controls the electric motor 22 on the basis of the first motor electrical m1 calculated by the main electrical angle detectionangle circuit 24A. On the other hand, when the resolver 23 is abnormal, the control calculation device 31 drive controls 15 the electric motor 22 on the basis of the second motor m2 calculated by the estimated angleelectrical angle calculation unit 55. [0163] Furthermore, on the basis of the steering torque Th, the 20 advance gain calculation unit 61 calculates the advance gain Gad’ for correcting an advance amount of the second motor m2. Here, the advance gain Gad’ is a gainelectrical angle m2 in afor advancing the second motor electrical angle direction cancelling an angle error of a direction delayed 25 with respect to a steering direction. When the absolute value of the steering torque Th is less than the predeterminedTh torque value Tht, the advance gain Gad’ is “0”, whereas when it is equal to or more than the predetermined torque value - 108 - Tht, the advance gain Gad’ has a value larger than “0”. In addition, similarly to the first embodiment, the predetermined torque value Tht is set to a boundary value indicating whether or not influence due to the angle error 5 appears as handling feeling of the driver. The multiplication unit 62 multiplies the output shaft angular os calculated by the output shaft angular velocityvelocity calculation unit 53a by the advance gain Gad’ calculated by the advance gain addition unit 61 to calculate the advance 10 correction update amount Cr. The addition unit 66j adds the advance correction update amount Cr calculated by the multiplication unit 62 to the output shaft angular velocity os calculated by the output shaft angular velocity calculation unit 53a to calculate the post-advance steering osc. Then, the estimated angle15 angular velocity calculation unit 55 integrates the post-advance steering osc calculated by the addition unit 66jangular velocity m2 on the basisto calculate the second motor electrical angle of a value of the integration. 20 With this structure, there can be obtained functions and effects equivalent to those of the motor control device 25 according to the first embodiment. [0164] (Modifications) 25 While the above-described second embodiment has been structured such that the advance correction limit value SgsL is calculated on the basis of the synthetic error characteristic Sgs obtained by synthesizing the reduction - 109 - gear error characteristic Sg and the sensor error characteristic Ss, the present invention is not limited thereto. For example, there may be employed a structure in which only the sensor error characteristic Ss is used to 5 calculate an advance correction limit value SsL instead of the advance correction limit value SgsL of the second embodiment. When this structure is employed, the fixed sensor error characteristic Ss (see FIG. 25) corresponding os becomesto the sign of the output shaft angular velocity 10 the advance correction limit value SsL. Then, regardless of the correction timing flag CTF, every time the sign of the os reverses, the sensor erroroutput shaft angular velocity characteristic Ss corresponding to each sign is set as the advance correction limit value SsL. 15 [0165] Additionally, the above respective embodiments have been structured such that the motor electrical angle is osestimated on the basis of the output shaft rotation angle detected by the output shaft rotation angle sensor 13c forming 20 the steering torque sensor 13. However, the present invention is not limited thereto. For example, the motor electrical angle may be estimated on the basis of a rotation angle detected by another sensor that detects a rotation angle of a shaft rotating in conjunction with operation of the 25 steering wheel 11, such as estimating the motor electrical isangle on the basis of the input shaft rotation angle detected by the input shaft rotation angle sensor 13b. [0166] - 110 - In addition, in the above respective embodiments, the one cycle of the motor electrical angle is divided by 60 [deg] into the absolute angle regions, and on the basis of the sign (corresponding to the motor rotation direction) of the output os and the sign relationship among5 shaft angular velocity the respective line counter electromotive force values EMF, it is determined in which of the absolute angle regions the m is present. Besides, it isactual motor electrical angle determined whether or not the absolute angle region where the m is present has shifted to10 actual motor electrical angle an adjacent region. When the absolute angle region has been determined to have shifted thereto, the second motor m2 is corrected by a boundary angle betweenelectrical angle the regions before and after the shifting. However, the 15 present invention is not limited thereto. For example, the one motor electrical angle cycle may be divided by 30 [deg] into absolute angle regions, and on the basis of a magnitude relationship among the respective line counter electromotive force values EMF as well as the sign of the output shaft angular os and the sign relationship among the respective20 velocity line counter electromotive force values EMF, it may be determined in which of the absolute angle regions the actual m is present (see PTL 2 above formotor electrical angle details). In this case also, a boundary angle at the time 25 of shifting between the regions is used to correct the second m2. Additionally, in one motormotor electrical angle electrical angle cycle, a motor electrical angle at which each of the respective line counter electromotive force values EMF - 111 - is zero is also known. Thus, a zero-cross timing of each of the respective line counter electromotive force values EMF m2may be determined, and the second motor electrical angle may be corrected by using a motor electrical angle 5 corresponding to a phase of the line counter electromotive force of zero at the time of determination (see PTL 2 above for details). [0167] Furthermore, while the respective embodiments have been 10 structured such that only abnormally of the resolver 23 is determined, and when the resolver 23 is abnormal, the second m2 is output as the motor electricalmotor electrical angle m, the present invention is not limited thereto. Forangle example, a structure may be employed in which abnormality of 15 the angle calculation unit 51 also may be determined, and even when although the resolver 23 is normal, the angle calculation m2unit 51 is abnormal, the second motor electrical angle m.may be output as the motor electrical angle [0168] 20 Additionally, the respective embodiments have been structured such that only in the timing where the absolute angle region has shifted to the adjacent angle region, the m is corrected by using asecond motor electrical angle boundary angle at that time. However, the present invention 25 is not limited thereto. For example, there may be employed m3 isa structure in which a third motor electrical angle calculated on the basis of the respective line counter electromotive force values EMF. Then, on the basis of a motor - 112 - rotation velocity or the predetermined threshold value Thv, when the respective line counter electromotive force values EMF have been determined to be reliable values for acquiring m3 may be outputthe signs, the third motor electrical angle 5 to the electrical angle selection unit 24C. On the other hand, when they have been determined to be unreliable values, the m2 calculated from the outputsecond motor electrical angle os may be output to the electricalshaft angular velocity angle selection unit 24C. 10 The entire contents of Japanese Patent Application No. P2018-092473 (filed on May 11, 2018), to which the present application claims priority, are incorporated herein by reference. While the present invention has been described with 15 reference to the definite number of embodiments, the scope of the present invention is not limited thereto, and modifications of the respective embodiments based on the above disclosure are obvious to those skilled in the art. 20 Reference Signs List [0169] 1: Electric power steering device 2: Vehicle 11: Steering wheel 25 12: Steering shaft 12b: Output shaft 13: Steering torque sensor 13c: Output shaft rotation angle sensor - 113 - 20: Steering assist mechanism 21: Reduction gear 22: Electric motor 23: Resolver 5 24: Motor electrical angle detection circuit 24A: Main electrical angle detection circuit 24B: Backup electrical angle detection circuit 24C: Electrical angle selection unit 25: Motor control device 10 26: Vehicle speed sensor 31: Control calculation device 32: Motor drive circuit 45A to 45C: Current detection circuit 40: Voltage detection circuit 15 41: Gate drive circuit 42: Inverter circuit 51: Angle calculation unit 52: Resolver abnormality determination unit 53: Counter electromotive force angle correction value 20 calculation unit 53a: Output shaft angular velocity calculation unit 53b: Counter electromotive force calculation unit 53c: Absolute angle region determination unit 53d: Correction angle calculation unit 25 54: Inter-sensor error correction unit 55: Estimated angle calculation unit 55a: Matching unit 55b: Integration unit - 114 - 61: Advance gain calculation unit 62: Multiplication unit 63: Motor torque equivalent value calculation unit 64: Reduction gear error characteristic calculation 5 unit 65: Advance correction limit value calculation unit 66: Advance permission determination unit 66a, 66c: Subtraction unit 66b, 66j: Addition unit 10 66d, 66e: Sign acquisition unit 66f: Coincidence determination unit 66g: Angular velocity switching unit 66h: Advance correction amount past value switching unit 66i: Signal delay unit 4705WOWO01 - 115 - CLAIMS 1. A motor control device comprising: a steering angular velocity calculation unit configured 5 to calculate a steering angular velocity on a basis of a steering angle detected by a steering angle detection unit configured to detect the steering angle of a steering wheel; a motor electrical angle estimation unit configured to estimate a motor electrical angle of an electric motor 10 providing a steering assist force to a steering shaft on a basis of the steering angular velocity calculated by the steering angular velocity calculation unit; a motor drive control unit configured to, when a motor electrical angle detection unit configured to detect the 15 motor electrical angle of the electric motor is normal, drive control the electric motor on a basis of the motor electrical angle detected by the motor electrical angle detection unit and, when the motor electrical angle detection unit is abnormal, drive control the electric motor on a basis of an 20 estimated motor electrical angle estimated by the motor electrical angle estimation unit; an advance gain setting unit configured to set an advance gain for correcting an advance amount of the estimated motor electrical angle on a basis of a steering torque detected by 25 a steering torque detection unit configured to detect the steering torque transmitted to the steering shaft; and a post-advance steering angular velocity calculation unit configured to calculate a post-advance steering angular 4705WOWO01 - 116 - velocity on a basis of a multiplication result obtained by multiplying the steering angular velocity by the advance gain set by the advance gain setting unit, wherein the motor electrical angle estimation unit integrates 5 the post-advance steering angular velocity calculated by the post-advance steering angular velocity calculation unit, and estimates the motor electrical angle on a basis of a value of the integration, and only upon input of a steering torque equal to or more 10 than a pre-set predetermined torque value, the advance gain setting unit sets the advance gain for advancing the estimated motor electrical angle in a direction cancelling an angle error of a direction delayed with respect to a steering direction. 15 2. The motor control device according to claim 1, wherein the predetermined torque value is set to a boundary value indicating whether or not influence due to the angle error appears as handling feeling of a driver. 3. The motor control device according to claim 1 or 20 2, wherein the electric motor is a multiphase electric motor, and the motor control device further comprises a counter electromotive force angle correction unit configured to correct the estimated motor electrical angle on a basis of 25 respective line counter electromotive forces of the electric motor. 4. The motor control device according to claim 3, further comprising: 4705WOWO01 - 117 - an advance correction limit value calculation unit configured to, on a basis of an error characteristic that is a characteristic of at least one error factor causing the angle error, calculate an advance correction limit value that 5 is a limit value of an advance correction amount that is an integrated amount of an increased amount of the post-advance steering angular velocity due to the advance gain; and an advance correction amount control unit configured to control integration processing of the post-advance steering 10 angular velocity by the motor electrical angle estimation unit such that the advance correction amount does not exceed the advance correction limit value calculated by the advance correction limit value calculation unit. 5. The motor control device according to claim 4, 15 wherein the advance correction amount control unit controls the integration processing by the motor electrical angle estimation unit in such a manner as to permit only integration of the post-advance steering angular velocity in a direction in which the advance correction amount approaches the advance 20 correction limit value in a range not exceeding the advance correction limit value, and when not permitting, directly integrate the steering angular velocity calculated by the steering angular velocity calculation unit. 6. The motor control device according to claim 4 or 25 5, wherein the electric motor is connected to the steering shaft via a reduction gear, and 4705WOWO01 - 118 - the advance correction limit value calculation unit calculates the advance correction limit value on a basis of at least one of a mechanical compliance characteristic indicating a relationship between motor output torque 5 information and a torsion angle, which is an error characteristic of the reduction gear as one of the at least one error factor, or a detection error characteristic indicating a relationship between steering angle information and a detection error, which is an error characteristic of 10 the steering angle detection unit as an other one of the at least one error factor. 7. The motor control device according to claim 6, wherein the counter electromotive force angle correction unit detects timing where a sign relationship among the respective 15 line counter electromotive forces of the electric motor shifts to an other sign relationship, and on a basis of the detected timing, corrects the estimated motor electrical angle on a basis of boundary angle information corresponding to a pre-set set of the sign relationships before and after 20 the shifting. 8. The motor control device according to claim 7, wherein the counter electromotive force angle correction unit calculates absolute angle regions by dividing an angle range of one cycle of the motor electrical angle by 60 , detects 25 timing where among the absolute angle regions, an absolute angle region where the motor electrical angle that is an actual motor electrical angle is present shifts to an adjacent region, on a basis of motor rotation direction information 4705WOWO01 - 119 - and the respective line counter electromotive forces, and at a time of the detection of the timing, corrects the estimated motor electrical angle on a basis of a boundary angle between the absolute angle regions before and after the shifting. 5 9. The motor control device according to claim 7 or 8, wherein at each detection of the shifting timing, the counter electromotive force angle correction unit outputs correction timing information indicating correction timing of the 10 estimated motor electrical angle to the advance correction limit value calculation unit and the advance correction amount control unit, the advance correction limit value calculation unit calculates, at each time of the correction timing on a basis 15 of the correction timing information, as a reference angle error, an angle error due to the mechanical compliance characteristic corresponding to the motor output torque information at that time, and calculates a difference value between the calculated reference angle error and an angle 20 error due to the mechanical compliance characteristic in timing of each subsequent calculation as the advance correction limit value in timing of each calculation, and the advance correction amount control unit integrates the increased amount of the post-advance steering angular 25 velocity to calculate the advance correction amount, and resets a value of the integration of the increased amount to 0 at each time of the correction timing on the basis of the correction timing information. 4705WOWO01 - 120 - 10. The motor control device according to claim 7 or 8, wherein at each detection of the shifting timing, the counter electromotive force angle correction unit outputs correction 5 timing information indicating correction timing of the estimated motor electrical angle to the advance correction limit value calculation unit and the advance correction amount control unit, the advance correction limit value calculation unit 10 calculates, at each time of the correction timing on a basis of the correction timing information, a first angle error due to the mechanical compliance characteristic corresponding to the motor output torque information at that time, calculates a second angle error due to the detection 15 error characteristic of the steering angle detection unit on a basis of the steering angle information, adds the second angle error to the first angle error to set a result of the addition to a reference angle error, and calculates a difference value between the reference angle error and an 20 added value of the first angle error due to the mechanical compliance characteristic and the second angle error due to the detection error characteristic in timing of each subsequent calculation as the advance correction limit value in the timing of each subsequent calculation, and 25 the advance correction amount control unit integrates the increased amount of the post-advance steering angular velocity to calculate the advance correction amount, and resets a value of the integration of the increased amount to 4705WOWO01 - 121 - 0 at each time of the correction timing on a basis of the correction timing information. 11. The motor control device according to claim 7 or 8, wherein 5 at each detection of the shifting timing, the counter electromotive force angle correction unit outputs correction timing information indicating correction timing of the estimated motor electrical angle to the advance correction amount control unit, 10 the advance correction limit value calculation unit calculates, as the advance correction limit value, an angle error due to the detection error characteristics of the steering angle detection unit on a basis of the steering angle information, and 15 the advance correction amount control unit integrates the increased amount of the post-advance steering angular velocity to calculate the advance correction amount, and resets a value of the integration of the increased amount to 0 at each time of the correction timing on a basis of the 20 correction timing information. 12. An electric power steering device comprising the motor control device according to any one of claims 1 to 11.
| # | Name | Date |
|---|---|---|
| 1 | 201927052540.pdf | 2019-12-18 |
| 2 | 201927052540-TRANSLATIOIN OF PRIOIRTY DOCUMENTS ETC. [18-12-2019(online)].pdf | 2019-12-18 |
| 3 | 201927052540-STATEMENT OF UNDERTAKING (FORM 3) [18-12-2019(online)].pdf | 2019-12-18 |
| 4 | 201927052540-REQUEST FOR EXAMINATION (FORM-18) [18-12-2019(online)].pdf | 2019-12-18 |
| 5 | 201927052540-PROOF OF RIGHT [18-12-2019(online)].pdf | 2019-12-18 |
| 6 | 201927052540-FORM 18 [18-12-2019(online)].pdf | 2019-12-18 |
| 7 | 201927052540-FORM 1 [18-12-2019(online)].pdf | 2019-12-18 |
| 8 | 201927052540-DRAWINGS [18-12-2019(online)].pdf | 2019-12-18 |
| 9 | 201927052540-DECLARATION OF INVENTORSHIP (FORM 5) [18-12-2019(online)].pdf | 2019-12-18 |
| 10 | 201927052540-COMPLETE SPECIFICATION [18-12-2019(online)].pdf | 2019-12-18 |
| 11 | 201927052540-FORM-26 [23-12-2019(online)].pdf | 2019-12-23 |
| 12 | Abstract1.jpg | 2019-12-27 |
| 13 | 201927052540-FORM 3 [18-06-2020(online)].pdf | 2020-06-18 |
| 14 | 201927052540-certified copy of translation [03-12-2020(online)].pdf | 2020-12-03 |
| 15 | 201927052540-OTHERS [17-03-2021(online)].pdf | 2021-03-17 |
| 16 | 201927052540-Information under section 8(2) [17-03-2021(online)].pdf | 2021-03-17 |
| 17 | 201927052540-FORM-26 [17-03-2021(online)].pdf | 2021-03-17 |
| 18 | 201927052540-FER_SER_REPLY [17-03-2021(online)].pdf | 2021-03-17 |
| 19 | 201927052540-DRAWING [17-03-2021(online)].pdf | 2021-03-17 |
| 20 | 201927052540-COMPLETE SPECIFICATION [17-03-2021(online)].pdf | 2021-03-17 |
| 21 | 201927052540-CLAIMS [17-03-2021(online)].pdf | 2021-03-17 |
| 22 | 201927052540-ABSTRACT [17-03-2021(online)].pdf | 2021-03-17 |
| 23 | 201927052540-FER.pdf | 2021-10-19 |
| 24 | 201927052540-US(14)-HearingNotice-(HearingDate-06-09-2023).pdf | 2023-08-14 |
| 25 | 201927052540-FORM-26 [28-08-2023(online)].pdf | 2023-08-28 |
| 26 | 201927052540-Correspondence to notify the Controller [31-08-2023(online)].pdf | 2023-08-31 |
| 27 | 201927052540-Written submissions and relevant documents [06-09-2023(online)].pdf | 2023-09-06 |
| 28 | 201927052540-FORM 3 [06-09-2023(online)].pdf | 2023-09-06 |
| 29 | 201927052540-PatentCertificate10-01-2024.pdf | 2024-01-10 |
| 30 | 201927052540-IntimationOfGrant10-01-2024.pdf | 2024-01-10 |
| 1 | sh12AE_05-09-2022.pdf |
| 2 | 2020-09-2319-26-08E_23-09-2020.pdf |