The increasing penetration of renewable energy sources, such as photovoltaics and wind, into the power grid has made power electronic converters, particularly on-grid inverters, crucial interfaces. The stability and performance of the grid are significantly influenced by the dynamic characteristics of these on-grid inverters. Accurate knowledge of their internal control parameters—such as the proportional and integral gains of the current loop, voltage loop, and phase-locked loop (PLL)—is essential for system modeling, stability analysis, and controller design. However, manufacturers and operators often do not disclose these parameters, necessitating methods to estimate or measure them indirectly. This process is often referred to as parameter identification or virtual measurement.
Traditional virtual measurement methods frequently require access to internal electrical signals of the on-grid inverter or the injection of disturbances at internal control points. For instance, some methods involve adding a perturbation to the reference signals within the controller and observing the internal current changes. Others rely on observing internal dq-axis current components. These approaches impose high demands on testing conditions, as they may require specialized equipment or access to controller internals, which is often impractical in field applications. Therefore, there is a pressing need for a virtual measurement method that relies solely on external, readily measurable port quantities. This article addresses this challenge by proposing a non-intrusive virtual measurement method for on-grid inverter control parameters based on frequency response analysis and optimization algorithms.
The core principle involves analyzing the on-grid inverter’s response to small-signal perturbations at its point of common coupling (PCC) with the grid. By applying a voltage disturbance of known frequency at the AC terminals and measuring the resulting current response, one can characterize the inverter’s input admittance or impedance across a range of frequencies. This frequency response, often visualized as a Bode plot, is a unique signature of the system’s dynamics, which are governed by its physical components and control parameters. By constructing a mathematical model of the on-grid inverter that replicates this measured frequency response, its unknown control parameters can be estimated.

