**2. Isolated WDPS Modelling**

Figure 1 shows the WDPS presented in this paper. All the parameters of the presented WDPS are shown in Appendix A. The DG supplies controlled active and reactive power and the WTG supplies uncontrolled active power. The consumer load consumes uncontrolled active power and the DL consumes controlled active power. The FESS consumes/generates controlled active power. The state opened/closed of the WTG circuit breaker IT defines the DO/WD operation mode of the WDPS.

The MATLAB–Simulink framework was used to model and simulate theWDPS, and Figure 2 shows the WPDS Simulink schematic. The next subsections describe the modelling of the WDPS components.

**Figure 2.** Simulink-SimPowerSystem of the WPDS with Dump Load and Flywheel Energy Storage.

#### *2.1. The Diesel Generator Model.*

The DG consists of a Diesel Engine (DE) and a Synchronous machine (SM), and its rated power is 300 kVA. The DE converts the fuel energy into the shaft mechanical power *PD* and the SM converts the DE mechanical power into electrical power. The SM provides the isolated grid sinusoidal voltage waveform. By following the command of its automatic voltage regulator, the SM provides reactive power to the WDPS, which is necessary to keep the system voltage module *V* within the allowable limits. The relationship between the voltage waveform frequency *f* (Hz) and the shaft speed of the DE/SM ω (rad/s) is:

$$
\omega = 2\pi f \text{\(p\)}\tag{1}
$$

where *p* is the SM number of pole pairs.

To control the system frequency, a speed governor controls the speed of the DE. The speed governor comprises a speed regulator and an actuator. In this article, the speed regulator applies a Proportional Integral derivative (PID) type algorithm to the DE speed error (<sup>ω</sup>*ref –* ω*d* in Figure 2, where ω*re*f is the DE reference speed and ω*d* the actual speed ω) so the DE speed control is isochronous, that is, in steady state the DE speed is rated one (therefore rated system frequency) provided that the electrical load is within 0–300 kW range. The actuator converts the output of the speed regulator into a proper signal to control a fuel valve. In this way, the incoming fuel rate to the DE is adjusted to control the DE produced mechanical power to the needed value to achieve the rated speed in the DE.

In this article, the SM electrical part is modelled by a sixth-order model and the SM automatic voltage regulator model is the IEEE type 1. The SymPowerSystem blockset [16] provides both models.

The models for the DE and its speed regulator described in [17] are followed. The DE model consists of a gain which relates the DE mechanical power with the rate of fuel consumed and a transport lag to model the firing delay between pistons. A second order system models the actuator. The DG inertia constant *HDG* is 1.75 s.

#### *2.2. The Wind Turbine Generator Model*

The 275 kW WTG comprises a fixed pitch Wind Turbine (WT) driving through a gearbox a Squirrel Cage Induction Generator (SCIG). The WT converts the wind power into shaft mechanical power and the SCIG converts the WT mechanical power into electrical power. The fixed pitch WT model follows the one in ref. [18] and is included in the Wind Turbine block of Figure 2. The model consists of the wind turbine power curves that relate the mechanical shaft power produced by the WT *PT-MEC* with the wind speed (v\_speed) and the WT shaft speed ω*t*. The output of the Wind Turbine block is the torque applied to the SCIG ( *Tm*= *PT-MEC*/ω*t)*

