Performance enhancement of PV system using VSG with ANFIS controller

With the enormous stress of energy lack and air pollution, renewable energy sources such as photovoltaic sources become an effective solution to solve these problems. The penetration of inertia-less photovoltaic sources into power system has adverse effects on the overall system inertia which threatens system stability. As a solution for this problem, virtual inertia technique can be used as a system controller in order to enhance the system performance and maintain its stability. In this paper, an adaptive virtual synchronous generator (VSG) controller based on the oscillation motion of the synchronous machine is introduced. Then, a proposed VSG with adaptive neuro-fuzzy inference system (ANFIS) is presented as an inverter controller. The system response is investigated and compared with other control methods under different operating scenarios. To verify the effectiveness of the proposed adaptive VSG, an experimental setup is presented with real-time implementation for the system using dSPACE DS1104 interfacing with MATLAB software, and the system response is investigated under different operating scenarios. Upon the presented results, there is an enhancement in the system response when the proposed adaptive VSG with ANFIS controller is used, and this emphasizes the superiority of using such controller in PV systems over other techniques.


Introduction
The ever increase in the worldwide population renders a continuous increase in the size and complexity of electric power systems (EPSs). This necessitates the upgrade of the output of the conventional synchronous generators. However, the traditional EPSs that based mainly on conventional energy sources are a source of the harmful gases and environmental pollution. So, there is a worldwide agreement on the need to reduce greenhouse gas emissions by a high share of energy obtained from renewable sources worldwide [1]. Among these new energy sources, photovoltaic (PV) power generation holds a particular promise as it is green, unlimited and is available worldwide. This penetration helps in solving several B Abdallah Nazih abdullahnazeh@gmail.com 1 Electrical Engineering Department, Faculty of Engineering, Menoufia University, Shebin Elkom, Egypt 2 Electrical Engineering Department, Faculty of Engineering, Beni-Suef University, Beni Suef, Egypt challenges in the energy sector. Among these challenges; the greenhouse gas emission due to burning the fossil fuels, the high cost of conventional energy, lack of electricity supply in remote regions as well as the high transmission and distribution network losses in urban and developed regions. All of these can be addressed by PV penetration in the modern global electricity [1].
With the ever increase in PV penetration into EPSs, it is necessary to analyze its impact on power system stability. The stability of power system is traditionally achieved by regulating large synchronous machines with high inertia to accommodate the disturbances in the power system [2]. Unfortunately, due to static nature of photovoltaic devices, PV sources are not able to provide any mechanical inertia as synchronous machines does. The low inertia will cause the power system to be more sensitive to the disturbance, and thus, a small load change may result in a serve deviation in frequency. Abnormal frequency deviations will not only affect the stability of whole power system, but also degrade the performance of load-end machines and even damage system equipment. Therefore, maintaining proper system frequency in response to disturbances is essentially [3,4].
As the conventional control methods cannot always maintain the system stability at large disturbances, virtual inertia can be considered as an adequate control method in such systems. Virtual inertia can compensate the lack of inertia in photovoltaic systems by controlling the interface power electronic devices [5]. The objective of virtual inertia scheme is to reproduce the dynamic properties of conventional synchronous machine in order to imitate its features. Such control technique is going to be more vital to overcome fluctuations in the rapidly increased photovoltaic grid-connected systems by reducing the frequency deviation, decreasing the overshoot magnitude and hence improving the dynamic performance of the systems [5].
The concept of virtual inertia is introduced in the literature as an inverter control technique known as virtual synchronous generator (VSG) [5], virtual synchronous machine (VSM) [6] or synchronverters [7]. Several researchers pay attention to investigate the effects of VSG on power system performance and stability. Thus, there are many types of virtual inertia control algorithms, depending on the control objectives. To control a PV system operating in stand-alone mode, a control strategy is introduced to match the PV output and the load, which can maintain the response of the PV system and prevent the output from collapsing [8,9]. The dynamic and static characteristics of synchronous generators are used in design the virtual inertia control for improving the power quality of grid-connected systems [10,11].
Several literatures are conducted to compare between virtual inertia and other control techniques. There are comparisons between the dynamic response of system controlled with droop control and virtual synchronous generator methods [12,13]. VSG provides adequate inertia and damping that are required for maintaining grid frequency stability, thus providing a flexible control. The results show an enhancement in the system characteristics in case of inverters that controlled with VSG over that controlled by droop control method [12][13][14].
Although the introduction of virtual inertia helps in improving the overall behavior of the power system, some problems have been noticed concerned with the tendency of the system to have a larger overshoot and oscillation, which degrades the transient performance [15]. By investigating the influence of control parameters on the system, the adaptive parameters of VSG help in improving the performance and system stability. Thus, in order to overcome the shortcomings of traditional VSG control method, the parameters of VSG can be adaptively controlled to yield better performance of the system [16]. As an application of this strategy, an alternating adaptive control strategy by changing the moment of inertia and damping coefficient of VSG is established by further analyzing the influence on the dynamic output characteristics of the system [17].
As a tool to confront and help in solving the challenges related with the complexity of the power systems, fuzzy logic control has been gaining attention in the area of power control engineering, especially in inverter controller design for PV applications and generation. Fuzzy inference system (FIS) is the using of fuzzy "if-then" rules to introduce the qualitative features of human knowledge but needs set of standards to employ the exact decision [18][19][20][21]. Virtual inertia is introduced with FIS to solve the problems of insufficient damping and low inertia, hence ensuring the system frequency stabilization [22,23]. In this technique, the virtual inertia parameters are automatically adjusted based on input signals indicate the deviations in system frequency. This method helps in avoiding delivering rapid inertia response with enhancing in frequency transients and oscillations. But despite the various merits in this technique, there are some shortfalls. In particular, the absence of well-established design process and optimized data those are required to convert the human knowledge into rule base. In addition, lack of standards required to have the database of the fuzzy inference system. Thus, finding the boundaries of membership functions and other rules of this technique requires manual tuning, long computation time and considerable effort.
In recent years, artificial neural network (ANN) becomes one of the most commonly tools used in many applications as ANN technique provides accurate solution to complex problems in less time. There is architecture that combining between FIS and neural networks, this technique called adaptive neuro-fuzzy inference system (ANFIS). This novel technique commonly used now as a more accurate control method than FIS. ANFIS has the advantage of expert knowledge of the fuzzy inference system (FIS) and learning capabilities of the neural network (NN) for control of nonlinear systems. Such technique has a flexible and intelligent design, expedient user interface and easy computation. So, a control scheme using ANFIS will produce more accurate results [24].
In this paper, the concept of virtual synchronous generator (VSG) is introduced. After that, an adaptive virtual synchronous generator controller based on the oscillation motion of the synchronous machine is presented. Then, a proposed VSG with adaptive neuro-fuzzy inference system (ANFIS) is presented as an inverter controller in the inertialess power systems. The implementation of the proposed VSG with ANFIS controller with MATLAB software for PV system is also presented. Moreover, simulation results for the system response of the proposed VSG with ANFIS controller are presented and compared with other control methods under different operating scenarios. An experimental setup is presented to verify the effectiveness of the proposed adaptive VSG controller and compared with the conventional VSG, Fig. 1 Connection of VSG in PV system droop control and system without virtual inertia with realtime implementation for the system using dSPACE DS1104 interfacing with MATLAB software. The system response is investigated under different operating scenarios.

