Dynamic Performance Enhancement of Power Grids by Operating Solar Photovoltaic (PV) System as Supercapacitor Energy Storage

: Energy storage devices are collocated with conventional solar photovoltaic (PV) systems to tackle the intermittency of solar irradiance and maintain the power quality of supplied energy. The energy storage system usually has its own conversion devices that may incur an extra capital cost of installation. This paper proposes an integrated and cost-effective photovoltaic-supercapacitor (PVSC) system in which the energy storage functionality of the supercapacitor (SC) is merged into the PV array where the power ﬂow bidirectionally takes place to maintain the system stability under grid disturbances during the daytime, nighttime, and cloudy weather. A nonlinear mathematical model (NMM) was developed to conduct the stability analyses and to design the controller parameters, which facilitates a faster and more accurate numerical analysis compared to existing average models. The effectiveness of the proposed system was evaluated by simulation analysis and compared to that of the basic PV and a conventional SC system in which full energy storage is connected in parallel with the PV. The results demonstrate that the proposed PVSC system is effective in improving the dynamic performance of the connected power grid system. In addition, the proposed PVSC system fulﬁlls the functionality of the conventional SC with merged conversion devices; that is, the performance of the proposed PVSC system is comparable to the conventional SC system.


Introduction
Among renewable energy sources (RESs), the photovoltaic (PV) system is the most promising due to its inherent features, such as lack of moving parts, and low maintenance and operation cost [1,2]. Typically, a grid-connected PV system consists of a PV array/panel, a DC-DC boost converter with a maximum power point tracking (MPPT) controller, a DC-link capacitor, and an inverter, as shown in Figure 1. Because, the PV panel does not produce any real power at night or on a cloudy day, a battery energy storage (BES), which is not shown in the figure, may provide power to the grid at that time. In recent years, due to its cost effectiveness, supercapacitor energy storage (SES) has been extensively used for the dynamic performance enhancement of power grids [3,4]. The SES can control both active and reactive powers quickly and simultaneously. The applications of the SES system with the PV system have also been reported in [5][6][7]. The SES unit encompasses a supercapacitor, a DC-DC bidirectional converter (BDC), a DC-link capacitor, and a voltagesourced converter (VSC), as shown in Figure 2. However, a close similarity is found between the PV system and the SES unit in terms of their components. With the exception of the PV panel, MPPT controller, and supercapacitor, both systems have the same type and number of components. Based on this fact, it is interesting to explore whether the existing PV system components can be utilized as an SES unit during both nighttime and cloudy days. It will provide significant benefits if the PV-SES unit can be used for dynamic performance improvement of the grid-connected network, which may have other distributed energy resources (DERs), such as wind and diesel generators, and various flexible loads.
Currently, the low voltage ride-through (LVRT) capability of the PV system is maintained by the reactive power control of the inverter [8][9][10]. In addition, various MPPT techniques have been developed considering the partial shading of the PV panel [11,12]. The BES is used to compensate for power fluctuations of the PV system [13]. A previous work [14] presents the stability improvement of a multimachine power system connected with a large-scale hybrid wind-PV farm using an energy-storage unit based on a supercapacitor (SC). In [15], a sliding mode and Lyapunov function-based control algorithms were presented for the boost converter and DC-AC inverter used for the solar-PV powergenerating system array connected to the grid. In [16], a rule-based power management algorithm was proposed to enable the dispatch of a utility-scale PV powerplant consisting of a hybrid energy storage system under the Australian national electricity rules. The work [17] exploits current grid resources and explores energy storage for primary frequency response under high PV penetration at the interconnection level. The paper [18] studies both static hosting capacity (SHC) and dynamic hosting capacity (DHC) in distribution grids and proposes an adaptive controller for static synchronous compensators to regulate the steady-state and dynamic voltage while avoiding the unnecessary increase in the reactive power. Moreover, the application of PV has been shown as a static synchronous compensator (STATCOM) to regulate grid voltage, to increase grid power transmission limits, to mitigate subsynchronous resonance (SSR), to damp power oscillation, etc. [19][20][21][22][23][24][25][26][27].
However, there are significant shortcomings, limitations, and challenges of the existing PV system technology and controls, such as: (i) the basic PV system operation is mainly limited to daytime use only, although the works [19,20,25] have indicated the use of PV at daytime and nighttime; (ii) the inverter can control only reactive power, but not the active power because the operation is unidirectional and the system is limited in terms of when it is able to inject the PV power; this means the inverter can have a limited control of the grid voltage, but not the real power or the frequency; and (iii) the BES can control high energy density power fluctuations, but not high-power density fluctuations.
To overcome the above-mentioned limitations and challenges, this paper proposes to design and operate the grid-connected PV system as an SES during nighttime or intermittent cloud insolation conditions, and during daytime. According to the proposed approach, a partially charged supercapacitor (by the grid power) will be connected between Based on this fact, it is interesting to explore whether the existing PV system components can be utilized as an SES unit during both nighttime and cloudy days. It will provide significant benefits if the PV-SES unit can be used for dynamic performance improvement of the grid-connected network, which may have other distributed energy resources (DERs), such as wind and diesel generators, and various flexible loads.
Currently, the low voltage ride-through (LVRT) capability of the PV system is maintained by the reactive power control of the inverter [8][9][10]. In addition, various MPPT techniques have been developed considering the partial shading of the PV panel [11,12]. The BES is used to compensate for power fluctuations of the PV system [13]. A previous work [14] presents the stability improvement of a multimachine power system connected with a large-scale hybrid wind-PV farm using an energy-storage unit based on a supercapacitor (SC). In [15], a sliding mode and Lyapunov function-based control algorithms were presented for the boost converter and DC-AC inverter used for the solar-PV powergenerating system array connected to the grid. In [16], a rule-based power management algorithm was proposed to enable the dispatch of a utility-scale PV powerplant consisting of a hybrid energy storage system under the Australian national electricity rules. The work [17] exploits current grid resources and explores energy storage for primary frequency response under high PV penetration at the interconnection level. The paper [18] studies both static hosting capacity (SHC) and dynamic hosting capacity (DHC) in distribution grids and proposes an adaptive controller for static synchronous compensators to regulate the steady-state and dynamic voltage while avoiding the unnecessary increase in the reactive power. Moreover, the application of PV has been shown as a static synchronous compensator (STATCOM) to regulate grid voltage, to increase grid power transmission limits, to mitigate subsynchronous resonance (SSR), to damp power oscillation, etc. [19][20][21][22][23][24][25][26][27].
However, there are significant shortcomings, limitations, and challenges of the existing PV system technology and controls, such as: (i) the basic PV system operation is mainly limited to daytime use only, although the works [19,20,25] have indicated the use of PV at daytime and nighttime; (ii) the inverter can control only reactive power, but not the active power because the operation is unidirectional and the system is limited in terms of when it is able to inject the PV power; this means the inverter can have a limited control of the grid voltage, but not the real power or the frequency; and (iii) the BES can control high energy density power fluctuations, but not high-power density fluctuations.
To overcome the above-mentioned limitations and challenges, this paper proposes to design and operate the grid-connected PV system as an SES during nighttime or intermittent cloud insolation conditions, and during daytime. According to the proposed approach, a partially charged supercapacitor (by the grid power) will be connected between Based on this fact, it is interesting to explore whether the existing PV system components can be utilized as an SES unit during both nighttime and cloudy days. It will provide significant benefits if the PV-SES unit can be used for dynamic performance improvement of the grid-connected network, which may have other distributed energy resources (DERs), such as wind and diesel generators, and various flexible loads.
Currently, the low voltage ride-through (LVRT) capability of the PV system is maintained by the reactive power control of the inverter [8][9][10]. In addition, various MPPT techniques have been developed considering the partial shading of the PV panel [11,12]. The BES is used to compensate for power fluctuations of the PV system [13]. A previous work [14] presents the stability improvement of a multimachine power system connected with a large-scale hybrid wind-PV farm using an energy-storage unit based on a supercapacitor (SC). In [15], a sliding mode and Lyapunov function-based control algorithms were presented for the boost converter and DC-AC inverter used for the solar-PV powergenerating system array connected to the grid. In [16], a rule-based power management algorithm was proposed to enable the dispatch of a utility-scale PV powerplant consisting of a hybrid energy storage system under the Australian national electricity rules. The work [17] exploits current grid resources and explores energy storage for primary frequency response under high PV penetration at the interconnection level. The paper [18] studies both static hosting capacity (SHC) and dynamic hosting capacity (DHC) in distribution grids and proposes an adaptive controller for static synchronous compensators to regulate the steady-state and dynamic voltage while avoiding the unnecessary increase in the reactive power. Moreover, the application of PV has been shown as a static synchronous compensator (STATCOM) to regulate grid voltage, to increase grid power transmission limits, to mitigate subsynchronous resonance (SSR), to damp power oscillation, etc. [19][20][21][22][23][24][25][26][27].
However, there are significant shortcomings, limitations, and challenges of the existing PV system technology and controls, such as: (i) the basic PV system operation is mainly limited to daytime use only, although the works [19,20,25] have indicated the use of PV at daytime and nighttime; (ii) the inverter can control only reactive power, but not the active power because the operation is unidirectional and the system is limited in terms of when it is able to inject the PV power; this means the inverter can have a limited control of the grid voltage, but not the real power or the frequency; and (iii) the BES can control high energy density power fluctuations, but not high-power density fluctuations.
To overcome the above-mentioned limitations and challenges, this paper proposes to design and operate the grid-connected PV system as an SES during nighttime or intermittent cloud insolation conditions, and during daytime. According to the proposed approach, a partially charged supercapacitor (by the grid power) will be connected between points A and B at the PV panel terminal (see Figure 1). At nighttime, the PV panel will be disconnected naturally. Consequently, the charged supercapacitor connected as the input to the DC-DC converter and the rest of the components (except the MPPT controller) will constitute the SES unit that can be used for dynamic performance improvement. During the daytime, following any disturbances such as any faults in the network, the PV panel will be disconnected for a very short time, and the SES unit will control both reactive and active powers, thereby providing both voltage and frequency support to the grid. Once the power grid stability is maintained, the PV panel will be reconnected and operate normally. Thus, the proposed system can provide a seamless and robust operation of the grid-connected PV system.
In summary, the main benefits of the proposed approach are as follows.
(i) The proposed PV system not only works in its typical mode of operation but also can improve the system stability whenever needed (i.e., whenever there are any disturbances in the grid). This is the additional advantage that can be achieved from the same PV system by momentarily connecting a supercapacitor at the PV panel terminal. (ii) To handle any disturbances (fault, load change, etc.) at the grid side, typically an auxiliary control device such as STATCOM, static var compensator (SVC), fault current limiter, or an extra energy storage device (such as a full supercapacitor energy storage unit, as shown in Figure 2, or a full battery energy storage system) is connected at the grid point, and the system stability is maintained. However, as per the proposed approach, because the same PV system will be used, it saves the cost of adding any auxiliary control devices at the grid point; that is, this technology will achieve significant cost savings due to the use of the existing PV system components as the SES unit.
In this work, a new controller was designed to open and close the switches of the PV and SES systems. Small-signal stability analysis for the proposed PV-SES system was conducted. To show the effectiveness of the proposed PV-SES unit, extensive simulations were performed. Both voltage and frequency disturbances were considered at the grid side.
The paper is organized as follows. Section 2 describes the proposed PV-SES system modeling. Section 3 describes the component models and control systems. Section 4 explains the BDC and VSC control systems. Section 5 explains the small-signal stability analysis for the proposed approach. Simulation results are shown and discussed in Section 6. Finally, Section 7 concludes this study.

