Design and development of PI controller for DFIG grid integration using neural tuning method ensembled with dense plexus terminals

In a DFIG grid interconnected system, the control of real and reactive power relies on various factors. This paper presents an approach to regulate the flow of real and reactive power using a Neural Tuning Machine (NTM) based on a recurrent neural network. The focus is on controlling the flow of reactive power from the rotor-side converter, which is proportional to the grid-side controller through a coupling voltage. The proposed NTM method leverages neural networks to fine-tune the parameters of the PI controller, optimizing performance for DFIG grid integration. By integrating dense plexus terminals, also known as dense connections, within the neural network, the control system achieves enhanced adaptability, robustness, and nonlinear dynamics, addressing the challenges of the grid. Grid control actions are based on the voltage profile at different bus locations, thereby regulating voltage. This article meticulously examines the analysis in terms of DFIG configuration and highlights the advantages of the neural tuning machine in controlling inner current loop parameters compared to conventional PI controllers. To demonstrate the robustness of the control algorithm, a MATLAB Simulink model is designed, and validation is conducted with three different benchmarking models. All calculations and results presented in the article strictly adhere to IEEE and IEC standards. This research contributes to advancing control methodologies for DFIG grid integration and lays the groundwork for further exploration of neural tuning methods in power system control.

and the behaviour of gain sequence.These two parameters when combined, the evaluation of different gain can be made dynamic which will act in the PI controller as and when required 21 .
The data for the machine learning approach can be configured either based on seasonal variation or by making the configuration static.LSTM-enabled models have been investigated by many researchers in the past to showcase the effect of seasonal patterns in configuring the gain for the PI controller 22 .One of the disadvantages associated with LSTM is the requirement of a large memory set and the activation function used for the optimization.This problem can be addressed by using a recurrent neural network-based Neural Tuning Machine (NTM).This method provides the advantage of both fuzzy pattern and ANN capabilities to solve the complex problem.The use of external memory makes it easier to reduce the computational burden on system configuration.The data patterns used in NTM are differentiable thereby optimizing the search engine with gradient descent 23 .Based on the pre-feasibility study it is understood that the NTM along with PI controller can provide higher efficiency as compared to other models such as classical PI, ANFIS-PI and ANN-PI.The objectives of the research work can be summarised as follows, • Design and development of closed-loop inner current control loop using NTM-PI controller for Rotor Side Controller (RSC) • Design an outer voltage control loop using ANN-based NTM and optimise the tuning parameters with respect to different loading configurations.Three types of loading configuration have been taken into consideration, such as 100% loading, 75% loading and 50% loading pattern.• Validating the proposed NTM model with the standard bench-marking model strictly adhering to IEEE standards.
In lieu of the above objectives, the proposed research work focuses on novel application of neural network ensembles for PI controller design in DFIG grid integration.It includes a collective convergence of different multiple neural networks based PI controller in designing the DFIG grid interconnection system, which potentially increases the performance of individual network and thereby increasing the overall system performance.Again, the interconnection of dense plexus terminals increases the learning capabilities of the network, thereby providing the superior PI controller tuning characteristics over conventional PI controller.In the ongoing discussion, a detailed literature survey concerning the DFIG grid interconnection system with various controlling architectures has been conducted.Three notable objectives derived for the present research have been outlined above.The section 'DFIG Modelling' includes the mathematical formulation of the identified problem related to power flow for both DFIG and inverter-based control actions.In the 'Neural Tuning Machine' section, the NTM optimization procedure is discussed.The 'Bench-Marking Models Performance Evaluation' section analyzes three benchmarking models used to evaluate the performance of the proposed model.The 'Result Analysis' section presents the MATLAB-based modeling of the proposed NTM-controlled architecture, followed by the results and discussion.

