Frequency Support of Smart Grid Using Fuzzy Logic-Based Controller for Wind Energy Systems

: This paper proposes a fuzzy logic-based controller for a wind turbine system to provide frequency support for a smart grid. The designed controller is aimed to provide an appropriate dynamic droop rate depending on the local measurements of each wind turbine of a wind farm such as the maximum power available and the amount of power reserve. The designed fuzzy controller depends on the rate of change of frequency (ROCOF) at the point of common coupling (PCC). The main advantage of the proposed fuzzy controller is to provide frequency support by the wind turbine system connected to a smart grid. The dynamic rate of the controller is deﬁned by the fuzzy sets considering the change in the grid’s frequency and the available reserve power. First, the response of static droop curves is investigated for di ﬀ erent scenarios of wind turbines connected to a smart grid. Then, the proposed fuzzy logic-based droop controller is integrated into the system, and its performance and response are evaluated, and the results are compared with static-droop based controller. The proposed controller is tested using Matlab \ Simulink.


Introduction
Conventional synchronous generators store kinetic energy in their rotor shaft and provide inertia to the system. The frequency of the power system is directly coupled to the rotational speed of the generator. Therefore, more rotational inertia may lead to a stable power system. Recently, the installation of renewable resources in the power system has increased. These resources are integrated into the power system using power converters, but they do not provide rotating inertia to the power system. High penetration of distributed energy resources (DER) might create instability if not properly controlled. Therefore, ancillary functions had to be added and must be achieved by the controllers of the DER. Renewable resources can provide voltage regulation and frequency support if controlled properly.
For instance, the wind energy system (WES) can be adjusted to provide frequency support by controlling the injected active power as a function of frequency. To do so, WES must maintain a certain reserve of active power, and then the reserved power can be utilized during a frequency drop.
The active power control (APC) during a disturbing condition is a challenge when it is applied to a wind farm. The APC requires a fast dynamic response range in a few seconds. Active power control involves three main sub-control objectives in a power system: the inertial control, the primary frequency control (PFC), and automatic generation control (AGC) [1,2]. Each is involved in the control of active power for a certain time in sequence order due to their timely response. One main challenge is that wind availability is uncertain, causing failure in the control loop due to wind speed variation.

Stability of the Power Grid
A power system is a complicated structure involving various elements with different dynamics. In the ideal world, loads of the power system are provided with consistent frequency and voltage. At normal conditions, all synchronous generators are synchronized to avoid up-normal fluctuation in the voltage and current, which may lead to disconnecting areas from the grid. The frequency deviation is a result of an imbalance between the load and power generated. The frequency of the gird is related to the rotor speed of the synchronous generators of the power system. The change of frequency of a network can be given as [41]: where H sys and D sys are the equivalent inertia and damping constants of all machines of the system. The change in generated power and load power are represented by ∆P G and ∆P L respectively. To ensure stability, the synchronous generator should be equipped with a droop curve in the speed controller of the turbine's torque-speed characteristic. The droop characteristic is typically set to 5% in the United States [42].