Principle of Operation
The operation of the proposed PV-supercapacitor (PVSC) concept is better explained in Figure 3. As shown at the right side of this figure, there is a point of common coupling (PCC) grid point where there can be other power sources, such as synchronous generators, wind generators, and other PV systems, connected to power the loads or the customers. To handle any disturbances (fault, load change, etc.) at the grid side, an auxiliary control device is typically connected at the grid point or the DC link point, and the system stability is maintained. Now, according to the proposed concept, during any random disturbances at the grid side, usage of any full supercapacitor storage system at the grid side of the DC link point will not be needed.  Based on this concept, if any disturbance unexpectedly takes place at the grid side (it can be any time, i.e., nighttime/daytime/cloudy weather), then the PV panel will be momentarily disconnected by the switch SW1 and the supercapacitor switch SW2 will be closed (assuming the SC has already been charged). Then the supercapacitor, together with the bidirectional DC-DC converter (BDC), DC link capacitor, and voltage-sourced converter (VSC), will constitute the full supercapacitor energy storage unit/system (as shown in Figure 2) that can tackle sudden disturbances such as a fault or load change, at the grid side. Because the PV panel is disconnected for a short period, other power sources connected at the grid point will certainly continue providing power to the customers at that time. Once the grid becomes stable, the PV panel will immediately be reconnected by closing the switch SW1 and will operate normally (during sunny conditions) and the SC switch SW2 will be disconnected. Therefore, the utility integrated PV system can operate as a supercapacitor energy storage system. It should be noted that in the proposed PVSC system, the BDC works in voltage control mode and the VSC works in grid-forming control mode with a conventional synchronous generator-based droop control that can track the reference power. This reference power is defined by either the MPPT system in PV mode operation or another value in the energy storage mode of operation. Although SW1 and SW2 can be implemented by high-speed mechanical switches, the static switches are preferred because their operations are faster and safer than mechanical switches to ensure fast and reliable changeover from PV to SC and vice versa. The next section explains how the algorithm controls the switches SW1 and SW2 and the VSC reference power.
It should be noted that the proposed PVSC system will have the capabilities to operate in the following two modes: (i) PV system mode: In this mode, the proposed PV system will provide power to the grid, as usual, assuming there is sufficient solar irradiance (sunlight). (ii) Energy storage mode: In this mode, once there are any grid disturbances, such as faults or load changes, (irrespective of daytime, nighttime, cloudy situations), the same PV system changes to the energy storage (supercapacitor) mode through the switches, and by controlling active and reactive powers it improves the transient stability, fault-ride through capability, voltage sag, etc., of the grid. Once the grid stability is maintained, it changes back to the usual PV system mode above. Based on this concept, if any disturbance unexpectedly takes place at the grid side (it can be any time, i.e., nighttime/daytime/cloudy weather), then the PV panel will be momentarily disconnected by the switch SW1 and the supercapacitor switch SW2 will be closed (assuming the SC has already been charged). Then the supercapacitor, together with the bidirectional DC-DC converter (BDC), DC link capacitor, and voltage-sourced converter (VSC), will constitute the full supercapacitor energy storage unit/system (as shown in Figure 2) that can tackle sudden disturbances such as a fault or load change, at the grid side. Because the PV panel is disconnected for a short period, other power sources connected at the grid point will certainly continue providing power to the customers at that time. Once the grid becomes stable, the PV panel will immediately be reconnected by closing the switch SW1 and will operate normally (during sunny conditions) and the SC switch SW2 will be disconnected. Therefore, the utility integrated PV system can operate as a supercapacitor energy storage system. It should be noted that in the proposed PVSC system, the BDC works in voltage control mode and the VSC works in grid-forming control mode with a conventional synchronous generator-based droop control that can track the reference power. This reference power is defined by either the MPPT system in PV mode operation or another value in the energy storage mode of operation. Although SW1 and SW2 can be implemented by high-speed mechanical switches, the static switches are preferred because their operations are faster and safer than mechanical switches to ensure fast and reliable changeover from PV to SC and vice versa. The next section explains how the algorithm controls the switches SW1 and SW2 and the VSC reference power.
It should be noted that the proposed PVSC system will have the capabilities to operate in the following two modes: (i) PV system mode: In this mode, the proposed PV system will provide power to the grid, as usual, assuming there is sufficient solar irradiance (sunlight). (ii) Energy storage mode: In this mode, once there are any grid disturbances, such as faults or load changes, (irrespective of daytime, nighttime, cloudy situations), the same PV system changes to the energy storage (supercapacitor) mode through the switches, and by controlling active and reactive powers it improves the transient stability, fault-ride through capability, voltage sag, etc., of the grid. Once the grid stability is maintained, it changes back to the usual PV system mode above. Figure 4 shows the flowchart of the control algorithm of the proposed PVSC system. It is assumed that a disturbance detection algorithm (DDA) generates a control signal (u) with two values of 0, indicating normal operation, and 1 indicating detected disturbance, in addition to other measurements controlling the switching states of SW1 and SW2. The aim of this study was not to design and analyze the DDA because it is outside the scope of this paper. It can be based on the monitoring of the combination of the real-time values or rate of change of grid parameters at PCC.  Figure 4 shows the flowchart of the control algorithm of the proposed PVSC system. It is assumed that a disturbance detection algorithm (DDA) generates a control signal (u) with two values of 0, indicating normal operation, and 1 indicating detected disturbance, in addition to other measurements controlling the switching states of SW1 and SW2. The aim of this study was not to design and analyze the DDA because it is outside the scope of this paper. It can be based on the monitoring of the combination of the real-time values or rate of change of grid parameters at PCC. During the day, while no disturbance is detected, the system works like a basic PV system to inject the maximum power generated by solar irradiance. Therefore, SW1 is closed (on), and SW2 is open (off), and the VSC reference power ( * ) is set to the PV maximum power ( ). Once a disturbance is detected by DDA such that = 1, first the SW1 is opened and then the SW2 is immediately closed. In the moment of changeover from PV to SC, the last value of the PV voltage ( ) is saved to be applied in the next changeover from SC back to PV. In addition, a flag is toggled to 1 to indicate that the During the day, while no disturbance is detected, the system works like a basic PV system to inject the maximum power generated by solar irradiance. Therefore, SW1 is closed (on), and SW2 is open (off), and the VSC reference power (P * VSC ) is set to the PV maximum power (P mpp ). Once a disturbance is detected by DDA such that u = 1, first the SW1 is opened and then the SW2 is immediately closed. In the moment of changeover from PV to SC, the last value of the PV voltage (v t− pv ) is saved to be applied in the next changeover from SC back to PV. In addition, a flag is toggled to 1 to indicate that the changeover from PV to SC has occurred. The system will continue to handle the transient stability until the operating condition comes back to a normal situation and the DDA issues the signal u = 0.

