Introduction

The emergence of power electronics-based equipment causes serious voltage perturbations in the power supply system which affects the reliability of power. This power quality (PQ) concern is a hotspot in the areas of research and attracted many researchers to maintain the quality of power [1]. To ensure the PQ disturbances many compensating devices have been addressed and used in the last two decades. The DVR is more reliable and suitable for compensating voltage-sensible issues and provides a cost-effective solution [2]. The performance of the DVR is primarily depending upon how fast and accurately it estimates the fundamental reference signal under dynamic conditions. Several control theories have been reported in the literature for the estimation of reference control signals and extraction of the fundamental component under distorted conditions [3]. Myriads of control techniques based on time and frequency are available in the existing literature for compensation such as p-q theory [4] and d-q theory [5] based on time-domain analysis, while the Kalman filter [6] and wavelet transform [7] are based on frequency for classifying the power quality disturbances (PQD). The drawbacks of above-said control algorithms have high computational complexity, more memory requirement and fails if more sudden critical disturbances occur in the supply voltage.

Recently, authors have reported the advantages and drawbacks of other adaptive filters such as MCCF-SOGI [8] and sliding mode control integrated with adaptive notch filters [9] for various voltage and current-related PQ perturbations. Some other adaptive controllers are Least Mean Square (LMS) [10], Variable Step-Size LMS (VSLMS) [11], Variable Fractional Power LMS [12] and Zero Attracting-LMS [13]. The feature of parameter dependency is the main drawback of these adaptive-based controllers due to limited performance. Despite a myriad of control strategies being actualized in the literature based on nonlinearity and suffering from imperfection, it motivates the researchers to develop a prominent control strategy for voltage compensation [14]. In [15] authors have reported the negative influence of solar grid-tied systems on the power distribution network and investigated the performance monitoring of artificial intelligence (AI). The optimized dynamic voltage restorer (DVR) is integrated with self-tuned fuzzy-proportional-integral control employed for alleviating the power quality concerns and regulating the load voltage [16]. The stability-related issue in the fuzzy system is reported in the literature [17]. This work focuses on the enhancement of voltage PQ using machine learning (ML)-based DVR, and it will be controlled by an optimized ReTSK and RPFNN control. The training speed and tracking features have made the proposed scheme advantageous in terms of improved dynamic response which makes the system suitable for implementation in real time.

Recently, a significant effort has been initiated to employ an intelligent theory-based control that handles uncertainties and sudden disturbances efficiently. The proposed DVR compensator takes advantage of ML ability in terms of intelligent performance and replaces the aforementioned conventional control schemes. The proposed ReTSK-based DVR model efficiently evaluates the actual sensed supply voltage with minimum steady-state error. The simplified extraction of fundamental weight components from distorted supply voltage is the key advantage of implementing ReTSK and maintains the stability of the system. The new algorithm SOA is gradient-free and it proves its effectiveness during tuning the controller’s coefficient [18] [19]. This Seagull optimization scheme is employed in the controller design for the simultaneous online tuning of premise and consequent membership functions (MFs) and the optimal selection of rules. The proposed approach was not used earlier in PQ applications for the fundamental d-q weight quantity estimation.

The DC- and AC-link voltage regulation of DVR plays the main role in stabilizing the dynamics and maintaining the constant three-phase load voltage under the scenarios of voltage disturbance in the grid. Several control techniques are presented in the literature for stabilizing the fluctuation in DC-link voltage like DC-PI, PSO-PI, GSA-PI and GWO-PI, and their performances are assessed based on indicators like rise time, settle time, peak overshoot and undershoot [20]. The key issue of the classical PI controller is that it takes relatively more transitory time to restrain under an acceptable tolerance band of 2%. Due to this it fails to offer optimal solutions and is responsible for surges and overshoot. However, next-generation intelligent controllers are proposed such as fuzzy neural and adaptive neuro-fuzzy for online tuning mechanisms to improve the deficiencies of the classical PI tuning method. In [21] authors have presented capacitor-connected DVR in which PI coefficients are optimized by using PSO. In [22] authors have employed ant colony optimization (ACO) for the optimization of Kp and Ki value and improve the DVR control performance. In [23] authors have implemented real-coded GA-based DVR for the PI and fuzzy logic (FL) coefficients optimization for PQ improvement. Authors in Ref. [24] illustrate a unique solution for the management of batteries with intelligent controllers like artificial neural network (ANN) designed to regulate the Passive Cell Balancing (PCB). The authors have discussed the applications of cell balancing techniques which are considered the important feature required for managing the battery [25] [26]. In [27] [28] soft computational methods like artificial neural network (ANN) and adaptive neuro-fuzzy inference system (ANFIS) controlling schemes are proposed for improving the performance of Electronic Load Controller (ELC) to deliver reliable power to customers. This intelligent approach reduces the response time and provides better dynamic performance compared with classical PI controllers under voltage disturbance. Lately, the recurrent probabilistic fuzzy neural network (RPFNN) has currently created by retaining the temporal properties of the input data set utilizing feedback connections [29]. The RPFNN is hence more effective than classical feedforward networks. The merit of the proposed RPFNN structure is to tackle dynamical inputs or outputs and effectively process the complex spatiotemporal patterns due to its recurrent connections which gives the network memory to store more information [30]. Therefore, the RPFNN controller is proposed for the complex system inputs or outputs and integrated with advanced Rat Swarm Optimization (RSO) to yield the optimum interconnected weight among the layers and provide faster convergence [31]. The optimal selection of neurons, weights and bias improves the transients under load-varying conditions using RSO optimization. The proposed RPFNN-RSO model is a trained controller for the DVR which regulates the DC- and AC-link voltage and compensates voltage THD.

The main contribution claims in this study are the successful extraction of trained ReTSK and RPFNN models employed for the compensation scheme and the stabilization of DC-link voltage fluctuation of the DVR. A self-learning ReTSK model was implemented for the online identification of weights of the output layer which are more relevant than the weights of the hidden layer. Here, the structure and parameters identification are done simultaneously and reduce the mean weight oscillation under sudden grid voltage issues. The fuzzy rules are designed using optimization techniques and eliminate the standard approach for estimating the PI controller's coefficient settings, which involves a manual tuning method like trial and error. However, depending on the individual's level of skill, the manual tuning approach can take a longer time than the usual timing for a complex system. Due to this reason, the authors have implemented the trained ReTSK-SOA and RPFNN-RSO controllers for the fast compensation scheme and developed the successful comparative study of DC-link voltage with the SRF-PI and ZA-LMS-PI conventional control methods. The proposed control method is tested on a scaled DVR model in the laboratory.

