Open-access Auto-Tuning of Adaptive Control Initial Gains Using Virtual System-Based Approach in Grid-Tied Converters

ABSTRACT

This paper proposes a novel virtual system-based online tuning strategy for initial gains of adaptive controllers applied to grid-tied converters with LCL filters. The method relies on the implementation of a robust model reference adaptive control (RMRAC) law combined with a full adaptive super-twisting sliding mode action and a disturbance rejection mechanism. To auto-tune the related adaptive gains, a virtual system is excited by a frequency-rich reference signal, ensuring persistent excitation of the regressor and fast convergence of the adaptive gains before the inverter is connected to the physical grid. Once convergence is achieved, the tuned controller is seamlessly transferred to the real plant, where the reference is provided by a grid synchronization unit based on a Kalman filter phase-locked loop. Experimental results demonstrate smooth synchronization, bounded control signals, reduced transient responses, and improved robustness against parametric uncertainties, load disturbances, and grid harmonics, while maintaining acceptable current THD levels. Beyond this case study, the proposed auto-tuning approach can be extended to other RMRAC-based adaptive control schemes, as long as the plant can be properly modeled and simulated, enabling initial gain adjustment without empirical tuning or offline optimization.

KEYWORDS
online tuning; virtual system; sliding mode control; super-twisting; voltage source inverters; grid-tied converters

I. INTRODUCTION

In recent times, there has been an undergoing effort in the sense of replacing traditional fossil fuel and nonrenewable energy sources with renewable alternatives, such as solar and wind power [1]. These power generation plants are present at different scales, from individual residential properties to large power plants. Along with that, comes the need to connect the system to the grid, which may raise some concerns about the coupling.

Renewable sources usually provide a continuous-voltage supply or require rectification due to variations in frequency. Thus, grid-tied systems need a setup that guarantees frequency and phase matching whilst avoiding harmonic current distortions. Standards such as IEC 61727 and IEEE 1547 stipulate limits on the total harmonic distortion (THD) rate in grid-injected currents. In order to achieve a reduction in THD, a great variety of filters are used, including L, LCL, LLCL, LCLLC, among others. In spite of that, the most commonly employed filters are L and LCL. The first one is the simplest option, even though the associated cost is high, and its size considerably rises in greater power systems [2], being the most used topology [3]. In contrast, LCL filters present a better response in relation to the THD and have a lower cost, weight, and size, which makes them a more suitable option [4].

Concerning the harmonic peak attenuation, this can be accomplished by inserting a resistive element into the circuit, either in a passive (physically) or active (virtually) configuration. The passive form commonly comprises the insertion of a resistor in series with the capacitor of the LCL filter, which reduces efficiency and performance [5], due to the dissipation of energy in the form of heat. However, the active form does not comprise a physical component. Rather, a virtual resistance [6], [7] is emulated via a control system, by closing the loop with regard to the currents and line voltages measured at the point of common coupling (PCC).

Nevertheless, emulating a virtual resistance may considerably increase the control complexity and a further set of sensors might be necessary. In this sense, controllers without component emulation have been proposed, such as the classical proportional-integral (PI) controller [8], proportional-resonant (PR) controller [9], [10], or even PR-based backstepping controller [11]. However, grid-tied systems may often suffer from parameter variation or uncertainties, which could take control out of the operational range for which they were designed for or even lead to instability. Thus, advanced strategies are proposed to deal with system variations. In [12], the authors compare partial and total state-feedback controllers projected to handle uncertainties. In this study, the gains were tuned offline, using a particle swarm algorithm. As a result, the total state-feedback version has superior performance with regard to the partial one, which had limited robustness, responding satisfactorily only to a narrow range of uncertainties.

In this context, control techniques able to perform online gains adjustments notably contribute to ensuring convergence under parametric deviation. In [13], the authors presented an adaptive PI controller based on robust model reference adaptive control (RMRAC) without a reference model, considering unmodeled dynamics. The results demonstrated robustness with regard to the uncertainties. In [14], a sliding mode-based model reference adaptive control (MRAC-SM) with reduced order model reference was introduced, resulting in reduced computational burden when compared to the full-order model reference version. However, sliding mode-based controllers insert chattering into the system. In this study, it was solved by using a sigmoid function with the sliding mode control action. Similarly, in [15], an RMRAC-based super-twisting sliding mode (RMRACSTSM) was developed to mitigate this issue, where the first-order sliding mode control action was replaced by a second-order version. In contrast, our controller, which was previously introduced in [16], no longer required the design of the constants k1 and k2, as their functionality is now provided by the adaptive gains, differentiating significantly from the previous controller presented in [15].

The aforementioned adaptive controllers require appropriate initial parameter tuning to ensure satisfactory performance. However, empirical tuning is often not intuitive, demanding considerable effort from the designer and frequently resulting in suboptimal responses, particularly during transient operation. To address these limitations, optimization-based methods have been explored in the literature, aiming to refine the initial tuning of adaptive gains, and thereby improve both the transient and overall system performance. In this context, some works have employed offline optimization techniques such as genetic algorithms (GA) [17] and particle swarm optimization (PSO) [18]. While these approaches can lead to improved results, they also require the implementation of the optimization procedure and multiple iterative runs until a satisfactory solution is achieved, which increases computational effort and design time. The main contribution of this work eliminates the need for offline empirical or optimization tuning by introducing a virtual system that enables instantaneous online tuning through persistently exciting inputs. This approach improves controller performance by excluding the empirical design as well as the seeking for alternative offline optimization, which is often a barrier to the use of advanced adaptive controllers in grid-tied power systems.

II. GRID-TIED CON converter with LCL an filter

