In the context of the global energy transition and increasingly urgent environmental protection demands, the development and utilization of clean energy have become a core concern worldwide. Photovoltaic technology, as a representative form of clean energy, has received extensive policy support and large-scale application globally. However, due to the inherent randomness and intermittency of photovoltaic energy, the continuous increase in distributed photovoltaic grid-connected capacity poses a severe challenge to grid stability. It is thus imperative to seek scientific and reasonable countermeasures. In this thesis, I focus on a demand-side photovoltaic microgrid, selecting supercapacitors and lithium iron phosphate batteries to form a composite energy storage system, and carry out research on source-load power prediction, composite energy storage power control, and composite energy storage energy scheduling. The main research contents are summarized as follows.
First, to address the problem that photovoltaic output power varies significantly with time and environmental conditions, which leads to inaccurate output power prediction, I propose a prediction method based on an improved dung beetle optimization algorithm (IDBO) combined with a BP neural network under different environmental conditions. For the fitting of complex nonlinear functions, the IDBO algorithm is used to optimize the initial parameters of the BP neural network, which enables fast convergence of BP neural network training and improves prediction accuracy. Second, to solve the problem of unstable grid connection caused by intermittency and instability of photovoltaic power generation, I propose a grid-connected control strategy for a photovoltaic and composite energy storage battery system. Based on the IDBO-BP neural network to predict photovoltaic and composite storage battery output power, I study the grid-connected control strategy. Finally, I validate the proposed method through Matlab/Simulink simulations under different environmental conditions, including sunny and cloudy days. The results demonstrate that the IDBO-BP neural network prediction method is effective, and the power prediction-based grid-connected control strategy for the composite energy storage system shows good performance and potential in theoretical analysis and simulation verification.
1. Background and Motivation
With the development of human society, energy consumption continues to rise, especially the consumption of fossil fuels. Fossil fuels are not clean energy sources; their use produces carbon dioxide and nitrogen oxides, which cause environmental pollution, notably the greenhouse effect and acid rain. Moreover, fossil fuels are non-renewable, and their reserves are limited. Therefore, finding and using clean energy has become an urgent task. Solar energy is inexhaustible and can be converted into electricity through photovoltaic power generation to meet production and living needs. From a long-term perspective, the future energy system will be dominated by clean energy. The global emphasis on environmental protection and sustainable development makes photovoltaic power generation, which is clean, renewable, and widely distributed, an important part of the future energy mix.
However, the relatively low conversion rate of photovoltaic systems is one of the main factors limiting their development. Common methods to improve conversion efficiency include enhancing the performance of photovoltaic materials, optimizing the structure of photovoltaic arrays, and applying maximum power point tracking (MPPT) control. The most direct and economical technique is MPPT algorithm control for photovoltaic cells. The output power of a photovoltaic system is affected by the dynamic coupling of environmental parameters, showing significant random fluctuations and nonlinear time-varying characteristics. An unstable photovoltaic system connected to the grid not only affects grid stability but also impacts the power balance of the grid. If the photovoltaic output power can be accurately predicted, it helps optimize grid dispatching, improve stability, and reduce reserve capacity requirements. For photovoltaic power station operation and management, accurate prediction can improve power generation efficiency, optimize energy management strategies, and reduce operating costs. Furthermore, accurate prediction can enhance investor confidence and promote the development of renewable energy.
In photovoltaic systems, the fluctuation and intermittency of power output are prominent. A common solution in an AC microgrid is to add an energy storage system. However, a single energy storage device is often unable to meet both capacity and power requirements simultaneously. For example, batteries can store large amounts of energy but have slow power response, while supercapacitors respond quickly but have limited capacity. When a photovoltaic source is combined with a composite energy storage system, the resulting photovoltaic-storage system can not only solve the problem of photovoltaic power fluctuation but also address the imbalance of load power. Moreover, during grid faults, the composite energy storage system can suppress voltage dips and provide instantaneous power supply, greatly ensuring reliable grid operation. With the rapid development of clean energy such as wind power and photovoltaic power, the control requirements for composite energy storage technology have become more complex. Therefore, research on composite energy storage technology and its control strategies is of great significance for complementary advantages of different storage devices, meeting diverse demands, improving stability, enhancing power quality, increasing resilience, and reducing system cost. This is important for the construction of intelligent power grids based on new energy sources.

