A State-Space Dynamic Model for Photovoltaic Systems With Full Ancillary Services Support

Large-scale photovoltaic (PV) integration to the network necessitates accurate modeling of PV system dynamics under solar irradiance changes and disturbances in the power system. Most of the available PV dynamic models in the literature are scope-specific, neglecting some control functions and employing simplifications. In this paper, a complete dynamic model for two-stage PV systems is presented, given in entirely state-space form and explicit equations that takes into account all power circuit dynamics and modern control functions. This is a holistic approach that considers a full range of ancillary services required by modern grid codes, supports both balanced and unbalanced grid operation, and accounts for the discontinuous conduction mode of the dc/dc converter of the system. The proposed dynamic model is evaluated and compared to other approaches based on the literature, against scenarios of irradiance variation, voltage sags, and frequency distortion. Simulation results in MATLAB/Simulink indicate high accuracy at low computational cost and complexity.


I. INTRODUCTION
N OWADAYS, the increased photovoltaic (PV) integration into the power system dictates full consideration of the PV system dynamics during irradiance fluctuation and grid distortions. This paper explores the current needs and limitations in dynamic modeling of PV plants, focusing on two-stage systems (dc/dc converter and inverter connected in series) and considering the latest grid codes requirements for ancillary services provision [1]- [3].
The detailed switching model of the PV system proves far too complex and time-intensive for power system studies [4]- [6]; in these cases, equivalent dynamic models are used instead, aiming to represent the aforementioned dynamics at a T. R. Betts is with the Centre for Renewable Energy Systems Technology (CREST), Loughborough University, Leicestershire LE11 3TU, UK (e-mail: t.r.betts@lboro.ac.uk). much lower complexity [5], [6]. These models treat the entire PV plant as a single generator, as there is no need for higher granularity and separate modeling of each component [7]- [10]. Furthermore, average-value equivalents are always employed for the power converters that prove sufficient for the time scale of these dynamics, neglecting the switching phenomena only [4]- [6]. Apart from these two common assumptions, the available PV dynamic models in the literature employ several other debatable simplifications in both the power circuit and control structure.
With regards to the power circuit modeling, some studies neglect the dc-side dynamics [6], [7], [9], [11], including the Western Electricity Coordinating Council's (WECC) model [9]; however, this simplification does not allow for representation of dc-link and irradiance-driven dynamic phenomena [12], [13]. As for the PV array, most of the relevant studies consider a simplified model [4], [8], [12]- [19], the full single-diode PV model being used only in [5], [20]- [22], involving numerical solution algorithms that pose calculation issues [5]. Recently, an explicit alternative was proposed based on the Lambert W function [23], albeit limited to irradiance-driven dynamics only. Furthermore, all the dynamic models of two-stage PV systems assume continuous conduction mode (CCM) for the dc/dc converter [8], [12], [13], [17], [21], [23], [24]. However, discontinuous conduction mode (DCM) is often observed at reduced power levels (e.g. low irradiance, severe grid faults etc.), a condition that decisively alters the dynamic response of the system; this paper shows that both CCM and DCM should be considered in models with ancillary services support. As for the grid-side filter, recent studies conclude that any type (L, L-C or L-C-L) can be sufficiently represented by an equivalent inductance L for the purpose of dynamic simulations [6], [17], [22].
The control of the PV system is of utmost importance for the dynamics under several conditions [7], [19], [25]. The typical control scheme of two-stage PV systems involves: (a) a maximum power point tracking (MPPT) algorithm for the dc/dc converter, (b) a PI controller for the dc-link, (c) decoupled active/reactive currents control for the inverter, and (d) a phase locked loop (PLL) mechanism to monitor the grid voltage. The MPPT dynamics are neglected in some papers, assuming maximum power output at all times [15], [20] that results in incorrect response to abrupt irradiance changes [19], [23]. Furthermore, most relevant models are designed for a fully balanced network [4], [7], [9]- [16], [20]- [22] and cannot reflect the system dynamics during asymmetrical faults; only a few models can cope with these conditions, employing more sophisticated PLL structures [6], [17], [25]. The most important aspect, however, is whether the dynamic model incorporates the control functions to provide ancillary services to the grid during disturbances. Among the relevant studies, [7], [11], [17], [24] consider only the fault-ride-through/fastreactive-current-injection (FRT/FRCI) mechanism, while [21] accounts for the frequency response function only; both services are incorporated into the WECC model [9], which however employs other serious simplifications such as neglecting the dc-side dynamics and asymmetrical grid operation.
Another important aspect of a dynamic model is the formulation. The majority of the aforementioned studies provide models using a combination of block diagrams, flowcharts and a few differential equations; unclear points are often encountered, while, in many cases, software-specific (e.g. MATLAB/Simulink or DIgSILENT/PowerFactory) 'black box' models are used, hindering the awareness of the implementation details. Only a few models are given in entirely state-space form, which is a rigorous formulation and generally preferable in a wide range of applications, but they exhibit the limitations discussed above.
This review indicates that all PV dynamic models in literature are developed for specific applications and there is still a need for a generally applicable solution in line with the modern needs. The objective of this paper is to derive a dynamic model for two-stage PV systems that overcomes these limitations and reflects the state-of-the-art. The proposed model is formulated in entirely state-space form and it properly describes both the power circuit and control functions. The dcside dynamics are fully considered, adopting the non-simplified single-diode PV model for the PV array, and both CCM and DCM operation for the boost converter. The control scheme includes the MPPT function and suitable PLL mechanism to support asymmetrical voltage sags, while it incorporates full ancillary services support according to the latest ENTSO-E grid code [1]. To the best of the authors' knowledge, this is the first complete state-space model in the literature to support a full range of ancillary services along with DCM operation for the boost converter. The accuracy and computational efficiency of the proposed method is evaluated and compared to other approaches against several case studies of irradiance variation, voltage sags and frequency distortion.
An overview of the proposed dynamic model is given in Section II, followed by detailed description of the power circuit and control equations in Sections III and IV respectively. Simulation results are discussed in Sections V and VI, while the derivation steps of the boost converter differential equations in DCM are given in the Appendix.