This section provides a description of the plant and transfer function modeling. The system considered in this work consists of a continuous-voltage source provided by a renewable source (i.e., solar, wind power, etc.), a voltage-source inverter (VSI), and an LCL filter connected to a three-phase grid. Figure 1.a) illustrates the system scheme, where rc and Lc are the converter-side impedance, rg1 and Lg1 are the grid-side impedance, and C is the capacitive part of the filter. Also, rg2 and Lg2 are the unknown grid impedance, which is in series with a sinusoidal source Vd, which emulates the grid voltage. In addition, ia, ib, and ic represent the phase currents, while Vab and Vbc represent the line voltages in the PCC, which are used to close the loop. Moreover, the VSI switches are controlled using space vector modulation (SVM), and the connection of the VSI to the grid is made via a PCC, where the measurements are done. Furthermore, the grid-synchronization is performed using a Kalman filter-based phase-locked loop (KF-PLL) strategy.

Figure 1
a) Grid-tied three-phase VSI with an LCL filter. b) Equivalent single-phase decoupled models.

For the purpose of controlling the injected currents on the grid and modeling the LCL filter, the representation of the system in abc coordinates is transformed into αβ0 coordinates, through the Clarke transformation [19]. In this sense, since the grid is considered equilibrated, the 0 axis is negligible, and it can be represented by two identical single-phase circuits in α and β coordinates [20]. The circuits are shown in Fig. 1.b), where rg = rg1+rg2 and Lg = Lg1 + Lg2 represent the total grid impedance. Thus, the Kirchhoff’s laws are applied to the circuit for extracting a transfer function G(s) that relates the control action synthesized by the SVM, u, and the injected grid currents ig, which is given by

G ( s ) = i g ( s ) u ( s ) = b 0 a 0 s 3 + a 1 s 2 + a 2 s + a 3 (1)

where a0 = LgLcC, a1 = (rgLc+rcLg)C, a2 = Lc+Lg+ rgrcC, a3 = rg + rc, and b0 = 1.

Similarly, the transfer function relating the grid disturbance vd to the injected grid current ig is given by

G v d ( s ) = i g ( s ) v d ( s ) = c 0 s 2 + c 1 s + c 2 a 0 s 3 + a 1 s 2 + a 2 s + a 3 , (2)

where c0 = −1/LC, c1 = −rc/LgLc and c2 = −1/LgLcC.

III. ADAPTIVE CURRENT CONTROLLER

This control structure is based on RMRAC philosophy with a full adaptive super twisting sliding mode action, which was initially introduced in [16]. Therefore, considering a discrete-time linear time-invariant plant G(z), defined as

G ( z ) = G 0 ( z ) 1 + μ Δ m ( z ) + μ Δ a ( z ) (3)

where ∆m(z) and ∆a(z) represent the multiplicative and additive unmodeled dynamics, respectively, and µ the weight of each term, being defined as the same without generality loss. The nominal part of the plant, G0(z), is given by G0(z)=kpZ0(z)R0(z), where kp is the plant gain, Z0(z) is a monic polynomial of order m, and R0(z) is a monic polynomial of order n, with n > m. Accordingly, the system output can be alternatively expressed as y = G0(z)u + µη, where η denotes the unmodeled dynamic. Thus, the disturbance term µη(k) is assumed to be upper bounded by a majorant signal described as

| η ( k ) | m ( k ) ≤ N 0 + g ( k ) , (4)

where,

m ( k + 1 ) = δ 0 m ( k ) + δ 1 ( 1 + | u ( k ) | + | y ( k ) | ) , (5)

with m(0)≥δ11−δ0, being δ0 and δ1 designed as positive constants such that δ0 < 1 (see [21]). Moreover, N0 is a finite positive constant, and g(k) is a term in geometric decay. The reference model, Wm(z), is given by

W m ( z ) = y m ( z ) r ( z ) = k m 1 R m ( z ) , k m > 0 (6)

where Rm(z) is a monic polynomial, of order n−m, with roots within the unit radius circle, and km is a constant with the same sign as kp. The reference model output is ym = Wm(z)r, being r a limited reference signal. The stability assumptions associated with the aforementioned systems are thoroughly described in [21].

The control action is extracted from [16], and is given by θT(k)ω(k) + r(k) = 0, where θ and ω are the gains vector and an auxiliary vector containing the dynamics of interest, respectively. These vectors are θT = [θ1,θ2,θ3,θ4,θs,θc] and ωT = [u(k),y(k),v1(k),v2(k),Vs(k),Vc(k)], where v1(k) = e1(k)sgm(e1(k)) and v2(k) = v2(k−1)+sgm(e1(k−1)) are the nonlinear and integral components of the super-twisting term, and sgme1(k)=e1(k)e1(k)+δf is a sigmoid-based error-dependent switching function while Vs(k) and Vc(k) are phase and quadrature of the exogenous disturbance. These components are described as Vs(k) = Assin(ωdskTs+ϕs) and Vc(k) = Accos(ωdckTs+ ϕc) where A, ωd, and ϕ represent the amplitude, frequency, and phase of the components Vs(k) and Vc(k), respectively. Expanding this operation, it follows:

θ 1 ( k ) u ( k ) + θ 2 ( k ) y ( k ) + θ 3 ( k ) v 1 ( k ) + θ 4 ( k ) v 2 ( k ) + θ 5 ( k ) V s ( k ) + θ 6 ( k ) V c ( k ) + r ( k ) = 0 . (7)

Therefore,

u ( k ) = u r ( k ) + u f ( k ) + u d ( k ) = − θ 2 ( k ) y ( k ) − r ( k ) θ 1 ( k ) + − θ 3 ( k ) v 1 ( k ) − θ 4 ( k ) v 2 ( k ) θ 1 ( k ) + − θ s ( k ) V s ( k ) − θ c ( k ) V c ( k ) θ 1 ( k ) (8)

where ur, uf, and ud represent the control action components relative to RMRAC, FASTSM, and disturbance rejection, respectively.

A gradient algorithm is used to adjust the gains online,

θ ( k + 1 ) = I − σ Γ T s θ ( k ) − T s κ Γ ζ ( k ) ϵ 1 ( k ) m ¯ 2 ( k ) , (9)