Control Algorithm
It should be noted that, during the transient period that the SC is switched on, the reference power is maintained at the previous value of P * VSC to have a smooth changeover by supplying the same power. At the end of the transient operation, the stored energy in SC is examined by checking its voltage. The transient period is usually short enough (in the order of few seconds) to assume that the solar irradiance remains unchanged and the same P mpp is generated. The SC voltage (v sc ) must be close to v t− pv to ensure that the changeover from SC to PV is smooth and the PV returns to its operating point prior to the changeover. It should be noted that, due to employing the MPPT system, v pv does not vary significantly for a wide range of solar irradiance levels. For example, for the PV under study in this paper, it is in the range of 259 < v pv < 274 for a wide range of irradiance levels between 100 and 1000 w/m 2 . Consequently, the SC is charged/discharged from the grid at the end of the transient period to ensure that v sc is in this range by applying an appropriate charge/discharge power reference (P ch , P dch ) to VSC. Before changeover to PV, if the SC is overcharged (i.e., v sc > v t− pv ), the VSC will continue to discharge power to the grid, and if it is undercharged (i.e., v sc < v t− pv ), the algorithm will change P * VSC to P ch . A small value of ε is added to v t− pv as a dead band to avoid chattering. The process of smooth power reference variation will be discussed in the next sections. During night or completely cloudy weather, while the irradiance level is below the operation threshold, the system works as a regular SC energy storage, and the VSC reference power is set to zero (P * VSC = 0).

Components Models and Control Systems
The details of the control systems and power stage of the VSC, BDC, supercapacitor, and PV are well studied in the literature. Here, a theoretical background is briefly provided that is vital for the small-signal analyses discussed in the next section. This study considers a detailed switching model (DSM) of the components for time-domain analyses and a nonlinear mathematical model (NMM) for stability analyses. Figure 5a,b shows the current source model [28] and its equivalent Thevenin model [29] of the PV module, respectively. The voltage-current (V-I) characteristic of a PV array consisting of N s series modules and N p parallel strings is defined by the following nonlinear expressions:

PV
where I spv = N p I s and I 0 = N p I 0,d are PV and diode saturation current of the array, V TH = N s kT q is the diode thermal voltage, k is the Boltsmann constant, and n is the diode ideality factor, respectively. I s and I 0,d are individual module's photogenerated current and diode saturation current, and R p and R spv are the equivalent series and parallel resistances of the array, respectively. I s,r is photogenerated current at nominal conditions (25 • C and 1000 W/m 2 ), α I is a current-temperature coefficient, S, and T are irradiation level (W/m 2 ) and ambient temperature (in Kelvin), with S r and T r being their nominal values. The nonlinear model in Figure 5a can be approximated by its tangent to achieve a Thevenin equivalent model (Figure 5b), around the equilibrium (maximum power) point (V pv , I pv ) of the PV: where R pv is the PV source static resistance and is defined by R pv V pv I pv at the equilibrium point, and V spv is the equivalent internal voltage source. With the known values of R spv and R p , and using Equation (1), the PV power is calculated by: (5) and the maximum PV power (P mp ) and the corresponding value of the voltage at this point can be obtained by equating the power expression to zero at maximum point (mp) [30]: A small value of is added to as a dead band to avoid chattering. The process of smooth power reference variation will be discussed in the next sections. During night or completely cloudy weather, while the irradiance level is below the operation threshold, the system works as a regular SC energy storage, and the VSC reference power is set to zero ( * = 0).

Components Models and Control Systems
The details of the control systems and power stage of the VSC, BDC, supercapacitor, and PV are well studied in the literature. Here, a theoretical background is briefly provided that is vital for the small-signal analyses discussed in the next section. This study considers a detailed switching model (DSM) of the components for time-domain analyses and a nonlinear mathematical model (NMM) for stability analyses. Figure 5a,b shows the current source model [28] and its equivalent Thevenin model [29] of the PV module, respectively. The voltage-current (V-I) characteristic of a PV array consisting of series modules and parallel strings is defined by the following nonlinear expressions:  These PV power and voltage values can be used for the control system, which will be discussed in the next section. The PV manufacturers usually supply the I-V and P-V characteristics of the module for different operating points [28]. However, one can estimate the maximum power point parameters using Equation (6) if the module parameters are known. Figure 6 shows the P-V characteristics of the PV array used in this study for different values of solar irradiation. As can be seen, the range of the PV voltage variation when working at the maximum point is narrow enough to safely connect it to a precharged SC.

