Patent Publication Number: US-2019173413-A1

Title: Motor module, motor controller, temperature inferring device, and temperature inference method

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This disclosure relates to a technology that infers a temperature of stator windings of an electric motor. 
     2. Description of the Related Art 
     Heat generated from stator windings along with the operation of an electric motor (simply referred to below as the “motor”) that has a plurality of windings in a stator may damage a material of the motor and may cause a change in the property of the material. Therefore, it is important to know the temperature of the stator windings (sometimes referred to below as “winding temperature”) during the operation of the motor. 
     The temperature of the stator windings can be known by various methods. For example, there is a method in which a temperature sensor is placed in the vicinity of the windings and winding temperature is directly measured by using the temperature sensor. As the temperature sensor, a thermocouple, a resistive temperature device (RTD), or the like, for example, can be used. In the method in which a temperature sensor is used, there is a case in which it is hard to place a temperature sensor in the vicinity of the windings. This is also the problem that an increase in costs occurs. 
     It is also possible to infer winding temperature from the electric resistance of the stator windings (sometimes referred to below as “winding resistance”) without using a temperature sensor. Since the winding temperature can be represented as a function of the winding resistance, winding temperature can be inferred from winding resistance. 
     Methods of obtaining wiring resistance are broadly classified into three methods. A first method is a method in which winding resistance is directly measured by using a measuring instrument. To directly measure a winding resistance, however, it is necessary to stop the motor. Therefore, winding temperature cannot be inferred during an operation. 
     A second method is a method in which a signal of a direct-current (DC) or an alternating current (AC) is supplied during the operation of the motor and winding resistance in inferred from the signal. In the second method, a signal to measure winding resistance is mixed into a signal to control the motor. Therefore, there is the possibility that the motion of the motor is impeded. 
     A third method is a method in which a relational expression such as a voltage equation for the motor is used to infer winding temperature from various parameters used to control the motor. According to the method, winding temperature can be inferred during the operation of the motor. 
     SUMMARY OF THE INVENTION 
     The present disclosure provides a novel temperature inference technology that reduces inference error in winding temperature when a load state of a motor changes. 
     A method for inferring a temperature of a winding in an exemplary embodiment in the present disclosure is a method to infer the temperature of a plurality of windings in the stator of an electric motor. The method includes steps in which processing to infer the electric resistance and temperature of the plurality of windings is repeated. The processing includes calculating a tentative electric resistance of the plurality of windings according to an equation that defines a relationship between electric resistance and a group of parameters that include voltage, current, and rotor speed, the parameters being used to control the rotation of the rotor. The processing includes calculating a resistance difference between the tentative electric resistance and electric resistance inferred last time. The processing includes detecting a change in a load state according to the group of parameters. The processing includes inferring the electric resistance by adding the integrated value of calculated resistance differences to the initial value of the inferred electric resistance. The processing includes inferring the temperature of the windings according to the inferred electric resistance. In the inferring the electric resistance, of the resistance differences that have been calculated up to now, a resistance difference calculated when a change in the load state is detected is excluded from the integrated value. 
     The above comprehensive or specific aspects are able to be implemented by a device, a system, a method, an integrated circuit, a computer program, or a recording medium. Alternatively, the above comprehensive or specific aspects are also able to be implemented by any combination of a device, a system, a method, an integrated circuit, a computer program, and a recording medium. 
     The above and other elements, features, steps, characteristics and advantages of the present disclosure will become more apparent from the following detailed description of the preferred embodiments with reference to the attached drawings. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1A  is a diagram that illustrates the schematic structure of a motor module according to a first exemplary embodiment in the present disclosure. 
         FIG. 1B  is a diagram that schematically illustrates an example of the internal structure of a controller  300  in the first exemplary embodiment in the present disclosure. 
         FIG. 2  is a block diagram that illustrates a more specific example of the structure of the MCU  300  in the first exemplary embodiment in the present disclosure. 
         FIG. 3  is a diagram that schematically illustrates an example of the structure of an inverter circuit  400  in the first exemplary embodiment in the present disclosure. 
         FIG. 4A  is a diagram that illustrates an example of time-dependent changes in winding resistance Rw under a certain condition. 
         FIG. 4B  is a diagram that illustrates an example of time-dependent changes in winding temperature Tw under a certain condition. 
         FIG. 5  is a flowchart that illustrates an example (comparative example) of basic processing by a temperature inferring unit  350 . 
         FIG. 6A  is a graph that illustrates an example of time-dependent changes in measured values and inferred values of winding temperature in a situation in which the rotational speed of a rotor is constant and torque changes with time. 
         FIG. 6B  is a graph that illustrates an example of time-dependent changes in measured values and inferred values of winding temperature in a situation in which torque is constant and the rotational speed of the rotor changes with time. 
         FIG. 7  is a flowchart that illustrates a basic flow in temperature inference processing in the first exemplary embodiment in the present disclosure. 
         FIG. 8  is a flowchart that illustrates another example of processing by the temperature inferring unit  350  in the first exemplary embodiment in the present disclosure. 
         FIG. 9  is a flowchart that illustrates an example of processing in which each of a group of parameters used to calculate tentative winding resistance Rw is time-averaged and is used. 
         FIG. 10  is a flowchart that illustrates another variation of the first exemplary embodiment in the present disclosure. 
         FIG. 11A  is a diagram that illustrates results in an experiment in which winding temperature was inferred by the method illustrated in  FIG. 5  under a situation in which a load state changes. 
         FIG. 11B  is a diagram that illustrates results in an experiment in which winding temperature was inferred by the method (differential method) illustrated in  FIG. 7  under a situation in which a load state changes. 
         FIG. 12  is a flowchart that illustrates an example of temperature inference processing in a second exemplary embodiment in the present disclosure. 
         FIG. 13  is a graph that illustrates effects in the second exemplary embodiment in the present disclosure. 
         FIG. 14  is a flowchart that illustrates an example of processing in which an offset method in the second exemplary embodiment in the present disclosure and the differential method are combined together. 
         FIG. 15A  is a graph that illustrates an example of time-dependent changes in winding temperature inferred by using only the offset method illustrated in  FIG. 12 . 
         FIG. 15B  is a graph that illustrates an example of time-dependent changes in winding temperature inferred by using a combination of the offset method and differential method illustrated in  FIG. 14 . 
         FIG. 16  is a flowchart that illustrates processing in a variation of the second exemplary embodiment in the present disclosure. 
         FIG. 17  is a flowchart illustrating an example of control executed by a motor module. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Exemplary embodiments in the present disclosure will be described below. However, more detailed descriptions than necessary may be omitted. For example, detailed descriptions of matter that is already well-known or repeated descriptions of substantially the same structure may be omitted. This is to prevent descriptions below from becoming more redundant than necessary and for easy understanding by those of ordinary skill in the art. Incidentally, the inventor provides the attached drawings and descriptions below so that those of ordinary skill in the art adequately understand the present disclosure, and the attached drawings and descriptions are not intended to restrict the main subjects described in the scope of the claims. In the descriptions below, the same or similar constituent elements will be assigned the same reference numerals. 
       FIG. 1A  is a diagram that illustrates the schematic structure of a motor module according to an exemplary embodiment in the present disclosure. This motor module has a motor  100 , a motor control circuit (motor controller)  200 , a current sensor unit  500 , and a rotor angle inferring unit  600 . 
     The motor  100  in this embodiment is an alternating-current motor that is driven by three-phase alternating currents. The motor  100  may be, for example, a permanent magnet synchronous motor. The motor  100  has a rotor and stator. If the motor  100  is a permanent magnet synchronous motor (sometimes referred to as a brushless DC motor), the rotor has permanent magnets and the stator has a plurality of windings (three-phase coils). The descriptions below will mainly assume an IPMSM (interior permanent magnet synchronous motor) in which permanent magnets are embedded in the interior of the rotor and that has magnetic saliency. However, the motor  100  is not limited to an IPMSM. 
     The current sensor unit  500  has one or a plurality of sensors that monitor currents, each of which flows in one of a plurality of windings. The current sensor unit  500  does not necessarily need to directly measure a current in each of the windings in three phases. If the sum of currents in three phases is always 0, for example, it is only necessary for the current sensor unit  500  to be capable of measuring currents only in two phases of the currents in three phases. A current in the remaining one phase can be obtained by a calculation. Therefore, even in a case in which currents in only two phases are measured, currents flowing in all windings can be monitored. 
     The rotor angle inferring unit  600  obtains the angular position of the rotor in the motor  100  by a measurement or calculation and creates a rotor position signal that indicates the angular position. The “angular position” of the rotor means a rotational angle (that is an electric degree and its unit is radian) from the reference state of the rotor. In some examples, the rotor angle inferring unit  600  can be implemented by a sensor that measures the angular position of the rotor (a hall element, a resolver, or rotary encoder, for example). The rotor angle inferring unit  600  is not limited to a sensor but can also be implemented by software executed by the motor control circuit  200 . In this description, “inference” of a rotor angle by the rotor angle inferring unit  600  includes not only obtaining the rotor angle by a calculation but also measuring the rotor angle by using a sensor. 
     The motor control circuit  200  is connected to the motor  100 . The motor control circuit  200  controls the rotation of the rotor by applying a voltage to the plurality of windings in the stator according to a control algorithm such as, for example, a known field oriented control (FOC) algorithm. The motor control circuit  200  in this embodiment has an inverter circuit  400  and a controller  300 . The inverter circuit  400  applies three-phase alternating voltages to the plurality of windings in the stator in the motor  100  in response to a command from the controller  300 . The controller  300  controls the inverter circuit  400  according to a control algorithm such as an FOC algorithm. Thus, desired three-phase alternating voltages are applied to the stator in the motor  100 . 
     The controller  300  has a temperature inferring unit  350  that repeats processing to infer the electric resistance and temperature of the plurality of windings in the stator in the motor  100 . Here, the “electric resistance of the plurality of windings” does not means the electric resistance of each of the plurality of windings but means the total electric resistance of the plurality of windings. 
       FIG. 1B  is a diagram that schematically illustrates an example of the internal structure of the controller  300 . In the example in  FIG. 1B , the controller  300  is implemented by a microcontroller unit (MCU). The rotor angle inferring unit  600  and temperature inferring unit  350  can be implemented by software executed by the MCU. That is, the motor control circuit  200  has the temperature inferring unit  350  that repeats processing to infer the electric resistance and temperature of the plurality of windings. 
     In the descriptions below, it will be assumed that the controller  300  is an MCU. The controller (MCU)  300  has a CPU (central processing unit)  360 , a ROM (read only memory)  370 , and a RAM (random access memory)  380 . 
     The ROM  370 , which is a non-volatile memory, stores various types of software (computer programs) used to control the motor  100 . The RAM  380 , which is a volatile memory, is a work memory used when the CPU  360  executes a program. The RAM  380  also works as a storage medium that stores various parameters created by the CPU  360  in a calculation process. Programs used in this embodiment stipulate a known field oriented control (FOC) algorithm and a temperature inferring algorithm, which will be described later. FOC, which is also referred to as vector control, is used to control a three-phase alternating current motor such as a permanent magnet synchronous motor. 
     Although, in this embodiment, the temperature inferring unit  350  is implemented by software executed by the MCU  300 , the temperature inferring unit  350  may be implemented by hardware (circuit) that has an equivalent function. The temperature inferring unit  350  can also be configured as a single device. In this case, the temperature inferring unit  350  is referred to as the “temperature inferring apparatus”. Specific processing by the temperature inferring unit  350  will be described later. The rotor angle inferring unit  600  may also be implemented by individual hardware (sensor or circuit). 
       FIG. 2  is a block diagram that illustrates a more specific example of the structure of the MCU  300  in this embodiment. The MCU  300  in this embodiment controls the motor  100  according to an FOC algorithm. In  FIG. 2 , a plurality of functional blocks used in control for the motor  100  are illustrated. In particular, the MCU  300  in this embodiment infers the winding resistance and winding temperature of the motor  100  while controlling the motor  100 . The inference of the winding resistance and winding temperature is performed by the temperature inferring unit  350 . 
     In additions to the CPU  360 , ROM  370 , and RAM  380  described above, the MCU  300  has an A-D converter  310  and a PWM driver  340 . Other constituent elements (functional blocks), illustrated in  FIG. 2 , of the MCU  300  are implemented when the CPU  360  executes software stored in the ROM  370 . Part or all of the constituent elements implemented in this embodiment by software may be implemented by hardware (circuits). Conversely, part or all of the constituent elements implemented in this embodiment by hardware may be implemented by software. The PWM driver  340  and A-D converter  310  may be a circuit that is provided outside the MCU  300 . 
       FIG. 3  is a diagram that schematically illustrates an example of the structure of the inverter circuit  400 . The inverter circuit  400  in this embodiment has the circuit structure of a three-phase voltage-source inverter. The inverter circuit  400  is a bridge circuit that has six switching elements, Sa, Sa′, Sb, Sb′, Sc and Sc′. Each switching element can be implemented by, for example, a transistor such as an IGBT (insulated-gate bipolar transistor) or a MOSFET (metal oxide semiconductor field-effect transistor). The gate of each switching element is connected to the PWM driver  340  in the MCU  300 . The state of electrical continuity (on)/electrical non-continuity (off) of each switching element is switched in response to a control signal (PWM pulse signal) output from the PWM driver  340 . The MCU  300  supplies three-phase alternating currents to the motor  100  by controlling an electrical continuity timing for each switching element. Incidentally, in this description, three phases are represented as a phase a, a phase b, and a phase c. For easy understanding, assuming that the number of pole pairs is 1,  FIG. 3  schematically illustrates windings in three phases in the motor  100  as three coils. However, this is merely exemplary. Ways of forming a winding in each phase of an actual motor are various. The number of pole pairs is not limited to 1; the number may be 2 or larger. 
     Referring again to  FIG. 2 , a current flowing in a winding (coil) in each phase in the stator of the motor  100  is detected by the current sensor unit  500 . The current sensor unit  500  may be, for example, a sensor that uses a hall element that magnetically detects a current in a noncontact manner in the vicinity of a line connected to the winding in each phase. In another example, the current sensor unit  500  may be a sensor that includes a plurality of shunt resistors connected between the switching elements Sa′, Sb′ and Sc′ below the inverter circuit  400  and ground (GND). A current in each phase can be obtained from a voltage drop in the shunt resistor. Incidentally, as described above, the current sensor unit  500  does not need to measure all of currents in three phases but only needs to be capable of measuring currents in at least two phases of these. The current sensor unit  500  sends a signal indicating a current value detected in each phase to the MCU  300 . 
     The A-D converter  310  in the MCU  300  converts analog signals indicating currents Ia, Ib, and Ic, received from the current sensor unit  500 , in individual phases to digital signals and outputs them. A Clarke conversion module  320  performs coordinate conversion (Clarke conversion) on the currents Ia, Ib, and Ic, and outputs signals indicating a current Iα, which is an α-axis component, and a current Iβ, which is a β-axis component. Here, the α-axis matches the axis of the phase a, and the β-axis is an axis having a phase that advances  90  electric degrees from the α-axis. Next, a Park conversion module  322  converts the currents Iα and Iβ to currents Id and Iq represented in a coordinate system that rotates together with the permanent magnets in the rotor of the motor  100  (Park conversion). As is well known, the d-axis is the axis in the main direction of a magnetic flux generated by the permanent magnets in the rotor, and the q-axis is an axis that advances  90  electric degrees from the d-axis. 
     To perform Park conversion, information about the rotational position (electric degrees) of the rotor is necessary. Information about the rotational position of the rotor is obtained from the rotor angle inferring unit  600 . The rotor angle inferring unit  600  in this embodiment infers the rotational position (rotor angle θe) of the rotor by using a known sensor-less position detection technology. The rotor angle inferring unit  600  determines the rotor angle θe according to, for example, the induced voltage of the winding in each phase. A signal (rotor position signal) indicating the rotor angle θe determined by the rotor angle inferring unit  600  is sent to the Park conversion module  322  and a rotor speed inferring unit  331 . The rotor speed inferring unit  331  calculates a rotor speed from the amount of change in rotor angle θe per unit time. The “rotor speed” means the electric angle speed ωe (the unit is rad/s) of the rotor. The Park conversion module  322  converts the currents Iα and Iβ to the currents Id and Iq according to the rotor position signal. As described above, the d-axis current Id and q-axis current Iq are calculated according to a plurality of currents monitored by the current sensor unit  500  and to the rotor position signal created by the rotor angle inferring unit  600 . 
     Signals indicating the d-axis current Id and q-axis current Iq calculated by the Park conversion module  322  are respectively compared with a command value Id* for the d-axis current and a command value Iq* for the q-axis current. Then, signals indicating deviations (Id*−Id) and (Iq*−Iq) are input into the PI controller  333 . The PI controller  333  performs PI control and determines, from the signals indicating deviations (Id*−Id) and (Iq*−Iq), voltage command values Vd* and Vq* that eliminate the deviations. Here, the current command values Id* and Iq* are determined by the PI controller  332 . The PI controller  332  determines the current command values Id* and Iq* according to a deviation (ωe*−ωe) between the rotor speed ωe calculated by the rotor speed inferring unit  331  and the speed command value ωe*. The PI controller  332  performs PI control and determines the current command values Id* and Iq* that eliminate the deviation (ωe*−ωe). Incidentally, the PI controllers  332  and  333  may determine each command value by performing other control such as, for example, PID control or P control, instead of PI control. 
     After the voltage command values Vd* and Vq* have been determined by the PI controller  333 , a reverse Park conversion module  334  converts the voltage command values Vd* and Vq* to voltage command values Vα* and Vβ* in a stationary coordinate system (reverse Park conversion). Next, a spatial vector (SV) generator  335  determines the ratio of an electrical continuity (referred to as the on-time ratio) in one cycle of each switching element in the inverter circuit  400  by performing spatial vector modulation according to the voltage command values Vα* and Vβ*. The PWM driver  340  outputs control signals (PWM pulse signals) used to make an on/off switchover for each switching element in the inverter circuit  400 , according to the determined on-time ratio. 
     A series of operations described above is repeatedly executed in relatively short cycles (about 100 microseconds (μs), for example). Due to control described above, the rotor can rotate at a rotational speed that substantially matches the speed command value ωe*. Incidentally, the structure indicated in  FIG. 2  is just an example, and the technology in the present disclosure is not limited to the structure in  FIG. 2 . For example, control signals for the inverter circuit  400  may be created by another method such as a triangular wave comparison method, instead of spatial vector modulation. 
     The MCU  300  in this embodiment further has the temperature inferring unit  350  that infers winding temperature. The temperature inferring unit  350  has a winding resistance inferring module  352  and a winding temperature inferring module  354 . The winding resistance inferring module  352  infers winding resistance according to an equation that stipulates a relationship between a group of parameters used in control for the motor  100  and winding resistance, as will be described later. The winding temperature inferring module  354  infers winding temperature from winding resistance according to a relationship between winding resistance and winding temperature. 
       FIG. 4A  and  FIG. 4B  illustrate an example of a relationship between the winding resistance Rw and winding temperature Tw of the stator.  FIG. 4A  is a diagram that illustrates an example of time-dependent changes in the winding resistance Rw under a certain condition.  FIG. 4B  is a diagram that illustrates an example of time-dependent changes in the winding temperature Tw under the same condition. Between the winding resistance Rw and the winding temperature Tw, there is a relationship that is approximately indicated by equation (1) below. 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       Math 
                       . 
                       
                           
                       
                        
                       1 
                     
                     ] 
                   
                    
                   
                       
                   
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   Tw 
                   = 
                   
                     
                       
                         1 
                         α 
                       
                        
                       
                         ( 
                         
                           
                             Rw 
                             - 
                             
                               R 
                               0 
                             
                           
                           
                             R 
                             0 
                           
                         
                         ) 
                       
                     
                     + 
                     
                       T 
                       0 
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     where T 0  represents reference temperature (room temperature, for example), R 0  represents winding temperature at the reference temperature, and α is a constant that depends on the material of the winding. If the material of the winding is, for example, copper, α is 0.004041/K. The winding temperature inferring module  354  in this embodiment calculates the winding temperature Tw from the inferred winding resistance Rw by using equation (1). 
     Next, an example of processing in which the temperature inferring unit  350  infers winding resistance will be described. To infer winding resistance, the temperature inferring unit  350  in this embodiment uses an equation that stipulates a relationship between a group of parameters used to control the motor  100  and winding resistance. The group of parameters includes parameters that indicate a voltage, a current, and a rotor speed (electric angular speed). The equation that stipulates a relationship between the group of parameters used to control the motor and winding resistance may be, for example, equation (2) below. For example, the temperature inferring unit  350  infers a tentative resistance at each time according to equation (2) below. 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       Math 
                       . 
                       
                           
                       
                        
                       2 
                     
                     ] 
                   
                    
                   
                       
                   
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     [ 
                     
                       
                         
                           
                             V 
                             d 
                           
                         
                       
                       
                         
                           
                             V 
                             q 
                           
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       
                         [ 
                         
                           
                             
                               
                                 R 
                                 w 
                               
                             
                             
                               
                                 
                                   - 
                                   
                                     ω 
                                     e 
                                   
                                 
                                  
                                 
                                   L 
                                   q 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   ω 
                                   e 
                                 
                                  
                                 
                                   L 
                                   d 
                                 
                               
                             
                             
                               
                                 R 
                                 w 
                               
                             
                           
                         
                         ] 
                       
                        
                       
                         [ 
                         
                           
                             
                               
                                 I 
                                 d 
                               
                             
                           
                           
                             
                               
                                 I 
                                 q 
                               
                             
                           
                         
                         ] 
                       
                     
                     + 
                     
                       [ 
                       
                         
                           
                             0 
                           
                         
                         
                           
                             
                               
                                 Ψ 
                                 e 
                               
                                
                               
                                 ω 
                                 e 
                               
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
     where Rw is the electric resistance of the winding, Vq is the q-axis voltage, ωe is the electric angular speed of the rotor, Id is the d-axis current, Iq is the q-axis current, Ld is the d-axis inductance of a plurality of windings, and ψe is the magnetic flux linkage of the winding due to a magnetic flux created by the permanent magnets in the rotor. 
     Equation (2) is an equation that ignores a time derivative item in a voltage equation (3) below for a permanent magnet synchronous motor. 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       Math 
                       . 
                       
                           
                       
                        
                       3 
                     
                     ] 
                   
                    
                   
                       
                   
                 
               
               
                 
                     
                 
               
             
             
               
                 
                   
                     [ 
                     
                       
                         
                           
                             V 
                             d 
                           
                         
                       
                       
                         
                           
                             V 
                             q 
                           
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       
                         [ 
                         
                           
                             
                               
                                 
                                   R 
                                   w 
                                 
                                 + 
                                 
                                   pL 
                                   d 
                                 
                               
                             
                             
                               
                                 
                                   - 
                                   
                                     ω 
                                     e 
                                   
                                 
                                  
                                 
                                   L 
                                   q 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   ω 
                                   e 
                                 
                                  
                                 
                                   L 
                                   d 
                                 
                               
                             
                             
                               
                                 
                                   R 
                                   w 
                                 
                                 + 
                                 
                                   pL 
                                   q 
                                 
                               
                             
                           
                         
                         ] 
                       
                        
                       
                         [ 
                         
                           
                             
                               
                                 I 
                                 d 
                               
                             
                           
                           
                             
                               
                                 I 
                                 q 
                               
                             
                           
                         
                         ] 
                       
                     
                     + 
                     
                       [ 
                       
                         
                           
                             0 
                           
                         
                         
                           
                             
                               
                                 Ψ 
                                 e 
                               
                                
                               
                                 ω 
                                 e 
                               
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
     where the symbol “p” in equation (3) represents time derivative. In a steady state, it can be thought that pLd is 0 and pLq is 0, so equation (2) holds. 
     When equation (2) is modified, the following two equations, (4) and (5), are obtained. 
       [Math. 4] 
         R   w =( V   d +ω e   L   q   I   q )/ I   d   (4)
 
       [Math. 5] 
         R   w =( V   q −ω e   L   d   I   d −Ψ e ω e )/ I   q   (5)
 
     where, the magnetic flux linkage ψe and the inductances Ld and Lq are known values obtained in a measurement performed in advance or from the specifications of the motor. In this embodiment, to simplify processing, the magnetic flux linkage ψe and the time-dependent changes and temperature dependence of the inductances Ld and Lq will be ignored. From equations (4) and (5), it is found that if a group of parameters Vd, ωe, Id, and Iq or a group of parameters Vq, ωe, Id, and Iq is obtained, the winding resistance Rw can be inferred. In an actual calculation, the winding resistance Rw can be calculated by using one of equation (4) and equation (5). Since, the d-axis current Id is often set to a value near 0, equation (5) is typically used. 
     When equation (5) is used, a group of parameters to be used is the group of Vq, Id, Iq, and ωe. The third item in equation (5) can be represented as “−Ke×ω” by using the back electromotive force Ke and machine angular speed ω (=P×ωe, P is the number of pole pairs) of the motor. Therefore, if equation (5) is sued, the temperature inferring unit  350  may obtain Rw by calculating “−Ke×ω” instead of “−ψe×ωe”. If “−Ke×ω” is calculated, the machine angular speed ω of the rotor is also included in the group of parameters. The machine angular speed ω can be inferred by the rotor angle inferring unit  600 . The constant Ke is a known value obtained in a measurement performed in advance or from the specifications of the motor. On the other hand, if equation (4) is used, a group of parameters to be used is the group of Vd, Id, Iq, and ωe. 
     The voltage command values Vd* and Vq* determined by the MCU  300  according to an FOC algorithm are used for the parameters Vd and Vq. The parameters Id and Iq are the currents Id and Iq calculated by the Park conversion module  322 . The parameter ωe is the electric angular speed ωe calculated by the rotor speed inferring unit  331 . A group of these parameters can be stored in the RAM  380  each time they are created. When inferring winding resistance, the temperature inferring unit  350  retrieves necessary parameters from the RAM  380  and uses them. 
     A specific example of processing by the temperature inferring unit  350  in this embodiment will be described below. In the description below, a case in which winding resistance is inferred by mainly using equation (5) will be assumed. However, the equation to be used is not limited to equation (5) but may be another equation such as equation (4). 
       FIG. 5  is a flowchart that illustrates an example (comparative example) of basic processing by the temperature inferring unit  350 . The temperature inferring unit  350  retrieves the parameters Vq, Id, Iq, and ωe from the RAM  380  in step S 110 . The temperature inferring unit  350  calculates the winding resistance Rw according to equation (5) in step S 120 . The temperature inferring unit  350  calculates the winding temperature Tw according to equation (1) in step S 130 . After that, the temperature inferring unit  350  waits in step S 140  until a predetermined time (one second, for example) elapses. After the elapse of the predetermined, the temperature inferring unit  350  returns to step S 110 . The temperature inferring unit  350  repeats the calculation (inference) of the winding resistance Rw and winding temperature Tw at intervals of the predetermined time. 
     According to the processing illustrated in  FIG. 5 , the winding temperature Tw can be inferred by a relatively simple calculation. In a steady state in which the load state of the motor  100  does not change, winding temperature can be inferred with high accuracy by the processing illustrated in  FIG. 5 . 
     According to a study by the inventors, however, it was found that, in the processing illustrated in  FIG. 5 , if the load state of the motor  100  changes, error becomes large, so countermeasures are necessary. Here, the “load state” means an operation state determined by a combination of the rotational speed of the rotor and torque. Torque is determined by a combination of a d-axis current and q-axis current. Therefore, the “load state” can be said to be an operation state determined by a combination of the rotation speed of the rotor, a d-axis current, and a q-axis current. The problem that error in temperature inference becomes large due to a change in the load state will be described below while  FIG. 6A  and  FIG. 6B  are referenced. 
       FIG. 6A  illustrates an example of time-dependent changes in measured values and inferred values of winding temperature in a situation in which the rotational speed of the rotor is constant and torque changes with time.  FIG. 6B  illustrates an example of time-dependent changes in measured values and inferred values of winding temperature in a situation in which torque is constant and the rotational speed of the rotor changes with time. Here, a measured value is the temperature of the windings that was measured by using a temperature sensor. An inferred value is temperature calculated by the method illustrated in  FIG. 5 . As illustrated in  FIG. 6A  and  FIG. 6B , when the load state changes, winding temperature inferred from the winding resistance Rw calculated by using equation (5) largely deviates from actual temperature. As the main reason why this deviation occurs, it can be thought that a control parameter for the motor  100  largely changes along with a change in the load state and error becomes large in an equation in which a time derivative item is ignored as in equation (5). 
     In this embodiment, therefore, a new temperature inference method substituted for the method in  FIG. 5  is applied. The temperature inferring unit  350  in this embodiment repeats processing (cycle) to infer the electric resistance and temperature of a plurality of windings. Processing at each time includes steps (1) to (4) below. 
     (1) The tentative winding resistance Rw of a plurality of windings is calculated according to an equation that stipulates a relationship between the electric resistance of the plurality of windings and a group of parameters (including voltage Vq, currents Id and Iq, and the rotor speed ωe) used to control the rotation of the rotor. 
     (2) A difference (resistance difference) between the tentative winding resistance Rw and electric resistance inferred last time. 
     (3) Electric resistance is inferred by adding the integrated value of calculated resistance differences to the initial value of the inferred electric resistance. Here, of the calculated resistance differences, a resistance difference exceeding a threshold is excluded from the integrated value. 
     (4) The temperature of the plurality of windings is inferred according to the inferred electric resistance. 
     This temperature inference method will be described below in detail. 
       FIG. 7  is a flowchart that illustrates a basic flow in temperature inference processing in this embodiment. The temperature inferring unit  350  in this embodiment infers winding temperature at intervals of a predetermined time (one second, for example) by repeatedly executing processing described below. That is, processing by the temperature inferring unit  350  includes the steps described below. 
     Step S 210 : The temperature inferring unit  350  retrieves the parameters Vq, Id, Iq, and ωe from the RAM  380 . The parameter Vq is the same as the voltage command value Vq* indicated in  FIG. 2 . Although the value of each parameter may be a value at that point in time, the value of the parameter may be, for example, a value taken by averaging values of the parameter that were calculated from the last temperature inference time to temperature inference at this time. Noise included in calculation results can be reduced by taking an average. An example of processing in a case in which an average is taken will be described later. 
     Step S 220 : The temperature inferring unit  350  calculates the tentative winding resistance Rw according to equation (5). The temperature inferring unit  350  may use another equation such as equation (4) instead of equation (5). 
     Step S 230 : The temperature inferring unit  350  calculates a difference ΔRw (resistance difference) between Rw calculated this time and Rw determined (inferred) last time. Here, Rw inferred last time is not always the value calculated according to equation (5) but an inferred value of the winding resistance Rw that was finally determined in the last processing. 
     Step S 240 : The temperature inferring unit  350  decides whether the resistance difference ΔRw exceeds a threshold that was set in advance. If ΔRw exceeds the threshold, the temperature inferring unit  350  proceeds to step S 250 . If ΔRw does not exceed the threshold, the temperature inferring unit  350  proceeds to step S 260 . 
     Step S 250 : The temperature inferring unit  350  sets ΔRw to 0 and proceeds to step S 260 . 
     Step S 260 : The temperature inferring unit  350  determines, as the current Rw, a value (Rw 0 +ΣΔRw) taken by adding the integrated value ΣΔRw of the previous resistance differences ΔRw to the initial value Rw 0 . The initial value Rw 0  may be Rw calculated according to equation (5) during, for example, first processing. Rw calculated by a computation of Rw 0 +ΣΔRw is processed as the current inferred value of winding resistance. 
     Step S 270 : The temperature inferring unit  350  calculates (infers) the winding temperature Tw from Rw inferred in step S 260 , according to equation (1). 
     Step S 280 : The temperature inferring unit  350  waits until a predetermined time elapses. After the elapse of the predetermined time, the temperature inferring unit  350  returns to step S 210 . 
     Processing in this embodiment differs from processing indicated in  FIG. 5  in that Rw calculated according to equation (5) is not used as the inferred value of the winding resistance as it is. In this embodiment, a value taken by adding the difference ΔRw between Rw inferred last time and Rw calculated this time to Rw inferred last time is the inferred value of winding resistance. If the resistance difference ΔRw exceeds a threshold, however, ΔRw is processed as 0. That is, if ΔRw exceeds the threshold, that ΔRw is ignored. As a result, the same value as Rw inferred last time is processed as the current inferred value of winding resistance. The reason why ΔRw is processed in this way is that if ΔRw is large, the probability that the load state has largely changed is high and it can be thought that the reliability of the value of Rw calculated according to equation (5) is low. Due to this processing, the temperature inferring unit  350  can suppress the effect of variations in the load state and can more accurately infer temperature. In this description, a method of obtaining the electric resistance of windings by integrating ΔRw as in this embodiment may be referred to as a differential method. 
     In an example illustrated in  FIG. 7 , the MCU  300  detects a change in the load state according to the result of a comparison between ΔRw and a threshold. However, the MCU  300  may detect a change in the load state by another method. For example, the MCU  300  may detect a change in the load state according to a time-dependent change in at least one parameter, such as a current or a rotor speed, that determines the load state. The resistance difference ΔRw calculated at a time when a change in the load state is detected is excluded from the integrated value. As one example, an example will be described in which processing by the temperature inferring unit  350  includes processing to further exclude, from the integrated value, a resistance difference calculated at a time when a difference between the current value of the q-axis current Iq or rotor speed ωe and its last value exceeds a threshold, in addition to ΔRw. 
       FIG. 8  is a flowchart that illustrates another example of processing by the temperature inferring unit  350  in this embodiment. The flowchart illustrated in  FIG. 8  differs from the flowchart illustrated in  FIG. 7  only in that steps S 230  and S 240  are respectively replaced with steps S 230 ′ and S 240 ′. The temperature inferring unit  350  calculates differences ΔRw, ΔIq, and Δωe between the current value and the last value for each of Rw, Iq, and ωe in step S 230 ′. Then, in step S 240 ′, the temperature inferring unit  350  decides whether at least one of ΔRw, ΔIq, and Δωe exceeds its threshold. If at least one of ΔRw, ΔIq, and Δωe exceeds its threshold, the temperature inferring unit  350  sets ΔRw to 0 in step S 250  and proceeds to step S 260 . If none of ΔRw, ΔIq, and Δωe exceeds its threshold, the temperature inferring unit  350  proceeds to step S 260 . The subsequent operation is the same as the operation illustrated in  FIG. 7 . 
     In the example illustrated in  FIG. 8 , a change in the load state is detected in consideration of not only the magnitude of ΔRw but also the magnitudes of ΔIq and Δωe. Accordingly, even if ΔRw falls below the threshold, when ΔIq or Δωe is large, that ΔRw is not added to the last inferred resistance value. Due to this operation, accuracy in temperature inference is further improved. 
     The temperature inferring unit  350  can detect a change in the load state according to at least one of a group of parameters used to calculate the tentative winding resistance Rw, without being limited to the above example. If the temperature inferring unit  350  detects a change in the load state, the temperature inferring unit  350  can suppress error by excluding the resistance difference ΔRw from the integrated value. 
     Next, a variation of the differential method in this embodiment will be described. 
       FIG. 9  is a flowchart that illustrates an example of processing in which each of a group of parameters used to calculate the tentative winding resistance Rw is time-averaged and is used. Here, a cycle in which winding temperature is inferred will be referred to as a first cycle T 1 , and a cycle in which the group of parameters are calculated will be referred to as a second cycle T 2 . The first cycle T 1  is longer than the second cycle T 2 . The temperature inferring unit  350  obtains the average value of each parameter over the first cycle T 1  and calculates the tentative winding resistance Rw by using the average value of each parameter. The second cycle T 2  is a cycle in which each parameter is calculated according to an FOC algorithm. The second cycle T 2  may be a short time of, for example, about 100 microseconds. By contrast, the first cycle T 1  may be, for example, about 10000 times the second cycle T 2  (about one second). Winding temperature does not so rapidly change from the viewpoint of time. To suppress the amount of calculation, therefore, winding temperature is calculated at a frequency lower than the calculation cycle of each parameter. The first cycle T 1  may be set to, for example, about 10 milliseconds to about five seconds. The second cycle T 2  may be set to, for example, about 20 microseconds to about 500 microseconds. However, the cycles T 1  and T 2  are not limited to these numerical ranges. 
     In the example illustrated in  FIG. 9 , the value of each parameter calculated in the second cycle T 2  is recorded in the RAM  380  each time a calculation is performed. Temperature inference processing at each time in this variation includes steps S 310  to S 390  illustrated in  FIG. 9 . First, the temperature inferring unit  350  acquires, from the RAM  380 , the values of the parameters Vq, Id, Iq, and ωe, the values being recorded for each second cycle T 2  (step S 310 ). If the first cycle T 1  is 10000 times the second cycle T 2 , the number of values of each parameter is 10000. The temperature inferring unit  350  calculates the average of each parameter (step S 320 ). When the temperature inferring unit  350  performs temperature inference once each time each parameter is calculated 10000 times, for example, the temperature inferring unit  350  averages 10000 values of each parameter. The temperature inferring unit  350  calculates the tentative winding resistance Rw according to equation (5) by using the average of each parameter (step S 330 ). Subsequent steps S 340  to S 390  are respectively similar to steps S 230  to S 280  illustrated in  FIG. 7 . Incidentally, the “first cycle T 1 ” in step S 390  in  FIG. 9  is the same as the “predetermined time” in step S 280  in  FIG. 7 . 
     In the example illustrated in  FIG. 9 , the tentative winding resistance Rw is calculated by using the value taken by averaging each parameter over the first cycle T 1 . Thus, it is possible to reduce noise and improve a signal-to-noise ratio (SN ratio). 
     In the example illustrated in  FIG. 9 , a change in the load state is detected according to the magnitude of ΔRw in steps S 340  and S 350 , as in the example illustrated in  FIG. 7 . A change in the load state may be detected according to the magnitude of at least one of ΔRw, ΔIq, and Δωe without being limited to this example, as in, for example, the example illustrated in  FIG. 8 . 
       FIG. 10  is a flowchart that illustrates another variation of this embodiment. Processing illustrated in  FIG. 10  differs from processing illustrated in  FIG. 7  in that steps S 410  and S 420  are added after step S 220 . Other points are the same as in processing illustrated in  FIG. 7 . In the example in  FIG. 10 , the temperature inferring unit  350  decides, in processing to infer the electric resistance of the winding at each time, whether the load state is similar to a reference state according to a group of parameters. If the load state is similar to the reference state, the temperature inferring unit  350  decides (infers) the calculated tentative winding resistance Rw as the current winding resistance Rw. In addition, the temperature inferring unit  350  updates the initial value Rw 0  of the winding resistance with the value of the current tentative winding resistance Rw. In this description, this update operation is referred to as “reset”. 
     More specifically, the temperature inferring unit  350  decides whether the load state is similar to the reference state, according to the values of torque T and the rotor speed ωe. The temperature inferring unit  350  may make a decision according to, for example, another parameter such as the value of the q-axis current Iq, instead of the torque T. In the example in  FIG. 10 , the temperature inferring unit  350  decides whether the torque T matches a reference value Tref and the rotor speed ωe matches a reference value ωref (step S 410 ). Here, “match” means that a difference is adequately small. If, for example, the difference is smaller than a threshold, it is decided that there is a match (or similarity). If the temperature inferring unit  350  decides that the torque T and rotor speed ωe are similar to their reference values, the temperature inferring unit  350  decides the calculated tentative winding resistance Rw as the current winding resistance. In addition, the temperature inferring unit  350  updates the initial value Rw 0  with the value of the tentative winding resistance (step S 420 ). In subsequent processing, winding resistance and winding temperature are inferred by using the updated initial value Rw 0 . 
     As described above, in this variation, steps to infer the electric resistance of the winding include step S 410  in which a decision is made as to whether the load state is similar to the reference state according to a group of parameters and step S 420  in which, if the load state is similar to the reference state, the calculated tentative electric resistance is taken as the current inferred value of the electric resistance and the initial value of the electric resistance is updated with the value of the tentative electric resistance. 
     In the differential method in this embodiment, the resistance difference ΔRw is added to the initial value Rw 0  of winding resistance in processing at each time, so error is likely to be accumulated. If the load state is similar to the reference state, therefore, it is effective to reset the initial value with the value of the resistance Rw at that time as in the example illustrated in  FIG. 10 . Due to a reset operation, it is possible to suppress the accumulation of noise and to more accurately perform temperature inference. Incidentally, the reset operation indicated in  FIG. 10  is not limited to the operation illustrated in  FIG. 7 , but may be combined with another operation in  FIG. 8 ,  FIG. 9 , or the like. 
     Next, effects in this embodiment will be described while  FIG. 11A  and  FIG. 11B  are referenced. 
       FIG. 11A  is a diagram that illustrates results in an experiment in which winding temperature was inferred by the method (comparative example) illustrated in  FIG. 5  under a situation in which the load state changes.  FIG. 11B  is a diagram that illustrates results in an experiment in which winding temperature was inferred by the method (differential method) illustrated in  FIG. 7  under the same situation. In  FIG. 11A  and  FIG. 11B , results obtained by measuring winding temperature by using a temperature sensor are also indicated. In this experiment, winding temperature was inferred by the methods in  FIG. 5  and  FIG. 7  and was measured with the temperature sensor while the torque (unit: mNm) of the motor, its rotational speed per unit time (unit: RPM), and ON/OFF of a fan that cools the motor were changed. As seen from  FIG. 11A , in the method in the comparative example illustrated in  FIG. 5 , when the load state (torque or rotational speed) of the motor changes, the inferred values of temperature largely deviate from measured values. By contrast, when the differential method illustrated in  FIG. 7  is used, as illustrated in  FIG. 11B , deviation from measured values is suppressed. From this result, the effectiveness of the differential method in this embodiment was confirmed. 
     As described above, the method, in this embodiment, of inferring the temperature of a plurality of windings in the stator of a motor includes steps in which processing to infer the electric resistance and temperature of the plurality of windings is repeated. The processing includes steps (1) to (5) below. 
     (1) Step of calculating the tentative electric resistance of the plurality of windings according to an equation that stipulates a relationship between electric resistance and a group of parameters that include voltage, current, and rotor speed, the parameters being used to control the rotation of the rotor 
     (2) Step of calculating a resistance difference between tentative electric resistance and electric resistance inferred last time 
     (3) Step of detecting a change in a load state according to the group of parameters 
     (4) Step of inferring electric resistance by adding the integrated value of calculated resistance differences to the initial value of the inferred electric resistance 
     Here, of the calculated resistance differences, a resistance difference calculated when a change in the load state is detected is excluded from the integrated value. 
     (5) Step of inferring the temperature of the plurality of windings according to the inferred electric resistance 
     Due to the processing described above, even if the load state of the motor changes, the temperature of the stator windings can be inferred with high accuracy. 
     Next, a second embodiment in the present disclosure will be described. The structure of a motor module in this embodiment is similar to the structure in the first embodiment. In this embodiment, an algorithm used to infer winding resistance differs from the first embodiment. Points differing from the first embodiment will be described below. 
     In processing at each time, the temperature inferring unit  350  in this embodiment infers the electric resistance of a plurality of windings in the stator according to the equation below. 
       [Math. 6] 
         R   w =( V   q −ω e   L   d   I   d −Ψ e ω e )/ I   q   +f ( I   q ,ω e )  (6)
 
     where f(Iq, ωe) is a function of Iq and ωe. 
     In this embodiment, winding resistance is calculated by using equation (6), instead of the differential method in the first embodiment or in addition to the differential method. An offset item f(Iq, ωe), which is not present in the right side of equation (5), is added to the right side of equation (6). By introducing this offset item that depends on the q-axis current Iq and electric angular speed ωe, it is possible to suppress error due to variations in the load state. In this description, the method of inferring winding resistance by using an equation in which an offset item is introduced will sometimes be referred to as the offset method. 
     According to a study by the inventors, the offset item f(Iq, ωe) can be represented as α(ωe−ωO 0 . Here, α is a parameter that depends on Iq and ωe and ω 0  is the electric angular speed of the rotor in a reference state (a state at room temperature, for example). By appropriately setting the parameter α, it is possible to suppress the effect of variations in the load state. 
     To be more specific, the parameter α is determined from equation (7) below. 
       [Math. 7] 
       α= C   1   T   2   +C   2   T+C   3  
 
     
       
      
       T=D 
       1 
       I 
       q 
       +D 
       2  
      
     
         D   1   =k   1 ω e   +k   2  
 
         D   2   =k   3 ω e   +k   4   (7)
 
     where C1, C2, C3, k1, k2, k3, and k4 are constants determined by an experiment or the like. By appropriately setting these constants, it is possible to increase the accuracy of the offset item. 
       FIG. 12  is a flowchart that illustrates an example of temperature inference processing in this embodiment. Temperature inference processing in this embodiment includes processing in steps S 610  to S 640  indicated in  FIG. 12 . The temperature inferring unit  350  retrieves the parameters Vq, Id, Iq, and ωe from the RAM  380  in step S 610 . The temperature inferring unit  350  calculates the winding resistance Rw according to equation (6) in step S 620  (step S 620 ). The temperature inferring unit  350  calculates the winding temperature Tw according to equation (1) in step S 630  as in the first embodiment. The temperature inferring unit  350  waits until a predetermined time (equivalent to the first cycle T 1  described above) in step S 640 . After the elapse of the predetermined time, the temperature inferring unit  350  executes step S 610  again. Due to processing described above, even if the load state changes, temperature inference can be more accurately performed. 
       FIG. 13  is a graph that illustrates effects in this embodiment.  FIG. 13  illustrates an example of time-dependent changes in the inferred values and measured values of winding temperature. The inferred values are the values of winding temperature inferred by the method illustrated in  FIG. 12 , and the measured values are values of temperature measured by a temperature sensor. As seen from  FIG. 13 , error falls within about 15%. When compared with the results in  FIG. 11A , it is found that error can be greatly reduced by the offset method in this embodiment. 
     As described above, according to the offset method, error in the estimation of winding resistance and winding temperature can be reduced. At the moment at which the load state changes, however, error becomes large as illustrated in  FIG. 13 . To reduce this error, it suffices to use the differential method described in the first embodiment. 
       FIG. 14  is a flowchart that illustrates an example of processing in which the offset method and the differential method are combined together. Processing in  FIG. 14  is the same as processing illustrated in  FIG. 7  except step S 720 . Step S 220  in  FIG. 7  has been replaced with step S 720 . In step S 720 , the temperature inferring unit  350  calculates the tentative winding resistance Rw according to equation (6) instead of equation (5). Due to processing illustrated in  FIG. 14 , effects in the offset method in this embodiment can be obtained besides the effects in the differential method in the first embodiment. As a result, error can be further reduced. 
       FIG. 15A  and  FIG. 15B  illustrate effects in the temperature inference method illustrated in  FIG. 14 .  FIG. 15A  illustrates an example of time-dependent changes in winding temperature inferred by using only the offset method illustrated in  FIG. 12 .  FIG. 15B  illustrates an example of time-dependent changes in winding temperature inferred by using a combination of the offset method and differential method, which are illustrated in  FIG. 14 . By combining the offset method and differential method together, it was confirmed that error at the moment at which the load state changes is greatly reduced. 
     Next, a variation of this embodiment will be described. In this embodiment as well, all variations described for the first embodiment can be applied. For example, the variations that have been described while  FIGS. 8 to 10  were referenced can be applied to this embodiment as well. As an example, an example in which the variations illustrated in  FIGS. 8 to 10  are combined together will be described. 
       FIG. 16  is a flowchart that illustrates a variation of this embodiment. Temperature inference processing in this variation includes processing in steps S 810  to S 910  indicated in  FIG. 16 . Steps S 810  and S 820  are respectively the same as steps S 310  and S 320  indicated in  FIG. 9 . The temperature inferring unit  350  retrieves, from the RAM  380 , parameters (Vq, Id, Iq, and ωe) recorded at intervals of the second cycle T 2  and calculates the average of each parameter. In step S 830 , the temperature inferring unit  350  calculates the tentative winding resistance Rw from equation (6) by using the average of each parameter. In step S 840 , the temperature inferring unit  350  decides whether the load state is similar to a reference state by comparing torque T with the reference value Tref and comparing the rotor speed ωe with the reference value ωeref. If the load state is similar to the reference state, the temperature inferring unit  350  proceeds to step S 850 , where the temperature inferring unit  350  determines the tentative winding resistance Rw as the current Rw and updates the initial value Rw 0  with the current Rw. After step S 850 , the temperature inferring unit  350  proceeds to step S 900 . If the load state is not similar to the reference state, the temperature inferring unit  350  executes operations in steps S 860 , S 870 , S 880 , S 890 , S 900 , and S 910 . The operations in steps S 860 , S 870 , S 880 , S 890 , S 900 , and S 910  are similar to operations in steps S 230 ′, S 240 ′, S 250 , S 260 , S 270 , and S 280  indicated in  FIG. 8 , so descriptions will be omitted. 
     According to the operations in  FIG. 16 , effects due to the averaging of parameters, a reset operation, and the detection of a change, in the load state, based on the time-dependent changes of a plurality of parameters are obtained besides the effects due to the offset method and differential method. Therefore, the MCU  300  can be still more accurately inferred. 
     Next, an example of control in which the inferred winding temperature Tw is used will be described. 
       FIG. 17  is a flowchart illustrating an example of a control method executed by a motor module. The control method includes processing in steps S 960  to S 990  indicated in  FIG. 17 . In step S 960 , the motor control circuit  200  controls the motor  100  according to an FOC algorithm. A specific example of this control is as described while  FIG. 2  was referenced. In step S 970 , the temperature inferring unit  350  performs processing to infer the temperature Tw of the stator windings in any one of the methods described above. In step S 980 , the MCU  300  in the motor control circuit  200  decides whether the inferred temperature Tw exceeds a threshold Tth. If the temperature Tw exceeds the threshold Tth, the MCU  300  proceeds to step S 990 , where the MCU  300  reduces the rotor speed of the motor  100 . For example, the MCU  300  completely stops the motor  100  or sets the rotor speed to a lower value. More specifically, the MCU  300  reduces the rotor speed of the motor  100  by adjusting control signals to be supplied to a plurality of switching elements in the inverter circuit  400 . If the inferred temperature Tw is equal to or lower than the threshold Tth, the MCU  300  returns to step S 960 . The threshold Tth can be set to, for example, the maximum allowable temperature in the specifications of the motor  100 . 
     Due to the above operations, when temperature is high, the motor  100  is stopped or its speed is reduced. Therefore, the reliability of the system can be improved. 
     According to the embodiments in the present disclosure, a temperature sensor-less module that infers the temperature of stator windings with high accuracy can be implemented without using a temperature sensor. Therefore, even in an application in which it is difficult to mount a temperature sensor, the temperature sensor-less module can be preferably used. The motor module in the embodiments in the present disclosure can be preferably used in, for example, a UAV (unmanned aerial vehicle, which is a so-called drone), an automated guided vehicle (AGV), or a movable body such as a robot or in an arbitrary electrically operated unit such as an axial fan. Since temperature can be accurately inferred without using a temperature sensor, it is possible to perform intelligent control according to inferred temperature with a control circuit such as, for example, an MCU alone. As an example, an application is also possible in which a control circuit sends information about the temperature of a unit to an external server computer through communication, and the server computer accumulates the temperature information and uses for various purposes. 
     The technology in the present disclosure can be applied to an application in which the temperature of stator windings in an alternating-current motor such as, for example, a permanent magnet synchronous motor. 
     Features of the above-described preferred embodiments and the modifications thereof may be combined appropriately as long as no conflict arises. 
     While preferred embodiments of the present invention have been described above, it is to be understood that variations and modifications will be apparent to those skilled in the art without departing from the scope and spirit of the present invention. The scope of the present invention, therefore, is to be determined solely by the following claims.