Patent Publication Number: US-6906491-B2

Title: Motor control equipment

Description:
BACKGROUND OF THE INVENTION 
     1. Technical Field of the Invention 
     The present invention relates to a motor controller and, more particularly, to a motor controller capable of performing a safe and highly reliable motor control in the case where a trouble arises particularly in a sensor for detecting a position or a velocity of the rotor of a synchronous motor. 
     2. Prior Art 
     In general, a controller for controlling a synchronous motor has been used conventionally to find the position and velocity of the rotor of a motor from information of a sensor mounted on the motor, that is, a feed back detector. In the case where signal from the feed back detector becomes abnormal due to a defect of the feed back detector, the motor becomes non-controllable since it is not possible to find the position and velocity of the rotor of the motor. Hence, the motor is stopped by being allowed to make a free running or by means of a brake mechanically mounted on a motor shaft. 
     Further, in addition to a velocity feed back detector, a velocity feed back detector for use of a velocity feed back loss detection is mounted on the motor, and the velocity is calculated by a motor controller from information from the respective velocity feed back detectors, and these velocities are compared, and if there arises any difference in the velocities, it is determined that either of the velocity feed back detectors is defective, and the velocity feed back loss is detected. After the velocity feed back loss is detected, a velocity control is performed, and the motor is stopped, by using velocity feed back signal from the velocity feed back detector in normal operation. 
     As described above, when there arises the defect in the feed back detector of the motor, with respect to a method of stopping the motor by allowing it to make the free running or by means of the mechanical brake, there is available the motor controller in which a plurality of feed back detectors are employed and these detectors are selected for use when the feed back detector is abnormal. However, such a method increases the number of feed back detectors and, accompanied with this increase, detection circuits and electronic switches are increased. As a result, comparing to the case of a single feed back detector, the number of parts is increased, thereby causing a problem in that the reliability of the parts is lowered. This finally leads to the lowering of the reliability of the whole controller and, further, causes a problem in that an installation area is increased and costs are driven up. 
     Further, in Japanese Patent Publication No. 2001-112282, there is disclosed the motor controller, comprising a synchronous motor, magnetic pole position detection means for detecting the magnetic pole position of the rotor of the synchronous motor, inverter control means for controlling an electric power to be supplied to the synchronous motor according to the magnetic pole position detected by the magnetic pole position detection means, sensor abnormality detection means for detecting the abnormality of the magnetic pole position detection means, and magnetic pole position estimation means for estimating the magnetic pole position, wherein, in the case where the abnormality of the magnetic pole position detection means is detected by the sensor abnormality detection means, the electric power to be supplied to the synchronous motor according to the magnetic pole position estimated by the magnetic pole position estimation means is controlled. 
     The sensor abnormality detection means for detecting the abnormality of the magnetic pole position detection means is constituted by a waveform processing portion, an UP DOWN counter, an address generation means, a commutation sensor (CS) edge detector, a CS abnormality detector, a magnetic pole position detector, a Z-phase abnormality detector, a Z-phase switch, and an A and B-phase abnormality detector. 
     A and B-phase signals which are sensor outputs of the magnetic pole position detection sensor, a Z-phase signal, and each signal of CS 1  to CS 3  signals, and each inversion signal of all these signals are inputted to the waveform processing portion, and are subjected to the waveform processing such as a waveform shaping. 
     The A and B-phase signals subjected to the waveform processing are counted by the UP DOWN counter, and are outputted to address generation means. Further, the CS 1  to CS 3  signals are outputted to a CS edge detector, a CS abnormality detector, and a magnetic pole position detector. 
     Moreover, the CS 1  signal is transmitted to the counter. The Z-phase signal is outputted to a Z-phase abnormality detector, a Z-phase switch, and the counter. 
     The Z-phase signal detects whether or not a Z-phase pulse is generated based on a CS 1  pulse by the Z-phase abnormality detector, and outputs a Z-phase abnormality signal. The A and B-phase signals generate a predetermined pulse signal for every one rotation of the motor. The number of pieces of the A and B-phase edges between CS edges is counted and, when the number of pieces deviates from a predetermined range, an A and B-phase abnormality signal is outputted. Further, the CS abnormality detector observes a state of the CS 1  to CS 3  signals, and outputs a CS abnormality signal when all the signals are “H” or “L”. 
     By so doing as described above, when the abnormality of the Z-phase signal, the A and B-phase signals, and the CS signals are detected, the motor is controlled according to the type of signals in which the abnormality occurs. 
     In such a motor controller, in addition to the feed back detector for detecting the position and velocity of the rotor of the synchronous motor, a CS signal detector for detecting a commutation signal is provided to detect a magnetic pole position of the rotor of the synchronous motor and, therefore, in the case where the detection functions of these detectors all become abnormal, there arises a problem in that all the references of a comparison to see whether it is good or bad cease to exist, so that the detection or judgment of the abnormality becomes absolutely impossible with a result that it is no longer possible to control the motor. 
     Hence, the object of the present invention is to provide a motor controller in which an electrical angle calculated from the signal outputted from the feed back detector and the electrical angle found from an induced voltage of stator windings are compared and, when it is determined that they are abnormal, a motor is controlled by an electrical angle estimated from the induced voltage of the motor. 
     SUMMARY OF THE INVENTION 
     The motor controller of the present invention comprises a synchronous motor, a feed back detector mounted on the synchronous motor for detecting the position and velocity of a rotor of the synchronous motor, magnetic pole position detection means for detecting the magnetic pole position of the rotor of the synchronous motor from output signals of the feed back detector, inverter means for controlling an electric power to be supplied to the synchronous motor according to the magnetic pole position detected by the magnetic pole position detection means, magnetic pole position estimation means for estimating a magnetic pole position of the rotor of the synchronous motor from the induced voltage of the stator windings of the synchronous motor, and magnetic position abnormality detection means for detecting the abnormality of the feed back detector by always comparing the magnetic pole position detected by the magnetic pole position detection means and an estimated magnetic pole position estimated by the magnetic pole position estimation means. When the magnetic pole position abnormality detection means detects the abnormality of the feed back detector, the inverter means controls the electric power to be supplied to the synchronous motor according to the estimated magnetic pole position obtained by the magnetic pole position estimation means. 
     In this way, it is possible to perform a safe and highly reliable motor driving control even in the case where there occurs the abnormality in the feed back detectors for detecting the magnetic pole position or velocity of the rotor of the synchronous motor and the feed back signals are not outputted at all from these detectors. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a block diagram showing one embodiment of a motor controller according to the present invention; 
         FIG. 2  is a view showing a constitution of magnetic pole position detection means to find an electrical angle θ e  from an encoder output signal; 
         FIG. 3  is a view showing the electrical angle θ e  found from the encoder output signal; 
         FIG. 4  is a view showing the electrical angle θ e  or θ LO  for a mechanical angle of the rotor or encoder in the case of any number of magnetic poles; 
         FIG. 5  is a view showing a relationship between a voltage vector V s  and a d S -q S  coordinate system and d o -q e  coordinate system; 
         FIG. 6  is a view showing an estimated electrical angle θ LO  found from an induced voltage of the motor; 
         FIG. 7  is a view showing V qs  and V ds  found from the induced voltage of the motor; 
         FIG. 8  is a view showing the relationship between the loaded electrical angle θ L  and the non-loaded electrical angle θ LO ; 
         FIG. 9  is a view for explaining one example of inverter means in the motor controller according to the present invention; and 
         FIG. 10  is a flowchart showing a sensor signal abnormality detection procedure and an operational state in the motor controller according to the present invention. 
     
    
    
     A PREFERRED EMBODIMENT OF THE INVENTION 
     An embodiment of the present invention will be described below with reference to the drawings. 
       FIG. 1  is a block diagram showing one embodiment of a motor controller  1  according to the present invention. The motor controller  1  is constituted by sensor control means  4 , inverter means (or vector control means)  5 , velocity control means  6 , current detectors  7 A,  7 B and  7 C, an encoder  3 , and an encoder counter  8 . The encoder  3  is an absolute value rotary encoder, and is a feed back detector (sensor) for use of a position and velocity detection mounted on a rotational axis of a brushless synchronous motor  2  (hereinafter, referred to as the motor), which is a control object of the motor controller  1 . 
     The sensor control means  4  is constituted by magnetic pole position detection means  20 , voltage feedback (FB) detector  21 , magnetic pole position estimation means  22 , magnetic pole position abnormality detection means  23  and a sensor signal switch  24 . 
     The velocity control means  6  is constituted by a velocity computing unit  25 , a velocity calculator  9 , a subtractor  10  and a velocity controller  11 . 
     The current detectors  7 A,  7 B and  7 C detect the current of respective phases U, V and W of the motor  2 , and feed back the current to the inverter means  5 . 
     The inverter means  5  controls an electric power to be supplied to the motor. 
     In the motor controller  1  constituted as above, the operation of the encoder  3  in normal condition will be described. 
     The counter  8  counts a pulse outputted by the encoder  3 , and inputs an output value to the magnetic pole position detection means  20  of the sensor control means  4  and the velocity calculator  9  of the velocity control means  6 . The velocity calculator  9  calculates a real angular velocity ω of the motor  2  from the output value of the counter. This real angular velocity ω and an angular velocity command signal ω are inputted to the subtractor  10 , and an angular velocity differential signal ε v  is calculated. The obtained angular velocity differential signal ε v  is inputted to the velocity controller  11 , and a quadrature axis current command signal I q * is calculated. This quadrature axis current command signal I q *, a direct axis current command signal I d *, respective current feed back signals I ufb , I vfb  and I wfb  of the current detectors  7 A,  7 B and  7 C, and an electrical angular signal θ e  calculated from the output value of the counter  8  by the magnetic pole position detection means  20  are inputted to the inverter means  5 , and the motor  2  is vector-controlled for a continuous driving. The direct axis aligns to the rotor magnetic pole direction. 
       FIG. 2  is a view showing a constitution of the magnetic pole position detection means  20  for finding the electrical angle θ e  from the counter output value. The magnetic pole position detection means  20  is constituted by subtractors  61  and  65 , a coefficient alignment means  62 , an adder  63 , and a counter output value—electrical angle converter  64 . 
     The subtractor  61  inputs a counter output value C t  of the counter  8  in a length of time t and a counter output value C (t+Δt)  after the elapse of a micro-time Δt, and a difference(C (t+Δt) −C t ) of a mechanical angle of the encoder  3  in a micro-time Δt is arithmetically processed, and this difference (C (t+Δt) −C t ) is outputted. 
     The coefficient alignment means  62  inputs the difference signal (C (t+Δt) −C t ), and multiplies this difference signal (C (t+Δt) −C t ) by a correction coefficient K ppr , and outputs an electrical angle (counter output value) ΔC, which corresponds to the obtained difference signal. This electrical angle (counter output value) ΔC is found as follows:
 
