Improved Grey Wolf Optimizer for Solar Inverter Parameter Identification

With the increasing integration of renewable energy into power systems, solar energy has become a critical component, leading to a higher penetration of solar inverters. However, the control parameters of solar inverters are often unknown, making it essential to identify these parameters accurately to build high-precision models for analyzing modern power systems. Traditional methods for parameter identification face challenges such as low accuracy, poor adaptability to varying conditions, and unreliable data sources. In this paper, I propose an improved grey wolf optimizer (IGWO) for identifying the control parameters of solar inverters. This method enhances the convergence speed and accuracy of the original grey wolf algorithm by incorporating multi-strategy improvements, including chaotic initialization based on Latin hypercube sampling, dynamic hunting weight coefficients, nonlinear convergence factors, and random Logistic mapping perturbations. The effectiveness of the proposed approach is validated through hardware-in-the-loop experiments using RT-LAB, demonstrating its ability to accurately and rapidly identify solar inverter parameters under various fault conditions.

The control principles of solar inverters are based on power decoupling control, which separates the active and reactive power outputs. The mathematical model of a solar inverter involves dq-axis transformation to decouple the currents. The reference values for the d-axis and q-axis currents are given by proportional-integral (PI) controllers, as shown in the following equations:

$$i_{dref} = \left( k_{p1} + \frac{k_{i1}}{s} \right) (U_{dcref} – U_{dc})$$

$$i_{qref} = \left( k_{p1} + \frac{k_{i1}}{s} \right) (Q_{ref} – Q_g)$$

After decoupling, the control voltages are expressed as:

$$u_d = \left( k_{p2} + \frac{k_{i2}}{s} \right) (i_{dref} – i_d) – \omega L i_q + U_{gd}$$

$$u_q = \left( k_{p2} + \frac{k_{i2}}{s} \right) (i_{qref} – i_q) + \omega L i_d + U_{gq}$$

The power equations on the grid side are:

$$P_g = \frac{3}{2} (u_d i_d + u_q i_q)$$

$$Q_g = \frac{3}{2} (u_q i_d – u_d i_q)$$

The parameters to be identified for the solar inverter controller model are the PI coefficients, represented as:

$$\gamma = [K_{p1}, K_{p2}, K_{i1}, K_{i2}]$$

Parameter identification is formulated as an optimization problem, where the goal is to minimize the fitness function defined as the sum of squared errors between the measured and simulated outputs. The fitness function is given by:

$$F_{in} = \sum_{k=1}^{l} \left[ (I(k) – I^*(k))^2 + (P(k) – P^*(k))^2 \right]$$

where \(I\) and \(P\) are the active current and active power from the identified model, and \(I^*\) and \(P^*\) are the measured values from the solar inverter controller.

The original grey wolf optimizer (GWO) mimics the social hierarchy and hunting behavior of grey wolves. The algorithm involves initialization, encircling prey, hunting, attacking, and searching for prey. The position update during the encircling phase is described by:

$$D = |C \cdot X_p(t) – X(t)|$$

$$X(t+1) = X_p(t) – A \cdot D$$

where \(A\) and \(C\) are coefficient vectors, \(X_p\) is the prey’s position, and \(X\) is the wolf’s position. The coefficients are calculated as:

$$A = 2a \cdot r_1 – a$$

$$C = 2 \cdot r_2$$

with \(a\) decreasing linearly from 2 to 0 over iterations, and \(r_1\), \(r_2\) being random vectors in [0,1]. During hunting, the positions are updated based on the alpha, beta, and delta wolves:

$$D_{\alpha} = |C_1 \cdot X_{\alpha} – X|, \quad D_{\beta} = |C_2 \cdot X_{\beta} – X|, \quad D_{\delta} = |C_3 \cdot X_{\delta} – X|$$

$$X_1 = X_{\alpha} – A_1 \cdot D_{\alpha}, \quad X_2 = X_{\beta} – A_2 \cdot D_{\beta}, \quad X_3 = X_{\delta} – A_3 \cdot D_{\delta}$$