DFIG modelling
The wind turbine's output power is based on the function of three inputs such as wind velocity, power generator, wind gust and transmission and distribution.Voltage sag, voltage swell and harmonics are the other terms through which power quality can be evaluated.In distribution networks generally, the power quality disturbances are introduced by the wind generator.By the use of a direct connection of the induction generator to the grid system, the operation wind generation system is carried out.This is one of the simplest methods.The various advantages of using an induction generator are cost-effectiveness and robustness.In order to inject the real power into the grid, reactive power for the magnetization of the induction motor is required.At the converter terminal, to control the production of active power, a regulated voltage control system is required 24,25 .
In the induction generator, the slip and speed fluctuations are kept at minimum during normal steady-state conditions.In this scenario, the machine's reactive power is minimal but to increase in the power and load will also increase the motor's reactive power consumption and motor slip.The equations for stator voltage and flux can be written as Also, the equations for rotor side voltage and flux are given as: From the above two equations, the rotor and stator voltage can be written as: In the above equation, "S" is the slip of the system.And from equation 3, active power of rotor and stator becomes, (1)

Neural tuning machine
Neural Tuning machine (NTM) is a type of recurrent neural network-based optimization algorithm, however, it holds the advantage of neural network for pattern recognition and computational models with enough time and memory to solve complex problems.The adaptive behaviour of the NTM makes it different from the recurrent neural network in terms of real-time assessment of controller behaviour.Basically, the NTM consists of two main parts such as a neural network controller and an external memory bank.The memory bank serves as a reference to the previous state of operation and acts as a back-supporting agent for decision disbursement.The contentbased searching mechanism makes it more suitable for implementing it along with the PI controller in DFIG grid interconnected system, however, such space varies unconditionally because the output of DFIG greatly depends upon the input factors such as wind velocity, temperature and wind pressure.Therefore a complex algorithm can be designed for NTM by incorporating the transient behavior of the loading pattern at the grid side controller and the intermittent nature of the wind system through the rotor side converter.
To start the NTM procedure it is required to process all the data by aligning them within [1, 0].In order to achieve this Min-Max normalization method has been applied considering X min as the minimum value in the data set and X max as the maximum value of the data set.The formula used for such an operation is presented below, Handling the window size in NTM-based optimisation requires shorter-length data.Therefore the time series data for K P and K I has been cut into smaller window sizes by using the sliding window technique.This procedure acts as a pre-requisition to NTM modeling.
At each time interval T, the PI controller contacts the RSC and GSC to share their captured parameters from DFIG and grid side respectively.This initiation brings autonomy to the system by updating their individual memory in line with the system parameters.To avoid the instability condition during the data processing phase, the system uses LSTM label of work without affecting the present K P and K I value.Thus the system continuously learns from the parameters extracted and re-written into the memory bank of the individual controller.In this way, the Grid Side Controller (GSC) regulates the DC linkage voltage thereby controlling the reactive power at the output terminal.
The discussed Dense Plexus Terminal is a fully connected layer usually being characterized by an inter connection pattern between the neuron setup.This allows the layer for an enhanced information exchanged potentials leading to improved learning capability of the system and a robust controller.Several ensembles techniques like bagging, boosting and stacking are also there, however, the Dense Plexus Terminal provides a linear complex meta-learner pattern for rich information exchange.
(5) www.nature.com/scientificreports/Based on the above discussion the following items have been proposed to achieve in the model.
• Based on the operating conditions, the data-driven methodology enables the controller to retrieve data from past files and adjust the controller parameters accordingly to achieve zero error during execution.This leads to improvements in three parameters of the control system: reduced settling time, decreased overshoot, and minimized steady-state error over the time series data.• The proposed neural network can adapt and adjust the gain value of the PI controller in response to real-time demands of various power quality issues.This reduces the need for human effort in tuning the controller's gain, ultimately enhancing its effectiveness.• The non-linear characteristics of the wind and DFIG can be taken into consideration for designing the hyper parameter tuning of the controller under different wind velocity by considering the complexity of the system.

Bench-marking models performance evaluation
DFIG grid-connected system will regulate the output voltage and frequency depending upon the available wind energy at the input side of the turbine.In order to achieve good quality power at the terminal of DFIG it is required to tune the PI controller gain parameters in such a manner that the output must follow the standard IEEE values without compromising the DISCOM's guidelines for renewable grid interconnection code for wind energy.In this connection, the three bench-marking models have been evaluated separately with three different loading conditions as presented in section I.