Δ C=K   ppr ×( C   (t+Δt)   −C   t )  (1)
 
where K ppr =P/2, provided that P is the number of magnetic poles of the rotor.
 
     The adder  63  outputs a total electrical angle (counter value) C a , which is obtained by adding a cumulative electrical angle (counter output value) C pr  from a time zero to a time t and the electrical angle (counter output value) ΔC, which is equivalent to the micro-time Δt. The total electrical angle C a  is found as follows:
 
 C   a   =C   pr   +K   ppr ×( C   (t+Δt)   −C   t )  (2)
 
     The counter value—electrical angle converter  64  allocates allocation values O and C m , respectively to the electrical angles O° and 360° (or 2π radian) of the rotor. This is because, for example, by allowing C m  to match a numeric value 16384 (allocated to an electrical angle θ p 360° (or 2π radian) found from the induced voltage of the stator windings to be described later or 2π radian), the comparison of both θ e  and θ p  is made easy. Then, the electrical angle θ pe  in the time t is found as follows: 
      θ pe (degree or radian)=360° (or 2π)× C   a   /C   m   (3) 
     where 1/K=C a /C m . The allocation of C m  makes it possible to maintain general-purpose properties of the electrical angle in terms of measurement, even if the type of the encoder  3  is, for example, the one in which the number of total pulses is different per one rotation. 
     The subtractor  65  outputs the electrical angle θ e  obtained by subtracting an offset amount δ from the electrical angle θ pe  of the rotor. That is, usually, the magnetic pole of the rotor and the counter output value 0 of the encoder  3  are shifted. By taking into consideration and following through zero-adjusting the amount in which the counter output value corresponding to this shift is converted to the electrical angle—the so-called offset amount δ, the electrical angle θ e  is obtained. As one method of finding the offset amount, when an appropriate level of a direct current voltage is applied to the stator winding of the U phase, a magnetic field is generated from that stator winding. By being attracted to the stator winding by this magnetic action, that is, by the N pole or the S pole of the magnet&#39;s poles of the rotor, the rotor of the motor  2  is kept in a locked state, and the value converted to the electrical angle by the expression (3) can be found from the counter reading value at this time. For example, in the case where the counter allocation value corresponding to the electrical angle 2π radian is 16384 and a shift amount is 1638, the offset amount becomes 0.628 radian. 
       FIG. 3  is a view showing a relationship between the mechanical angle of the encoder  3  and the electrical angle θ e  of the rotor in the case where the number of magnetic poles is two poles. Here, the axis of ordinate shows the electrical angle θ e  of the rotor, and the axis of abscissa shows the mechanical angle of the encoder. Assuming that the number of other magnetic poles is taken as P pieces, since the relationship between the mechanical angle of the encoder  3  and the electrical angle θ e  of the rotor is such that the electrical angle θ e  becomes P/2 times the mechanical angle of the encoder, a straight line showing the electrical angle θ e  repeatedly changes by P/2 time in the shape of a saw tooth as shown in  FIG. 4 , while the mechanical angle of the encoder changes by 2π radian. 
     From the above-described result, when the number of magnetic poles, the counter allocation value and the offset amount are given, it is possible to calculate the electrical angle θ e  from any count value by the expression (3). 
     Next, the method of finding the estimated electrical angle of the rotor from the induced voltage of the stator windings of the stator in the magnetic pole position estimation means  22  will be described below. 
     The voltage FB detector  21  takes the induced voltages V U , V V  and V W  taken out from respective stator windings of the motor  2  as input signals, and calculates on the basis of the expressions (4) and (5), and outputs a correlated voltage signal V UV  of U-V phases and a correlated voltage V VW  of V-W phases. 
       V   UV   =V   U   −V   V   (4)
 
 V   VW   =V   V   −V   W   (5)
 
     These correlated voltage signals are transmitted to the magnetic pole position estimation means  22 . 
     First, the estimated electrical angle when the motor is not loaded will be described. Assuming that a non-loaded estimated electrical angle is taken as θ LO , the magnetic pole position estimation means  22  takes the correlated voltage signal V UV  and the correlated voltage V VW  as input signals, and calculates and outputs the estimated electrical angle θ LO  of the rotor. 
       FIG. 5  is a view showing the relationship between a rotating magnetic field vector (hereinafter referred to as a voltage vector)  s  of the induced voltages of three phases U, V and W and a d s —q s  coordinate system and a d e -q e  coordinate system. Here, the d s -q s  coordinate system is a coordinate system at rest of the stator, and the d e -q e  coordinate system is a rotational coordinate system of the rotor. 
     That is,  FIG. 5  is a view showing the stator in the motor  2  being symmetric three phase concentrated windings and the relationship between the d s -q s  coordinate system at rest (d s  is positive in a downward direction) and the d e -q e  rotational coordinate system of two phase concentrated windings, both of which are equivalent to the symmetric three phase concentrated windings, and the voltage vector  s , which converts the induced voltages of the three phases U, V and W into two phase. Note that a vector  qs  shows a q s  component (quadrature axis component) of the voltage vector  s  in the d s -q s  coordinate system at rest (axes d s  and q e  are coordinate systems which are orthogonal to each other), and a vector  ds  shows a d s  component (direct axis component) of the voltage vector  s . Now, the motor  2  rotates with the d e -q e  rotational coordinate system (axes d e  and q e  are coordinate systems which are orthogonal to each other) of the rotor aligned with the voltage vector  s . That is, an axis q e  in the d e -q e  rotational coordinate system of the rotor of the motor  2  rotates aligned with the voltage vector  s . 
     Hence, the angle made by the voltage vector  s  based on the induced voltages of the three phases U, V and W and a forward direction of the axis q s  provides the estimated electrical angle θ LO  of the rotor in the motor  2 . 
     Next, calculation expressions of the estimated electrical angle θ LO  of the rotor will be described. 
     The components of the axis q s  direction defined in FIG.  5  and the axis d s  direction orthogonal to this are taken as V qs  and V ds , respectively and, from each value of V qs  and V ds , the estimated electrical angle θ LO  can be calculated. That is, by using the correlated voltages V UV  and V VW , V qs  and V ds  are found as follows:
 
 V   qs   =V   UV   +V   VW /2  (6)
 
 V   ds =−√{square root over ( )}3 V   VW /2  (7)
 
     When absolute values of V qs  and V ds  are represented as V qsa  and V dsa , respectively, the following expressions are found:
 
 V   qsa   =abs ( V   UV +( V   VW /2))  (8)
 
 V   dsa   =abs (−√{square root over ( )}3 V   VW /2)  (9)
 