For generator operation, the SCIG speed range is very limited, within a narrow range between 1 and 1.02 of the synchronous speed [19], and for this reason, this WT-SCIG type is called constant speed WTG. Therefore this WT-SCIG type does not allow to adjust its rotational speed to maximize the capture of wind energy [20]. Other types of WTGs used in WDPS [21–24] allow variable speed operation to maximize the capture of wind energy by performing a maximum power point tracking technique. In [12,21–23], the WTG equips a synchronous generator and an AC-DC-AC electronic power converter, which connects the synchronous generator to the grid. In [24], the WTG equips a double fed IG with its stator connected to the grid and its rotor connected to an AC-DC-AC converter through a slip ring. Additionally, as the used WT is a fixed pitch blade type, *PT-MEC* is mainly a function of the cube of the wind speed [25]. The wind speed is quasi-random, so that the WT-SCIG behaves as an uncontrolled active power supplier. In spite of the previously commented disadvantages, the WT-SCIG fixed pitch constant speed type used in this article has remarkable features for the remote locations of WDPS, such as robust construction, simple maintenance and low cost. The used WT-SCIG type is more robust than [12,21–24] as it does not equip an electronic power converter and has less maintenance than [24], as the SCIG does not have slip rings.

The WT-SCIG has two additional positive features. First, as the SCIG stator is directly connected to the isolated grid, the WTG inertia also participates in the moderation of the WDPS frequency changes. This property is not available in [12,21–23] as the double power converter uncouples the WTG- electrical generator from the grid. Second, as in the WTG-SCIG working speed range the SCIG torque is proportional to its slip ( ω*t –* ω in per unit values) [25], the WTG-SCIG improves the system frequency by providing a damped response [26].

The 25 kVA capacitor bank of Figure 2 provides reactive power to improve the WTG-SCIG power factor. The SymPowerSystem blockset [16] provides the SCIG model. The SCIG electrical model is a fourth-order one. Typical WTG inertia constants *H W* range between 2–6 s [27] for low–high power WTGs. The used WTG is a low power one, so that *H W* = 2 s is set for this parameter.

### *2.3. The Dump Load Model*

