Skip to main content

Modeling method of photovoltaic power generation grid connection based on particle swarm optimization neural network

Abstract

Aiming at the complex structure, numerous equipment, intricate control and protection logic, as well as the existence of numerous unmodeled dynamics and black-box device models in photovoltaic (PV) grid-connected systems, a modeling method based on Particle Swarm Optimization Neural Network (PSO-NN) is proposed to address the inability of pure mechanism models to accurately simulate their operational dynamics. Utilizing the differences in active power response waveforms under Voltage-Frequency (Vf) control, Power-Reactive Power (PQ) control, and Droop control as criteria for control strategy identification, a PSO-NN model is constructed for PV grid-connected systems, with inputs comprising temperature, humidity, light intensity, voltage, and frequency disturbances, and outputs being active and reactive power. To validate the model's effectiveness, a PV grid-connected system model is built in a self-developed simulation software and connected to an IEEE 14-bus distribution network for simulation verification. The results demonstrate that the proposed PV grid-connected model can effectively identify the types of Vf control, PQ control, and Droop control strategies, and accurately reflect the dynamic response characteristics of active and reactive power under various voltage and frequency disturbances.

Introduction

The power system is undergoing a transformation towards a complex network dominated by renewable energy sources and featuring large-scale AC-DC interconnection (Sun et al. 2013). The increasing proportion of power electronic equipment and the interaction among multiple control loops have led to the emergence of multimodal oscillations. The acquisition of transient performance is crucial for system operation monitoring and theoretical research. Electromagnetic transient simulation is an effective tool for obtaining transient characteristics of power systems. However, with the growing significance of Ultra-High Voltage (UHV) grids in China's power transmission and the continuous expansion of power systems (Yang et al. 2017; Zhang et al. 2018; Liu et al. 2018; Senapati et al. 2023), the efficiency of traditional electromagnetic transient simulation methods has become insufficient to meet the demands of theoretical research (Fan et al. 2017; Senapati and Sarangi 2021), fault analysis (Yang et al. 2013), operation control (Kang et al. 2017), and closed-loop experiments (Tian et al. 2010) in power systems.

Constructing the novel power system is a vital path towards achieving China’s “30·60 Carbon Peak and Neutrality” strategic objectives (Xin 2021). Driven by energy structure transformation, optimized resource allocation, and power technology innovation, large-scale renewable energy sources and power electronics will be integrated into the grid, and cross-regional power transmission will further develop, ultimately transforming the power system into a novel system (Shu et al. 2021). In comparison to conventional power systems, the novel power system demonstrates notable alterations in scale, physical form, and operational characteristics. Microsecond-level power electronic switching processes interact with millisecond- to second-level transition processes of AC motors, leading to increased complexity, nonlinearity, and uncertainty, posing new challenges for power system analysis.

Currently, there are no analytical methods that can accurately assess the security and stability levels of large-scale power systems. The characterization and dispatch control of power systems are highly dependent on digital time-domain simulation tools. For new-type power systems, the dynamic processes of renewable energy sources and DC transmission systems are influenced by the switching processes of power electronic devices and rapid control protection logic. The transient processes cover a time range from microseconds to seconds, which are difficult to accurately depict using traditional electromechanical transient simulation or electromechanical-electromagnetic hybrid simulation. Full electromagnetic transient modeling and simulation must be employed. However, existing power system electromagnetic transient modeling and simulation software cannot satisfy the simulation analysis demands of the new-type power systems. There is a pressing necessity to elucidate the evolutionary trends of power systems and electromagnetic transient simulation tools, and to devise electromagnetic transient simulation and analysis techniques specifically suited for innovative power systems (Dong et al. 2021).

Current domestic research on distributed PV grid-connected system modeling can generally be categorized into two groups. The initial category focuses on optimizing the structure of distributed PV system models from a mechanistic perspective to enhance their descriptive capabilities. Literature (Huang et al. 2010) provides a detailed introduction to the static and transient mathematical models of distributed generation systems, including solar PV systems, energy storage units, PWM converters, and three types of wind power generation units. Literature (Qian et al. 2011) equates the photovoltaic power generation system to a voltage source and adopts a constant power control voltage source to simulate the photovoltaic power generation system, facilitating load modeling for the power system. This model has good descriptive ability for the system's static response but does not fit the dynamic response of the model ideally. Literature (Enshasy et al. 2019) establishes a transfer function equivalent model of a photovoltaic power generation system based on constant power factor control, equating the photovoltaic power generation system to a second-order underdamped system. The model structure is simple, with few parameters and good dynamic response, but it does not consider the impact of different inverter control strategies on the photovoltaic equivalent model (Li et al. 2016).