where “a b s” represents the absolute value.
 
     The estimated electrical angle θ LO  is calculated by selecting the expressions shown below according to the size of respective values V ds , V qs , V qsa  and V dsa . That is, in the case where V ds ≦0,
 
if V qz 0≧0 and V qsa &gt;V dsa , then,
 
θ LO =tan −1 ( V   dsa   /V   qsa )  (10)
 
If V qs ≧0 and V qsa ≦V dsa , then,
 
θ LO =π/2−tan −1 ( V   qsa   /V   dsa )  (11)
 
If V qs &lt;0 and V qsa &lt;V dsa , then,
 
θ LO =π/2+tan −1 ( V   qsa   /V   dsa )  (12)
 
If V qs &lt;0 and V qsa ≧V dsa , then,
 
θ LO =π−tan −1 ( V   dsa   /V   qsa )  (13)
 
In the case where V ds &gt;0,
 
if V qs &lt;0 and V qsa &gt;V dsa , then,
 
θ LO =π+tan −1 ( V   dsa   /V   qsa )  (14)
 
 If V qs &lt;0 and V qsa ≦V dsa , then,
 
θ LO =3π/2−tan −1 ( V   qsa   /V   dsa )  (15)
 
If V qs ≧0 and V qsa &lt;V dsa , then,
 
