A Simulation Model for Providing Analysis of Wind Farms Frequency and Voltage Regulation Services in an Electrical Power System †

: The article presents an original simulation model of a wind farm (WF) consisting of 30 wind turbine-generator units connected to the electrical power system (EPS) through power converters. The model is dedicated to the evaluation of the WF capabilities to participate in frequency and voltage regulation services in the power system. A system that allows for frequency and voltage control is proposed and implemented in the presented model. The system includes primary frequency regulation with synthetic inertia and secondary regulation available on request from the system operator. The concept of a reference power generation unit was introduced, according to which only one wind generator unit was modeled in detail, and the other units were replaced with simple current sources. Such a solution allowed for the reduction of size and complexity of the model as well as shortened the simulation time. Simulation tests were conducted in the PSCAD/EMTDC environment for an electrical power system composed of the wind farm, a synchronous generator, and a dummy load. The performance of the wind farm control system was analyzed in different operation conditions, and the control capabilities of the farm were assessed. Selected simulation results are presented and discussed in the paper. They illustrate the regulatory properties of the WF and conﬁrm the correctness of the developed model.


Introduction
Basic regulation processes in conventional electrical power systems (EPSs) are provided by synchronous generators to maintain the power balance between production and demand and the required quality of the energy delivered to consumers. The growth in the power of renewable energy sources (RESs) installed in EPSs increases the possibilities of power balancing, but at the same time, it extends the area of power generation that can be regarded as excluded from the central control due to unstable power generation and the low inertia of the system. Maintaining the tendency of the growing share of RESs in an overall power and energy balance will make it necessary for system operators to change the method of controlling the operation of the whole power system and to include these sources in the provision of system regulation services [1].
The ability of individual RESs to participate in system regulation depends on the technology that is used to produce energy. It includes the type of primary energy, the presence of rotating components, the method of evacuating power from the source into the system, and the structure of regulatory systems [2].
At present, wind farms (WFs) are regarded as the most promising technology, owing to the presence of rotating components that constitute the source of natural inertia [3][4][5][6]. Wind power plants that are currently used in Polish EPSs are characterized by the inertial Energies 2021, 14 response at the level from 2 to 3.5 s, i.e., a value that is ca. half as high as the value characteristic for conventional steam units with inertia constant from 5 to 8 s [7][8][9][10][11][12][13]. However, compared to other RESs, such as photovoltaic systems (PVs) that have no inertia, it is quite a significant value.
In accordance with the current Polish Grid Code [14], WFs with the power equal to or exceeding 50 MW should be equipped with a system for controlling and regulating active power, making it possible for the farm to operate within the limitations defined by the system operator and to participate in frequency regulation, as well as a system for controlling reactive power, ensuring the possibility of cooperating with primary voltage regulation systems [15]. Similar technical requirements are specified for WFs in other countries' grid codes [16]. Thus, it can be claimed that WFs participation in frequency and voltage regulation is not only justified by the need to raise the level of system services, but it should also be technically possible provided that the requirements resulting from the current regulations are fulfilled.
Owing to the degree of complexity of EPSs and the specific character of WFs, it can be stated that an analysis of wind farm participation in the provision of system regulatory services is a difficult issue and an interesting research problem. It becomes necessary to develop methods and tools of assessing the impact of WFs operation on the power system, and, in particular, of verifying their regulatory capabilities. In the case of a power system, performing direct tests is limited; therefore, a simulation method based on the system models is the most effective and sometimes the only one to apply.
Extensive studies are conducted worldwide to assess the possibility of providing system services by WFs [17]. This subject is discussed in numerous articles and concerns both simulation studies [18,19] and studies conducted on real WFs [6,[20][21][22], whereby various aspects of their operation are analyzed. The key directions of research concern the comparison of various types of generators used in wind power plants [5,23] in terms of manufacturing technology, the impact of farms on the power system operation, and the power quality as well as maximizing energy production in WFs.
Various simulation models are used in the studies, the features of which depend on the specific application. The models dedicated to closed loop on-line control to optimize the power production of wind turbines [24][25][26][27][28][29] belong to the class of control-oriented dynamic models and differ in terms of the degree of fidelity. Other models are used for the WFs layout optimization. It is especially useful at the farm design stage to help WFs produce as much power as possible while minimizing the wake impact that can disturb the flow of the wind inside a wind farm [30,31]. The awakening of one or more turbines causes the wind to become turbulent and the wind speed to decrease, which can significantly reduce the energy production of the wind farm. Such optimization is carried out with the use of advanced optimization algorithms (e.g., genetic algorithms), and its aim is to maximize the power production in the farm and to limit the mutual influence of turbines on each other [32][33][34].
Some publications deal with the regulatory capabilities of wind generators and WFs in terms of voltage regulation in medium voltage distribution networks [35][36][37]. They describe an indirect method of regulation through the control of reactive power by an interface converter. In [37], a simulated study was performed to compare using reactive power for voltage regulation and for losses reduction in the network.
Numerous papers [38][39][40][41][42][43][44] concern the issue of frequency control. In [38], a control strategy for an islanded system with a WF and a hydrogenerator is presented. A modification of the control algorithm applied for the real WF was proposed to improve the control quality. A detailed review on the frequency response of WFs with different types of generators is presented in [39]. A simulation study showing the behavior of the real WF during the event of frequency nadir is discussed in [40]. Frequency control in an islanded system with drop characteristics applied in WTs is the subject of paper [41]. In [42], the contribution of WFs equipped with DFIG generators in secondary frequency control in the power system is analyzed. In the control system described, the PID (proportional-integral-Energies 2021, 14, 2250 3 of 17 differential) controller was used, which reduced overshooting in the frequency response. In [43], an extended study of applying WFs for primary frequency control in the power system is presented. A method based on rootlocus analysis was applied for tuning control parameters. In [44], the NREL simulation model of a WF with DFIG generators was used to study the participation of the farm in the frequency secondary regulation. The active power control was designed using adaptive pole placement control and fuzzy gain-scheduled PI (proportional-integral) controller.
Models used for the analysis in the literature differ in the structure of the power grid, the type of WFs generators, and a different share of WFs in the power balance. The presented results indicate that including proper frequency controls in the wind turbines can significantly improve the frequency response of the power system. This paper presents a comprehensive simulation model of a WF connected to the EPS through power converters and participating in frequency and voltage regulation. The model has been developed using the PSCAD software and consists of wind turbinegenerator units and their control systems allowing them to react to frequency and voltage changes in the power system. As the model is dedicated to studying the power system behavior under regulation (the cooperation of the WF with the power system), the authors focused on the electrical part of the system. Component modules from the PSCAD library were used in the model, such as the wind turbine model. It enables programming variables for various types of winds (blasts, turbulences) as an input and regulates the turbine power by changing the attack angle of the blades; however, it does not take into account the wake effect. The model, firstly presented in [45], has been extended and modified. Virtual inertia was introduced to the frequency control, which improved the behavior of the system under the violation of the power balance. The frequency regulation encompasses primary regulation with virtual inertia and secondary regulation on request of the system operator. Based on the simulation tests conducted using the PSCAD software, an analysis of the WF response to a change in operating conditions and to the limitations imposed by the operator was conducted. The reaction of the farm to the input signals applied to control systems was also shown, illustrating its capability to participate in the system regulation.
The paper is organized as follows: Section 2 describes the basic principles of regulating frequency and voltage in power systems. Particular attention was paid to the analysis of the WF potential in terms of providing regulatory services depending on the type of generator used in the wind power unit. Section 3 presents the power system for which simulation studies were carried out. Section 4 describes the models of individual elements of the tested system. The electromechanical elements and the algorithm of the wind turbine are presented in detail. Section 5 contains the results of the simulation tests. The conclusions from the tests and the evaluation of the created model are included in Section 6.

Frequency Control
Frequency regulation is performed basically by the conventional power and is aimed at controlling active power production during frequency changes. In a steady state, the power generated by energy sources is equal to the power consumed by loads; i.e., the EPS is in an equilibrium point. Any change in the generated or consumed power results in the violation of the power balance. Then, the primary frequency regulation is carried out locally by the speed governors of synchronous generators according to their static f-P characteristic, which leads to a new equilibrium point but for a different frequency. To restore frequency to the value before a disturbance, secondary regulation is accomplished. Secondary regulation results from a coordinated impact of the central control system on selected generators.
The capabilities of WFs to participate in frequency control as well as the applied control methods depend on the type of a generator unit. Various types of generators are used in wind power plants. Currently, the double-feed induction generators (DFIGs) and two types of synchronous generators (SG and PMSG) are most commonly used in WFs [46]. The SG has an excitation circuit, while in the PSMG generator, the source of excitation are permanent magnets. All these types are connected to the network through power electronic converters. In the case of the DFIG generator, the converter is located in the rotor circuit, which means partial separation from the network. The synchronous generators are completely separated from the grid because the converter is located in the stator circuit.
As the generators are electromechanically isolated from the grid, they cannot provide the primary frequency control by means of a rotational speed governor, unlike synchronous generators in conventional power plants. The control system is located in the power converter. Its characteristic feature is a small inertia and immediate response after disturbing the power balance.
The frequency regulation in wind power plants with synchronous generators can be performed by means of controlling the pitch angle of the turbine blades, so called pitch control. [47]. It affects the turbine mechanical torque and, as a result, changes the active power generation. To obtain regulatory capabilities in terms of both positive and negative frequency variations, it is necessary to maintain a power regulatory reserve, i.e., limit the power generation in the WF.
An additional service that can be provided by WFs is the imitation of the responses of conventional generators through virtual inertia and thus damping power oscillations. The purpose of virtual inertia is to make a portion of energy accumulated in the turbine rotating elements available for control purposes. A system with greater inertia is less sensitive to frequency fluctuations in case of sudden changes in the power balance.
To increase the capabilities of frequency control in systems with a significant number of WFs, a feedback loop with a frequency-dependent signal is added to the WF active power control system [10,11,48]. To enhance this effect, WFs are also combined with energy storage [49][50][51][52]. The existing systems make it possible to obtain additional active power for control purposes with a value of even 5-10% of the rated power for a time dependent on the value of the inertia constant [53,54]. The value of the additional active power in primary regulation depends on the amplitude of the frequency change (∆f) and the rate of this change (df/dt). There are many publications in the literature describing the method of selecting the gain coefficient of the virtual inertia algorithm [55]. The gain value can be selected experimentally as a constant value or vary according to the amplitude of frequency change [56].

Voltage Control
Direct and indirect methods for voltage regulation are used in the EPS. Direct methods involve changing the voltage level at the generators' terminals or the transformation ratio of power transformers. Indirect methods include the change of reactive power flow in the system.
Voltage regulation is possible for all types of turbine-generator units and entire WFs by modifying the control system or connecting additional devices. Three operating modes of WF control system are defined [26]: operation with a constant power factor tgϕ, direct voltage regulation at the point of WF connection to the EPS (the Point of Common Coupling, PCC) and the control of the reactive power fed into the grid as a function of voltage. All these modes of operation may be implemented for DFIG and PMSG generators. They can work with a set value of reactive power, voltage, or power factor. This requires a modification of the control system by adding an additional control loop to the voltage control system [57,58]. An additional increase in the range of the reactive power generated by the farm is possible through the use of dedicated devices for reactive power compensation, e.g., static compensators (STATCOM) [59,60]. Such a combination is used in the case of very poor connection to the network and to improve Low Voltage Ride-Through (LVRT) [61].
Based on the analysis of the literature, it can be concluded that the capabilities of a WF to participate in frequency or/and regulation processes may be associated with the necessity of modifying the control system or the installation of additional equipment.

System Layout
A diagram showing the analyzed system is presented in Figure 1. It consists of three basic components: a WF with 60 MW installed capacity, a conventional power plant with a synchronous generator of 360 MW rated power, and an equivalent network load with defined voltage characteristics.
case of very poor connection to the network and to improve Low Voltage Ride-Through (LVRT) [61].
Based on the analysis of the literature, it can be concluded that the capabilities of a WF to participate in frequency or/and regulation processes may be associated with the necessity of modifying the control system or the installation of additional equipment.

System Layout
A diagram showing the analyzed system is presented in Figure 1. It consists of three basic components: a WF with 60 MW installed capacity, a conventional power plant with a synchronous generator of 360 MW rated power, and an equivalent network load with defined voltage characteristics. An equivalent generator and a 22/400 kV block transformer were used in the "Conventional power plant" block. The parameters of the generator correspond to the GTHW-360 bipolar generator, which is most frequently used in the Polish national EPS. Power output from the power plant is transmitted using a 400 kV overhead line. A connection with the 110 kV power grid was implemented using a 450 MVA autotransformer with the ratio of 400/115 kV and Yd11 winding connections.

Assumptions for WF Control
For the participation of the WF in system regulation services, the control system of wind turbines should allow for the active power control when the power balance or frequency set value is violated and reactive power control when the voltage exceeds the required range. To accomplish these tasks, two modes of operation were assumed for the turbine-generator units: • Normal operation mode with available power or power limitations, • Intervention mode, operation with performing voltage and/or frequency regulation services.
In the first mode, power generation results from the available wind energy. If there are no limitations imposed by the operator, the usage of renewable energy is maximal. The system operator may limit the power generation below the level that is possible to obtain in given weather conditions in order to obtain a reserve of regulatory power. In An equivalent generator and a 22/400 kV block transformer were used in the "Conventional power plant" block. The parameters of the generator correspond to the GTHW-360 bipolar generator, which is most frequently used in the Polish national EPS. Power output from the power plant is transmitted using a 400 kV overhead line. A connection with the 110 kV power grid was implemented using a 450 MVA autotransformer with the ratio of 400/115 kV and Yd11 winding connections.

Assumptions for WF Control
For the participation of the WF in system regulation services, the control system of wind turbines should allow for the active power control when the power balance or frequency set value is violated and reactive power control when the voltage exceeds the required range. To accomplish these tasks, two modes of operation were assumed for the turbine-generator units:

•
Normal operation mode with available power or power limitations, • Intervention mode, operation with performing voltage and/or frequency regulation services.
In the first mode, power generation results from the available wind energy. If there are no limitations imposed by the operator, the usage of renewable energy is maximal. The system operator may limit the power generation below the level that is possible to obtain in given weather conditions in order to obtain a reserve of regulatory power. In such a case, the WF can contribute to power balancing in the system when frequency changes due to a disturbance. Participating in power balancing in the power system corresponds to primary frequency regulation. The second mode is called interventional and is activated on the request of the system operator. In this mode, secondary frequency and/or voltage regulation service is performed.

The Wind Farm Model
The model of the analyzed system was created in the PSCAD™/EMTDC™ program environment using modules from the program library [62].
A wind farm model includes individual wind turbine-generator units, the farm internal network, and the main 110/30 kV power substation. Due to limitations in the number of computing nodes, only one turbine-generator unit, called the reference wind generator, was fully modeled. The remaining units were modeled as controlled current sources. Assuming that all turbine-generator units of the WF are of the same type as the reference one, it was accepted that reference currents of the sources correspond to the currents of the reference wind generator. Owing to that, simulation computations were conducted considerably faster.
A model of the reference wind-generator unit consists of the following main blocks: wind turbine, synchronous generator, electronic power converter system, and an interface transformer, as shown in Figure 2. The control system was modeled separately and is described in detail in the next section.
such a case, the WF can contribute to power balancing in the system when frequency changes due to a disturbance. Participating in power balancing in the power system corresponds to primary frequency regulation. The second mode is called interventional and is activated on the request of the system operator. In this mode, secondary frequency and/or voltage regulation service is performed.

The Wind Farm Model
The model of the analyzed system was created in the PSCAD™/EMTDC™ program environment using modules from the program library [62].
A wind farm model includes individual wind turbine-generator units, the farm internal network, and the main 110/30 kV power substation. Due to limitations in the number of computing nodes, only one turbine-generator unit, called the reference wind generator, was fully modeled. The remaining units were modeled as controlled current sources. Assuming that all turbine-generator units of the WF are of the same type as the reference one, it was accepted that reference currents of the sources correspond to the currents of the reference wind generator. Owing to that, simulation computations were conducted considerably faster.
A model of the reference wind-generator unit consists of the following main blocks: wind turbine, synchronous generator, electronic power converter system, and an interface transformer, as shown in Figure 2. The control system was modeled separately and is described in detail in the next section. The wind turbine was modeled using a "Wind Source" block, which enables programming variables for various types of winds (blasts, turbulences). A modified power curve corresponding to the characteristics given by the manufacturer for the E70 turbine was used in it [63]. The turbine power is regulated by changing the attack angle of the blades.
A low-speed multi-polar (36 pole pairs) generator, operating with a variable rotational speed in the range from 8 to 21.5 rpm was used in the model. The generator was connected to the power network using a power electronic converter consisting of a rectifier, voltage stabilization system, and an inverter.
The wind farm data correspond to the real WF installed in the Polish EPS.

The Wind Farm Control
The WF control system was designed to meet the requirements specified in Section 3.2.
The following signals are supplied to the control system module: • The angle speed of the turbine-generator unit ωw,  The wind turbine was modeled using a "Wind Source" block, which enables programming variables for various types of winds (blasts, turbulences). A modified power curve corresponding to the characteristics given by the manufacturer for the E70 turbine was used in it [63]. The turbine power is regulated by changing the attack angle of the blades.
A low-speed multi-polar (36 pole pairs) generator, operating with a variable rotational speed in the range from 8 to 21.5 rpm was used in the model. The generator was connected to the power network using a power electronic converter consisting of a rectifier, voltage stabilization system, and an inverter.
The wind farm data correspond to the real WF installed in the Polish EPS.

The Wind Farm Control
The WF control system was designed to meet the requirements specified in Section 3.2.
The following signals are supplied to the control system module:  A diagram of the turbine-generator unit active power control is presented in Figure 3. Basic regulation results from the balance of mechanical and electromagnetic torques described by the following equation [64].
where J-moment of inertia of the generator rotor, ω-rotational speed of the rotor, T mmechanical torque, T e -electromagnetic torque, T 0 -loss torque.
The output signals from the block are the attack angle of turbine blades β (pitch control) and reference values of active power Pref and reactive power Qref that should be supplied to the power network.
A diagram of the turbine-generator unit active power control is presented in Figure  3. Basic regulation results from the balance of mechanical and electromagnetic torques described by the following equation [64].
where J-moment of inertia of the generator rotor, ω-rotational speed of the rotor, Tmmechanical torque, Te-electromagnetic torque, T0-loss torque. Block Fω allows for considering the dependence of the loss torque on the generator angle speed. An additional path introducing the virtual inertia of the turbine has been added to the control system in order for the WF to be able to take part in power balancing and the first moment of a disturbance [65][66][67]. This part of the system reacts to frequency deviations resulting from the violation of power balance in the electric power system. Additional power obtained due to virtual inertia is described by the following equation [68][69][70].
where H-inertia constant [s], and fm-measured system frequency (p.u.). Using virtual inertia, the WF can contribute to reducing frequency variations dynamics in the initial state after a disturbance. However, to have this functionality, the wind farm should operate with some power reserve to be able to contribute to power balancing in case of load increase. The system operator may limit the power generation below the level that is possible to obtain in given weather conditions using the signal POSD. Power reserve is also needed if the WF is to participate in frequency secondary regulation. This regulation starts after the OPF control signal is supplied. Then, the WF power is corrected depending on the frequency deviation so that the frequency returns to its nominal value. Block F ω allows for considering the dependence of the loss torque on the generator angle speed.
An additional path introducing the virtual inertia of the turbine has been added to the control system in order for the WF to be able to take part in power balancing and the first moment of a disturbance [65][66][67]. This part of the system reacts to frequency deviations resulting from the violation of power balance in the electric power system. Additional power obtained due to virtual inertia is described by the following equation [68][69][70].
where H-inertia constant [s], and f m -measured system frequency (p.u.). Using virtual inertia, the WF can contribute to reducing frequency variations dynamics in the initial state after a disturbance. However, to have this functionality, the wind farm should operate with some power reserve to be able to contribute to power balancing in case of load increase. The system operator may limit the power generation below the level that is possible to obtain in given weather conditions using the signal P OSD . Power reserve is also needed if the WF is to participate in frequency secondary regulation. This regulation starts after the OPF control signal is supplied. Then, the WF power is corrected depending on the frequency deviation so that the frequency returns to its nominal value.
The control processes in turbine-generation units are conducted by means of the pitch control, which causes a limitation of the turbine mechanical torque to the required value T m . The β angle control system is activated when there is any change in the reference value of active power due to the operation of the control system or the power system operator's decision. The regulation of the β angle also protects the wind turbines against mechanical overloads that may occur when the permissible wind speed is exceeded. In the simulation model, power P MAX corresponds to the rated turbine rotational speed equal to 2.3 rad/s. A diagram of the turbine-generator unit reactive power control is presented in Figure 4. The control system allows the farm to generate reactive power with the value Q OSD set by the operator (when no value is set by the operator, the generated reactive power is equal to zero) or to operate in the voltage regulation mode obtained after the OPV control signal is supplied.
value of active power due to the operation of the control system or the power system operator's decision. The regulation of the β angle also protects the wind turbines against mechanical overloads that may occur when the permissible wind speed is exceeded. In the simulation model, power PMAX corresponds to the rated turbine rotational speed equal to 2.3 rad/s. A diagram of the turbine-generator unit reactive power control is presented in Figure  4. The control system allows the farm to generate reactive power with the value QOSD set by the operator (when no value is set by the operator, the generated reactive power is equal to zero) or to operate in the voltage regulation mode obtained after the OPV control signal is supplied. The inverter of the reference turbine-generator unit is current-controlled. The reference currents iref are determined on the basis of the Pref and Qref power signals obtained from the active and reactive power control systems.

The Conventional Power Plant Model
In the considered system, the conventional power plant with an equivalent synchronous generator constitutes an element that balances power and energy, so that it takes on a role of the equivalent EPS. The turbine-generator unit model was built using the following modules from the PSCAD library: "Synchronous Machine", "Exciter", "Power System Stabilizer", and "Steam Governor". The steam governor controls the influx of steam to the turbine. A static excitation system maintains a constant voltage value on the generator terminals. In order to limit the oscillation of the output power, the authors used a power system stabilizer that impacts on the excitation system, depending on the changes in the rotational speed of the generator shaft. A block diagram of the turbine-generator system is shown in Figure 5.

The Conventional Power Plant Model
In the considered system, the conventional power plant with an equivalent synchronous generator constitutes an element that balances power and energy, so that it takes on a role of the equivalent EPS. The turbine-generator unit model was built using the following modules from the PSCAD library: "Synchronous Machine", "Exciter", "Power System Stabilizer", and "Steam Governor". The steam governor controls the influx of steam to the turbine. A static excitation system maintains a constant voltage value on the generator terminals. In order to limit the oscillation of the output power, the authors used a power system stabilizer that impacts on the excitation system, depending on the changes in the rotational speed of the generator shaft. A block diagram of the turbine-generator system is shown in Figure 5.
operator's decision. The regulation of the β angle also protects the wind turbines against mechanical overloads that may occur when the permissible wind speed is exceeded. In the simulation model, power PMAX corresponds to the rated turbine rotational speed equal to 2.3 rad/s. A diagram of the turbine-generator unit reactive power control is presented in Figure  4. The control system allows the farm to generate reactive power with the value QOSD set by the operator (when no value is set by the operator, the generated reactive power is equal to zero) or to operate in the voltage regulation mode obtained after the OPV control signal is supplied. The inverter of the reference turbine-generator unit is current-controlled. The reference currents iref are determined on the basis of the Pref and Qref power signals obtained from the active and reactive power control systems.

The Conventional Power Plant Model
In the considered system, the conventional power plant with an equivalent synchronous generator constitutes an element that balances power and energy, so that it takes on a role of the equivalent EPS. The turbine-generator unit model was built using the following modules from the PSCAD library: "Synchronous Machine", "Exciter", "Power System Stabilizer", and "Steam Governor". The steam governor controls the influx of steam to the turbine. A static excitation system maintains a constant voltage value on the generator terminals. In order to limit the oscillation of the output power, the authors used a power system stabilizer that impacts on the excitation system, depending on the changes in the rotational speed of the generator shaft. A block diagram of the turbine-generator system is shown in Figure 5.  Connecting a single generator to a network with loads makes it rotate at a speed corresponding to the mechanical torque of the turbine, counterbalancing the electromagnetic torque. The change in the rotational speed of the turbine results in the change in the power output as a result of the steam governor activation, which is in accordance with its static control characteristics [71].
A diagram of the turbine power control system is shown in Figure 6 [72]. The input signals are the reference turbine speed ω ref and measured speeds ω gen and the reference power P ref that determines the operating point on the P = f(ω) characteristics. The speed error is fed to the block 1/R, which is the slope of the P(f) characteristic.
power Pref that determines the operating point on the P = f(ω) characteristics. The speed error is fed to the block 1/R, which is the slope of the P(f) characteristic.
The output signal is the turbine mechanical torque, which depends on the degree of opening steam supply valves c. Level c = 0 corresponds to closed valves, and c = 1 corresponds to completely open valves. The slope of generation characteristics can be regulated by changing the coefficient 1/R, where statism R is the setting of the control system. The basic actuator, i.e., the hydraulic actuator, is presented as a first-order inert element. Figure 6. The steam turbine power regulation system.

The Load Model
A model of the equivalent load was built using the "FixedLoad" module from the PSCAD library. The model makes it possible to define the load active and reactive power in a grid node on the basis of known voltage characteristics: where PL, QL-rated phase load, U,UN-measured and rated voltage, NP, NQ,KPP, KQFcoefficients.

System Model
Simulation tests were performed to study the operation of the WF in the EPS in different operating conditions. Some simulation cases that illustrate the WF control abilities are presented below.

Participation of the WF in Frequency Regulation
The participation of the WF in frequency regulation requires maintaining a reserve of active power, which means that the generated power is lower than the power that it is able to generate under given conditions.
In the discussed scenario, it was assumed that the WF operates with the power limited by the operator to the value of 15 MW, at the set reactive power equal to 5 Mvarind. In the 2nd second of the simulation, the load was increased by 30 MW and 10.5 Mvarind and after a steady state was reached, the frequency regulator was switched on in the 7th second of the simulation (Figures 7 and 8).
In accordance with the active power balance shown in Figure 7, the demand power was mainly met using the conventional power plant generator at the initial stage of the simulation. Under those conditions, the value of the supply voltage was 115 kV (Figure  9), and the frequency was equal to 50 Hz (Figure 10). The output signal is the turbine mechanical torque, which depends on the degree of opening steam supply valves c. Level c = 0 corresponds to closed valves, and c = 1 corresponds to completely open valves. The slope of generation characteristics can be regulated by changing the coefficient 1/R, where statism R is the setting of the control system. The basic actuator, i.e., the hydraulic actuator, is presented as a first-order inert element.

The Load Model
A model of the equivalent load was built using the "FixedLoad" module from the PSCAD library. The model makes it possible to define the load active and reactive power in a grid node on the basis of known voltage characteristics: where P L , Q L -rated phase load, U,U N -measured and rated voltage, N P , N Q , K PP , K QF -coefficients.

System Model
Simulation tests were performed to study the operation of the WF in the EPS in different operating conditions. Some simulation cases that illustrate the WF control abilities are presented below.

Participation of the WF in Frequency Regulation
The participation of the WF in frequency regulation requires maintaining a reserve of active power, which means that the generated power is lower than the power that it is able to generate under given conditions.
In the discussed scenario, it was assumed that the WF operates with the power limited by the operator to the value of 15 MW, at the set reactive power equal to 5 Mvar ind . In the 2nd second of the simulation, the load was increased by 30 MW and 10.5 Mvar ind and after a steady state was reached, the frequency regulator was switched on in the 7th second of the simulation (Figures 7 and 8). In reaction to the increased load, the generator power rose, which resulted in a decrease in frequency to 49.98 Hz. The active and reactive power generated in the WF did not change, while voltage decreased to 113.3 kV at the point of load connection.
When the wind power plant began operating in the frequency regulation mode, the active power generation rose to 40 MW as the attack angle of the wind turbine blades decreased to 12° (Figure 11). At the same time, there was a decrease in the power of the synchronous generator as a balancing source (Figure 7).
A change in the active load distribution between energy-generating units in the system resulted in a change of the reactive power flow in the system ( Figure 8) and thus in a change of the voltage value in the load node (Figure 9).     The operation of the frequency control system in the WF resulted in an increase of the power generated by the farm and a rise in frequency to the reference value equal to 50 Hz (Figure 10). In accordance with the active power balance shown in Figure 7, the demand power was mainly met using the conventional power plant generator at the initial stage of the simulation. Under those conditions, the value of the supply voltage was 115 kV (Figure 9), and the frequency was equal to 50 Hz ( Figure 10).   The operation of the frequency control system in the WF resulted in an increase of the power generated by the farm and a rise in frequency to the reference value equal to 50 Hz (Figure 10).  This confirms the effectiveness of operation of the applied WF frequency and the active power regulation system. In reaction to the increased load, the generator power rose, which resulted in a decrease in frequency to 49.98 Hz. The active and reactive power generated in the WF did not change, while voltage decreased to 113.3 kV at the point of load connection.
When the wind power plant began operating in the frequency regulation mode, the active power generation rose to 40 MW as the attack angle of the wind turbine blades decreased to 12 • (Figure 11). At the same time, there was a decrease in the power of the synchronous generator as a balancing source (Figure 7).  This confirms the effectiveness of operation of the applied WF frequency and the active power regulation system.

WF Frequency Response Using Virtual Inertia
In the next part of the research, the frequency response of the WF was analyzed with increasing and decreasing the load. The inertia coefficients for the WF were 0, 0.5, 1, and 2, respectively. During the tests, the farm worked with the secondary frequency control mode turned off (the OPF control in Figure 3). The activation of the virtual inertia algorithm took place after setting the inertia constant greater than zero. The frequency response analysis was performed while increasing the system load from 180 MW to 210 MW. Figure 12 shows the course of frequency changes depending on the set inertia coefficients. Before the load change, the frequency in the system was close to 50 Hz. After increasing the load, its value decreased to 49.977 Hz. According to Equation (2), the maximum reaction of the virtual inertia algorithm occurs in the first moment after the disturbance, when the derivative of frequency changes in time achieves the highest value. In the analyzed case, the maximum frequency deviation with the load increase by 30 MW and inertia switched off was approximately 13 mHz. The maximum overshoot for all inertia coefficients occurred about 40 msec after the disturbance.  A change in the active load distribution between energy-generating units in the system resulted in a change of the reactive power flow in the system ( Figure 8) and thus in a change of the voltage value in the load node (Figure 9).
The operation of the frequency control system in the WF resulted in an increase of the power generated by the farm and a rise in frequency to the reference value equal to 50 Hz ( Figure 10).
This confirms the effectiveness of operation of the applied WF frequency and the active power regulation system.

WF Frequency Response Using Virtual Inertia
In the next part of the research, the frequency response of the WF was analyzed with increasing and decreasing the load. The inertia coefficients for the WF were 0, 0.5, 1, and 2, respectively. During the tests, the farm worked with the secondary frequency control mode turned off (the OPF control in Figure 3). The activation of the virtual inertia algorithm took place after setting the inertia constant greater than zero. The frequency response analysis was performed while increasing the system load from 180 MW to 210 MW. Figure 12 shows the course of frequency changes depending on the set inertia coefficients. Before the load change, the frequency in the system was close to 50 Hz. After increasing the load, its value decreased to 49.977 Hz. According to Equation (2), the maximum reaction of the virtual inertia algorithm occurs in the first moment after the disturbance, when the derivative of frequency changes in time achieves the highest value. In the analyzed case, the maximum frequency deviation with the load increase by 30 MW and inertia switched off was approximately 13 mHz. The maximum overshoot for all inertia coefficients occurred about 40 msec after the disturbance.  This confirms the effectiveness of operation of the applied WF frequency and the active power regulation system.

WF Frequency Response Using Virtual Inertia
In the next part of the research, the frequency response of the WF was analyzed with increasing and decreasing the load. The inertia coefficients for the WF were 0, 0.5, 1, and 2, respectively. During the tests, the farm worked with the secondary frequency control mode turned off (the OPF control in Figure 3). The activation of the virtual inertia algorithm took place after setting the inertia constant greater than zero. The frequency response analysis was performed while increasing the system load from 180 MW to 210 MW. Figure 12 shows the course of frequency changes depending on the set inertia coefficients. Before the load change, the frequency in the system was close to 50 Hz. After increasing the load, its value decreased to 49.977 Hz. According to Equation (2), the maximum reaction of the virtual inertia algorithm occurs in the first moment after the disturbance, when the derivative of frequency changes in time achieves the highest value. In the analyzed case, the maximum frequency deviation with the load increase by 30 MW and inertia switched off was approximately 13 mHz. The maximum overshoot for all inertia coefficients occurred about 40 msec after the disturbance.  Along with the increase of the inertia coefficient, the overshoot amplitudes and their number are reduced. In the case of constant inertia equal to H = 2 s, the first maximum overshoot was smaller by half and amounted to ca. 6 mHz, while the second overshoot (upwards) practically did not occur.
The second of the analyzed cases, i.e., the reduction of the system load from 210 to 180 MW, resulted in an increase in frequency from 49.977 to 50.001 Hz. The course of frequency changes in the system is aperiodic, which results from the system inertia. In the absence of virtual inertia in the frequency course, there are three overshoots with the maximum value of the first of them at the level of 13 mHz (Figure 13). When the virtual inertia was increased to the value of H = 2 s, there was only one overshoot of the maximum value of 3 mHz.
Along with the increase of the inertia coefficient, the overshoot amplitudes and their number are reduced. In the case of constant inertia equal to H = 2 s, the first maximum overshoot was smaller by half and amounted to ca. 6 mHz, while the second overshoot (upwards) practically did not occur.
The second of the analyzed cases, i.e., the reduction of the system load from 210 to 180 MW, resulted in an increase in frequency from 49.977 to 50.001 Hz. The course of frequency changes in the system is aperiodic, which results from the system inertia. In the absence of virtual inertia in the frequency course, there are three overshoots with the maximum value of the first of them at the level of 13 mHz (Figure 13). When the virtual inertia was increased to the value of H = 2 s, there was only one overshoot of the maximum value of 3 mHz. Figure 13. Frequency changes during load reduction for selected inertia coefficients.

Participation of the WF in Voltage Regulation
The reactive power generation capacity of WFs makes it possible to use them in the process of voltage regulation in a network. In order to illustrate the regulation effect, the results of simulation are shown below, where the starting point corresponded to the voltage and frequency values obtained at the previous stage of the calculations (frequency-50 Hz, voltage-115 kV). In the 2nd second, the network load was increased by 30 MW and 10.5 Mvarind, and then, in the 7th second, a voltage regulation system was activated. Power balances in the system are shown in Figures 14 and 15. Figure 14. Changes in active power in the system, resulting from the farm operation in the voltage regulation mode (the symbols used correspond to those in Figure 8).
After a short-lasting transient state, the system was balanced again. The values of the active and reactive power generated by the farm did not change owing to the operator limitations, while the power balance in the system was ensured by appropriately increasing the generator output to 149 MW of active power and 16 Mvarcap of reactive power.
As a result of changes in the reactive power flow, there was a decrease in voltage at the load busses (Figure 16), and thus, the capacitive reactive power of the network also decreased ( Figure 15). The increasing generator active power caused frequency reduction to the level of 49.98 Hz (Figure 17).

Participation of the WF in Voltage Regulation
The reactive power generation capacity of WFs makes it possible to use them in the process of voltage regulation in a network. In order to illustrate the regulation effect, the results of simulation are shown below, where the starting point corresponded to the voltage and frequency values obtained at the previous stage of the calculations (frequency-50 Hz, voltage-115 kV). In the 2nd second, the network load was increased by 30 MW and 10.5 Mvar ind , and then, in the 7th second, a voltage regulation system was activated. Power balances in the system are shown in Figures 14 and 15.
Along with the increase of the inertia coefficient, the overshoot amplitudes and their number are reduced. In the case of constant inertia equal to H = 2 s, the first maximum overshoot was smaller by half and amounted to ca. 6 mHz, while the second overshoot (upwards) practically did not occur.
The second of the analyzed cases, i.e., the reduction of the system load from 210 to 180 MW, resulted in an increase in frequency from 49.977 to 50.001 Hz. The course of frequency changes in the system is aperiodic, which results from the system inertia. In the absence of virtual inertia in the frequency course, there are three overshoots with the maximum value of the first of them at the level of 13 mHz (Figure 13). When the virtual inertia was increased to the value of H = 2 s, there was only one overshoot of the maximum value of 3 mHz. Figure 13. Frequency changes during load reduction for selected inertia coefficients.

Participation of the WF in Voltage Regulation
The reactive power generation capacity of WFs makes it possible to use them in the process of voltage regulation in a network. In order to illustrate the regulation effect, the results of simulation are shown below, where the starting point corresponded to the voltage and frequency values obtained at the previous stage of the calculations (frequency-50 Hz, voltage-115 kV). In the 2nd second, the network load was increased by 30 MW and 10.5 Mvarind, and then, in the 7th second, a voltage regulation system was activated. Power balances in the system are shown in Figures 14 and 15. Figure 14. Changes in active power in the system, resulting from the farm operation in the voltage regulation mode (the symbols used correspond to those in Figure 8).
After a short-lasting transient state, the system was balanced again. The values of the active and reactive power generated by the farm did not change owing to the operator limitations, while the power balance in the system was ensured by appropriately increasing the generator output to 149 MW of active power and 16 Mvarcap of reactive power.
As a result of changes in the reactive power flow, there was a decrease in voltage at the load busses (Figure 16), and thus, the capacitive reactive power of the network also decreased ( Figure 15). The increasing generator active power caused frequency reduction to the level of 49.98 Hz (Figure 17).  Figure 9).
Switching on the voltage regulator in the WF in the 7th second of the simulation resulted in a change of the value and character of the reactive power generated by the WF (Figure 15). As a result, the character and value of the reactive power generated in the conventional generator also changed.
As a result of the regulator operation, the voltage at the load connection node rose from 113.3 kV to the set value equal to 115 kV ( Figure 16). The voltage regulation process had a negligible effect on frequency, which stabilized again after a transient state at a limitations, while the power balance in the system was ensured by appropriately increasing the generator output to 149 MW of active power and 16 Mvar cap of reactive power.
As a result of changes in the reactive power flow, there was a decrease in voltage at the load busses (Figure 16), and thus, the capacitive reactive power of the network also decreased ( Figure 15). The increasing generator active power caused frequency reduction to the level of 49.98 Hz (Figure 17). Figure 15. Reactive power changes in the system, resulting from the farm operation in the voltage regulation mode (the symbols used correspond to those in Figure 9).
Switching on the voltage regulator in the WF in the 7th second of the simulation resulted in a change of the value and character of the reactive power generated by the WF (Figure 15). As a result, the character and value of the reactive power generated in the conventional generator also changed.
As a result of the regulator operation, the voltage at the load connection node rose from 113.3 kV to the set value equal to 115 kV ( Figure 16). The voltage regulation process had a negligible effect on frequency, which stabilized again after a transient state at a slightly lower level of 49.97 Hz (Figure 17).