Frequency Support by a Wind Energy System
WES can be controlled to maintain certain reserve power and then, it can be used to provide APC by modifying the control loop to follow the required power reference. To do so, a droop control concept is implemented where the active power is related to the frequency of the grid.
The required active power to stabilize the grid frequency can be achieved by implementing the droop curve. The response of WES during frequency drop depends substantially on the de-loading method used to maintain the reserve power (i.e., rotor speed or pitch angle). Also, the response of the WES can be impacted by the initial operating points of WES just slightly before the occurrence of frequency deviation. Thus, the droop curve has to be selected cautiously to guarantee stability and reliable response of WES. For instance, very fast droop for a de-loaded WES that operates away from its maximum point may lead to controller instability [43,44].
The droop curve that implemented in the synchronous generator can be adapted to be used for WES. The variation in the active power of a WES can be expressed as [35]: where P WT,ava is the maximum power available that can be generated by the WES. f grid is the measured grid frequency; and f nom. the nominal grid frequency are represented respectively. Here, R is defined as the slope of the droop curve represented in percentage. The slope determines the rate of power change in WES. Small droop rate means a fast change in active power. Figure 1 demonstrates different droop curves as function of an active power change in percentage. The droop curve that implemented in the synchronous generator can be adapted to be used for WES. The variation in the active power of a WES can be expressed as [35]: where , is the maximum power available that can be generated by the WES. is the measured grid frequency; and . the nominal grid frequency are represented respectively. Here, R is defined as the slope of the droop curve represented in percentage. The slope determines the rate of power change in WES. Small droop rate means a fast change in active power. Figure 1 demonstrates different droop curves as function of an active power change in percentage. The rate of the droop controller must be selected to ensure a reliable and smooth response against the deviation of the grid's frequency. Designing the droop curve for frequency regulation depends on the initial state and the power availability of the WES. Because of the variation of wind speed, the active power produced by WES is variable. As a result, the amount of the power reserve for WES is also dynamic. Also, the ROCOF at the PCC varies depending on how much power is lost from the network. Therefore, for WES a dynamic controller is the best fit to provide adjustment to the grid's frequency.

Fuzzy Logic-Based Controller
A dynamic droop controller based on fuzzy logic is designed to support the grid's frequency of WES. The fuzzy logic controller is a set of rules are defined to perform a certain function [45]. The concept of fuzzy logic has been used in control applications of the electrical grid and power electronics [46][47][48][49][50].
Fuzzy logic is implemented to determine the slope of the droop curve depending on the available reserved power of WES and the ROCOF. For instance, when the change of frequency is high, and the power reserve is not large, the WES must support the frequency by providing active power with a slow rate. In the other hand, when the power reserve is high, WES should support the frequency by rapidly providing the required active power.
The equation that relates the grid's frequency and active power are: This fuzzy logic-based controller aims to give an appropriate dynamic rate ( ). The output of the fuzzy logic controller depends on two inputs. The inputs are the ROCOF, and the power reserved by the WES (Δ ) at the time of frequency drop. The reserved power of WES varies according to the The rate of the droop controller must be selected to ensure a reliable and smooth response against the deviation of the grid's frequency. Designing the droop curve for frequency regulation depends on the initial state and the power availability of the WES. Because of the variation of wind speed, the active power produced by WES is variable. As a result, the amount of the power reserve for WES is also dynamic. Also, the ROCOF at the PCC varies depending on how much power is lost from the network. Therefore, for WES a dynamic controller is the best fit to provide adjustment to the grid's frequency.

Fuzzy Logic-Based Controller
A dynamic droop controller based on fuzzy logic is designed to support the grid's frequency of WES. The fuzzy logic controller is a set of rules are defined to perform a certain function [45]. The concept of fuzzy logic has been used in control applications of the electrical grid and power electronics [46][47][48][49][50].
Fuzzy logic is implemented to determine the slope of the droop curve depending on the available reserved power of WES and the ROCOF. For instance, when the change of frequency is high, and the power reserve is not large, the WES must support the frequency by providing active power with a slow rate. In the other hand, when the power reserve is high, WES should support the frequency by rapidly providing the required active power.
The equation that relates the grid's frequency and active power are: This fuzzy logic-based controller aims to give an appropriate dynamic rate (R t ). The output of the fuzzy logic controller depends on two inputs. The inputs are the ROCOF, and the power reserved by the WES (∆P WT ) at the time of frequency drop. The reserved power of WES varies according to the wind velocity and the de-loading method used by the central controller of a wind plant. Also, the wake-effect plays a vital role on the power availability for each individual WES. Therefore, each WES has a different power reserve to others. Figure 2 demonstrates the implementation of fuzzy-logic with the dynamic droop controller. Normally, the wind speed, V W , can be measured to estimate the maximum power of the turbine, P WT, max . The maximum power is decreased by ∆P WT to maintain a certain reserve. Every individual WES is de-loaded to maintain a certain reserve of power (∆P WT ) to be utilized to provide APC during a drop in the grid's frequency. When grid's frequency drops below its set point, the controller injects a certain amount of active power into the grid. Then, this power, PFC, is added to the loop to produced power to form a reference of the required total wind power. The reference point, P WT , of the total power is then achieved either by using a pitch angle or rotor speed controller. wind velocity and the de-loading method used by the central controller of a wind plant. Also, the wake-effect plays a vital role on the power availability for each individual WES. Therefore, each WES has a different power reserve to others. Figure 2 demonstrates the implementation of fuzzy-logic with the dynamic droop controller. Normally, the wind speed, , can be measured to estimate the maximum power of the turbine, , . The maximum power is decreased by Δ to maintain a certain reserve. Every individual WES is de-loaded to maintain a certain reserve of power (Δ ) to be utilized to provide APC during a drop in the grid's frequency. When grid's frequency drops below its set point, the controller injects a certain amount of active power into the grid. Then, this power, PFC, is added to the loop to produced power to form a reference of the required total wind power. The reference point, , of the total power is then achieved either by using a pitch angle or rotor speed controller.

