Small-Signal Modelling and Stability Assessment of Phase-Locked Loops in Weak Grids

: This paper proposes a low-complexity small signal model for a 3-leg converter connected to a balanced three-phase, three-wire weak grid and synchronised to this grid using a PLL implemented in a synchronous rotating d-q axis. A thorough analysis of the system stability as a function of the PLL bandwidth and the short circuit ratio (SCR) of the grid is performed based on a linearised model. By using the proposed model, an improved design process is proposed for the commonly used dq -PLL that accounts for the potential stability issues which may occur in weak grids. Using the proposed approach, it is possible to optimise the PLL design to find the fastest PLL that can operate stably considering the SCR of the grid. In addition, the proposed model is very simple, resulting in a straightforward design tool that could also be used for online stability monitoring. The method is validated through simulations and experimental results from a 5kW laboratory system.


Introduction
There has been an increase in the integration of renewable energy sources into the electricity grid in recent years, motivated by: (i) increasing concerns about the environment; (ii) policies developed in most countries to promote green energy and increased awareness of climate change; (iii) the availability of distributed generation resources (i.e., photovoltaic, wind); (iv) the long-term need to look for alternative power sources to replace fossil fuels and diversify generation, enhancing availability and resilience in electricity systems. The integration of renewable energy into the grid requires the use of power electronic interfaces, and consequently, there is an increasing penetration of converters in modern power systems [1,2]. These inverters are connected to the grid at the point of common coupling (PCC), and they are usually controlled as current or power sources. To achieve this, both the frequency and angle of the current injected by the inverter into the grid must be synchronised with the grid voltage measured at the PCC. This synchronisation stage is usually based on a phase-locked loop (PLL) [3].
The conventional and simplest PLL design process assumes a simple PLL small signal model and an ideal grid with negligible impedance, i.e., ≈ 0. Based on these assumptions, the parameters of the PLL controllers are obtained by Linear Time Invariant (LTI) design methods such as those which use only the desired natural frequency and the damping ratio. However, in weak grids with by the PLL to improve the stability of the system. To verify this approach, a small signal model of the system in the dq reference frame was developed. However, the scheme was not experimentalyl validated. A similar scheme was realised in [25], where a model of the inverter in the dq reference frame was developed to analyse the performance of the proposed current sharing controller. In [26], the authors modelled an islanded microgrid composed of two inverters with droop control, considering the PLL design. The accuracy of the proposed model was compared using both simulation and experimental results, finding a good match. Although [24][25][26] have developed small signal models of the system considering the PLL design, the main goal of these works was not to study the effects of the PLL on the stability of the system. As a result, their use is not straightforward, and they usually have a high complexity. In this context, [27] proposed a small signal model in the dq reference frame to study the impact of the short-circuit ratio (SCR) and PLL parameters on a VSC-HVDC (A voltage source converter (VSC) used by high-voltage direct current (HVDC) applications) converter. The authors concluded that the PLL parameters, particularly at low SCRs, greatly affect the stability of the converter. However, the work was not validated experimentally. The PLL controller gains were changed to evaluate performance, but a rigorous procedure to obtain appropriate values for these gains was not discussed.
These papers proposed models for studying the stability of the system considering the PLL design. However, their complexity is relatively high, and they perform stability studies using given PLL designs. As yet no-one, to the authors' knowledge, has reported a systematic procedure to design a PLL for use in a weak grid. In addition, no one has reported a comprehensive study of the effects of the PLL bandwidth on the system stability. Therefore, the contributions of this paper can be summarised as:


