introduction
In recent years, embedded technology has developed very rapidly, and high-integration processors with single-chip microcomputers and dedicated embedded ARM as the core have emerged, and have been widely used in the fields of communication, automation, power electronics, etc. The power supply industry has also begun to use embedded controllers with rich internal integrated resources to form the control system of large switching power supplies. The switching power supply is a kind of power supply with high efficiency. It controls the opening and closing of switching devices such as MOS tubes and IGBTs by a pulse width modulation wave (PWM) with variable duty cycle, so as to achieve stable output of voltage and current. The quality of its performance is directly related to the working performance index of the entire electronic system. Applying the embedded ARM processor S3C44BOX chip of SAMSUNC company to the design of the control system of the switching power supply, using C language and a small amount of assembly language, a switching power supply control system with embedded ARM processor as the core, intelligent PID controller, touch screen, liquid crystal display and other functions can be realized.
System hardware architecture
As digital circuits and semiconductor processes become increasingly sophisticated, digital signals and digital circuits account for an increasing proportion of applications, and they are showing more and more advantages: facilitating computer processing and control, reducing signal interference, improving anti-interference capabilities, facilitating debugging, and facilitating the implantation of self-diagnosis, fault tolerance and other technologies. With the increase in the main frequency of embedded processors, the enhancement of on-chip control functions, and the further improvement of PWM waveform frequency and accuracy, the integration and accuracy of power control systems have been improved.
This power supply samples the output voltage and current signals, performs PID control, and finally outputs a PWM drive waveform to adjust the output voltage. The output voltage provides a stable high voltage and high current output to the load by charging and discharging a large-capacity tantalum capacitor for electroplating in the factory. The hardware architecture of the power supply control system is shown in Figure 1.
This system includes PID controller, PWM output, AD sampling, and forms a single closed-loop system. The front-end three-phase AC power supply is input to the switching power supply rectifier module, and a stable DC voltage is output after rectification and filtering. The DC voltage is directly output to the IGBT module. The high-precision AD converter converts the voltage and current signals output from the back end from analog signals to digital quantities and supplies them to S3C44BO for digital PID calculation. After PID control calculation, S3C4480 outputs PWM to IGBT to form a closed-loop system, control the stable output of voltage and current, and thus realize the switching power supply control system.
The requirements for PID operation and PWM wave output modules are relatively high. Through calculation and examination, we selected S3C4480 from SAMSUNC, which is a 32-bit CPU based on ARM7TDtMI architecture with a computing speed of up to 59MIPS. Its specific functional characteristics are as follows:
The computing speed is as high as 59 MIPS, which fully meets the real-time requirements of complex PID controller operations;
The 16-bit timer can achieve a PWM pulse wave with an accuracy of up to 0.03 μs and has a dead zone protection function;
there are up to 8 external interrupt sources, which can respond to external fault information of the system in real time;
An LCD controller is embedded inside, and it 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 external interfaces; [page]
The built-in IC interface controller can save system information in EEPROM to provide reference for system operators;
The internal watchdog function can automatically reset the system in the event of a software or hardware error, ensuring safe and normal operation of the system;
Two asynchronous serial interfaces (UART) can easily communicate with the host computer;
The external large-capacity memory provides ample space for the software.
First, the system uses a touch screen and LCD as the human-machine interface. The S3C44BO integrates an LCD controller that supports up to 320×240 resolution and 256 colors (sTN-LCD), and is connected to the CPU through a DMA channel. It can quickly and dynamically display color graphics, replacing the manufacturer's traditional 5l series microcontroller and LED digital tube human-machine interface, making it more convenient for workers to operate. The S3C44BO external GPIO interface can provide a variety of external signals as listed in Table 1.
8 external interrupts to meet the immediate shutdown response to special situations such as overcurrent, overvoltage, phase loss, overtemperature, etc. S3C44BO has an external memory interface, which ensures that this digital control system has enough space to save and run programs through external expansion FLASH SST39VF160 and SDRAM HY641620. Due to the design accuracy requirement of one thousandth, the S3C4480 on-chip IOBIT-ADC was not selected, but the AD7705 dual-channel, 168IT△-∑ ADC was selected and connected to the CPU through the SIO synchronous port. The configuration of AD7705 can be found in reference [7] and will not be explained here.
2 PWM control principle
There is an important conclusion in sampling control theory: when narrow pulses with equal impulses but different shapes are added to the inertia link, the effect is basically the same. PWM control technology is based on this conclusion, which controls the on and off of semiconductor switching devices, so that the output end obtains a series of pulses with equal amplitudes but unequal widths. These pulse trains are used to replace sine waves or other required waveforms, and the width of each pulse is modulated according to certain rules.
In this system, the PWM waveform is output from the clock TIMER0 output port TOUTO of the central processor S3C4480. Since the PWM wave with a frequency of 30 kHz and an accuracy of one thousandth is required, the 4BIT divider is set to 0.5, the pre-scale register is set to 1, and the count comparison register TCNTB0 is set to 1000 by setting the TCFGO and TCFG1 registers. In this way, when the main frequency of S3C4480 is 66MHz, the PWM wave frequency output by TOUT0 is 30 kHz. When TIMER0 starts timing, each time the value of TCNTB0 is the same as the down counter value of the timer, the timer controls the PWM wave level to change. Modifying the value of TC-NTB0 can control the duty cycle of the PWM wave. If it increases or decreases by 1, the PWM output duty cycle increases or decreases by one thousandth, thereby achieving an accuracy of 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 has a very good waveform. After testing, the rising and falling edges are both at the ns level. [page]
3 PID algorithm and software flow chart
3.1 Main program software flow
Due to the use of embedded ARM chips, the driver and application development is mainly carried out in C language in the system software implementation, and ARM assembly language is used only in the CPU initialization stage. The ARM S3C44BO chip is used to expand the 2M FLASH and 8M SDRAM large-capacity memory, which fully meets the system program operation and data storage. This gives full play to the advantages of the S3C4-480 ARM embedded system with large memory capacity, simple software programming, fast speed and high precision. The digital control system software flow is shown in Figure 2.
After the system is turned on, the first thing to do is to check whether the status of the system peripherals is normal to avoid malfunctions. During system operation, in order to prevent the software from running away, it is also necessary to enable the watchdog function and add a dog feeding program to ensure the reliability and stability of the system in terms of software. In the ADC part, the sampled values are averaged and filtered to ensure the accuracy and stability of the sampled values.
3.2 PID Control Algorithm
In automatic control technology, the most widely used regulator control law is proportional (P), integral (I), 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 values) with the set value, and uses this error to adjust the system response.
In the digital PID control system of the power supply, the proportional link is used to control the output of the voltage and current to change in proportion to the input error signal, but there is usually a deviation between the actual value and the given value, which is called the steady-state error. Therefore, it is necessary to introduce the function of eliminating the steady-state error of the integral link to improve the accuracy. However, considering that when the power supply system is turned on, turned off, or the voltage and current working setting values are greatly increased, the integral accumulation will cause the voltage and current to overshoot, and even oscillate around the given value. Therefore, in order to reduce the impact of the integral link on the dynamic performance of the voltage and current during operation, the integral separation PID control of the voltage and current is adopted, 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 steady-state error generated by the proportional link of the system.
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 and make the system respond faster; when le(k)l≤ε, that is, when the deviation value is relatively small, PID control is used to ensure the accuracy and stability of voltage and current. After power on, the PWM wave width is opened according to a fixed step size to increase the voltage. After reaching a certain range of the set value, in order to prevent the voltage from overshooting, the integral separation PID control algorithm needs to be added for control to prevent the voltage from overshooting. After the voltage reaches the one thousandth progress range, the integral link needs to be added to complete the rapid and stable output when the power is turned on. The PID algorithm flow is shown in Figure 3.
4 Conclusion
The application of embedded ARM chip S3C4480 in the design of high-precision switching power supply digital control system makes full use of the powerful resources on the chip, simplifies the hardware circuit, improves the speed of software development, facilitates software and hardware debugging, and improves the reliability of the system. The system has been proven by on-site debugging to be reasonably designed and reliable in operation, which has enabled manufacturers to upgrade from 5l series 8-bit microcontrollers to ARM 32-bit systems, reducing costs and improving product performance.
Previous article:DAB receiver realizes MP3 player
Next article:A design scheme for a multifunctional recording and amplification system
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- How to solder this chip component on the PCB board?
- AT32F425-Evaluation Report-Keil Development Environment Construction 01
- MicroPython Hands-on (13) - RGB tri-color light on the control board
- [2022 Digi-Key Innovation Design Competition] Material Unboxing - STM32H745I-DISCO
- Today at 10:00 AM, live broadcast with prizes: ADI's smoke detector integrated solution based on ADPD188BI
- Transfer: Cortex-M development from the perspective of files (2) - Link files
- 【GD32E503 Review】——05.LCD Part 1: Testing the screen refresh speed
- Brief Analysis of RT-Thread System Equipment Framework
- Xintang: Secure In-System-Programming protects firmware burning security
- Transistor circuit problem