Fuzzification
The crisp values of the two inputs are mapped into fuzzy sets using the triangle membership function. Both inputs are defined using five fuzzy sets as shown in Figures 3 and 4. The sets of the inputs are defined as: very large (VL), large (L), medium (m), small (S), and very small (VS).
The absolute value of the rate of change in the grid's frequency is represented by the first membership ( Figure 3), whereas the available reserved power is represented by the second membership function ( Figure 4). In this paper, frequency drop less than 0.2 Hz is defined by the fuzzy sets as very small (VS) and above 0.8 Hz is defined as very large (VL).
In this article, wind energy systems rated at 2 MW are considered. In these wind energy systems, the amount of reserve can range from 100 kW to 1 MW (i.e., 5% to 50% of the maximum power). For simplification, the power reserve is measured and scaled down before it enters the membership function. The dynamic rate is given by the output membership function shown in Figure  5. The output is determined by the following fuzzy sets: very fast (VF), fast (F), medium (M), slow (SL) and very slow (VSL). This output is then used to determine the rate of change in injected active power given in (3). The rules of the fuzzy logic used to define the output are discussed in the following section.

Fuzzification
The crisp values of the two inputs are mapped into fuzzy sets using the triangle membership function. Both inputs are defined using five fuzzy sets as shown in wake-effect plays a vital role on the power availability for each individual WES. Therefore, each WES has a different power reserve to others. Figure 2 demonstrates the implementation of fuzzy-logic with the dynamic droop controller. Normally, the wind speed, , can be measured to estimate the maximum power of the turbine, , . The maximum power is decreased by Δ to maintain a certain reserve. Every individual WES is de-loaded to maintain a certain reserve of power (Δ ) to be utilized to provide APC during a drop in the grid's frequency. When grid's frequency drops below its set point, the controller injects a certain amount of active power into the grid. Then, this power, PFC, is added to the loop to produced power to form a reference of the required total wind power. The reference point, , of the total power is then achieved either by using a pitch angle or rotor speed controller.

Fuzzification
The crisp values of the two inputs are mapped into fuzzy sets using the triangle membership function. Both inputs are defined using five fuzzy sets as shown in Figures 3 and 4. The sets of the inputs are defined as: very large (VL), large (L), medium (m), small (S), and very small (VS).
The absolute value of the rate of change in the grid's frequency is represented by the first membership ( Figure 3), whereas the available reserved power is represented by the second membership function (Figure 4). In this paper, frequency drop less than 0.2 Hz is defined by the fuzzy sets as very small (VS) and above 0.8 Hz is defined as very large (VL).
In this article, wind energy systems rated at 2 MW are considered. In these wind energy systems, the amount of reserve can range from 100 kW to 1 MW (i.e., 5% to 50% of the maximum power). For simplification, the power reserve is measured and scaled down before it enters the membership function. The dynamic rate is given by the output membership function shown in Figure  5. The output is determined by the following fuzzy sets: very fast (VF), fast (F), medium (M), slow (SL) and very slow (VSL). This output is then used to determine the rate of change in injected active power given in (3). The rules of the fuzzy logic used to define the output are discussed in the following section.    The absolute value of the rate of change in the grid's frequency is represented by the first membership (Figure 3), whereas the available reserved power is represented by the second membership function (Figure 4). In this paper, frequency drop less than 0.2 Hz is defined by the fuzzy sets as very small (VS) and above 0.8 Hz is defined as very large (VL).
In this article, wind energy systems rated at 2 MW are considered. In these wind energy systems, the amount of reserve can range from 100 kW to 1 MW (i.e., 5% to 50% of the maximum power). For simplification, the power reserve is measured and scaled down before it enters the membership function. The dynamic rate is given by the output membership function shown in Figure 5. The output is determined by the following fuzzy sets: very fast (VF), fast (F), medium (M), slow (SL) and very slow (VSL). This output is then used to determine the rate of change in injected active power given in (3). The rules of the fuzzy logic used to define the output are discussed in the following section.

