An inverter is a device that uses power electronics technology to convert electrical energy. With the development of power electronics technology, inverters are increasingly used, but the application system also places higher and higher requirements on the output voltage waveform characteristics of the inverter, because the output waveform quality of the power supply is directly related to the safety and reliability indicators of the entire system.
With the development of digital signal processing technology, inverter power supplies designed with SPWM control mode are becoming more and more popular. The SPWM inverter power supply introduced in this article uses PIC microcontroller to realize SPWM control and sine wave output, and the circuit is simple, the performance is safe and reliable, the flexibility is strong, and it can reduce harmonics and improve efficiency.
1 SPWM inverter structure
There are many forms of inverter power topology. Figure 1 shows the basic structure of SPWM inverter power, which is mainly composed of transformer center tap push-pull boost circuit, inverter circuit, filter circuit, drive circuit and control circuit. The control circuit mainly includes MCU controller, boost control, voltage detection and current A/D detection circuits.
2 Working principle of SPWM inverter power supply
The front stage of this inverter power supply uses SG3525 to alternately output two PWM signals to control the switch tube, and then generates a 400 V voltage after high-frequency transformer step-up rectification and LC filtering. Then, a rectangular pulse wave equivalent to a sine wave is generated through single-chip microcomputer programming to control the on and off of the inverter bridge switch tube. So that it works in SPWM control mode. Figure 2 shows the electrical schematic diagram of its inverter circuit. The left bridge arm in Figure 2 works in high-frequency modulation mode, that is, Q1 and Q3 are turned on according to SPWM: the right bridge arm works in high-frequency modulation mode, that is, Q2 and Q4 are turned on according to SPWM, and finally a sine wave is obtained after filtering.
3 SPWM sine wave pulse width modulation method
SPWM sinusoidal pulse width modulation is a pulse width modulation method that uses a modulating wave as a sine wave and a carrier wave as a triangular wave. It can be widely used in inverter power supplies. The output waveform control algorithms of SPWM include area equivalent method, natural sampling method, symmetrical regular sampling method, asymmetrical regular sampling method, etc. This paper uses the area equivalent method of pulse width modulation wave to realize SPWM control. Figure 3 shows its SPWM waveform diagram. This method divides the half-cycle sine wave waveform into N equal parts, so that the sine wave is regarded as composed of N pulses connected to each other. These pulses have equal widths (all equal to π/N), unequal amplitudes, and the top of the pulse is not a horizontal straight line, but a curve. The amplitude of each pulse changes according to the sine law. If this pulse sequence can be replaced by the same number of rectangular pulse sequences with equal amplitude but unequal width, and the midpoint of the rectangular pulse coincides with the midpoint of the corresponding sine equal division. And the area pulse amount of the rectangular pulse and the corresponding sine part is equal, then the corresponding pulse sequence can be obtained. In this way, by making the width of each pulse change according to the sinusoidal law and making the rectangular wave equivalent to the sine wave, SPWM sinusoidal pulse width modulation can be achieved.
4 Software Design
4.1 Generation of Sine Wave Pulse Width
According to the generation principle of sinusoidal pulse width modulation (SPWM), if the sine wave U=Urmsintωt is divided into N equal parts in half a period, and the area of the i-th equally divided sine wave is Si, then:
If the amplitude of the rectangular wave is equal to the amplitude Urm of the input sine wave, and the area of each segment of the rectangular wave is equal to the area of the corresponding segment of the sine wave, then the value of the rectangular wave pulse width can be obtained as:
Since the pulse width changes according to the law of sine wave, the values of these pulse widths DK can be compiled into a numerical table, and then the single-chip microcomputer can output the pulse sequence by looking up the table. In the experiment, the carrier frequency fc=25 kHz, AC frequency fs=50 Hz, and carrier ratio N=fdfs can be used to determine the number of discrete points of the sine wave, that is, the number of pulses in one cycle (assuming N=500). In order to save the storage space of the table, in actual programming, the discrete points of the sine wave in half a cycle can be saved, that is, N/2 points can be saved, and then the SPWM waveform can be output in an alternating manner to control the operation of the inverter bridge.
4.2 Software Implementation of SPWM
This system uses PIC16FXX microcontroller as the core, the crystal oscillator is 20 MHz, the instruction cycle is 0.2μs, and the operating frequency of the SPWM wave driving the switch tube is 25 kHz. Then, the initialization settings of the registers in the microcontroller are as follows:
First, set PORTC to output mode, that is, TRISC = 0X00. Set the CCP module to PWM function. At the same time, the CCP module must be set to PWM mode in the CCPXCON register, that is, CCPxM3:CPxM0 = 11XX.
Then PR2 is used to determine the PWM switching cycle register, and TSFMW = (PR2 + 1) × 4TOSC (TMR2 PrescaleValue), fSPWM = 1 / TSPMW. Because the operating frequency f = 25 kHz, PR2 = 0XC7; and the value of the operating cycle register CCPRxL is variable.
After the program is initialized, the timing register TMR2 in the system will start and start working. At this time, the pin output of the PWM unit is high level; when TMR2>CCPRxl, the pin of the PWM unit starts to output low level; when TMR2=PR2, TMR2 is reset to 0 and restarts the next cycle count, and the PWM unit outputs high level again. When the interrupt flag TMR2IF of TMR2 is set to high level, the system will execute the timing interrupt service program. Figure 4 shows its SPWM flow chart. After the interrupt program completes the search for the sine table value and the A/D sampling value, it performs PI adjustment to obtain the correction value and write the correction value into the CCPRxL register. Figure 5 shows the output waveform of the SPWM inverter power supply.
5 Conclusion
The test shows that the inverter power supply based on HC single-chip microcomputer control can meet the requirements of small power inverters, and the single-chip microcomputer can be used to realize the control of digital SPWM waves. This method not only has certain advantages over the traditional analog control method, but also has higher efficiency and smaller size. It also has the advantages of flexible design, reliable performance, stable output, and small harmonics.
Previous article:Inverter Introduction and Principle
Next article:Circuit diagram of power inverter
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- What is the use of a 28V operating voltage microcontroller?
- The microcontroller drives the P-MOS to conduct abnormally through the NPN transistor?
- How to support domestic suppliers who use tricks?
- Thank you for being there + seeking change
- RVB2601 First Experience
- If the Lingte LT3789 is to output 12V10A, can it be directly connected in parallel with MOS?
- MSP430 and ATK-NEO-6M GPS module
- Saw a picture on the official account
- How much do you know about 5G antennas?
- Please help me with this circuit