A control apparatus for controlling an electrical unit driven by AC power, wherein the control apparatus comprises: - a pair of switching elements configured to convert power from a power source into AC power and supply the AC power to the electrical unit; - a conversion unit configured to obtain a current or voltage signal supplied to the electrical unit and convert the signal from an analog format to a digital format; - a calculation unit configured to calculate a duty command value for performing a pulse width modulation control for the electrical unit on the basis of the signal converted by the conversion unit; - a generating unit configured to generate a PWM signal on the basis of the duty command value calculated by the calculation unit and a carrier signal for performing the PWM control; and - a control unit configured to control the AC power supplied to the electrical unit by switching a connection state of the switching element on the basis of the PWM signal generated by the generating unit, and wherein: - a compensation unit is provided which is configured to perform a compensation processing for compensating a deviation of a pulse width of the PWM voltage supplied to the electrical unit for the duty command value; - a determination unit is provided which is configured to determine whether an amplitude of the carrier signal increases or decreases; and - a correction unit is provided which is configured to adjust a switching timing of the switching element by correcting the duty command value calculated by the calculation unit and compensated by the compensation unit on the basis of whether the amplitude of the carrier signal is increasing or decreasing as determined by the determination unit to suppress the degradation of the detection of accuracy of the AC power. wherein the control apparatus comprises: - a pair of switching elements configured to convert power from a power source into AC power and supply the AC power to the electrical unit; - a conversion unit configured to obtain a current or voltage signal supplied to the electrical unit and convert the signal from an analog format to a digital format; - a calculation unit configured to calculate a duty command value for performing a pulse width modulation control for the electrical unit on the basis of the signal converted by the conversion unit; - a generating unit configured to generate a PWM signal on the basis of the duty command value calculated by the calculation unit and a carrier signal for performing the PWM control; and - a control unit configured to control the AC power supplied to the electrical unit by switching a connection state of the switching element on the basis of the PWM signal generated by the generating unit, and - a pair of switching elements configured to convert power from a power source into AC power and supply the AC power to the electrical unit; - a conversion unit configured to obtain a current or voltage signal supplied to the electrical unit and convert the signal from an analog format to a digital format; - a calculation unit configured to calculate a duty command value for performing a pulse width modulation control for the electrical unit on the basis of the signal converted by the conversion unit; - a generating unit configured to generate a PWM signal on the basis of the duty command value calculated by the calculation unit and a carrier signal for performing the PWM control; and - a control unit configured to control the AC power supplied to the electrical unit by switching a connection state of the switching element on the basis of the PWM signal generated by the generating unit, and wherein: - a compensation unit is provided which is configured to perform a compensation processing for compensating a deviation of a pulse width of the PWM voltage supplied to the electrical unit for the duty command value; - a determination unit is provided which is configured to determine whether an amplitude of the carrier signal increases or decreases; and - a correction unit is provided which is configured to adjust a switching timing of the switching element by correcting the duty command value calculated by the calculation unit and compensated by the compensation unit on the basis of whether the amplitude of the carrier signal is increasing or decreasing as determined by the determination unit to suppress the degradation of the detection of accuracy of the AC power. - a compensation unit is provided which is configured to perform a compensation processing for compensating a deviation of a pulse width of the PWM voltage supplied to the electrical unit for the duty command value; - a determination unit is provided which is configured to determine whether an amplitude of the carrier signal increases or decreases; and - a correction unit is provided which is configured to adjust a switching timing of the switching element by correcting the duty command value calculated by the calculation unit and compensated by the compensation unit on the basis of whether the amplitude of the carrier signal is increasing or decreasing as determined by the determination unit to suppress the degradation of the detection of accuracy of the AC power.