PI controller analysis
The classical PI controller plays a vital role in designing the gain for the inner and outer control loops.The Ziegler-Nichols has been adopted to determine the optimal value for K P and K I .The transient analysis with step input has been applied to the derived transfer function for checking the robustness of the control.The detailed gain parameters for the inner current control loop have been presented in Table 1.
As noticed from Table 1 the proportional gain is 0.85 and that of integral gain is 5.This shows that the upper boundary for proportional gain will be 0.87 and that of the lower boundary is 0.81.Similarly, the integral gain is 5.The transfer function performance (Derived from curve fitting) for rise time and peak time is 0.17 and 0.174 ms.These times show that the system has relatively low-performance subject to sudden changes in loading conditions at the output of the DFIG.The delay and settling time analysis is respectively 0.021 and 0.023 ms.A maximum overshoot of 17.08% has been noticed which leads to an under-damped system with four oscillations before settling at 0.23 ms.The overshoot represents the inner current control loop will suffer from any kind of transient disturbance by a % of 17.08.Similarly, the response time for the inner current loop using the PI control technique is 6.53 ms (Sluggish response).
Table 2 represents PI controller gain for the outer voltage control loop and transfer function performance.The outer voltage control loop is responsible for reactive power compensation at the converter loop.As observed the response time is 5.80 ms as compared to a response time of 6.53 ms in Table 1.This represents the outer voltage control loop using the PI controller is a little bit faster in performance Figure 1 represents the block diagram of PI controlled DFIG grid interconnected system.As noticed the reference speed and actual speed have been taken at the output of DFIG by using a Phase Locked Loop (PLL) for frequency and phase angle respectively.The rotor side controller will act on DC reference voltage by using the PWM converter as a derived parameter of the PI controller.The I d and I q will be derived using Park's Transfor- mation to control the respective reactive and active power at the terminal of the DFIG inverter system.Both K P and K I were tuned using the Ziegler-Nichols method.The detailed result analysis is presented under section v.

ANFIS controller
The modified version of the PI controller using ANFIS is presented in this section.Two parameters which have been taken into consideration for ANFIS are I d and I q values, generated from Park's Transformation.The ANFIS model consists of three hidden layers with an IF-THEN statement using a triangular membership function.Here five types of membership functions such as NL, NS, ZE, PS and PL (Refer.Fig. 4b) are used.The I q reference www.nature.com/scientificreports/value is set to zero to make zero reactive power at the output of the converter.The detailed block diagram is shown in Fig. 2 Figure 3 represents the surface view of the co-efficient and weight function used for ANFIS PI controller.As observed the slope surface becomes divergent with increasing wind velocity thereby capturing the maximum data required for calculating the gain parameters.However, if wind velocity increases beyond 20 m/s the slope becomes flattened thereby restricting the maximum wind velocity.
The rule table for the ANFIS PI controller is presented in Fig. 4a.Here altogether 25 situations arise scattering over three different configurations of loading which means the features mostly satisfy the five membership functions in order to be approved for changing the dynamic value of K P and K I .Figure 5 represents the time response analysis of ANFIS PI controller using a step function.As observed the system has shown only one maximum peak at time 1.2 ms.

ANN controller
The Adaptive Neural Network (ANN) differs from ANFIS in such a manner that the weight function of each hidden layer will be updated automatically based on the training rate of the neural network.The backward sweep along with back propagation provides memory-based intelligence from the training phase starting from output to input.
Here the d q parameters are used to control the real and reactive components at the converter output and the speed of the DFIG turbine and wind velocity will be taken into consideration for generating the reference voltage.Based on the reference magnitude the coupling capacitor voltage between RSC and GSC will be decided.One of the advantages of this method is, it can track the real-time output at the DFIG converter terminal if and only if during the training and testing condition, the ANN algorithm must satisfy 98% of accuracy and above.
The block diagram for ANN ANN-based DFIG controller is presented at Fig. 6.As observed the control algorithm is having three sub-nets, each net corresponds to the reactive power measured at the grid side converter (GSC).Sigmoid-based activation function has been taken into consideration for each hidden layer.The output of  www.nature.com/scientificreports/ the ANFIS PI controller model is given to a low pass filter (LPF) for generating successive PWM firing pulse for the rotor side converter (RSC), which in turn fed to a 2-line stage converter connected in between DFIG and grid.Figure 7 represents the training and testing of I d and I q data collected as a reference of reactive power from PLL.As observed at Fig. 7a the I d component has 100% of accuracy in tracking the real power and that of Fig. 7b, the I q component has 87.33% of accuracy in terms of tracking change in reactive power.The model has been validated for the 70:30 ratio of standard statistical procedure.Figure 8   www.nature.com/scientificreports/gust the error has increased to -1.69 leading to the over-fitting of the curve.At above 30 ms of time, the error rate has decreased to -1.58 and is maintained here after a constant value.