The DL in a WDPS is actuated when a WTG power excess exists. In the WD mode, the WDPS control commands the DL to dump the power needed to ensure a DG minimum positive load, avoiding a DG reverse power. In the WO mode, the WDPS control commands the DL to consume the WTG power excess ( *PT-PL*) to regulate system frequency [23,28]. The Figure 2 DL consists of eight three-phase resistors connected in series with solid-state switches, which connect/disconnect the resistors at the zero crossing in order to prevent harmonic injection. The values of the resistors follow a binary progression, with values *R*, *R*/2, *R*/2<sup>2</sup> ... *R*/27. If *P*0 is the rated power of the resistor of value *R* (*P*0 = *Vn* <sup>2</sup>/*R*, where *Vn* is the rated system voltage), the eight resistor's rated powers are *P*0, 2·*P*0, <sup>2</sup>2·*P*0, ... , <sup>2</sup>7·*P*0. Being *IJ* the state closed(1)/opened(0) of the three phase switch associated with the resistor of power 2*J* ·*P*0, the power consumed by the DL *PD* if the system voltage is the rated value, can be expressed as:

$$P\_D = (I\_0 + I\_1 \cdot 2^1 + \dots \cdot + I\_7 \cdot 2^7) \cdot P\_0 \tag{2}$$

According to Equation (2), *PD* can be varied discretely in steps of *P*0 from 0 to 255· *P*0. *P*0 was chosen to be 1.4 kW, so the DL rated power PD-NOM is 357 kW (1.4·255). The DL control block of Figure 2 determines which resistors have to be connected to consume the assigned *PD-REF*. The details of the DL implementation in Simulink can be found in [18].

#### *2.4. The Flywheel Energy StorageSystem Model*

A low speed (LS) FESS type [15] was included as a short term ESS in the WDPS. The LS-FESS consists of a steel flywheel driven by an electrical asynchronous machine (ASM). Features such as high power/torque, robust construction, low cost and wide availability are determinant to select an ASM for WDPS. The simple manufacturing and low cost are determinant to select a steel flywheel [29]. The rotating flywheel stores kinetic energy. The ASM converts the kinetic energy into electrical energy and the electrical energy into kinetic energy when it works as a generator/motor respectively. The flywheel has the moment of inertia *I*, and its speed range is from a minimum ω*r*-min to a maximum ω*r-*max rotating speed, so the maximum available kinetic energy, *Ec-max* is:

$$E\_{c-\text{max}} = \frac{1}{2}I(\omega\_{r-\text{max}}^2 - \omega\_{r-\text{min}}^2) \tag{3}$$

As Figure 2 shows, the FESS includes two electronic power converters that share a common DC-link built with a bank of capacitors to connect the ASM to the isolated grid. The machine-side converter of Figure 2 controls the ASM in order to keep a constant DC-voltage in the capacitor bank. Therefore, if the capacitor bank voltage rises/falls, this converter discharges/charges the capacitor bank by commanding motor/brake torque to the ASM, so that the flywheel accelerates/decelerates. The rated DC-link voltage and capacitor bank capacitance are 800 V and 4.7 mF, respectively. The grid-side converter of Figure 2 connects the constant voltage DC-link to the isolated grid and is controlled to exchange the necessary active and reactive powers with the grid by setting the corresponding current references. In the present application, this converter works with the power factor equal to unity, so its reactive power reference is zero. As Figure 2 shows, the grid-side converter uses an inductance L-filter to limit the harmonic injection and an isolation transformer is used for coupling with the isolated grid.

The ASM dynamic control is achieved by using Field Oriented Control (FOC). The FOC decouples the control of flux and torque of the ASM [30] and uses a d*q*-reference frame where the *d* axis is aligned with the rotor flux vector Ψ*<sup>r</sup>*. The rotor flux is:

$$
\Psi \prime\_r = L\_{\text{on}} i\_{\text{nrr}} \tag{4}
$$

where *imr* and *Lm* are the magnetizing current and inductance respectively. The relation between *imr* and the stator direct current *isd* is given by:

$$T\_r \frac{di\_{mr}}{dt} + i\_{mr} = i\_{sd} \tag{5}$$

where *Tr* is the rotor time constant and *Tr* = *Lr*/*Rr*, where *Rr* and *Lr* are the rotor resistance and inductance respectively. Therefore, *isd* produces the rotor flux Ψ*<sup>r</sup>*, but with slow dynamics due to the high value of *Tr*. The ASM electromagnetic torque *Tel* is proportional to the product of the rotor flux and the stator quadrature current *isq* [31]:

$$T\_{cl} = \frac{3}{2} \frac{L\_m}{L\_r} L\_m i\_{mr} i\_{sq} \tag{6}$$

where 3/2 constant considers the 2–3 axes scaling. The FOC keeps the rotor flux constant (*imr* = *isd* = constant) at its optimal value and the required *Tel* is obtained by setting the corresponding quadrature current *isq* according to Equation (6). If all the ASM losses are neglected (stator and rotor resistance and stator iron losses), the exchanged ASM active power can be approximated to the product of the electromagnetic torque *Tel* and the ASM rotor speed ω*r*. Also neglecting the FESS double power converter losses, the exchanged FESS active power *PS* is approximately:

$$P\_S \approx T\_{cl} \,\alpha\_r \tag{7}$$

The high flywheel inertia allows considering ω*r* speed constant when it is compared to the electric dynamics. Hence, the FESS exchanged power is controlled by setting the needed *isq.*

The LS-FESS was sized to store a maximum available energy of 18,000 kJ, to supply the 150 kW FESS rated power (*PS-NOM*) during 2 min and with the flywheel operating speed range ω*r-min*–ω*r-max* within 1500–3300 rpm [8], so Equation (3) gives 380 kg·m<sup>2</sup> for the flywheel moment of inertia I. The selected ASM is a standard 50 Hz one, with a single pole pair and 300 kW of rated power [8]. The model of the 300 kW ASM-FESS uses the block included in the SimPowerSystems blockset for Simulink [16] and its electrical model is a fourth-order one. The flywheel 380 kg m<sup>2</sup> inertia is included in the inertia parameter of the FESS-ASM SimPowerSystems model to simulate the flywheel.

#### **3. The WTG Power Excess Situation and the DL and FESS-o**ff **Case Simulation**

In the WD mode of the Figure 1 WDPS, the active power produced by the WTG can exceed the load consumption (*PT* > *PL*). If there is no ESS and no DL in the WDPS to consume additional power, the DE should consume the active excess power to balance active powers in the system and thus to control system frequency. However, the DE speed governor cannot command the DE to consume power. In the extreme case of no fuel injection into the DE cylinders, the DE power will be negative (*PDE* < 0) and will consist of losses from compression in the cylinders, shaft, etc., but the DE losses are not controllable. Therefore, if the WTG power excess surpasses the DE losses, the system frequency will rise without control. This frequency increasing is better observed by analyzing the equation which relates the active powers of the DE (*PDE*), WTG (*PT*) and load (*PL*) with the DG speed (ω)/frequency (*f*):

$$P\_{DE} + P\_T - P\_L = J\omega \frac{d\omega}{dt} \tag{8}$$

In Equation (8), the power exchanged by the generators (*PDE* and *PT*) are positive when produced and the consumer load power *PL* positive when consumed, *J* is the DG moment of inertia and the losses are neglected. Since the left side of Equation (8) is positive in the WTG power excess case and *J* and ω are positive, this implies *d*ω/*dt* > 0 and a continuous uncontrolled frequency increase.

All DGs have some shut-down alarms, that is, alarms that, when activated, trip the SM circuit breaker (CB) (IG in Figure 1) and shut down the DE by cutting the fuel supply to the DE cylinders. Among these alarms is the overspeed alarm, which avoids the uncontrolled acceleration of the DG and therefore excessive centrifugal forces that could damage the rotating parts of the DG. The overspeed alarm is activated when the DG speed is greater than the overspeed setpoint, which is normally 1.1 the DG rated speed. Additionally, all DG have some SM-CB trip alarms, among them the reverse power alarm. This alarm is activated when the DG is connected in parallel with other generators and the DG output power is negative (the SM is behaving as a motor) during a certain time interval. During a DG reverse power activation, the system frequency is supported in the rated value by the other supplying generators.

When there is a WTG power excess (*PT* > *PL*), the DG output power is negative and at the same time the system frequency increases, so that this situation could be confused with an overspeed alarm if the overspeed set point is reached and therefore the protection control will shut down the DG. The WTG power excess case could also be confused with the reverse power alarm if the conditions to active this trip alarm occur. In both cases, the SM-CB will be open and there will not be supply for the consumer load. However, to prevent the discontinuation in the power supply in the WTG power excess case, the solution is to open the WTG CB (IT in Figure 1) and allow the DG to continue supplying the loads.

The above solution is shown in Figures 3–5, where the Figure 2 WDPS, with both the DL and FESS turned <sup>o</sup>ff, is simulated from an initial state where the DG produces 25 kW, the WTG produces 50 kW for a 7 m/s wind speed and the load consumes 75 kW. Figures 3 and 4 show the system frequency and RMS voltage both in pu. Figure 5 shows the active powers in kW for the WTG, DG and load and these active powers are plotted positive/negative when produced/consumed, so that the active

powers sum is null at steady state. At *t* = 0.2 s a wind speed step of +2 m/s is applied and consequently the WTG produced power increases. Soon, the WTG power surpasses the load consumption, the DG power becomes negative, the system frequency increases permanently and the WDPS becomes unstable. As Figure 3 shows, when the frequency reaches 1.08 pu (before the 1.1 pu overspeed alarm set point) at *t* = 2.935 s, the control system orders a trip of the WTG 3-phase breaker (3PB) of Figure 2, disconnecting the WTG to protect the WDPS and ensure the power supply continuity. Figure 4 shows increasing voltage oscillations before *t* = 2.935, which corresponds to an unstable system, and presents a strong peak after the tripping of the WTG-3PB. After the WTG disconnection, Figure 3 shows that the system frequency recovers the rated value due to the action of the DE speed governor and Figure 5 shows that in the steady state the DG supplies all the active power (75 kW) to the load.

**Figure 3.** WDPS frequency per unit for the DL and Flywheel Energy Storage System (FESS)-off case.

**Figure 4.** Root Mean Square (RMS) Voltage per unit for the DL and FESS-off case.

**Figure 5.** Wind turbine generator (WTG), diesel generator (DG) and load active powers (kW) for the DL and FESS-off case.

#### **4. The WTG Power Excess Situation in the Only-DL**/**Only-FESS Cases**

#### *4.1. The DL and FESS Control*

To avoid the DE reverse power and the WDPS frequency increasing that causes the WTG power excess, the WDPS control must command the FESS or DL or both to consume controlled power so that the required DG power to balance the WDPS active power is positive. With a positive DE power, the set speed governor + DE can regulate the WDPS frequency.

In the DL-only case, Equation (8) in steady state (*d*ω/*dt* = 0) converts into:

$$P\_{\rm DE} = P\_L + P\_{\rm DL} - P\_T \tag{9}$$

where *PDL* is the DL consumed power and using for *PDL* the same consumer load sign criteria. As the DL rated power (357 kW) is greater than the WTG rated power (275 kW), Equation (9) indicates that it is possible, by controlling the DL consumed power, to obtain a positive *PDE* in steady state, even with null load (*PL* = 0). In this article, the DL dumped power follows the *PINV* output shown in Figure 6 (*PD-REF* = *PINV*). The Figure 6 control is an integral one, and its aim is to keep the DG active power (*PSM*) in the reference range 15–21 kW (5–7% *PDG-NOM*) in steady state when a WTG active power excess exists. The control output *PINV* increases when the DG power *PSM* is less than 15 kW and decreases its value when *PSM* is greater than 21 kW. In Figure 6, the integral control is limited to the DL power limits [0, *PD-NOM*]. The integral constant *KI* of Figure 6 was tuned taking into account the used DL discrete nature. To follow *PINV*, the DL control must order the DL resistors to switch on and <sup>o</sup>ff, and this switching produces system voltage variations, as the following simulations graphics show. Therefore, excessive switching must be avoided.

**Figure 6.** DL/FESS integral control schematic.

In the only-FESS case, Equation (9) also applies if *PDL* is substituted by the power exchanged by the FESS *PS*. As the FESS rated power is 150 kW, the FESS cannot guarantee a positive *PDE* in steady state if the WTG power excess surpasses 150 kW. In the only-FESS case, the reference power *PS-REF* to be consumed by the FESS is given by the following equation:

$$P\_{S-REF} = K\_p \varepsilon\_f + K\_D \frac{d\varepsilon\_f}{dt} + P\_{INV} \tag{10}$$

where a PD regulator with the frequency error *ef* as input (*ef* = *f* − *fNOM*, where *f*/*fNOM* are the current/rated WDPS frequency) is added to the formerly explained term *PINV*. *KP* and *KD* are the PD proportional and derivate constants. The integral control limits of *PINV* are [0, *PS-NOM*] in this only-FESS case. The PD regulator supports frequency regulation, improving the transients of the WDPS and it is compatible with the PID regulator inside the DE speed governor. *KP* and *KD* were adjusted to moderate the system frequency over/under shooting. Equation (10) makes use of the fast-acting power electronic converter with PWM unlike the DL, which uses the zero-crossing connection of the resistors and this results in slower actuation. Moreover, the DL power is in discrete steps and it may lead to excessive voltage variations as explained previously.

#### *4.2. The Simulation Tests for the Only-DL and Only-FESS Cases*

The WDPS initial state for this section's simulations is the same as the previous Section 3. The simulation results are presented in Figures 7–11. The plots of Figures 7 and 8 show the system frequency and RMS voltage in per unit. Graphs that show the active powers in kW are Figure 9 for the DG and WTG and Figure 10 for DL, consumer load and FESS. The same sign criterion of Section 3 is applied to the active powers. The WDPS response is plotted with dot line for the only-DL case and in solid line for the only-FESS case.

As in the previous section, a +2 m/s wind speed step is applied at *t* = 0.2 s, and the WTG produced power increases. The DG decreases its power commanded by the speed governor, and when it is under the minimum 15 kW level, the Figure 6 integral control commands the DL/FESS to start increasing its power consumption. The DL/FESS increases its power so that the DG power keeps positive and, therefore, the set speed governor +DE can regulate the system frequency. In the steady state, the WTG produces 143 kW, the load consumes 75 kW, the DG produced power is 18.5/19 kW for the DL/FESS cases (a value inside the 15–21 kW set interval) and the DL/ FESS consumes 87.5/87 kW (minimum DG load plus WTG power excess). The initial active power excess leads the frequency to increase and, later on, the frequency undershoots. The fpu minimum–maximum are 0.999–1.0083 pu and 0.9989–1.0042 pu for the DL and FESS cases, respectively. The fpu oscillations are higher in the DL case than in the FESS case. The voltage also oscillates, its minimum–maximum are 0.9859–1.0116 and 0.9944–1.0042 pu for the DL and FESS cases, respectively. The voltage oscillations are bigger in the DL case. The FESS case also obtains less oscillation (better relative stability) in the active powers of the WTG and DG. This a consequence of using fast PWM with high resolution in the FESS converter. In both cases, the frequency maximum is much less than 1.08 pu, so the Figure 2 WTG-3PB is not tripped and the voltage variations are also much smaller than the ones shown in the DL and FESS-o ff case.

At *t* = 8 s, the load is increased by 100 kW as Figure 10 shows. The speed governor orders the DG to increase its power production above 21 kW, and the integral control of Figure 6 commands DL/FESS to decrease its consumed power. In DL case, the decreasing consumption of power stops when its power reaches zero and remains at that value, so that the WDPS frequency is regulated solely by the DE speed governor. In the FESS case, the FESS power has small positive peaks due to the PD regulator, which means that FESS supplies power during a brief interval until it reaches zero after the transient, so the FESS briefly supports the DE speed governor. In steady state, the DG supplies 32 kW, the WTG remains supplying the same 143 kW (for the 9 m/s wind speed), the load consumes 175 kW, and the DL/FESS consumption is 0 kW. During the +100 kW transient, the frequency decreases due to the deficit of active power, with a minimum–maximum of 0.9943–1.0014 and 0.9963–1.0002 pu for the DL and FESS cases respectively, being the frequency transient better in the FESS case. The WTG positive peak after the +100 kW of Figure 9 is due to an instantaneous increase in the SCIG slip as the system frequency falls faster than the WTG-SCIG speed. This WTG positive peak counteracts partly the active power shortage, so the WTG-SCIG provides damping to the system. The voltage minimum–maximum are 0.9754–1.0157 and 0.9874–1.011 pu for the DL and FESS cases respectively, so the FESS frequency support also results in a better voltage transient. The FESS case also provides less oscillatory waveforms and, therefore, better relative stability for the WTG and DG active powers.

**Figure 8.** RMS Voltage per unit for the only-FESS and only-DL cases.

**Figure 9.** WTG and DG active powers (kW) for the only-FESS and only-DL cases.

**Figure 10.** DL, FESS and load active powers (kW) for the only-FESS and only-DL cases.

**Figure 11.** Per unit asynchronous machine (ASM) speed and direct and quadrature currents.

Table 1 summarizes the voltage and frequency variations in percentage for the presented simulations in the three considered cases.


**Table 1.** Frequency and voltage variations in percentage in the three considered subcases.