The second category employs state equations or neural networks to characterize the static and dynamic behaviors of distributed PV systems from a non-mechanistic perspective. Literature (Bakeer and Magdy 2022) proposes a PV equivalent model considering the frequency dynamic behavior based on the Radial Basis Function (RBF) neural network, with inputs including humidity, temperature, light level, and frequency deviation, to obtain the nonlinear output power dynamic behavior of PV systems. However, the model does not consider voltage dynamic behavior. Literature (Zheng et al. 2020) considers the problem of inverter capacity constraints and proposes applying the idea of piecewise function fitting to the training of artificial neural network models for loads with distributed photovoltaic systems. This enhances the model's ability to analyze voltage dynamic behavior, but the nonlinear error caused by piecewise function fitting is still too large. Literature (Zou et al. 2018; He et al. 2011) selects the main influencing factors obtained through overall measurement and identification as input variables to establish a load forecasting model based on the radial basis function neural network, effectively improving load forecasting accuracy. However, the model only considers the minute-level time scale and ignores the dynamic response of the photovoltaic system at the second-level time scale.

Non-mechanistic models are not restricted by model components and characteristics, giving them an advantage in PV grid-connected system modeling (Khalaf 2020; Xue et al. 2022; Wang et al. 2012). Nevertheless, current PV grid-connected models for generalized load modeling still face the following issues.

  1. 1.

    Load modeling techniques for PV systems often overlook frequency dynamic responses. With a high proportion of renewable energy sources integrated into distribution networks and the increasing electrification of distributed generation, the system inertia is significantly reduced, leading to insufficient frequency stability and severe frequency deviations during faults or under special impact loads.

  2. 2.

    Current PV grid-connected models can only equivalently simulate PV grid-connected systems under a single control strategy. However, distributed PV systems employ multiple control strategies for inverters to fulfill various functions such as support and regulation in distribution networks.

Addressing the above two issues, this paper proposes an adaptive equivalent modeling method for PV grid-connected systems based on the PSO-NN. This method adaptively identifies the control strategies of PV grid-connected systems based on waveform characteristics and establishes a PSO-NN model with inputs of temperature, humidity, light intensity, voltage, and frequency, and outputs of active and reactive power. It can effectively simulate the voltage and frequency dynamic responses of PV grid-connected systems, enhancing the accuracy of equivalent models.

Prepare your paper before styling

Topology of PV grid-connected systems

PV grid-connected systems primarily comprise PV arrays, Boost boosters, three-phase voltage source inverters, LCL filters, and power grids (Wang et al. 2023). The LCL filter incorporates an additional filtering capacitor and inductor, forming a third-order low-pass filter. Compared to the traditional L filter, the LCL filter is more effective in filtering out high-frequency harmonics from the inverter output. Its notable advantages in high-frequency harmonic suppression and power quality improvement are crucial for enhancing the power quality of photovoltaic (PV) grid-connected systems. Therefore, LCL filters are commonly used in PV grid-connected systems. The typical topology of PV grid-connected systems is illustrated in Fig. 1.

Fig. 1
figure 1

Topology of PV grid-connected system

As the core equipment in photovoltaic (PV) power generation systems, the control strategy of PV inverters is crucial to the stability and efficiency of the system. Voltage and frequency setpoint control, active and reactive power setpoint control, and droop control are commonly used control strategies in PV inverters, each with unique advantages and application scenarios (Men et al. 2024).

Voltage and frequency setpoint control can be flexibly adjusted according to different application scenarios and requirements, such as adapting to voltage and frequency standards in different regions or responding to sudden grid conditions.

Active and reactive power setpoint control ensures that the inverter can output according to the set active and reactive power even when the irradiance changes, thereby maintaining system stability. When operating in grid-connected mode, the PV power generation system needs to meet specific requirements for active and reactive power set by the grid. Active and reactive power setpoint control ensures that the inverter meets these requirements and achieves friendly interaction with the grid.

Droop control simulates the droop characteristics of synchronous generators in traditional power systems, enabling inverters to automatically distribute active and reactive power like synchronous generators when operating in parallel. Droop control does not require interconnection signal lines between power sources and can achieve parallel operation by only collecting output information from each inverter. This decentralized control method improves system redundancy and reliability, reducing dependence on a single module.

In the control strategies of PV inverters, the integrated application of these control methods can ensure the stability, economy, and reliability of the PV power generation system, meeting the grid's requirements for power quality. Therefore, identifying and discriminating these three most typical control strategies as control strategies for PV grid-connected systems is highly representative and practically significant. At the same time, this method can also serve as a reference for modeling other grid system control strategies based on neural networks.

Voltage-frequency (Vf) control

Vf control is a strategy that directly maintains constant output voltage and frequency (as shown in Fig. 2), while the active and reactive power outputs of the inverter depend on load conditions. Vf control is typically employed for master power sources in master–slave controlled distribution networks, where high-power PV systems with energy storage systems are used to support voltage and frequency.

Fig. 2
figure 2

Typical Vf control structure of PV inverters

Power-reactive power (PQ) control

PQ control is commonly used for slave power sources in master–slave controlled distribution networks, requiring the grid to maintain voltage stability, and is suitable for smaller distributed PV systems, (as shown in Fig. 3) (Xue et al. 2022).

Fig. 3
figure 3

Typical PQ control structure of PV inverters

PQ control primarily adopts current source control, calculating the inductor current command values based on the given active and reactive power values, and then performing current closed-loop control using these command values.

Droop control

