- PV controller hardware structure
The hardware structure of the photovoltaic controller is shown in Figure 1. The controller uses AVR mega32 microprocessor as the control core. The peripheral circuits are mainly composed of battery voltage and ambient temperature detection and charge and discharge control circuit, solar cell voltage detection and group switching circuit, Load current detection and output control circuit, status display circuit, data upload interface circuit and keyboard input circuit are composed.
The voltage detection circuit is used to identify the light intensity and obtain the terminal voltage of the battery, and the temperature detection circuit is used to compensate the battery charging temperature. The system uses PWM to drive the charging circuit to achieve optimal charging of the battery. The solar cell group switching control circuit is used for the switching of solar cells under different light intensities and charging modes. The system can control three groups of solar cell components. The load current detection circuit is used for overcurrent protection and load power detection; the status display circuit is used for the display of the system status, including the display of voltage, load status and charging and discharging status. The data upload interface circuit is used to upload the system operating parameters to realize remote monitoring. The keyboard input circuit is used to set the charging mode and turn on the LCD backlight.
The controller turns on the charging circuit of the solar cell components to the battery when there is sunlight to charge the battery, and controls the battery to discharge when the sunlight is insufficient at night or in cloudy days to ensure the power consumption of the load.
The microprocessor adopts Atmel’s 8-bit embedded RISC processor, which has the advantages of high performance, high security, and low power consumption. The program memory and data memory can be accessed independently with Harvard structure, and the code execution efficiency is high. The AVR mega32 processor used in the system includes 32KB on-chip Flash memory; 1KB EPROM and 2KB RAM: watchdog is integrated on-chip; 8-channel 10-bit ADC; 3-channel programmable PWM output; with online system Programming function, rich on-chip resources, high integration, easy to use. The AVR mega32 processor can easily realize functions such as the setting of external input parameters, the management of batteries and loads, and the indication of working status.
- Software flow chart of photovoltaic controller
The software flow chart of the photovoltaic controller is shown in Figure 2. The main program mainly completes the initialization of I/O, timer and PWM, and at the same time calls the corresponding charging and discharging electronic program according to the status of the solar cell components and the battery. The measurement is mainly done by the interrupt service routine.
The constant voltage tracking (CVT) method is adopted to realize the maximum power tracking of the solar cell, which can effectively improve the working efficiency of the solar cell and also improve the working performance of the whole system. The main circuit of the system is shown in Figure 3.
It can be seen from the main circuit shown in Figure 3 that the topology of the main circuit is a BUCK type converter, and the output pulse of the pulse width control chip TL494 is used to control the duty cycle of the main circuit power device (IGBT) to change the charging current of the battery. , thereby realizing the constant voltage tracking of the solar cell, so that the output power of the solar cell is close to the maximum power. At the same time, the collection of battery voltage, charging current and solar cell voltage is completed through the main circuit, so that the control circuit can realize various tracking and protection functions.
- Charge and discharge control of colloidal lead-acid battery
Colloidal lead-acid batteries have the advantages of large energy storage, safety, good sealing performance, long life and maintenance-free, and are widely used in solar photovoltaic power generation systems. The charging and discharging characteristics of colloidal lead-acid batteries are shown in Figure 4. The charging process of colloidal lead-acid batteries has three stages: the initial (OA) voltage rises rapidly; the middle (ABC) voltage rises slowly and lasts for a long time; the point C starts to be At the end of charging, the voltage begins to rise; when approaching point D, the water in the colloidal lead-acid battery is electrolyzed, and charging should be stopped immediately to prevent damage to the colloidal lead-acid battery. Therefore, to charge the colloidal lead-acid battery, the usual method is to charge quickly in the early and middle stages to restore the capacity of the colloidal lead-acid battery; at the end of the charging period, a small current is used to supplement the electricity for a long time.
The discharge process of colloidal lead-acid batteries mainly has three stages: the voltage drops rapidly at the beginning (OE) stage; the voltage drops slowly in the middle stage (EFG) and lasts for a long time; in the final stage (after point G), the discharge voltage drops sharply , the discharge should be stopped immediately, otherwise it will cause irreversible damage to the gel lead-acid battery. Therefore, if the charging and discharging control method of the colloidal lead-acid battery is unreasonable, not only the charging efficiency will be reduced, but the life of the colloidal lead-acid battery will also be greatly shortened, resulting in an increase in the operating cost of the system. During the charging and discharging process of colloidal lead-acid batteries, in addition to setting appropriate charging and discharging thresholds, appropriate temperature compensation should be performed on the charging and discharging thresholds, and necessary overcharge and overdischarge protections should be set.
According to the characteristics of the colloidal lead-acid battery, the controller uses the PWM function of the MCU to charge and manage the colloidal lead-acid battery. If the colloidal lead-acid battery is open-circuited when the solar cell is being charged normally, the controller will turn off the load to ensure that the load is not damaged; if the colloidal lead-acid battery is open-circuited at night or when the solar cell is not being charged, the controller itself cannot get power, There will be no action. When the charging voltage is higher than the protection voltage (15V for 12V colloidal lead-acid battery), the charging of the colloidal lead-acid battery is automatically turned off; after that, when the voltage is lower than the protection voltage (15V for 12V colloidal lead-acid battery) , the colloidal lead-acid battery enters the floating charge state, when the voltage is lower than the maintenance voltage (13.2V for the 12V colloidal lead-acid battery pack), the floating charge is turned off and enters the equalizing state;
When the gel lead-acid battery voltage is lower than the protection voltage (10.8V for 12V gel lead-acid battery pack), the controller automatically turns off the load to protect the gel lead-acid battery from damage. If over-discharge occurs, boost charging should be performed first to restore the voltage of the colloidal lead-acid battery to the boosted voltage and then keep it for a certain period of time to prevent the colloidal lead-acid battery from vulcanizing. The colloidal lead-acid battery charging circuit controlled by PWM method (intelligent three-stage charging) can maximize the effectiveness of the solar battery and improve the charging efficiency of the system.
The digital temperature sensor DS 18820 is used to detect the ambient temperature of the colloidal lead-acid battery. The charging threshold voltage and temperature compensation coefficient of the colloidal lead-acid battery is -4mV/℃ (single). The compensated voltage threshold can be expressed by the following formula (Figure 5):
In the formula, Ve is the voltage threshold after compensation: V is the voltage threshold at 25°C; t is the ambient temperature of the colloidal lead-acid battery; α is the temperature compensation coefficient: n is the number of cells connected in series.
- Control method
Since the voltage and current of the solar cell are not linear, and under different atmospheric conditions, due to the difference in the amount of sunlight and temperature, each working curve is different, and each working curve has a different maximum power point (Pmax ), which is the best operating point of the solar cell. In order to improve the efficiency of the solar cell power generation system, fully use the solar cell, multiply the voltage V and current I of the solar cell to obtain the power P, and then judge whether the output power of the solar cell at this time reaches the maximum, if not at the maximum power point When running, adjust the duty cycle D of the PWM output, change the charging current, conduct real-time sampling again, and make a judgment on whether to change the duty cycle. Through this optimization process, the solar cell can always run at the maximum power point. In order to make full use of the output energy of solar cell modules. At the same time, the PWM method is used to make the charging current a pulse current to reduce the polarization of the colloidal lead-acid battery and improve the charging efficiency.
1) CVT method
In a solar photovoltaic power generation system, it is usually required that the output power of the solar cell is always the largest, that is, the system should be able to track the maximum power point output by the solar cell. The volt-ampere characteristic curve of the solar cell is shown in Figure 6. In Figure 6, L is the load characteristic curve, and the intersection points a, b, c, d, and e correspond to different operating points. It can be seen that these operating points do not exactly fall at the maximum power points (a’, b’, c’, d’, e’) provided by the solar cell, which cannot fully utilize the solar cell’s ability under the current conditions. maximum power provided. Therefore, an impedance converter must be added between the solar cell and the load, so that the converted operating point coincides with the maximum power point of the solar cell, so that the solar cell can output the maximum power, which is the so-called maximum power tracking of the solar cell.
As can be seen from Figure 6, when the temperature is constant, the maximum power point of the solar cell is almost on both sides of the same vertical line, which makes it possible to approximately regard the trajectory of the maximum power point as the voltage V-Vm. A vertical line, that is, as long as the output voltage of the solar cell is kept constant and equal to the voltage of the corresponding maximum power point under a certain sunshine intensity, the maximum power output of the solar cell can be roughly guaranteed at this temperature. Simplify maximum power point tracking to constant voltage tracking
(CVT), which is the theoretical basis of CVT control. The schematic diagram of realizing CVT is shown in Fig. 7. In the figure, V’sp is the voltage at a given operating point, corresponding to the maximum power point at a certain temperature: Vsp is the actual output voltage of the solar cell. After comparing the given voltage with the actual voltage, it is adjusted by PI, and the adjustment result is compared with the triangular wave to obtain the PWM pulse to drive the power device, so as to adjust the load impedance of the solar cell (different PWM pulse widths correspond to different load impedances).
CVT is a method to determine the system power point by stabilizing the terminal voltage of the solar cell at a certain value. The CVT method has the advantages of simple control, high reliability, good stability, and easy implementation, and can obtain 20% more electric energy than the general solar photovoltaic power generation system. However, this tracking method ignores the effect of temperature on the open-circuit voltage of the solar cell. Taking monocrystalline silicon solar cells as an example, when the ambient temperature increases by 1°C, its open circuit voltage decreases by 0.35%~0.45%. This shows that the voltage corresponding to the maximum power point of the solar cell also changes with the change of the ambient temperature. For areas with large temperature difference between seasons or daily temperature, the CVT method cannot completely track the maximum power in all temperature environments. When the temperature changes greatly, the operating point of the solar cell array using the CVT control method will deviate from the maximum power point.
2) MPPT method
In view of the limitations of the CVT control method, it can only achieve maximum power tracking under certain temperature conditions, and there is still power loss under different temperature conditions. The MPPT method can track the maximum power of the solar cell under any temperature and sunshine conditions. The MPPT method is to change the working state of the system in real time and track the maximum operating point of the solar cell array to achieve the maximum power output of the system. It is an autonomous optimization method with better dynamic performance, but not as stable as CVT. At present, the most commonly used control methods are mainly disturbance observation method and conductance increment method.
The perturbation observation method is the most commonly used method because of its simplicity. It obtains the current output power of the solar cell by detecting the output voltage and current of the solar cell, and then compares it with the memory power at the previous moment to determine the direction of adjustment of the given reference voltage. If ΔP>0, it means that the reference voltage adjustment direction is correct, you can continue to adjust in the original direction; if ΔP<0, it means that the reference voltage adjustment direction is wrong, and the adjustment direction needs to be changed. When the given reference voltage increases, if the output power also increases, the operating point is located to the left of the maximum power point Pmax in Figure 8, and the reference voltage needs to continue to be increased; if the output power decreases, the operating point is located at the maximum power point On the right side of Pmax, the reference voltage needs to be reduced.
When the given reference voltage decreases, if the output power also decreases, the operating point is on the left side of Pmax, and the reference voltage needs to be increased; if the output power increases, the operating point is on the right side of Pmax, and the reference voltage needs to continue to be decreased Voltage.
The process of changing the given reference voltage is actually a process of power optimization. Since the reference voltage is constantly adjusted during the optimization process, the operating point of the solar cell always oscillates near the maximum power point, and it cannot work stably at the maximum power. Point. At the same time, when the sunlight intensity changes rapidly, the adjustment direction of the reference voltage may be wrong.
The principle of the conductance increment method is that at the maximum power point, there is dP/dV=0, that is, dl/dV=-/IV is satisfied. In theory, it is better than the perturbation observation method, and can adapt to the rapid changes of sunlight intensity, but due to factors such as the accuracy of the sensor, the conductance incremental method is often difficult to achieve.
Since the I=f(V) relationship of solar cell characteristics is a single-valued function, as long as the output voltage of the solar cell can be kept at the Vm value corresponding to this condition in real time under any sunshine and temperature, it must be It is guaranteed that the solar cell outputs its maximum power at any instant. The control block diagram of the CVT is shown in Figure 9. It uses the solar cell operating voltage as a feedback to achieve the purpose of stabilizing the solar cell operating point voltage. I=f1(V) in Fig. 9 is related to the load characteristic.
The essence of MPPT is to change the operating point voltage of the solar cell in real time on the basis of CVT, so that the operating point voltage is always equal to the voltage at the maximum power point, so as to realize the maximum power point tracking. Its inner ring is the CVT. The control block diagram of MPPT is shown in Figure 10. At present, the research on MPPT method focuses on the realization of simple and high-stability control algorithms, such as optimal gradient method, fuzzy logic control method, neuron network control method, etc., which have also achieved remarkable tracking control effects. The working steps of the maximum power point tracking method for an independent solar cell photovoltaic power generation system are as follows.
Step 1: Use the microprocessor as the maximum power point tracking controller to detect the output voltage Vn and current In of the solar cell module.
Step 2: The microprocessor judges the difference ΔV between the current output voltage Vn and the output voltage sampling value Vb of the previous control cycle, if ΔV=0, then judges the difference between the current output current In and the output current sampling value Ib of the previous control cycle ΔI; if ΔI≠0, judge whether ΔI/ΔV is equal to -I/V.
Step 3: According to the judgment result of Step 2, if ΔI=0, then Vb=Vn, lb=ln: if ΔI/ΔV=-I/V, then Vb=Vn, lb=ln.
According to the judgment result of step 2, if ΔI≠0, then judge that ΔI>0 is NO; if ΔI/ΔV≠-I/V, judge that ΔI/ΔV>-I/V NO.
Step 4: According to the judgment result of Step 3, if ΔI>0, the microprocessor controls the square wave generating circuit and the pulse width modulation pulse forming circuit connected in series with the circuit to generate pulse width modulation pulses to reduce the voltage connected to the solar cell. The duty cycle of the buck circuit at the output of the component, and make Vb=Vn, Ib=In.
If ΔI/ΔV>-I/V, the microprocessor reduces the duty cycle according to the method in step 4, and makes Vb=Vn and Ib=In.
If ΔI<0, the microprocessor increases the duty cycle according to the method in step 4, and makes Vb=Vn and Ib=In.
If ΔI/ΔV<-I/V, the microprocessor increases the duty cycle according to the method in step 4, and makes Vb=Vn and Ib=In.