1 Introduction
With the increasing energy crisis and the improvement of human environmental awareness, the development and utilization of new energy sources have attracted more and more attention. As an inexhaustible, efficient and pollution-free energy source, solar energy has become more popular recently. The photovoltaic sine inverter power supply system introduced in this article is a power supply system suitable for household use, especially for users in remote areas of western China with little or no electricity. With the development of western my country, its market prospects will become more and more broad.
2 Inverter System Structure and Principle
2.1 Basic system structure
The basic structure diagram of the system is shown in Figure 1. As can be seen from the figure, the solar cell array first charges the battery through the charging circuit to obtain a basically stable DC voltage, and then the DC is inverted into high-frequency AC through the inverter circuit, and finally it is boosted by the power frequency transformer and filtered by the filter circuit to become a 50Hz, 220V sinusoidal AC voltage. The control of the entire system is completed by the MR16 single-chip microcomputer. Its core part is the digital PI regulator part composed of the formation of SPWM wave and the feedback formed according to the output AC voltage sampling.
Figure 1 Basic system structure
2.2 About MR16 MCU
The 68HC908MR16 microcontroller is a low-cost, high-performance eight-bit microcontroller. It has 32k bytes of erasable on-chip flash memory FLASH and 768 bytes of RAM, which are completely sufficient for this system; it has a PWMMC module with 6 PWM outputs specifically for motor control, which is suitable for single-phase and three-phase inverters. At the same time, the module also has 4 FAULT pins specifically for fault protection. When a fault occurs, the PWM output can be quickly blocked without causing an interruption to achieve the purpose of protection; it has a clock generator module that can select an external crystal clock or an internal phase-locked loop clock. The internal phase-locked loop clock selected by this system can generate an accurate 8MHz internal bus frequency, thereby ensuring the frequency accuracy of the system; it has a programmable AD clock, and the fastest AD conversion time is only 2μs, which can minimize the execution time of the interrupt program; it has an SCI serial communication interface that can work in full-duplex or half-duplex mode. In this system, it can reliably complete serial communication with the external keyboard monitoring system.
2.3 Inverter main circuit
The main circuit of the system adopts a single-phase full-bridge inverter circuit as shown in Figure 2. The switch device adopts a power MOSFET that is suitable for small power devices and has the characteristics of fast switching speed and high operating frequency. The gate drive signal of the switch tube comes from the signal of the SPWM wave generated by the MR16 microcontroller after passing through the drive circuit. The output of the full-bridge inverter is a high-frequency SPWM wave, which is boosted and filtered by the transformer to obtain a standard sinusoidal AC voltage of 220V, 50Hz.
Figure 2 Main circuit schematic diagram
2.4 Formation of SPWM Wave
The 68HC908MR16 microcontroller has a PWMMC module specifically used for motor control, which can work in 3 pairs of complementary modes or independent modes and includes 6 PWM outputs. In this system, it is initialized to work in 3 pairs of complementary modes, that is, the two PWM signals in the same bridge arm are complementary. During initialization, a count value is written to PMOD (H: L) to determine the carrier frequency, that is, the switching frequency. The real-time pulse width calculation of the PWM wave is completed by the interrupt program. Every time the PCTN (H: L) counter in the PWMMC module counts to the value in PMOD (H: L), an interrupt is caused. The sine values of 0 to 360 degrees are pre-tabled and stored in a certain area of FLASH. Each time an interrupt occurs, a sine value is taken from it, and a value is obtained after a certain calculation, which is sent to the PVALX (H: L) register. The microcontroller automatically generates an SPWM signal after comparing the value in PVALX (H: L) with the value in PMOD (H: L) and sends it out from the PWM pin. In order to prevent the two tubes in the same bridge arm from being turned on at the same time, a value is written into the register DEADTM in the signalless generator DEADTIME to determine the dead time. This system is designed with a dead time of 2.5μs and a carrier frequency of 10kHz, and a sine table including 200 amplified sine values is made. The PWMMC module also has 4 fault protection ports FAULT1~FAULT4. When the port is at a high level, the PWMMC can block the corresponding PWM output according to the initialization setting. The overcurrent protection in this system utilizes this function. When an overcurrent occurs, the FAULT1 port is set to block all six PWM ports. This system enables PWMMC to work in center-aligned mode. When the PWM clock frequency is 8MHz, the carrier period calculation formula is:
Carrier period = 1/10k = PMOD (H:L) × (1/8M) × 2
Therefore, the system must initialize PMOD (H: L) = $0190 (Note: $ is the hexadecimal symbol in MR16)
2.5 System Control Structure
This system uses a digital PI regulator to achieve voltage stabilization control. The control block diagram of the system is shown in Figure 3. The feedback signal comes from the AD sampling of the AC voltage. In order to ensure accuracy, this system uses a transformer for voltage sampling. The given voltage at the beginning is taken from the soft start output. The soft start is to avoid the generation of a large peak current at the start. The soft start uses the method of gradually adding 1 to the required voltage. After the soft start is over, the given voltage is the value corresponding to the 220V voltage. In order to enhance the rapidity, this system adopts a control method that combines feedforward control with feedback control. In order to enhance the dynamic output characteristics of the system, this system adopts a fuzzy control method that changes the proportional coefficient and integral coefficient according to the deviation. When the deviation is large, the proportional coefficient and integral coefficient are also large. When the deviation is small, the proportional coefficient and integral coefficient are also small, thereby greatly reducing the overshoot, making it easy to stabilize the system, completely eliminating the integral saturation phenomenon, and enhancing the adaptability of the system.
Figure 3 System control block diagram [page]
3 Serial Communication
In order to enhance the system's ability to adapt to different environments, it is necessary to monitor the system and modify and adjust the parameters. This system uses serial communication technology to communicate with the external keyboard monitoring system. The program uses a query method to periodically send the detected data to the outside world. The detected data includes solar cell voltage, charging current, battery voltage, DC side current, output voltage, output current, radiator temperature, etc. When a fault occurs, the fault signal is sent first. When the parameters need to be modified, the data is received and the corresponding parameters are modified, and the accuracy of data communication is verified by the verification and verification method. The hardware uses MAXIM's MAX485 as the interface chip to make it work in half-duplex mode. At the same time, this system uses optocoupler isolation to enhance the system's anti-interference ability and improve reliability.
4 System software design
The system software adopts modular design, including initialization module, protection module, regulator module, communication module, interrupt program module, etc. Except for the interrupt module, the other modules are placed in the main program. The main program block diagram is shown in Figure 4.
Figure 4 Main program flow chart
The initialization module is mainly used to initialize the system and assign initial values to each variable unit and each register unit.
The protection module makes fault judgments based on the voltage and current sampling values, and blocks the PWM output when a fault occurs. Protection includes battery undervoltage, battery overvoltage, system overload, overheating protection, etc. Among them, battery undervoltage and overvoltage protection can achieve self-recovery, that is, when the battery voltage is detected to return to normal, the system will restart and resume normal operation. Overcurrent protection uses hardware protection because it requires a quick response. When overcurrent occurs, all PWM outputs are immediately blocked, and all drive circuits are also immediately blocked. Only when reset can the work be restored. The software can determine whether overcurrent protection occurs.
The regulator module completes the PI regulation of the system output voltage to stabilize the output voltage at 220V, and the soft start is also included. Its input parameter is the soft start output, and the output parameter M is sent to the interrupt module to participate in the calculation of the PWM pulse width. By adjusting the value of this parameter in real time, the pulse width value can be changed so that the output follows the given value.
The interrupt program module completes the generation of SPWM waveforms and the sampling of AC voltage and AC current parameters. The input parameter of the interrupt is the output parameter M of the PI regulator, which participates in the calculation of the pulse width, that is, the calculation of the PVALX (H: L) value, thereby changing the duty cycle and adjusting the output voltage. According to the sampling method of SPWM rule 2, combined with the setting of PWMMC in initialization, the real-time calculation formula of the pulse width is:
Positive half cycle:
PVALX(H:L)=PMOD(H:L)/2+M×SIN(PTR)
Negative half cycle:
PVALX(H:L)=PMOD(H:L)/2-M×SIN(PTR)
Where PTR is the sine table pointer, and SIN(PTR) is the sine value corresponding to the PTR pointer.
[page]
5 Conclusion
According to the above ideas, a prototype was made, and finally a relatively standard 220V, 50Hz sinusoidal voltage was obtained. The soft start was also very stable, with a frequency error of ≤0.1% and an output voltage error of ≤0.5%. Due to the use of a 10kHz carrier frequency, a 20kHz high-frequency signal was obtained on the primary side of the transformer without noise. Under the above control mode, the system can ensure that the output voltage remains stable quickly when the system is suddenly loaded or unloaded. In addition, the serial communication with the external keyboard monitoring system is good, and it has strong practicality and reliability. The output voltage waveforms when it is unloaded and loaded are shown in Figures 5 and 6.
Figure 5 Output voltage waveform when no load
Figure 6 Output voltage waveform under load
Previous article:Design of battery management system based on single chip microcomputer
Next article:Bit synchronization extraction of digital communication system based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 17:29
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 【Aigtek Instrument Peripherals】Do you know how to use a dotting machine?
- PADS----ECO problem, as shown in the picture, what is the cause? Please tell me if you know, thank you
- Microwave Solid-State Circuit Design (Second Edition)
- Let's take a look at the electromagnetic waves in Korean
- How terrible is it that an electric motorcycle battery explodes?
- Is there any official routine for developing EFM8 in Simplicity Studio? Where can I download it?
- What is the difference between W(b) and b in assembly language?
- 【Silicon Labs BG22-EK4108A Bluetooth Development Evaluation】+Power-on and Example Program Test
- "Power amplifier experimental case" application of power amplifier in forward and reverse motion of ultrasonic motor
- Share: [Zhongke Blue News] AB32VG1 Review SDIO (File System)