A low-complexity small signal model is proposed for a grid connected converter controlled in the dq reference frame and synchronised with a dq-PLL. This model simplifies the design tasks so that issues such as the PLL bandwidth and the effects produced by a variation of the SCR on the stability of the system can be considered. (the SCR is used to describe the "weakness" of the grid).  Based on the proposed model, a systematic PLL design process is proposed which can be used for balanced, three-phase, three-wire weak grids to ensure system stability.  With the proposed PLL design scheme it is possible to find the maximum bandwidth of the PLL which can be used in the control system for a typical grid-connected power converter, without affecting the system stability.  A comprehensive study of the effects of PLL bandwidth on the system stability is performed. These effects are also studied for different levels of grid weakness. The study presented in this paper has been verified through simulation and validated through extensive experimental work.
The rest of this paper is organised as follows: in Section 2 the typical dq-PLL design process is discussed alongside the objectives of the improved design process. Section 3 introduces the proposed low-complexity small signal model. Section 4 verifies the stability of the proposed design process using simulation. Finally, Section 5 reports the experimental validation.

Proposed PLL Design for Weak Grids
The widely adopted method for the design of a dq-PLL is the simple linearised model shown in Error! Reference source not found.. The closed-loop transfer function can be calculated as in (1), where the parameters and are the proportional and integral gains of the proportional integral (PI) controller, is the magnitude of the PCC voltage, is the phase angle of the electrical system, and is the estimation of obtained at the PLL output. Equation (1) is a second order transfer function characterized by a natural frequency and a damping ratio . Comparing (1) with a generic second order system, (2) and (3) are obtained. To tune and , the transient response of the phase-locked loop is set through the design parameters and .
Since this design method uses a simple PLL model, the gains and obtained will always result in the system shown in (1) being stable.
The choice of and will determine the dynamics of the PLL. From a general perspective, PLLs with low bandwidth are required when the grid voltage is unbalanced/distorted (for cancelling ripple). In contrast, when the three-phase system is clean and balanced, three-phase PLLs can have a high bandwidth, which results in a very fast transient response, providing fast and clean phase-angle estimation [28,29]. In this work, the latter case is studied.
The PLL design process described above assumes an ideal grid with negligible impedance. However, this is no longer the case when the PLL is used in a weak grid with non-negligible impedance. For this reason, an enhanced two-stage PLL design process is proposed, and its basic flow-chart is shown in Figure 2. The first stage is the ideal PLL design discussed above, whose outputs are the proportional and the integral gains calculated using (2) and (3). In addition, at the output of the design block, the PLL bandwidth (BW) associated with and is calculated to characterize the PLL performance in terms of its transient response.
The second stage is the stability analysis block that determines whether the PLL designed in the previous block will be stable or unstable when used in a weak grid with known parameters. The stability analysis block is based on the simple state space model of the system in the dq reference frame proposed in this paper and discussed in Section 3. Both the system studied in this work, and the proposed small signal model will be discussed in the following sections. It is worth noting that the PLL design process shown in Figure 2 is flexible and can be used with any other PLL design procedure [30].   (2) and (3) BW= PLL bandwidth iPLL k Figure 3 shows the three-phase three-wire balanced system considered in this paper. This topology is commonly used in power systems which use distributed generation (DG) units, e.g., photovoltaic [31,32]. In some cases, renewable sources are installed in remote locations, far from the main power grid, requiring long lines to transmit the power. In other cases, renewables are connected to distribution feeders designed for a relatively low power rating, with transformers characterised by non-negligible impedance. In the worst case, renewables contribute to the power generation in autonomous remote grids, typically powered by diesel gensets. In all these cases, the AC grid seen by the converter is weak. It is therefore important to study the effects of the PLL on the system stability to prevent the inverter from tripping. It is assumed that the inverter shown in Figure 3 is connected to a balanced three-phase, three-wire weak grid. In this type of system, it is desirable to have a PLL with a high bandwidth to ensure a fast-transient response. However, the weakness of the grid imposes a trade-off between the maximum PLL bandwidth and the stability of the system. A weak grid can be defined by the Short Circuit Ratio (SCR) [27,33] shown in (4), where is the line to line RMS (root mean square value) voltage at the PCC, is the grid impedance, and is the nominal power of the inverter. Based on the SCR, a weak grid is conventionally identified by a short circuit ratio in the range 2 ≤ SCR ≤ 3 [27,33,34], and a very weak grid is when SCR < 2. Some examples of SCR values in wind power plants connected to weak grids in Australia are discussed in [35]: (i) Musselroe (SCR = 1.74), (ii) Collgar (SCR = 2.65), and Silverton (SCR = 1.24):