Conclusions
Due to the complexity of the EPS and the specific character of RESs, the investigation of WFs capabilities to participate in system regulation services is an interesting and important issue, taking into account the continuous increase in the number and power of WFs in the system. This paper proposes a simulation tool that makes it possible to assess the operation of control systems of cooperating sources and to analyze the regulatory process under different operating conditions. Participation in frequency regulation requires the creation of a regulatory reserve of active power and operation of the WF with active power below the value that could be  Figure 15. Reactive power changes in the system, resulting from the farm operation in the voltage regulation mode (the symbols used correspond to those in Figure 9).
Switching on the voltage regulator in the WF in the 7th second of the simulation resulted in a change of the value and character of the reactive power generated by the WF (Figure 15). As a result, the character and value of the reactive power generated in the conventional generator also changed.
As a result of the regulator operation, the voltage at the load connection node rose from 113.3 kV to the set value equal to 115 kV ( Figure 16). The voltage regulation process had a negligible effect on frequency, which stabilized again after a transient state at a slightly lower level of 49.97 Hz (Figure 17).

Conclusions
Due to the complexity of the EPS and the specific character of RESs, the investigation of WFs capabilities to participate in system regulation services is an interesting and important issue, taking into account the continuous increase in the number and power of WFs in the system. This paper proposes a simulation tool that makes it possible to assess the operation of control systems of cooperating sources and to analyze the regulatory process under different operating conditions. Participation in frequency regulation requires the creation of a regulatory reserve of active power and operation of the WF with active power below the value that could be Switching on the voltage regulator in the WF in the 7th second of the simulation resulted in a change of the value and character of the reactive power generated by the WF (Figure 15). As a result, the character and value of the reactive power generated in the conventional generator also changed.
As a result of the regulator operation, the voltage at the load connection node rose from 113.3 kV to the set value equal to 115 kV ( Figure 16). The voltage regulation process had a negligible effect on frequency, which stabilized again after a transient state at a slightly lower level of 49.97 Hz (Figure 17).

