Power converter controller

Detecting and controlling the switching current of the power converter, the controller controls output current. The controller includes a first circuit, a second circuit, a third circuit and a switching circuit. Based on switching current of the power converter, the first power converter generates a first signal. The second circuit detects discharge time of transformer. Based on integral carried out by discharge time on the first signal, the third circuit generates a third signal. Time constant of the third circuit is changeable, and related to the switching period of the switching signal. Thus, the third signal is proportioned to the output current. Receiving the third signal and based on a reference voltage, the switching circuit controls the pulse wave width of the switching signal so as to adjust output current of the power converter.