PV
where = and = , are PV and diode saturation current of the array, = is the diode thermal voltage, is the Boltsmann constant, and is the diode ideality factor, respectively. and , are individual module's photogenerated current and diode saturation current, and and are the equivalent series and parallel resistances of the array, respectively. , is photogenerated current at nominal conditions (25 ° and 1000 W/m ), is a current-temperature coefficient, , and are irradiation level (W/m ) and ambient temperature (in Kelvin), with and being their nominal values. The nonlinear model in Figure 5a can be approximated by its tangent to achieve a Thevenin equivalent model (Figure 5b), around the equilibrium (maximum power) point ( , ) of the PV: where is the PV source static resistance and is defined by ≜ at the equilibrium point, and is the equivalent internal voltage source. With the known values of and , and using Equation (1), the PV power is calculated by: and the maximum PV power ( ) and the corresponding value of the voltage at this point can be obtained by equating the power expression to zero at maximum point ( ) [30]: These PV power and voltage values can be used for the control system, which will be discussed in the next section. The PV manufacturers usually supply the I-V and P-V characteristics of the module for different operating points [28]. However, one can estimate the maximum power point parameters using Equation (6) if the module parameters are known. Figure 6 shows the P-V characteristics of the PV array used in this study for different values of solar irradiation. As can be seen, the range of the PV voltage variation when working at the maximum point is narrow enough to safely connect it to a precharged SC.   Figure 7 shows the equivalent model of the SC [31]. In this study, the capacitor element of the SC is modeled as an internal voltage source, with a parallel self-discharge resistance (R psc ) and a series resistance (R ssc ). The incremental/decremental energy in the internal capacitor depends on the power absorbed/injected and the duration of the SC in operation:

SC
where is the internal capacitor current. Then the current value of v csc can be calculated by: where E sc,0 = 1 2 C sc v 2 csc,0 is the initial energy stored in the internal capacitor with the initial voltage v csc,0 . Figure 7b represents the nonlinear model of the SC to be used in NMM. Figure 7 shows the equivalent model of the SC [31]. In this study, the capacitor element of the SC is modeled as an internal voltage source, with a parallel self-discharge resistance ( ) and a series resistance ( ). The incremental/decremental energy in the internal capacitor depends on the power absorbed/injected and the duration of the SC in operation:

SC
is the internal capacitor current. Then the current value of can be calculated by: where , = , is the initial energy stored in the internal capacitor with the initial voltage , . Figure 7b represents the nonlinear model of the SC to be used in NMM.

Bidirectional DC-DC Converter
The BDC is a half-bridge converter [31,32] and controls the DC link voltage where VSC is connected to its DC side. Unlike the basic PV systems in which a boost converter along with the VSC works in current source mode (or grid-supporting mode) and does not control the voltage and frequency, the proposed system aims to implement the voltage source mode (or grid forming mode) in which the BDC controls the DC link voltage and the VSC controls voltage and frequency at its terminal in AC side. The basic PV system injects the PV active power and can have limited control of reactive power. The dynamics of the BDC is expressed in terms of inductor current ( ) and DC link capacitor voltage ( ): where , and are, respectively, the inductor and DC link capacitor parameters, is the converter input voltage that can be either connected to (when operating with PV) and when operating with SC, and ( ) is defined by:

Bidirectional DC-DC Converter
The BDC is a half-bridge converter [31,32] and controls the DC link voltage where VSC is connected to its DC side. Unlike the basic PV systems in which a boost converter along with the VSC works in current source mode (or grid-supporting mode) and does not control the voltage and frequency, the proposed system aims to implement the voltage source mode (or grid forming mode) in which the BDC controls the DC link voltage and the VSC controls voltage and frequency at its terminal in AC side. The basic PV system injects the PV active power and can have limited control of reactive power. The dynamics of the BDC is expressed in terms of inductor current (i L ) and DC link capacitor voltage (v dc ): where L dc , R dc and C dc are, respectively, the inductor and DC link capacitor parameters, v in is the converter input voltage that can be either connected to v pv (when operating with PV) and v sc when operating with SC, and f (d) is defined by: where d is the duty cycle generated by the control system. It should be noted that when operating with SC, f (d) can take both values in Equation (11) depending on the charge or discharge operation. However, during the operation with PV, where the converter works in boost mode, f (d) = d. Figure 8, on the left-hand side, shows the equivalent circuit model For the BDC connected to SC it holds that: where is the duty cycle generated by the control system. It should be noted that when operating with SC, ( ) can take both values in Equation (11) depending on the charge or discharge operation. However, during the operation with PV, where the converter works in boost mode, ( ) = . Figure 8, on the left-hand side, shows the equivalent circuit model of the BDC power stage. The dynamics of the inductor current ( ) has little difference when operating with PV and SC. For the BDC connected to PV we have: where ( ) = 1 − . For the BDC connected to SC it holds that: The diagram of the nonlinear dynamic model of the BDC combined with PV and SC is separately expressed in the Laplace domain and represented in Figure 9, which will be used for linearization purposes. The control system of BDC is discussed in the next section.

VSC, Load, and Transmission Line
The VSC is a two-level three-phase inverter [33] with an LCL circuit [34] working as a second-order filter. It should be noted that, although the control system of the VSC is implemented in the rotating reference frame (RRF) or dq to interact with DC parts of the system, its power stage is modeled in the stationary reference frame (SRF) or to reflect the frequency interactions with the power grid [35]. The following expressions represents the VSC dynamics in the frame: The diagram of the nonlinear dynamic model of the BDC combined with PV and SC is separately expressed in the Laplace domain and represented in Figure 9, which will be used for linearization purposes. The control system of BDC is discussed in the next section. where is the duty cycle generated by the control system. It should be noted that when operating with SC, ( ) can take both values in Equation (11) depending on the charge or discharge operation. However, during the operation with PV, where the converter works in boost mode, ( ) = . Figure 8, on the left-hand side, shows the equivalent circuit model of the BDC power stage. The dynamics of the inductor current ( ) has little difference when operating with PV and SC. For the BDC connected to PV we have: where ( ) = 1 − . For the BDC connected to SC it holds that: The diagram of the nonlinear dynamic model of the BDC combined with PV and SC is separately expressed in the Laplace domain and represented in Figure 9, which will be used for linearization purposes. The control system of BDC is discussed in the next section.

VSC, Load, and Transmission Line
The VSC is a two-level three-phase inverter [33] with an LCL circuit [34] working as a second-order filter. It should be noted that, although the control system of the VSC is implemented in the rotating reference frame (RRF) or dq to interact with DC parts of the system, its power stage is modeled in the stationary reference frame (SRF) or to reflect the frequency interactions with the power grid [35]. The following expressions represents the VSC dynamics in the frame:

VSC, Load, and Transmission Line
The VSC is a two-level three-phase inverter [33] with an LCL circuit [34] working as a second-order filter. It should be noted that, although the control system of the VSC is implemented in the rotating reference frame (RRF) or dq to interact with DC parts of the system, its power stage is modeled in the stationary reference frame (SRF) or αβ to reflect the frequency interactions with the power grid [35]. The following expressions represents the VSC dynamics in the αβ frame: where m αβ is the control signal input to VSC and v tαβ is the converter AC terminal voltage, and all other parameters are introduced in Figure 1. Variables with subscription αβ are orthogonal space vectors where the component α is aligned with the phase a of the corresponding variable in the abc reference frame. The load is a combination of resistive and inductive elements. Although the series combination of the load is considered in the time domain modeling, its parallel combination is presented in the Laplace domain in Figure 10 where R l and L l represent the parallel equivalent of the load elements. The following expressions define the dynamics of the load and transmission line in the αβ frame: where v gαβ is the constant vector of grid voltage. The αβ vectors of the grid voltage can be converted from the abc reference frame using Clark transformation [33,36]. The complete dynamic models of the VSC, load, and transmission line are derived from Equations (14) and (15) and represented in Figure 10. This model, along with the dynamic models of the other components, is used in the NMM for linearization and stability analyses.
Energies 2021, 14, x 10 of 25 where is the control signal input to VSC and is the converter AC terminal voltage, and all other parameters are introduced in Figure 1. Variables with subscription are orthogonal space vectors where the component is aligned with the phase of the corresponding variable in the reference frame. The load is a combination of resistive and inductive elements. Although the series combination of the load is considered in the time domain modeling, its parallel combination is presented in the Laplace domain in Figure 10 where and represent the parallel equivalent of the load elements. The following expressions define the dynamics of the load and transmission line in the frame: where is the constant vector of grid voltage. The vectors of the grid voltage can be converted from the abc reference frame using Clark transformation [33,36]. The complete dynamic models of the VSC, load, and transmission line are derived from Equations (14) and (15) and represented in Figure 10. This model, along with the dynamic models of the other components, is used in the NMM for linearization and stability analyses.

Control Systems
The control systems are designed and implemented such that the combination of the BDC and VSC operates in voltage source or grid-forming mode.

BDC Control
When operating with PV, the BDC turns into a unidirectional converter whose function is to transfer the PV power to VSC while ensuring the DC link voltage remains at its reference value. However, during the operation with SC, it performs as a bidirectional

Control Systems
The control systems are designed and implemented such that the combination of the BDC and VSC operates in voltage source or grid-forming mode.

BDC Control
When operating with PV, the BDC turns into a unidirectional converter whose function is to transfer the PV power to VSC while ensuring the DC link voltage remains at its reference value. However, during the operation with SC, it performs as a bidirectional converter to exchange power with VSC. This changeover is facilitated in the control algorithm by switching between signals and measurements. The BDC is controlled by a cascaded voltage-current control framework [29,37] where the current loop bandwidth is much greater than that of the voltage loop. Hence, the controllers can be separately designed. Figure 11 shows the BDC control diagram when operating with SC, where k pv , k iv , k pc , and k ic are, respectively, the proportional and integral gains of the PI regulators in voltage and current loops. In addition, ω c1 is the bandwidth of the low pass filter (LPF) to suppress the switching noise of current measurement ( i L ). v dc and V * dc are the DC link voltage measurement and its reference value, respectively. converter to exchange power with VSC. This changeover is facilitated in the control algorithm by switching between signals and measurements. The BDC is controlled by a cascaded voltage-current control framework [29,37] where the current loop bandwidth is much greater than that of the voltage loop. Hence, the controllers can be separately designed. Figure 11 shows the BDC control diagram when operating with SC, where , , , and are, respectively, the proportional and integral gains of the PI regulators in voltage and current loops. In addition, is the bandwidth of the low pass filter (LPF) to suppress the switching noise of current measurement ( ). and * are the DC link voltage measurement and its reference value, respectively. The operation of BDC, when connected to PV, requires the controller to track the maximum power point voltage at PV terminals ( ) as the reference. , along with the corresponding power ( ) (see Figure 6), are generated by the MPPT system. Inspired by [29], the control system in Figure 11 is reconfigured to control the converter input voltage as feedback provided that the output voltage ( ) remains on its reference value ( * ). We have: which is represented in Figure 12. It should be noted that all controller parameters will remain the same during the changeover from PV to SC and vice versa. Note that is applied to VSC reference power ensuring that the power transferred from DC link to AC side is equal to PV output power, and hence the DC link voltage maintains the constant operation of PV with different irradiance levels.

VSC Control
The VSC has a droop controlled dual loop voltage/current control system implemented in the dq frame, which is well studied in the literature [33,38] and is shown in Figure 13. Voltage and current loop controllers are realized using PI regulators, where the bandwidth of the voltage loop is selected at least one decade below the current loop bandwidth. The operation of BDC, when connected to PV, requires the controller to track the maximum power point voltage at PV terminals (v mp ) as the reference. v mp , along with the corresponding power (P mp ) (see Figure 6), are generated by the MPPT system. Inspired by [29], the control system in Figure 11 is reconfigured to control the converter input voltage as feedback provided that the output voltage (v dc ) remains on its reference value (V * dc ). We have: which is represented in Figure 12. It should be noted that all controller parameters will remain the same during the changeover from PV to SC and vice versa.
converter to exchange power with VSC. This changeover is facilitated in the control algorithm by switching between signals and measurements. The BDC is controlled by a cascaded voltage-current control framework [29,37] where the current loop bandwidth is much greater than that of the voltage loop. Hence, the controllers can be separately designed. Figure 11 shows the BDC control diagram when operating with SC, where , , , and are, respectively, the proportional and integral gains of the PI regulators in voltage and current loops. In addition, is the bandwidth of the low pass filter (LPF) to suppress the switching noise of current measurement ( ). and * are the DC link voltage measurement and its reference value, respectively. The operation of BDC, when connected to PV, requires the controller to track the maximum power point voltage at PV terminals ( ) as the reference. , along with the corresponding power ( ) (see Figure 6), are generated by the MPPT system. Inspired by [29], the control system in Figure 11 is reconfigured to control the converter input voltage as feedback provided that the output voltage ( ) remains on its reference value ( * ). We have: which is represented in Figure 12. It should be noted that all controller parameters will remain the same during the changeover from PV to SC and vice versa. Note that is applied to VSC reference power ensuring that the power transferred from DC link to AC side is equal to PV output power, and hence the DC link voltage maintains the constant operation of PV with different irradiance levels.

VSC Control
The VSC has a droop controlled dual loop voltage/current control system implemented in the dq frame, which is well studied in the literature [33,38] and is shown in Figure 13. Voltage and current loop controllers are realized using PI regulators, where the bandwidth of the voltage loop is selected at least one decade below the current loop bandwidth. Note that P mp is applied to VSC reference power ensuring that the power transferred from DC link to AC side is equal to PV output power, and hence the DC link voltage maintains the constant operation of PV with different irradiance levels.

VSC Control
The VSC has a droop controlled dual loop voltage/current control system implemented in the dq frame, which is well studied in the literature [33,38] and is shown in Figure 13. Voltage and current loop controllers are realized using PI regulators, where the bandwidth of the voltage loop is selected at least one decade below the current loop bandwidth. In Figure 13, and are nominal values of the system frequency and voltage magnitude, and are droop control coefficients, and , , * and * are the output active and reactive power and their references, respectively. It should be noted because the VSC is connected to the grid and the frequency is a global variable, the steadystate error of the frequency is zero and the VSC tracks the reference active power, which is defined by the control algorithm. However, because the voltage is a local variable, there would be a trade-off between tracking the reference reactive power or voltage magnitude. The voltage and current control loops are expressed in Equations (17) and (18)

Nonlinear Mathematical Model and Small-Signal Stability Analyses
In this section, the stability of the proposed system is analyzed through a complete nonlinear mathematical model (NMM) of all components and their interactions.