$$X(t+1) = \frac{X_1 + X_2 + X_3}{3}$$

To address limitations like premature convergence and local optima, I introduce several improvements to the GWO, resulting in the IGWO algorithm. First, chaotic initialization based on Latin hypercube sampling (LHS) is used to generate initial populations that uniformly cover the search space. This method divides each dimension into intervals and randomly selects points within each interval, ensuring better global exploration. The initialization process for a dimension \(i\) with bounds \([m_i, n_i]\) and \(N\) intervals is:

$$c_{i,j} = m_i + (n_i – m_i) \cdot \frac{j}{N}, \quad j = 0, 1, \ldots, N$$

$$X_{i,j} = c_{i,j} + \text{rand}(0,1) \cdot (c_{i,j+1} – c_{i,j})$$

Second, dynamic hunting weight coefficients are incorporated to emphasize the influence of better solutions. The weights for alpha, beta, and delta wolves are updated as:

$$\omega_{\alpha}(t) = \omega_{\alpha0} \cdot e^{-t / \tau_{\alpha}}, \quad \omega_{\beta}(t) = \omega_{\beta0} \cdot e^{-t / \tau_{\beta}}, \quad \omega_{\delta}(t) = \omega_{\delta0} \cdot e^{-t / \tau_{\delta}}$$

where \(\omega_{\alpha0} > \omega_{\beta0} > \omega_{\delta0}\) and \(\tau_{\alpha} < \tau_{\beta} < \tau_{\delta}\). The position update becomes:

$$X(t+1) = \frac{\omega_{\alpha} X_1 + \omega_{\beta} X_2 + \omega_{\delta} X_3}{\omega_{\alpha} + \omega_{\beta} + \omega_{\delta}}$$

Third, a nonlinear convergence factor based on the sine function is proposed to enhance global search in early iterations and local exploitation in later stages:

$$a = 1 + \sin\left( \frac{\pi}{2} + \frac{\pi t}{T} \right)$$

where \(T\) is the maximum number of iterations. This factor decreases nonlinearly, providing a more adaptive balance between exploration and exploitation.

Fourth, random Logistic mapping perturbations are added to avoid local optima. The perturbation is applied with a probability of 20%, and the update is:

$$E(t+1) = r \cdot E(t) \cdot [1 – E(t)], \quad \text{if } l_g \leq 0.2$$

$$X(t+1) = \frac{\omega_{\alpha} X_1 + \omega_{\beta} X_2 + \omega_{\delta} X_3}{\omega_{\alpha} + \omega_{\beta} + \omega_{\delta}} + E(t+1)$$

where \(r = 3.99\) and \(l_g\) is a random number in [0,1]. The IGWO algorithm flowchart involves initializing the population with LHS, evaluating fitness, updating positions with dynamic weights and convergence factors, and applying perturbations as needed.

To validate the IGWO method, I conduct hardware-in-the-loop experiments using the RT-LAB platform. The test system includes a 35 kV infinite bus, a transformer, an LC filter, and the solar inverter controller. The solar inverter parameters are listed in the table below:

Parameter Value
Solar irradiance (kW/m²) 6,127.3
PV cell temperature (°C) 43 ± 2
Short-circuit current per cell (A) 14.81
Open-circuit voltage per cell (V) 47.4
Series cells in array 26
Parallel cells in array 28
Rated input voltage (V) 1,500
Rated grid voltage (V) 800
Maximum input current (A) 390
DC capacitance (μF) 1,650
IGBT resistance (Ω) 5
Rated input power (kW) 300

The RT-LAB platform enables real-time simulation and data acquisition, providing measured datasets for parameter identification. The system is subjected to various fault conditions, such as voltage sags and swells, to evaluate the dynamic response of the solar inverter.

