**1. Introduction**

In 2018, installed wind power capacity in Spain increased by 392 MW to reach a total of 23,484 MW, providing 19% of Spanish electricity consumption, and making it the second-largest wind energy producer in the European Union and fifth in the world [1,2]. This scenario highlights the resurgence of the Spanish wind energy sector and the renewed promotion of its activities, mainly as a result of the three wind energy auctions carried out in 2016 and 2017. Of the total new wind power capacity, 48.5% was installed in the Canary Islands, since the region offers highly suitable wind resources. Thus, Spain currently has around 1123 wind power plants (WPP) and 23,308 wind turbines (WT) installed, spread across 807 municipalities [3].

The contribution of wind power to the Spanish energy demand in 2018 was also reflected in terms of financial savings, benefiting particularly industrial consumers. As an example, for an average industrial annual consumption of 1500 MWh, the total saving amounted to approximately 3500 e [3]. In view of

the above achievements, the Spanish Wind Energy Association (AEE) is focused on the development and expansion of the wind energy sector in Spain, and its short-term objective is the commissioning, before March 2020, of the wind power auctioned in 2016 and 2017. This will lead to the growth of both the wind energy market and employment, reduction of greenhouse gases and social and economic development, among other important aspects. Moreover, during 2019, 3000 MW of wind power is expected to be installed.

On the basis of the above information, it is clear that wind energy is a key sector in Spain which will acquire even greater importance in the coming years. However, the unpredictable nature of wind poses a challenge in terms of the integration of the new installed wind power capacity into the grid. Voltage and frequency regulation problems may arise, making planning of network operation activities a pressing need. Thus, knowing the behavior of the grid in advance will allow power system operators to be prepared, overcoming potential power supply problems and forecasting the required power compensations from conventional power plants.

In this regard, dynamic simulation of WT [4] and WPP models representing actual WTs and WPPs connected to the grid is required in order to forecast their active and reactive power responses when subjected to critical situations. Electrical disturbances such as voltage dips are the most important issues, as they cause a voltage reduction of between 10% and 90% and may last up to one minute. In this sense, the Spanish Grid Code developed an Operation Procedure for fault ride-through capability, Operation Procedure 12.3 (PO 12.3), which sets out in detail the response that Spanish WPPs must have under voltage dips. Following a procedure specifically developed for verification, validation and certification (PVVC), the requirements set by PO 12.3 must be complied with by the Spanish WPPs, except for some particular cases. Different adjustments, explained in more detail in Section 2, must then be carried out in the Spanish WPPs to comply with PO 12.3. WTs in operation must therefore follow specific validation criteria, which involves the estimation of validation errors [5].

Furthermore, also driven by the need to provide power system operators with dynamic WT and WPP models to analyze grid integration issues, the International Electrotechnical Commission (IEC) published standard IEC 61400-27-1 in 2015, which defined the so-called generic WT dynamic models [6]. Specifically, four generic WT models are defined, which cover the four main WT typologies currently available in the market. Among them is the generic Type 3 WT model, which represents doubly-fed induction generator (DFIG) WTs. This typology is currently the most widely installed across different countries and, from a technical viewpoint, the most complex one [7]. To validate the generic Type 3 WT model and, in general, all IEC-developed WTs, they must be compared with field measurements, studying their accuracy and testing their performance. To carry out this work, standard IEC 61400-27-1 issued validation guidelines, on which different studies, mentioned later in this document, are based [8,9].

Both the Spanish Grid Code through PO 12.3 and the IEC through standard IEC 61400-27-1 have mapped out the path to be followed in order to regulate the electrical behavior of wind power installations, developing their own validation procedures. However, given that IEC 61400-27-1 is an international standard, and in order to expand the use and scope of application of the originally developed dynamic WT models, this paper submits the generic Type 3 WT, i.e., the DFIG WT, to the requirements of Spanish PO 12.3 on the response of WPP installations in the event of voltage dips, studying its compliance with this grid code. The generic Type 3 WT model is also compared to a detailed model of a DFIG commercial WT, which was previously validated following the PVVC to also comply with the Spanish PO 12.3 [10]. Therefore, this work will allow us to analyze to what extent generic IEC WT models are able to comply with validation criteria established by a national grid code, and to determine their limitations and, in the case of their failure to comply with these criteria, the reasons.