Proposed Ml-Based Dvr System Description

A 3-phase, 415-VL-L, 50-Hz ML-based DVR system configuration is demonstrated in Fig. 1. The reference load voltage is computed by employing ReTSK and RPFNN control. The proposed ReTSK and RPFNN-based control algorithm is actualized with a three-leg voltage source converter (VSC) which is connected at the Point of Interconnection (POI) through the interfacing inductors (Lf). The DC-link capacitor (Cdc) is used to minimize the DC side ripples and act as energy storage during transient conditions. The ripple filter is incorporated to block the unwanted harmonics generated by the switching of VSC [3]. The proposed RPFNN controller replaces the two PIs which are employed for voltage regulation of DC- and AC-link and has a satisfactory performance under any operating conditions.

Fig. 1
figure 1

DVR system configuration with intelligent control

Control Strategy

Before discussing the proposed control technique in detail, the major steps involved to obtain the required IGBT pulses like (i) fundamental weight components extraction for direct and quadrature axis, (ii) self-adjustment of weight using metaheuristic method, (iii) computation of Wd and Wq, (iv) the unit vectors estimation and (v) generation of the reference voltage and switching pulse.

Initially, direct and quadrature unit template (uda, u db and udc) and (uqa, uqb and uqc) vectors for the three phases are utilized for the fundamental extraction and reference load voltage evaluation [3]. The details of ReTSK and the learning mechanism are described in the later subsections.

Fundamental Estimation using ReTSK Control Algorithm [15, 16]

The architecture of the proposed ReTSK is depicted in Fig. 2. The proposed scheme is integrated with the kernel FCM (K-FCM) technique for input space partitioning, and it increases the convergence capability to yield the global optimal solutions. The ReTSK unit takes the inputs \({(V}_{{\text{sa}}}{V}_{{\text{sb}}}{V}_{{\text{sc}}})\) and the neurodes of second layer works with associated activation functions which is evaluated by the MFs \({\mu }_{j}^{i} (x)\) where \(x\in {(V}_{{\text{sa}}}{V}_{{\text{sb}}}{V}_{{\text{sc}}})\) in a randomized unit (ReTSK), weights and biases are randomly selected in a hidden layer. The meta-heuristic optimization methods Seagull is employed for the auto-tuning of ReTSK coefficients (rules, MFs numbers and shape of MFs) which enhances the accuracy of the proposed scheme of control in terms of reduced mean square error (MSE). The desired output \([W^{d} (t),W^{q} (t)]\) for varying inputs \({(V}_{{\text{sa}}}{V}_{{\text{sb}}}{V}_{{\text{sc}}})\) is decided by inference rule base system. The ReTSK produces an optimal set of inference fuzzy rules that adjust the assigned MFs until the error is reduced to the set value (0.0001) using Seagull optimization and the optimal FIS is obtained. The predicted results are validated with the statistical indices mean square error (MSE), root-mean-square error (RMSE), mean error (ME), standard deviation (SD) and correlation coefficient (R). The steps involved in the ReTSK unit for the fundamental weight component are derived as below.

Fig. 2
figure 2

Generation of the fundamental signal using ML-based ReTSK estimator

The model output of ReTSK with Nh hidden nodes, N distinct samples [\({x}_{i}\epsilon ({V}_{{\text{sa}},}{V}_{{\text{sb}},}{V}_{{\text{sc}},})\), target ‘wi’] and activation function f(x) is calculated as per Eq. (1). The model outcome Zj of the linear layer is determined as,

$$ \sum\limits_{i = 1}^{n} {\beta_{i} c_{i} (x_{j} } ) = \sum\limits_{i = 1}^{n} {\beta_{i} c(w_{i} x_{j} + b_{j} )} = Z_{j} \mathop {}\nolimits_{{}}^{{}} {\text{for j}} = {1}, \ldots .,{\text{n}} $$
(1)

where \(w_{i} = [w_{i1} ,w_{i2} ,...,w_{in} ]^{T}\) is the weight value link between the input nodes and the ith middle layer neurons \(\beta_{i} = [\beta_{i1} ,\beta_{i2} ,...,\beta_{im} ]^{T}\) denote the output weighted link between middle nodes and linear output node, while threshold of the jth intermediate node is denoted by \(b_{j}\). The predictive network approximation capability is high with zero error for the assigned problem. This implies the existence of \(\beta_{i}\) parameters,\(w_{i}\) and bi \(\sum\limits_{i = 1}^{n} {\beta_{i} c(w_{i} x_{j} + b_{j} )} = t_{j}\) for j = 1,..., n, where ‘t’ indicates the targeted weight vector. The uncertainties in the proposed network are solved by the random selection of weights (\(w_{i}\)) and bias (\(b_{j}\)) of the middle layer neurons. Then calculate the output matrix H of the middle layer. It is defined in Eq. (2).