Linearised State-Space Model
In this section, the proposed low-complexity small signal model for the non-linear system described in Figure 3 is developed. To achieve this, two dq reference frames are defined. The first one is named the converter reference frame (CRF, − ) and uses the angle estimated by the PLL ( ) from the measured capacitor voltages in Figure 3. The second one is the actual reference frame (ARF, − ), aligned with the actual angle of the capacitor voltages . At steady state, the CRF is aligned with the ARF. When small signal perturbations are added to the capacitor voltages ( ), CRF and ARF are no longer aligned because of the PLL dynamic response. In this case, the phase relationship between the frames is given by (5). In this equation, corresponds to the dq complex variable in the CRF, is the dq complex variable in the ARF, and is the difference between the angle of the ARF and the one of the CRF (see Figure 3). As shown later in the analysis, this angle allows the easy inclusion of the PLL dynamic response in the system modelling.

PLL and Converter Models
Considering now the PLL and assuming that an instantaneous frequency deviation ∆ exists at the output of the PI controller of the PLL [7,25], (20) can be derived in the time-domain. From this equation, a small perturbation in Δ will produce a small perturbation ∆ at the PLL output. This perturbation will generate a small rotation ∆ between the CRF and the ARF as discussed at the beginning of this section (see Figure 3). Defining Δ̇= Δ , (20) can be written in the matrix form shown in (21): Finally, combining equations (14), (19) and (21), the overall state-space model of the gridconnected converter with current control and PLL, derived in the CRF, is given by (22). It should be pointed out that all the elements in column five of the state matrix are zeros because the state Δ represents the difference between the converter reference frame and the actual reference frame (see Figure 3 and (5)). Based on that, and taking into account that until now, all the modelling processes have been performed in the converter reference frame, the state Δ has no effect on the states shown in (22). Once the actual reference frame is considered in the modelling process, the state Δ has an effect on more than half of the states of the proposed model, as is shown in (44) where the whole model of the system is presented.

Converter Model in the ARF
To refer the converter model (22) to the ARF, (5) is used. This equation, as small signal quantities, is given by (23) In (23), the subscript " " corresponds to steady state quantities. Note that the angle Δ is zero in steady-state and therefore, (23) can be rewritten as (24): Δ , Δ are small signal quantities in the CRF. Δ , Δ are small signal quantities in the ARF. , are dependent on the operating point in the ARF. Finally, Δ is the small perturbation in the angle between the converter and the actual reference frames, that enables the inclusion of the PLL dynamics in the system model (see Error! Reference source not found.) Using (24), voltages (Δ , Δ ) and currents (Δ , Δ ) of the converter model shown in (22) can be referred to the ARF as shown in (25) and (26): In these relationships, , and , are the currents and voltages at the quiescent operating point in the ARF (currents are measured at the inverter output, see Figure 3).
Finally, using (25) and (26), and assuming that Δ * ≈ Δ * ≈ 0, the small signal model in (22) is referred to the ARF to derive the model shown in (27). The assumption Δ * ≈ Δ * ≈ 0 is utilised because the current references are not affected by small variations in the PLL states [7-9]:

System Equations
In this Section, the remaining equations associated with the system in Figure 3 will be derived. Note that all the equations are in the ARF illustrated in Figure 3 (voltage across the capacitor), (current at the inverter output) and g g g Referring Equation (28) to the actual dq reference frame (ARF), and rearranging it, yields (29) (see Appendix B) a a a a n q q q g q Based on (29), the small signal model of the voltage across the capacitor shown in Figure 3 in the ARF is given by (see Appendix A): a a a a n q q q g q The output of the inverter model shown in (27) is used in (30) to replace Δ and Δ , leading to (31).

Grid Equations
From Figure 3, by applying Kirchhoff's Voltage Law (KVL) to the grid side, yields (32) (in the αβ reference frame). In this equation Referring (32) to the actual dq reference frame, and rearranging it, yields (33) (see Appendix B) a a a a n g g g g q g q g q g q Linearising (33), yields (34) (see Appendix A): a a a a n g g g g q g q g q g q