II. OVERVIEW OF THE PROPOSED PV DYNAMIC MODEL
The power circuit and control scheme of a typical two-stage PV system that provides a full range of ancillary services is shown in Fig. 1. The power circuit consists of the PV generator, the boost converter, the dc link, the inverter and the grid-side filter. All ohmic losses are modeled through the parasitic resistance of the inductances. The control structure comprises the MPPT and Curtail control modules for the boost converter, the Dc link control, Reactive power control and Currents control subsystems for the inverter, and a PLL for synchronization to the grid.
The non-linear state-space model involves 20 state variables and a set of differential and algebraic equations (DAEs): where x is the state vector, u the input vector and y the output vector, given by: In Fig. 1, the state variables and inputs are indicated in red and green color respectively. The complete formulation of the model is given in the following sections.

A. PV Generator Model
The PV generator (or PV array) is modeled through the widely-used single-diode PV model ( Fig. 1), described by the five parameters [I ph , I s , a, R s , R sh ]. The current-voltage (I pv −V pv ) equation of this circuit is algebraic, as the dynamics of the PV array are instantaneous [23]: This is an implicit equation and has to be solved numerically, which entails increased computational effort and difficulties [5]. However, recent advances in PV modeling theory adopt the Lambert W function to reformulate this equation in a straightforward manner [23], [26], [27]: where W {.} is the Lambert W function, calculated either via the built-in lambertw MATLAB function or the series expansions proposed in [28]. This equation is used in this paper to express the algebraic variable I pv as an explicit function of the state variable V pv . To calculate the five parameters required in (6), first the reference parameters [I ph0 , I s0 , a 0 , R s0 , R sh0 ] are extracted at standard test conditions (STC) and then are translated to the study-case irradiance G(pu) and temperature T (K) [29]: where T 0 = 273.15K is the STC temperature and a Isc the short-circuit current temperature coefficient. More details on the extraction of these parameters may be found in [29].