$$ H\beta = T $$
(2)
$$ H = \left[ \begin{gathered} c(w_{1} \cdot x_{1} + b_{1} \cdots c(w_{N} \cdot x_{1} + b_{N} ) \hfill \\ \quad \quad \vdots \quad \quad \quad \ddots \quad \quad \quad \quad \quad \hfill \\ c(w_{1} \cdot x_{N} + b_{1} )^{{}} \vdots c(w_{N} \cdot x_{N} + b_{N} ) \hfill \\ \end{gathered} \right]_{N \times N} \quad \beta = \left[ \begin{gathered} \beta_{1}^{T} \hfill \\ \mathop {}\limits_{{}}^{{}} \vdots \hfill \\ \beta_{N}^{T} \hfill \\ \end{gathered} \right]_{N \times m} \quad T = \left[ \begin{gathered} t_{1}^{T} \hfill \\ \mathop {}\limits_{{}}^{{}} \vdots \hfill \\ t_{N}^{T} \hfill \\ \end{gathered} \right]_{N \times m} $$

and the output weight vector \(\beta_{i}\) is determined by solving,

$$ \beta = H^{ - 1} T $$
(3)

The term \(H^{ - 1}\) represents the Moore–Penrose generalized inverse of H matrix. This provides the estimated least-square response of the afore-said linearized system, and the computed solution is observed as unique. The linearized model matrix \(\beta\) is calculated by using (3). The randomness is controlled by using the explicit knowledge in the premise part of the fuzzy rules of ReTSK. Once the antecedent part is selected for the given input variables, then the H matrix in (4) can be easily evaluated.

$$ T_{P \times 1} = H_{{P \times m^{n} (n + 1)}} \beta_{{m^{n} (n + 1) \times 1}} $$
(4)

The randomized (ReTSK) architecture and layer structure are described as follows.

Rule 1 IF Vsab = E1, Vsb = G1 and Vsc = H1, then f1 = m1Vsa + n1Vsb + k1Vsc + r1.

Rule 2: IF Vsa = E2, Vsb = G2 and Vsc = H2, then f2 = m2Vsa + n2Vsb + k2Vsc + r2.

where mi, ni, ki and ri indicate the consequent tunable parameters, while the premise parameters are indicated by Ei, Gi and Hi. Then f1 and f2 represent the function’s output of the defined rules.

The individual function output of each neurode is computed as a linearized set of combinations between antecedent variables and the antecedent variables of each rule as given in Eq. (5).

$$ {\text{f}}_{{1}} = {\text{ m}}_{{1}} {\text{V}}_{{{\text{sa}}}} + {\text{ n}}_{{1}} {\text{V}}_{{{\text{sb}}}} + {\text{ k}}_{{1}} {\text{V}}_{{{\text{sc}}}} + {\text{ r}}_{{1}} $$
(5)

The individual outcome of every rule, defined in Eq. (6), is multiplied by the standardized activation levels of the rules to get the outcome of the model fk.

$$ f_{k} = \frac{{\sum {\overline{W}_{k} f_{k} } }}{{\sum {W_{k} } }},\mathop {}\nolimits_{{}}^{{}} k = 1,2,3 $$
(6)

where Wk is the normalized firing value combination of W1, W2 and W3.

Layer 1: Three inputs are assigned to this layer: denoted by Vsa, Vsb and Vsc. The output of the node is \(L_{i}^{1}\) computed as follows.

$$ \left. \begin{gathered} L_{{_{i} }}^{1} = \mu_{Ai} (x_{i} ),\quad i = 1,2 \hfill \\ L_{j}^{1} = \mu_{Bj} (y_{j} )\quad j = 1,2 \hfill \\ L_{k}^{1} = \mu_{Ck} (z_{k} )\quad k = 1,2 \hfill \\ \end{gathered} \right\} $$
(7.a)

where the term Ai, Bj, Ck represents the linguistic label and is properly characterized by MFs (µ) The crisp input to node i is given as \({(x}_{i},{y}_{j},{z}_{k})\epsilon \)(\({V}_{{\text{sa}}},{V}_{{\text{sb}}},{V}_{{\text{sc}}})\). Transforming the input variables into the fuzzy rule using selected MFs, i.e., Gaussian function and defined in Eq. (7.b).

$$ \mu_{{A_{ij} }} (x_{j} ) = {\text{e}} \left\{ { - \frac{{\left( {x_{j} - m_{Aij} } \right)^{2} }}{{2\sigma^{2}_{Aij} }}} \right\}\quad (i = 1,2,...,n,j = 1,2,...,m) $$
(7.b)

where \(A_{ij} (x_{j} )\) are antecedent fuzzy sets; \(m_{Aij}\) and \(\sigma_{Aij}\) represent the center and width of the jth membership function in the ith rule.

Layer 2: AND or product operation is executed in this layer for the defined input MFs. The subsequent node, which is defined by Eq. (7.c), utilizes the output of the product layer as its input weight function (7.c).

$$ L_{{_{i} }}^{2} = w_{i} = \mu_{Ai} (x)\mu_{Bi} (y)\mu_{Ci} (z),\quad i = 1,2 $$
(7.c)

where \(\mu A_{i} (x)\mu B_{i} (y)\mu C_{i} (z)\) represents the MFs for input vectors (Vsa, Vsb and Vsc).

Layer 3: This layer weights are normalizing the degree of the activation level of rules and are evaluated by Eq. (7.d).

$$ \begin{gathered} L_{i}^{3} = w^{d} = \overline{w}_{ap} = \frac{{w_{i} }}{{w_{1} + w_{2} + w_{3} }}\mathop {}\nolimits_{{}}^{{}} i = 1,2,3 \hfill \\ L_{j}^{3} = w^{q} = \overline{w}_{aq} = \frac{{w_{j} }}{{w_{1} + w_{2} + w_{3} }}\mathop {}\nolimits_{{}}^{{}} j = 1,2,3 \hfill \\ \end{gathered} $$
(7.d)

where \(\overline{w}_{ap}\) and \(\overline{w}_{aq}\) denote the normalized outputs of this layer. The rule layer’s outputs employ the consequent variables \({({\text{m}}}_{i,}{{\text{n}}}_{i},{{\text{k}}}_{i})\) and inputs signals \(\left[{\text{x}},{\text{y}},{\text{z}}\right]\in [{{\text{v}}}_{{\text{sa}}},{{\text{v}}}_{{\text{sb}}},{{\text{v}}}_{{\text{sc}}}]\) from each adaptive neuron. The given rule normalizes the computed firing strength.

Layer 4: An output of ReTSK based on predetermined if–then fuzzy rules is given as [15],

$$ \left. \begin{gathered} L_{1}^{4} = w^{d} f_{i} = \frac{{w_{i} }}{{w_{1} + w_{2} + w_{3} }}\left( {m_{1} V_{{{\text{sa}}}} + n_{1} V_{{{\text{sb}}}} + k_{1} V_{{{\text{sc}}}} + r_{1} } \right) \hfill \\ L_{2}^{4} = w^{q} f_{j} = \frac{{w_{j} }}{{w_{1} + w_{2} + w_{3} }}\left( {m_{2} V_{{{\text{sa}}}} + n_{2} V_{{{\text{sb}}}} + k_{2} V_{{{\text{sc}}}} + r_{2} } \right) \hfill \\ \end{gathered} \right\}\quad (i,j) = 1,2 $$
(7.e)

