An Improved Grey Wolf Optimizer for Solar Inverter Parameter Identification

In this study, I present a novel parameter identification method for solar inverter control parameters, based on an improved grey wolf optimizer (IGWO). The increasing penetration of photovoltaic (PV) generation into modern power grids introduces significant challenges, particularly concerning wide-band oscillation risks. Accurate modeling of solar inverters is essential for transient stability analysis and control design. However, the internal control parameters of commercial solar inverters are often proprietary and unknown. Therefore, developing a reliable and efficient identification technique is of paramount practical importance.

I first analyze the control architecture of a typical grid-connected solar inverter, establishing a transient model that captures the key dynamic behavior. The parameters to be identified include the proportional and integral gains of the outer voltage loop and the inner current loop. Then, I propose an IGWO algorithm enhanced by three strategies: a Latin hypercube sampling (LHS) based chaotic initialization, dynamic hunting weight coefficients, a nonlinear sinusoidal convergence factor, and a stochastic Logistic map perturbation mechanism. Finally, I validate the proposed method using hardware-in-the-loop (HIL) experiments on an RT-LAB platform. The identified response curves closely match the measured data under various fault scenarios, demonstrating the accuracy and robustness of the approach.

Model and Control of the Solar Inverter

The main circuit topology of a three-phase grid-connected solar inverter is depicted below. The inverter employs insulated-gate bipolar transistors (IGBTs) to convert DC power from the PV array into AC power synchronized with the grid. The control system adopts a cascaded structure with an outer voltage loop and an inner current loop, utilizing proportional-integral (PI) controllers and feedforward decoupling.

The mathematical model of the solar inverter in the synchronous rotating dq reference frame is given by:

$$
\begin{aligned}
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}
\end{aligned}
$$

where $u_d$, $u_q$ are the inverter output voltages; $i_d$, $i_q$ are the grid currents; $U_{gd}$, $U_{gq}$ are the grid voltages; $\omega$ is the angular frequency; $L$ is the filter inductance; $k_{p2}$ and $k_{i2}$ are the inner-loop PI gains. The reference currents are generated by the outer loops:

$$
\begin{aligned}
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)
\end{aligned}
$$

Here, $U_{dc}$ is the DC-link voltage, $Q_g$ is the output reactive power, $k_{p1}$ and $k_{i1}$ are the outer-loop PI gains. The parameter vector to be identified is:

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

Improved Grey Wolf Optimizer (IGWO) for Parameter Identification

Standard Grey Wolf Optimizer

The grey wolf optimizer (GWO) mimics the social hierarchy and hunting behavior of grey wolves. Four levels exist: alpha ($\alpha$), beta ($\beta$), delta ($\delta$), and omega ($\Omega$). The hunting process is modeled by:

Encircling prey:

$$
\vec{D} = |\vec{C} \cdot \vec{X}_p(t) – \vec{X}(t)|, \quad \vec{X}(t+1) = \vec{X}_p(t) – \vec{A} \cdot \vec{D}
$$

$$
\vec{A} = 2a \cdot \vec{r}_1 – a, \quad \vec{C} = 2 \cdot \vec{r}_2
$$

where $a$ decreases linearly from 2 to 0 over iterations.

Hunting: The positions of $\alpha$, $\beta$, $\delta$ wolves are used to update the positions of $\Omega$ wolves:

$$
\begin{aligned}
\vec{D}_\alpha &= |\vec{C}_1 \cdot \vec{X}_\alpha – \vec{X}| \\
\vec{D}_\beta &= |\vec{C}_2 \cdot \vec{X}_\beta – \vec{X}| \\
\vec{D}_\delta &= |\vec{C}_3 \cdot \vec{X}_\delta – \vec{X}|
\end{aligned}
$$

$$
\vec{X}_1 = \vec{X}_\alpha – \vec{A}_1 \cdot \vec{D}_\alpha,\quad \vec{X}_2 = \vec{X}_\beta – \vec{A}_2 \cdot \vec{D}_\beta,\quad \vec{X}_3 = \vec{X}_\delta – \vec{A}_3 \cdot \vec{D}_\delta
$$