Droop control emulates the external droop characteristics of synchronous generators to regulate inverters, enabling them to independently support voltage and frequency or operate in conjunction with other droop-controlled inverter units. This control strategy replicates the natural behavior observed under inductive line impedance, where active power and frequency, as well as reactive power and voltage, exhibit a droop characteristic. Consequently, as the inverter's active and reactive power outputs vary, its output frequency and voltage adjust accordingly, adhering to the droop characteristic curve (as shown in Fig. 4) (Gao et al. 2023).

Fig. 4
figure 4

Typical droop control structure of PV inverters

PV grid-connected system model based on particle swarm optimization neural network

Criteria for identifying control strategies of PV grid-connected systems

Due to their varying capacities and roles (such as support, supplementation, and equivalent damping) in distribution networks, PV grid-connected systems employ three primary control strategies (Vf control, PQ control, Droop control), leading to significant differences in their dynamic responses. This section identifies the control mode based on the distinct response characteristics of active power after voltage variations (Qu et al. 2020; Ma et al. 2021). The response types for the three control strategies are overdamped oscillation, underdamped oscillation, and high-order oscillation, corresponding to Vf control, PQ control, and Droop control, respectively. The power response curves are shown in Fig. 5. As Fig. 5 indicates, different control strategies result in unique response waveform characteristics for output power, as summarized in Table 1. After a voltage drop, the active power output of Vf-controlled PV grid-connected systems decreases and gradually recovers to maximum power, resembling an overdamped oscillation. PQ-controlled systems exhibit fluctuations at maximum power after a voltage drop, akin to an underdamped oscillation. In contrast, Droop-controlled systems gradually increase their output power with minor oscillations after a voltage drop, resembling a high-order oscillation response.

Fig. 5
figure 5

Active power response curves under three control methods

Table 1 Power response of PV grid-connected systems under three control strategies

Based on the differences in active power response waveforms under different control strategies, criteria for identifying the control strategies of PV grid-connected systems are established (Ji et al. 2022). This section employs the five-point derivative method to calculate the time derivative of power data and determine the change state of the response curve based on the sign relationship of the derivative. The derivative formula is shown in Eq. (1).

$$\begin{array}{c}\frac{dP\left(t\right)}{dt}=\frac{P\left(t-2T\right)-8P\left(t-T\right)+8P\left(t+T\right)-P\left(t+2T\right)}{12T}\\ +O\left({T}^{4}\right)\#\end{array}$$
(1)

where T is the data step size (T = 0.001 s), and O(T4) represents a higher-order infinitesimal, generally taken as 0.

The minimum active power Pmin occurs at time tmin, and the maximum active power Pmax occurs at time tmax. When t > tmin, if Eq. (2) is satisfied, indicating that active power continuously rises to a stable value after reaching the minimum, this identifies the system as employing Vf control. If not satisfied, Vf control is excluded, and subsequent calculations proceed. When t > tmin and Eq. (3) is satisfied, indicating that active power monotonically rises to the maximum without oscillations, this identifies the system as employing PQ control. If not satisfied, the system is identified as using Droop control (Wang et al. 2019; Sheng et al. 2022).

$$\begin{array}{c}\frac{dP\left(t\right)}{dt}>0\#\end{array}$$
(2)

Equivalent model for voltage-frequency responses of PV grid-connected systems

The essence of PV grid-connected systems is to establish the transfer relationship between external influencing factors and output power. The PSO-BPNN (Particle Swarm Optimization-Backpropagation Neural Network) algorithm exhibits excellent stability and convergence properties (Wang et al. 2024a, b). PSO-BPNN can learn and represent the nonlinear mapping relationship between inputs and outputs without requiring a predefined mathematical equation describing this relationship. Therefore, using particle swarm neural networks to simulate the mapping relationship of matrices and applying the method based on the equivalent model of particle swarm neural networks to photovoltaic grid connected systems can improve measurement accuracy. To more clearly illustrate the relationship between external influencing factors and output power of PV grid-connected systems, let X represent the system influencing factor vector Eq. (3), and Y represent the output power vector Eq. (4).

$$ {\text{X}} = \left( {{\text{H}},\,{\text{T}},\,{\text{IR}},\,{\text{U}},\,\Delta {\text{f}}} \right)^{T} $$
(3)

where H represents ambient humidity, T represents ambient temperature, IR represents ambient irradiance, U represents input voltage, and Δf represents frequency deviation. Pout and Qout represent the system's active and reactive power outputs, respectively.

$$\begin{array}{c}Y={\left({P}_{out},{Q}_{out}\right)}^{T}\#\end{array}$$
(4)

The coefficient matrix K is represented by Eq. (5), where kij denotes the coefficient in the ith row and jth column.

$$\begin{array}{c}K=\left[\begin{array}{ccccc}{k}_{11}& {k}_{12}& {k}_{13}& {k}_{14}& {k}_{15}\\ {k}_{21}& {k}_{22}& {k}_{23}& {k}_{24}& {k}_{25}\end{array}\right]\#\end{array}$$
(5)

Equation (6) and (7) can be derived from Eq. (3), (4), and (5).