θ LO =3π/2+tan −1 ( V   qsa   /V   dsa )  (16)
 
If V qs ≧0 and V qsa ≧V dsa , then,
 
θ LO =2π−tan −1 ( V   dsa   /V   qsa )  (17)
 
     Hence, from the above-described explanation, it is clear that the estimated electrical angle θ LO  depends on the ratio of the absolute values V dsa  and V qsa  of respective components V ds  and V qs  of the axis d s  direction and the axis q s  direction of the voltage vector  s . 
     To cause the driving control of the motor  2  to be stable and reliable, it is desirable that the voltage waveform of respective induced voltage of the stator windings becomes sine-shaped or cosine-shaped and, moreover, the amplitude of the voltage waveform of respective phases U, V and W becomes identical. For example, assuming that the induced voltage of the U phase has the cosine waveform of an amplitude  1  (non-dimensional), it is desirable that the induced voltage waveforms of other phases are only different in the phase from the cosine waveform of the U phase, and comprise the cosine waveform of the amplitude  1  (non-dimensional). The reason for this is because, in the motor controller for performing a safe and highly reliable control of the position and velocity of the motor  2  by means of the control circuit and the drive circuit of the motor  2  using the three phase alternating-current waveform, it is desirable that the amplitudes of the three phase alternating current waveform are all identical, and the phase of respective phases U, V and W is different from each other in 120 degrees. 
     Hence, the estimated electrical angle θ LO  according to the present invention essentially does not cause any contradiction as long as the estimated electrical angle θ LO  is calculated from the induced voltage of the stator windings, even if all the amplitudes of the induced voltages of the respective phases U, V and W are taken as an unit level, for example, 1 (non-directional). This is because the estimated electrical angle θ LO  depends on the ratio of V dsa  and V qsa . 
     Now, first, a level change of the induced voltage generated in the stator windings by the rotation of the magnetic poles of the rotor is found. It is known that expressions (18) to (20) are established for the induced voltage waveforms of the stator windings. That is, V U , V V  and V W  are expressed as follows:
 
 V   U =cos(φ+0°)=cos(φ+0 radian)  (18)
 
 V   V =cos(φ+240°)=cos(φ+4.1887 radian)  (19)
 
 V   W =cos(φ+120°)=cos(φ+2.0943 radian)  (20)
 