Fuzzy Inference Rules
The output of the fuzzy logic is determined by defining 25 rules, indicated in Table 1. The fuzzy inference rules are based on the deviation in frequency (Δ ) and the amount of reserve (Δ ). To evaluate the inference rules of the sets, the minimum conjunction operator is used.
Fast rate is desired if the frequency drop and the amount of reserve of WES are large. If the amount of reserved power of the WES is not large and the ROCOF is small, the low rate is preferred. The fuzzy inference rules are defined to avoid an unnecessary fast rate for very small reserves. The fuzzy inference rules are explained below:

Fuzzy Inference Rules
The output of the fuzzy logic is determined by defining 25 rules, indicated in Table 1. The fuzzy inference rules are based on the deviation in frequency (∆ f ) and the amount of reserve (∆P WT ). To evaluate the inference rules of the sets, the minimum conjunction operator is used. Fast rate is desired if the frequency drop and the amount of reserve of WES are large. If the amount of reserved power of the WES is not large and the ROCOF is small, the low rate is preferred. The fuzzy inference rules are defined to avoid an unnecessary fast rate for very small reserves. The fuzzy inference rules are explained below:

Defuzzification
The fuzzy inference rules give linguistic variables that need to be transformed into crisp values. Therefore, the defuzzification process is implemented to quantify the output of the fuzzy logic. To do so, there are different methods of defuzzification. In this article, the weighted average method is implemented. The defuzzified slope rate (i.e., 1/R t ) is defined as: where Z i represents the center of the defined function, and µ(Z i ) is the value of the membership that corresponds to Z i . Then, the output (1/R t ) of the fuzzy-logic controller is used to gives the rate of the droop in Equation (3).

Simulation Results
To study the performance of the proposed controller, the small power system is considered as shown in Figure 6. The model of the wind turbine considered in this paper is defined as type-4, where the WT is connected to the grid through a full rated back-to-back converter. The machine used in this system is based on a permanent magnet synchronous generator (PMSG). The machine side converter is controlled to extract the desired power from the wind. The active and reactive power is controlled using the grid-side inverter. The detailed model of the implemented WT system and its designed controller are presented in reference [51].
In the first study, one single WES was used to test the performance of the fuzzy logic-based controller. Different static droop curves were tested and compared with the proposed approach. The WES was set to regulate the frequency of the grid by providing the required power. The loads in the power system are supplied by the synchronous generator and the WES. The conventional synchronous generator of the system is rated at 15 MW. Its contribution to the total power of the grid is 90%. The rating of the WES used in the simulation is 2 MW. It represents about 10% of the total power delivered to the loads.
After that, the simulation was repeated for the same power system model using a wind farm, a conventional synchronous generator, and load. In this study, the wind farm consists of four single WESs. Here, the synchronous generator provides 80% of the load power, while the wind farm share is 20%. The wind systems are de-loaded to maintain a certain power reserve to be utilized for frequency regulation. Due to the wake effect, the produced wind power and the reserves are not similar for all wind systems. Therefore, some wind systems may have a much higher power reserve than others. Different scenarios were performed to test the response of the wind farm using several droop rates.
Energies 2019, 12, x FOR PEER REVIEW 7 of 16 than others. Different scenarios were performed to test the response of the wind farm using several droop rates.