Dc link control Currents control
Reactive power control

B. Boost Converter Model
As discussed in the Introduction, the switching circuits are always represented by equivalent average-value models in power system studies. For the boost converter of two-stage PV systems, the following two DAEs are used in literature, assuming always CCM operation [8], [12], [13], [23]: where I L is the inductor current, V dc the dc link voltage, D the duty cycle and C pv , R dc , L dc the circuit parameters ( Fig. 1). However, the converter operates occasionally in DCM when the input PV current is reduced due to either low irradiance or severe power curtailment (e.g. faults, overfrequency events etc.). To account for this condition as well, the above model is enhanced in this paper to be applicable to both CCM and DCM operations: the capacitor equation (12) remains unaltered, but the inductor equation is generalized to (see Appendix): where τ is the total conducting time of the inductor within a switching period T s (like D is the conducting time of the switch), given by the algebraic equation (see Appendix): It is apparent that in CCM (τ = 1), (14) effectively becomes (13); therefore, the inductor differential equation (13) can be replaced by (14) and (15) to account for both CCM and DCM. However, during this investigation it was found that the inductor dynamics during DCM are too fast, which necessitates very small simulation time step that is not practical for the scope of the proposed model. To tackle this, the inductor's steady-state equation (İ L = 0) is used, which yields for CCM: and for DCM when combining (14) and (15): Therefore, the inductor current I L will be the maximum of the two values: With this approach, I L effectively becomes an algebraic variable, rather than a state variable, calculated through V pv , V dc and D. This simplification adopted for the rest of the paper allows for larger time step without any measurable loss in accuracy. Still, (14) and (15) remain the theoretical DAEs of the inductor operation in CCM and DCM.

C. Dc Link Model
The differential equation of the dc link capacitor used in the literature is [8], [12], [13]: which is derived based on the CCM inductor equation (13). C dc is the dc link capacitance, and the terms V id , V iq , I d , I q stand for the inverter voltage and current in d-q coordinates, as explained next. Here, (14) is used in place of (13), to derive the general equation that accounts for both CCM and DCM: Evidently, (20) is reduced to (19) in CCM (τ = 1).

D. Inverter and Filter Model
The state-space model of an L filter interconnecting the inverter to the utility grid is well known in the literature [6], [8], [12]- [14], [20], [25]: where V id , V iq is the inverter voltage, V gd , V gq the grid voltage and I d , I q the inverter current, all expressed in the d-q reference frame rotating at the synchronous speed ω. R f and L f are the filter parameters.
IV. CONTROL MODEL To provide the ancillary services required by the ENTSO-E grid code, such as FRT/FRCI, frequency response, dispatchable operation etc. [1], the typical control scheme of the system is enhanced as explained in the following.