where Ts is the sampling period, Γ = γI is a symmetric positive-definite matrix with γ > 0, and κ > 0 is a scalar, used to make the convergence faster. The augmented error is

ϵ 1 = e 1 + θ T ζ − W m θ T ω (10)

where the tracking error is e1 = y − ym and

ζ = W m I ω (11)

is a regressor vector. Additionally, a majorant signal m¯2 is used to ensure boundedness of the closed-loop signals,

m ¯ 2 ( k ) = m 2 ( k ) + ζ T ( k ) ζ ( k ) , (12)

and the σ-modification [21] is also implemented.

Figure 3 shows the block diagram of the implemented current controller.

Figure 3
Block diagram of adaptive current controller.

IV. VIRTUAL SYSTEM-BASED CONTROLLER TUNING

In adaptive control, the choice of initial adaptive gains is commonly a challenge for controller designers due to the inherent relation with initial transient behavior. Additionally, the effectiveness of initial parameter tuning, which has a direct impact on the overall performance in the presence of unmodeled dynamics (µ ≠ 0), strongly depends on the excitation properties of the reference signals used to stimulate the adaptive mechanism.

Figure 2 illustrates the block diagram of the proposed virtual system-based online tuning strategy to simultaneously address the aforementioned challenges. The approach relies on three virtual switching mechanisms that operate on the reference signal r(k), the control action u(k), and the plant output y, which closes the adaptive control loop. Additionally, the control law can only switch to the physical plant if the internal variable ’inib’, associated with the KF-PLL, returns a positive value, allowing safe transition from the virtual environment to the physical system. Also, in this configuration, the reference r(k) can be flexibly selected, either as a persistently rich excitation signal or directly from the KF-PLL for grid-synchronized operation. Furthermore, the system can be operated in two distinct modes: a virtual plant model, used for parameter adaptation, and the physical plant itself, used for real-time control.

Figure 2
Block diagram of the proposed online tuning strategy for adaptive controller based on a virtual model of the plant embedded in the DSP.

The virtual model is implemented by considering both the full-plant model described in (1) and the disturbance contribution given in (2). In the discrete-time domain, the output of the virtual system can therefore be expressed as

y ( k ) = i g 1 ( k ) + i g 2 ( k ) , (13)

where ig1(k) = G(z)u(k) represents the plant response to the control action, and ig2(k) = Gvd(z)vd(k) corresponds to the disturbance-induced component.

The choice of some strategies and implementation in this work yields first a clarification and correct conceptualization before detailing the proposed procedure. The theoretical foundations of persistency of excitation, sufficient richness, and their impact on the convergence properties of adaptive parameters are essential. These concepts provide the rationale behind the choice of excitation signals and explain the expected convergence behavior of the adaptive law.

A. Persistency of excitation and sufficient richness

Consider the adaptive law in (9). The convergence of the parameter estimates depends critically on the excitation properties of the vector ω(k) from the regressor vector defined in (11), as established in [22].

Definition I (persistency of excitation).

A signal ω(k) ∈ ℝm is persistently exciting (PE) of order m if there exist constants α > 0 and an integer N > 0 such that, for all k,

Σ i = k k + N   ω ( i ) ω T ( i ) ≥ α I m (14)

where Im denotes the m × m identity matrix. This condition guarantees that, within every time window of length N, the regressor explores all parameter directions, resulting in a full-rank correlation matrix and enabling complete parameter identifiability [22].

Definition II (sufficient richness).

An input signal r(k) is sufficiently rich of order n if it contains at least n/2 distinct frequencies [22]. For instance,

r ( k ) = Σ i = 1 m   A i sin ω i k T s , m ≥ n 2 , ω i ≠ ω j (15)

is sufficiently rich to identify n parameters, since each sinusoid introduces two independent conditions (sine and cosine components).

To clarify, Definition II can be explored such that:

  1. A step input excites only the zero frequency and allows the identification of at most one parameter;

  2. A single sinusoid excites two independent directions (sine and cosine), enabling identification of up to two parameters;

  3. Two distinct sinusoids provide four independent conditions, thus sufficient for four parameters;

n In general, n/2 distinct sinusoids are required to

identify n parameters.

B. Fast and slow convergence

The excitation properties described above directly determine the convergence behavior of adaptive systems. In particular, the rate and accuracy of parameter convergence depend on whether ω(k) from the regressor vector ζ(k) satisfies the PE condition [22].

Fast convergence: If ω(k) is PE of order n (matching the number of unknown parameters), the correlation matrix (14) is full rank. Consequently, a unique solution θ* exists, and:

  • θ(k) → θ* asymptotically,

  • the tracking error satisfies e1(k) → 0 for arbitrary reference trajectories.

This regime is referred to as fast convergence, since the adaptation law has access to all independent directions needed to reconstruct the true parameter vector.

Slow convergence: If ω(k) is not PE, the correlation matrix is rank-deficient, and multiple parameter vectors are consistent with the observed input-output data. In this case:

  • θ(k) → θ¯, where θ¯ is an equivalent parameter vector in the identifiable subspace,

  • e1(k) → 0 only for the specific reference trajectory applied (e.g., a step or single sinusoid).

This is the slow convergence regime: parameters converge only partially, and good tracking is limited to the reference that excites the system.

Remark. In the presence of unmodeled dynamics or transport delays, even under PE conditions, the error e1(k) may not converge exactly to zero, but only to a residual set (e1(k) → Er). In such scenarios, the parameters converge to θ¯, an equivalent solution that minimizes the tracking error in sense rather than recovering the true plant parameters.

TABLE 1
Summary of convergence properties under PE and non-PE conditions.
C. Impact of µ on RMRAC tracking capabilities

The distinction between PE and non-PE inputs also defines which classes of reference trajectories can be tracked with µ = 0 and µ ≠ 0 considering the same set of tuning gains according to RMRAC theory [22]. This explains the practical differences in performance between controllers relying solely on RMRAC and those augmented with robust compensation mechanisms such as super twisting sliding mode action.