$$
\vec{X}(t+1) = \frac{\vec{X}_1 + \vec{X}_2 + \vec{X}_3}{3}
$$

Proposed IGWO Enhancements

1. LHS-based Chaotic Initialization: Instead of random initialization, I apply Latin hypercube sampling (LHS) combined with chaotic sequences to generate a more uniform distribution of initial wolves in the search space. This improves global exploration ability. The procedure is:

  • Divide each dimension $i$ into $N$ equal intervals: $c_{i,j} = m_i + (n_i – m_i) \cdot \frac{j}{N}$, $j=0,\dots,N$.
  • Randomly sample one point per interval: $X_{i,j} = c_{i,j} + \text{rand}(0,1) \cdot (c_{i,j+1} – c_{i,j})$.
  • Combine samples to form the initial population matrix.

2. Dynamic Hunting Weight Coefficients: I introduce adaptive weights for $\alpha$, $\beta$, $\delta$ wolves to emphasize the best solutions. The weights decay exponentially with iteration:

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

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

$$
\vec{X}(t+1) = \frac{\omega_\alpha \vec{X}_1 + \omega_\beta \vec{X}_2 + \omega_\delta \vec{X}_3}{\omega_\alpha + \omega_\beta + \omega_\delta}
$$

3. Sinusoidal Nonlinear Convergence Factor: The linear $a$ is replaced by a sinusoidal function:

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

This yields larger $a$ in early iterations (enhancing global search) and smaller $a$ later (enhancing local refinement).

4. Logistic Map Perturbation: To avoid stagnation in local optima, I randomly apply a perturbation generated by the Logistic map with probability 20%:

$$
E(t+1) = r \cdot E(t) \cdot [1 – E(t)], \quad r = 3.99
$$

$$
\vec{X}(t+1) = \frac{\omega_\alpha \vec{X}_1 + \omega_\beta \vec{X}_2 + \omega_\delta \vec{X}_3}{\omega_\alpha + \omega_\beta + \omega_\delta} + \vec{E}(t+1)
$$

The overall IGWO algorithm is summarized in the flowchart below, but here I describe the steps:

  1. Initialize population using LHS-based chaotic initialization.
  2. Compute fitness for each wolf (fitness function defined later).
  3. Identify $\alpha$, $\beta$, $\delta$ wolves.
  4. Update $a$, $A$, $C$ using sinusoidal $a$.
  5. Update positions using dynamic weights and, with 20% chance, add Logistic perturbation.
  6. Evaluate fitness, update $\alpha$, $\beta$, $\delta$.
  7. Repeat until maximum iterations reached.

The fitness function used for solar inverter parameter identification is the sum of squared errors between measured and simulated active current and active power:

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

where $I$, $P$ are from the identification model, $I^*$, $P^*$ are from the real solar inverter controller (obtained via RT-LAB HIL tests).

Experimental Validation and Results

Hardware-in-the-Loop Setup

I conducted HIL experiments using the RT-LAB real-time simulator connected to an actual solar inverter controller (rated 800 V, 300 kW). The test system includes a 35 kV infinite bus, a transformer (800 V/35 kV), an LC filter, and the controller. The controller receives analog voltage/current signals from RT-LAB and outputs PWM switching signals. Table 1 lists the key electrical parameters of the solar inverter and PV array.

Table 1: Electrical parameters of the solar inverter and PV array
Parameter Value
Solar irradiance $S$ (kW/m²) 6.1273
PV cell temperature $t$ (°C) 43 ± 2
Cell short-circuit current $I_{sc}$ (A) 14.81
Cell open-circuit voltage $U_{oc}$ (V) 47.4
Series cells per string $N_s$ 26
Parallel strings $N_c$ 28
Rated DC input voltage (V) 1500
Rated AC grid voltage (V) 800
Maximum input current (A) 390
DC-link capacitance ($\mu$F) 1650
IGBT resistance ($\Omega$) 5
Rated input power (kW) 300