A. Boost Converter Control
Conventionally, the boost converter control involves an MPPT algorithm to extract the maximum power at all times. However, to meet the ancillary services requirements, the PV plant should be capable of reducing its output power at times. There is no standard way to perform this in the literature, but in most studies the PV voltage is regulated to suboptimal levels when there is a need for power curtailment [11], [17], [19], [21], [30], [31]. The control scheme shown in Fig. 1 is a simple way to perform this task, based on the main principles of the relevant research: it comprises the MPPT control and Curtail control modules, which are enabled or disabled according to the mode of operation: "MPPT" or "CURTAIL".
1) MPPT control: During "MPPT" mode, a Perturb & Observe (P&O) MPPT algorithm is executed to determine the optimal PV voltage V ref . The discrete-time state-space equations given in [23] are adopted here, involving three state variables (reference voltage V ref , PV voltage V mppt and power P mppt at the previous MPPT period T mppt ): where k is the discrete time instant and the sign function returns +1 or -1 depending on the sign of the argument; the auxiliary variable step equals 1 once per T mppt when in "MPPT" mode, otherwise step = 0 (T step is the discrete time step, mod denotes the remainder of Euclidean division). Then, a PI controller adjusts the duty cycle D to regulate the PV voltage V pv to the reference V ref , after being modified by an adjustment ∆V ref that comes from the Curtail control (Fig. 1). The following DAEs involve the state variable Φ mppt and incorporate back-calculation anti-windup mechanism [32] to contain D within 0 and 1: (28) where K mppt p , K mppt i are the controller gains and sat{x, l, u} denotes saturation of x within the range [l, u].
2) Curtail control: When the system enters "CURTAIL" mode, the MPPT operation is paused (V ref remains constantsee (23)-(26)) and the Curtail control is enabled; the latter comprises a PI regulator that outputs a voltage adjustment ∆V ref in oder to regulate the PV power P pv to the target set-point P pv crt . For this controller too, back-calculation antiwindup function is employed, as the output ∆V ref is kept zero when mode ="MPPT": where Φ crt is the state variable and K crt p , K crt i the controller gains. It is worth noting that this approach regulates the operating point at the right-hand side of the P-V curve, as followed in [11], [17]; alternatively, the sign of ∆V ref could be reversed for left-hand side operation, as favored in [21]. The power set-point P pv crt is given by: where P max is the maximum available power at the PV side, and ∆P f req , P res , S lim denote the frequency-response power adjustment, the required reserves and the apparent power limit of the inverter respectively, all referring to the grid side; to translate these quantities to a common base (PV side), the efficiency of the converter ef f is used (see also Fig. 1). According to ENTSO-E [1], P max could be either: (a) the power output at the moment of entering "CURTAIL" mode (i.e. P mppt ), or (b) the nominal capacity of the plant P nom . However, recent studies claim that P max should be the actual maximum power during the curtailment that changes over time [21], [30], [31]. This paper adopts the latter approach and employs the maximum power point (MPP) equations used in [29], [30] for calculation of P max . As for the power adjustment ∆P f req , it depends on the deviation of the grid frequency f from the nominal value 50 Hz, taking into account the droop coefficient drp and a frequency deadband db [1]: Pnom drp Pnom drp Finally, P res is an optional input command issued by the grid operator and S lim is calculated in the PLL according to the grid voltage level (see Section IV-C). The operating mode of the boost converter is an algebraic variable that varies between "MPPT" and "CURTAIL" based on:

B. Inverter Control
The typical inverter control structure features the following subsystems, as shown in Fig. 1: Dc link control, Reactive power control and Currents control. Here, these modules are enhanced to cope with unbalanced grid operation and the fastreactive-current-injection (FRCI) requirement.
1) Dc link control: The main purpose of the dc link controller is to regulate the dc link voltage V dc to a constant reference V dcref and determine the amount of power P ref to be transfered to the grid. First, the measured voltage is notchfiltered to calculate V dcf that does not contain the 100-Hz oscillation observed during asymmetrical faults [17]: where Φ n1 , Φ n2 are the state variables and Q n is the quality factor. This notch filter is not mandatory, but ensures control stability during unbalanced grid conditions. Then, a PI controller is employed to export P ref , having an upper limit S lim to contain the active power during faults. It is worth noting that the input voltage error V 2 dcf −V 2 dcref is in square form [4], [12], [14], [20], [21], so as to establish a linear relation between the extracted energy and voltage at the dc link capacitor [12]. The DAEs of this controller involve one state variable Φ dc (backcalculation anti-windup): where K dc p and K dc i are the gains of the controller. 2) Reactive power control: Under normal conditions, the system should be capable of injecting an amount of reactive power Q req requested by the operator. However, during grid voltage sags, the FRCI policy dictates automatic injection of additional reactive current [1], here modeled assuming a reactive current droop of 2 and zero deadband. Therefore, the scheduled reactive power Q sch in the general case is: where I nom , V nom are the nominal current and voltage of the inverter and V + gd is the d-component of the positive sequence of the grid voltage (see Section IV-C). The final reference reactive power Q ref is found after imposing an upper bound: to ensure that the total apparent power is below S lim (active power priority). The reactive power priority alternative is also possible if S lim is used as the limit of reactive power in place of S 2 lim − P 2 ref in (40), and the upper bound S lim of the dc link PI controller is replaced by S 2 lim − Q 2 ref in (38).

