Design of Switching Power Supply Digital Control System and PID Control

In recent years, embedded technology has developed extremely rapidly, and highly integrated processors such as single-chip microcomputers and dedicated embedded ARM have appeared, and have been widely used in communications, automation, power electronics and other fields. The power supply industry has also begun to adopt embedded controllers with rich internal integration resources to form a large-scale switching power supply control system.

In recent years, embedded technology has developed extremely rapidly, and highly integrated processors such as single-chip microcomputers and dedicated embedded ARM have appeared, and have been widely used in communications, automation, power electronics and other fields. The power supply industry has also begun to adopt embedded controllers with rich internal integration resources to form a large-scale switching power supply control system. Switching power supply is a kind of high efficiency power supply. It is controlled by pulse width modulation wave (PWM) with adjustable duty cycle to turn on and off switching devices such as MOS tube and IGBT, so as to achieve stable voltage and current output. The pros and cons are directly related to the performance indicators of the entire Electronic system. The embedded ARM processor S3C44BOX chip of SAMSUNC company is applied to the design of the control system of the switching power supply. Using C language and a small amount of assembly language, a kind of embedded ARM processor with intelligent PID controller and intelligent PID controller can be realized. Switching power supply control system with touch screen, LCD Display and other functions.

l System hardware architecture

As digital circuits and semiconductor technology become more and more mature, the proportion of digital signals and digital circuits in applications is increasing, and more and more advantages are shown at the same time: it is convenient for computer processing and control, reducing signal interference, and improving immunity. Interference ability, easy to debug, and easy to implant in self-diagnosis, fault tolerance and other technologies. With the increase in the main frequency of the embedded processor, the enhancement of the on-chip control function, and the further increase of the PWM waveform frequency, the integration of the power control system can be improved.

The power supply samples the output voltage and current signals, performs PID control, and outputs PWM drive waveforms to adjust the output voltage. The output voltage provides stable high-voltage and high-current output to the load by charging and discharging large-capacity tantalum capacitors for electroplating in the factory. The hardware architecture of the power control system is shown in Figure 1.

This system includes PID controller, PWM output, AD sampling, forming a single closed loop system. The front-end three-phase AC power is input to the switching power supply rectifier module, and after rectification and filtering, a stable DC voltage is output. This DC voltage is directly output to the IGBT module. The high AD converter converts the voltage and current signal output from the back-end into a digital signal and supplies it to S3C44BO for digital PlD calculation. After PID control calculation, S3C4480 outputs PWM to IGBT to form a closed-loop system to control the stable output of voltage and current. So as to realize the switching power supply control system.

For PID operation and PWM wave output modules, higher requirements are required. Through calculation and examination, we have selected SAMSUNC’s S3C4480, which is a 32-bit CPU based on the ARM7TDtMI architecture and has a computing speed of up to 59MIPS. Its specific features are as follows:

The calculation speed is up to 59 MIPS, which fully meets the real-time requirements of complex PID controller calculations;

16-bit timer, can realize up to 0.03 μs PWM pulse wave, and has the function of anti-dead zone (DEADZONE);

There are up to 8 external interrupt sources, which can respond to the external fault information of the system in real time;

Built-in LCD) controller, and has a DMA channel, so that the voltage and current values ​​can be displayed on the LCD in real time;

Up to 71 universal 10-port lines, which can easily expand the external interface;

The built-in lIC interface controller can save system information in EEPROM to provide reference for system operators;

The internal watchdog function can make the system automatically reset in the case of software or hardware errors, ensuring the safe and normal operation of the system;

Two asynchronous serial interfaces (UART) can easily realize the communication with the host computer;

The expanded large-capacity memory provides enough space for the software.

First, the system uses touch screen and LCD as the man-machine interface. S3C44BO integrates an LCD controller, which can support up to 320×240 resolution, 256 colors (sTN-LCD), and is connected to the CPU through a DMA channel, which can quickly and dynamically Display color graphics, replacing the manufacturer’s traditional 5l series single-chip microcomputer and LED The man-machine interface composed of digital tubes makes the operation more convenient for workers. The S3C44BO external GPIO interface can provide a variety of external signals as listed in Table 1.

8 external interrupts to meet the instant shutdown response to special conditions such as overcurrent, overvoltage, phase loss, and overtemperature. S3C44BO has an external memory interface, through external expansion FLAsH SST39VF160 and SDRAM HY641620 to ensure that the digital control system has enough space to save and run programs. Due to the design requirement of one thousandth, the S3C4480 on-chip IOBIT-ADC was not used, but the AD7705, a dual-channel, 168IT△-∑ ADC, which was connected to the CPU through the SIO synchronization port. The configuration of AD7705 can be seen in references[7], No more explanation here.