Simulation setup
To check the performance characteristic of the proposed algorithm a MATLAB Simulink model has been designed by optimally sizing the internet parameters of various models by the IEEE-1547 grid interconnection protocol.All the interlocking facilities required for the successful operation of DFIG under grid interconnection mode have been provided by the latest state-of-the-art practices for the master trip relay, zone of protection, IP-63 protocol for inverter grid interconnection and IEC codes.
In a DFIG grid interconnected system, the first parameters to be considered are wind turbine parameters along with aerial data.Table 3 represents the wind turbine parameters for MATLAB simulation.Here the air density range has been defined as 1.2-1.25 Kg/m 3 , thus taking into consideration the effect of temperature on air.However, during the simulation, 1.22 has been taken into consideration.The pitch angle range is given as 0-0.1 Degree, however, during simulation 0 • has been taken into consideration.The radius of the wind blade is 23 mm.
After deciding the wind turbine parameters it is required to fix the parameters for DFIG.Therefore Table 4 represents 12 numbers of different DFIG configuration parameters.The stator and rotor power are 60 and 33 KW respectively, with a stator voltage of 400 V or 1 pu has been taken into consideration.Due to 4 number of poles the Again it is required to set the interlocking arrangements for different power quality issues, the RSC and GSC parameters were present in Table 5.As the stator output voltage is 400 V. Therefore the DC reference voltage is kept at 390V and that of capacitor capacitance is set at 500µ F. The grid frequency as per the Indian Standard Code has been fixed by an integrator limiter circuit with a lower boundary of 49.97 to 50.03 Hz.The proportional and integral gain as derived by using the Ziegler-Nichols method is set to 0.82 and 4.2 respectively.