Mathematical Model and Frequency Response of an On-Grid Inverter
To enable virtual measurement, a precise mathematical model of the standard on-grid inverter is required. A typical three-phase, two-level voltage source on-grid inverter employs a dual-loop vector control strategy in the synchronous rotating dq-frame, decoupled by feedforward compensation, and synchronized via a PLL. The main components include an L or LCL filter on the AC side, a DC-link capacitor, and the control system comprising the PLL, the DC voltage outer loop, and the current inner loops.
The dynamic equations for a grid-connected on-grid inverter can be derived as follows. The PLL dynamics, which track the grid voltage phase, are given by:
$$\theta_{pll} = \left(k_{p}^{pll} + \frac{k_{i}^{pll}}{s}\right) U_q$$
$$\omega = \left(k_{p}^{pll} + \frac{k_{i}^{pll}}{s}\right) U_q + \omega_0$$
where $\theta_{pll}$ is the estimated phase angle, $U_q$ is the q-axis component of the PCC voltage, $k_{p}^{pll}$ and $k_{i}^{pll}$ are the PLL proportional and integral gains, $\omega_0$ is the nominal grid frequency, and $\omega$ is the estimated frequency.
The current inner-loop controller generates the reference voltage for the modulator:
$$U_{sd}^{ref} = \left(k_{p}^{i} + \frac{k_{i}^{i}}{s}\right)(I_{d}^{ref} – I_d) + U_d – \omega L_f I_q$$
$$U_{sq}^{ref} = \left(k_{p}^{i} + \frac{k_{i}^{i}}{s}\right)(I_{q}^{ref} – I_q) + U_q + \omega L_f I_d$$
Here, $k_{p}^{i}$ and $k_{i}^{i}$ are the inner-loop PI gains, $I_d, I_q$ are the measured dq-axis currents, $I_{d}^{ref}, I_{q}^{ref}$ are their references, $U_d, U_q$ are the PCC voltages, and $L_f$ is the inverter-side filter inductance.
The DC voltage outer-loop controller sets the reference for the active current ($I_d$):
$$I_{d}^{ref} = \left(k_{p}^{dc} + \frac{k_{i}^{dc}}{s}\right)(U_{dc}^{ref} – U_{dc})$$
where $k_{p}^{dc}$ and $k_{i}^{dc}$ are the outer-loop PI gains, and $U_{dc}$ is the measured DC-link voltage.
The dynamics of the DC-link capacitor are:
$$C_{dc} \frac{dU_{dc}}{dt} = P_m – (U_d I_d + U_q I_q)$$
where $C_{dc}$ is the capacitance and $P_m$ is the input power from the DC source.
Linearizing these equations around a nominal operating point (assuming unity power factor, $I_{q}^{ref} \approx 0$) allows us to derive the small-signal admittance model of the on-grid inverter as seen from the grid. This model describes the relationship between perturbations in the PCC voltage and the resulting current. The complete closed-loop admittance matrix $Y_g(s)$ in the dq-frame is:
$$Y_g(s) = \begin{bmatrix}
Y_{gdd}(s) & Y_{gdq}(s) \\
Y_{gqd}(s) & Y_{gqq}(s)
\end{bmatrix}$$
The diagonal and off-diagonal terms are complex functions of the Laplace variable $s$, the grid impedance ($L_g$), and the open-loop inverter admittances $Y_{dd}(s)$ and $Y_{qq}(s)$:
$$Y_{gdd}(s) = \frac{Y_{qq}(s) + L_g s}{(Y_{dd}(s) + L_g s)(Y_{qq}(s) + L_g s) + (\omega L)^2}$$
$$Y_{gdq}(s) = \frac{-\omega L}{(Y_{dd}(s) + L_g s)(Y_{qq}(s) + L_g s) + (\omega L)^2}$$
$$Y_{gqd}(s) = \frac{\omega L}{(Y_{dd}(s) + L_g s)(Y_{qq}(s) + L_g s) + (\omega L)^2}$$
$$Y_{gqq}(s) = \frac{Y_{dd}(s) + L_g s}{(Y_{dd}(s) + L_g s)(Y_{qq}(s) + L_g s) + (\omega L)^2}$$
where $L = L_f + L_g$. The key open-loop admittances are given by:
$$Y_{dd}(s) = \frac{\Delta I_d}{\Delta U_d} = \frac{-(U_{dc0}C_{dc}L)s^3 + (U_{dc0}C_{dc}k_p^i – U_0 I_0 k_p^{dc}k_p^i)s^2 + (U_{dc0}C_{dc}k_i^i – k_i^{dc}k_p^i k_i^i)s – U_0 I_0 k_i^{dc} k_i^i}{I_0 k_p^{dc}k_p^i s^2 + I_0 k_i^{dc}k_p^i s + I_0 k_i^{dc} k_i^i}$$
$$Y_{qq}(s) = \frac{\Delta I_q}{\Delta U_q} = \left(L_f s + k_p^i + \frac{k_i^i}{s}\right)^{-1} + I_0 L_f \left(k_p^{pll} + \frac{k_i^{pll}}{s}\right)$$
Here, $U_0$, $I_0$, and $U_{dc0}$ are the steady-state operating point values.
The frequency response of the on-grid inverter is obtained by evaluating $Y_g(s)$ at $s = j\omega$, where $\omega$ is the angular frequency of the injected perturbation. This yields complex numbers whose magnitude and phase, plotted against frequency, form the Bode plot. This plot encapsulates the dynamic behavior of the on-grid inverter and is directly dependent on the six critical control parameters: $k_p^{dc}, k_i^{dc}, k_p^{i}, k_i^{i}, k_p^{pll}, k_i^{pll}$. The physical parameters like $L_f$, $C_{dc}$, and $L_g$ are typically known or can be measured separately. Therefore, if the measured frequency response of an actual on-grid inverter can be matched by the model $Y_g(j\omega)$ with a specific set of control parameters, those parameters constitute the virtual measurement of the real system’s unknowns.
Virtual Measurement Framework Using Particle Swarm Optimization
The proposed virtual measurement method transforms the parameter identification problem into a multidimensional optimization problem. The objective is to find the set of six control parameters for the model $Y_g(s)$ that minimizes the difference between its computed frequency response and the frequency response measured from the actual on-grid inverter hardware. Particle Swarm Optimization (PSO) is well-suited for this task due to its ability to handle non-linear, multi-modal search spaces effectively and its relatively fast convergence.
The PSO algorithm is inspired by the social behavior of bird flocking. A swarm of particles, each representing a candidate solution (i.e., a vector of the six parameters), explores the search space. Each particle has a position $\vec{x}$ and a velocity $\vec{v}$. During iterations, particles adjust their trajectories based on their own best-known position ($\vec{p}_{best}$) and the global best-known position ($\vec{g}_{best}$) found by the entire swarm. The update equations for the $u$-th iteration are:
$$\vec{v}_{u+1} = w \vec{v}_{u} + c_1 r_1 (\vec{p}_{best} – \vec{x}_{u}) + c_2 r_2 (\vec{g}_{best} – \vec{x}_{u})$$
$$\vec{x}_{u+1} = \vec{x}_{u} + \vec{v}_{u+1}$$
where $w$ is the inertia weight, $c_1$ and $c_2$ are cognitive and social acceleration coefficients, and $r_1$, $r_2$ are random numbers in [0,1].
The fitness function, which the PSO algorithm minimizes, is defined as the root mean square error between the measured and model-predicted Bode plot data. For $n$ frequency points, the fitness $M_{fitness}$ is:
$$M_{fitness} = \sqrt{ \frac{1}{n} \sum_{k=1}^{n} \left[ (A_{meas}(\omega_k) – A_{model}(\omega_k, \vec{x}))^2 + (\phi_{meas}(\omega_k) – \phi_{model}(\omega_k, \vec{x}))^2 \right] }$$
where $A$ and $\phi$ denote magnitude (in dB) and phase (in degrees), respectively. The subscript $meas$ refers to data from the actual on-grid inverter test, and $model$ refers to the output of the mathematical model $Y_g(j\omega_k)$ calculated with the parameter set $\vec{x}$.
The complete workflow for the virtual measurement of the on-grid inverter parameters is as follows:
- Frequency Response Measurement: At the PCC of the operational on-grid inverter, a series of small-amplitude sinusoidal voltage perturbations (e.g., 2% of nominal) are injected one frequency at a time across a relevant bandwidth (e.g., 10 Hz to 1000 Hz). The corresponding three-phase current responses are measured. These signals are transformed to the dq-frame using a reference from a standard PLL (this is for measurement purposes only and is independent of the inverter’s internal PLL). The ratio of the complex current perturbation to the complex voltage perturbation at each frequency gives the measured $Y_g^{meas}(j\omega)$.
- Optimization Problem Setup: The search space for each of the six parameters is defined based on reasonable engineering bounds. The PSO population is initialized with random positions within these bounds. The known physical parameters of the on-grid inverter ($L_f$, $C_{dc}$, $L_g$, etc.) and the steady-state operating point ($U_0$, $I_0$) are fixed in the model $Y_g(s)$.
- Iterative Identification: The PSO algorithm runs. For each particle (parameter set), the model $Y_g(j\omega)$ is evaluated at the same frequency points as the measurement. The fitness value is calculated. Particles update their velocities and positions over many iterations, converging towards the parameter set that best fits the measured data.
- Result Validation: The final parameter set $\vec{x}^*$ corresponding to the global best fitness is the virtual measurement result. The accuracy can be validated by comparing the Bode plot of $Y_g(s)$ using $\vec{x}^*$ with the original measured data, or by using $\vec{x}^*$ in a time-domain simulation model and comparing its dynamic response to the real on-grid inverter under different operating conditions.
This method is non-intrusive because it requires only the injection and measurement of signals at the AC terminals of the on-grid inverter. No internal controller signals, setpoints, or modifications are needed.
Simulation Case Study and Results
A detailed simulation model of a 1.5 MW on-grid inverter was built in MATLAB/Simulink to validate the proposed virtual measurement method. The system parameters are listed in the table below.
| Parameter | Symbol | Value |
|---|---|---|
| Rated Power | $P$ | 1.5 MW |
| DC-Link Capacitance | $C_{dc}$ | 0.024 F |
| Inverter-side Inductance | $L_f$ | 0.02 H |
| Grid-side Inductance | $L_g$ | 0.006 H |
| DC Voltage PI: Proportional | $k_p^{dc}$ | 7 |
| DC Voltage PI: Integral | $k_i^{dc}$ | 800 |
| Current PI: Proportional | $k_p^{i}$ | 0.3 |
| Current PI: Integral | $k_i^{i}$ | 20 |
| PLL PI: Proportional | $k_p^{pll}$ | 180 |
| PLL PI: Integral | $k_i^{pll}$ | 3200 |
The “measured” frequency response was obtained by simulating the injection of 0.02 p.u. voltage disturbances at the PCC from 10 Hz to 1000 Hz in steps of 10 Hz. The PSO algorithm was then employed to virtually measure the six control parameters, with their true values from Table 1 serving as the ground truth for comparison. The search ranges were set to ±50% around the true values. The algorithm converged reliably within 100 iterations.
The virtual measurement results are summarized in the table below, which also includes a comparison with results from a conventional least-squares method applied to the same data, highlighting the advantage of the proposed frequency-response-based PSO approach.
| Parameter | True Value | PSO Measurement | Error (%) | Least-Squares Measurement | Error (%) |
|---|---|---|---|---|---|
| $k_p^{dc}$ | 7 | 7.024 | 0.34 | 7.08 | 1.14 |
| $k_i^{dc}$ | 800 | 799.29 | 0.09 | 800.72 | 0.09 |
| $k_p^{i}$ | 0.3 | 0.292 | 2.67 | 0.312 | 4.00 |
| $k_i^{i}$ | 20 | 19.91 | 0.45 | 20.34 | 1.70 |
| $k_p^{pll}$ | 180 | 178.82 | 0.65 | 177.93 | 1.15 |
| $k_i^{pll}$ | 3200 | 3182.8 | 0.54 | 3173.5 | 0.83 |
The results demonstrate the high accuracy of the proposed method. The maximum error among all parameters is below 2.7%, with most errors under 1%. The slightly higher relative error for $k_p^{i}$ is attributed to its small absolute value. Importantly, the PSO-based method outperformed the least-squares approach in this case, providing more accurate estimates for most parameters. The convergence of the fitness value to approximately 0.02 confirms the excellent match between the frequency response of the model with the identified parameters and the “measured” response from the actual on-grid inverter simulation model.
To further validate the practical utility of the identified parameters, a time-domain validation was performed. A separate simulation model of the on-grid inverter (the “virtual measurement model”) was constructed using the parameters identified by the PSO algorithm. Its dynamic output was compared to the original high-fidelity simulation model (the “true model”) under different grid voltage sag conditions. The comparison of the Phase-A current output is shown below.
| Grid Voltage (p.u.) | Phase-A Current Magnitude | Phase-A Current Phase | ||||
|---|---|---|---|---|---|---|
| True Model (A) | Virtual Model (A) | Error (%) | True Model (°) | Virtual Model (°) | Error (%) | |
| 0.95 | 1760 | 1748 | 0.68 | 2.90 | 2.88 | 0.69 |
| 1.00 | 1782 | 1759 | 1.29 | 2.04 | 2.03 | 0.49 |
| 1.05 | 1790 | 1734 | 3.13 | 2.18 | 2.17 | 0.46 |
The close match in both magnitude and phase across different operating conditions, with errors generally below 2%, strongly validates that the virtually measured parameters accurately capture the dynamic behavior of the original on-grid inverter. This confirms the effectiveness of the frequency-response-based PSO method for practical virtual measurement applications.
Conclusion
This article has presented a novel, non-intrusive virtual measurement method for estimating the critical control parameters of an on-grid inverter. The method leverages the fundamental relationship between an inverter’s internal parameters and its external frequency response characteristics. By applying small-signal voltage perturbations at the grid connection point and measuring the current response, a Bode plot signature is obtained. A Particle Swarm Optimization algorithm is then used to find the set of unknown PI gains for the current loop, voltage loop, and phase-locked loop that cause a detailed mathematical model of the on-grid inverter to produce a matching frequency response.
The key advantage of this approach is its practicality for field applications. It eliminates the need for internal controller access or the injection of internal disturbances, requirements that pose significant challenges for standard identification techniques. The simulation results for a 1.5 MW on-grid inverter system demonstrate the method’s high accuracy, with parameter estimation errors below 2.7% and excellent agreement in time-domain validation tests. This makes the method a powerful tool for system operators and engineers to characterize unknown or undocumented on-grid inverters, thereby enhancing grid modeling accuracy, stability analysis, and the integration of renewable energy sources. Future work could focus on extending the method to account for more complex inverter topologies, advanced control schemes, and the presence of multiple inverters in a network, as well as experimental validation with hardware prototypes.
