A control device for a rotating electric machine having a three-phase coil driven by operation of a switching element controlled by a switching circuit, comprising: a detection unit for detecting a rotation speed of said rotating electric machine; a determination unit for determining a diffusion width of a carrier frequency based on the rotation speed of said rotating electric machine detected by said detection unit such that a first sideband wave component and a second sideband wave component occurring with respect to the carrier frequency while said rotating electric machine is driven are not superimposed on one another; a carrier generation unit for changing the carrier frequency within a range of said diffusion width determined by said determination unit to generate a carrier signal; and a pulse width modulation unit for executing pulse width modulation based on a command voltage and said carrier signal to generate a pulse signal transmitted to the switching circuit for driving said rotating electric machine, said first sideband wave component being, in a current harmonic component produced when said switching elements is operated, a sideband wave component of a first harmonic component higher than or equal to a predetermined level whose peak level frequency decreases from the carrier frequency as the rotation speed of said rotating electric machine increases, said second sideband wave component being, in said current harmonic component, a sideband wave component of a second harmonic component higher than or equal to said predetermined level whose peak level frequency increases from the carrier frequency as the rotation speed of said rotating electric machine increases. a detection unit for detecting a rotation speed of said rotating electric machine; a determination unit for determining a diffusion width of a carrier frequency based on the rotation speed of said rotating electric machine detected by said detection unit such that a first sideband wave component and a second sideband wave component occurring with respect to the carrier frequency while said rotating electric machine is driven are not superimposed on one another; a carrier generation unit for changing the carrier frequency within a range of said diffusion width determined by said determination unit to generate a carrier signal; and a pulse width modulation unit for executing pulse width modulation based on a command voltage and said carrier signal to generate a pulse signal transmitted to the switching circuit for driving said rotating electric machine, said first sideband wave component being, in a current harmonic component produced when said switching elements is operated, a sideband wave component of a first harmonic component higher than or equal to a predetermined level whose peak level frequency decreases from the carrier frequency as the rotation speed of said rotating electric machine increases, said second sideband wave component being, in said current harmonic component, a sideband wave component of a second harmonic component higher than or equal to said predetermined level whose peak level frequency increases from the carrier frequency as the rotation speed of said rotating electric machine increases.