Virtual synchronous generator
The key equation in synchronous generator that describes the inertial response is the swing equation. Swing equation can be modeled as virtual inertia control method to be used in inverter control. This, in turn, makes the system behave like synchronous generator behavior, and this leads to enhance the system performance at disturbances. In such controller, there are feedback signals of grid voltage and frequency that are used to calculate the grid angular frequency. The input and output powers of the inverter are measured in order to be used in solving the equation. By knowing these variables and choosing appropriate values for both damping factor and moment of inertia, the virtual angular frequency is then calculated from the swing equation that can be written as follows: where P in and P out are the input and output powers of the inverter, respectively. J and D are the moment of inertia and the damping factor, respectively. ω m and ω g are the virtual angular frequency and the grid angular frequency, respectively [15].
To illustrate the principles of VSG, Fig. 1 shows the connection of the model in electrical power system containing PV source. As shown in this figure, an AC/AC converter is connected with the PV source and controlled with VSG method and tied with utility grid and local load [25]. The VSG control diagram is illustrated in Fig. 2. As shown in this schematic, the input parameters to the controller are the grid angular frequency and the input and output powers of the inverter. Moment of inertia and damping factor are defined parameters in the controller. Hence, the virtual angular frequency is calculated from swing equation and integrated to produce the electrical angle. This angle is required to control the pulse width modulation (PWM) that controlling the DC/AC converter [26][27][28][29][30][31].