Conclusions
Due to the complexity of the EPS and the specific character of RESs, the investigation of WFs capabilities to participate in system regulation services is an interesting and important issue, taking into account the continuous increase in the number and power of WFs in the system. This paper proposes a simulation tool that makes it possible to assess the operation of control systems of cooperating sources and to analyze the regulatory process under different operating conditions. Participation in frequency regulation requires the creation of a regulatory reserve of active power and operation of the WF with active power below the value that could be obtained in given wind conditions. The implementation of an additional control loop reflecting the inertia of conventional generators significantly improves the WFs response during short-term frequency control. The ability to generate reactive power enables WFs to be used in voltage regulation.
The WF model presented in the paper makes it possible to study the dynamic characteristics of power systems including large wind farms. Due to the concept of one so-called reference power generation unit modeled in detail and other units replaced with simple current sources, the size and complexity of the model were reduced and the simulation time was shortened.
The simulation results presented in the paper illustrate the regulatory properties of the WF and confirm the correctness of the developed model. Taking into account their control capabilities, it can be stated that WFs could be effectively used for providing system services in terms of frequency and voltage regulation, thus contributing to an increase in the safety of operation of electrical power systems.
It can be concluded that the selection of the appropriate model, solution technique, and proper algorithms for a particular application is important for efficient modeling and can contribute significantly to developing a reliable and efficient wind-energy based power system.