2 PWM control principle

There is an important conclusion in the sampling control theory: when narrow pulses with the same impulse and different shapes are applied to the inertial link, the effect is basically the same. PWM control technology is based on this conclusion to control the turn-on and turn-off of semiconductor switching devices, so that a series of pulses with equal amplitude but unequal width are obtained at the output end, and these pulse trains are used to replace sine waves or other The required waveform, and modulate the width of each pulse according to certain rules.

In this system, the PWM waveform is output by the clock TIMER0 output port TOUTO of the central processing unit S3C4480. Because the PWM wave with the output frequency of 30 kHz is required, and it is one thousandth, the 4BIT frequency divider is set to 0 by setting the settings of the TCFGO and TCFGl registers. 5. The prescaler register is set to 1, and the count compare register TCNTB0 is set to 1000. In this way, when the S3C4480 main frequency is 66MHz, the PWM wave frequency output by TOUT0 is 30 kHz. When TIMER0 starts timing, every time the value of TCNTB0 is the same as the timer’s down counter value, the timer controls the PWM wave level to change. Modifying the value of TC-NTB0 can control the duty cycle of the PWM wave, increasing or decreasing by 1, the PWM output duty cycle will increase or decrease by one thousandth, so as to reach one thousandth. Figure 2 is the output PWM waveform diagram. We can see that the PWM waveform output through the dedicated timer output port TOUTO is very good. After testing, the rising and falling edges are both at the ns level.

3 PID algorithm and software flow chart

3.1 The main program software flow

Because of the use of embedded ARM chips, the system software is mainly implemented in C language for driver and application development, and ARM assembly language is used only in the CPU initialization phase. Use the ARM S3C44BO chip to expand the 2M FLASH, 8M SDRAM large-capacity memory, which fully meets the system program operation and data storage, so that the S3C4-480 ARM embedded system has a large memory capacity, simple software programming, fast speed, and high The advantages. The software flow of the digital control system is shown in Figure 2.

After the system is turned on, first check whether the state of the system peripherals is normal to avoid malfunctions. In the system operation, in order to prevent the software from running away, it is also necessary to turn on the watchdog function and add the dog feeding program, so that the reliability and stability of the system are guaranteed on the software. In the ADC part, the sampled value is filtered to ensure the correctness and stability of the sampled value.

3.2 PID control algorithm

In automatic control technology, the widely used regulator control law is proportional (P), integral (I), and differential (D) control, referred to as PID control, also known as Pm regulation. The key to its principle is measurement, comparison and execution. The PID controller compares the measured controlled object (in this system, the voltage and current value) with the set value, and uses this error to adjust the system’s response.

In the power digital PID control system, the proportional link is used to control the voltage and current output to change in proportion to the input error signal, but there is usually a deviation between the actual value and the given value. This deviation is called steady-state error. Therefore, it is necessary to introduce the integration link to eliminate the function of eliminating the steady-state error. However, considering that the power system is turned on, turned off, or the voltage and current working set value is greatly increased, the integration accumulation will occur, which will cause the voltage and current to overshoot, even at the given value. Oscillate up and down. Therefore, in order to reduce the influence of the integral link on the dynamic performance of voltage and current during operation, the integral separation PID is used to control the voltage and current, that is, when the error between the voltage and current and the set working value is less than a range, the integral link is used to eliminate the system. The steady-state error produced by the proportional link.

The integral separation PID control algorithm needs to set the integral separation valve ε, when le(k)│>ε, that is, when the deviation value is large, only the PD control link is used to reduce the overshoot, so that the system has a faster response; when le (k) When l≤ε, that is, the deviation value is relatively small, PID control is used to ensure voltage, current and stability. After power-on, the PWM wave width is turned on according to a fixed step, so that the voltage rises. After reaching a certain range of set value, in order to prevent voltage overshoot, it is necessary to add integral separation PID control algorithm for control to prevent voltage overshoot. After the voltage reaches the one-thousandth of the progress range, the integration link needs to be added to complete the rapid and stable output when the power is turned on. The PID algorithm flow is shown as in Fig. 3.

4 Conclusion

The application of embedded ARM chip S3C4480 in the design of high-switching power supply digital control system makes full use of the powerful resources on the chip, simplifies the hardware circuit, improves the software development speed, facilitates the debugging of software and hardware, and improves the reliability of the system. The system has been debugged on site and proved that the design is reasonable and the operation is reliable. It has realized the upgrade of the 5l series 8-bit single-chip microcomputer to the ARM 32-bit system for the manufacturer, which reduces the cost and improves the performance of the product.