Adaptive virtual synchronous generator
To enhance the performance of power systems, an adaptive control model is required to track the changes in power and frequency in different levels of disturbances, hence enhancing the system stability in low inertia PV systems. From the perception of oscillated motion in the synchronous machine at disturbance, if a change is occurred in the prime mover power from P m1 to P m2 , the operating point moves along the power curve, from point "A" to point "C" and then from point "C" to point "A" with oscillatory motion about point "B." The change in frequency in one cycle of the oscillation can be partitioned into four intervals as shown in Fig. 3 [26][27][28][29][30][31].
Proceeding from the above concept, the value of power reference in conventional VSG can be calculated in adaptive manner to emulate the operation of synchronous generator. This can be deduced by taking one cycle of the oscillation with four time intervals. At the first time interval, the angular frequency deviation ( ω) is positive, and the derivative of angular frequency (dω/ dt) is also positive that means there is acceleration, and so, at this interval, the adaptive power (P ad ) for the power reference has a high value. At the second time interval, the ω is positive but dω/ dt has a negative value that means there is deceleration, and at this time interval, the P ad has a low value. At third time interval, the ω is negative and dω/ dt is also negative that means there is acceleration, and hence, P ad has a high value at this interval. At the last one, the ω is negative but the dω/ dt is positive which means there is deceleration like the second one; therefore, P ad at this time has a low value. By this adaptive technique, the controller adopts the suitable value of power reference taking the power changes and frequency deviations into consideration. The conclusion of deducing the value of P ad according to the state of the system can be shortened as shown in Table 1 [31].
Based on the previous concept, the value of P ad is increased and decreased according to the system state, and this increasing or decreasing can be determined by M factor as follows: The M factor has only two values; the first is (+ 1) indicates the acceleration of the system and the high value of P ad , the second is (− 1) that points to the deceleration of the system and low value of P ad . The value of P ad is calculated adaptively according to M factor as follows: where P ad is the adaptive power reference, P in is the input power to the inverter, M is the adaptive change factor and ω is the angular frequency deviation. The differentiation of grid angular frequency and the difference between grid angular frequency and its reference value are used in calculation of M factor. The resultant is multiplied by the input active power to be summed with it or subtract from it according to the value of M factor; so, this method acts as adaptive reference power. By this method, the value of input power reference of controller varies according to the dynamic behavior of the oscillated frequency to damp this oscillation and maintain the system stable from the principle of virtual inertia of synchronous generator.