Other key works on this topic, such as [10], focus on the compliance of an actual wind farm composed of Gamesa G52 WTs with Spanish PO 12.3, submitting the entire wind farm to the certification procedure, following the PVVC. In [11], an extension of the work previously performed in [10] is presented. In this case, instead of submitting the complete wind farm to the certification procedure, different voltage dips were applied to a single Gamesa G52 WT, analyzing its compliance with Spanish PO 12.3. Nevertheless, the present contribution goes a step further, studying, for the first time, the compliance of a generic Type 3 WT model developed by standard IEC 61400-27-1 (recently published in 2015) with a national grid code requirement, Spanish PO 12.3. This allows the scope of application of the standard to be extended, facilitating a more widespread use of the IEC-developed generic WT models. Moreover, this work fully implements of the generic model in MATLAB/Simulink with its subsequent dynamic simulation, which provides evidence for the significant differences of the current work with respect to [10,11].

Furthermore, the present work also aims to highlight the strengths and weaknesses of the WT models developed by standard IEC 61400-27-1. On the one hand, for instance, the IEC-developed models are generic enough to represent the wide range of actual WTs developed by different manufacturers. However, on the other hand, given their generic (i.e., simplified) condition, the transient periods of these actual WTs are not accurately represented by the IEC WT models. In this latter case, certain modeling modifications, further detailed in Section 4, must be implemented in the IEC Type 3 WT model to improve its transient behavior. Moreover, the IEC models are clearly specifically designed to represent the different typologies of actual WTs. Hence, the submission of the generic Type 3 WT model to the Spanish grid code is an intermediary step that will allow the wide range of actual WTs in operation to be more rapidly verified, validatedandcertifiedaccordingtoPO12.3,withouttheneedforspecificdetailedWTsimulationmodels.

The paper is structured as follows: Section 2 explains the validation procedure that must be followed to comply with the Spanish grid code. Section 3 presents the WT model studied, which is the Type 3 WT developed by international standard IEC 61400-27-1, while Section 4 shows the results obtained, comparing field measurements and detailed simulation model with responses obtained from the generic IEC model. Finally, Section 5 summarizes the main conclusions of the work.

#### **2. Spanish Grid Code and Procedure for Verification, Validation and Certification**

Generic WT models developed by IEC 61400-27-1 have been implemented, simulated and validated using field measurements in several scientific contributions, following the IEC validation procedure [8,9,12,13]. In [8], a Type 3 WT developed by standard IEC 61400-27-1 was validated using the measurements of a real WT following the IEC guidelines. In [9], a Type 4 WT was also validated, although this was done according to both IEC and WECC guidelines (WECC is the Western Electricity Coordinating Council, the other International Organization that has defined generic WT models), while [12] also performed the validation of a generic Type 3 WT according to the IEC Standard. Finally, [13] performs the validation of a Type 1 WT. Moreover, studies such as [11], cited in Section 1, address the validation of a specific-vendor model of DFIG WT following the Spanish grid code, while [14] is based on the improvement of the response of a simplified mechanical model when submitted to fault-ride through capability requirements. However, to the best of the authors' knowledge, there are no studies addressing the simulation process of generic WTs to comply with national grid code requirements. Hence, aiming at a more widespread use of these IEC 61400-27-1 models, the DFIG generic model defined by the IEC is compared to the detailed model of a Gamesa G52 commercial WT, which was, in turn, submitted to the operation procedure for fault ride-through capability within the Spanish Grid Code, PO 12.3 [10]. Furthermore, both the generic and the detailed Type 3 WT models are compared with field measurements, which leads to highly reliable and accurate results. This triple comparison allows the IEC-developed generic WT model to be assessed under different response requirements, thus analyzing its limitations and studying its compliance with the conditions of PO 12.3, based on the PVVC guidelines.

Voltage dip modeling  Fault equipment model Fault equipment model Voltage source

Regarding the development of the PVVC, a specific working group in which WPP owners, WT manufacturers and certification entities and laboratories took part, was created. The corporation that operates the transmission grid in Spain, Red Eléctrica de España, also participated actively in its development. After its completion, this working group was recognized as the technical committee for verification, responsible for monitoring the compliance of WPPs with the Spanish grid code. Hence, based on the active and reactive power responses of WTs, as well as the current reactive ones, which usually define the electrical behavior of the machines during fault and post-fault periods, thus characterizing the fault ride-through capability requirements set by the grid code, the working group developed several editions of the PVVC (the latest released in September 2018). The evolution of the different editions of the PVVC is shown in Table 1 (note that *Pn* is the nominal power of the WT).


**Table 1.** Comparison of different editions of the PVVC. (*a*)<sup>Δ</sup>*x*(%) = *xmea*−*xsim xnom*

.

 Voltage source