Result analysis
In the above section, a detailed simulation setup has been presented by IEEE 1547 standards.Based on the above discussion the optimization model for the proposed algorithm has been designed and presented below.
Figure 9 represents a flow chart for tuning of K P and K I by NTM controller (DENSE-50) using Rotor side con- troller (RSC) and Grid side controller (GSC) parameters.Four parameters include wind speed (N), wind velocity( W v ), voltage at the stator terminal (V) and temperature(GT).Similarly, three parameters from GSC have been recorded, including voltage(V), transformer turns ratio (TFR-TR), and the reactive power demand at the output of GSC.To evaluate the d q parameters for each data entered into the system a PARK's Transformation has been applied to the data set to evaluate the d q parameters separately.To avoid over-fitting each data during the curve www.nature.com/scientificreports/fitting analysis, hyper-parameters search space has been set along with the corresponding training and testing data to 70% and 30% respectively.Auto-tune has been initiated after the evaluation of d q parameters through a pre-trained DENSE-50 and the first recurrent neural network set-1 to initiate the tuning procedure.The 2 sets of tuning procedures have been accompanied by 2 different cost minimization functions for evaluating the least error while finding the optimization point.To scale down the error rate both mean and variance have been given to the second R-Net-2 to evaluate and fine-tune the K P and K I value.To freeze the K P and K I value the cluster segmentation has been carried out by the mean and variance for curve fitting analysis thereby freezing the K P and K I for the proposed NTM PI controller.Thus the K P and K I become dynamic to the variation either in RSC parameters or GSC parameters respectively.The advantage of the proposed NTM PI controller over all other controllers is that both RSC and GSC parameters have been taken into consideration for deciding the K P and K I value using a pre-trained network.However, in other benchmarking models such as PI controller, Fuzzy-PI controller and ANN-PI controller, the effect of both RSC and GSC has not been taken into consideration because of the increase in membership function, hidden layer and time requirement in evaluating the PI controller.The NTM consists of a collection of neural networks, each with a different structure such as recurrent, feedforward, or Convolutional networks.The ensemble architecture of the NTM features dense plexus terminals or dense connections between the layers of the neural network, which facilitate the free flow of information and provide insight into each individual network.During the training phase, the ensemble of neural networks adaptively learns to map input to output by incorporating the ensemble of neural networks into the training data.Each neural network has its own structure, which helps to increase the robustness of the ensemble.Additionally, due to the dense plexus terminals, the ensemble of neural networks improves its performance on unseen data Table 6 represents the performance analysis of the proposed NTM PI controller during the optimization process at 4 different levels of voltage THD.It is observed that for THD levels of 5.4 and 5.61 with 100 EPOCH levels the mini-batch loss is 0.3.This represents that during the clustering of data, equal segmentation has been applied uniformly throughout the data so that during gradient decent analysis the updation of each weight function has been updated to 30% .Similarly at THD level of 5.93, 70% of the cluster weight function is updated.This shows that for a change of 5.7% in the THD level (relative) there is an increased change in THD level of 40% .This makes the controller more dynamic to the change in grid parameters.Further, the analysis has been carried out for 6.04% of THD level.However, the mini-batch loss is found to be 20%.
Table 7 represents performance analysis of the proposed NTM PI controller during the optimization process at 2 different levels of current THD.As observed at a THD level of 8.17 with an EPOCH level of 50 the RMSE is 2.28 and that of 100 EPOCH level is 1.78 respectively.Similarly, at a THD level of 8.23, the RMSE for 50 EPOCH is 2.69 and that of 100 EPOCH is 2.25 respectively.It is also noticed that the mini-batch loss is 1.6 for www.nature.com/scientificreports/ 100 EPOCH with THD level of 8.17.However, at a THD level of 8.23, a mini-batch loss of 2.5 at 100 EPOCH has been recorded.This means that under current THD the proposed algorithm is overfitted with 16% and 25% respectively, which is 17% less as compared to any other proposed algorithm namely ANN-PI controller.During the second transition event, the minimum voltage is 0.98 pu.By IEEE standard the voltage variation should not increase to below 10% of the reference value or 0.9 pu.In Fig. 12b with ANFIS-PI controller, the maximum overshoot reached 1.041 during the first transient operation whereas during the second transient operation, a minimum value of 0.98 was recorded at 0.15 s.Again, in Fig. 12c, with ANN-PI controller, during the first transient analysis, the maximum overshoot of 1.02 has been noticed with a minimum value of 0.98 and that of Fig. 12d, NTM-PI controller, the maximum overshoot of 1.03 and a minimum overshoot of 0.99 has been observed which is exactly under IEEE and IEC standard.This reveals that the DC ref. voltage requires 0.05 s to settle down to the steady value of 1 pu with two transition oscillations as compared to all other bench-marking models it takes a minimum of four oscillations before getting settled down to 1 pu.Therefore, the proposed algorithm is robust for implementation and practicability.
Figures 10 and 11 represent the optimization process of NTM for two different activation functions ReLu and softmax function.As observed, at Fig. 10b the optimization process has undergone an exponential decaying function showing highest possibility of sensitivity to external parameters variation whereas for all other figures of Fig. 10 such as Fig. 10a,c,d, the decaying function is less sensitive to the parameters variation.Therefore, the rest of the research part has been concentrated on ReLu function with activation function wt.value of 0.73.During the softmax optimization process for NTM, it is observed that at Fig. 11c, initially the system has shown an exponential decaying performance up to 18 EPOCH level and thereafter it becomes constantly decaying.In contrast Fig. 11b the system has shown rectangular hyperbola function with a wt value of 0.73 making it suitable for analysis under transient conditions.Again, at Fig. 11a,d, the system has shown a non linear performance throughout the iteration level.Therefore the analysis with NTM has been carried out for Rotor Side Controller (RSC) with ReLu function and for Grid Side Controller (GSC).It is softmax based activation function (Fig. 12).
Figure 13 represents the active and reactive power flow waveform for (a) PI controller (b) ANFIS-PI controller (c) ANN-PI controller (d) NTM-PI controller.As observed in Fig. 13a the active power is maintained at 0.95 pu until the first transition occurs at 0.04 s.Here the reactive power has come down to 0.5 pu and it is maintained up to 0.5 pu till 0.14 s.At about 0.15 s the real power has increased to 1.5 pu.Similarly, it is also noticed that the reactive power also shows a similar type of performance before settling to 0.5 pu at the end of 0.15 s.The analysis has also been carried out for Fig. 13b ANFIS-PI controller and that of Fig. 13c ANN-PI controller.In Fig. 13d The NTM-PI controller analysis has been presented.However, the real power is maintained approximately at 1pu before undergoing a transition.Due to the use of a real-time dynamic PI controller, the performance of the active power is quite better as compared to other benchmarking models.During this time the reactive power has also Figure 14 represents the V abc voltage at the transformer for (a) PI controller (b) ANFIS-PI controller (c) ANN-PI controller (d) NTM-PI controller.As noticed, during the transition condition, the output voltage waveform with PI controller has shown two different transitions during loading and on-loading transformer at 0.04 and 0.014 s respectively.At 0.14 s, the PI controller-based waveform (Fig. 14a) showed three different sub-synchronous oscillations for two cycles before settling down to a THD level of 5. Similarly in Fig. 14b the  ANFIS-PI controller is presented however for the same type of fault condition, the voltage has undergone two cycles of oscillations before reaching the final steady state.In Fig. 14c, the voltage waveform is almost oscillating by the loading pattern.However, the system has undergone a maximum undershoot of − 1.1 pu in the second transition effect.As compared to the ANFIS-PI controller here the oscillation is limited to 2.5 cycles.With the proposed NTM-PI controller model, a maximum undershoot of − 1.1 pu has been achieved with a maximum deviation of 0.5 cycles.From the above voltage waveform analysis, it is noticed that the effect of different loading patterns can be analysed with the half cycle of the voltage waveform with the proposed NTM-PI controller.
Figure 15 represents I abc current waveform at source side bus (a) PI controller (b) ANFIS-PI controller (c) ANN-PI controller (d) NTM-PI controller.As observed with the PI controller during the initial stage of load transition, the grid has undergone a voltage swell of 13.6% .The synchronization between all three phases occurs after three cycles of disturbance.Similarly, with ANFIS-PI controller the disturbance was noticed for three cycles with a maximum deviation of voltage swell is 13.88% .Here the system is brought back into its initial condition after three cycles of disturbances.With a proposed NTM-PI controller the voltage swell goes up to 11.03% and synchronisation between all three phases occurs within two cycles of distribution.
Figure 16 represents V abc voltage at B 575 waveform (a) PI controller (b) ANFIS-PI controller (c) ANN-PI controller (d) NTM-PI controller.As observed with PI controller voltage near the PCC has undergone a voltage sag of 4% for three cycles.However, in Fig. 16b with ANFIS-PI controller the voltage disturbance has under- gone up to 4.2% (voltage sag).This effect has been noticed upto 0.1 s thereby making it unsuitable for real-time implementation.To overcome that problem, the system has been modeled with the proposed NTM-PI controller and hence the voltage disturbance settled down within 0.04 s from the instant of the occurrence of the fault.It is also noticed that the wave-top has undergone a single transition event before settling into its normal state.This  The R 2 error determines the fitting of the model at different parameter variations for the specified algorithm.A higher value of R 2 error represents the model is best fitted to the data and it has taken 90% of data during regression analysis.The R 2 error is evaluated along with variance.
Table 8 represents the performance comparison analysis of different algorithms during ±10% of voltage fluctuation at PCC. 7 parameters such as R 2 , RMSE, MAE, Accuracy, Sensitivity, PPV and NPV of different bench-marking controllers such as PI-controller, ANFIS-PI, ANN-PI and NTM-PI are compared for ±10% of voltage fluctuation at point of common coupling.As observed for 10% of voltage fluctuation the R 2 value of PI controller is 0.641 and for ANFIS-PI is 0.776 respectively.Similarly, for ANN-PI and NTM-PI, it is 0.863 and 0.911.RMSE of the PI controller will be 0.098 and for ANFIS-PI it will be 0.081, whereas for ANN-PI and NTM-PI the values will be 0.083 and 0.067 respectively.MAE of the PI controller is 1.178, whereas for ANFIS-PI it is 1.124.Similarly, for ANN-PI and NTM-PI it is 1.993 and 0.816.During ±10% of voltage fluctuation at PCC the accuracy and sensitivity of the controller varies.The accuracy of the PI controller will be 81.177% and for ANFIS- PI it is 85.091% .91.279% and 93.268% will the accuracy of ANN-PI and NTM-PI.Similarly, the sensitivity of the controller is compared, where for the PI controller the sensitivity is 83.234% , ANFIS-PI sensitivity % is 84.003,ANN-PI sensitivity will be 86.418% and NTM-PI sensitivity is 89.546% .Here the PPV in % is also compared given the values are 91.017% for the PI controller, 93.271% for ANFIS-PI.92.079% of ANN-PI and 93.587% for NTM-PI.Furthermore NPV in % is also a parameter which is compared for different controllers.As observed the NPV% of PI controller is 92.109, whereas for ANFIS-PI it is 91.312% .Similarly, NPV% values for ANN-PI and NTM-PI are 93.45425% and 92.173% respectively.Table 9 represents the performance comparison analysis of different algorithms during ±5% of voltage fluc- tuation at PCC. 7 parameters such as R 2 , RMSE, MAE, Accuracy, Sensitivity, PPV and NPV of different bench- marking controllers such as PI-controller, ANFIS-PI, ANN-PI and NTM-PI are compared for ±5% of voltage fluctuation at point of common coupling.As observed for 5% of voltage fluctuation the R 2 value of PI controller is 0.800 and for ANFIS-PI is 0.813 respectively.Similarly, for ANN-PI and NTM-PI it is 0.891 and 0.930.RMSE of PI controller will be 0.132 and for ANFIS-PI it will be 0.147, whereas for ANN-PI and NTM-PI the values will be 0.097 and 0.073 respectively.MAE of PI controller is 1.461, whereas for ANFIS-PI it is 1.169, similarly, for ANN-PI and NTM-PI it is 2.018 and 0.833.During ±5% of voltage fluctuation at PCC the accuracy and sensitivity of the controller also varies.The accuracy of PI controller will be 79.564% and for ANFIS-PI it is 81.163% , similarly 92.197% and 94.206% will be the accuracy of ANN-PI and NTM-PI.The sensitivity of the controller is compared, where for the PI controller the sensitivity is 87.41% , ANFIS-PI sensitivity % is 87.021,ANN-PI sensitivity will be 87.287% and NTM-PI sensitivity is 90.447% .Here the PPV in % is also compared given the values are 91.93% for PI controller, 94.938% for ANFIS-PI.94.013% of ANN-PI and 94.996% for NTM-PI.Furthermore NPV in % is also a parameter which is compared for different controllers.As observed the NPV of PI controller is 93.96% , whereas for ANFIS-PI it is 92.687% .Similarly, NPV% values for ANN-PI and NTM-PI are 94.832% and 93.101% respectively.
Figure 17 represents Performance comparison Tracking time, error rate, efficiency and response time (a) PI controller (b) ANFIS-PI controller (c) ANN-PI controller (d) NTM-PI controller.As observed in Fig. 17d, the efficiency has increased for the NTM-PI controller and at the same time it takes lesser response time and also low error rate as compared to all other bench-marking controllers.This clearly states that the proposed NTM-PI controller is good in terms of tracking time, efficiency and response rate to any loading condition at the point of common coupling.
One potential application of this research in real-world power grids is its utility in parameter settling under dynamic load-changing patterns.It has been observed that the NTM-PI controller exhibits a maximum overshoot of only 8.23% and a settling time of 0.93 s, respectively.Furthermore, it aids in the analysis and continuous updating of control policies with the assistance of real-time data.Traditional methods commonly used for controlling systems in real-world power grids often struggle with non-linear dynamics.The NTM-PI controller possesses the capability to adjust and learn the non-linearities associated with the control method.Additionally, this method demonstrates quick adaptability within the control system, where the system is continuously updated with real-time data