Adaptive neuro-fuzzy inference system
Adaptive neuro-fuzzy inference system (ANFIS) is a control technique that comprises a hybrid system of fuzzy logic controller and artificial neural networks techniques [32][33][34][35]. ANFIS control systems are considered as hybrid platforms that can solve the complex problems and nonlinear systems which require the use of intelligent systems which qualify it to be an alternative scheme to the conventional model-based control methods. ANFIS offers the combination of learning and adaptability of the artificial neural networks in addition the important concepts of approximate reasoning and treatment of data provided by the fuzzy inference systems [32][33][34][35]. There are several merits of the combining process in ANFIS that qualifies it to attain great attention among control systems techniques. As examples of these merits are that the ease of implementation, fast and accurate learning, strong generalization abilities and it is easy to comprise both linguistic and numeric knowledge in this technique which ease solving of complex systems [32][33][34][35].
ANFIS algorithm structure, as illustrated in Fig. 4 [35], consists of five network layers to perform the processing steps of fuzzy inference system. These layers are defined based on its role in the algorithm as described below [35].
Layer 1 is the fuzzification layer at which the inputs are fuzzified according to the respective membership functions. Each node in this layer that expresses with a square shape produces membership grade of linguistic label. If α and β are the inputs to node m (where m = 1, 2, 3 …) of layer 1 then [35]: where A m and B m represent the linguistic labels associated with this node function value. In other words, denote the degree of membership functions of the A m and B m , respectively, and μ represents the membership function. Layer 2 receives incoming values from the previous layer then operates as a membership function to represent fuzzy sets. Every node in this layer that expressed by a circle node labeled , multiplies the incoming signals. Each node output represents the firing strength of a rule. The output of each node in layer 2 indicated by W n represents the firing strength of a rule as follows [35]: Layer 3 computes the activation level of each rule by calculating the normalized firing strength of each rule then forwarded to the next layer. A circle shape is expressed each node in this layer. The output of this layer W n is computed according to the following expression [35]: Layer 4 is known as the defuzzification layer that it provides the output values resulting from the inference of the rules. The output of this layer O 4 n can be expressed as follows [35]: where p n , q n and r n are designed parameters. Square type nodes are used for this layer. Layer 5 is called the output layer and represented by circle shape labeled . This layer sums all the incoming from the previous layer and converts the fuzzy results into crisp data. The overall output (γ) can be written as follows [35]: Learning data in ANFIS algorithm are a process through it the values of fuzzy inference system (FIS) parameters are determined in order to sufficiently fit the training data that are presented to it [32][33][34][35]. This training process tunes the membership functions of the initial FIS and its rules and still  [32][33][34][35] repeats this tuning process until the error reaches a specified value [32][33][34][35].
Backpropagation technique is used in learning process as a parameter optimization method to minimize the error that usually defined as the sum of squared differences between the outputs and the desired ones [32][33][34][35]. In the forward pass of this process, the input signal goes forward throughout the layers and the consequent parameters are then adjusted, and the output is computed. In the backward pass, the error signal resulting from the difference between the actual output and the desired output is propagated backward through the system, and the parameters are modified based on gradient descent. Each combination of these forward and backward propagations is called an epoch [32][33][34][35]. Learning algorithm repeats the process until the error is minimized, and an optimized output is achieved. When this point is reached, the generated FIS is regarded as an optimized system. These processes can be summarized in a flowchart as shown in Fig. 5 [32][33][34][35].
The next lines present a proposed controller that comprises the adaptive virtual synchronous generator based on the oscillation motion of the synchronous machine that is presented previously and the ANFIS technique to control a PV system.

Proposed VSG with ANFIS
The proposed control comprises the adaptive VSG and ANFIS as shown in Fig. 6. In this control, there are two inputs to the ANFIS and one output. The inputs are the angular frequency deviation ( ω) and the derivative of angular frequency (dω/ dt). The output of ANFIS is the strength of the change in the adaptive reference power (m).
ANFIS training process works well if the initially inserted training data are fully representative of the features of the data which the required fuzzy inference system (FIS) is intended to model. In order to start the modeling process, an initial fuzzy model has to be derived. This model is required to find the number of inputs, number of linguistic variables and hence the number of rules to derive the final optimal FIS model. This training process tunes the membership function parameters of the initial FIS until optimizes it. So, for training the fuzzy system using ANFIS in MATLAB software, the training data set of inputs and its related output are initially collected from an adaptive VSG with fuzzy inference system model. The value of m is varying between + 1 and − 1 for more adaptation. By this method, the power reference will be automatically adjusted depending on the changes in angular frequency deviation and derivative of angular frequency in the system.
The fuzzy rules are the fundamental operation of fuzzy logic for mapping the input signals to the output signal. Five triangular membership functions are used for each input and output, and the fuzzy rules used are 25 rules consist of five linguistic variables as illustrated in Table 2. The linguistic variables are defined by five words that express the levels of deviation in the variables as follows; negative large (NL), negative small (NS), zero (ZE), positive small (PS) and positive large (PL).
The fuzzy rules are constructed based on the acceleration and the deceleration responses of the synchronous generator to evaluate the suitable value of the fuzzy output. The where A, B and C represent the linguistic values defined by fuzzy sets. The fuzzy inference system generates the fuzzy linguistic output based on fuzzy rules. Then, the results are converted into crisp values that can be used in the control model. The collected data are loaded in ANFIS editor as a training data in order to generate the optimized FIS. The number of membership functions of inputs and output has been chosen as that of FIS controller. A hybrid learning algorithm is used to identify the parameters of the fuzzy inference system. It utilizes a combination of least squares method and backpropagation method for training the network. The structure of ANFIS for the proposed control is shown in Fig. 7. The structure shows the two inputs of the angular frequency deviation and the derivative of angular frequency and the one output of the strength of the change in the adaptive reference power with the five layers network.
After completing the implementation of training process, the ANFIS generates the optimized FIS that can be used in the control system. The simulation results of the proposed VSG with ANFIS controller are presented in the next part