It is also worth noting that the Spanish Wind Energy Association (AEE) reported on the problems in adapting the existing WPP installations to the requirements of Spanish national grid code PO 12.3 [15]. Certification forecasts for WPPs were also reflected in the document. The constraints for complying with the PO 12.3 were mainly found in WPPs consisting of WTs equal to or less than 500 kW rated power, since they had insufficient space in the generator to implement the technical solutions required. Moreover, the potential solutions proposed for these types of WPPs to comply with PO 12.3, such as FACTS (flexible alternating current transmission systems), gave rise to administrative and land problems. Old WTs, the manufacturers of which no longer existed, also gave rise to difficulties when looking for specific technical solutions, and were therefore considered beyond the scope of PO 12.3. In this regard, it was also proposed to exclude WPP installations near the end of their expected lifetimes from the certification process, as further financial investment was meaningless. Singular WTs prototypes or machines located in environmentally sensitive areas were also outside the scope of PO 12.3.

#### *2.1. Certification of WTs and WPPs According to the PVVC*

Two verifications must be complied with when assessing the response of WTs and WPPs according to Spanish Grid Code PO 12.3: (i) WPPs must remain connected at the point of common coupling (PCC) during voltage dips, which is related to the correct clearance of short-circuits based on the time/voltage curve defined in the grid code, (ii) active and reactive power consumption at the PCC, in case of balanced and unbalanced faults, must be less or equal to the levels specified in the operation procedure.

According to the PVVC, there are two possible ways to certify and verify the response of a WPP installation, described below [5]:


Drawing on the above, Ref. [15] showed that, in Spain, out of a total of 388 WPPs, 375 were certified following the particular procedure, 9 using FACTS solutions, while the remaining 13 were certified following the general procedure, also using FACTS. Furthermore, approximately 90% of the WTs had to be submitted to specific design modifications to comply with the voltage dip requirements, enabling or disabling protections so they remained connected to the grid during such situations.

#### *2.2. DFIG WT Validation Procedure According to the PVVC*

The present work focuses on the achievement of a more widespread use of the IEC-developed generic Type 3 WT model, in addition to the extension of the scope of its applications. This is done by comparing the performance of the generic Type 3 WT with the field tests conducted in a Gamesa G52 commercial WT, as well as with the responses of its detailed simulation model, which was previously verified according to the PVVC to comply with the Spanish Grid Code PO 12.3 [10]. It is, therefore, necessary first to highlight the steps followed to verify, validate and certify the Gamesa G52 WT. Hence, as listed in Section 2.1, two verifications regarding the behavior of WPPs must be complied with according to PO 12.3, and there are two possibilities to certify such compliance with the specified requirements, according to the PVVC. In this particular case, the general verification procedure approach was followed, which consisted of individually validating the WTs and subsequently simulating the WPP by using those validated WT models. As a result, three general steps were followed [10]: (i) wind turbine testing, (ii) wind turbine model validation, (iii) wind farm simulation. Since the first two steps form the basis of this study, the present work focuses on these, paying particular attention to the WT model validation process.

Based on the flowcharts presented in [10,11], once the field tests were conducted following the validity criteria and the equipment specified in the PVVC [5], and the accredited report was received, the model validation process with the field measurements was performed. To carry out this task, the dynamic simulation of the WT model was required. First, based on the data provided by the field tests and the power calculation methodology described in Section 9.2 of the latest edition of the PVVC (Ed. 11), the active and reactive power, as well as the fundamental harmonic of voltage and current Root Mean Square (RMS) values were calculated. Secondly, a voltage source was implemented, along with the detailed WT simulation model, to accurately reproduce the instantaneous voltage measurements corresponding to the field tests, thus obtaining the same instantaneous variables as those recorded during the tests. The time step set during the simulation must be equal to or less than the time interval corresponding to the sample frequency recorded during the field tests [5].

Therefore, both the WT simulation model responses and the WT field measurements can then be compared and analyzed. Based on the PVVC validation criteria, a WT model is considered to be validated when the absolute value of the difference between the field tests' active and reactive power measured values (*xmea*) and the active and reactive power simulation values (*xsim*) do not exceed the nominal value (*xnom*) by 10% in 85% of the data series, (see Equation (1)). Earlier versions of the PVVC (see Table 1) also required the RMS fundamental phase voltage and the RMS fundamental phase current to comply with that criterion.

$$|\Delta \mathbf{x}(\%) = |\frac{\mathbf{x}\_{mcd} - \mathbf{x}\_{sim}}{\mathbf{x}\_{nom}}| \cdot 100 \le 10\% \tag{1}$$