where the φ is equivalent to the electrical angle of the induced voltage. For example, respective induced voltage levels for φ=0 (0 radian) are found by the expressions (18) to (20).
 
     Hence, when φ=0 radian, then, V U =1.000, V V =−0.500 and V W =−0.500. These numerical values V U , V V  and V W  are replaced and calculated by the expressions (4) to (17), and V UV =1.500, V UW =0.000, V qs =1.500, V ds =0.000, V qsa =1.500, and V dsa =0.000 are obtained. 
     Since the estimated electrical angle θ LO  is such that V ds , V qs , V qsa  and V dsa  correspond to the condition of the expression 14, eventually, it turns out that the estimated electrical angle θ LO =6.283 radian. It is possible to find other estimated electrical angles θ LO  for the electrical angle of the induced voltage in like manner. 
     Here, when two poles are taken as an example of the number of poles of the rotor, while the rotor rotates by a mechanical angle 2π radian (equivalent to 360°), the electrical angle of the induced voltage generated in the stator windings based on the rotation of the magnetic poles of the rotor also becomes identical with the mechanical angle 2π radian of the rotor and, therefore, the electrical angle of the rotor becomes 2π radian. 
       FIG. 6  is a view showing the estimated electrical angle θ LO  found from the induced voltages of three phases U, V and W for the mechanical angle of the rotor in the case of two poles, the induced voltages V U , V V , and V W  of respective phases, and the level change in respective correlated V UV  and V VW . Here, the axis of ordinate shows the estimated electrical angle θ LO  (converted to radian), the induced voltages of three phases, and the level of the correlated voltage, and the axis of abscissas shows the mechanical angle of the encoder  3  or the rotor. 
     That is,  FIG. 6  shows that the estimated electrical angle θ LO  linearly changes from 0 to 2π (equivalent to 6.283 radian) when the mechanical angle of the rotor changes from 0 to 2π (equivalent to 6.283 radian). The estimated electrical angle θ LO  changes repeatedly in the shape of a saw tooth every time the mechanical angle of the rotor changes by a fixed angle (2π radian in this example). 
     Further, similarly to  FIG. 6  in the case of two poles,  FIG. 7  is a view showing the relationship between the voltage levels V qs  and V ds  for the mechanical angle of the rotor or the encoder  3  and the absolute values V qsa  and V dsa  thereof. Here, the axis of ordinate shows the voltage levels of V qs , V ds , V qsa  and V dsa , and the axis of abscissas shows the electrical angle of the induced voltage. 
     Although the estimated electrical angle θ LO  in the case of two poles has been described as above, in the case of P poles with respect to the relationship between the electrical angle θ LO  of the induced voltage shown in FIG.  6  and the mechanical angle of the rotor, the electrical angle θ LO  eventually becomes P/2 times the mechanical angle of the rotor. Therefore, while the mechanical angle of the rotor (identical with the mechanical angle of the encoder) changes from 0 radian to 2π radian (equivalent to 360°), the straight line showing the electrical angle θ LO  changes repeatedly by P/2 times, for example, by two times in the case of four poles, and by four times in the case of eight poles in the shape of a saw tooth as shown in FIG.  4 . In the case of  FIG. 7  similar to  FIG. 6 , while the mechanical angle of the rotor changes from 0 radian to 2π radian, V qs  and V ds  change repeatedly by P/2 times. 
     Even in the case of the estimated electrical angle θ LO , it is possible to allocate the numerical value identical to the above-described allocation value C m  to the electric angle 2π radian of the rotor and measure the electrical angle for any mechanical angle of the rotor, for example, from the counter output value of the counter  8 . 
     Next, the estimated electrical angle θ L  in the case where the motor  2  is loaded will be described based on FIG.  8 . 
     As shown in  FIG. 8 , the estimated electrical angle θ L  is an electrical angle, which advances by an error ε of the electrical angle found by the following expression for the non-loaded estimated electrical angle θ LO . That is, θ L  is expressed as follows:
 