Simulation results
Simulation study using MATLAB software is done for investigating the system characteristics while using the proposed VSG with ANFIS controller. For the assessment of the proposed VSG with ANFIS controller, the system response is compared with the adaptive VSG with fuzzy logic controller, conventional VSG and without virtual inertia controller. PV source supplies the local load and interfaces the grid via power inverter controlled with PWM. DC-side filter is used to smooth and filter the output of PV source. Moreover, ACside filter consists of inductive and capacitive component is used to reduce the harmonic contents and produce a nearby sine wave signal. The connection of the system components is illustrated in Fig. 8, and the system parameters are shown in Table 3. The system response is investigated under different operating scenarios such as starting, load increase, load System response for the assessment of the proposed VSG with ANFIS at starting a the active power, b the reactive power and c the frequency decrease, islanding with heavy load, islanding with medium load, islanding with light load and irradiance change as follows.

Starting
The active power, the reactive power and the frequency response of the system at starting are illustrated in Fig. 9a, b and c, respectively. The system is controlled with the proposed VSG with ANFIS and compared with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. System active power starts from 0-to 11.9-KW steady-state value. Reactive power starts from zero until reaching 1.95-KVar steady-state value. The frequency oscillates about 50 Hz at transient period until reaches its steady-state value. By studying the system characteristics, when the system is controlled with the proposed VSG with ANFIS, more enhanced performance is obtained comparing with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. This is because, the overshoot at transient period is reduced and the system Fig. 10 System response for the assessment of the proposed VSG with ANFIS at load increasing a the active power, b the reactive power and c the frequency response becomes more rapidly and gets steady-state within less time. This leads to more enhancing in system stability and overall system performance, and this emphasizes the superiority of using the proposed controller with PV systems.

Load increase
Another type of disturbances that the system may expose to it is the case of load increasing. So, the proposed controller is assessed under this case. Regarding Fig. 10a, b and c, the system active power, reactive power and frequency with the proposed VSG with ANFIS are illustrated, respectively, at load increasing. The system response for the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller is illustrated to be compared with the proposed VSG with ANFIS.
In this case, at the instant t = 0.4 s, the system load increased from 11.9 to 14.5 KW in active power and from 1.95 to 2.46 KVar in reactive power with 50-Hz frequency.
By comparing between the system characteristics with the proposed VSG with ANFIS, the adaptive VSG with fuzzy Fig. 11 System response for the assessment of the proposed VSG with ANFIS at load decreasing a the active power, b the reactive power and c the frequency logic controller, the conventional VSG and without virtual inertia controller, it is observed a reeducation in overshoot magnitude in active power, reactive power and frequency response with the proposed VSG with ANFIS. Also, the transient time is reduced, and the system response becomes more rapidly and gets steady-state within less time. Therefore, using of the proposed VSG with ANFIS control leads to more enhancements in the system characteristics and performance.

Load decrease
Decreasing in the load is also a type of disturbance in the system; thus, the system response with the proposed VSG with ANFIS is studied at this case. The system response of the proposed VSG with ANFIS is compared with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. Regarding Fig. 11a, b and c, the system active power, reactive power and frequency are illustrated, respectively.
In this case, at the instant t = 0.4 s, the load decreased from 14.5 to 11.9 KW and from 2.46 to 1.95 KVar with 50-Hz system frequency. The system response emphasizes the preference of using the proposed VSG with ANFIS over other mentioned techniques. Thus, at using this control method, the overshoot magnitudes are reduced and system reaches steady-state in less time comparing with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. This performance leads to positive effects on overall system stability.