Steady State Operating Points
From (27) it is seen that the proposed model requires a steady-state operating point to be evaluated (considering that the system has a non-linear nature). In particular, the operating point of (27) is composed of four variables: these are: , , , and (see Error! Reference source not found.). All of these are defined in the ARF-which is identical to the CRF if steady state operation is considered (assuming that the system is stable). The variable is equal to zero because the converter control is oriented to the d axis. Moreover, as discussed above, the variables of the operating point associated with the current ( , ), in the ARF, can be approximated with the ones in the CRF: = * and = * . The remaining variable, , is derived in this section. The grid impedance ( ) used in this work is mainly inductive and considering that the grid voltage has an angle δ with respect to the capacitor voltage (see Figure 3), the active power injected to the grid by the converter, can be expressed as shown (35) [38,39]. In this equation, | | and | |, are respectively, the peak values of and (see Figure 3): Since the control of the converter shown in Figure 3 is oriented to the d axis ( = 0), it can be shown that = | | [40], and therefore the active power given by (35), in the dq reference frame, can be written as (36): Finally, using (35) and (36), (37) is obtained. In this equation, is the grid current in the d axis, is the nominal frequency of the system, and is the grid inductance: Analysing the d axis of (33), in the steady state, yields (38). In this equation, and are operating points for the current on the grid side (see Error! Reference source not found.). These operating points must be written as a function of the inverter output currents ( , , see Error! Reference source not found.) as shown in (39) and (40) because the converter model of (27) utilises these currents: Using (40) in (38), yields (41). In this equation, is the d component of the grid voltage ( ) in the ARF, and it can be calculated using the diagram shown in Error! Reference source not found. as shown (42). In this equation, | | is the peak value of the grid voltage, and the angle δ is given by (37)

Whole System Model
Using equations (27), (31) and (34), the whole small signal model of the system shown in Figure  3 is obtained. This model is shown in (44) and the required operating point (  ,  ,  , ) is discussed in Section 3.4. The model can be represented as shown in (45) in the Laplace domain. The stability of the system can be studied by analysing the eigenvalues of the transition matrix " ". In this work, the stability analysis will be performed as a function of the PLL bandwidth and the weakness of the grid, quantified by the SCR. It is worth noting that if additional outer loops are added for controlling the converter of Error! Reference source not found., (for instance, active or reactive power loops), this will lead to an increase in the number of states of the model depicted in (44) and the system stability can be still studied through the eigenvalues of the extended model. Moreover, it should be pointed out that although the proposed model (44) was used in this work for studying the stability of the system as a function of the PLL bandwidth and the SCR of the grid. This model can also be used to perform other types of stability studies, for example, (i) to improve the design of the current controller of the system ( and see Error! Reference source not found.) when the grid is weak, (ii) to improve the design of the power converter, e.g., providing additional information to calculate the parameters of the second order LC output power filter (An output filter composed by an inductance and a capacitor), taking into account the weakness level of the grid, (iii) for online stability monitoring, among others.