$$\begin{array}{c}Y=KX\#\end{array}$$
(6)
$$ \left[ {\begin{array}{*{20}c} {P_{out} } \\ {Q_{out} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {k_{11} } & {k_{12} } & {k_{13} } & {k_{14} } & {k_{15} } \\ {k_{21} } & {k_{22} } & {k_{23} } & {k_{24} } & {k_{25} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} H \\ T \\ {IR} \\ U \\ {{\Delta f}} \\ \end{array} } \right] $$
(7)

Using the Particle Swarm Optimization (PSO) based neural network to simulate the mapping relationship in the K matrix and applying the PSO-based photovoltaic (PV) network response model to PV grid integration can accurately characterize the corresponding active and reactive power of the system, reducing measurement errors.

Robustness is crucial for the stable operation and efficient performance of dynamic systems (Ma et al. 2021). PV systems are significantly influenced by environmental factors such as weather and temperature, including changes in irradiance and temperature fluctuations. A robust PV grid-connected system can maintain stable power generation performance and grid-connection quality under these varying external conditions.

Therefore, the PSO-based neural network structure for the PV grid-connected system constructed in this paper is shown in Fig. 6. The model includes one input layer, three hidden layers, and one output layer. The input layer receives a five-dimensional measurement feature vector, which includes humidity (H), temperature (T), irradiance (IR), voltage (U), and frequency deviation (Δf). The output layer outputs a two-dimensional feature vector, which represents the actual output active power (Pout) and reactive power (Qout) of the PV inverter. To enhance the model's data processing capability and expressive power, the hidden layers are designed with a three-layer structure, and the number of neurons in each hidden layer is set to 25, 25, and 10, respectively. The multiple network layers and the increased number of neurons improve the nonlinear fitting ability and generalization ability of the neural network, thereby enhancing the robustness of the model.

Fig. 6
figure 6

Structural diagram of decoupling model of particle swarm neural network

During the forward propagation process, σ_1(x) serves as the activation function for the hidden layer. Through experimental comparisons of the performance of activation functions such as Sigmoid, Tanh, and ReLU, the ReLU (Rectified Linear Unit) function is selected as the activation function for the hidden layer due to its computational efficiency and effectiveness in mitigating the vanishing gradient problem. The nonlinear characteristics of the ReLU function enable the model to better adapt to fluctuations in environmental factors (such as temperature, humidity, light intensity, etc.), thereby enhancing the robustness of the model (Ji et al. 2022).

In practical applications, data preprocessing is crucial to ensuring model stability and accuracy. Normalization techniques are applied to the input data to eliminate the influence of dimensions, and L1 regularization techniques are used to prevent model overfitting. These measures help improve the model's generalization ability under unknown or extreme input conditions, further enhancing its robustness.

In this paper, the decision variables are primarily manifested in the adjustment of neural network weights through the Particle Swarm Optimization (PSO) algorithm. Specifically, the decision variables include the weights and biases of each layer of the neural network.

The objective of the optimization is to reduce the prediction error of the neural network, which is achieved by minimizing the difference between the actual output and the desired output. Mean Squared Error (MSE) is adopted as the objective function since it effectively reflects the accuracy of the predictions. The expression for the objective function is given by Eq. (8).

$$\begin{array}{c}f\left(u\right)=\frac{1}{n}{{\sum }_{i=1}^{n}\left({\widehat{u}}_{i}-{u}_{i}\right)}^{2}\#\end{array}$$
(8)
$$\begin{array}{c}\left\{\begin{array}{c}{u}_{id}^{t+1}=\omega {u}_{id}^{t}+{c}_{1}{r}_{1}\left({p}_{ad}-{u}_{id}^{t}\right)+{c}_{2}{r}_{2}\left({G}_{best}-{u}_{id}^{t}\right)\\ {p}_{ad}=\frac{1}{m}{\sum }_{i=1}^{m}{P}_{{best}_{id}}\end{array}\right.\#\end{array}$$
(9)
$$\begin{array}{c}{\omega =\mu }_{min}+\left({{\mu }_{max}-\mu }_{min}\right)\cdot rand()+\sigma \cdot rand()\#\end{array}$$
(10)

To address the issue of standard PSO algorithms not considering the interactions among particles, an improved PSO algorithm is applied, as shown in Eq. (8). The inertia weight ω is set as a random number following a certain distribution to enhance the algorithm's global search performance and avoid local optima, speeding up convergence. The inertia weight formula is given in Eq. (9).

$$\begin{array}{c}\left\{\begin{array}{c}{c}_{1}={c}_{1ini}-\left({c}_{1ini}-{c}_{1fin}\right)\left(\frac{t}{{T}_{max}}\right)\\ {c}_{2}={c}_{2ini}-\left({c}_{2ini}-{c}_{2fin}\right)\left(\frac{t}{{T}_{max}}\right)\end{array}\right.\#\end{array}$$
(11)

The cognitive and social factors c1 and c2 in Eq. (11) vary according to Eqs. (9) and (10), where c1_init, c1_end, c2_init, and c2_end represent the initial and final values of c1 and c2, respectively, t is the current iteration number, and Tmax is the maximum iteration number.

During the data optimization process, the following constraints are set in this paper:

  1. 1.

    Range of weights and biases: To prevent numerical instability caused by excessively large weights and biases, their values are constrained to vary within the interval [− 10, 10].

  2. 2.

    Range of neural network outputs: The active power Pout and reactive power Qout are constrained to be lower than the maximum rated power of the system.

  3. 3.

    Constraints on network structure: In this system, the network structure is fixed as an input layer—three hidden layers—an output layer, with the number of neurons in each hidden layer being 25, 25, and 10, respectively. These parameters remain unchanged during the optimization process.

The PSO-BPNN model enhances its ability to handle complex nonlinear mappings through a multilayer neural network structure, thereby improving model stability. The use of the ReLU activation function and the multilayer design further enhance the robustness of the model. With diversified inputs, the model adapts to various environmental changes and exhibits strong robustness. By setting constraints on weights and biases and limiting output power, the model avoids numerical instability and abnormal outputs. The adoption of an improved PSO algorithm for optimizing neural network weights, with dynamic adjustment of parameters to enhance global search capabilities and avoid local optima, facilitates rapid convergence of the algorithm. Using MSE as the objective function guides the algorithm to reduce prediction errors and gradually approach the optimal solution, proving that the algorithm possesses convergence and stability.

Simulation cases

Self-descriptive capability of the equivalent model for PV grid-connected systems

To verify the effectiveness of the proposed modeling method, the voltage drop range is established at 0–0.4 p.u., and the frequency deviation range is set to 0–0.5 Hz within the simulation model of the PV grid-connected system. The active and reactive power response data of inverters are collected across various fault levels. This sampled data is utilized to train the BP neural network model, with 2/3 of the total dataset allocated for training to update network weights and biases, and the remaining 1/3 serving as test data to evaluate the trained network's performance. The neural network iteration limit is set to 1000, the learning rate is 0.01, the number of particles is 6, position limits are (– 1000, 1000), velocity limits are (– 3, 3), particle dimensionality is 60, momentum learning rate is 0.03, and the target error sum and convergence criterion precision are set to 0.002. The proposed modeling method is benchmarked against the active power source parallel second-order circuit equivalent model (hereinafter referred to as the “mechanistic model”) using evaluation metrics such as root mean square error (RMSE), mean squared error (MSE), and mean absolute error (MAE), as shown in Eqs. (1214), to assess the accuracy of the model.

$$\begin{array}{c}{R}_{MSE}=\sqrt{\frac{1}{j}\sum_{i=1}^{j}{\left({T}_{i}-{O}_{i}\right)}^{2}}\#\end{array}$$
(12)
$$\begin{array}{c}{M}_{SE}=\frac{1}{j}\sum_{i=1}^{j}{\left({T}_{i}-{O}_{i}\right)}^{2}\#\end{array}$$
(13)
$$\begin{array}{c}{M}_{AE}=\frac{1}{j}\sum_{i=1}^{j}\left|{T}_{i}-{O}_{i}\right|\#\end{array}$$
(14)

As shown in Fig. 7, both the proposed model and the mechanistic equivalent model simulate active power well under voltage disturbances, approaching measured values (Ji et al. 2022). The average absolute errors for different methods are illustrated in Fig. 8.

Fig. 7
figure 7

Simulation results of model power when voltage drops by 25% under Vf control

Fig. 8
figure 8

Mean absolute error of active power

At a 15% voltage drop, the average absolute error of active power for the mechanistic model is 1.9 × 10−3 p.u., while that of the proposed method is 8.5 × 10−4 p.u.. The average errors of the proposed model under four operating conditions are lower than those of the mechanistic model. Since the mechanistic model only considers the relationship between voltage and active power under power frequency conditions, neglecting reactive power variations, it exhibits significant errors in reactive power simulation, as shown in Fig. 7b. In contrast, the average absolute error of reactive power for the proposed model is 8.96 × 10−4 p.u.

Since the mechanism model identifies model parameters based on the power response curve of 15% voltage drop, the errors of the identified model parameters will increase when faced with other voltage drop conditions, which is one of the inherent defects of the mechanism model. Compared with the mechanism model of the second-order circuit equivalent model of active power source, the proposed model can better adapt to different degrees of voltage disturbance and accurately reflect the frequency response of the grid-connected system.

Simulation of IEEE 14-node distribution network

This section establishes a simulation test system for a 10 kV IEEE 14-node distribution network, in which 4 PV systems under Vf control, 5 PV systems under PQ control, and 5 PV systems under Droop control are connected, respectively. Real-time simulation of photovoltaic grid-connected system using dSPACE (Ding et al. 2015). The connection positions are shown in Fig. 9. The simulation time is set to 3 s, with employing a simulation time step of 1 μs and a sampling frequency of 1 × 106 Hz. The illumination intensity is constant at 1000 kW/m2, the temperature is maintained at 25 °C, and the humidity is kept at 35%. The rated capacity of PV and load parameters are detailed in Tables 2 and 3. In this section, the neural network model under Vf control is compared with the adaptive equivalent model proposed in this paper to verify the strong adaptability of the proposed equivalent model to different control strategies.

Fig. 9
figure 9

Topology of IEEE14 node system connected to PV

Table 2 Load parameter
Table 3 Parameters of photovoltaic grid-connected system

Simulation results under different voltage disturbances

A three-phase short-circuit fault of varying degrees is set at load bus node 2, causing the bus voltage to drop between 10 and 40%. The fault occurs at 1 s and lasts for 1 s. Under these disturbances, the per-unit values of the active and reactive power output at the grid-connected points of PV1, PV3, and PV9 are measured as the measured values of the power of the PV grid-connected system during the disturbance.

Figure 10 shows the response of the active and reactive power of the PV system under Droop control and PQ control when the voltage drops by 18%.

Fig. 10
figure 10

Response of PV power to voltage disturbance under different control methods

As can be seen from Fig. 10, compared to the neural network model with single Vf control, the modeling method proposed in this paper can adaptively determine the type of control strategy, obtain power output results under different control strategies, and the overall trend of the curve is very close to the measured values. According to the curve, the modeling method in this paper can meet the requirements of real-time accurate simulation.

The output power errors under different voltage disturbances for the two models are shown in Tables 4 and 5. As the voltage drop increases, the average absolute error of the output power of the photovoltaic model gradually becomes larger. After comparison, the performance of PSO-BPNN is far better than that of a single algorithm with lower error. However, its average absolute error is below 0.03 p.u., its root mean square error is below 0.05 p.u., and its mean square error is below 0.003 p.u., which are numerically much lower than those of the mechanism modeling method at the integer level.

Table 4 Output power error of a single photovoltaic model under different voltage disturbances
Table 5 Output power error of PSO-BPNN photovoltaic model under different voltage disturbances

Simulation results under different frequency disturbances

Frequency fluctuations induced by the uncertainty of new energy grid-connected output in the distribution network system are simulated at node 1 in Fig. 9, resulting in the system frequency fluctuating within the range of − 0.6 to − 0.2 Hz. The frequency drops at 1 s and recovers back to 50 Hz at 2 s. Figure 11 depicts the response of the active and reactive power of the PV system under Droop control and PQ control when the frequency decreases by 0.5 Hz. As evident from Fig. 11, during a frequency disturbance, the power output of the PV system exhibits significant fluctuations, thereby affecting the power balance of the system. Consequently, it is crucial to consider the frequency input of the PV system during modeling.

Fig. 11
figure 11

Response of PV power to frequency disturbance under different control methods

To numerically compare the modeling effectiveness, the effect of photovoltaic equivalent modeling achieved by a single method is shown in Table 6. And the average absolute error, root mean square error, and mean square error of the photovoltaic equivalent modeling achieved using the method proposed in this paper are calculated and presented in Table 7. After comparison, the performance of PSO-BPNN is far better than that of a single algorithm with lower error. It can be observed that the reactive power exhibits a larger variation compared to the active power, yet the modeling approach yields smaller errors for reactive power than for active power. Specifically, the average absolute error is below 0.05 p.u., the root mean square error is below 0.05 p.u., and the mean square error is below 0.002 p.u., which are numerically much lower than those of the mechanism modeling method at the integer level.

Table 6 Output power error of a single photovoltaic model under different frequency disturbances
Table 7 Output power error of PSO-BPNN photovoltaic model under different frequency disturbances

Simulation results under disturbance verification

To comprehensively evaluate the robustness and accuracy of the proposed Particle Swarm Optimization-Neural Network (PSO-BPNN) model in complex environments, this paper simulates the changing environmental conditions that may be encountered in actual photovoltaic (PV) systems through the following disturbance validation experiments, including fluctuations in temperature, humidity, and irradiance, to test the model's predictive capabilities.

Under standard environmental conditions (temperature of 25 °C, humidity of 35%, and irradiance of 1000 kW/m2), single-variable disturbance tests were conducted for temperature, humidity, and irradiance, respectively.

  1. 1.

    Temperature disturbance

With humidity and irradiance held constant, the temperature was adjusted from the baseline of 25 °C to 40 °C, and the changes in active power and reactive power output by the model are shown in Fig. 12.

  1. 2.

    Humidity disturbance

Fig. 12
figure 12

PV power response under temperature disturbance with different control methods

With temperature and irradiance held constant, the humidity was adjusted from the baseline of 35% to 60%, and the changes in active power and reactive power output by the model are shown in Fig. 13.

  1. 3.

    Irradiance disturbance

Fig. 13
figure 13

Photovoltaic power response to humidity interference under different control modes

With temperature and humidity held constant, the irradiance was adjusted from the baseline of 1000 kW/m2 to 1500 kW/m2, and the changes in active power and reactive power output by the model are shown in Fig. 14.

Fig. 14
figure 14

Photovoltaic power response to light intensity interference under different control modes

Through interference verification experiments, the system is still able to accurately predict the active and reactive power output of the photovoltaic system when facing significant changes in temperature, humidity, and light intensity. According to Figs. 1114, the overall trend of the PSO-BPNN curve is very close to the measured values. Table 8 presents the output power errors of photovoltaic models under different disturbance conditions. The output deviation of the model is within an acceptable range and remains relatively stable with fluctuations in environmental parameters, demonstrating the strong robustness and adaptability of the model.

Table 8 Output power error of the photovoltaic model under interference verification

Conclusion

This paper considers the adaptability of photovoltaic grid-connected models under different control strategies and their dynamic responses to frequency variations, proposing an adaptive equivalent modeling method for photovoltaic systems based on PSO-BPNN.

  1. 1.

    Compared to a single control model, the model presented in this paper can accurately capture the dynamic responses under different control strategies, including Voltage-Frequency (Vf), Power-Reactive Power (PQ), and Droop control strategies.

  2. 2.

    A PSO-NN model for the photovoltaic grid-connected system is constructed, with temperature, humidity, light intensity, voltage, and frequency disturbances as inputs, and active power and reactive power as outputs.

  3. 3.

    Compared to the mechanistic model (Qu et al. 2020), the model designed in this paper can adapt to different voltage and frequency disturbances, with a 50% reduction in the mean absolute error of active power compared to the mechanistic model.

Although the PSO-BPNN model has shown good performance in simulation and theoretical analysis, there are still some limitations and challenges in practical applications. Firstly, the accuracy of the model highly depends on the quality and quantity of training data. If the training data is insufficient or biased, it will directly affect the prediction accuracy of the model. Secondly, although the model has shown good robustness in the simulation environment, in actual power systems, various unforeseen situations and uncertain factors (such as equipment failures, extreme weather, etc.) may lead to deviations in model predictions. Additionally, the model has high computational complexity, which may result in computational delays for power system control tasks with extremely high real-time requirements.

In future research, we will focus on modifying data preprocessing and introducing adversarial samples to enhance system robustness. Specifically, the experiments will select representative grid-connected photovoltaic systems for on-site testing, install data acquisition systems to record actual operational data, and conduct comparative analyses with model prediction results. Furthermore, long-term real-time validations will be carried out under different climatic conditions (such as extreme weather and seasonal changes) to comprehensively evaluate the robustness and reliability of the model. These experimental and validation efforts will not only contribute to enhancing the practicality of the model but also provide strong support for the stable operation of grid-connected photovoltaic systems. This study has clarified the direction for our next efforts and represents a meaningful learning experience.

Availability of data and materials

The datasets generated or analyzed during this study are available from the corresponding author on reasonable request.

References

  • Bakeer A, Magdy G (2022) A sophisticated modeling approach for photovoltaic systems in load frequency control. Electr Power Energy Syst 134:107330

    Article  Google Scholar 

  • Ding HC, Yang XB, Qian JH et al (2015) Real-time simulation of photovoltaic grid-connected system based on dSPACE. Shaanxi Electr Power 43(12):21–26

    Google Scholar 

  • Dong XT, Feng CY, Zhu ZM, et al. (2021) Preliminary study on simulation tool for new power systems dominated by renewable energy. Autom Electr Power Syst

  • Enshasy H, Abu Al-Haija Q, Al-Amri H et al (2019) A schematic design of HHO cell as green energy storage. Acta Electr Malays 3(2):09–15

    Article  Google Scholar 

  • Fan XK, Wang YT, Zhang BH (2017) Fast electromagnetic transient simulation for flexible DC power grid. Autom Electr Power Syst 41(4):92–97

    Google Scholar 

  • Gao HS, Zhang F, Ding L (2023) Two stage droop frequency regulation control strategy and parameter tuning method for wind turbines. Power Syst Autom 47(18):111–121

    Google Scholar 

  • He RM, Ye J, Xu H et al (2011) Measurement-based load modeling considering frequency characteristics. Trans China Electr Soc 26(5):165–170

    Google Scholar 

  • Huang HQ, Mao CX, Wang D et al (2010) Modeling summarizing of distributed renewable energy power generation system. Proc CSU EPSA. 22(5):14–18

    Google Scholar 

  • Ji S, Du T, Deng S et al (2022) Robustness certification research on deep learning models: a survey. Chin J Comp 45(01):190–206

    Google Scholar 

  • Kang Y, Lu SQ, Chen LY et al (2017) A reduction method of large power systems for electromagnetic transient simulation and its application in China southern grid. Electr Power Constr 38(1):31–38

    Google Scholar 

  • Khalaf MM (2020) Algorithms and optimal choice for power plants based on m-polar fuzzy soft set decision making criterions. Acta Electr Malays 4(1):11–23

    Article  Google Scholar 

  • Li PQ, Zeng XJ, Huang JY et al (2016) Equivalent modeling of grid-connected photovoltaic power generation systems for comprehensive load. Autom Electr Power Syst 40(8):43–50

    Google Scholar 

  • Liu SB, Huangfu C, Yu SF et al (2018) Study on over voltage of UHV DC grounding line. High Volt Eng 44(7):2410–2417

    Google Scholar 

  • Ma D, Xia Y, Shen G et al (2021) Practical fixed-time disturbance rejection control for quadrotor attitude tracking. IEEE Trans Industr Electron 68:7274–7283

    Article  Google Scholar 

  • Men MC, Zhao R, Zhang JS et al (2024) Evaluation of distributed photovoltaic hosting capacity of distribution networks based on improved simulated annealing-particle swarm optimization. J Zhejiang Univ 58(06):1255–1265

    Google Scholar 

  • Qian J, Li XR, Wang L et al (2011) Load modeling oriented modeling of photovoltaic cell and fuel cell and its equivalent description. Power Syst Technol 35(4):135–142

    Google Scholar 

  • Qu X, Li XR, Sheng YF et al (2020) Research on equivalent modeling of PV generation system for generalized load. Power Syst Technol 44(6):2143–2150

    Google Scholar 

  • Senapati MK, Sarangi S (2021) Secured zone 3 protection during load encroachment using synchro phasor data. Sustain Energy Grids Netw 27:100522

    Article  Google Scholar 

  • Senapati MK, Pradhan C, Calay RK (2023) A computational intelligence based maximum power point tracking for photovoltaic power generation system with small-signal analysis. Optim Control Appl Meth 44(2):617–636

    Article  Google Scholar 

  • Sheng J, Jia QY, Sun JJ et al (2022) Primary frequency regulation control method for thermal power units based on multi-scale morphological filtering. Electr Power Autom Equip 42(02):194–200

    Google Scholar 

  • Shu YB, Chen GP, He JB et al (2021) Building a new electric power system based on new energy sources. Strateg Study Chin Acad Eng 23(6):61–69

    Google Scholar 

  • Sun YJ, Zhou QY, Shen H (2013) Analysis and prospect on development patterns of China’s power transmission network in future. Power Syst Technol 37(7):1929–1935

    Google Scholar 

  • Tian F, Song RH, Zhou XX et al (2010) Test and analysis on closed-loop simulation of advanced digital power system simulator and HVDC control and protection devices. Power Syst Technol 34(12):57–62

    Google Scholar 

  • Wang CS, Li Y, Peng K (2012) Overview of typical control methods for grid-connected inverters of distributed generation. Proc CSU EPSA 24(2):12–20

    Google Scholar 

  • Wang Y, Liu ZC, Yin ZY et al (2019) Harmonic compensation control methods of active power filter with anti-frequency fluctuation characteristics. High Volt Eng 45(10):3290–3299

    Google Scholar 

  • Wang XY, Hao WQ, Li ZY et al (2023) Analysis of frequency characteristics and network equation voltage solvability of photovoltaic grid connected power systems. Electr Power Autom Equip 43(10):167–175

    Google Scholar 

  • Wang CM, Yan HP, Wang HX (2024a) Research and application of concentrate grade prediction model based on PSO-BPNN. China Plant Eng 02:245–247

    Google Scholar 

  • Wang PH, Qiao HX, Feng Q (2024b) Prediction of water resistance of magnesium oxychloride cement concrete based on PSO-BPNN mode. J Build Mater 27(03):189–196

    Google Scholar 

  • Xin BA (2021) Acceleration of the construction of new-type power system to help achieve the carbon peak and neutrality goal. State Grid 8:10–12

    Google Scholar 

  • Xue F, Li XT, Li HQ et al (2022) Research on voltage stability of grid-connected photovoltaic system based on double-side voltage feedback control. Electr Power 55(9):183–191

    Google Scholar 

  • Yang SY, Sun DY, Chen LW et al (2013) Study on electromagnetic transition of DFIG-based wind turbines under grid fault based on analytical method. Proc CSEE 33(S1):13–20

    Google Scholar 

  • Yang HT, Ji P, Liu JX et al (2017) Analysis on the function and reliability of UHV grid-frame schemes. High Volt Eng 43(3):1014–1022

    Google Scholar 

  • Zhang Y, Yu XQ, Li F et al (2018) Key technology research of GFRP cross arm tower of AC UHV project on the transmission lines. High Volt Eng 44(7):2402–2409

    Google Scholar 

  • Zheng QH, Han B, Li GJ (2020) Research on generalized load modeling considering inverter capacity limitation. Electr Meas Instrum 51(1):55–61

    Google Scholar 

  • Zou JX, Cao M, Dong LJ et al (2018) Load modeling and forecasting method considering measurement-based method and artificial neural network. Proc CSU EPSA 30(8):108–112

    Google Scholar 

Download references

Funding

This work was supported in part by the Science and Technology Project of China Southern Power Grid under Grant ZBKJXM20220069 and the SEPRI High Potential Program SEPRI-K213015.

Author information

Authors and Affiliations

Authors

Contributions

Jie Zhang: Conceptualization, Methodology, Writing—Original Draft; Yuanhong Lu: Formal Analysis, Data Curation; Libin Huang: Resources, Supervision; Haiping Guo: Writing—Review & Editing; Liang Tu: Software, Validation.

Corresponding author

Correspondence to Jie Zhang.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhang, J., Lu, Y., Huang, L. et al. Modeling method of photovoltaic power generation grid connection based on particle swarm optimization neural network. Energy Inform 7, 88 (2024). https://doi.org/10.1186/s42162-024-00388-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s42162-024-00388-2

Keywords