Islanding mode
The islanding mode is another form of disturbance to which the power system could be exposed. In this case, the grid is disconnected, and the system turns to be isolated feeding the local load. The system response in islanding mode is studied in three different types of load; heavy load, medium load and light load.

Heavy load
In this islanding case, at the instant t = 0.4 s, the active power decreased from 14.5 to 12.8 KW, and the reactive power decreased from 2.46 to 1.97 KVar with 50-Hz system frequency. Regarding Fig. 12a, b and c, the system active power, reactive power and frequency are illustrated, respectively, when the system is controlled with the proposed VSG with ANFIS, the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller at islanding with heavy connected load mode. When the system is controlled with the proposed VSG with ANFIS controller, the transient time is decreased, and system reaches steadystate in less time compared with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller in this case of islanding. Such system response confirms the superiority of using the proposed VSG with ANFIS as a control method for PV systems over other techniques.

Medium load
At islanding mode with medium connected load, the system response with the proposed VSG with ANFIS controller is also studied and compared with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. Regarding Fig. 13a, b and c, the system active power, reactive power and frequency are illustrated, respectively. In this islanding case, at the instant t = 0.4 s, the active power decreased from 4 to 2 KW, and the reactive power decreased from 0.58 to 0.3 KVar with 50-Hz system frequency. Fig. 12 System response for the assessment of the proposed VSG with ANFIS at islanding mode with heavy load a the active power, b the reactive power and c the frequency By studying the system response when it controlled by the proposed VSG with ANFIS, the adaptive VSG with fuzzy logic controller, conventional VSG and without virtual inertia controller at this case of islanding, a decreasing in overshoot magnitude and transient time are noticed at using the proposed VSG with ANFIS method. The performance of the system frequency in this case has a noticed enhancing in its stability at both transient and steady-state periods when the system is controlled with the proposed controller over other methods. All of these emphasize the effectiveness of the proposed VSG with ANFIS controller at islanding disturbances.

Light load
In this case of light connected load in islanding, at the instant t = 0.4 s, the active power decreased from 2.5 to 0.5 KW, and the reactive power decreased from 0.39 to 0.15 KVar with 50-Hz system frequency. Regarding Fig. 14a, b and c, the system active power, reactive power and frequency are illustrated, respectively. The system response is compared when the system is controlled by the proposed VSG with ANFIS, Fig. 13 System response for the assessment of the proposed VSG with ANFIS at islanding mode with medium load a the active power, b the reactive power and c the frequency the adaptive VSG with fuzzy logic controller, conventional VSG and without virtual inertia controller.
It is noticed that, while there is instability in the system without virtual inertia and low performance characteristics with the conventional VSG controller, the system maintains its stability with the adaptive VSG with fuzzy logic controller, and the highest performance is observed with the proposed VSG with ANFIS. These results emphasize the superiority of the proposed VSG with ANFIS over other methods in maintaining system stability and enhancing its performance.

Irradiance change
PV system may expose to changing in the irradiance that affects its performance. The adequate controller is necessary in this case to maintain the system stability. For studying the proposed controller under this case, regarding Fig. 15, at the instant t = 0.4 s, the irradiance is changed from 1000 to 600 W/m 2 for 0.2 s then increased to 1100 W/m 2 . Regarding  Fig. 16, (a) the active power, (b) the reactive power and (c) the frequency of the system are shown, respectively, when the system is controlled with the proposed VSG with ANFIS,  The active power started with 11.9 KW with irradiance 1000 W/m 2 then when the irradiance is decreased to 600 W/m 2 , the active power is decreased to 4.5 KW; then by increasing the irradiance to 1100 W/m 2 , the active power is increased to 14.2 KW. Likewise, the reactive power started at 1.95 KVar then decreased to 0.8 KVar then increased to 2.32 Kvar with respect to the irradiance change. Based on the Fig. 16 System response for the assessment of the proposed VSG with ANFIS at irradiance changing a the active power, b the reactive power and c the frequency system response, there is a reduction in the overshoot magnitude, and the system takes less time to reach the steady-state period when the proposed VSG with ANFIS is used. This means the preponderance of using the proposed VSG with ANFIS method in PV systems compared with the adaptive VSG with fuzzy logic controller, conventional VSG and without virtual inertia controller.