Algorithm Comparison

I compared IGWO against particle swarm optimization (PSO), genetic algorithm (GA), and standard GWO using the same dataset. All algorithms used 50 population size, 50 maximum iterations, and the same search range. Table 2 shows the initialization parameters.

Table 2: Common algorithm parameters
Parameter Value
Problem dimension 4
Population size 50
Search range (relative) ±100%
Maximum iterations 50

The convergence curves (fitness vs. iteration) show that IGWO achieves the lowest fitness value and the fastest convergence. While PSO and GWO tend to stagnate in local minima, IGWO consistently escapes poor regions due to the Logistic perturbation and improved exploration.

Identified Parameters and Model Validation

Using IGWO, I identified the four control parameters. Table 3 presents the search range and identified values.

Table 3: Identified solar inverter control parameters using IGWO
Parameter Search range Identified value
$k_{p1}$ [0.0, 1.0] 0.571
$k_{p2}$ [0.0, 1.0] 0.247
$k_{i1}$ [0.0, 10.0] 1.458
$k_{i2}$ [0.0, 10.0] 5.636

I then injected these parameters into the simulation model and compared the transient responses under four fault scenarios: (1) low-voltage ride-through (LVRT) with high power, (2) LVRT with low power, (3) high-voltage ride-through (HVRT) with high power, (4) HVRT with low power. The outputs—terminal voltage $U$, active current $I$, and active power $P—$were compared against the RT-LAB measured curves.

The identified curves closely match the measured ones for all scenarios. Slight deviations occur during fault initiation and recovery due to the phase-locked loop (PLL) delay in the real controller, which introduces a momentary power surge. Nevertheless, the errors remain well within acceptable thresholds, as shown in the following error analysis.

Error Quantification

I divided each fault event into steady-state regions (A, C, E) and transient regions (B, D). Four error metrics were calculated: maximum error ($\delta_{MXE}$), mean error ($\delta_{ME}$), mean absolute error ($\delta_{MAE}$), and weighted mean absolute error ($\delta_G$). The formulas are:

$$
\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_{MXE} = \max_{k \in [K_{start},K_{end}]} |x_{mea}(k) – x_{sim}(k)|
$$

$$
\delta_G = \frac{1}{\sum w_k} \sum w_k |x_{mea}(k) – x_{sim}(k)|
$$

The acceptable error limits for transient model validation are given in Table 4.

Table 4: Maximum allowed errors (p.u.)
Variable $\delta_{MXE}$ $\delta_{ME}$ $\delta_{MAE}$ $\delta_G$
$U$ 0.05 0.05 0.05 0.05
$I$ 0.20 0.15 0.17 0.15
$P$ 0.20 0.15 0.17 0.15

Tables 5–7 list the calculated errors for the four fault scenarios. All errors are below the limits, confirming the high accuracy of the IGWO-based identification.

Table 5: Terminal voltage errors (p.u.)
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
Table 6: Active current errors (p.u.)
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
Table 7: Active power errors (p.u.)
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

Conclusion

In this work, I developed an improved grey wolf optimizer (IGWO) for identifying the control parameters of a solar inverter. The key contributions are:

  • A Latin hypercube sampling-based chaotic initialization that ensures a uniform distribution of initial solutions, enhancing global search capability.
  • Dynamic hunting weight coefficients and a sinusoidal convergence factor that accelerate convergence and improve solution accuracy.
  • A Logistic map perturbation mechanism that helps the algorithm escape local optima, preventing premature stagnation.
  • Comprehensive hardware-in-the-loop validation using an actual solar inverter controller on an RT-LAB platform, demonstrating the method’s accuracy under multiple grid fault scenarios.

The identified model’s outputs (voltage, current, power) match the measured data with errors well below the industry-accepted thresholds. The proposed IGWO method provides a reliable, efficient, and robust solution for solar inverter parameter identification, which is crucial for high-fidelity power system transient analysis and oscillation risk assessment.

Scroll to Top