The fundamental weight quantity is computed by adding the weighted consequences of the relevant rules derived from the fourth layer in the total output of the ReTSK model.

The computation of the direct and quadrature weight quantity is done by multiplication of layer outcome with the normalization term. The last layer of the ReTSK implemented for extraction of the fundamental weights of direct and quadrature (\(w_{{_{{{\text{ad}}}} }}^{*}\),\(w_{{_{{{\text{db}}}} }}^{*}\),\(w_{{_{{{\text{dc}}}} }}^{*}\)) and (\(w_{{_{{{\text{aq}}}} }}^{*}\),\(w_{{_{{{\text{bq}}}} }}^{*}\),\(w_{e}^{*}\)). Then the averaging of derived weight for both the d and q-axis weights is computed as by Eq. (8) and (9) [10, 12].

$$ W^{d} = W_{{\text{pm,avg}}} = \frac{{w_{{_{{{\text{ad}}}} }}^{*} + w_{{{\text{db}}}}^{*} + w_{{{\text{dc}}}}^{*} }}{3} $$
(8)
$$ W^{q} = W_{{\text{qm,avg}}} = \frac{{w_{{{\text{aq}}}}^{*} + w_{{{\text{bq}}}}^{*} + w_{{{\text{cq}}}}^{*} }}{3} $$
(9)

The averaging computed weights from ReTSK control are employed to minimize the error rate between the sensed and estimated weight value for reference load voltage generation. The consequent layer computes the components of d- and q-axis by optimizing the cost function J over the selected training data sample as stated in Eq. (10). The SOA is employed for the optimization of the membership function factors (c and σ) for supplied input variables. The performance of this algorithm is described in Fig. 4 (a) illustrating the internal operation and control principle for ReTSK. The average weights obtained from the ReTSK controller are further used to generate reference voltage components.

Design of Proposed ReTSK Using Seagull

The parametric learning of the ReTSK model is based on a supervised learning scheme in which the MFs of the premise and consequent (nonlinear) parameters are considered as variables that are to be optimized by using the SOA algorithm. The optimal FIS is obtained by considering the mean-squared error (MSE) function as a fitness function. The objective of the SOA algorithm is to train and minimize the fitness function (MSE) at each iteration, and the optimal fuzzy rule is generated. This avoids overfitting issues and training errors. The mathematical expressions involved in the antecedent and consequent parameters tuning based on migrating and attacking behavior of SOA are as follows [17,18,19].

The antecedent and consequent parameters employ the learning algorithm error function (\(\varepsilon \)) as a fitness function defined in Eq. (10).

$$ \varepsilon (k) = \frac{1}{N}\sum\limits_{i = 1}^{N} {(z(k) - \widehat{z}(k))^{2} } = \frac{1}{N}\sum\limits_{i = 1}^{N} {(z(k) - L_{4} (k))^{2} } $$
(10)

where N = sample data, z(k) is the expected output and \(\widehat{z}(k) = L_{4}\) is the actual response of the model.

Voltage Regulation Based on Integration of RPFNN and RSO

This section elucidates the voltage regulation control technique. In this control, the input to the RPFNN is the errors between the actual and sensed DC-link voltage. This error (E) signal is processed through the RPFNN proposed controller. The input to the RPFNN is reduced by employing the RSO algorithm which updates the weight vector and obtains the targeted response of the predictive controller \((W_{ap} ,W_{rq} )\).

$$ E_{d} (k) = V_{{\text{DC,ref}}} - V_{{\text{DC,act}}} $$
(11.a)
$$ E_{q} (k) = V_{{t,{\text{ref}}}} - V_{{t,{\text{act}}}} $$
(11.b)

The detailed control structure for the voltage regulation based on RPFNN is depicted in Fig. 4 (b). The key objective of RSO is to minimize the steady-state error and all the performance indices such as overshoot, settle time and steady-state error for smooth the DC-link voltage regulation. The detailed structure, convergence analysis and online learning mechanism of the recommended RPFNN-RSO are explained in the subsequent sub-sections.

RPFNN Model Description and Weight Updating Using RSO

The design of an RPFNN control involves the error minimization by weight updating between the connected links in the RPFNN architecture and performed training over a selected sample data. The cost function is defined as,

$$ {\text{MSE}} = \frac{1}{R}\sum\limits_{N = 1}^{R} {\left( {w_{{_{{\text{ap,actual}}} }} - w_{{\text{ap,estimated}}} } \right)}^{2} ;\quad {\text{R is the sample data length}}. $$
(12)

(1) Input Layer: This layer nodes are illustrated as,