This validation criterion is applied to the generic IEC-developed Type 3 WT model to study its compliance with Spanish grid code PO 12.3. The RMS values of the measured voltage dip were reproduced at the high voltage side of the transformer -implemented along with the generic IEC WT. The results obtained are analyzed in Section 4.

#### **3. Generic Type 3 Wind Turbine Model Based on Standard IEC 61400-27-1**

Based on the current needs of network operators, who must ensure integration of new installed wind power capacity without compromising grid stability, different grid codes have been developed by different countries. Indeed, grid codes were compared and assessed in works such as [16]. However, the European Network of Transmission System Operators for Electricity (ENTSO-E), the aim of which is the regulation of the electricity market in European countries, underlined the need to standardize the technical requirements demanded by the different grid codes. Moreover, some grid codes also included the technical requirements to be complied with by WT and WPP models. In this regard, and with the objective of unifying the technical procedures to assess wind power integration in the grid, the IEC began developing generic, also known as standard, dynamic WT models in October 2009. The tasks conducted resulted in two different parts of standard IEC 61400-27, Part 1 and Part 2, based on the development and validation procedure of the WT and WPP models, respectively. The working group continued the development process with the Final Draft International Standard (FDIS) being issued in 2014, and published one year later, in February 2015. However, the initial structure of the standard was later modified, finally resulting in two different editions: Ed. 1, involving both the WT and the WPP models, and Ed. 2, currently under development, and including their validation procedures.

Regarding WT technologies, Type 3 WT, i.e., the DFIG WT, is the most advanced and currently most widespread model across different countries. It consists of a doubly-fed induction generator with the stator directly connected to the grid and the rotor connected through a back-to-back power converter [17,18]. The IEC-developed Type 3 WT model [6] can be further divided into two sub-models, depending on the generator system implemented: Type 3A and Type 3B. The output signal of both generator systems is a current injected through a current source with parallel impedance, neglecting losses in the generator as the generator air gap power is equal to the power measured at the WT terminals. The main difference lies in the protection system, modeled through a set of dynamic blocks in the case of generic Type 3B WT. Internally, at simulation level, the Type 3B protection system decreases to zero both the active and reactive current signals from the active and reactive control models, respectively, when the voltage differential is above a specific threshold. This whole set of dynamic blocks representing the protection system is therefore not modeled in the case of generic Type 3A WT [6].

In line with the above, since the Gamesa G52 Commercial WT has a break chopper protection, the main function of which is to burn the excess energy to avoid the DC bus voltage increasing outside the set limits, the detailed DFIG WT model simulated using the PSCAD/EMTDC software tool also has a break chopper protection, as it must be capable of representing the fault-ride through capability of the actual WT. Regarding the generic IEC WT, the Type 3A model, which has no specific protection system

included, was implemented. This is because, on the one hand, this model is able to control the voltage during the fault and, on the other hand, IEC Type 3B WT is only used to represent actual WTs equipped with active crowbar protection systems [19].

Figure 1 shows a schematic representation of generic Type 3 WT and its control models [20]: *aerodynamic model*, representing the wind turbine rotor (WTR) and providing the value of the wind aerodynamic power; two-mass *mechanical model*, representing both the low and high speed sides of the gear box (GB); *generator system*, which provides the values of the active and reactive current injected into the grid and represents the doubly-fed asynchronous (or induction) generator (DFAG); *pitch control model*, which adjusts the position of the WT blades through calculation of their pitch angle; *active power control model* (P Control Model), the main output of which is the active current command; *reactive power control model* (Q Control Model), which provides, based on the reactive power reference, the reactive current command; *reactive current limitation model* (Q Limitation Model), which calculates the maximum and minimum reactive power allowed; and *current limitation model*, which provides the active and reactive current's limit values. Moreover, the power converter, also shown in Figure 1, consists of the generator side converter (GSC), the direct current link (DCL), the DC capacitor (C), the chopper protection system (CH) and, lastly, the line side converter (LSC). In addition, as mentioned above, some Type 3 WTs include a crowbar protection system (CBR). Finally, the wind turbine terminals (WTT) are connected to the grid through a transformer (TR), and the circuit breaker (CB) may disconnect the WT from the network. The way in which the control models are related to each other may be seen in [6] in more detail.

As will be explained in greater depth in Section 4, the voltage dips were applied to the high voltage side of the WT transformer, so that one of the measurement points to apply the PVVC validation criteria coincides with the testing point. In this way, detailed and generic WTs must also include their transformer models. In the case of generic IEC WT, the transformer model is simulated as an impedance [6,10].

**Figure 1.** Single-line diagram and control models of generic Type 3 WT based on [6].