Experimental setup
To verify the effectiveness of the proposed VSG with ANFIS control with a PV system, an experimental setup is established for this purpose. A schematic diagram of the experimental system is illustrated in Fig. 17. A photograph of the experimental system is shown in Fig. 18. The experimental system parameters values are indicated in Table 4.
Various components are used to establish the experimental system. A PT-SP250P-6-60 type from PTP Energy Solutions   photovoltaic module is used as the system power source. A DC-side capacitor is used in parallel with a protective diode with the PV module as a DC-side filter. Three modules of MITSUBISHI CM100DY-24H IGBTs are used to form the three legs of the inverter where each module consists of two IGBTs to construct the inverter. The modules are placed on aluminum heat sink sided with cooling fans to dissipate the heat generated from the modules. Also, three inductors and three capacitors are used in the AC-side for filtering the output of the inverter. Three-phase resistive bank is connected as a load in the AC-side of the system after the filters. For measuring the current in the DC-side, one current transformer (CT) is used in series with the system and for voltage measuring, one voltage transformer (VT) is used in parallel in the DC-side for this purpose. Likewise, three CTs and three VTs are used in the AC-side to measure the threephase currents and voltages in this side, respectively. The LEM Module LA 25-NP transducer type is used for current measuring, and LV 25-P is used for voltage measuring. These transducers are used for the measurement of both DC and AC considering an electrical isolation between the power circuit and the control circuit. The output signals of these transducers fed to the digital signal processor (DSP) board through the A/D converter. The DSP receives the measured signals from CTs and VTs via analog-to-digital converters and then processes these signals with the computer software according to the control system in order to generate the control signals. A dSPACE DS1104 board is used to implement the real-time control interface with MATLAB software through the personal computer (PC). The DSP board is connected in the peripheral component interface (PCI) slot on the main board of the PC with uninterrupted communication. The dSPACE DS1104 includes a MPC8240 main processor with PPC 603e core and on-chip peripherals. This main processor clock is running at 250 MHz with global memory of 32-MB SDRAM. There is a TMS320F240 slave DSP, Texas Instrument floatingpoint DSP, 20-MHz CPU clock. It contains of four 16-bit analog-to-digital (A/D) channels, four 12-bit A/D channels, eight 16-bit digital-to-analog (D/A) channels and other input/output (I/O) interfaces. MATLAB/SIMULINK is provided with a real-time interface (RTI) for communicating with data acquisition hardware such as the dSPACE control board DS1104 to provide a user-friendly interface to system control and observation.
The output signals of the DSP correspond to the switching commands for the IGBTs of the power inverter. These commands cannot be directly connected to the power electronic switches for two reasons. The first is that the power level of these signals is not adequate to drive the power switch. The second is that the power switches are located at different voltage levels with no common connection among them. For these reasons, gate drive circuit is required. A six-channel gate drive circuit is used for this purpose.

Experimental results
The experimental setup is used to investigate the system response when the system is controlled with the proposed adaptive VSG, conventional VSG, droop control and system without virtual inertia. This response is taken under different operating scenarios such as starting, load increase and load decrease for evaluating the effectiveness of the proposed controller.

Starting
The system response is investigated at starting in order to evaluate the effectiveness of the proposed adaptive VSG and compare with the response of the system when it controlled with the conventional VSG, droop control and without virtual inertia. The experimental results of the power and frequency of the system at starting are presented in Fig. 19. The active power started from 0 until reach its steady-state value at 1 pu.
The system frequency oscillates about 50 Hz until reaching the steady-state value. By investigating the results of the system response at starting, it is noticed a significant reduction in the overshoot magnitudes at transient period in both power and frequency responses when the system is controlled by the proposed adaptive VSG method comparing with the other methods. Moreover, the system response is enhanced and becomes more rapidly and gets steady-state within less time with the proposed controller. Such these features in inertia-less PV system lead to more enhancing in the system stability and

Fig. 20
Experimental results for the system response at load increasing a the power and b the frequency the overall system performance, and this confirms the effectiveness of the proposed controller.