Case 1: With PE. When ω(k) is sufficiently rich:

  1. RMRAC (µ = 0): The parameters converges to θ*, and the output tracks arbitrary references with e1(k) → 0.

  2. RMRAC (µ ≠ 0): The parameters converge to an equivalent vector θ¯ that minimizes the error. In this case, the output does not track arbitrary reference trajectories, but only the specific excitation signal, with e1(k)→εr* due to the model mismatch, where εr* is a residual set under a PE signal.

  3. RMRAC-FASTSM (µ ≠ 0 ): The parameters still converge to an θ¯, but the robust super twisting sliding mode action further compensates unmodeled dynamics, still not able to track arbitrary references due to the mismatch but with e1(k) → 0 under restrict conditions, or in general cases, reducing the residual tracking error e1(k)→εr∗− with εr∗− being a smaller residual set under a PE signal.

Case 2: Without PE. When ω(k) is not persistently exciting:

  1. RMRAC (µ = 0): The parameters converge to an equivalent vector θ¯ that minimizes the error. In this case, the output does not track arbitrary reference signals, but only the specific excitation reference, with e1(k) → 0.

  2. RMRAC (µ ≠ 0): The same limitation applies, but residual error remains due to unmodeled dynamics, even if the input is simple with e1(k)→εr· due to the model mismatch, where εr· is a residual set under a non-PE signal.

  3. RMRACFASTSM (µ ≠ 0): Tracking is also restricted to the applied reference. However, the STSM component improves robustness by compensating part of the unmodeled dynamics, leading to reducing residual error e1(k)→εr·− with εr·− being a smaller residual set under a non-PE signal.

Table 1 summarizes the theory presented above, highlighting the key convergence behaviors, tracking capabilities, and residual sets under both PE and non-PE conditions.

D. Auto-tuning procedure

Based on the above theoretical considerations, the proposed tuning procedure employs a virtual plant model executed in parallel within the DSP as illustrate in Figure 2. The sequence implementation is given as follows.

  1. First, a initial trivial offline values of the adaptive gain vector is selected, such as θ = [ −1 0 0 0 0 0 ]. The adaptation hyperparameters κ and Γ can be deliberately increased to enhance the sensitivity of the parameter estimator, thereby accelerating the convergence rate;

  2. Next, a finite time interval need to be allocated to ensure proper convergence of the adaptive gains toward steady state before switching;

  3. The experiment then starts with the virtual model excited by a PE signal such as a square-wave reference. This excitation is intentionally chosen due to its rich harmonic content, which guarantees PE condition for regressor vector, thereby promoting faster and more reliable convergence of the adaptive gains;

  4. Once parameter convergence is achieved in the virtual environment, and before switching to the physical model, it is necessary to reset all closed-loop internal states and signals. This step prevents any trends accumulated under the persistently exciting (PE) input in the virtual system from propagating into the physical plant, which could otherwise degrade synchronization performance.

  5. Finally, the virtual switching mechanism, represented in Fig. 2 by the three yellow switches (S1, S2, and S3)—disconnects the controller from the virtual model and seamlessly connects it to the physical grid-tied converter, enabling real-time operation with the tuned parameters.

V. CONTROLLER DESIGN AND EXPERIMENTAL SETUP

The configuration of the control loop comprises an inherent one-sample time delay in the implementation of the control action. Since for model reference-based controllers, the complexity and the processing requirements are increased in regard to the relative degree of the plant, reducing the order of the system may considerably simplify the project. The methodology for this process is presented in [23], which involves the following separation of the system G(s) = G0(s)+µ∆a(s), where G0(s) is the known part of the system and µ∆a represents an additive unmodeled dynamics. Hence, in order to define G0 as a first-order transfer function, the capacitor dynamics are neglected (C = 0), resulting in

G 0 ( s ) = 1 L c + L g s + R c + R g (16)

This approach is considered only for controller design, which imposes a challenge such that the neglected dynamics in practice force the control to be robust enough to deal with it. Therefore, the developed adaptive controller is implemented for three-phase current regulation of a 5.2 kW DC-AC grid-tied converter with LCL filter. The real plant described as G(z) is measured without any simplification. Figure 4 shows the laboratory setup.

FIGURE 4
Laboratory prototype: a) DSP TMS320F8335, b) Current Probes, c) LCL filter and d) Full-bridge inverter.

Table 2 presents the design setup.

TABLE 2
System parameters.

With regard to the aforementioned setup, considering the sample time Ts = 1/5000 s, the modeling part of the plant yields G0(z)=0.1527z−0.9847, and so that, the model reference is chosen to ensure unit gain in steady state and to accelerate reference tracking, being selected as Wm(z)=0.3z−0.7. The controller design parameters are defined as σ0 = 0.1, M0 = 15 ¯m2 = 20, δ0 = 0.7, δ1 = 1, and δf = 0.5. Thus, for hyperparemeters relative to adaptive law, the design is presented in Table 3.

TABLE 3
Hyperparameters values.

Moreover, the initial auto-tuning gains are the same as presented in the auto-tuning procedure section. For the empirical approach, first a previous experiment to improve initial transient performance was performed. Then, the final gains of the first simulation were used as the initial gains of the experimental test, whose results are presented in the next section. The gains are θα(0) = [−0.5377 − 0.1925 − 0.3115 − 0.00027 0.0526 0.4105] and θβ(0) = [−0.8236 − 0.4920 − 0.1335 − 0.0125 0.0622 0.7465]

VI. EXPERIMENTAL RESULTS

The experimental results were conducted by comparing the performance of the RMRAC-FASTSM controller under auto-tuning and empirical tuning approach.

A. Steps to implement the RMRAC-FASTSM algorithm

The implementation steps are outlined as follows:

Algorithm 1: Controller Implementation Steps Update reference signal r(k); Update reference model ym(k); Update output y(k); Update regressor vector ζ(k); Update norm of θ(k); Update σ-modification; Update tracking error e1(k); Update switching function; Update STSM nonlinear term v1(k); Update STSM integral term v2(k); Update majorant signal m¯2(k); Update gains vector θ(k + 1); Update control action u(k);

B. Steps of the experiments

The total experiment duration was determined according to the DSP memory limitations. To ensure that the entire experiment could be stored in the internal buffer, the data acquisition rate was set to 1 every 4 sample (1260 Hz), given the 5040 Hz switching and sampling frequency. With this configuration, the buffer capacity of 2000 samples corresponds to a total experiment time of 1.5873 s (approximately 1.6 s). It should be noted that, if all samples had been stored (acquisition at 5040 Hz), the maximum recordable time would have been significantly shorter.

Additionally, as previously described in the autotuning procedure section, it is necessary to allocate sufficient time to properly tune the gains in the automatic approach. For this purpose, 250 buffer samples were reserved for the auto-tuning stage. During this interval, the acquisition rate was reduced to 1 every 60 samples, so that the 250 buffer points covered a longer duration. This configuration resulted in a total auto-tuning stage time of 2.97619 s, sufficient to ensure convergence in the virtual model.

After the auto-tuning stage, the controller was synchronized with the physical converter, and the acquisition rate was set back to 1 every 4 samples (1260 Hz). Consequently, there exists a time discrepancy between the automatic and empirical tuning approaches in steady-state behavior after synchronization, since the empirical tuning counts with an additional 0.1984 s in the synchronization steady-state. Furthermore, considering the extended auto-tuning interval, the total experiment duration with automatic tuning was approximately 4.365 s, being 1.389 s the total time after synchronization, whereas the overall empirical tuning experiment lasted approximately 1.587 s.

The following step-by-step sequence summarizes the experimental procedure carried out for both the autotuning and the empirical tuning approaches.

  • Auto-tuning: At t = 0 s, the controller operates in the virtual environment for gain adjustment using the proposed auto-tuning procedure. The hyperparameters κ and γ are set to 2400 and 1, respectively. At t = 2.976 s, the hyperparameters κ and γ is reset to 250 and 10, respectively, also, the internal states and signals (u(k − 1), r(k − 1), y(k − 1), v1(k − 1), v2(k − 1), ζ(k − 1), m2(k − 1)) is all set to zero, so the virtual switching mechanism connects the controller to the physical plant and the inverter initiates the synchronization injecting current based on a sinusoidal reference of 20A at 60Hz with an initial phase of 0◦, with the electrical grid. At t = 3.44 s, a parametric variation is applied on the grid side, increasing rg2 from 50 mΩ to 100 mΩ and Lg2 from 0.3 mH to 1.3 mH. At t = 3.73 s, the current reference amplitude is increased from 20A to 25A. The experiment concludes at t = 4.365 s, corresponding to the full buffer capacity of 2000 samples.

  • Empirical tuning: At t = 0 s, the controller starts directly on the physical inverter using empirically defined gains and immediately begins current injection based on a sinusoidal reference of 20 A at 60 Hz with an initial phase of 0◦. At t = 0.6626 s, the parametric variation is applied on the grid side, increasing rg2 from 50 mΩ to 100 mΩ and Lg2 from 0.3 mH to 1.3 mH. At t = 0.9526 s, the reference current amplitude is increased from 20 A to 25 A. The experiment concludes at t = 1.58730 s, corresponding to the full buffer capacity of 2000 samples.

C. Experimental results: Injected currents (α/β)

Figures 5 and 6 present the experimental results of the model-reference currents and the output system currents in the αβ coordinates, for the cases of auto-tuning and empirical tuning, respectively.

FIGURE 5
Auto-tuning: a) Virtual and physical overview. b) Overall physical performance, c) Parametric variation, and d) Load step.
FIGURE 6
Empirical tuning: a) Overall physical performance, b) Parametric variation, and c) Load step.

As can be seen in Figure 5-a, related to auto-tuning current control, a square-wave reference was applied to the virtual plant in the first stage, while the real grid disturbance measured by the KF-PLL was injected into the virtual model. The hyperparameters κ and Γ are over dimensioned. Although higher values induce more oscillatory transients, such effects remain confined to the virtual environment.

After synchronization, the overall experimental results for both the auto-tuning and empirical tuning approaches are presented in Figure 5-b and Figure 6-a, respectively. It can be observed that the auto-tuning strategy exhibits smoother transients and demonstrates greater robustness against disturbances, including synchronization, parametric variations, and load steps. This behavior is further highlighted in the zoomed views: Figures 5-c and 5-d show the transient performance of the auto-tuning method, while Figures 6-b and 6-c illustrate the less consistent behavior obtained with empirical tuning.

D. Experimental results: tracking errors (e1)

Figures 7 and 8 present the tracking error for the cases of auto-tuning and empirical tuning, respectively.

FIGURE 7
Auto-tuning: a) Virtual and physical tracking error overview, b) Overall tracking error physical performance, c) Parametric variation, and d) Load step.
FIGURE 8
Empirical Tuning: a) Overall tracking error, b) Parametric variation, and c) Load step.

During the virtual tuning stage, as shown in Fig. 7-a, the tracking error remained relatively high because the virtual plant is represented by a reduced-order model, the hyperparameters κ and Γ are excessively large, and the system is further affected by the harmonic content of the square-wave input, which excites the LCL filter resonance and amplifies specific frequency components. As a result, the adaptive gains converge not to the true parameter vector θ* but to an equivalent solution θ¯, leading the tracking error to settle in a residual set rather than vanish completely.

Furthermore, as summarized in Fig. 7 and Fig. 8, together with the numerical results considering Total RMS and Partial (RMS*) in Table 4, being Sync., L.S., and P.V. refer to synchronism, load step, and parametric variation, respectively, the proposed auto-tuning approach clearly outperforms the empirical tuning baseline.