NMM
The NMM is suitable for fast linearization analysis with high accuracy where the system's dynamic complexity grows with the number of components. It can be considered as a reduced order average model that retains the system's dynamic with high accuracy. The NMM can be formed by interconnecting all component's dynamic models. The dynamic interaction between AC and DC parts is established by the power balance in the DC link between BDC and VSC as follows. Neglecting the power transfer loss in VSC we have: Figure 13. The VSC control system diagram.
In Figure 13, ω n and V n are nominal values of the system frequency and voltage magnitude, m p and n q are droop control coefficients, and P o , Q o , P * VSC and Q * VSC are the output active and reactive power and their references, respectively. It should be noted because the VSC is connected to the grid and the frequency is a global variable, the steadystate error of the frequency is zero and the VSC tracks the reference active power, which is defined by the control algorithm. However, because the voltage is a local variable, there would be a trade-off between tracking the reference reactive power or voltage magnitude. The voltage and current control loops are expressed in Equations (17) and (18), respectively: where k pv2 , k iv2 , k pc2 , and k ic2 are proportional and integral gains of the PI regulators.

Nonlinear Mathematical Model and Small-Signal Stability Analyses
In this section, the stability of the proposed system is analyzed through a complete nonlinear mathematical model (NMM) of all components and their interactions.

NMM
The NMM is suitable for fast linearization analysis with high accuracy where the system's dynamic complexity grows with the number of components. It can be considered as a reduced order average model that retains the system's dynamic with high accuracy. The NMM can be formed by interconnecting all component's dynamic models. The dynamic interaction between AC and DC parts is established by the power balance in the DC link between BDC and VSC as follows. Neglecting the power transfer loss in VSC we have: where P DC and P AC are input and output power of the VSC, respectively.
Substituting v td = m dq 2 v dc in Equation (20) and equating the right-hand sides of the Equations (19) and (20), it holds: (22) in which i dc is expressed in terms of dq quantities of the modulation indices and VSC output terminal current (i tdq ). Figure 14 shows the NMM of the proposed PVSC system which can be easily utilized for deriving linearized state-space models and transfer functions for any sets of input/output signals. These models and transfer functions can be used for examining the stability of the system under different operating points and parameter variations, and control system design. As can be seen, the NMM is purely based on mathematical models with no implementation of circuits. where and are input and output power of the VSC, respectively. Substituting = in Equation (20) and equating the right-hand sides of the Equations (19) and (20), it holds: in which is expressed in terms of dq quantities of the modulation indices and VSC output terminal current ( ). Figure 14 shows the NMM of the proposed PVSC system which can be easily utilized for deriving linearized state-space models and transfer functions for any sets of input/output signals. These models and transfer functions can be used for examining the stability of the system under different operating points and parameter variations, and control system design. As can be seen, the NMM is purely based on mathematical models with no implementation of circuits.

Small-Signal Analyses
Reference [38] provides a systematic approach to derive the small-signal state-space model of a grid-forming VSC with a constant voltage DC source as an energy source. The same methodology can be used for deriving a combined small-signal model of the PVSC system. However, this study, instead of implementing a tedious linearization approach, utilizes the NMM model and Simulink Control Design (SCD) tool [39] to obtain the smallsignal model. Once the NMM model shown in Figure 14 is formed, the SCD tool is used to carry out classical linear control analyses. The resulting linearized system is represented by the state-space form: where , , and are the small-signal vectors of state variables, input, and output signals, respectively, and , , and are state transition, input, and output matrices of the system, respectively. The eigenvalues of matrix represent poles of the system. For a

Small-Signal Analyses
Reference [38] provides a systematic approach to derive the small-signal state-space model of a grid-forming VSC with a constant voltage DC source as an energy source. The same methodology can be used for deriving a combined small-signal model of the PVSC system. However, this study, instead of implementing a tedious linearization approach, utilizes the NMM model and Simulink Control Design (SCD) tool [39] to obtain the smallsignal model. Once the NMM model shown in Figure 14 is formed, the SCD tool is used to carry out classical linear control analyses. The resulting linearized system is represented by the state-space form: .
where x, u, and y are the small-signal vectors of state variables, input, and output signals, respectively, and A A A, B B B, and C C C are state transition, input, and output matrices of the system, respectively. The eigenvalues of matrix A A A represent poles of the system. For a given operating point, if all poles of System (23) are in the left half-plane of the Real/Imag plane, the system is stable [40] or asymptotically stable. This section aims to examine the stability boundaries of the PVSC system for variation of some parameters in a given operating point. Figure 15 shows the map of the dominant poles of the linearized PVSC system for the case under the study around the nominal operating points represented in Tables 1-3. The initial operating point values are obtained from the steady-state operation of the system under nominal conditions. The figure represents the influence of variation of active power droop coefficient 0.01 < m d < 0.1 when operating with SC. The linearized model has 23 state variables. The displacement of the pole pair shown in the figure indicates that, while the system stability elevates with increasing m d , the system step response would be more aggressive with higher overshoots during the load or power reference changes. Therefore, there should be a trade-off in selecting this parameter. given operating point, if all poles of System (23) are in the left half-plane of the Real/Imag plane, the system is stable [40] or asymptotically stable. This section aims to examine the stability boundaries of the PVSC system for variation of some parameters in a given operating point. Figure 15 shows the map of the dominant poles of the linearized PVSC system for the case under the study around the nominal operating points represented in Tables 1-3. The initial operating point values are obtained from the steady-state operation of the system under nominal conditions. The figure represents the influence of variation of active power droop coefficient 0.01 < < 0.1 when operating with SC. The linearized model has 23 state variables. The displacement of the pole pair shown in the figure indicates that, while the system stability elevates with increasing , the system step response would be more aggressive with higher overshoots during the load or power reference changes. Therefore, there should be a trade-off in selecting this parameter. The same analysis can be applied for defining the stability boundaries for variation of control parameters. Figure 16a,b illustrates the dominant poles' displacement trajectory for the variation of integral gain of the voltage control loop ( 1 ) and integral gain of the current control loop ( 1 ) of the BDC control system. These figures demonstrate how increasing or decreasing integral gains in BDC affects the stability and step response of the system. Similarly, the dominant pole displacement in response to integral gain variation ( 2 ) in the VSC voltage control loop is depicted in Figure 17. The same analysis can be applied for defining the stability boundaries for variation of control parameters. Figure 16a,b illustrates the dominant poles' displacement trajectory for the variation of integral gain of the voltage control loop (k iv1 ) and integral gain of the current control loop (k ic1 ) of the BDC control system. These figures demonstrate how increasing or decreasing integral gains in BDC affects the stability and step response of the system. Similarly, the dominant pole displacement in response to integral gain variation (k iv2 ) in the VSC voltage control loop is depicted in Figure 17.

