A controller installed on a vehicle including an engine, a first rotary electric machine for power generation which generates electric power using driving force from the engine, a second rotary electric machine for propulsion which delivers driving force for driving drive wheels (3a, 3b), a power storage device, a first inverter for power generation which performs conversion of electric power between the first rotary electric machine and the power storage device, a second inverter for propulsion which performs conversion of electric power between the second rotary electric machine and the power storage device, and a circuit that has at least a capacitor (52a, 52b; 52) and electrically connects the first inverter and the second inverter to the power storage device, the controller being adapted to perform drive control on the first rotary electric machine and the second rotary electric machine; characterized in that the controller comprises a drive control changing unit and an estimating unit, the drive control changing unit being configured to, when a total value of a power-generation-side ripple current and a drive-side ripple current, estimated by the estimating unit, is equal to or larger than a preset threshold value, change drive control of at least one of the first rotary electric machine and the second rotary electric machine such that the total value is reduced, the power-generation-side ripple current being generated according to an operating state of the first rotary electric machine and the drive-side ripple current being generated according to the operating state of the second rotary electric machine; the drive control changing unit being operable to change a control mode of switching control of the first inverter between a rectangular wave control mode and a pulse width modulation control mode according to a rotational speed of the first rotary electric machine; the drive control changing unit being operable to change a control mode of switching control of the second inverter between the rectangular wave control mode and the pulse width modulation control mode according to the rotational speed of the second rotary electric machine; and when the switching control of the first inverter and the switching control of the second inverter are both performed in the same control mode, the drive control changing unit is configured to change one of the control mode of the switching control of the first inverter and the control mode of the switching control of the second inverter such that the control mode of the first inverter does not match the control mode of the second inverter. characterized in that the controller comprises a drive control changing unit and an estimating unit, the drive control changing unit being configured to, when a total value of a power-generation-side ripple current and a drive-side ripple current, estimated by the estimating unit, is equal to or larger than a preset threshold value, change drive control of at least one of the first rotary electric machine and the second rotary electric machine such that the total value is reduced, the power-generation-side ripple current being generated according to an operating state of the first rotary electric machine and the drive-side ripple current being generated according to the operating state of the second rotary electric machine; the drive control changing unit being operable to change a control mode of switching control of the first inverter between a rectangular wave control mode and a pulse width modulation control mode according to a rotational speed of the first rotary electric machine; the drive control changing unit being operable to change a control mode of switching control of the second inverter between the rectangular wave control mode and the pulse width modulation control mode according to the rotational speed of the second rotary electric machine; and when the switching control of the first inverter and the switching control of the second inverter are both performed in the same control mode, the drive control changing unit is configured to change one of the control mode of the switching control of the first inverter and the control mode of the switching control of the second inverter such that the control mode of the first inverter does not match the control mode of the second inverter.