TABLE 4
RMS values for empirical and auto-tuning approach.

In the second stage, after switching to the physical plant and replacing the square-wave excitation with the normalized sinusoidal reference generated by the KFPLL, the auto-tuning case (Fig. 7-b) exhibits a significantly smaller initial transient compared to the empirical case (Fig. 8-b). Quantitatively, the steady-state tracking error was reduced from 1.71 A to 1.21 A and from 1.87 A to 1.60 A in α and β coordinate, respectively, evidencing superior steady-state accuracy. Similarly, considering the transient behavior, in the synchronization stage, the RMS error dropped from 0.82 A (empirical) to 0.494 A (auto-tuning) and from 1.12 A to 0.84 A in α and β coordinate, respectively, confirming the smoother transient behavior. Under parametric variations (Figs. 7-c and 8-c), the proposed strategy achieved a reduction from 0.39 A to 0.30 A in scenario α, while maintaining competitive performance in scenario β. Finally, during load steps (Figs. 7-d and 8-d), the RMS tracking error decreased from 0.48 A to 0.41 A in scenario α, and from 0.42 A to 0.39 A in scenario β, showing better adaptability to abrupt changes. These results confirm that the robustness of the hybrid RMRAC-FASTSM, combined with the persistency of excitation in the virtual tuning stage, enables smoother transition, reduced transient mismatches, and consistently smaller residual track errors compared to empirical tuning.

E. Experimental results: adaptive gains (θ)

Figure 9 shows the auto-tuning adaptive gains. An additional benefit observed with the virtual plant-based tuning procedure is its improved performance under parametric variations and load changes, even though the steady-state reference signal in both approaches originates from the KF-PLL.

FIGURE 9
Auto-tuning: adaptive Gains in, a) α, and b) β.

This can be explained by the fact that, during the virtual tuning stage, the adaptive law is exposed to a PE input signal, which enforces a richer excitation of the regressor vector than the sinusoidal KF-PLL reference alone. As a result, the parameters converge more consistently to an equivalent solution θ¯, which is more robust across different operating conditions. When the controller is later connected to the physical plant, the adaptive gains are already tuned within a region that minimizes the error with e1(k)→εr∗−. The contrast can be seen in Figure 10.

FIGURE 10
Empirical tuning: adaptive gains in, a) α and, b) β.

The empirical initialization followed by adaptation under a non-PE signal (pure sinusoidal reference) cannot guarantee robustness. In this case, the adaptive gains appear sluggish, remaining confined to a narrow region and exhibiting only small variations in overall response. Furthermore, when comparing the convergence regions, it can be observed that the auto-tuning approach drives the adaptive gains toward distinctly different regions compared to empirical tuning.

F. Experimental results: control actions (u) and VCC

Figure 11 shows the control actions in the α and β coordinates.

FIGURE 11
Control action u and V CC bus, a) Auto-tuning (αβ), and b) Empirical Tuning (αβ).

As observed, both control signals - automatic tuning case (Figure 11-a) and in the empirical tuning case (Figure 11-b) - remain stable, bounded, and free from saturation. The DC-link voltage exhibits a slight dip during synchronization. However, both the DC-link voltage and the control actions remain stable in the other disturbances. It is important to emphasize that even during the automatic tuning stage, the control action remained stable without exhibiting excessive or undesirable values.

FIGURE 12
The 50th first harmonic contents of steady state grid-injected currents using RMRAC-FASTSM with automatic and empirical tuning approaches.

G. Grid-injected currents (igA,igB, igC)

Figures 13 and 14 show the waveforms in the abc coordinates. As observed in Figures 13-a and 14-a, the automatic tuning strategy provides a visibly smoother grid connection, ensuring softer synchronization with a clear reduction of transient effects. The overall behavior further confirms this result, as shown in Figures 13-b and 14-b for the automatic and empirical tuning cases, respectively. Additionally, both figures illustrate the system response under parametric variation and steady-state conditions, highlighting satisfactory performance in both approaches.

FIGURE 13
Auto-tuning: grid-injected currents in a) Initial transient behavior, b) Overall performance, c) Load step and d) Steady-state.
FIGURE 14
Empirical Tuning: grid-injected currents in a) Initial transient behavior, b) Overall performance, c) Load step and d) Steady-state.

Regarding the harmonic content of the injected currents, the total harmonic distortion (THD) was implemented through a cycle-by-cycle FFT-based algorithm, where each cycle is processed individually to remove DC components, compute the fundamental magnitude, and determine harmonic amplitudes up to the 50th order. The THD for each cycle is then calculated and averaged across all cycles and phases. Also, the measurement window is shown in Figure 13-b. The results indicate similar values for both strategies. For the automatic tuning case, the THD values were 3.36%, 3.73%, and 3.32% for igA, igB, and igC, respectively. For the empirical tuning case, the values were 3.09%, 3.76%, and 3.51%, respectively. The average THD was 3.47% for the automatic tuning and 3.45% for the empirical tuning. A direct THD harmonic content comparison is presented in Figure 12.

Although the THD values are very similar, it can be observed that the automatic tuning produced lower tracking errors throughout each transient and in the overall response. Moreover, considering the primary objective, it is not necessary to carefully select initial gain values, as the proposed method is capable of generating an appropriate set of gains automatically.

VII. CONCLUSION

This work proposed a virtual system-based procedure for the automatic online tuning of an RMRAC-FASTSM controller applied to grid-tied converters with LCL filters. By exploiting a reduced-order virtual model and persistently exciting inputs during the adaptation stage, the method enables the controller to converge to equivalent parameter values that minimize the tracking error before connection to the physical plant.

Experimental results demonstrated that the proposed procedure provides smoother synchronization with the grid, smaller transient deviations, and reduced residual errors compared to conventional empirical tuning. Moreover, the strategy showed superior robustness under