Simulation Results and Discussions
This section implements the time-domain simulation of the proposed PVSC system shown in Figure 3 and analyzes the effectiveness of the system in response to grid disruptions. The test system data is represented in Table 1. To examine the validation of the NMM, this section simulates and compares the NMM and DSM in the normal operating conditions where there are some step changes in reference values with no external disturbances. It should be noted that the ambient condition in PV is maintained constant during simulations. Figure 18a,b compares the system response to a step change in nominal voltage of the AC terminal (V n ) for v c and VSC control signals m dq . The nominal voltage decreases and increases by 5% in a 1 s interval. As it is shown, with negligible error in m dq signals, both systems have similar dynamics. In addition, Figure 19 illustrates v dc response to ±5% consecutive step changes in DC link reference voltage V * dc . Finally, Figure 20 compares the response of VSC output power (P o ) to a +25% step change in its reference power (P * VSC ). It can be concluded from Figures 18-20 that the NMM conforms with that of the DSM dynamics and can be used for small signal analysis. the AC terminal ( ) for and VSC control signals . The nominal voltage decreases and increases by 5% in a 1 s interval. As it is shown, with negligible error in signals, both systems have similar dynamics. In addition, Figure 19 illustrates response to ±5% consecutive step changes in DC link reference voltage * . Finally, Figure 20 compares the response of VSC output power ( ) to a +25% step change in its reference power ( * ). It can be concluded from Figures 18-20 that the NMM conforms with that of the DSM dynamics and can be used for small signal analysis.   to emulate the worse cases with maximum voltage difference. In this case, a fictitious disturbance signal is triggered by DDA for 2 ≤ ≤ 3 s. The control algorithm performs the procedure. In both cases, the SC is discharged to maintain the reference output power. For the case started with , the system returns to PV with − , where − refers to the PV voltage at the initial changeover moment. However, in the case started with , the algorithm charges the SC to prepare it for the next changeover with − . It is confirmed that the changeover with a maximum difference between and during the system's operation has no negative impact on the system's perfor-  to emulate the worse cases with maximum voltage difference. In this case, a fictitious disturbance signal is triggered by DDA for 2 ≤ ≤ 3 s. The control algorithm performs the procedure. In both cases, the SC is discharged to maintain the reference output power. For the case started with , the system returns to PV with − , where − refers to the PV voltage at the initial changeover moment. However, in the case started with , the algorithm charges the SC to prepare it for the next changeover with − . It is confirmed that the changeover with a maximum difference between and during the system's operation has no negative impact on the system's performance, and hence the proposed PVSC system can be safely used for handling grid dis- 6.1.2. Changeover between PV and SC Figures 21 and 22 show the magnitude of v sc and v dc in response to changeover between PV and SC in DSM, where the changeover takes place with maximum and minimum values of v pv to emulate the worse cases with maximum voltage difference. In this case, a fictitious disturbance signal is triggered by DDA for 2 ≤ t ≤ 3 s. The control algorithm performs the procedure. In both cases, the SC is discharged to maintain the reference output power. For the case started with v min pv , the system returns to PV with v t − pv , where v t − pv refers to the PV voltage at the initial changeover moment. However, in the case started with v max pv , the algorithm charges the SC to prepare it for the next changeover with v t − pv . It is confirmed that the changeover with a maximum difference between v pv and v sc during the system's operation has no negative impact on the system's performance, and hence the proposed PVSC system can be safely used for handling grid disturbances, as discussed in the next section.

Effectiveness of Proposed PVSC System to Maintain Voltage Stability
This section evaluates the effectiveness of the proposed system to maintain voltage stability during the main grid's voltage sags and swells. The proposed PVSC is compared with a basic PV system (BPS) with the same nominal values in which the VSC has a gridfeeding control mode [41] (or current source) where the maximum PV power is injected into the grid with there is no response to grid voltage/frequency deviations. In the BPS, the VSC controls DC link voltage and the DC-DC converter tracks the PV maximum power [10]. In this case, a voltage disruption with ±0.05 pu in 1 s intervals takes place in the main grid voltage magnitude. Figure 23 compares the performance of the proposed PVSC and BPS for voltage and frequency at the VSC terminal in response to this disruption. It is assumed that the DDA enables/disables the abnormal condition signal with a 50 ms delay. As can be seen, the SC remains connected after the system returns to normal condition to charge the SC and is prepared for the next event. Although in the case of PVSC the frequency at the VSC terminal has transients during the voltage disturbances and SC operations, the voltage is maintained perfectly at its nominal value, thus guaranteeing the power quality for the local load.

Effectiveness of Proposed PVSC System to Maintain Voltage Stability
This section evaluates the effectiveness of the proposed system to maintain voltage stability during the main grid's voltage sags and swells. The proposed PVSC is compared with a basic PV system (BPS) with the same nominal values in which the VSC has a gridfeeding control mode [41] (or current source) where the maximum PV power is injected into the grid with there is no response to grid voltage/frequency deviations. In the BPS, the VSC controls DC link voltage and the DC-DC converter tracks the PV maximum power [10]. In this case, a voltage disruption with ±0.05 pu in 1 s intervals takes place in the main grid voltage magnitude. Figure 23 compares the performance of the proposed PVSC and BPS for voltage and frequency at the VSC terminal in response to this disruption. It is assumed that the DDA enables/disables the abnormal condition signal with a 50 ms delay. As can be seen, the SC remains connected after the system returns to normal condition to charge the SC and is prepared for the next event. Although in the case of PVSC the frequency at the VSC terminal has transients during the voltage disturbances and SC operations, the voltage is maintained perfectly at its nominal value, thus guaranteeing the power quality for the local load.

Effectiveness of Proposed PVSC System to Maintain Voltage Stability
This section evaluates the effectiveness of the proposed system to maintain voltage stability during the main grid's voltage sags and swells. The proposed PVSC is compared with a basic PV system (BPS) with the same nominal values in which the VSC has a gridfeeding control mode [41] (or current source) where the maximum PV power is injected into the grid with there is no response to grid voltage/frequency deviations. In the BPS, the VSC controls DC link voltage and the DC-DC converter tracks the PV maximum power [10]. In this case, a voltage disruption with ±0.05 pu in 1 s intervals takes place in the main grid voltage magnitude. Figure 23 compares the performance of the proposed PVSC and BPS for voltage and frequency at the VSC terminal in response to this disruption. It is assumed that the DDA enables/disables the abnormal condition signal with a 50 ms delay. As can be seen, the SC remains connected after the system returns to normal condition to charge the SC and is prepared for the next event. Although in the case of PVSC the frequency at the VSC terminal has transients during the voltage disturbances and SC operations, the voltage is maintained perfectly at its nominal value, thus guaranteeing the power quality for the local load.

Stepwise Load Variation and Weak Connection to Grid
This section assumes that the PV system is weakly integrated to the main grid with higher transmission line impedance (4 , 4 ). A ±25% step load disruption (both active and reactive power) occurs at the local load during 1 < < 3 that causes some transients. The DDA enables/disables the abnormal condition signal with a 50 ms delay. It is assumed that the BPS generates a constant reactive power. As shown in Figure 24, because the BPS does not control the voltage and frequency, the load variation causes voltage excursions from its nominal value and a low magnitude frequency swing is observed in the BPS's terminal. In contrast, the proposed PVSC damps the load variation transients by controlling voltage and frequency.

Stepwise Load Variation and Weak Connection to Grid
This section assumes that the PV system is weakly integrated to the main grid with higher transmission line impedance (4L g , 4R g ). A ±25% step load disruption (both active and reactive power) occurs at the local load during 1 < t < 3 that causes some transients. The DDA enables/disables the abnormal condition signal with a 50 ms delay. It is assumed that the BPS generates a constant reactive power. As shown in Figure 24, because the BPS does not control the voltage and frequency, the load variation causes voltage excursions from its nominal value and a low magnitude frequency swing is observed in the BPS's terminal. In contrast, the proposed PVSC damps the load variation transients by controlling voltage and frequency.

Performance Comparison between the Proposed PVSC and Conventional SC
This section investigates the performance of the proposed PVSC in an islanded microgrid and compares it with the case in which the basic PV system is collocated with a conventional supercapacitor (shown in Figure 25). In Figure 25, when the dashed lines are open, the conventional SC is not in use and the remaining system represents the BPS; when the dashed lines are closed, the conventional SC is in use and the system represents the BPS collocated with a conventional SC (BPS-SC). To make the islanded microgrid, the grid models in Figures 1 and 3 are replaced with a droop-controlled grid-forming energy source (DER1) whose primary energy supply can be any source with DC voltage. All components of the microgrid in the three models have the same ratings.