Frequency Support by Single WES
To study the response of wind turbines to frequency deviation, several simulation-based studies were performed. The goal was to compare the responses of different droop curves for different ROCOF. The sensitivity to different droop gains was studied and compared with different control approaches.

The Response of WES to Large ROCOF
For this case study, the WES was producing its maximum power (2.0 MW). The power reserve of the WES was set to 1.0 MW (i.e., a 50% rate). First, the frequency regulation was achieved using the proposed fuzzy-logic controller. Then, the simulation was repeated using two different static droop rates ( = 2%, 7%). Figure 7 demonstrates the system frequency of the baseline simulation (without WES participation in frequency regulation). Figure 8 shows the frequency of the grid for the three simulation studies (fuzzy logic, = 2%, 7%). The proposed fuzzy logic-based controller provides an acceptable frequency support if compared to both static droop curves.
The rate of dynamic droop starts at 10% and then decreases to about 3% at the beginning of the incident. After a few seconds, it reaches 2% (very fast), when the frequency drops to its minimum value as shown in Figure 9. For 7% static droop, the WES has a very slow response. On the other hand, the response of WES with 2% static droop is very fast.
As defined in the fuzzy logic, the dynamic droop controller should react very quickly when the power reserve and ROCOF are large. Consequently, the response of the WES with dynamic droop is quite similar to the one with the static droop curve of 2%. The active power of the WES and the rotation speed of the turbine's shaft during the response to frequency drop are shown in Figures 10  and 11.

Frequency Support by Single WES
To study the response of wind turbines to frequency deviation, several simulation-based studies were performed. The goal was to compare the responses of different droop curves for different ROCOF. The sensitivity to different droop gains was studied and compared with different control approaches.

The Response of WES to Large ROCOF
For this case study, the WES was producing its maximum power (2.0 MW). The power reserve of the WES was set to 1.0 MW (i.e., a 50% rate). First, the frequency regulation was achieved using the proposed fuzzy-logic controller. Then, the simulation was repeated using two different static droop rates (R = 2%, 7%). Figure 7 demonstrates the system frequency of the baseline simulation (without WES participation in frequency regulation). Figure 8 shows the frequency of the grid for the three simulation studies (fuzzy logic, R = 2%, 7%). The proposed fuzzy logic-based controller provides an acceptable frequency support if compared to both static droop curves.       The rate of dynamic droop starts at 10% and then decreases to about 3% at the beginning of the incident. After a few seconds, it reaches 2% (very fast), when the frequency drops to its minimum value as shown in Figure 9. For 7% static droop, the WES has a very slow response. On the other hand, the response of WES with 2% static droop is very fast.

Response of WES to Small ROCOF
In this scenario, the WES was maintaining a reserve of 150 kW. This reserve was achieved by the controller of the rotor speed (using machine side converter). For comparison, the frequency support was provided using the proposed approach (fuzzy-logic) and two constant rate droops (i.e., = 2% and 7%).
The measured frequency of the power system for the three droops (dynamic droop, = 2% and 7%) is shown in Figure 12. The plot shows the proposed droop controller supports the frequency. The rate of the proposed droop controller is shown in Figure 13. The rate starts at the minimum value, which is 10%, and changes to about 5% in the beginning of the frequency drop. After that, it oscillates and returns to 10% when a new steady state value is achieved.
In this simulation, the response of the WES using constant droop of 7% is reasonable. In contrast, the response with a constant curve of 2% is quick. As can be noticed from Figure 14, the rotor speed of the WES oscillates aggressively. This high oscillation may lead to instability in the controller of the machine side converter. Also, some stresses and mechanical loading can be observed on the wind turbine. Because of the limited reserve and insignificant drop in the frequency, the droop rate of the controller has to be slow. Thus, the grid frequency can be achieved by the proposed droop controller, which in this case study is very close to the response of seven percent droop curve. The active power produced by the WES during the frequency regulation for all three studies is demonstrated in Figure 15.