Stability Analysis and Simulation Results
Using the small signal model (44), the proposed PLL design methodology for weak grids shown in Figure 2 can be implemented. In (44), the parameters associated with the inverter output filter and the inverter controllers are kept constant. To study the system stability under different PLL bandwidths, the gains and are modified based on the PLL design requirements and ζ (see the method described in Section 2.1). Also, the weakness of the grid, characterized by the SCR, is modified using different values for the grid impedance ( , see Figure 3). Results obtained using (44) are first compared with results from simulating the full system in PLECS (a power electronics simulation package) results to verify the model in an environment where all the parameters are known. The model is later validated experimentally as discussed in Section 5.
The parameters of the system studied are shown in Table 1. First, ten PLLs with different bandwidths in the range 10.2 Hz to 102.648 Hz are designed (using the method described in Section 2.1), obtaining the gains listed in Table 2. Notice from this table that the phase margin (P.M.) for each design is close to P.M. ≈ 65° to allow a fair comparison. Finally, using the stability analysis block shown in Figure 2, which is based on the study of the eigenvalues of model (44), the stability of these PLL designs is assessed.
In addition, the small signal model depends on the operating conditions of the inverter, hence stability will change accordingly. For each of the ten PLL designs, it is possible to calculate the maximum active power component of the current that the inverter can inject into the weak grid, before reaching instability, as a function of the PLL bandwidth and the SCR of the grid. The values of used in this work and the SCRs associated with them are shown in Table 3. Unless otherwise stated, it is assumed in this work that the set point for the reactive power component of the current supplied by the converter is zero, i.e., * = 0 (see Figure 3), i.e., the current supplied by the converter corresponds to the active power component.
n a a q do n a gd g g g n a gq g n g g Based on this study, it is possible to find the following information about the system stability: (i) the maximum active power component of the current that the inverter can supply to the grid as a function of the PLL bandwidth and the SCR of the grid before going into the unstable zone, (ii) the maximum PLL bandwidth (BW) which can be implemented in the system of Figure 3 as a function of the grid SCR. Finally, using the proposed PLL design of Figure 2, it is possible to optimise the PLL design to ensure a fast and stable system operation.
It should be pointed out that the current controller of the inverter shown in Figure 3 was designed for SCR = 2.5942, and controllers were kept constant for different SCRs. In this case, the closed-loop bandwidth of the current control loop is 200 Hz. The proportional and the integral gains are: = 23.5422 and = 10701 (see Figure 3). These PI controller gains are used to evaluate the model shown in (44). The same controller is used in the simulation work as well as in the experimental work.

