A drive device, comprising: an electricity storage device; a motor; an inverter for driving the motor; a booster converter installed between the electricity storage device and the inverter; and a controller for performing switching control on a switching element of the inverter and controlling the booster converter, wherein for the switching control on the switching element of the inverter, the controller is configured to switch between a pulse-width modulation control mode and a first square wave control mode, and to switch between the pulse-width modulation control mode and a second square wave control mode, and the first square wave control mode is a mode using a square wave pulse pattern in which a first half cycle or a latter half cycle of each cycle is a square wave pulse, the second square wave control mode is a mode using the square wave pulse pattern when a rotation speed of the motor is equal to or higher than a first predetermined rotation speed that is higher than a first resonance region, the second square wave control mode is a mode using a first switching pattern when a rotation speed of the motor is lower than the first predetermined rotation speed, the first switching pattern forms one or more slits in a region where a square wave pulse in the square wave pulse pattern exists, the first switching pattern forms a short pulse having a same width as the slit at a same timing as the slit in a region where no square wave pulse exists, the first switching pattern suppresses a LC resonance in the first resonance region, characterized in that the controller is configured to switch between the pulse-width modulation control mode and the first square wave control mode according to a modulation percentage when the booster converter is controlled so that a voltage acting on the inverter becomes equal to or higher than a threshold voltage (Vref) that is based on an electricity from the electricity storage device, and the controller is configured to switch between the pulse-width modulation control mode and the second square wave control mode according to a modulation percentage when the booster converter is controlled so that a voltage acting on the inverter becomes lower than the threshold voltage. an electricity storage device; a motor; an inverter for driving the motor; a booster converter installed between the electricity storage device and the inverter; and a controller for performing switching control on a switching element of the inverter and controlling the booster converter, wherein for the switching control on the switching element of the inverter, the controller is configured to switch between a pulse-width modulation control mode and a first square wave control mode, and to switch between the pulse-width modulation control mode and a second square wave control mode, and the first square wave control mode is a mode using a square wave pulse pattern in which a first half cycle or a latter half cycle of each cycle is a square wave pulse, the second square wave control mode is a mode using the square wave pulse pattern when a rotation speed of the motor is equal to or higher than a first predetermined rotation speed that is higher than a first resonance region, the second square wave control mode is a mode using a first switching pattern when a rotation speed of the motor is lower than the first predetermined rotation speed, the first switching pattern forms one or more slits in a region where a square wave pulse in the square wave pulse pattern exists, the first switching pattern forms a short pulse having a same width as the slit at a same timing as the slit in a region where no square wave pulse exists, the first switching pattern suppresses a LC resonance in the first resonance region, characterized in that the controller is configured to switch between the pulse-width modulation control mode and the first square wave control mode according to a modulation percentage when the booster converter is controlled so that a voltage acting on the inverter becomes equal to or higher than a threshold voltage (Vref) that is based on an electricity from the electricity storage device, and the controller is configured to switch between the pulse-width modulation control mode and the second square wave control mode according to a modulation percentage when the booster converter is controlled so that a voltage acting on the inverter becomes lower than the threshold voltage.