Performance Comparison between the Proposed PVSC and Conventional SC
This section investigates the performance of the proposed PVSC in an islanded microgrid and compares it with the case in which the basic PV system is collocated with a conventional supercapacitor (shown in Figure 25). In Figure 25, when the dashed lines are open, the conventional SC is not in use and the remaining system represents the BPS; when the dashed lines are closed, the conventional SC is in use and the system represents the BPS collocated with a conventional SC (BPS-SC). To make the islanded microgrid, the grid models in Figures 1 and 3 are replaced with a droop-controlled grid-forming energy source (DER1) whose primary energy supply can be any source with DC voltage. All components of the microgrid in the three models have the same ratings.

Performance Comparison between the Proposed PVSC and Conventional SC
This section investigates the performance of the proposed PVSC in an islanded microgrid and compares it with the case in which the basic PV system is collocated with a conventional supercapacitor (shown in Figure 25). In Figure 25, when the dashed lines are open, the conventional SC is not in use and the remaining system represents the BPS; when the dashed lines are closed, the conventional SC is in use and the system represents the BPS collocated with a conventional SC (BPS-SC). To make the islanded microgrid, the grid models in Figures 1 and 3 are replaced with a droop-controlled grid-forming energy source (DER1) whose primary energy supply can be any source with DC voltage. All components of the microgrid in the three models have the same ratings.

Step Change in Local Load
In this section, some stepwise load changes consecutively occur in the local load, similar to the disruptions considered in part 6.3, where the nominal load is 100 kW and the PV works with the max irradiance level. Figure 26 shows the performance of the three system models i.e., the BPS which is the basic system, the BPS collocated with a conventional SC (BPS-SC), and the proposed PVSC for essential system parameters. It is assumed that the DDA system activates and inactivates the SC operation with a 50 ms delay. It is demonstrated that the BPS system is unable to maintain the load power at the demand level, due to the voltage magnitude excursion from its nominal value. In addition, Figure 27 shows the output power of the PV energy storage system. The power balance is made by both systems. However, the PVSC is charged from the DER1 to maintain the minimum level of the SC charge available for the next disturbance. The charging process ends at t = 4.62 s. For a short duration, the load and SC charge power are supplied by the DER1. It is well demonstrated that the performance of the proposed cost-effective system is similar to the conventional system in terms of maintaining the load demand. system models i.e., the BPS which is the basic system, the BPS collocated with a conventional SC (BPS-SC), and the proposed PVSC for essential system parameters. It is assumed that the DDA system activates and inactivates the SC operation with a 50 ms delay. It is demonstrated that the BPS system is unable to maintain the load power at the demand level, due to the voltage magnitude excursion from its nominal value. In addition, Figure  27 shows the output power of the PV energy storage system. The power balance is made by both systems. However, the PVSC is charged from the DER1 to maintain the minimum level of the SC charge available for the next disturbance. The charging process ends at = 4.62 s. For a short duration, the load and SC charge power are supplied by the DER1. It is well demonstrated that the performance of the proposed cost-effective system is similar to the conventional system in terms of maintaining the load demand.   tional SC (BPS-SC), and the proposed PVSC for essential system parameters. It is assumed that the DDA system activates and inactivates the SC operation with a 50 ms delay. It is demonstrated that the BPS system is unable to maintain the load power at the demand level, due to the voltage magnitude excursion from its nominal value. In addition, Figure  27 shows the output power of the PV energy storage system. The power balance is made by both systems. However, the PVSC is charged from the DER1 to maintain the minimum level of the SC charge available for the next disturbance. The charging process ends at = 4.62 s. For a short duration, the load and SC charge power are supplied by the DER1. It is well demonstrated that the performance of the proposed cost-effective system is similar to the conventional system in terms of maintaining the load demand.

Fault Analysis
In this section, a 3-line-to-ground (3LG) short circuit with 0.35 Ω impedance takes place in the middle of the distribution line connecting the PV system to DER1 at t = 1 s for the duration of 83 ms. Figure 28 demonstrates the effectiveness of the proposed system in handling the fault disturbance in an isolated microgrid and compares it to the conventional system.

Fault Analysis
In this section, a 3-line-to-ground (3LG) short circuit with 0.35 Ω impedance takes place in the middle of the distribution line connecting the PV system to DER1 at = 1 s for the duration of 83 ms. Figure 28 demonstrates the effectiveness of the proposed system in handling the fault disturbance in an isolated microgrid and compares it to the conventional system.

Cost-Effectiveness of the Proposed Approach
The proposed PVSC system saves costs because it combines the functionality of energy storage and a basic PV system. To enable a PV system with energy storage capability using traditional methods (i.e., integrating an energy storage device with its converters and control systems), extra devices and systems are needed. These methods can involve either integrating the PV and energy storage device in the DC link and using a common VSC to connect to the AC grid, or using two separate VSCs, one for the PV and another for the energy storage device. In either case, the cost of this integration would be higher than that of the proposed PVSC system. Compared to a basic PV system, the proposed PVSC system has one extra switching device in the DC-DC converter that reconfigures it to a BDC, and two non-modulating switches for changeover operations between the PV and SC with a small increase in the converter's capacity. Although a normal energy storage system (ESS), such as battery energy storage (BES), is not within the scope of this study, in terms of cost, both BES and SES would have similar prices; however, the performance of SES is faster than that of BES.

Cost-Effectiveness of the Proposed Approach
The proposed PVSC system saves costs because it combines the functionality of energy storage and a basic PV system. To enable a PV system with energy storage capability using traditional methods (i.e., integrating an energy storage device with its converters and control systems), extra devices and systems are needed. These methods can involve either integrating the PV and energy storage device in the DC link and using a common VSC to connect to the AC grid, or using two separate VSCs, one for the PV and another for the energy storage device. In either case, the cost of this integration would be higher than that of the proposed PVSC system. Compared to a basic PV system, the proposed PVSC system has one extra switching device in the DC-DC converter that reconfigures it to a BDC, and two non-modulating switches for changeover operations between the PV and SC with a small increase in the converter's capacity. Although a normal energy storage system (ESS), such as battery energy storage (BES), is not within the scope of this study, in terms of cost, both BES and SES would have similar prices; however, the performance of SES is faster than that of BES.

Conclusions
This paper proposes a cost-effective and integrated PV-supercapacitor (PVSC) system for the dynamic performance enhancement of grid-connected PV systems. Traditional PV systems, which operate in grid-feeding mode, have no means to control the voltage and frequency at the load terminal because they work in the current source mode. It was assumed that a disturbance detection algorithm detects the potential disruptions in the point of common coupling and triggers the SC operation. A control algorithm directs the changeover operations between the PV and SC, and VSC power reference allocation. A nonlinear mathematical model was developed to analyze the stability boundaries and to design the controller parameters where its dynamic accuracy was compared to that of the detailed switching model. The system performance was evaluated for different grid disturbance cases. Based on the obtained simulation results, the following conclusions can be made: (a) The traditional PV system can be equipped with a high-power density energy storage device, i.e., supercapacitor, and run as a voltage source (i.e., grid-forming mode) to carry out high-power demand storage services in addition to ancillary services.
(b) During the day, when the irradiance level is more than the threshold level, the system works as the PVSC device, whereas during night or periods of cloudy weather, it works as the SC device.
(c) The proposed PVSC system is effective in improving the dynamic performance of the connected power grid system. In addition, the performance of the proposed system is comparable to that of the conventional SC system.
In our future study, the operation of the PV system as a battery energy storage system will be evaluated. In addition, intelligent controllers for the grid-forming VSC of the PV system will be developed.