3) Currents control:
The typical inverter currents control in the literature employs PI controllers to independently regulate the d-q currents I d , I q to the references I dref , I qref (K d p , K d i are the controllers' gains): where the grid voltage V gd , V gq is added to the controllers output to implement the voltage feed-forward technique [5], [6], [8], [11], [13], [14], [20], [21], [24], [25] (see Fig. 1). Notably, V gd and V gq correspond to the actual grid voltage, rather than the positive sequence components; this ensures that the negative sequence is incorporated into the inverter output voltage during asymmetrical faults and that the output currents remain symmetrical regardless of the unbalanced conditions. The current references I dref , I qref are calculated through the respective power references P ref and Q ref :

C. Phase Locked Loop
The purpose of the PLL is to extract the amplitude and frequency of the grid voltage for application to the rest of the control. The majority of PV dynamic models in the literature incorporate the PLL mechanism in detail, as it greatly affects the PV system dynamics during distorted conditions [17]. However, most of the relevant studies adopt a simple synchronous reference frame PLL (SRF-PLL) [5], [11]- [16], [21], which proves inadequate during unbalanced grid conditions [33], [34]. For these cases, some models in the literature adopt more advanced PLL structures, mainly the double second order generalized integrator PLL (DSOGI-PLL) or the decoupled SRF PLL (DSRF-PLL) [6], [17], [25]. Recent studies indicate that both PLLs are adequate for this purpose, but the former is formulated in the α-β plane and faces some discretization difficulties [33]. Therefore, the DSRF-PLL is employed here as the best candidate among the implementations in the d-q plane [34].
The block diagram of the DSRF-PLL is shown in Fig. 2. As explained in [33], [34], two decoupling cells (DEC) and two α-β/d-q transforms at positive and negative direction are used to obtain the unfiltered positive/negative sequence of the grid voltage V * + gd , V * + gq , V * − gd , V * − gq : are the filtered positive/negative sequence values of the grid voltage. The latter are calculated using first-order low-pass filters (LPF) (τ pll is the time constant): The synchronous speed ω, frequency f and angle θ are extracted using the typical SRF-PLL structure of an integrator and a PI controller acting on V * + gq : where Φ pll is the state variable and K pll p , K pll i the gains of the controller. The resulting state-space model involves 6 state variables, indicated in red in Fig. 2 gd and V + gq , the real power P g , the reactive power Q g and the apparent power limit S lim may be found by: V. RESULTS AND DISCUSSION The presented state-space (SS) model is validated via simulations in MATLAB/Simulink for a 5 kW PV system under irradiance fluctuation, grid faults and frequency distortion. The model parameters are given in Table I. As a benchmark, the detailed switching model (SW) is used. Furthermore, a few other model variations are implemented and assessed, each employing one of the simplifications appearing in the literature, as shown in Table II. Discussion on these assumptions is given in the Introduction. Fig. 3(a) shows a two-hour global normal irradiance (GNI) profile recorded at 1 Hz. Cloud enhancement is captured here. There are some very steep irradiance transients of hundreds of Wm -2 s -1 that are not captured in standard averaged datasets. It should be noted that this 1 Hz profile is itself inherently averaged due to the response time of the pyranometer used -approximately 5 s to 95% (secondary standard according to ISO 9060:1990 classification). The effects of averaged irradiance datasets are discussed in detail in [35].

A. Irradiance Fluctuation
The dynamic response of the system to such an abrupt irradiance change is shown in Fig. 3(b). It is apparent that the SW (blue line) and SS (yellow line) models match quite well, both deviating from the maximum power P max (red line) for some time; this divergence is due to the well-known erroneous MPPT tracking during fast irradiance changes [4], [5], [23]. Although the 3PAR model (purple dashed line) follows the right trend, it presents an absolute error of up to 8% at low irradiance due to simplifications involved. The noMPPT model (green dashed line) performs even worse, assuming that the output power coincides with P max at all times.
To investigate how the MPPT parameters affect these dynamics, additional simulation results for different values of T mppt and V step are shown in Fig. 3(c). In this case, the MPPT tracking is faster and the matching SW and SS results deviate less from P max , while the 3PAR model exhibits larger errors due to comparably less efficient MPPT operation. The values of T mppt and V step depend on design specifications, such as the operating point oscillation in steady state and damping during transitions, which affect the "fastness" of the MPPT and the output power deviation from P max . To accurately represent these dynamics at all times, it is suggested to always incorporate the MPPT mechanism into the model.

B. Symmetrical Voltage Sag
The grid-side fault is probably the most challenging dynamic condition to model, as all control functions are activated and the operating point changes abruptly. In the scenario of Fig. 4(a), the grid suffers from three subsequent symmetrical voltage sags with a remaining voltage of 80%, 50% and 5% respectively, all lasting for 250 ms. Note that the latter corresponds to the most severe fault that the plant is required to withstand according to the ENTSO-E code [1].
The real current I d and reactive current I q injected are shown in Fig. 4(b). The matching SW (blue lines) and SS (yellow lines) results indicate increase in both I d and I q during the first fault: the former is a direct result of the lowered voltage for the same amount of power, while the latter is due to the FRCI function. At the following more severe faults, however, I d gets maximum (I max ) and I q gets zero, as it is not possible to provide all real and reactive power simultaneously (active current priority). The noANCIL model (purple dashed line) does not provide additional reactive power during the minor fault, while it cannot withstand the second fault and the system trips. The onlyCCM model is in close agreement with the SW and SS approaches, except for a small deviation after the third fault. A clearer picture on the stability of the system is given in Fig. 4(c). The 700 V target is met by all models under normal conditions, but during the last two faults there are V dc overshoots. Again, the response produced by the SW and SS models is almost identical, whereas in the noANCIL case the voltage reaches the 800 V limit and the system trips. For the onlyCCM model, although the results match the SW benchmark in the first two faults, V dc is significantly underestimated during the third most severe fault; this is because the boost converter enters DCM at that point, which is not supported by the model. As a result, the stability margin is incorrectly assessed, which could lead to inappropriate design of the Curtail controller and disconnection during severe faults.

C. Asymmetrical Voltage Sags
This case study considers a series of asymmetrical voltage sags (single-line and line-line faults), as shown in Fig. 5(a). In Fig. 5(b), the extracted PLL frequency exhibits an 100-Hz oscillation in the noASYM case (green line), which is not apparent in the rest of the models. Inevitably, this oscillation is transfered to the rest of the control, resulting in fluctuating currents and eventually disconnection as shown in Fig. 5(c), although this model is supposed to provide FRT. This is better illustrated in Fig. 5(d), where the V dc overshoots clearly reflect the incapability of the noASYM model to transfer the appropriate amount of power to the grid. On the contrary, the matching SW and SS results present a limited 100-Hz oscillation, which is contained in the dc link and is not transfered to the rest of the control thanks to the notch filters.

D. Frequency Distortion
This scenario assumes that the operator issues a reserve command which is followed by an underfrequency distortion. In Fig. 6(a), the frequency drop is perfectly captured by all models, as this is not a challenge for any of the PLLs. The power set-point P crt is shown in Fig. 6(b) (red dashed line): it is reduced in a ramp-like manner after the 1 s to implement the reserve command and then it is modified upwards in response to the frequency drop, when the latter is below the 50 − db threshold. The SW and SS models successfully follow this reference, exhibiting a small tracking error up to 1% due to the constant efficiency assumption. On the other hand, the noANCIL (purple dashed line) approach expectedly ignores both the reserve command and frequency distortion, providing the maximum power the whole time.

VI. COMPUTATIONAL PERFORMANCE
The execution time recorded for the models and case studies of the previous section is given in Table III. The simulations are performed in MATLAB/Simulink R2017b (SimPowerSystems toolbox, accelerator mode) in a PC with a 3.5-GHz CPU and 64-GB RAM, while the monitoring overhead (scopes, save/load to/from workspace etc.) is included in the timings.
The SW model requires a necessarily very small time step of 10 ns to produce high-resolution PWM pulses, given the 20 kHz switching frequency and the wide operating range of the boost converter (for more details see [23]); as a result, the execution times are very long. On the contrary, a 0.1 ms time step is used for the SS model, which is less than the time constants of the differential equations involved and sufficient for all dynamics. It is worth noting that other models which neglect the dc-side dynamics and unbalanced grid conditions, such as the WECC one [9], adopt larger time steps of a few ms; to account for these dynamics, however, increased resolution in the sub-millisecond range is required.
The row indicated by 'SS' in Table III corresponds to all variants studied in the previous section, as the calculation cost is practically the same. However, if the implicit (5) is solved numerically for the PV array, rather than using the explicit (6), the execution time increases notably (SS-num). For this variant, the fsolve MATLAB function with proper configuration is used (predetermination of the Jacobian matrix, efficient initialization strategy etc.). The conclusion is that the proposed SS model is 1000-3000 times faster than the detailed SW approach due to the larger time step, and 30-50 times faster than the numerical SS implementation due to more efficient evaluation of the PV equation.

VII. CONCLUSION
In this paper, a new holistic approach to dynamic modeling of two-stage PV systems is presented, which takes into account full ancillary services provision, DCM modeling for the boost converter and unbalanced grid. Simulations under various dynamic conditions validate the effectiveness of the proposed model and extract useful conclusions on the importance of common modeling simplifications employed in the literature: (a) at irradiance variation, the MPPT dynamics should not be neglected and the single-diode PV model should not be simplified; (b) DCM modeling is crucial for correct stability assessment during grid faults and enhanced PLL is needed to cope with asymmetrical voltage sags; (c) frequency response and dispatchable operation functions should be incorporated to properly represent the dynamic response during frequency distortion. The proposed PV dynamic model proves very accurate and much faster than the detailed switching approach; the pure state-space formulation offers a wide range of applications to power system studies and control linearization and design. APPENDIX Fig. 7 illustrates the operation of the boost converter in CCM and DCM [36]. In CCM, the circuit enters phases (a) and (b): the inductor current I L increases during the first phase that lasts for DT s , and then decreases for the rest of the time (1 − D)T s (blue line in Fig. 8(a)). However, in DCM the circuit enters also a third phase (c) where I L = 0 (Fig. 7(c) -red line in Fig. 8(a)); in this case, the total conduction time of the inductor, defined here as τ T s , is less than T s .
The main concept behind the average-value model of the boost converter is to represent the inductor current and capacitors voltage by their average values within a switching period: I L , V pv , V dc . Applying this to DCM operation, the mean voltage across the inductor V L is calculated as the weighted average of its voltage in phases (a) and (b), lasting DT s and (τ − D)T s respectively (see Fig. 7 and 8): Substituting V L = L dcİ L to (53) derives the general inductor differential equation (14) given in Section III-B.
To apply (14) and (53), the inductor conducting time τ is needed; in CCM τ = 1, but in DCM τ is an unknown variable less than 1. In order to calculate this value, the waveform of the inductor current in the general case is considered in Fig. 8(b), indicating the initial, maximum and mean value, as well as the slopes during the phases (a) and (b). If all this information is combined, the average inductor current can be found as: Isolating this equation for τ and applying an upper bound of 1, yields (15) given in Section III-B.