θ L =θ LO +ε  (21)
 
Moreover, ε is expressed as follows:
 
ε=tan −1 ( V   ds   /V   qs )  (22)
 
Here, V qs  and V ds  are given by the expressions (23) and (24). That is,
 
  V   qs =√{square root over ( )}(⅔)× C   (23)
 
 V   ds =2√{square root over ( )}2π( N   m /60)×( P/ 2)× I   s   ×I   m   (24)
 
where C is a line to line voltage at the time of rated rotations of the motor, N m  is the number of motor rotations per minute, I s  is an inductance of the stator windings (q-axis), and I m  is a motor current.
 
     For example, assuming that I m =I NP  (motor rated current)=5.3 ampere (RMS), N m =N NP  (the number of motor rated rotations per minute)=the number of 3000 rated rotations per minute, P=2 (poles), C=331 volt, and I s =0.0164 henrys, then, V qs =270 volt, and V ds =38.5 volt, thereby obtaining ε=8°. That is, the loaded electrical angle θ L  becomes a value advanced by eight degrees which is equivalent to the error ε of the electrical angle for the non-loaded estimated electrical angle θ LO . 
     Now, to be able to compare the electrical angle θ L  found from the induced voltage for the mechanical angle of the rotor and an electrical angle θ e  found from the encoder output signal, it is advisable to find an electrical angle (θ L −ε) and, then, compare that electrical angle (θ L −ε) and the electrical angle θ e . That is, for example, in the case where the number of poles are two, it is advisable to find the electrical angle (θ L −ε) obtained as a result of delaying and calculating the electrical angle θ L  by the error ε of the electrical angle so that the electrical angle θ L  reflects a characteristic graphic chart shown in  FIG. 6 , that is, a saw tooth shaped chart in which, when the mechanical angle in the axis of abscissa is 0 radian, the electrical angle in the axis of ordinate is taken as 0 radian and, when the mechanical angle is 2π radian, the electrical angle corresponds to 2π radian and, then, compare that electrical angle (θ L −ε) and the electrical angle θ e . Here, the electrical angle error ε can be obtained by calculating the expressions (22), (23) and (24) based on the number of motor rotations detected by the encoder  3  and the current value signal detected by the current detectors  7 A,  7 B and  7 C. 
     On the other hand, when the motor  2  is loaded and regenerated, ε becomes a negative value, and the estimated electrical angle θ L  delays by ε for the non-loaded estimated electrical angle θ LO . Hence, similarly to the above-described motoring state, it is possible to find the electrical angle (θ L −ε) and compare the electrical angle (θ L −ε) and the electrical angle θ e . 
     The magnetic pole position abnormality detection means  23  always calculates a difference between the above described estimated electrical angle θ L  calculated from the induced voltage of the stator windings of the motor  2  in the mechanical angle of the rotor or the encoder and the electrical angle θ e  based on the encoder output signal, and if the absolute value of the difference is equal to either a certain stipulated value, for example, 5% of the electrical angle 2π (the stipulated value is equivalent to 0.314 radian) or smaller than that, it is determined that the encoder  3  is normal. If the above-described absolute value is larger than 5%, it is determined that the encoder  3  is abnormal, and a changeover signal is outputted. 
     The sensor signal switch  24  is kept connected to a switch  66  and outputs the electrical angle θ e  in the case where the magnetic pole position abnormality detection means  23  determines that the encoder  3  is normal. On the other hand, in the case where it is determined that the encoder  3  is abnormal, the sensor signal switch  24  is switched from the switch  66  to a switch  67  by the changeover signal, and outputs the estimated electrical angle θ L . 
     The velocity computing unit  25  of the velocity control means  6  takes the estimated electrical angle signal θ L  as an input data and time-differentiates it, and outputs a real angular velocity, which is obtained by multiplying a obtained variation of the estimated electrical angle per unit time by a correction coefficient 2/P based on the P number of poles of the rotor. 
       FIG. 9  is a view showing the inverter means  5  (or vector control means). The inverter means  5  is constituted by a three to two phase current feedback computing unit  40 , a d-axis current controller  41 , a q-axis current controller  42 , a two to three phase voltage command computing unit  43 , a controller  44  of a pulse width modulation system (hereinafter referred to as a PWM controller), an angle converter  45 , and a power element  46 . 
     The angle converter  45  takes the estimated electrical angle θ L  calculated from the induced voltage or the electrical angle θ e  calculated from the encoder output signal as an input data, and angle-converts the electrical angle θ L  or electrical angle θ e  to be adaptable to the three to two phase conversion or the two to three phase conversion when the conversions are effected, and outputs the inherent signal θ e  or θ L , in the case of the three to two phase conversion, and outputs an angle-converted θ L * or θ e * in the case of the two to three phase conversion. 
     The three phase to two phase current feed back computing unit  40  takes the current feed back signals I Ufb , I Vfb  and I Wfb  of the motor  2  detected from the current detectors  7 A,  7 B and  7 C which are provided in the motor  2  and the electrical angle θ L  or θ e  phase-converted by the angle converter  45  as input signals, and subjects them to an arithmetic processing, and outputs the d-axis current feed back signal I dfb  and the q-axis current feed back signal I qfb . 
     The d-axis current controller  41  takes an excitation current command signal I d * and the d-axis current feed back signal I dfb  as input signals, and subject them to the arithmetic processing, and outputs a d-axis voltage command signal V d *. 
     The q-axis current controller  42  takes a torque command signal I q * and a q-axis current feed back signal I qfb  as input signals, and subject them to the arithmetic processing, and outputs a q-axis voltage command signal V q *. 
     The two to three phase voltage command computing unit  43  takes the d-axis voltage command signal V d *, the q-axis voltage command signal V q *, and an electrical angles θ L * or θ e * (two to three phase vector angle) converted by the angle converter  45  as input signals, and subject them to the arithmetic processing, and outputs voltage command signals V U *, V V * and V W * of three phases U, V and W. 
     The PWM controller  44  inputs a signal generated by an oscillator not shown, for example, a chopping wave signal or a saw tooth wave signal and the voltage command signals V U *, V V * and V W * of the U phase, V phase and W phase, which are control signals of the motor  2 , into a comparator not shown, and subject them to the arithmetic processing, and outputs a pulse width modulation signal to a power element  46 . 
     The power element  46  drives the motor  2  according to the above-described pulse width modulation signal. 
       FIG. 10  is a flowchart showing a sensor signal abnormality detection operation and a drive operation in the motor controller  1 . 
     In  FIG. 10 , first, the electrical angle θ e  for the mechanical angle of the encoder  3  is calculated from the output signal of the encoder  3  by the magnetic pole position detection means  20  (step S 101 ). On the other hand, the induced voltage of the non-loaded stator windings of the motor  2  is detected by the voltage FB detection means  21  (step S 102 ). From the detected induced voltage, the non-loaded estimated electrical angle θ LO  of the motor  2  for the electrical angle of the rotor (as described above, if the number of poles are specified, the relationship between the electrical angle of the rotor and the mechanical angle of the encoder  3  can be univocally found) is calculated (step S 103 ). The estimated electrical angle θ L , which corrects the error ε of the loaded electrical angle of the motor  2 , is calculated by the magnetic pole position estimation means  22  (step S 104 ). 
     In the magnetic pole position abnormality detection means  23 , it is determined whether or not the absolute value of the difference between the estimated electrical angle θ L  and the electrical angle θ e  in respective mechanical angles of the rotor matches a predetermined stipulated value or is smaller than that (step S 105 ). If the absolute value of the difference between the electrical angle θ L  and the electrical angle θ e  matches the predetermined stipulated value or is smaller than that, it is determined that the encoder  3  is normal (step S 106 ), and the electrical angle θ e  is outputted by the sensor signal switch  24  (step S 107 ). At this time, the motor  2  is vector-controlled (step S 108 ) by the inverter means  5  in response to the electrical angle θ e , and the motor  2  is continuously driven (step S 109 ). 
     In the magnetic pole position abnormality detection means  23 , if the absolute value of the difference between the electrical angle θ L  and the electrical angle θ e  is larger than a certain stipulated value, it is determined that the encoder  3  is abnormal (step S 110 ), and the estimated electrical angle θ L  is outputted by the sensor signal switch  24  (step S 111 ). The estimated electrical angle θ L  is inputted to the inverter means  6  and the velocity computing unit  25 . 
     The real angular velocity of the motor  2  is calculated from the estimated electrical angle θ L  and the number of poles of the rotor by the velocity computing unit  25  (step S 112 ). In the inverter means  5 , the motor  2  is vector-controlled in response to this real angular velocity and the estimated electrical angle θ L  found from the induced voltage of the motor  2  (step S 113 ), and the motor  2  is continuously driven (step S 114 ). 
     Note that, while the present invention uses an absolute type (absolute value) encoder to detect the rotational position and velocity of the motor  2  as one embodiment, basically the invention is also applicable to an increment type encoder. 
     As described above, it is possible to perform a safe and highly reliable motor control in the case where abnormality occurs in the feed back detector for detecting the rotational position and velocity of the motor.