An inverter controller comprising: a PWM signal generator that receives an output instruction from an external device, a value of a voltage between DC lines connected between a DC load and an inverter, a value of a current of an AC line connected between the inverter and an AC load, generates and outputs a PWM signal for each of a plurality of switches (Su, Sx, Sv, Sy, Sw, Sz) of the inverter to accomplish a value indicated by the output instruction, and switches a resistance of a gate of each of the switches based on the values of the voltage between the DC lines and the current of the AC line; a driving circuit that outputs a gate driving signal to each of the switches upon reception of the PWM signal, wherein the PWM signal generator outputs the first switch signal to increase the resistance of the gate when the value of the voltage between the DC lines is equal to or greater than a first voltage threshold, and the value of the current of the AC line is less than a first current threshold; and when the value of the voltage between the DC lines is equal to or greater than the first voltage threshold, and the value of the current of the AC line is equal to or greater than a second current threshold greater than the first current threshold, and wherein the PWM signal generator outputs the first switch signal to increase the resistance of the gate when the value of the voltage between the DC lines is equal to or greater than a second voltage threshold greater than the first voltage threshold, and the value of the current of the AC line is equal to or greater than the first current threshold and less than the second current threshold. a PWM signal generator that receives an output instruction from an external device, a value of a voltage between DC lines connected between a DC load and an inverter, a value of a current of an AC line connected between the inverter and an AC load, generates and outputs a PWM signal for each of a plurality of switches (Su, Sx, Sv, Sy, Sw, Sz) of the inverter to accomplish a value indicated by the output instruction, and switches a resistance of a gate of each of the switches based on the values of the voltage between the DC lines and the current of the AC line; a driving circuit that outputs a gate driving signal to each of the switches upon reception of the PWM signal, wherein the PWM signal generator outputs the first switch signal to increase the resistance of the gate when the value of the voltage between the DC lines is equal to or greater than a first voltage threshold, and the value of the current of the AC line is less than a first current threshold; and when the value of the voltage between the DC lines is equal to or greater than the first voltage threshold, and the value of the current of the AC line is equal to or greater than a second current threshold greater than the first current threshold, and wherein the PWM signal generator outputs the first switch signal to increase the resistance of the gate when the value of the voltage between the DC lines is equal to or greater than a second voltage threshold greater than the first voltage threshold, and the value of the current of the AC line is equal to or greater than the first current threshold and less than the second current threshold.