Load increase
As another case of disturbances that the system may expose to it is the load increasing. Upon, the system response is investigated at load increase case as another method of evaluation the proposed controller. The experimental results of the power and frequency of the system at load increasing are presented in Fig. 20. At the instant t = 0.5 s, the load power increases from 1 to 1.4 pu with 50-Hz system frequency, and the system response is studied with the proposed adaptive VSG controller, conventional VSG, droop control and without virtual inertia. By studying the system response at load increasing, the results emphasize the preference of using the proposed adaptive VSG control method comparing with the conventional VSG, droop control and without virtual inertia methods. This is due to the high performance of the system with the proposed controller that is obtained from the fast response time in both power and frequency responses and the reduction in overshoot magnitudes. Therefore, these results confirm that using the proposed method reflects positively on the overall system performance.

Load decrease
Likewise, the system is exposed to a decrease in the load as a type of disturbance. As shown in Fig. 21, at the instant t = 0.5 s, the experimental results of the power and frequency

Fig. 21
Experimental results for the system response at load decreasing a the power and b the frequency of the system are presented when the load power decreases from 1.4 to 1 pu with 50-Hz system frequency. Likewise, the system response is investigated by using the proposed control method, the conventional VSG, the droop control and without virtual inertia. By comparing the system response for the proposed adaptive VSG controller, the conventional VSG, the droop control and without virtual inertia, it is observed that the transient time is decreased at the using of the proposed method and the system reaches steady-state in less time for both power and frequency responses, and there is also an observed reduction in the overshoot magnitudes. This confirms the superiority of the proposed control method over the other methods.
Experimental results emphasize the superiority of the proposed adaptive VSG control method as an inverter controller for inertia-less PV systems over conventional VSG controller, droop control method and without virtual inertia controllers. While the traditional controllers of PV system give a poor performance under different operating scenarios, the proposed adaptive VSG controller could track the changes in power and frequency under different operating cases and hence enhancing the system stability in the inertia-less PV system. Through such proposed controller, the overshoot magnitude is significantly reduced. Also, the settling time is decreased, and the system reaches to steadystate faster at using this method. Moreover, the steady-state error is diminished, and the oscillation at steady-state is damped in less time at using the proposed adaptive controller. Such performance enables the system to guarantee its stability in the severe disturbances.

Conclusion
There is a global trend to increase the penetrated capacity of photovoltaic energy into electrical networks to help in solving several challenges in the energy sector. However, due to static nature of photovoltaic devices, PV sources cannot provide any mechanical inertia to the system, and this has adverse effects on the system performance and its stability. On the other hand, virtual inertia controllers are introduced to compensate the lack of inertia in such systems. Though the merits of traditional VSG control methods, they have some of shortcomings such as the long transient time and the high overshoot magnitude in the system response. To overcome these problems, an adaptive VSG controller based on the oscillation motion of synchronous machine is presented.
For more enhancing in the system performance, a proposed VSG with ANFIS is presented as an inverter controller. The implementation of the proposed VSG with ANFIS controller with MATLAB software for PV system is presented and compared with the adaptive VSG with fuzzy logic controller, the conventional VSG and without virtual inertia controller. The system response is investigated under different operating scenarios.
Moreover, an experimental setup is presented to verify the effectiveness of the proposed adaptive VSG controller with real-time implementation using dSPACE DS1104 interfacing with MATLAB software. The system response is investigated under different operating scenarios such as starting, load increase and load decrease. Upon the presented results, there is an enhancement in the system response when the proposed adaptive VSG with ANFIS controller is used, and this emphasizes the superiority of using such controller in PV systems over other techniques. By studying the system response under different operating scenarios, it is observed an overall enhancing in the system performance and stability with the proposed VSG with ANFIS controller. The settling time is reduced, and the system response becomes more rapidly and gets steady-state within less time at using the proposed method. Moreover, the frequency response is significantly enhanced, and the oscillation at steady-state is damped in less time at using this proposed control. The overshot magnitude and the steadystate error are also decreased by the proposed VSG with ANFIS. All these characteristics emphasize the preeminence of the proposed VSG with ANFIS controller over the other techniques and qualify it to be used in inertia-less PV systems. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.