A PWM controller compensates a maximum output power of a power converter,
and includes a PWM unit and a compensation circuit. The PWM unit
generates a PWM signal for controlling a power switch to switch a power
transformer, which has a primary winding connected to the power switch
and is supplied with an input voltage of the power converter. A pulse
width of the PWM signal is correlated to an amplitude of the input
voltage. The compensation circuit generates a current boost signal in
response to the PWM signal by pushing up a peak value of a current-sense
signal generated by a current-sense device in response to a primary-side
switching current of the power transformer. A peak value of the current
boost signal is adjusted by the pulse width of the PWM signal for
compensating a difference of the maximum output power caused by the
amplitude of the input voltage.