parametric variations and load disturbances, while maintaining stable control actions and acceptable harmonic distortion levels in the injected currents. The study confirms, with experimental results, the theoretical principles of persistency of excitation, sufficient richness, and convergence regimes, highlighting that automatic online tuning eliminates the need for empirical gain selection or iterative offline optimization algorithms. Therefore, the proposed approach contributes to bridging the gap between advanced adaptive control theory and its practical deployment in grid-tied power systems.

ACKNOWLEDGMENT

This study was financed in part by the Coordenação de Aperfeiçoamento de Pessoal de Nível SuperiorBrasil (CAPES/PROEX) Finance Code 001, in part by the CNPq under Grant 308082/2025-7, and in part by PROEX under Grant 88887.649758/2021-00.

PLAGIARISM POLICY

This article was submitted to the similarity system provided by Crossref and powered by iThenticate Similarity Check.

DATA AVAILABILITY

The data used in this research is available in the body of the document.

REFERENCES

  • 1 B. Igliński, U. Kiełkowska, K. Mazurek, S. Drużyński, M. B. Pietrzak, G. Kumar, A. Veeramuthu, M. Skrzatek, M. Zinecker, G. Piechota, “Renewable energy transition in Europe in the context of renewable energy transition processes in the world. A review”, Heliyon, vol. 10, no. 24, 2024, doi:10.1016/j.heliyon.2024.e40997.
    » https://doi.org/10.1016/j.heliyon.2024.e40997
  • 2 Y. Han, M. Yang, H. Li, P. Yang, L. Xu, E. A. A. Coelho, J. M. Guerrero, “Modeling and stability analysis of LCL-type grid-connected inverters: A comprehensive overview”, IEEE Access, vol. 7, pp. 114975–115001, 2019, doi:10.1109/ACCESS.2019.2935806.
    » https://doi.org/10.1109/ACCESS.2019.2935806
  • 3 D. Khan, M. Qais, H. Hasanien, S. Alghuwainem, I. Sami, P. Hu, “Enhanced stability of grid-connected inverter using adaptive filtering damping of capacitive current feedback of LCL filter”, Ain Shams Engineering Journal, vol. 16, no. 8, p. 103465, 2025, doi:10.1016/j.asej.2025.103465.
    » https://doi.org/10.1016/j.asej.2025.103465
  • 4 G. Schettino, G. Sorrentino, G. Scaglione, C. Nevoloso, A. O. Di Tommaso, R. Miceli, “A General Analytical Formulation for LCL Filter Design for Grid-Connected PWMDriven Cascaded H-Bridge Inverters”, IEEE Open Journal of Power Electronics, vol. 5, pp. 1129–1148, 2024, doi:10.1109/OJPEL.2024.3432990.
    » https://doi.org/10.1109/OJPEL.2024.3432990
  • 5 R. Ali, H. Heydari-doostabad, S. Sajedi, T. O’Donnell, “Improved design of passive damping for single phase gridconnected LCL filtered inverter considering impedance stability”, IET Power Electronics, vol. 17, no. 4, pp. 511–523, 2024, doi:10.1049/pel2.12666.
    » https://doi.org/10.1049/pel2.12666
  • 6 J. Zhu, Y. Li, F. Z. Peng, B. Lehman, H. Huang, “From Active Resistor to Lossless and Virtual Resistors: A Review, Insights, and Broader Applications to Energy Grids”, IEEE Journal of Emerging and Selected Topics in Power Electronics, vol. 13, no. 1, pp. 1053–1068, 2025, doi:10.1109/JESTPE.2024.3481440.
    » https://doi.org/10.1109/JESTPE.2024.3481440
  • 7 J. Jo, H. Cha, “Design of Effective Passive Damping Resistor of Grid-Connected Inverter with LCL Filter for Industrial Applications”, Journal of Electrical Engineering & Technology, vol. 14, no. 5, pp. 2039–2048, sep 2019, doi:10.1007/s42835019-00239-1.
    » https://doi.org/10.1007/s42835019-00239-1
  • 8 R. Errouissi, A. Al-Durra, “Design of PI Controller Together With Active Damping for Grid-Tied LCL-Filter Systems Using Disturbance-Observer-Based Control Approach”, IEEE Transactions on Industry Applications, vol. 54, no. 4, pp. 3820–3831, 2018, doi:10.1109/TIA.2018.2823258.
    » https://doi.org/10.1109/TIA.2018.2823258
  • 9 G. Shen, X. Zhu, J. Zhang, D. Xu, “A New Feedback Method for PR Current Control of LCL-Filter-Based Grid-Connected Inverter”, IEEE Transactions on Industrial Electronics, vol. 57, no. 6, pp. 2033–2041, 2010, doi:10.1109/TIE.2010.2040552.
    » https://doi.org/10.1109/TIE.2010.2040552
  • 10 D. Pérez-Estévez, J. Doval-Gandoy, A. G. Yepes, O. Lopez, F. Baneira, “Enhanced resonant current controller for gridconnected converters with LCL filter”, IEEE Transactions on Power Electronics, vol. 33, no. 5, pp. 3765–3778, 2017, doi:10.1109/TPEL.2017.2770218.
    » https://doi.org/10.1109/TPEL.2017.2770218
  • 11 S. Chakiri, Y. Abouelmahjoub, Y. Mchaouar, H. Abouobaida, F. Giri, O. Khentaoui, “Sensorless integral backstepping control of a single-stage photovoltaic system connected to the single-phase grid using a multi-level NPC inverter with an LCL filter”, IFAC-PapersOnLine, vol. 58, no. 13, pp. 98–103, 2024, doi:10.1016/j.ifacol.2024.07.466.
    » https://doi.org/10.1016/j.ifacol.2024.07.466
  • 12 E. Mattos, L. C. Borin, J. D. O. Paulo, G. V. Hollweg, V. F. Montagner, “Comparison Between Partial and Full State Feedback Controllers Optimized for Grid-Connected Converters Subject to Parameter Uncertainties (in portuguese)”, Eletrônica de Potência, vol. 28, no. 1, pp. 7–16, 2023, doi:10.18618/REP.2023.1.0044.
    » https://doi.org/10.18618/REP.2023.1.0044
  • 13 P. J. D. O. Evald, G. V. Hollweg, R. V. Tambara, H. A. Gründling, “A discrete-time robust adaptive PI controller for grid-connected voltage source converter with LCL filter”, Eletrônica de Potência, vol. 26, no. 1, pp. 19–30, 2021, doi:10.18618/REP.2021.1.0053.
    » https://doi.org/10.18618/REP.2021.1.0053
  • 14 G. V. Hollweg, P. J. D. O. Evald, R. V. Tambara, R. Z. Azzolin, H. A. Grundling, M. L. Martins, “Grid-Connected Photovoltaic Quasi-Z-Source Inverter with LCL Filter Using a Reduced Model Cascade MRAC-SM Structure for Weak Grid Applications (in portuguese)”, Eletrônica de Potência, vol. 26, no. 2, pp. 205–216, 2021, doi:10.18618/REP.2021.2.0069.
    » https://doi.org/10.18618/REP.2021.2.0069
  • 15 G. V. Hollweg, P. J. D. O. Evald, G. G. Koch, E. Mattos, R. V. Tambara, H. A. Gründling, “Controlador Robusto Adaptativo Super-Twisting Sliding Mode por Modelo de Referência para Regulação das Correntes Injetadas em Redes Fracas por Inversores Trifásicos com Filtro LCL”, Eletrônica de Potência, vol. 26, no. 2, p. 147158, Jun. 2021, doi:10.18618/REP.2021.2.0001.
    » https://doi.org/10.18618/REP.2021.2.0001
  • 16 W. B. Da Silveira, P. J. D. O. Evald, G. X. Prestes, D. M. C. Milbradt, R. V. Tambara, H. A. Gründling, “A Discrete-time Robust Adaptive Second-Order Sliding Mode Controller for Grid-connected Power Systems with LCL Filter”, in 2023 15th Seminar on Power Electronics and Control (SEPOC), pp. 1–6, 2023, doi:10.1109/SEPOC58810.2023.10322643.
    » https://doi.org/10.1109/SEPOC58810.2023.10322643
  • 17 H. Iqbal, A. Sarwat, “Improved Genetic Algorithm-Based Harmonic Mitigation Control of an Asymmetrical Dual-Source 13-Level Switched-Capacitor Multilevel Inverter”, Energies, vol. 18, no. 1, p. 35, 2024, doi:10.3390/en18010035.
    » https://doi.org/10.3390/en18010035
  • 18 C. Sreenu, G. Mallesham, T. C. Shekar, S. R. Salkuti, “Pairing voltage-source converters with PI tuning controller based on PSO for grid-connected wind-solar cogeneration”, Franklin Open, vol. 8, p. 100138, 2024, doi:10.1016/j.fraope.2024.100138.
    » https://doi.org/10.1016/j.fraope.2024.100138
  • 19 W. C. Duesterhoeft, M. W. Schulz, E. Clarke, “Determination of instantaneous currents and voltages by means of alpha, beta, and zero components”, Transactions of the American Institute of Electrical Engineers, vol. 70, no. 2, pp. 1248–1255, 1951, doi:10.1109/T-AIEE.1951.5060554.
    » https://doi.org/10.1109/T-AIEE.1951.5060554
  • 20 M. Ali, A. A. Alhussainy, F. Hariri, S. Alghamdi, Y. A. Alturki, “Performance Assessment of Current Feedback-Based Active Damping Techniques for Three-Phase Grid-Connected VSCs with LCL Filters”, Mathematics, vol. 13, no. 16, p. 2592, 2025, doi:10.3390/math13162592.
    » https://doi.org/10.3390/math13162592
  • 21 P. A. Ioannou, K. S. Tsakalis, “A Robust Discrete-time Adaptive Controller”, 25th IEEE Conference on Decision and Control, pp. 838 – 843, 1986, doi: 10.1109/CDC.1986.267486.
    » https://doi.org/10.1109/CDC.1986.267486
  • 22 P. A. Ioannou, J. Sun, Robust Adaptive Control, 1996.
  • 23 P. J. D. O. Evald, R. V. Tambara, H. A. Gründling, “A Direct Discrete-Time Reduced Order Robust Model Reference Adaptive Control for Grid-Tied Power Converters with LCL Filter”, Eletrônica de Potência, vol. 25, no. 3, p. 361372, Sep. 2020, doi:10.18618/REP.2020.3.0039.
    » https://doi.org/10.18618/REP.2020.3.0039

*

Corresponding author. e-mail: wagner.silveira@acad.ufsm.br

Edited by

The review of this paper was arranged by Associate Editor Edivan L. C. da Silva https://orcid.org/0000-0002-8389-8703 and Editor-in-Chief Heverton A. Pereira https://orcid.org/0000-0003-0710-7815

PLAGIARISM POLICY

This article was submitted to the similarity system provided by Crossref and powered by iThenticate Similarity Check.

Publication Dates

  • Publication in this collection
    26 Jan 2026
  • Date of issue
    2025

History

  • Received
    15 Sept 2025
  • Accepted
    21 Oct 2025
  • Published
    30 Oct 2025
location_on
Associação Brasileira de Eletrônica de Potência (SOBRAEP) Universidade Federal de Viçosa - UFV, Departamento de Engenharia Elétrica - DEL, Gerência de Especialistas em Sistemas Elétricos de Potência - GESEP, Av. P.H. Rolfs, Campus Universitário, S/nº Cep: 36570-900, +55(31) 3612-6400 - Viçosa - MG - Brazil
E-mail: editor@sobraep.org.br
rss_feed Stay informed of issues for this journal through your RSS reader
Go to top