| Primary side feedback flyback converter is widely used in the fields of chargers and adapters due to simple structure, low cost and input output isolation. And digital control is gradually becoming a trend because of its flexibility. But the problem of inaccurate sampling, instable switching point of multi-mode switching and lack of output cable compensation lead to low precision of constant current and constant voltage for digital control primary side feedback flyback converter.Aiming at the above-mentioned problem, a high precision constant current and constant voltage digital control strategy is designed in this thesis. In the aspect of constant current, according to the principle of the constant current control, the three factors that influence current precision:the primary side peak current, the secondary side current duration and the switch period fluctuations caused by valley on are obtained. Then the influence of the factors is researched. Based on the analyses, the way of compensation is designed for each factor, the accurate primary side peak current is obtained by adjusting the threshold of the peak current, the error of the secondary side current duration is excluded by sampling the resonant period, the accurate switch period is sampling by valley on control. In the aspect of constant voltage, according to the output current sampling of constant current control, the value of output cable compensation is calculated. And digital filter is designed to maintain the stability of the loop. At the same time, the mode switching strategy is improved by adding the constraint conditions of the mode switching, which ensures the stability of the switching point, thus achieving high precision constant voltage control. Base on these, the complete high precision constant current and constant voltage control strategy is implemented by digital algorithm, and the code level simulation of the algorithm is implemented by Matlab and Modelsim. Finally, the usefulness of the proposed high precision constant current and constant voltage control strategy and the algorithm is verified by FPGA in a power supply system of 5V/1 A.According to the test results, the precision of constant current of the proposed strategy can achieve ±1.5% in the whole input voltage range and whole load range, as well as the precision of constant voltage can achieve ±0.6%. In addition, the average efficiency of the system in constant voltage model arrives to 79.33%, the average efficiency of the system in constant current model arrives to 77.59%. What’s more, the compensations of primary side current, the valley on, and the output cable compensation are all implemented. The model switching point is also stable. The test results meet the requirements of the design index. |