$$ \mathop {net}\nolimits_{a} \left( N \right) = \mathop E\nolimits_{a} $$
(13.a)
$$ x_{a} (N) = f_{a} (net_{a} (N) = net_{a} (N)\quad a = 1,2 $$
(13.b)

where N stands for the Nth iteration, xa is the ath input to the layer input, E1(N) denotes the error of DC-link voltage (E), E2(N) indicates the derivative of \(\dot{{\text{E}}}\) which is error of DC-link voltage.

(2) Membership Layer: The asymmetrical Gaussian function is employed in layer 2 for the implementation of the fuzzification operation and optimized rules. The relations of each node are expressed as,

$$ net_{d} \left( N \right) = \left\{ \begin{gathered} net_{ld} \left( N \right) = - \frac{{(x_{a} - m_{d} )^{2} }}{{(\sigma_{ld} )^{2} }}, - \infty < x_{a} \le m_{d} \hfill \\ net_{rd} \left( N \right) = - \frac{{(x_{a} - m_{d} )^{2} }}{{(\sigma_{rd} )^{2} }},m_{d} < x_{a} \le \infty \hfill \\ \end{gathered} \right. $$
(14)
$$ \mu_{d} (N) = f_{a} (net_{d} (N)) = \exp (net_{d} (N))\mathop {}\nolimits_{{}}^{{}} d = 1,2...,6 $$

where \(net_{d}\) and \(\mu_{d} (N)\) indicate the layer 2 input and the output, \(\sigma_{ld}\) and \(\sigma_{rd}\) are the left- and right-side standard deviations (SD) in the dth term for the ath input variable of Gaussian asymmetric function; \(m_{d}\) denotes the mean value of the dth term of the ath input variable.

(3) Probabilistic Layer: Here a generalized form of Gaussian function is implemented and is expressed as,

$$ net_{g} = - \frac{{\left( {\mu_{d} - m_{g} } \right)^{2} }}{{\left( {\sigma_{g} } \right)^{2} }} $$
(15)
$$ P_{g} (N) = f_{g} (net_{g} (N) = \exp (net_{g} (n))\mathop {}\nolimits_{{}}^{{}} g = 1,2,...,18 $$

where \(m_{g}\) represents the mean; \(\sigma_{g}\) denotes the normalized deviation and the output of layer 3 is \(P_{g} (N)\).

(4) Rule Layer: In this layer AND operation is performed according to Eq. (16.a), to obtain the Mamdani inference. The Bayes’ theorem is employed for probabilistic information by considering the group of fuzzy grades as independent variables are illustrated in Eq. (16.b). The recurrent fuzzy characteristic is the internal feedback path. Therefore, the current values of each node are influenced by its later node value as depicted in (19.c), and the feedback structure stores the previous values. The expressions of a node are defined as follows [15]. Equation 17.a and 17.b is shown the value of \(net_{L} (N)\) and \(\mu_{L}^{O} (N)\) respectively.

$$ \mu_{L}^{H} (N) = \prod\limits_{J} {w_{JL} } \mu_{J} $$
(16.a)
$$ P_{L}^{H} (H) = \prod\limits_{K} {w_{{{\text{KL}}}} } \mu_{J} $$
(16.b)
$$ net_{L} (N) = \mu_{L}^{H} P_{L}^{H} w_{RL} \mu_{L}^{O} (N - 1) $$
(17.a)
$$ \mu_{L}^{O} (N) = f_{L} ({\text{net}}_{L} (N)) = {\text{net}}_{L} (N),{}_{{}}^{{}} L = 1,2,3..,9 $$
(17.b)

where \(\mu_{L}^{H}\) and \(P_{L}^{H}\) represent the inputs of 4th layer,\(w_{RL}\) is a recurrent feature; \(w_{KL}\) is the weighted connection link between the 3rd and 4th layer,\(w_{JL}\) is the link weighted value between the 2nd and 4th layer,\(\mu_{L}^{O}\)(N) is rule layer output.

(5) Output Layer: This input and output of the node in this layer are expressed as follows:

$$ {\text{net}}_{o} (N) = \sum\limits_{L = 1}^{T} {w_{L} \mu_{{_{L} }}^{o} } ;\mathop {}\nolimits_{{}}^{{}} {\text{T represents the rule number}} $$
(18.a)
$$ \mu_{o} (N) = f_{o} ({\text{net}}_{o} (N)) = {\text{net}}_{o} (N),\mathop {}\nolimits_{{}}^{{}} o = 1 $$
(18.b)

where \(w_{L}\) is the connection weight link between the 4th and 5th layer;\(\mu_{{_{L} }}^{o}\) is the input feed to this layer.\(\mu_{o} (N)\) is RPFNN-RSO output for voltage regulation. The model is completely trained to estimate the reference signal. Controller output \({W}_{ap}\) and \({W}_{rq}\) along with unit vector are implemented to estimate the reference load voltage, and this helps in gating pulse evaluation.

Overview of Rat Swarm Optimization

The new member of optimization is proposed, namely, Rat Swarm Optimizer (RSO), which is inspired by swarm intelligence. It follows the concept of chasing and hunting behaviors of rats [30]. The best-fitted RPFNN is achieved by optimizing the weights and bias vector at each trial by updating the search candidate position, and it leads to cost minimization. The description of RSO optimizer and steps for optimizing the input neurons, weight and bias vector is described in Ref. [31] to achieve the objective function (MSE). The parameters employed in RSO for optimal setting are search agents 50, number of generations 1500, control parameter (R) = [1, 5] and constant parameter C = [0, 2]. The goodness of each obtained solution is examined by using MSE criteria.

Stability and Convergence Analysis

The performance of the proposed method is examined by convergence analysis and stability. The outcome of the DC-link voltage is assessed by the fast convergence capability, stability and reference tracking ability. The gradient descent technique is widely employed for identification applications, but it has some drawbacks such as a very slow convergence rate; therefore, advanced algorithm RSO is proposed which has fast computation and convergence to zero (MSE). This avoids local entrapment and reduces the voltage deviation. The stability of the developed algorithm is confirmed by Lyapunov’s theory. The error \(E_{d} (k)\) between \({V}_{{\text{dc}}}\) and \({V}_{{\text{dc}}}^{*}\) is fed to the RPFN controller [17, 18].

$$ E_{d} (k) = V_{{\text{DC,ref}}} - V_{{\text{DC,act}}} $$
(19.a)

The model output error Z(k) is represented expressed as

$$ Z(k) = \xi_{{{\text{out}}}}^{2} (k) + \xi_{{{\text{out}}}}^{2} (k - 1) $$
(19.b)
$$ Z(k) = \lambda^{k} \xi^{2} (k) $$
(19.c)

where \(\lambda^{k} = \left( {1 + \frac{{\xi^{2} (k - 1)}}{{\xi^{2} (k)}}} \right)\) and \(\xi\) presents the error estimator. The Lyapunov stability conditions criteria are defined as follows,

$$ \left\{ \begin{gathered} Z(k) > 0 \hfill \\ Z(k) - Z(k - 1) = \Delta Z(k) < 0 \hfill \\ \end{gathered} \right. $$
(20.a)

\(\Delta Z(k)\) is computed as,

$$ \Delta Z(k) = \lambda_{k} [W_{{\text{ap,actual}}} W_{{\text{ap,estimated}}} ]^{2} - \lambda_{k} \xi^{2} (k - 1) $$
(20.b)

where \(W_{ap,estimated} = W^{T} X(k)\). Moreover,\(X(k)\) is the input quantity and \(W^{T}\) stands for the weight vector.

$$ \Delta Z(k) = - \lambda_{k} \xi^{2} (k - 1) < 0 $$
(21)

According to Eq. (21.f), the tracking error can converge to zero; hence, the stability condition is satisfied.

Evaluation Criteria for Model Performance

The model validation of the proposed forecasted model meets the requirements in terms of mean square error (MSE), root-mean-square error (RMSE), scatter index (SI), mean absolute error (MAE), mean absolute percentage error (MAPE), and correlation (R). The corresponding fitness indices are represented in Table 1. The error indices like MSE, RMSE, SI, MAE and MAPE value are closer to ‘0’ which exhibits a greater accuracy of the predictive model. R close to ‘1’ also shows a better learning accuracy to achieve the desired model output [18]. The ReTSK-SOA-based fuzzy and RPFNN-RSO optimization technique stops its learning when the minimal error termination criteria are attained.

Table 1 Accuracy evaluation of proposed randomized evolving TSK using SOA

Compensation Strategy of DVR Based on Proposed Hybrid ReTSK and RPFNN Controllers

The fundamental weight extraction along with the unit weight vector generates the reference quantity of load voltage. The ReTSK and RPFNN are implemented for tracking the unit vector templates that reduces the error of the system voltage using SOA and RSO. The actual implementation of complete control strategy is shown in Fig. 3 (a-b) and Fig. 4.

Fig. 3
figure 3

Learning principle: a internal ReTSK identifier, b RPF optimized neural network

Fig. 4
figure 4

Reference signal generation for DVR using ReTSK and RPFFNN optimized with SOA and RSO

The reference active and reactive weight component used for estimation of load reference voltage are calculated as below formulations.

The active power reference weight quantity is evaluated by subtracting output of DC bus (Wap) from the average reactive power weight value \(\left({W}_{{\text{avg}}}^{{\text{pm}}}\right)\) as,

$$ W_{p}^{{{\text{ref}}}} = W_{{{\text{ap}}}} - W_{{{\text{avg}}}}^{{{\text{pm}}}} $$
(22.a)

The computation of reactive power weight reference component is expressed as, \(W_{q}^{{{\text{ref}}}} = W_{rq} + W_{{{\text{avg}}}}^{{{\text{qm}}}}\) (22.b).

The input vector of in phase is given to the first layer of the ReTSK unit, and the weighted sum ‘w’ of supply voltage and input [Vsa,Vsb,Vsc] is processed over the Gaussian MFs to obtain the consequent layer outcome. A similar mechanism is incorporated for the layer output of quadrature axis. A similar mathematical computation is applied for all phases a, b and c. The load reference voltage is computed by Eq. (23).

$$ V_{{{\text{Labc}}}}^{*} = V_{{{\text{pabc}}}}^{*} + V_{{{\text{qabc}}}}^{*} $$
(23)

where \(V_{pa}^{*} = W_{p}^{ref} \times u_{dabc}\) and \(V_{qa}^{*} = W_{q}^{ref} \times u_{qabc}\). The utility voltage profile difference between set value and sensed load voltage is maintained to the required three-phase reference voltage magnitude. Thus, the estimation of three-phase reference load voltage computation is illustrated by the developed ReTSK controller shown in Eq. (23) along with Eq. 22 (a-b). The respective sensed signals of phase voltages are compared with a reference value and evaluate the error signal which is processed through the PWM to generate the gating pulses for VSC.

Simulation Results and Discussion

The performance behavior of the three-phase DVR and controller performance is verified by using MATLAB platform. The effectiveness and validity of the proposed adaptive controllers based on ReTSK and RPFNN are evaluated at different operating points. The DVR simulation performance includes the estimation of fundamental and reference signal generation. The whole system is simulated for a sample time (ts) equal to 20 µs, and the system calls the fuzzy neural and NN routine whenever necessary in the operation of DVR. The system parameters required for the design of DVR are mentioned in Appendix A.

Performance Evaluation of Developed Predictive Model based on ReTSK-SOA

The prediction of the recommended control is gauged by employing evaluation criteria illustrated in Table 1. The model validation is done with observed data and confirms that the proposed ReTSK unit enhances the voltage response of the DVR. The convergence performance of system output is demonstrated in Fig. 5. At 100th generation the model best validation of training performance is observed with a MSE value of 3.6885 and RMSE 1.9206 and testing value MSE is 3.5902 which ensures the greater accuracy as illustrated in Fig. 6 (a) and (b).

Fig. 5
figure 5

Convergence plot for ReTSK using SOA

Fig.6
figure 6

a Optimal results for train data at error 3.6885. b Optimal results for test data at error mean 3.5902

The best predictive ReTSK unit is achieved at R = 0.99992 for training phase and 0.99993 at the testing state by adaptively adjusting the weight adopting the error values that converge to zero with smaller variations in behavior throughout train and test state. So, the intelligent compensating scheme has reached the reference response in a less run time and this confirms the stable response of the developed system.

Response of RPFNN using RSO for Voltage Regulation

The RPFFN-RSO is employed for the approximation of voltage deviation from the set value and regulates the overall DC-link voltage \(({V}_{DC}\)) and terminal voltage (\({V}_{t}\)) to achieve the closer reference value using required neurons, interlinked weights and selected activation function to minimize the values of errors. The best validation response of training is achieved at 1000 epoch with MSE as function is 2e-05 and RMSE 0.00447 for DC-link, while AC-link voltage performance MSE = 0.0035194 and RMSE = 0.0059. Figure 7 (a) demonstrates that the RSO algorithm performs better than other competitive candidates and improves the voltage regulation to minimize the voltage error.

Fig. 7
figure 7

Nature for DC-link profile a performance comparison curve MSE as function, b cross-correlation plot input versus error, c actual and predicted error response, d regression coefficients of DC-link

The input-error cross-correlation function shown in Fig. 7 (b) illustrates the errors correlation mechanism with the selected input sequence x(t). For perfectly predictive models, all the values for the correlations should be zero. The RPFFN accuracy is predicted by using RSO, and the error metrics were calibrated by incorporating the 15% of the entire data which gives a better performance for the defined statistical metrics. The tracking of predicted and actual value voltage error is depicted in Fig. 7 (c), and the strength of correlation between the forecasted and sensed data using RSO is shown in Fig. 7 (d). Figure 8 (a-d) shows the performance characteristics for AC-link voltage regulation. The comparative performance details of DC- and AC-link voltage using statistical indices are illustrated in Table 2. Therefore, it can be inferred from the tabular result that the integration of RPFNN with the RSO method can enhance the training and generalization capability of RPFNN. This improves the overall DVR performance.

Fig. 8
figure 8

Nature of AC-link profile a performance comparison curve MSE as function, b correlation plot input versus error, c actual and predicted error response, d regression coefficients of AC-link

Table 2 Comparative accuracy evaluation of RPFNN using different algorithms

Compensation of External Disturbances using ReTSK-SOA and RPFNN-RSO-based DVR

The developed ReTSK-SOA and RPFNN-RSO control significantly enhances the DVR performance by the elimination of all the voltage disturbances incorporated in the grid voltage, as it has a fast response to the dynamics and estimation of the reference set value. The intelligent control algorithm response for DVR is observed as follows.

Dynamic Response using Integrated ReTSK-SOA and RPFNN-RSO Control Scheme

The ReTSK-SOA and RPFNN-RSO outcome has been determined for the 410 V supply voltage. The external voltage disturbances like voltage dip from 0.5 to 0.55 s, swell case from 0.6 to 0.65 s, distortion from 0.7 to 0.83 s and imbalance from 0.68 to 0.73 s are generated by different load adjustments. The wave shapes of the three-phase source voltages \(({{\text{V}}}_{{\text{sabc}}})\), load voltage\({({\text{V}}}_{{\text{Labc}}})\), compensating voltages (\({{\text{V}}}_{{\text{ca}}}\),\({{\text{V}}}_{{\text{cb}}}\), and\({{\text{V}}}_{{\text{cc}}}\)), currents of load (\({{\text{i}}}_{{\text{Labc}}})\),the DC-link voltage \(\left({{\text{V}}}_{{\text{dc}}}\right)\), AC-link voltage \({({\text{V}}}_{{\text{t}}})\) and reference load voltage \({{\text{V}}}_{{\text{Labc}}}^{*}\) are depicted in Fig. 9 [from top to bottom]. This provides that the integrated control mechanism of DVR with adaptive neural weights can eliminate the voltage imperfections and maintain the load voltage at the consumers. Figure 10 illustrates the fast-compensating capability of 0.002 s during the swell event of grid voltage.

Fig. 9
figure 9

Overall DVR response based on integrated ReTSK-SOA and RPFNN-RSO control algorithm

Fig. 10
figure 10

DVR compensation time behavior during the voltage swell

ReTSK-SOA and RPFNN-RSO Steady Response

The effectiveness intelligent DVR system is illustrated by the THD spectrum of phase ‘a’ before and after removal is portrayed in Fig. 11 (a) and (b). The target response for the proposed method is a 2% tolerance band. The Settle time (Ts1) of RPFNN is 0.15 s as compared to the ZA-LMS-PI and classical SRF-PI controller with a Settle time (Ts2) of 0.2 s and 0.35 s, respectively, as shown in Fig. 12. The other PQ indicator for performance evaluation of RPFNN control is Rise time (Tr), Overshoot (Os%), undershoot (Us%) and Recovery Time of 0.08 s, 3.3%, 3.3% and 0.42 s, respectively, mentioned in Table 5. The sag compensation time taken is 0.002 s. This confirms the efficacy of the proposed control algorithm for the voltage quality compensation. Therefore, the amount of THD in the output voltage is limited with the proposed RPFNN-RSO controller, and a comparative analysis with other competitors is mentioned in Table 3.

Fig. 11
figure 11

a Source voltage THD and b load voltage THD with proposed ReTSK-SOA learning control scheme

Fig. 12
figure 12

Voltage response of DC-link using proposed RPFNN-RSO-based DVR

Table 3 Comparison values of THD with different controllers

Performance Estimation of DC-Link Capacitor Voltage using RPFNNF-RSO

The main aim is to regulate the DC-link voltage (Vdc) at the reference set of 300 V, as the controller RFNN-RSO is constantly tracking and controlling the voltage deviation. The Gaussian MFs are employed for the DC voltage control, and the significant insight of the recommended controller is sought in terms of settle time, rise time, overshoot, undershoot and recovery time which provides the precise output at transitory state compared to classical SRF-PI and advanced method like ZA-LMS-PI [3, 13, 20]. Table 4 represents the comparative analysis of different controllers employed in DC-link voltage regulation and proclaims the effectiveness of the proposed tuning method.

Table 4 Comparative performance characteristics evaluation of controllers

Figure 13 shows the estimation of mean weight for active load quantity under a voltage swell state with different adaptive controllers and compared with the proposed ReTSK-SOA. It is revealed that the weight oscillations are low in the ReTSK-SOA as compared to the standard classical ZA-LMS-PI and SRF-PI methods [3] [13]. This ensures better accuracy and fast weight convergence is obtained in case of proposed ReTSK-SOA control. Also, the proposed adaptive ReTSK-SOA method enhances the weight converging features toward stability under unbalanced scenarios due to its self-learning capability and adaptive nature which minimizes the magnitude of oscillations and it leads to lesser time to stabilize under grid voltage disturbances.

Fig. 13
figure 13

Average mean active weight component comparison with ReTSK-SOA and RPFNN-RSO

Hardware Experimental Results

The performance response of the recommended system is analyzed using the test measurement results with an experimental setup illustrated in Figs. 14, 15, 16, 17 and 18. The developed prototype is tested under different operating states to record the responses with a single phase-based PQ analyzer (Fluke 43B) in both situations i.e., steady and dynamic states. The dynamic state outcomes are captured by DSO. Appendix B lists the experimental parameters of the developed system.

Fig. 14
figure 14

Experimental DVR setup

Fig. 15
figure 15

Internal signals of ReTSK with RPFNN-based controlling signals for phase ‘a’ under distortion event avsa, upa, uqa and iLa b \({W}_{{\text{pm}}}^{{\text{avg}}}\), VDC,act, Wpa and \({W}_{p}^{{\text{ref}}}\) c \({W}_{qm}^{{\text{avg}}}\), Vt,act, Wrq and \({W}_{q}^{{\text{ref}}}\)d vsa,\(v_{{{\text{La}}}}^{*}\),\(v_{{{\text{La}}}}\),and iLa e\(v_{{{\text{sa}}}}\),\(v_{{{\text{La}}}}^{*}\),\(v_{{{\text{La}}}}\) and Gating Pulses

Fig. 16
figure 16

Dynamic response under voltage sag, distortion and unbalance: a sag with vsa, vinja, vLa, iLa, b sag with vsa, vdc, vLa, iLa, c distortion with vsa, vinja, vLa, iLa, d distortion with vsa, Vdc,Vt, iLa, e unbalance with vsa, vdc,vLa, iLa and f unbalance with vsa, Vdc,Vt, iLa

Fig. 17
figure 17

Steady-state response under sag: (a)–(c) supply side (vsa), (vsb), (vsc) with source current (isa), (isb), (isc), (d)–(f) load side voltage (vLa), (vLb), (vLc) with load current (iLa), (iLb), (iLc)(g) THD of (vLa), (h) injected voltage (vinja)

Fig. 18
figure 18

Steady-state response under distortion of phase “a” supply a supply side voltage (vsa), load current (iLa), b THD of vsa, c injected voltage(vinja), d load voltage (vLa) after compensation, e THD of vLa, f THD of iLa

Experimental Waveform of Intermediate Control Signals

The integrated ReTSK and RPFNN-based controlling signals are illustrated in Fig. 15. The demonstration for the reference load voltage under voltage disruption in the grid voltage of phase ‘a’ is illustrated in Fig. 15 (a-e). Figure 15 (a) includes the other phase ‘a’ quantity signals like source voltage (vsa), in-phase unit weight vector (upa) and quadrature quantity (uqa), and load current (iLa) required for computing the average fundamental weight quantity. Figure 15 (b) represents the average active quantity of fundamental weight \(\left({W}_{{\text{avg}}}^{{\text{pm}}}\right)\) along with the maintained sensed DC voltage (VDC,act) in respect of reference value 70 V, and DC voltage (Wap) represents the outcome response of RPFNN which is employed to yield a total weight quantity \(\left({W}_{p}^{{\text{ref}}}\right)\) of active side. Figure 15 (c) represents the average reactive quantity of fundamental weight \(\left({W}_{{\text{avg}}}^{qm}\right)\) along with the maintained sensed AC-voltage (Vt,act), and DC voltage (Wrq) represents the outcome response of RPFNN which is employed to compute a total weight quantity \(\left({W}_{q}^{{\text{ref}}}\right)\) of reactive side. Figure 15 (d) demonstrates the tracking of reference load voltage \(\left({v}_{La}^{*}\right)\) with actual load voltage (vLa) along with load current (iLa) event at distortion in grid voltage (vsa). The pulses for IGBT are computed by comparing the sensed and reference load voltage even under dynamical state.

Dynamic Situation Response with Proposed Control Strategy

The control approach response is demonstrated by voltage power quality perturbation in the supply side voltage and information’s obtained after compensation. Figure 16 (a) gives all the information from power quality sag in supply voltage (vsa), to compensating load voltage (vLa) along with injected voltage (vinja). The effectiveness of the compensating is actualized with a dc link voltage (vdc) under the dynamical situations shown in Fig. 16 (a).

Figure 16a and b depicts the compensating effect of sag voltage with the injection voltage (vinja), dc-link voltage (vdc) and compensated load voltage (vLa). This reveals the DVR compensating strength with the recommended controlling algorithm. The DSO half of the screen is employed for capturing the disturbances i.e., sag/swell, and the next half screen reflects the compensated signals. The distortion in supply voltage (vsa) and its compensation are realized with injected voltage (vinja) and compensated load voltage (vLa) and load current (iLa) as demonstrated in Fig. 16 (c). The waveform in Fig. 16 (d) represents the compensating effect of the recommended control method with maintained voltage (Vdc) of dc-link and maintained terminal voltage (Vt). The variation is observed in the dc-link voltage due to sudden supply side variations in voltage. Figure 16 (e) reveals the unbalanced-on supply side voltage (vsa) and is analyzed together with the dc-link voltage (Vdc) and compensating load voltage (vLa). The next sub-plot (f) provides the compensation realization with maintained dc-link voltage (Vdc), terminal voltage amplitude (Vt) and load current (iLa). The complete experimental setup is examined under steady and dynamic conditions.

Performance Evaluation under Steady-State Scenario

The performance behavior is shown in Fig. 17 (a-h) with an event of sag on supply side and compensated load voltage. The obtained harmonic results confirm the THD is within IEEE benchmark. Figure 18 (a) illustrates the distorted waveform of phase ‘a’ introduced in the supply side voltage with load side line current, while the THD is analysis is carried out in Fig. 18 (a) and (b) which depicts the distorted voltage RMS value of 101.2 V with a THD of 10.5%, respectively. The load side compensating effect is analyzed in Fig. 18 (d) and (e) with an RMS load voltage value of 108.2 V and THD of 4.9%, respectively. Table 5 represents the summarized statistical value for other phases and shows satisfactory results.

Table 5 Experimental results for steady state

Conclusion

The proposed hybrid machine learning-based control scheme is employed for DVR under different voltage power quality scenarios. The adaptive direct and quadrature components of the fundamental weight components are extracted by using the proposed ReTSK-SOA control. The proposed ReTSK-SOA and RPFNN-RSO-based prediction model confirms an optimal performance and its optimized results during the training phase are verified from error metrics. The evaluated error metrics for the ReTSK-SOA model during the training phase are (MSE = 3.6885, RMSE = 1.9206, ME = 1.2426, SD = 1.4644 and R = 0.99992), and testing phase error indices are (MSE = 3.5902, RMSE = 1.8948, ME = 1.2214, SD = 1.4887 and R = 0.99993), respectively, confirming the considerable improvement in dynamic response. The evaluated error metrics for the RPFNN model trained by RSO to maintain DC-link voltages are (MSE = 2e-05, RMSE = 0.00447, SI = 4.5262e-07, MAE = 0.3872, MAPE = 1.1216 and R = 0.99998), and this confirms the improved response time during transitory state compared conventional SRF-PI and ZA-LMS-PI. The simulated results confirm that the proposed intelligent controller outperforms the other in terms of convergence of weight, harmonic compensation and compensation time. The time required to achieve the system stability for the RPFNN method is comparatively less than that of the classical SRF-PI control. The stability of the system is ensured by applying the Lyapunov stability theorem and observing that the proposed controller stabilizes the performance. It is also observed that the voltage harmonic level is below 5% which satisfies the IEEE benchmark. Experimental results validations are observed satisfactory under both the steady state and dynamical condition.