Patent Publication Number: US-2016245269-A1

Title: Motor-drive compressor

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a motor-driven compressor. 
     For example, a motor-driven compressor disclosed in Japanese Laid-Open Patent Publication No. 2005-201108 includes a compression portion, which compresses and discharges refrigerant, an electric motor, which drives the compression portion, and a drive circuit, which drives the electric motor. 
     Japanese Laid-Open Patent Publication No. 2011-109803 discloses the use of the pulse width modulation control (PWM control) as a method for controlling a drive circuit that drives an electric motor. In the pulse width modulation control, a control signal is generated by a voltage command signal, which specifies a voltage, and a carrier signal. Based on the control signal, ON-OFF control is executed on the switching elements in a drive circuit. Accordingly, the drive circuit converts DC power to AC power. The AC power is supplied to an electric motor to drive the motor. Further, Japanese Laid-Open Patent Publication 2011-109803 discloses, as modulation methods of the drive circuit, three-phase modulation and two-phase modulation, which are switched back and forth in accordance with the temperature of the drive circuit. 
     The temperature of the drive circuit may be excessively high depending on the operating condition and the environment of the drive circuit. This hampers the operation of the electric motor and the motor-driven compressor. Nevertheless, it is undesirable that an attempt to restrain an excessive increase in the temperature of the drive circuit should result, for example, in a louder noise. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is an objective of the present invention to provide a motor-driven compressor that restrains the temperature of the drive circuit from being excessively increased in a favorable manner. 
     To achieve the foregoing objective and in accordance with one aspect of the present invention, a motor-driven compressor is provided that includes a compression portion, which compresses a fluid, an electric motor, which drives the compression portion, a drive circuit, which drives the electric motor and includes switching elements, a temperature obtaining section, which obtains a temperature of the drive circuit, and a drive mode controller, which controls a drive mode of the drive circuit. The drive mode includes a first drive mode, the modulation method of which is three-phase modulation, a second drive mode, the modulation method of which is two-phase modulation, and a third drive mode, which has a carrier frequency lower than a carrier frequency of the first drive mode. The modulation method of the third drive mode is three-phase modulation. The drive mode controller controls the drive mode based on a temperature obtained by the temperature obtaining section and at least one of a rotational speed and a modulation factor of the electric motor. 
     Other aspects and advantages of the present invention will become apparent from the following description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The invention, together with objects and advantages thereof, may best be understood by reference to the following description of the presently preferred embodiments together with the accompanying drawings in which: 
         FIG. 1  is a schematic diagram of a motor-driven compressor and a vehicle air conditioner; 
         FIG. 2  is a circuit diagram of the inverter; 
         FIG. 3  is an explanatory table of drive modes; 
         FIG. 4  is a flowchart showing a drive mode switching control process executed by the drive mode controller; and 
         FIG. 5  is a correlation diagram showing a manner in which the drive mode is switched. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A motor-driven compressor according to one embodiment will now be described. The motor-driven compressor of the present embodiment is mounted on a vehicle and employed in the vehicle air conditioner. 
     As shown in  FIG. 1 , the vehicle air conditioner  100  includes the motor-driven compressor  10  and an external refrigerant circuit  101 , which supplies refrigerant to the motor-driven compressor  10 . The external refrigerant circuit  101  includes, for example, a heat exchanger and an expansion valve. The motor-driven compressor  10  compresses refrigerant, and the external refrigerant circuit  101  performs heat exchange of the refrigerant and expands the refrigerant. This allows the vehicle air conditioner  100  to cool or warm the passenger compartment. 
     The vehicle air conditioner  100  includes an air conditioning ECU  102 , which controls the entire vehicle air conditioner  100 . The air conditioning ECU  102  is configured to obtain parameters such as the temperature of the passenger compartment and a target temperature. Based on the parameters, the air conditioning ECU  102  outputs various commands such as an ON-OFF command to the motor-driven compressor  10 . 
     The motor-driven compressor  10  includes a housing  11 , a compression portion  12 , and an electric motor  13 . The housing  11  has an inlet  11   a , into which refrigerant from the external refrigerant circuit  101  is drawn. The compression portion  12  and the electric motor  13  are accommodated in the housing  11 . 
     The housing  11  is substantially cylindrical as a whole and made of a thermally conductive material (a metal such as aluminum). The housing  11  has an outlet  11   b  through which refrigerant is discharged. 
     The compression portion  12  compresses refrigerant that has been drawn into the housing  11  through the inlet  11   a  and discharges the compressed refrigerant through the outlet  11   b . The compression portion  12  may be any type such as a scroll type, a piston type, and a vane type. 
     The electric motor  13  drives the compression portion  12 . The electric motor  13  includes a columnar rotary shaft  21 , which is rotationally supported, for example, by the housing  11 , a cylindrical rotor  22 , which is fixed to the rotary shaft  21  and includes an embedded permanent magnet, and a stator  23  fixed to the housing  11 . The axis of the rotary shaft  21  coincides with the axis of the cylindrical housing  11 . The stator  23  includes a cylindrical stator core  24  and coils  25  wound about the teeth of the stator core  24 . The rotor  22  and the stator  23  face each other in the radial direction of the rotary shaft  21 . 
     As shown in  FIG. 1 , the motor-driven compressor  10  includes an inverter unit  30 , which includes an inverter  31  and a case  32 . The inverter  31  serves as a drive circuit that drives the electric motor  13 , and the case  32  accommodates the inverter  31 . The coils  25  of the electric motor  13  and the inverter  31  are connected to each other by connectors (not shown). The case  32  is fixed to the housing  11  with bolts  41 , which serve as fasteners. That is, the inverter  31  is integrated with the motor-driven compressor  10  of the present embodiment. 
     The inverter  31  includes, for example, a circuit board  51  and a power module  52 , which is electrically connected to the circuit board  51 . The circuit board  51  has various electronic components and a wiring pattern. A temperature sensor  53  is mounted on the circuit board  51 . The temperature sensor  53  serves as a temperature measuring section that measures, for example, the temperature of the circuit board  51 . A connector  54  is provided on the outer surface of the case  32 . The circuit board  51  and the connector  54  are electrically connected to each other. The inverter  31  receives power from a DC power source E, which serves as an external power source, via the connector  54 . The air conditioning ECU  102  and the inverter  31  are electrically connected to each other. 
     As shown in  FIG. 2 , the coils  25  of the electric motor  13  are of a three-phase structure, for example, with a u-phase coil  25   u , a v-phase coil  25   v , and a w-phase coil  25   w . That is, the electric motor  13  is a three-phase motor. The coils  25   u  to  25   w  are connected in a Y-connection. 
     The power module  52  includes u-phase power switching elements Qu 1 , Qu 2  corresponding to the u-phase coil  25   u, v -phase power switching elements Qv 1 , Qv 2  corresponding to the v-phase coil  25   v , and w-phase power switching elements Qw 1 , Qw 2  corresponding to the w-phase coil  25   w . That is, the inverter  31  is a three-phase inverter. 
     The switching elements Qu 1 , Qu 2 , Qv 1 , Qv 2 , Qw 1 , and Qw 2  (hereinafter, simply referred to as the switching elements Qu 1  to Qw 2 ) are each constituted, for example, by an insulated gate bipolar transistor (IGBT). Each of the switching elements Qu 1  to Qw 2  operates normally when its temperature is lower than or equal to a predetermined operation upper limit temperature Tmax. The operation upper limit temperature Tmax is the upper limit of the guaranteed operation range of the power switching elements Qu 1  to Qw 2 . In other words, the operation upper limit temperature Tmax is the upper limit of the guaranteed operation range of the inverter  31 . 
     The u-phase power switching elements Qu 1 , Qu 2  are connected to each other in series by a connection wire that is connected to the u-phase coil  25   u . The connection body of the u-phase power switching elements Qu 1 , Qu 2  receives the DC power of the DC power source E. Except for the connected coil, the other switching elements Qv 1 , Qv 2 , Qw 1 , Qw 2  have the same connection structure as the u-phase power switching elements Qu 1 , Qu 2 , and the descriptions thereof are omitted. 
     The inverter  31  includes a smoothing capacitor C 1 , which is connected in parallel with the DC power source E. The power module  52  includes freewheeling diodes Du 1  to Dw 2 , which are respectively connected in parallel with the power switching elements Qu 1  to Qw 2 . 
     The motor-driven compressor  10  includes a controller  55 , which controls the inverter  31  (specifically, switching of the power switching elements Qu 1  to Qw 2 ). The controller  55  is connected to the gates of the power switching elements Qu 1  to Qw 2 . The controller  55  periodically switches ON and OFF the power switching elements Qu 1  to Qw 2  to drive, or rotate, the electric motor  13 . 
     The present embodiment employs a bootstrapping method to switch on the power switching elements Qu 1 , Qv 1 , Qw 1  on the upper arm. Specifically, a bootstrap circuit  61 , which has a capacitor  61   a , is provided between the power switching elements Qu 1 , Qv 1 , Qw 1  and the controller  55 . The bootstrap circuit  61  generates a voltage higher than the power source voltage, which is the voltage of the DC power source E. The controller  55  applies the voltage generated by the bootstrap circuit  61  to the gates of the power switching elements Qu 1 , Qv 1 , Qw 1  on the upper arm, thereby switching on the power switching elements Qu 1 , Qv 1 , Qw 1 . 
     The controller  55  executes pulse width modulation control (PWM control) on the inverter  31 . Specifically, the controller  55  uses a carrier signal and a commanded voltage value signal (signal for comparison) to generate a control signal. The controller  55  executes ON-OFF control on the power switching elements Qu 1  to Qw 2  by using the generated control signal, thereby converting a DC power to an AC power. The AC power obtained through the conversion is supplied to the electric motor  13  to drive the motor  13 . 
     The controller  55  is configured to change a carrier frequency f, which is the frequency of the carrier signal. The specific waveform of the carrier signal may be any waveform such as a triangle wave or a sawtooth wave as long as the waveform allows the signal to functions as the carrier signal. 
     Further, the controller  55  controls the control signal to vary the duty cycle of the ON-OFF of the power switching elements Qu 1  to Qw 2 . By varying the duty cycle, the controller  55  controls the rotational speed r of the electric motor  13 . The controller  55  is electrically connected to the air conditioning ECU  102 . When receiving information related to a command value for the rotational speed r (number of revolutions per unit time) from the air conditioning ECU  102 , the controller  55  causes the electric motor  13  to rotate at a rotational speed r that corresponds to the command value. Hereinafter, the rotational speed r of the electric motor  13  will be simply referred to as a rotational speed r. 
     Further, the controller  55  controls the control signal to control a modulation factor M, which is the ratio of the amplitude of the AC voltage output by the inverter  31  to the power source voltage. The controller  55  obtains the power source voltage and a required voltage, which corresponds to a voltage required to drive the electric motor  13 , and controls the modulation factor M in accordance with the power source voltage such that the output voltage of the inverter  31  becomes the required voltage. 
     Based on the result of measurement by the temperature sensor  53 , the controller  55  obtains an inverter temperature T, which is the temperature of the inverter  31 . Specifically, the temperature sensor  53  delivers the measurement result to the controller  55 . The controller  55  has data related to a correlation between the measurement result of the temperature sensor  53  and the temperature of the power module  52  (specifically, the temperatures of the power switching elements Qu 1  to Qw 2 ). By referring to the data, the controller  55  derives the temperature of the power module  52 , which corresponds to the measurement result of the temperature, and sets the derived temperature as the inverter temperature T. That is, the temperature sensor  53  is employed to obtain the inverter temperature T. The inverter temperature T corresponds to an obtained temperature, and the controller  55  corresponds to a temperature obtaining section. 
     Any temperature that relates to the inverter  31  may be used as the inverter temperature T. For example, the value measured by the temperature, that is, the temperature of the circuit board  51  may be used as the inverter temperature T. 
     The controller  55  includes a position obtaining section  62 , which obtains the rotational position of the rotor  22 . Specifically, the position obtaining section  62  estimates counter electromotive force generated in the electric motor  13  based on the voltage applied to the electric motor  13  and the current flowing through the electric motor  13 . Based on the estimated counter electromotive force, the position obtaining section  62  obtains the rotational position of the rotor  22 . Based on the rotational position of the rotor  22 , which is obtained by the position obtaining section  62 , the controller  55  executes ON-OFF control on the power switching elements Qu 1  to Qw 2 . A structure that detects the current through the electric motor  13  may be employed. For example, a shunt resistor may be provided on the circuit board  51 , and the voltage of the shunt resistor may be detected. In this case, the current is estimated based on the detected voltage. 
     As shown in  FIG. 2 , the controller  55  includes a drive mode controller  63 , which controls the drive mode of the inverter  31  (hereinafter, simply referred to as the drive mode). The drive mode will now be described. 
     In the present embodiment, the drive mode is switched among first to third drive modes as shown in  FIG. 3 . In the first drive mode, the carrier frequency f is a first carrier frequency f 1 , and the modulation method is three-phase modulation. In the second drive mode, the carrier frequency f is a second carrier frequency f 2 , and the modulation method is two-phase modulation. In the third drive mode, the carrier frequency f is a third carrier frequency f 3 , and the modulation method is three-phase modulation. 
     In the present embodiment, the three-phase modulation is a drive mode in which the power switching elements Qu 1  to Qw 2  of all the phases are always subjected to periodic ON-OFF operation. The two-phase modulation is a drive mode in which periodic ON-OFF operation of one of the power switching elements Qu 1  to Qw 2 , that is, the power switching element of one of the three phases, is sequentially stopped every predetermined period (phase angle). That is, the two-phase modulation is a drive mode in which the periodic ON-OFF operation of the power switching element of one of the three phases is sequentially stopped, and periodic ON-OFF operations of the power switching elements of the other two phases are executed. The state in which the periodic ON-OFF operation of a power switching element is stopped refers to a state in which the power switching element remains switched ON or OFF. 
     Compared to the three-phase modulation, the power switching elements Qu 1  to Qw 2  are less frequently switched ON and OFF. Thus, the power loss and the amount of heat generation of the inverter  31  are more likely to be increased in the three-phase modulation than in the two-phase modulation. In the description below, the power loss and the amount of heat generation refer to the power loss and the amount of heat generation of the inverter  31  unless otherwise specified. 
     In the two-phase modulation of the present embodiment, for example, the power switching elements Qu 1 , Qv 1 , Qw 1  on the upper arm and the power switching elements Qu 2 , Qv 2 , Qw 2  on the lower arm are both employed. In other words, the power switching elements Qu 1  to Qw 2  are each subjected to stopping. 
     In the present embodiment, the first carrier frequency f 1  and the second carrier frequency f 2  are set to be substantially the same. In contrast, the third carrier frequency f 3  is set to be lower than the first carrier frequency f 1 . Specifically, as shown in  FIG. 3 , the first carrier frequency f 1  and the second carrier frequency f 2  are set, for example, at 20 kHz, while the third carrier frequency f 3  is set, for example, at 10 kHz. The first carrier frequency f 1  corresponds to the carrier frequency of the first drive mode. 
     As shown in  FIG. 2 , the controller  55  includes a field weakening controller  64 , which executes field weakening control on the electric motor  13  when a predetermined field weakening condition is met. The field weakening condition, for example, refers to a state in which the counter electromotive force generated in the motor  13  is equal to the power source voltage. 
     The field weakening control is one of the control modes of the electric motor  13 . Specifically, in the field weakening control, when the counter electromotive force is equal to the power source voltage, a current is supplied to the coils  25   u  to  25   w  of the stator  23  to generate a magnetic flux the direction of which is opposite to that of the magnetic flux generated by the permanent magnets embedded in the rotor  22 , so that counter electromotive force is reduced. 
     The field weakening control is executed when the modulation method is the two-phase modulation and overmodulation control is being executed. In the overmodulation control, a power switching element that is an object to be operated is maintained in an ON state for a predetermined period longer than the carrier period. The field weakening control is executed under an environment of a relatively low power source voltage. Thus, in the field weakening control, the power loss tends to be smaller than that in the normal control. 
     The power switching element that is an object to be operated refers to a power switching element other than the power switching elements in a stopped phase. The following description is basically related to the normal control (in other words, non-field weakening control), unless specified as related to the field weakening control. 
     In the present configuration, the magnitudes of the power loss and the amount of heat generation in the normal control satisfy the expression: the first drive mode &gt; the second drive mode &gt; the third drive mode. Among the three drive modes, the first drive mode has the greatest amount of heat generation. At least in the normal control, the third drive mode has the smallest amount of heat generation among the three drive modes. However, since the carrier frequency f is low in the third drive mode, the third drive mode tends to generate louder noise. 
     At the start of operation of the motor-driven compressor (specifically, the electric motor  13 ), the drive mode controller  63  sets the drive mode to the first drive mode. That is, the first drive mode is an initial drive mode in the present embodiment. The drive mode controller  63  is configured to obtain the current drive mode. 
     Thereafter, during operation of the motor-driven compressor  10  (during operation of the electric motor  13 ), the drive mode controller  63  periodically executes a drive mode switching control process for switching the drive mode based on the rotational speed r and the modulation factor M of the electric motor  13  and the inverter temperature T. The drive mode switching control process will now be described. 
     As shown in  FIG. 4 , the drive mode controller  63  determines at step S 101  whether the current drive mode is the first drive mode. When determining that the current drive mode is not the first drive mode, the drive mode controller  63  proceeds to step S 106 . In contrast, when the current drive mode is the first drive mode, the drive mode controller  63  proceeds to step S 102  and determines whether a condition for shifting to the second drive mode is met. Specifically, at step S 102 , the drive mode controller  63  determines whether a predetermined two-phase modulation condition is met. 
     The two-phase modulation condition is determined based on the restrictions on the inverter  31 . In the present embodiment, the two-phase modulation condition is defined by at least one of the rotational speed r and modulation factor M. Specifically, the two-phase modulation condition is met when the rotational speed r is greater than or equal to a predetermined threshold rotational speed rth and the modulation factor M is greater than or equal to a predetermined threshold modulation factor Mth. 
     The threshold rotational speed rth may be any predetermined value, which is, for example, determined based on the capacitance of the capacitor  61   a  of the bootstrap circuit  61 . Specifically, in the two-phase modulation, which uses both of the upper arm and the lower arm, any of the power switching elements Qu 1 , Qv 1 , Qw 1  on the upper arm needs to be maintained ON for a specific period (for example, a period of 60 degrees of the electrical angle). The lower the rotational speed r, the longer the specific period becomes. In contrast, a maintenance enabled period, in which the power switching elements Qu 1 , Qv 1 , Qw 1  can be maintained ON, depends on the capacitance of the capacitor  61   a . In this case, the specific period may be longer than the maintenance enabled period depending on the combination of the capacitance of the capacitor  61   a  and the rotational speed r. Thus, the threshold rotational speed rth is set to a value at which the specific period, which corresponds to the threshold rotational speed rth, is equal to or slightly shorter than the maintenance enabled period. 
     The threshold modulation factor Mth may be any predetermined value, which is, for example, determined based on the specifications of the power switching elements Qu 1  to Qw 2  (for example, the delay time). 
     When the two-phase modulation condition is met, that is, when the rotational speed r is greater than or equal to threshold rotational speed rth and the modulation factor M is greater than or equal to the threshold modulation factor Mth, the drive mode controller  63  proceeds to step S 103 . At step S 103 , the drive mode controller  63  shifts the drive mode from the first drive mode to the second drive mode and ends the drive mode switching control process. 
     In contrast, the two-phase modulation condition is not met, that is, when the rotational speed r is less than the threshold rotational speed rth or the modulation factor M is less than the threshold modulation factor Mth, the drive mode controller  63  makes a negative determination at step S 102  and proceeds to step S 104 . At step S 104 , the drive mode controller  63  determines whether a condition for shifting to the third drive mode is met. Specifically, the drive mode controller  63  obtains the inverter temperature T from the measurement result of the temperature sensor  53  and determines whether the inverter temperature T is higher than a predetermined primary third drive mode initiating temperature Tu 1 . The primary third drive mode initiating temperature Tu 1  is lower than the operation upper limit temperature Tmax and is set, for example, at 70° C. 
     When the inverter temperature T is lower than or equal to the primary third drive mode initiating temperature Tu 1 , the drive mode controller  63  ends the drive mode switching control process without further processing. In contrast, when the inverter temperature T is higher than the primary third drive mode initiating temperature Tu 1 , the drive mode controller  63  switches the drive mode from the first drive mode to the third drive mode at step S 105  and ends the drive mode switching control process. 
     In the present embodiment, the drive mode controller  63  executes step S 102  before executing step S 104 . Thus, in a situation in which the drive mode is the first drive mode, the condition for shifting to the second drive mode (two-phase modulation condition) and the condition for shifting to the third drive mode (T&gt;Tu 1 ) are both met, the drive mode controller  63  prioritizes shifting to the second drive mode over shifting to the third drive mode. 
     As shown in  FIG. 4 , the drive mode controller  63  determines at step S 106  whether the current drive mode is the second drive mode. When determining that the current drive mode is not the second drive mode, the drive mode controller  63  proceeds to step S 111 . In contrast, when the current drive mode is the second drive mode, the drive mode controller  63  proceeds to step S 107  and determines whether the condition for shifting to the third drive mode is met. Specifically, the drive mode controller  63  determines whether the inverter temperature T is higher than a predetermined secondary third drive mode initiating temperature Tu 2  and a controlling process other than the field weakening control is being executed. In other words, the drive mode controller  63  determines whether the inverter temperature T is higher than the predetermined secondary third drive mode initiating temperature Tu 2 , the normal control is being executed, and the field weakening control is not being executed. The secondary third drive mode initiating temperature Tu 2  is in a range lower than the operation upper limit temperature Tmax and is higher than the primary third drive mode initiating temperature Tu 1  (TMax&gt;Tu 2 &gt;Tu 1 ). The secondary third drive mode initiating temperature Tu 2  is set, for example, at 90° C. 
     When the inverter temperature T is higher than the secondary third drive mode initiating temperature Tu 2 , and a controlling process other than the field weakening control is being executed (that is, the normal control is being executed), the drive mode controller  63  proceeds to step S 108 , at which the drive mode controller  63  shifts the drive mode from the second drive mode to the third drive and ends the drive mode switching control process. 
     When the inverter temperature T is lower than or equal to the secondary third drive mode initiating temperature Tu 2  or when the field weakening control is being executed, the drive mode controller  63  makes a negative determination at step S 107  and proceeds to step S 109  to determine whether a condition for shifting to the first drive mode is met. Specifically, at step S 109 , the drive mode controller  63  determines whether the two-phase modulation condition is not met. When the two-phase modulation condition is met, the drive mode controller  63  makes a positive determination at step S 109  and ends the drive mode switching control process without further processing. In contrast, when the two-phase modulation condition is not met, the drive mode controller  63  makes a negative determination at step S 109  and proceeds to step S 110 . At step S 110 , the drive mode controller  63  shifts the drive mode from the second drive mode to the first drive mode and ends the drive mode switching control process. That is, in a situation in which the drive mode is the second drive mode, the drive mode controller  63  shifts the drive mode from the second drive mode to the first drive mode based on the fact that the two-phase modulation condition is no longer met. 
     When the current drive mode is neither the first drive mode nor the second drive mode (step S 101 : NO, step S 106 : NO), the current drive mode is the third drive mode. In this case, the drive mode controller  63  determines whether a condition for shifting to the second drive mode is met at step S 111 . Specifically, the drive mode controller  63  determines at step S 111  whether the inverter temperature T is lower than a predetermined second drive mode initiating temperature Td 2  and the two-phase modulation condition is met. The second drive mode initiating temperature Td 2  is lower than the secondary third drive mode initiating temperature Tu 2  and is, for example, 85° C. 
     When the inverter temperature T is lower than the second drive mode initiating temperature Td 2  and the two-phase modulation condition is met, the drive mode controller  63  shifts the drive mode from the third drive mode to the second drive mode at step S 112  and ends the drive mode switching control process. 
     In contrast, when the inverter temperature T is higher than or equal to the second drive mode initiating temperature Td 2  or when the two-phase modulation condition is not met, the drive mode controller  63  makes a negative determination at step S 111  and proceeds to step S 113  to determine whether a condition for shifting to the first drive mode is met. Specifically, the drive mode controller  63  determines at step S 113  whether the inverter temperature T is lower than a predetermined first drive mode initiating temperature Td 1 . The first drive mode initiating temperature Td 1  is lower than the primary third drive mode initiating temperature Tu 1  and the second drive mode initiating temperature Td 2 . For example, the first drive mode initiating temperature Td 1  is, for example, 65° C. 
     When the inverter temperature T is higher than or equal to the first drive mode initiating temperature Td 1 , the drive mode controller  63  ends the drive mode switching control process without further processing. In contrast, when the inverter temperature T is lower than the first drive mode initiating temperature Td 1 , the drive mode controller  63  switches the drive mode from the third drive mode to the first drive mode at step S 114  and ends the drive mode switching control process. 
     In the present embodiment, the primary third drive mode initiating temperature Tu 1  and the first drive mode initiating temperature Td 1  are determined such that, within the guaranteed operation range of the power switching elements Qu 1  to Qw 2 , the temperature range that permits operation in the first drive mode is wider than the temperature range that permits operation in the third drive mode. The secondary third drive mode initiating temperature Tu 2  and the second drive mode initiating temperature Td 2  are determined such that, within the guaranteed operation range of the power switching elements Qu 1  to Qw 2 , the temperature range that permits operation in the second drive mode is wider than the temperature range that permits operation in the third drive mode. 
     Operation of the present embodiment will now be described with reference to  FIG. 5 . 
     When the inverter temperature T is relatively low (T≦Tu 1 ), the drive mode is set to the first drive mode or the second drive mode depending on whether or not the two-phase modulation condition is met as shown in  FIG. 5 . 
     When the two-phase modulation condition is not met, the drive mode is set to the first drive mode or the third drive mode in accordance with the inverter temperature T. In contrast, when the two-phase modulation condition is met, the drive mode is set to the second drive mode or the third drive mode in accordance with the inverter temperature T and the control mode of the electric motor  13  (whether the field weakening control is being executed). 
     The present embodiment, which has been described, has the following advantages. 
     (1) The motor-driven compressor  10  includes the compression portion  12 , which compresses refrigerant serving as fluid, the electric motor  13 , which drives the compression portion  12 , the inverter  31 , which is a drive circuit configured to drive the electric motor  13 , and the controller  55 , which obtains the inverter temperature T, or the temperature of the inverter  31 , and controls the inverter  31 . The controller  55  includes the drive mode controller  63 , which controls the drive mode of the inverter  31 . 
     The drive mode is switched among the first drive mode, the second drive mode, and the third drive mode. In the first drive mode, the carrier frequency f is a first carrier frequency f 1 , and the modulation method is three-phase modulation. In the second drive mode, the carrier frequency f is the second carrier frequency f 2 , which is equal to the first carrier frequency f 1 , and the modulation method is the two-phase modulation. In the third drive mode, the carrier frequency f is the third carrier frequency f 3 , which is lower than the first carrier frequency f 1 , and the modulation method is the three-phase modulation. The drive mode controller  63  controls the drive mode based on the rotational speed r and the modulation factor M of the electric motor  13  and the inverter temperature T. Accordingly, the inverter  31  is driven in the drive mode optimal for the situation, so that the inverter temperature T is reliably restrained from being excessively high. 
     Specifically, the drive mode includes the first drive mode and the second drive mode. The first drive mode employs the three-phase modulation and is versatile. In contrast, the second drive mode employs the two-phase modulation. Since the two-phase modulation tends to reduce the power loss compared to the three-phase modulation, the two-phase modulation tends to generate less heat. However, to set the modulation method to the two-phase modulation, a certain condition, which is specified, for example, by the rotation speed r, (two-phase modulation condition) needs to be met. Thus, for example, depending on the rotational speed r, the drive mode cannot be shifted to the second drive mode and is maintained at the first drive mode for an extended period of time. As a result, the inverter temperature T may be increased excessively, for example, to a temperature higher than the operation upper limit temperature Tmax. 
     In this regard, the present embodiment has the third drive mode, which is different from the first drive mode and the second drive mode. In the third drive mode, the carrier frequency f is set to be lower than the first carrier frequency f 1 , and the amount of heat generation is likely to be smaller than that in the first drive mode. Since the modulation method of the third drive mode is the three-phase modulation, the third drive mode can be set regardless of conditions such as the rotational speed r. Thus, for example, when the inverter temperature T is relatively high, the drive mode is shifted from the first drive mode to the third drive mode to limit the increase in the inverter temperature T. 
     To limit the power loss, the drive mode may always be set at the third drive mode. However, since the carrier frequency f is low in the third drive mode, the noise would be easily increased. In contrast, the present embodiment switches the drive mode to any of the first to third drive modes in accordance with the situation, so that reduction of noise and limitation of the increase in the inverter temperature T are both achieved. Thus, the inverter  31  is permitted to operate in a range in which the inverter temperature T is not excessively increased. 
     (2) In a situation in which the drive mode is the first drive mode, the drive mode controller  63  shifts the drive mode from the first drive mode to the second drive mode based on the fact that the two-phase modulation condition, which is defined by both of the rotational speed r and the modulation factor M, is met. In a situation in which the drive mode is the first drive mode, the drive mode controller  63  shifts the drive mode from the first drive mode to the third drive mode based on the fact that the inverter temperature T exceeds the predetermined primary third drive mode initiating temperature Tu 1 . Thus, when the two-phase modulation condition is met, the drive mode is shifted from the first drive mode to the second drive mode to reduce the power loss and the amount of heat generation. When the inverter temperature T exceeds the primary third drive mode initiating temperature Tu 1 , the drive mode is shifted from the first drive mode to the third drive mode to reduce the power loss and the amount of heat generation. This limits the noise and restrains the inverter temperature T from being excessively high. 
     Particularly, the primary third drive mode initiating temperature Tu 1  is set to be lower than the operation upper limit temperature Tmax of the power switching elements Qu 1  to Qw 2 . Thus, the drive mode is shifted to the third drive mode before the operation of the power switching elements Qu 1  to Qw 2  is hampered, and the inverter temperature T is restrained from reaching the operation upper limit temperature Tmax. 
     (3) In a situation in which the drive mode is the first drive mode, the drive mode controller  63  shifts the drive mode from the first drive mode to the second drive mode when the two-phase modulation condition is met and the inverter temperature T is higher than the primary third drive mode initiating temperature Tu 1 . In this configuration, when the condition for shifting to the second drive mode and the condition for shifting to the third drive mode are both met, the drive mode is shifted the second drive mode with priority. In the second drive mode, the amount of heat generation and the noise are more likely to be reduced than in the first drive mode. Since the drive mode is shifted to the second drive mode with priority, the noise and the increase in the inverter temperature T are both limited. 
     (4) In a situation in which the drive mode is the second drive mode, the drive mode controller  63  shifts the drive mode from the second drive mode to the third drive mode based on the fact that the predetermined third drive mode shifting condition is met. The third drive mode shifting condition includes the inverter temperature T being higher than the secondary third drive mode initiating temperature Tu 2 , which is set to be higher than the primary third drive mode initiating temperature Tu 1 . 
     In this configuration, the secondary third drive mode initiating temperature Tu 2 , which is used as the condition for switching the second drive mode to the third drive mode, is higher than the primary third drive mode initiating temperature Tu 1 , which is used as the condition for switching the first drive mode to the third drive mode. Thus, in the first drive mode, in which the amount of heat generation is more likely to be increased than in the second drive mode, the drive mode is shifted to the third drive mode at a relatively early stage, so that the increase in the inverter temperature T is dealt with at an early stage. In contrast, in the second drive mode, in which the amount of heat generation is more likely to be reduced than in the first drive mode, the second drive mode is maintained for a relatively long period of time. This allows the noise to be reduced. 
     (5) The controller  55  includes the field weakening controller  64 , which executes field weakening control on the electric motor  13  when the predetermined field weakening condition is met. Thus, for example, even in a condition in which the rotational speed r is relatively high and the power source voltage is relatively low, the execution of the field weakening control allows the required voltage, which corresponds to a voltage required to drive the electric motor  13 , to be supplied to the electric motor  13 . 
     The field weakening control tends to generate small amount of heat compared to the normal control. Thus, when the drive mode is the second drive mode and the field weakening control is being executed, the amount of heat generation may be substantially equal to or slightly less than that in the third drive mode. In this regard, in the present embodiment, even if the drive mode is the second drive mode, and the inverter temperature T is higher than the secondary third drive mode initiating temperature Tu 2 , the second drive mode is not shifted to the third drive mode as long as the field weakening control is being executed. Accordingly, unnecessary shifting of the drive mode is restrained. 
     (6) In a situation in which the drive mode is the third drive mode, the drive mode controller  63  shifts the drive mode from the third drive mode to the first drive mode based on the fact that the inverter temperature T is lower than the first drive mode initiating temperature Td 1 . Also, in a situation in which the drive mode is the third drive mode, the drive mode controller  63  shifts the drive mode from the third drive mode to the second drive mode based on the fact that the inverter temperature T is lower than the second drive mode initiating temperature Td 2  and the two-phase modulation condition is met. This allows the drive mode to be shifted from the third drive mode to the second drive mode without going through the first drive mode. 
     The first drive mode initiating temperature Td 1  is set to be lower than the second drive mode initiating temperature Td 2 . Accordingly, the drive mode is shifted to the first drive mode, in which the amount of heat generation is relatively great, when the inverter temperature T has sufficiently dropped. Thus, the inverter temperature T is restrained from being increased. On the other hand, the drive mode is shifted to the second drive mode, in which the amount of heat generation is relatively small, at a relatively early stage. This allows the noise to be reduced. 
     (7) The first drive mode initiating temperature Td 1  is lower than the primary third drive mode initiating temperature Tu 1 , and the second drive mode initiating temperature Td 2  is lower than the secondary third drive mode initiating temperature Tu 2 . Thus, the drive mode is restrained from being shifted from the first drive mode to the third drive mode immediately after being shifted from the third drive mode to the first drive mode. 
     The above embodiment may be modified as follows. 
     During rotation of the electric motor  13 , the controller  55  may stop the electric motor  13  based on the fact that the inverter temperature T reaches a predetermined stop initiating temperature. In this case, the stop initiating temperature is preferably equal to the operation upper limit temperature Tmax or lower than the operation upper limit temperature Tmax by a certain margin, for example. 
     In this configuration, the third drive mode initiating temperatures Tu 1 , Tu 2  are preferably lower than the stop initiating temperature. Thus, the drive mode is shifted to the third drive mode before the electric motor  13  is stopped. This prevents the electric motor  13  from being stopped or extends the period before the electric motor  13  is stopped. Therefore, inconvenience caused by stopping of the electric motor  13 , for example, discomfort experienced by the driver due to stopping of the operation of the vehicle air conditioner  100  is limited. 
     The first carrier frequency f 1  and the third carrier frequency f 3  may have any values as long as the third carrier frequency f 3  is lower than the first carrier frequency f 1 . 
     In the illustrated embodiment, the second carrier frequency f 2  is equal to the first carrier frequency f 1 , but may be lower than or higher than the first carrier frequency f 1 . That is, the second carrier frequency f 2  may be set to any value as long as the amount of heat generation of the second mode is smaller than that of the first drive mode during the normal control (non-field weakening control) and the noise in the third drive mode is lower than that in the normal control (non-field weakening control). In other words, the second drive mode may be modified as long as, even if the modification method is the two-phase modulation, the amount of heat generation at least during the normal control is smaller than that in the first drive mode, and the noise is lower than in the third drive mode. 
     Each of the drive mode initiating temperatures Tu 1 , Tu 2 , Td 1 , Td 2  is not limited to the temperature in the above illustrated embodiment, but may be any temperature as long as it is lower than or equal to the operation upper limit temperature Tmax. For example, the third drive mode initiating temperatures Tu 1 , Tu 2  may be the same value. Also, the first drive mode initiating temperature Td 1  and the second drive mode initiating temperature Td 2  may be the same value. Further, the primary third drive mode initiating temperature Tu 1  and the first drive mode initiating temperature Td 1  may be the same value. 
     In the illustrated embodiment, the two-phase modulation condition is defined by both of the rotational speed r and the modulation factor M, but may be defined by only one of these. For example, in a configuration in which the power switching elements Qu 1 , Qv 1 , Qw 1  on the upper arm are switched on by a method that does not use the bootstrap circuit  61 , the condition related to the rotational speed r may be omitted. Also, if the minimum duty cycle that is achievable by the inverter  31  is sufficiently low, the condition related to the modulation factor M may be omitted. That is, the two-phase modulation condition may be defined by at least one of the rotational speed r and the modulation factor M. In other words, the drive mode controller  63  may control the drive mode based on the inverter temperature T and at least one of the rotational speed r and the modulation factor M. 
     The drive mode may be directly shifted from the third drive mode to the second drive mode. Even in this case, the drive mode is shifted from the third drive mode to the second drive mode via the first drive mode. However, this modification involves unnecessary shifting of the drive mode and does not allow the drive mode to be shifted unless the inverter temperature T drops below the first drive mode initiating temperature Td 1 , which is lower than the second drive mode initiating temperature Td 2 . Thus, the drive mode is preferably directly shifted from the third drive mode to the second drive mode. 
     In a situation in which the drive mode is the first drive mode, if the condition for shifting to the second drive mode and the condition for shifting to the third drive mode are both met, the drive mode may be shifted to the third drive mode with priority. 
     The field weakening controller  64  may be omitted. That is, the field weakening control does not need to be executed. 
     The case  32  may be attached to any position on the housing  11 . 
     The two-phase modulation is not limited to the method that uses both of the upper arm and the lower arm, but may be a method that uses only the lower arm. In other words, the two-phase modulation may stop operation of only the power switching elements Qu 2 , Qv 2 , Qw 2  of the lower arm. 
     The motor-driven compressor  10  may be mounted on any structure other than a vehicle. 
     In the illustrated embodiment, the motor-driven compressor  10  is used in the vehicle air conditioner  100 , but may be used in any other device. For example, if the vehicle is a fuel cell vehicle (FCV), which mounts a fuel cell, the motor-driven compressor  10  may be used in a supplying device that supplies air to the fuel cell. That is, the fluid to be compressed may be any fluid such as refrigerant or air.