Response of WES to Small ROCOF
In this scenario, the WES was maintaining a reserve of 150 kW. This reserve was achieved by the controller of the rotor speed (using machine side converter). For comparison, the frequency support was provided using the proposed approach (fuzzy-logic) and two constant rate droops (i.e., R = 2% and 7%).
The measured frequency of the power system for the three droops (dynamic droop, R = 2% and 7%) is shown in Figure 12. The plot shows the proposed droop controller supports the frequency. The rate of the proposed droop controller is shown in Figure 13. The rate starts at the minimum value, which is 10%, and changes to about 5% in the beginning of the frequency drop. After that, it oscillates and returns to 10% when a new steady state value is achieved.

Response of WES to Small ROCOF
In this scenario, the WES was maintaining a reserve of 150 kW. This reserve was achieved by the controller of the rotor speed (using machine side converter). For comparison, the frequency support was provided using the proposed approach (fuzzy-logic) and two constant rate droops (i.e., = 2% and 7%).
The measured frequency of the power system for the three droops (dynamic droop, = 2% and 7%) is shown in Figure 12. The plot shows the proposed droop controller supports the frequency. The rate of the proposed droop controller is shown in Figure 13. The rate starts at the minimum value, which is 10%, and changes to about 5% in the beginning of the frequency drop. After that, it oscillates and returns to 10% when a new steady state value is achieved.
In this simulation, the response of the WES using constant droop of 7% is reasonable. In contrast, the response with a constant curve of 2% is quick. As can be noticed from Figure 14, the rotor speed of the WES oscillates aggressively. This high oscillation may lead to instability in the controller of the machine side converter. Also, some stresses and mechanical loading can be observed on the wind turbine. Because of the limited reserve and insignificant drop in the frequency, the droop rate of the controller has to be slow. Thus, the grid frequency can be achieved by the proposed droop controller, which in this case study is very close to the response of seven percent droop curve. The active power produced by the WES during the frequency regulation for all three studies is demonstrated in Figure 15.   In this simulation, the response of the WES using constant droop of 7% is reasonable. In contrast, the response with a constant curve of 2% is quick. As can be noticed from Figure 14, the rotor speed of the WES oscillates aggressively. This high oscillation may lead to instability in the controller of the machine side converter. Also, some stresses and mechanical loading can be observed on the wind turbine. Because of the limited reserve and insignificant drop in the frequency, the droop rate of the controller has to be slow. Thus, the grid frequency can be achieved by the proposed droop controller, which in this case study is very close to the response of seven percent droop curve. The active power produced by the WES during the frequency regulation for all three studies is demonstrated in Figure 15.

Frequency Support by Wind Farm
In this study, an electrical system shown in Figure 6 is simulated. The electrical grid consists of one conventional synchronous generator with its governor system, wind power plant, and a large load. For the simulation time constraint, four single WESs are considered to represent the wind farm. The power supplied to the load is distributed between the wind farm (20%) and the conventional generator (80%).

Frequency Support by Wind Farm
In this study, an electrical system shown in Figure 6 is simulated. The electrical grid consists of one conventional synchronous generator with its governor system, wind power plant, and a large load. For the simulation time constraint, four single WESs are considered to represent the wind farm. The power supplied to the load is distributed between the wind farm (20%) and the conventional generator (80%).