Conclusion
In this research article, an improved grid interconnection of DFIG has been presented by using the conditional Neural Tuning Method as an escort to the classical PI controller for improving the controllability of the controller.
During the analysis, it is observed that most of the PI controllers face problems in parameter settling under dynamic load-changing patterns.Here the dynamic load changing refers to the loading effect of the grid on the DFIG.In order to avoid such a scenario in this paper a novel practice has been adapted by making the K P and K I as dynamic quantities.During the controllability analysis of the proposed NTM-PI controller and the bench-marking controller, it is observed that NTM-PI controller has less maximum overshoot and less settling time of 8.23% and 0.93sec respectively.It has also been noticed that with the ANFIS and ANN controllers, it is very difficult to achieve the statistical performance of the above-stated controller with all other benchmarking models.
At Tables 6 and 7, the performance analysis of the proposed NTM-PI controller has been presented with different voltage and current THD.It is found that the mini-batch loss at 100 EPOCH value is marginal and controllable by effectively updating the 90% of the system weight function in the hidden layers.All these analyses have been carried out in a controlled environment and strictly restricted to unconstrained optimization.The implementation of DPT enhances the learning capabilities of the neural network which further leads to development of accurate learning capabilities in the PI controller.The present study has clearly demonstrated the stability of the model and power quality using grid interconnection.
As an extension to the present research adaptive learning techniques can be adapted with an Intelligent Electronic Device (IED) to make the system more robust which can bring down the disturbance up to half a cycle at the point of observation.Cyber-physical-based layer for gateway application may be enabled for bidirectional communication between the operator and the controller.Further, the research can also be taken up by considering some other system parameters such as wind speed variations, power system imbalances and different grid code compliances such as IEEE, IEC and IS-Code.By interconnecting these elements into the training phase of neural network would enable the further development of adaptive PI controller which will further enhance the stability of the system.