Comparison between Model and Simulation Results
To verify the proposed dq-PLL design process shown in Figure 2, in this subsection, a comparison is made of the results achieved with the proposed model and the full system simulation, in terms of stability, as a function of the PLL bandwidth and the grid SCR. The full simulation is implemented in PLECS software, using the non-linear system of Figure 3 and the parameters listed in Table 1. However, considering that the proposed small signal model is based on an average model of the inverter, the full simulation model therefore neglects the PWM effects, using controllable voltage sources to represent the converter.
The proposed small signal model is verified studying the eigenvalues of the transition matrix (45). The results are generated as follows: all the PLL designs shown in Table 2 are evaluated for each of the SCRs shown in Table 3.
In each condition, the maximum active power current that the inverter can inject into the weak grid before the system becomes unstable is calculated with the proposed analytical model and with the PLECS simulation. Then, theoretical and simulation results are compared. The nominal active current of the inverter shown in Figure 3 is 18 A. It should be pointed out that to generate Figure 5 (model results), the linearised model (44) was evaluated for each of the operating points shown in that figure. It is worth remembering that the operating point of (44) is composed of four variables ( , , , and ) as discussed in Section 3.4. In particular, = 0 considering that the control of the converter is orientated along the d axis, i.e., = * = 0. Therefore, only the active power component of the current ( ) supplied by the converter into the weak grid is studied. The rest of the operating points for evaluating (44) are generated as follows, Assume that model (44) is evaluated around an active current level of 10 A, which means that = * = 10 . is then calculated according (43). Finally, the stability of the system in that operating point can be studied as a function of the PLL bandwidth (by modifying and ) and the SCR of the weak grid. (By modifying ). Figure 5 shows the maximum active current-as given by simulations and by the proposed analytical model-that the inverter of Figure 3 can inject into the grid as a function of the PLL bandwidths described in Table 2 and for the SCRs shown in Table 3. Notice that the match between the small signal model and the simulation results obtained from a detailed model implemented in PLECs ® (version 4.1.2, Plexim, Zurich, Swiss) and MATLAB ® (version R2017b, MathWorks, Massachusetts, USA) software, is almost perfect. The figure confirms that the proposed small signal model (44) can effectively represent the effects of the PLL dynamics when the converter operates connected to a weak grid. Moreover, it is possible to conclude that with a high PLL bandwidth and a small SCR, the converter is not able to inject the nominal active current into the grid. In fact, in some conditions, the inverter can supply less than 50% of the rated active current, leading to underutilisation of the installed power capacity. The proposed design process, shown in Figure 2, can effectively prevent incorrect PLL designs. For example, if ta renewable energy system is connected to a weak grid with a SCR equal to 1.6265, the proposed model shows that the fastest PLL that can be implemented without affecting the stability and power transfer capability has a bandwidth of about 30 Hz (see Figure 5).
To use the proposed dq-PLL design process, it is necessary to have the following information: (i) the parameters of the PI current controllers, (ii) the parameters of the converter output filter and (iii) the weakness of the grid (SCR index). The first two are known because they are characteristics of the converter, while the SCR can be estimated as discussed in [41,42].  In this section, the eigenvalues of the proposed model (44) are shown as a function of the PLL bandwidth and the grid SCR. The analysis is performed at rated conditions, with the converter injecting the rated active power current (18 A) into the weak grid. The results are shown in Error! Reference source not found., where it is shown that t modes 7 and 8 are heavily affected by the PLL bandwidth and by the SCR of the grid and are responsible for the instability (the rest of the modes do not affect the stability of the system). For this reason, the damping ratio of the proposed model modes as a function of the PLL bandwidth and the SCR of the grid has been calculated. This is performed for the rated conditions of the non-linear system in Figure 3. Figure 7 shows the damping ratio of the modes of the proposed model. The damping ratio of modes 7 and 8 are the same for both modes since they are a complex conjugate pair for the ten PLL bandwidths considered (Table 2) and the different grid SCRs (Table 3). Figure 7 shows that for all the SCRs, the damping of modes 7 and 8 is an approximately linear function of the PLL bandwidth, with the damping decreasing as the bandwidth increases. Moreover, the lower the SCR, the sooner the damping crosses the imaginary axis, bringing the system into instability. For the strongest grid, with SCR = 2.5942, the damping crosses the imaginary axis with a PLL bandwidth of 72.136 Hz. For the weakest grid, with SCR = 1.4463, the crossing occurs at 30.898 Hz. (See Figure 7). Finally, from Figure 7, it can be concluded that the other modes of the proposed model (those different from modes 7 and 8) do not affect the stability of the system.  To explore stability for operating points other than rated, Figure 8 shows the damping ratio of modes 7 and 8 as a function of the PLL bandwidth and the active current supplied by the converter into the grid. It should be noted that to generate Figure 8, the linearised model (44) was evaluated for each operating point depicted in that figure. The figure shows the results for all the SCRs studied in this work ( Table 3). The figure confirms that stability is adversely affected by the amount of the injected active current, with the damping of the modes decreasing as the current increases. Moreover, the decrease is steeper as the SCR decreases and as the PLL design bandwidth increases.

Eigenvalue Analysis
Finally, the participation factor analysis discussed in [37] is applied to modes 7 and 8 to understand their relationship with the state variables of the proposed model. Based on this analysis, omitted here for brevity, it is concluded that in the case of a high PLL bandwidth and low SCR, the states Δ and Δ which are associated with the PLL model in (44) dominate modes 7 and 8, further confirming that the PLL dynamic is the main cause of instability.