2. Composite Energy Storage System for Photovoltaic Grid-Connected Systems
In modern power systems, the combination of photovoltaic generation and a composite energy storage battery system is playing an increasingly important role, especially in efficiently utilizing renewable energy and balancing power loads. Photovoltaic technology relies on solar cells to convert solar radiation into electricity, and its output is intermittent and fluctuating. Therefore, the integration of an energy storage system is essential. Composite energy storage batteries, including supercapacitors and traditional batteries, can effectively remedy the instability of photovoltaic power generation, thereby enhancing grid reliability and flexibility. Supercapacitors are characterized by fast charge/discharge speed and high power density, making them suitable for rapidly responding to load variations. In a photovoltaic system, supercapacitors can quickly regulate power fluctuations caused by cloud cover or weather changes, ensuring a stable power supply. In addition, because of their long cycle life and good cycling performance, supercapacitors show significant advantages in frequent charge/discharge applications.
On the other hand, batteries, especially lithium-ion batteries, are becoming an important energy storage solution for photovoltaic generation due to their high energy density and gradually decreasing cost. Batteries can store surplus electricity generated during sunny periods and release it when demand peaks or when sunlight is insufficient, participating in grid load regulation. This energy management strategy not only improves the economic efficiency of the photovoltaic system but also promotes the green transformation of the grid. In a photovoltaic-storage-grid integrated system, optimizing control strategies is the key to achieving efficient energy management. The introduction of smart grid technologies allows more flexible interaction between photovoltaic generation and energy storage equipment, enabling real-time monitoring and resource allocation, thus improving overall system effectiveness and stability. In summary, the effective combination of photovoltaic generation and composite energy storage batteries provides fundamental support for renewable energy adoption and for realizing an intelligent and sustainable power grid.
2.1 Structure of the Photovoltaic-Storage-Grid System
Figure 1 (conceptually) illustrates the structure of a photovoltaic-storage-grid system. The photovoltaic power generation unit consists of photovoltaic modules and inverters, which can be distributed into multiple sub-units to improve solar energy collection efficiency and system reliability. The composite energy storage system is composed of supercapacitors and lithium iron phosphate batteries. These are connected to the AC bus through a power conversion system (PCS) to realize bidirectional energy conversion, allowing flexible energy adjustments according to grid operating conditions.
When the grid integrates renewable energy sources such as photovoltaic and wind power, their power generation is random because these units are affected by external factors such as weather. Meanwhile, load power variations within the grid are also random. Therefore, using energy storage units for power adjustment is a key means to achieve balanced output power. By configuring energy storage units with different capacities, the impact of grid operational fluctuations can be reduced. Additionally, with the introduction of energy storage units, energy dispatching can be carried out by considering peak-valley electricity prices, achieving economic benefits. The coordinated control of energy storage units and generation units mainly targets frequency regulation, power fluctuation stabilization, dispatching plan tracking, and peak shaving.
Energy-type storage satisfies the needs of load variation and power quality requirements during grid operation. It requires high safety and reliability, and should be able to restore power supply within a short time. Grid energy throughput depends mainly on energy-type storage, which requires a high energy density. Comparing typical energy storage technologies, I present Table 1 below.
| Storage type | Capacity | Power | Response speed | Efficiency (%) | Cost | Site requirement |
|---|---|---|---|---|---|---|
| Pumped hydro | Large | Large | Slow | High | Low | High |
| Flywheel | Small | Large | Fast | High | Low | Medium |
| Compressed air | Large | Large | Slow | Low | Low | High |
| Supercapacitor | Small | Small | Fast | High | High | Medium |
| Lead-acid battery | Medium | Medium | Medium | High | Medium | Low |
| Lithium-ion battery | Medium | Medium | Medium | High | High | Medium |
| Zinc-bromine flow battery | Medium | Medium | Slow | Medium | High | Low |
| Vanadium redox flow battery | Medium | Medium | Slow | Medium | High | Low |
From the comparison, it is clear that a single storage technology is insufficient. I decided to integrate both power-type and energy-type storage into the grid, so that they complement each other to enhance the overall role of energy storage. Based on the principle of “self-consumption and surplus electricity to the grid,” I choose supercapacitors and lithium iron phosphate batteries as the composite energy storage system. Lithium iron phosphate batteries are mainly for energy storage, with fast charging and discharging capability, and can achieve peak shaving while providing bidirectional DC current control. As shown in Table 2, the cost of lithium iron phosphate batteries is much lower than that of supercapacitors, and their power density, energy density, and response speed complement each other. This combination mainly satisfies the energy storage demand.
| Storage type | Response speed | Response duration | Charge/discharge switching | Main function |
|---|---|---|---|---|
| Supercapacitor | Millisecond level | Seconds to minutes | Can switch frequently | Power regulation |
| Lithium iron phosphate battery | Second level | Minutes to hours | Minimize switching frequency | Power regulation and energy throughput |
2.2 Modeling of the Energy Storage Battery
For the supercapacitor, I use the classical RC model. The simplified equivalent model is shown in Figure (a) below. In the composite energy storage system, the supercapacitor group is formed by connecting individual cells in series and parallel. The equivalent resistance \(R_{\text{sc}}\) and equivalent capacitance \(C_{\text{sc}}\) are calculated as follows:
$$
R_{\text{sc}} = \frac{N_s R_s}{N_p}, \quad C_{\text{sc}} = \frac{N_p C_s}{N_s}
$$
where \(N_s\) and \(N_p\) are the numbers of series and parallel cells, respectively. The terminal voltage of the supercapacitor group is:
$$
V_{\text{sc}}(t) = V_0 – i(t) R_{\text{sc}} – \frac{1}{C_{\text{sc}}} \int_0^t i(\tau) d\tau
$$
The state of charge (SOC) of the supercapacitor is given by:
$$
\text{SOC}_{\text{sc}} = \frac{Q_{\text{remaining}}}{Q_{\text{total}}} = \frac{V^2 – V_{\min}^2}{V_{\max}^2 – V_{\min}^2}
$$
For the lithium iron phosphate battery, I adopt the Thevenin equivalent circuit. The terminal voltage is:
$$
V(t) = V_{\text{OC}}(t) – V_c(t)
$$
where \(V_c(t)\) is the voltage across the RC network. The state of charge of the battery is calculated using the ampere-hour counting method:
$$
\text{SOC}(t) = \text{SOC}(0) – \frac{1}{Q_N} \int_0^t i(\tau) d\tau
$$
where \(Q_N\) is the rated capacity.
3. Source-Load Power Prediction Based on IDBO-BP Neural Network
Accurate power prediction is essential for the reliable operation of a microgrid with high photovoltaic penetration. In this section, I propose a hybrid model that uses an improved dung beetle optimization algorithm (IDBO) to optimize the initial weights and thresholds of a BP neural network. The model is trained on historical data of photovoltaic power and load power, along with meteorological variables such as solar irradiance and temperature.
3.1 BP Neural Network for Power Prediction
The BP neural network is a typical multilayer feedforward network. It consists of an input layer, one or more hidden layers, and an output layer. The forward propagation process calculates the output of each neuron. For the \(j\)-th hidden neuron:
$$
z_j = \sum_{i=1}^{n} \omega_{ij} x_i + b_j
$$
Then the activation output is:
$$
a_j = f(z_j)
$$
where \(f\) is often the logsig function:
$$
f(z) = \frac{1}{1 + e^{-z}}
$$
The output layer produces the final prediction \(y_k\). The error function is the mean squared error (MSE):
$$
E = \frac{1}{2} \sum_{k=1}^{l} (y_k^{\text{pred}} – y_k^{\text{true}})^2
$$
During backpropagation, the weights and thresholds are updated using gradient descent:
$$
\Delta \omega = -\eta \frac{\partial E}{\partial \omega}, \quad \Delta b = -\eta \frac{\partial E}{\partial b}
$$
However, the standard BP algorithm has drawbacks such as slow convergence and susceptibility to local minima. To overcome these, I introduce the IDBO algorithm to optimize the initial parameters of the BP network.
3.2 Improved Dung Beetle Optimization Algorithm
The dung beetle optimization algorithm (DBO) is a novel metaheuristic inspired by the behavior of dung beetles. It has good global search capability but its convergence speed and adaptability to dynamic environments can be improved. I propose three enhancements:
(a) Better initialization: Instead of random initialization, I initialize the population of beetles near the expected maximum power point voltage range \([0.4 U_{\text{oc}}, U_{\text{oc}}]\), where \(U_{\text{oc}}\) is the open-circuit voltage of the photovoltaic array. This speeds up convergence in MPPT applications. Although in my prediction model the initialization ranges are based on the feature space, the same spirit applies.
(b) Levy flight strategy: I incorporate Levy flight into the position update equation to avoid local optima. The Levy flight step size is computed as:
$$
\text{Levy}(\beta) \sim \frac{\mu}{|\nu|^{1/\beta}}
$$
where \(\mu \sim N(0,1)\), \(\nu \sim N(0,1)\), and \(0 < \beta < 2\). The position update becomes:
$$
x_i(t+1) = x_i(t) + c_1 \left( x_i(t) – L_b \right) + c_2 \left( x_i(t) – U_b \right) + \alpha \cdot \text{Levy}(\beta) \cdot r(t)
$$
where \(r(t)\) is a random variable that takes 1 or -1 with equal probability.
(c) Restart mechanism: In dynamic photovoltaic environments, the maximum power point changes with irradiance. I add a restart condition based on the power deviation:
$$
\left| \frac{P_{\text{new}} – P_{\text{old}}}{P_{\text{max}}} \right| \geq \Delta P
$$
where \(\Delta P\) is set to 0.05. If this condition holds, the algorithm reinitializes the population to track the new maximum power point.
In the IDBO-BP model, the IDBO algorithm is used to find the optimal initial weights and thresholds of the BP network. The optimization variables are the connection weights and biases. Once the optimal parameters are found, they are assigned to the BP network, which then performs the final training and prediction. The flowchart of the IDBO-BP model is described in the thesis.
3.3 Prediction Model Structure
For photovoltaic power prediction, the input features are chosen as historical photovoltaic power, irradiance, temperature, and humidity. The output is the future photovoltaic power. The BP network has four input neurons, ten hidden neurons, and one output neuron. Therefore, the number of weights is \(4 \times 10 = 40\), and the number of biases is \(10 + 1 = 11\). Hence, the IDBO algorithm optimizes a total of 51 parameters. The structure is shown in the conceptual diagram.
For load power prediction, similar inputs are used, including historical load, time, temperature, and day type. I train separate IDBO-BP models for photovoltaic power and load power under different weather conditions (sunny and cloudy).
3.4 Evaluation Metrics
I use three evaluation metrics to quantify prediction accuracy:
$$
\text{RMSE} = \sqrt{\frac{1}{m} \sum_{i=1}^{m} (y_i – \hat{y}_i)^2}
$$
$$
\text{MAE} = \frac{1}{m} \sum_{i=1}^{m} |y_i – \hat{y}_i|
$$
$$
R^2 = 1 – \frac{\sum_{i=1}^{n} (y_i – \hat{y}_i)^2}{\sum_{i=1}^{n} (y_i – \bar{y})^2}
$$
where \(y_i\) is the actual value, \(\hat{y}_i\) is the predicted value, and \(\bar{y}\) is the mean of actual values.
3.5 Simulation Results of Power Prediction
I use historical data from a local meteorological station and photovoltaic plant. The dataset is divided into training and test sets. I train a BP network and an IDBO-BP network under both sunny and cloudy conditions. Table 3 compares the prediction performance of the two models.
| Model type | Average prediction error (%) | Maximum prediction error (%) | Minimum prediction error (%) | Standard deviation |
|---|---|---|---|---|
| BP neural network | 5.8 | 12.4 | 2.3 | 1.8 |
| IDBO-BP neural network | 4.4 | 9.7 | 1.4 | 1.2 |
The IDBO-BP model achieves lower average prediction error, lower maximum error, and a smaller standard deviation, indicating higher accuracy and stability. This improvement is attributed to the global optimization capability of the IDBO algorithm, which prevents the BP network from falling into local minima.
4. Grid-Connected Control Strategy of Composite Energy Storage System Based on Power Prediction
To maintain grid power stability, I design a control strategy based on the IDBO-BP power prediction. The strategy dynamically adjusts the output of the composite energy storage system to track the grid dispatching plan. The overall control loop is shown in the thesis. The key idea is to predict the photovoltaic output power and load power over a future period, estimate the net grid energy exchange, and derive the required charging or discharging power of the storage system.
4.1 Power Control Schemes
I consider three approaches for controlling the grid-connected power. The first one is to regulate the photovoltaic array output power by adjusting the operating point. The second is to regulate the inverter output power. The third, which I adopt, is to use the composite energy storage system to absorb or release the power difference. This method allows the photovoltaic array to always operate at its maximum power point while the storage system compensates for the power mismatch.
The composite energy storage system consists of a supercapacitor and a battery. I use a low-pass filter to split the required power adjustment \(\Delta P\) into a high-frequency component and a low-frequency component. The supercapacitor is responsible for the high-frequency part, while the battery handles the low-frequency part. The power split is described by:
$$
P_{\text{SC,ref}} = -\Delta P \cdot \frac{\tau s}{1 + \tau s}
$$
$$
P_{\text{Bat,ref}} = -\Delta P \cdot \frac{1}{1 + \tau s}
$$
where \(\tau\) is the filter time constant, \(s\) is the Laplace variable. This configuration results in frequent but small power changes from the supercapacitor and slow but larger adjustments from the battery.
4.2 Energy Scheduling with SOC Management
I formulate a rolling optimization strategy based on the power prediction. Let \(T_d\) be the daily dispatch period and \(T_h\) be the hourly prediction horizon. The predicted daily grid energy exchange is:
$$
E_{p,d} = \int_{0}^{T_d} \left( P_{\text{PVp}}(t) – P_{\text{Lp}}(t) \right) dt
$$
Similarly, the predicted hourly grid energy exchange is:
$$
E_{p,h} = \int_{0}^{T_h} \left( P_{\text{PVp}}(t) – P_{\text{Lp}}(t) \right) dt
$$
Assuming the grid dispatching power is \(P_s\), the actual required grid energy over a period \(T_h\) is:
$$
E_{S,h} = \int_{0}^{T_h} P_s(t) dt
$$
The energy difference to be compensated by the energy storage system is:
$$
\Delta E_{p,h} = E_{S,h} – E_{p,h} = \int_{0}^{T_h} \left( P_s(t) – P_{\text{PVp}}(t) + P_{\text{Lp}}(t) \right) dt
$$
If \(\Delta E_{p,h} > 0\), the grid needs additional energy, so the storage system should discharge. If \(\Delta E_{p,h} < 0\), the grid has surplus energy, so the storage system should charge. The state of charge (SOC) of the battery and supercapacitor are maintained within appropriate ranges. For the battery, the SOC evolves according to:
$$
\text{SOC}(t+T) = \text{SOC}(t) + \frac{P_{\text{ch}} \eta_c T}{S_n}
$$
in charging mode, and
$$
\text{SOC}(t+T) = \text{SOC}(t) – \frac{P_{\text{dis}} T}{S_n \eta_d}
$$
in discharging mode, where \(S_n\) is the rated capacity, and \(\eta_c\), \(\eta_d\) are the charging and discharging efficiencies, respectively.
4.3 Simulation Parameters
I simulate a photovoltaic microgrid with the parameters listed in Table 4.
| Parameter | Unit | Value |
|---|---|---|
| PV rated power | kW | 200 |
| PV open-circuit voltage | V | 856.6 |
| PV short-circuit current | A | 71.16 |
| Supercapacitor capacitance | F | 40 |
| Supercapacitor equivalent resistance | Ω | 8.9 × 10⁻⁷ |
| Supercapacitor initial voltage | V | 500 |
| Battery rated voltage | V | 500 |
| Battery rated capacity | Ah | 400 |
| Battery equivalent resistance | Ω | 2 × 10⁻⁷ |
| Ambient temperature | ℃ | 25 |
| Battery initial SOC | % | 50 |
4.4 Simulation Results and Discussion
I simulate a 24-hour operation with a dispatch interval of 15 minutes. The PV generation and load curves are taken from a typical campus microgrid on a cloudy day. The results show that the actual grid-connected power \(P_G\) effectively tracks the scheduled power \(P_s\). The supercapacitor handles the high-frequency fluctuations, as seen in its frequent power changes with small amplitude. The battery handles the low-frequency components, with fewer switching actions but larger power magnitudes. The SOC of the supercapacitor returns to approximately 70% at midnight, while the battery SOC remains around 50% throughout the day.
To further demonstrate the effectiveness of the proposed control strategy, I show the photovoltaic output power, load power, and the power exchange of the storage system in Table 5. The table also lists the total harmonic distortion (THD) of the grid-connected current.
| Time | PV output power (kW) | Predicted power (kW) | Battery state (SOC) | Supercapacitor state (SOC) | Grid power (kW) | Current THD (%) |
|---|---|---|---|---|---|---|
| 06:00 | 1.2 | 1.4 | Discharge | Charge | 1.4 | 2.5 |
| 08:00 | 1.8 | 2.0 | Charge | Discharge | 2.0 | 1.8 |
| 10:00 | 3.5 | 3.7 | Charge | Discharge | 3.7 | 1.2 |
| 12:00 | 5.5 | 5.7 | Charge | Discharge | 5.7 | 0.9 |
| 14:00 | 7.3 | 7.5 | Charge | Discharge | 7.5 | 1.1 |
| 16:00 | 5.2 | 5.4 | Discharge | Charge | 5.4 | 1.7 |
| 18:00 | 3.4 | 3.6 | Discharge | Charge | 3.6 | 2.3 |
From the table, I see that the predicted power closely matches the actual PV output power. The battery and supercapacitor operate as intended: when the PV output is low, the battery discharges; when the PV output is high, the battery charges. The supercapacitor quickly responds to sudden changes, effectively smoothing the power fluctuations. The grid-connected power remains stable and consistent with the predicted power, confirming that the control strategy successfully achieves the objective of tracking the dispatch schedule. The current THD is below 3% in all time slots, demonstrating improved power quality.
4.5 Comparison between Sunny and Cloudy Conditions
I also perform simulations under sunny conditions. Although the absolute PV output power is higher on sunny days, the power fluctuation spectrum is similar to that of cloudy days. The composite energy storage system exhibits analogous behavior in both weather conditions, validating the general applicability of the proposed control strategy. The IDBO-BP prediction model maintains high accuracy under both sunny and cloudy conditions, with the predicted photovoltaic power closely tracking the actual curve.
5. Conclusion and Future Work
In this thesis, I have developed a comprehensive approach for the grid-connected control of a photovoltaic microgrid with a composite energy storage system. The main contributions are as follows:
(1) I proposed an improved dung beetle optimization algorithm (IDBO) to optimize the parameters of a BP neural network for source-load power prediction. The IDBO-BP model significantly improves prediction accuracy and stability compared to the standard BP model, as demonstrated by the lower average error and smaller standard deviation.
(2) I designed a composite energy storage system based on supercapacitors and lithium iron phosphate batteries. The complementary characteristics of these two storage technologies allow efficient handling of both high-frequency power fluctuations and low-frequency energy throughput.
(3) I proposed a grid-connected control strategy that utilizes the predicted power to schedule the charging and discharging of the composite energy storage system. The strategy enables the microgrid to track the grid dispatching plan while maintaining an appropriate SOC of both storage devices.
(4) Through extensive simulations under sunny and cloudy conditions, I verified that the proposed control strategy effectively stabilizes the grid-connected power, reduces current harmonics, and improves overall power quality.
Although the results are encouraging, there are still several limitations and future directions. The prediction accuracy of the IDBO-BP model can be further improved by incorporating more advanced deep learning techniques, such as long short-term memory networks or attention mechanisms. In addition, the control strategy could be extended to consider multiple microgrid clusters and coordinated operation with other flexible resources such as electric vehicles. Moreover, the uncertainty of weather forecasts can be accounted for by using probabilistic forecasting methods and robust optimization approaches. Future research will focus on these topics to further enhance the reliability and economy of photovoltaic microgrids with composite energy storage systems.