Figure 3 .
Figure 3. Surface view of coefficient and weight function.

Figure 4 .
Figure 4. (a) Rule table for membership function using IF-THEN statement.(b) Triangular membership function for ANFIS PI controller.

Figure 5 .
Figure 5.Time response analysis of ANFIS PI controller using step function.

Figure 6 .
Figure 6.Block diagram of ANN control DFIG grid interconnected system.

Figure 7 .
Figure 7. Training and validation of ANN data for I d and I q ref. generation, (a) Training rate 0.999, (b) Training rate 0.998.

Figure 8 .
Figure 8. ANN PI controller performance for, (a) Input to the controller, (b) Output of controller, (c) Error rate, (d) Neural network output.

Figure 12
represents a comparative analysis of V DC Ref. voltage waveform for (a) PI controller (b) ANFIS- PI controller (c) ANN-PI controller (d) NTM-PI controller.As observed, in Fig. 12(a) the V DC ref. voltage has undergone a maximum shoot of 1.042 and a maximum variation of 0.97 during the initial transition period.
X min

Table 1 .
PI controller gain for inner current control loop and transfer function performance.

Table 2 .
PI controller gain for outer voltage control loop and transfer function performance.

Table 3 .
Wind turbine parameters for MATLAB simulation.

Table 4 .
DFIG parameters considered for simulation in accordance with IEEE 1547.speed of the setup is fixed at 1500 RPM with a nominal torque of 238.7 Nm.All types of resistance related to stator and rotor side are fixed below 0.02ω , similarly, all the inductance values are set below 0.01H.

Table 5 .
Simulink model parameters for GSC.

Table 6 .
Performance analysis of Proposed NTM-PI controller during Optimization process at four different levels of Voltage THD.

Table 7 .
Performance analysis of Proposed NTM-PI controller during Optimization process at two different levels of Current THD.

Table 8 .
Performance comparison analysis of different algorithm during ±10% of voltage fluctuation at PCC.

Table 9 .
Performance comparison analysis of different algorithm during ±5% of frequency regulation at PCC.