Experimental Results
The control system and converter topology of Figure 3 has been implemented in a Triphase PM15F42C unit (5 kW) [43][44][45] (configured as a 3-leg converter) as is shown in Figure 9. This unit has the same output filter parameters as those given in Table 1. Inductances are used to modify the grid impedance, emulating the SCRs described in Table 3. experimental system. The overcurrent protection of the system shown in Figure 9 is set at 20 A (instantaneous current).
To validate the proposed small signal model (44), PLL bandwidths in the range of approximately [10-50 Hz] ( Table 2) are considered. These values are used because it is the typical bandwidth of PLLs implemented in a real-life application [28,29,46]. Moreover, all the SCRs shown in Table 3 are emulated in the experimental rig. First, the maximum active current that the converter can inject into the grid as a function of the PLL bandwidth and the SCR is experimentally measured and compared with that predicted by the proposed model. In the experimental tests shown in this section, current steps of 1A around the quiescent operating points are used. According to the model results described in Section 4, the experimental converter can supply the nominal active current (18 A) into the grid without becoming unstable when SCRs of 2.5942 and 2.1652 are used. This occurs for the whole range of PLL bandwidths, [≈10-50 Hz]. Figure 10a shows the nominal active current injected by the inverter for the worst case, i.e., for a PLL bandwidth of ≈51.5 Hz. The same trend is shown in Figure 10b where the SCR of the grid is equal to 2.1652. In this case, the parameters of the PLL implemented in the converter of Figure 9 are the same parameters used to generate the experimental results shown in Figure 10a. In Table 4, the predictions from the proposed model are compared with the experimental results for a grid with an SCR = 1.8577. When a PLL with bandwidth 51.514 Hz is used, the proposed theoretical model predicts a maximum active current at the converter output of 15.7 A. The maximum active current that the experimental system can inject to the grid without becoming unstable is 14.5 A. Figure 11b shows that the system is stable when injecting 14.5 A. When the reference current is changed to 15.5 A (current step of 1 A), the system becomes unstable, showing a good match with the theoretical prediction. If the PLL bandwidth is reduced below 40.723 Hz, the instability issue is avoided, and the converter can fully supply the nominal current to the grid, as shown in Figure 11a. In Table 5, the experimental results are compared with those produced by the theoretical model for the case of SCR = 1.6265, confirming the good match between the model and the experimental work.   Figure 12 shows the experimental current waveforms corresponding to the three limit conditions shown in Table 5. For the rest of the cases, the converter can inject its nominal active current. The last case studied uses a SCR of 1.4463, representing a very weak grid. Both model results and experimental results are shown in Table 6, again confirming that experimental results agree with the theoretical expectations. For instance, if a PLL with a bandwidth of 51.514 Hz is used in the experimental system, the active current that the inverter can inject into the weak grid before becoming unstable is less than the 50% of its nominal current. This case is shown in Figure 13d where the currents of the experimental rig are presented. To ensure the system stability in nominal conditions, a PLL with a maximum bandwidth of 20.334 Hz must be used as shown in Figure 13a. Finally, the current waveforms supplied by the converter when the PLL has a bandwidth of 30.898 Hz,and 40.723 Hz are shown in Figure 13b,c respectively.
In Figure 14 the frequencies estimated by the PLL (i.e., PLL output) for the cases described in Figure 12b and Figure 13c are shown. From this figure, it is concluded that when a step is applied to the active current, for both cases, the frequency at the PLL increases rapidly, driving the system to instability and finally producing the disconnection of the converter from the grid after the operation of the overcurrent protection. It is, therefore, possible to conclude that the proposed model (44) can effectively predict the system stability when the PLL bandwidth and the SCR of the weak grid are taken into account.   The experimental tests presented validate some of the operating points shown in Figure 5. For completeness, in this section, the experimental validation of the pattern discussed in Section 4.2 and depicted in Figure 8 is provided. In Section 4.2 it was concluded that the stability of the system is adversely affected by increasing the active current injected by the converter to the weak grid, decreasing the SCR, and increasing of the PLL bandwidth. Indeed, from Figure 8, it can be seen that for a given SCR and PLL BW, the damping of modes 7 and 8 decreases as the active current increases. Based on that, and considering that the settling time of the system is strongly affected by the damping of the dominant modes (those which affect the stability, in this case, modes 7 and 8 of the proposed model), additional experimental tests are now discussed.
In these tests, the transient response (settling time) of the frequency at the PLL output is studied as a function of (i) the PLL bandwidth, (ii) the SCR of the weak grid, (ii) and for different values of active current.  Figure 9 working for a given SCR of the grid and for a given PLL bandwidth, the evolution of the frequency at the PLL output is measured and saved online by the Triphase data logging system, for the following current steps:  Step 1: The reference value * in the converter is changed from * = 14 A to * = 15 A  Step 2: The reference value * in the converter is changed from * = 15 A to * = 16 A  Step 3: The reference value * in the converter is changed from * = 16 A to * = 17 A  Step 4: The reference value * in the converter is changed from * = 17 A to * = 18 A In all of these current steps, the settling time of the frequency at the PLL output and the frequency of the oscillations in the transient state of this signal are shown. Based on this information, and considering that in those steps, the transient behaviour is dominated by modes 7 and 8 as shown in Figure 6 and Figure 8, it is possible to estimate the experimental damping ratio of modes 7 and 8 performing a comparison with those obtained using the proposed model, for the same operating point. In Appendix C, the procedure to estimate the damping of the modes from the step-response of the system is presented. Using this procedure, the experimental damping of modes 7 and 8 are estimated for the four steps studied and for the operating conditions shown in Figures 15-18. Finally, these experimentally measured damping factors are compared with those calculated using the proposed model (44) as shown in Tables 7-10.
It can be seen that the theoretical and experimental damping values of modes 7 and 8 given in Tables 7-10 are very close. The differences can be explained for the following reasons: (i) some phenomena present in the actual system were not considered in the modelling process (losses, switching, etc.), (ii) the procedure to estimate the damping coefficient experimentally assumes (see in all the operating range. The error is much lower when the system is operating with damping coefficients above a given threshold (e.g., 0.25). Finally, Figure 15 shows the variation and oscillations at the output of the PLL, in the experimental rig of Figure 9, for the 4 steps studied. From this figure, it can be concluded that the settling time increases with an increase of the active current * injected by the converter into the weak grid. The same behaviour is seen when analysing the experimental tests shown in Figure 16, Figure 17, and Figure 18. Based on the results given in Tables 7-10, this behaviour is because the damping of modes 7 and 8 decreases with an increase of the active current * , bringing the system closer to the zone of instability, and therefore increasing the settling time. Notice that the 2% settling time is usually estimated as     Step 1 Step 2 Step 3 Step 4 * = 14A * = 15A * = 16A * = 17A * = 18A Step 1 Step 2 Step 3 Step 4 * = 14A * = 15A * = 16A * = 17A * = 18A     Step 1 Step 2 Step 3 Step 4 * = 14A * = 15A * = 16A * = 17A * = 18A

Conclusions
A low-complexity small signal model of the system has been proposed which includes the PLL bandwidth and the weakness of the grid. The proposed model has been extensively verified with simulations implemented in PLECS and validated experimentally for a wide range of PLL bandwidths and different SCRs.
A dq-PLL design procedure based on the proposed model has been proposed to ensure the stability of converters connected to weak grids. The improvement of the proposed design scheme over the schemes reported in previous studies is the fact that (to the best of our knowledge), this is the first paper where a systematic procedure to design a PLL to be used in weak grids is proposed.
Experimental results obtained from a 5 kW laboratory scale system confirm that the proposed model and design process can be effective tools to optimise the system operation in terms of finding the fastest PLL that can be used in a weak grid with known SCR without affecting the system stability. The small differences between both model and experimental results can be justified because phenomena present in the experimental rig (e.g., losses, switching) were not taking into account in the proposed model or in the assumptions used in the modelling process. (See Section 3) The fact that the proposed model is simple enables it to be used for online stability monitoring. In fact, only modes 7 and 8 of the model are affected by the PLL bandwidth and the SCR of the grid. If an algorithm for monitoring the grid impedance is added, the stability of the system can be monitored online through the calculation of modes 7 and 8.
The proposed PLL design process is suitable for three-phase three-wire balanced weak grids. Its extension to consider unbalanced and/or harmonic weak grids is proposed for future work. In unbalanced weak grids, it is necessary to consider both positive and negative sequence components of currents and voltages of the system in the modelling process. In harmonic weak grids, it is necessary to consider the voltages and currents of the main harmonics present in the system in the modelling process.

Conflicts of Interest:
The authors declare no conflict of interest. Finally, using (A7), the system (A6) can be written fully in the dq reference frame as shown (A8).  Figures 15-18, the experimental damping in that operating conditions can by obtains using (A11), (A12) and A13.