The superiority of LHS initialization is demonstrated by comparing it with random sampling, Tent chaos, and Halton sequences. LHS produces a more uniform distribution in the search space, reducing the risk of local optima. The improved convergence factor is compared with the original linear factor, showing faster convergence in early iterations. The IGWO algorithm is also compared with particle swarm optimization (PSO), genetic algorithm (GA), and original GWO. The parameters for these algorithms are set as follows:

Algorithm Population Size Max Iterations Search Range
PSO 50 50 ±100%
GA 50 50 ±100%
GWO 50 50 ±100%
IGWO 50 50 ±100%

The convergence curves indicate that IGWO achieves higher accuracy and faster convergence than other methods. The identified parameters for the solar inverter are:

Parameter Search Range Identified Value
\(K_{p1}\) 0.0 to 1.0 0.571
\(K_{p2}\) 0.0 to 1.0 0.247
\(K_{i1}\) 0.0 to 10.0 1.458
\(K_{i2}\) 0.0 to 10.0 5.636

These parameters are used in the identification model to simulate the solar inverter’s response under different fault conditions. The output curves for terminal voltage, active current, and active power are compared with measured data from RT-LAB. The results show close alignment, with minor deviations during transient periods due to phase-locked loop delays in the actual solar inverter controller. The errors are calculated for steady-state and transient intervals, defined as regions A, C, E and B, D, respectively. The error metrics include maximum error (\(\delta_{MXE}\)), mean error (\(\delta_{ME}\)), mean absolute error (\(\delta_{MAE}\)), and weighted absolute error (\(\delta_G\)):

$$\delta_{ME} = \frac{1}{K_{end} – K_{start} + 1} \sum_{k=K_{start}}^{K_{end}} (x_{mea}(k) – x_{sim}(k))$$

$$\delta_{MAE} = \frac{1}{K_{end} – K_{start} + 1} \sum_{k=K_{start}}^{K_{end}} |x_{mea}(k) – x_{sim}(k)|$$

$$\delta_G = \frac{\sum_{k=K_{start}}^{K_{end}} |x_{mea}(k) – x_{sim}(k)|}{K_{end} – K_{start} + 1}$$

$$\delta_{MXE} = \max_{k \in [K_{start}, K_{end}]} |x_{mea}(k) – x_{sim}(k)|$$

The maximum allowable errors for transient model validation are:

Parameter \(\delta_{MXE}\) \(\delta_{ME}\) \(\delta_{MAE}\) \(\delta_G\)
Voltage (p.u.) 0.05 0.05 0.05 0.05
Current (p.u.) 0.20 0.15 0.17 0.15
Power (p.u.) 0.20 0.15 0.17 0.15

The calculated errors for four different fault scenarios are below the allowable limits, as shown in the following tables:

Scenario \(\delta_{MXE}\) \(\delta_{ME}\) \(\delta_{MAE}\) \(\delta_G\)
1 0.011 0.004 0.004 0.009
2 0.019 0.012 0.012 0.016
3 0.014 0.005 0.005 0.012
4 0.017 0.007 0.007 0.014

For active current:

Scenario \(\delta_{MXE}\) \(\delta_{ME}\) \(\delta_{MAE}\) \(\delta_G\)
1 0.107 0.084 0.091 0.098
2 0.143 0.114 0.124 0.131
3 0.086 0.061 0.077 0.081
4 0.127 0.114 0.117 0.124

For active power:

Scenario \(\delta_{MXE}\) \(\delta_{ME}\) \(\delta_{MAE}\) \(\delta_G\)
1 0.075 0.054 0.061 0.066
2 0.083 0.064 0.067 0.071
3 0.094 0.078 0.082 0.087
4 0.104 0.079 0.085 0.092

In conclusion, the proposed IGWO method effectively identifies the control parameters of solar inverters with high accuracy and adaptability to various fault conditions. The improvements in initialization, dynamic weighting, convergence factors, and perturbations enhance the algorithm’s performance, making it suitable for practical applications in power system analysis. Future work could focus on extending this approach to other types of inverters and integrating it with real-time control systems for solar energy integration.

Scroll to Top