Frequency Support by Wind Farm
In this study, an electrical system shown in Figure 6 is simulated. The electrical grid consists of one conventional synchronous generator with its governor system, wind power plant, and a large load. For the simulation time constraint, four single WESs are considered to represent the wind farm. The power supplied to the load is distributed between the wind farm (20%) and the conventional generator (80%).
The response of every WES was observed using the proposed controller. A reserve of 2000 kW was maintained by the wind farm using a method proposed in reference [52]. The fuzzy logic-based controller was implemented to provide frequency support. Every individual WES was assigned to maintain a certain reserve that is different from others. The total power reserve was divided among all WESs as ∆P WT1 = 250 kW, ∆P WT2 = 350 kW, ∆P WT3 = 600 kW, ∆P WT4 = 800 kW.
The frequency is measured at the point as shown in Figure 16. The proposed dynamic controller provides support to the grid's frequency. The frequency goes to the minimum point (nadir) within 3 s and then it starts to return to new steady-state value. The rates of the dynamic controller for all WES are shown in Figure 17. The rates of wind turbines 1 and 2 are slower than the rates of wind turbines 3 and 4; because of the small amount of reserve available in 1 and 2. The power produced by the synchronous generator and the wind farm is shown in Figures 18 and 19. The power produced by each WES is demonstrated in Figure 18. The power of wind turbines 3 and 4 changes rapidly compared to the power of wind turbines 1 and 2 as shown in Figure 19. Also, the rotational speed of each turbine is shown in Figure 20. In this study, the controller of the rotor speed and the pitch angle actuator are activated, and the WES is tracking the reference signal given by the fuzzy logic controller as demonstrated in Figure 21.
The frequency is measured at the point as shown in Figure 16. The proposed dynamic controller provides support to the grid's frequency. The frequency goes to the minimum point (nadir) within 3 s and then it starts to return to new steady-state value. The rates of the dynamic controller for all WES are shown in Figure 17. The rates of wind turbines 1 and 2 are slower than the rates of wind turbines 3 and 4; because of the small amount of reserve available in 1 and 2. The power produced by the synchronous generator and the wind farm is shown in Figure 18 and Figure 19. The power produced by each WES is demonstrated in Figure 18. The power of wind turbines 3 and 4 changes rapidly compared to the power of wind turbines 1 and 2 as shown in Figure 19. Also, the rotational speed of each turbine is shown in Figure 20. In this study, the controller of the rotor speed and the pitch angle actuator are activated, and the WES is tracking the reference signal given by the fuzzy logic controller as demonstrated in Figure 21.   The frequency is measured at the point as shown in Figure 16. The proposed dynamic controller provides support to the grid's frequency. The frequency goes to the minimum point (nadir) within 3 s and then it starts to return to new steady-state value. The rates of the dynamic controller for all WES are shown in Figure 17. The rates of wind turbines 1 and 2 are slower than the rates of wind turbines 3 and 4; because of the small amount of reserve available in 1 and 2. The power produced by the synchronous generator and the wind farm is shown in Figure 18 and Figure 19. The power produced by each WES is demonstrated in Figure 18. The power of wind turbines 3 and 4 changes rapidly compared to the power of wind turbines 1 and 2 as shown in Figure 19. Also, the rotational speed of each turbine is shown in Figure 20. In this study, the controller of the rotor speed and the pitch angle actuator are activated, and the WES is tracking the reference signal given by the fuzzy logic controller as demonstrated in Figure 21.

Conclusions
In this article, frequency regulation was provided by a wind farm using a fuzzy logic-based controller. The proposed droop controller maintained stable and proper droop rates while providing adequate frequency support. The droop controller is designed based on the available power of the WES and the rate of change in the grid's frequency at the PCC. The fuzzy logic improved the performance of the dynamic controller. The difference between the nadir point and the nominal value of the frequency is decreased. The constant curve does not work well for WES application because of the variable nature in wind velocity. Even though the fast rate (static) provides a very sharp response against frequency drop, it could lead to instability to the machine-side controller that is responsible for rotational speed. Also, it may increase the stresses and mechanical loading for the structure of the WES. Thus, having a dynamic droop rate that changes based on the availability of wind power and the rate of change of the frequency ensures a stable and smooth response of WES during frequency deviation.

Conclusions
In this article, frequency regulation was provided by a wind farm using a fuzzy logic-based controller. The proposed droop controller maintained stable and proper droop rates while providing adequate frequency support. The droop controller is designed based on the available power of the WES and the rate of change in the grid's frequency at the PCC. The fuzzy logic improved the performance of the dynamic controller. The difference between the nadir point and the nominal value of the frequency is decreased. The constant curve does not work well for WES application because of the variable nature