Optimized Type-2 Fuzzy Frequency Control for Multi-Area Power Systems

The objective of this study is minimizing the frequency deviation due to the load variations and fluctuations of renewable energy resources. In this paper, a new type-2 fuzzy control (T2FLC) approach is presented for load frequency control (LFC) in power systems with multi-areas, demand response (DR), battery energy storage system (BESS), and wind farms. BESS is used to reduce the frequency deviations caused by wind energy, and DR is utilized to increase network stability due to fast load changes. The suggested T2FLC is online tuned based on the extended Kalman filter to improve the LFC accuracy in coordination of DR, BESS, and wind farms. The system dynamics are unknown, and the system Jacobian is extracted by online modeling with a simple multilayer perceptron neural network (MLP-NN). The designed LFC is evaluated through simulating on 10-machine New England 39-bus test system (NETS-39b) in four scenarios. Simulation results verifies the desired performance, indicating its superiority compared to a classical PI controllers, and type-1 fuzzy logic controllers (FLCs). The mean of improvement percentage is about 20%.


I. INTRODUCTION A. LITERATURE REVIEW
As the complexity of the power system and the uncertainties and disturbances in the control and power system operation increase, new control mechanisms are needed to achieve frequency regulation and improve system reliability. In advanced power systems, LFC plays a basic role in improving the reliability of the system through power exchanges between areas. For this reason, many studies were conducted on frequency control, and various control methods were adopted [1]- [3]. For example, [4] suggests a distributed predictive LFC in a system with multiple areas. Authors of [5], apply an adaptive neural fuzzy logic system (FLS) The associate editor coordinating the review of this manuscript and approving it for publication was Shun-Feng Su .
to two-area hydreulic and thermal power systems to improve the LFC problem. In [6], the LFC of the power system was controlled by electric vehicles. Authors of [7] controlled the power generation of a power plant system with four areas by applying the artificial neural network (NN). In [8] a distribute predictive LFC is presented for a wind farm power system. This paper considers the constraints such as wind speed generation rate constraint (GRC), pitch angle of the blade, and load constraints for each area. In [9], the parameters were optimally adjusted by designing an internal model controller and PID LFC, which investigated the performance and robustness to the changes in power system parameters in the restructured environment. In all cases, the control of generation side is used to adjust the frequency, leading to high cost, reduced security, and reliability. It should be noted that unbalanced conditions between generating power and VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ load lead to a rapid change in frequency, which may control the frequency, and frequency of the primary and secondary loads cannot take the frequency back to its normal level. Therefore, in this case, a third frequency control loop called emergency control should be used, which is the last option to offset the high-risk errors, in which case the demand side load is used to adjust the frequency and prevent network collapse [10]. In such cases, the frequency relay operation interrupts the loads. Such control method should be considered in early future, because the demand side might be more effective in controlling the system. By increasing the number of consumers, the existence of renewable energy (RE) sources with alternating and variable outputs like wind farms creates large random fluctuations in the balance between generation and load which might affect frequency instability significantly [11], [12]. Nowadays, DR has attracted a lot of attention. By expanding these applications, customers can coordinate in the operation of the system similar to the generation side [13]. In [14], the frequency was adjusted by the frequency control based on DR when the conventional frequency control cannot be used. In another study, [15] explored the collaborative role of secondary loop control with DR. This study used the demand side loads to control sudden load disturbances, and the generator side controller was used for the other disturbance types like changes of wind power. Furthermore, the role of conventional power plants in primary frequency control was reduced for environmental reasons. Further, [16] presented a scenario of high electricity generation by combining renewable and nuclear power plants. Under these circumstances, implementing the primary frequency control only with the help of generation side resources can be not only costly and expensive but also technically challenging. Thus, it is essential that the number of loads involving in the primary frequency control are sufficient so that the system stability is maintained at an acceptable cost, i.e., consumer ancillary services.
In the past years, the tendency for using RE sources including wind energy has increased for environmental reasons. However, wind energy is oscillating and intermittent, causing oscillations in grid frequency, and greater penetration of these sources can create some challenges in the areas such as frequency reliability and stability [17], [18]. To solve this problem, energy storage systems (ESS) and optimum collaboration with DR can be considered as the right solution for reducing oscillations and uncertainty, and increasing frequency and voltage stability. Recently, the effect of the changes of wind energy on the LFC have been investigated in several studies [2], [19], [20]. Also, authors of [21], [22] have combined ESS with the wind energy system to reduce wind fluctuations in system frequency.
Recently, some neural-fuzzy based LFCs have also been developed. For example, in [23], a FLS-based PID is designed, and the Imperialist competitive algorithm is suggested for optimization. In [24], the various learning methods are applied to tune an PI parameters, and the regulation efficiency of the optimized PI is compared with an automatic generation controller (AGC). To improve the performance of AGC, a recurrent NN is suggested in [25], and by some comparisons with conventional LFCs the superiority of the AFC-NN LFC is shown. A FLS-based LFC is designed in [26], and Salp swarm algorithm is developed for learning and optimization. In [27], the regulation performance of FLSbased controllers is compared with AGCs. In [28], [29], it is shown that FLS-based LFC improves the transient performance and overshoots about 64.66%. In various studies, it has been proved that type-2 FLS-based controller are more effective [30], [31]. However, type-2 FLS-based LFCs have been seldom studied. For example, in [32], a PID is designed based on concept of T2-FLSs, and grey wolf optimizer is developed for learning. In the efficacy of conventional AGC is developed by T2-FLSs, and it is shown that type-2 FLSs better improve the regulation performance.

B. RESEARCH GAP AND MOTIVATION
In the most of reviewed papers, • The LFC is designed on the basis of model of MG units.
• In most of studies, the stability of LFC is neglected. • The effect of various perturbations are not investigated, simultaneously.
• The most of above studied LFCs are designed in an off-line scheme, and the unpredicted perturbations are neglected.
• Some evolutionary-based LFCs have huge computations which leads to the delay problem in practical applications, and even instability.

C. CONTRIBUTION AND PAPER ORGANIZATION
In the our proposed method, a new approach is proposed by participating BESS, wind farms, and DR, for LFC of a power system with multiple areas. The main contributions are: • It is assumed that the parameters of the system are uncertain and the design of the controller is carried out in an online scheme.
• Since system dynamics are not known, MLP-NN is utilized for modelling the system and extract system Jacobian.
• A type-2 neural FLC based the EKF is proposed to increase the power system performance and reduce oscillations from wind farms and frequency stabilization of different areas.
• Four scenarios are presented to compare the designed scheme by PI and type-1 FLC. Finally, the simulation results are applied to the practical NETS-39b case-study, which is divided into three areas. Our study is the continuation of our previous papers in [33]- [35] to improve controller performance. In our previous papers, Gradient descent and Levenberg-Marquardt have been used for LFC. The slowness of descending gradient algorithm and the need for bulky calculations and storage of previous data in online systems have been described as disadvantages of training methods and our motivation is to use the 6990 VOLUME 10, 2022 EKF training method. The EKF algorithm is a very popular online training method. It is not necessary to store previous data. In our proposed method, we applied wind farms in the multi-area power system in different buses, which causes frequency fluctuations. Also, the BESS with the coordination of DR and the Type 2 ANFIS-EKF controller improved the frequency performance of the power system. Furthermore, we considered nonlinearities such as time delay, GRC and governor dead-bond.
In the remaining, section 2 presents the objectives of the study. Modeling the multi-area system is presented in sections 3. Modeling wind farms, BESS, and DR are presented in sections 4, 5 and 6, respectively. The FLS theory, designing type-2 FLC, and training the parameters are discussed in Section 7. In Section 8, the proposed controller structure and case study is provided in section 9. Simulation results of the proposed controller applied to a NETS-39b are given in Section 10. Finally, Section 11 presents the paper.

D. OBJECTIVES OF THE STUDY
Operating wind farms, energy storage, and demand response were considered to achieve the following objectives: • Coordinating between generation and consumption. • Minimizing frequency variations due to load variations and fluctuations of wind farms despite energy storage resources.
• Restricting the ability to communicate between the areas to a pre-programmed amount.
• Using type-2 adaptive FLS controller base on the EKF to coordinate the secondary control loop and demand side response.
• Implementing GRC, governor dead-band, ESS charge constraint, and DR time delay.
• Decentralizing controller design for each power system area. The following describes the system dynamics modeling and definitions of the theories related to wind modeling, ESS, and fuzzy approaches.

II. DYNAMIC MODELING OF MULTI-AREA POWER SYSTEM
A power system with multiple areas consists of separate areas that are connected by high voltage transmission lines. The LFC in each area should not only control the frequency in that area but also the transmission power of the lines. Figure 1 shows the LFC block diagram for the i area, each area comprising a turbine, governor and generator. Commonly, analysis of the power systems' frequency response to small load disturbance is carried out using the linear model. Regardless of the model's nonlinearities, a linear mathematical model with n production units and i area is written as follows [36]: The tie-line power between areas i and j is defined as follows: where δ i and δ j are the variations of the phase angle in the i th , and j th areas, respectively. Given that d δ dt = 2π f i , by substituting in Eq. (4), we have: The system's dynamic state-space model is realized as bellow: (7) where x i indicated the state variable of the area i, y i represents the output vector of i, u i is the control signal of i. The turbine-governors parameters are shown in Table 1 are modeled as [37] as seen in Fig.2. Also, time delay 0.2 s is used for DR.  Figure 3 displays the internal structure of the wind power modeling of each area. As shown, wind power output per hour can be conducted by using a one-dimensional search table (1-DT (u)), which is the system wind power. By multiplying the table output by the coefficient K a , the wind power of each area is obtained. K a is defined as WT (i) /sum(WT ), where WT (i) represents the wind power capacity of the i area. Then, the amount of wind power changes can be obtained by reducing the wind power capacity. Finally, the values of wind power variations are divided by 100 to obtain the value in terms of per unite. K wind parameters are numeric values for wind power, which can be zero or one. When the value is one, VOLUME 10, 2022  it means wind power is considered; otherwise, the wind farms are not applied to the system.

IV. ENERGY STORAGE SYSTEM
The intermittent nature of wind power presents some challenges such as frequency changes, voltage changes, loss of power quality, and reliability, as well as a loss of stability. Energy storage can have basic role in smoothing the energy changes caused by wind oscillations. Further, it can minimize the challenges associated with wind energy fluctuations. Furthermore, electricity is usually stored in offpeak times when electricity prices are cheap, and this can be offset by frequency adjustment when the price of electricity increases at the time of peak power consumption. Assisting the grid during peak power consumption, providing different times for energy management, supporting smart grids, reducing wind oscillation instability, increasing the security and reliability of the power system are considered as the benefits of ESS [38], [39]. Among all types of ESS, the BESS can quickly compensate for active power, which results in improving LFC performance. A BESS is widely used for LFC as follows [39], [40]: The circuit model of the BESS includes the battery model and the converter as shown in Fig. 4.
The equivalent battery voltage is given: As shown in Fig. 4, the dc current into the battery is obtained from the following equation: According to the converter circuit, active and reactive power is obtained as follow: There are P-Q/P modulation. In this paper, we select P-modulation. Because in LFC, active power is considered. For P-modulation: [37] P bess = 6 where, E do is the dc voltage without overlap. From Eqs. 21 and 22, we have: The incremental BESS power as follow: In Eq. 24, E co into two parts is divided: Therefore we have: where, I 0 bess E d term is related to system disturbance. Therefore, we have: Then, the BESS in LFC is presented by: where, signal = P tie .

V. DEMAND RESPONSE
Due to the economic constraints and high cost of generator side controllers, the researchers proposed the frequency control through DR as a suitable alternative [41], [42]. Slow dynamics of generator mechanical components, low efficiency, and high operating costs of devices such as flywheels and ultra-capacitors are not good options for improving power system performance and stability. Therefore, demand side response is presented to improve security and reliability of the system [14]. On the other hand, the security and reliability of primary and secondary controls for frequency regulation may not be sufficient but the fast dynamic response of the load side can immediately improve the frequency changes. The following equation is used to impose system responsiveness and participation in each area during the DR process [14]: where 0 < δ < 1 is the participation factor and indicates how much load could contribute in DR. If δ = 0 means that DRF has not participation in frequency regulation while δ = 1 is the total load in DRF are involved in the LFC. The DR structure for Eq. (34) is shown in Fig. 5. The input of the DR block for each area is the P tie . As shown in Fig. 5, the derivative of P tie is derived twice and multiplied by −H i (generator time constant and load). A delay block is used to delay the telecommunication system. Also, it can be used to eliminate the high-frequency noise caused by the derivation of a low-pass filter (First-Order-Filter) before the delay. Further, K DR is used to consider load response to the system, which can be zero or one.

VI. FUZZY THEORY
One of the disadvantages of classic controllers is that the system should be considered linear. Thus, the classical controller has acceptable performance if the exact mathematical model of power systems is available, while the large-scale nonlinear systems are more complex and uncertain in the real world. Therefore, a precise mathematical model is not available for designing classical controllers. Thus, FLS have attracted the attention of many researchers during recent decades because of their ability to model the system with human knowledge.
The components of the FLS are fuzzifier which converts crisp input into a fuzzy set (FS). The defuzzifier converts the FS to a crisp value in output by methods such as center of gravity, mean center, and maximum. The basis of fuzzy rules is a FS of 'if-then' rules and is known as the heart of the FLS. The fuzzy inference engine, in this section, fuzzy rules are combined and the input FS is converted to the output one including membership functions (MMF) of fuzzy operators and if-then rules [43], [44]. As shown in Fig. 6, the only difference between type-1 and type-2 FLS structure in reducing the type is to convert the type-2 to the type-1 FLS, which reduces computation and increases speed. The membership is crisp number in [0,1], and type-2 FLS is characterized by a fuzzy MMF. Each element of type-2 FLS is a FS in [0,1]. The MMFs of type-1 FLC are characterized by two-dimensional MMFs, while type-2 FLC is characterized by three-dimensional MMFs. In fact, type-1 FLCs are first-order approximations and type-2 FSs are second-order approximations. Type-2 FLC is used in the systems with large uncertainties.

VII. THE PROPOSED CONTROLLER STRUCTURE
In the method presented in this study, the MLP-NN is used for system modeling assuming the parameters of the system to be uncertain. The controller does not depend on the parameters VOLUME 10, 2022 of the system dynamic and the system model is determined through extracting the system Jacobian, which is then calculated by the obtained model.

A. THE MLP-NN STRUCTURE
The notation of Fig. 7 is described in the following: u(t − τ 1 ), u(t − τ 2 ), . . . , u(t − τ p ): the NN's inputs; τ 1 , . . . , τ p : constant delays; As shown in Fig. 7, ζ 1 ij , ζ 2 ij (i = 1, . . . , k, j = 1, . . . , p) denote the trainable parameters of NN. Output of the middle layer's neurons are obtained as follows: where The control signal and the system output comprise the inputs of the MLP, and the MLP's output is obtained as follows: The NN's weights are trained to minimize of cost function E: where y d is the desirable output, and y is the NN's output Weights at t + 1 are ζ (t + 1) = ζ (t) − η ∂E ∂ζ . Training is carried out using gradient descent algorithm. The chain differentiation of ∂E ∂ζ = ∂E ∂e ∂e ∂y ∂y ∂ζ is applied to obtain ∂E ∂ζ . The weight training rule is derived by replacing ∂E ∂e = e, ∂e ∂y = − 1, ∂y ∂ζ = 0 Adaptive law as follow: where ζ 1 i is the training parameters and η is the training rate. Remark 1: The learning rate is strongly effect on the stability convergence or learning method [45], [46]. In this paper the learning rate is not constant but it is provided by adaptive covariance Matrix.

B. JACOBIAN OF THE SYSTEM
Finally, the Jacobian is obtained:

C. TYPE-2 FLS DESIGN
Extensive operation range and increased performance are considered as some reasons for type-2 FLC selection. In the continuous state of a type-2 FS is defined as the following equation [47]- [49].
where J x is the initial membership x and µF is the MMF. The generic rule of type-2 FLS established from N rules is as follows: R m : IF x 1 isF i 1 and x 2 isF j 2 then y isĜ ij , (i, j = 1, 2, . . . , N ) whereF i 2 ,F i 1 are the MMF of the first and second rules, and x 1 and x 2 represent the inputs andĜ ij consequents parameter, respectively.
For singleton fuzzification, the firing set of R m is given by: where ' ' is t-norm operator.
where g ij , g ij are the lower and upper firing degrees of the m th rule, respectively, and µFj The upper and lower MMFs are given by: where is the aggregation operation. The final system output can be written as follows: where r m is a fuzzy rule.

D. STRUCTURE OF THE TYPE-2 FLC
The FLS is not able to learn, but the NN is capable of selflearning with the help of data sets. Therefore, by combining NN and fuzzy, the neuro-fuzzy system can train the parameters in some ways such as error propagation and least squares, etc., in order to obtain the desired output. This study employs an online adaptive type-2 neural FLC is proposed for coordination between wind farms, DR, and LFC between areas, and EKF method to train the parameters. Now, we examine the structure of type-2 neural FLC and EKF. The type-2 neural FLS structure is considered as in Fig. 9. M represents the number of rules, and number of network's inputs is assumed to be 3. Due to the uncertainties of the system, the Gaussian function is used as the MMF. The controller output is as follows: Firing Force: [45] where C i and σ i represent the center and standard deviation, respectively. Also, the input vector is ACE. To reduce the type of FLS, the FLS's output based on Nie-Tan simple order reduction is obtained as follows: where the output layer's weights vector is defined as follows: where N represents the number of rules or the hidden layer's neurons.

E. EXTENDED KALMAN FILTER LEARNING FOR FUZZY CONTROLLER PARAMETERS
In this paper, the training of fuzzy controller parameters is used based on the EKF. The Kalman filter is based on a recurrent algorithm and requires no prior data storage to perform the calculations, and is updated from previous estimates and new inputs. The EKF is widely used for online training and is offered in dynamic systems. Using an EKF can be useful and appropriate since the proposed control method is VOLUME 10, 2022 online. However, other commonly-used algorithms such as the Gauss-Newton method and Levenberg-Marquardt algorithm are utilized for online systems due to computational complexity and previous data storage. In addition, the error propagation algorithm is not a good choice for training fuzzy control parameters due to slow convergence speed, sensitivity to input, and output data noise and poor performance in sophisticated process modeling, but the EKF is more popular because of measurement and process noise in its relationships. Consider the following finite system [50], [51]: where ζ (k) is a vector of NN weights including process noise. v(k) represents the measured noise, h[ζ (k), x(k)] indicates the activation function for describing the nonlinear part of the model, and y(k) is considered as a measurement model to obtain a nonlinear NN. N ζ is the number of weights of the hidden and the output layer of the NN is defined as follows: where n 1 is number of hidden neurons and n 2 is number of output neurons. The EKF trains NN as follows: Step I: Initialize the parameters and normalize the input and output data.
Step II: Obtain the NN output vector in k th step y(k) according Eqs. (59) and (60).
Step III: Calculate the derivative Matrix for weights as follow: Step IV: Calculate estimation error vector: Step V: Calculate the EKF gain: Step VI: Update ζ , P and S as follow: where K (k) is Kalman matrix, e(k) indicates estimation error, y(k) represents optimum output, y(k) is considered as NN output. In addition, P(k), H (k), and A(k) indicate error covariance matrix, Jacobian NN output matrix relative to weights, and the normalization matrix, respectively. The PI controller coefficients are adapted by a fuzzy algorithm based on system conditions. The PI-Fuzzy block diagram is shown in Fig. 10. As shown in Fig. 10, the fuzzy control inputs include the tie-line power ( P tie ). The fuzzy control outputs include the K p and K i coefficients of the PI controller and are multiplied by the area error and the area error integral, respectively, which eventually yields the controller output.

VIII. CASE STUDY
The power system's control and analysis are tested using the NETS-39b. This system includes 10 generators, 34 transmission lines, and 12 transformers. Figure 11 shows the single line diagram of this system. As it is evident for this system, three wind farms are added on buses 5, 21 and 26. The values of system installed capacity are given in Table 2.

IX. SIMULATION RESULTS
A schematic diagram of the structure of the proposed power system is shown in Fig. 12. MATLAB software is used to simulate this paper. The methods are evaluated based on four different scenarios:   Fig. 13 [14]. In the next papers, we will use the reference [52] for the wind profile, which is taken from a realistic scenario. In all scenarios, a step load disturbance of 0.9 p.u in t = 10 s is applied to area 1, which is a large-scale disturbance. The delay time is 0.2 s and the participation factor is δ = 0.3. In order to compare between proposed controller and classical controller, a PI controller is optimized. By considering K p and K i controller coefficients, the best gains are derived as −0.55 and −0.5, respectively. The test system is divided into three areas. In the areas 1-3, the generators G1, G9, and G4 are responsible for frequency regulation, respectively. For all three areas, the base power is 100 MW. GRC, Governor dead-band, wind speed limit, and capacity limitation of BESS are considered. The centers of the first input MMFs are −0.7, 0 and 0.7, respectively, and the Gaussian MMF are considered. The FLS structure has two inputs and two outputs. In type-2 FLC, MMFs are considered the same as those in type-1 FLC.
The main simulation parameters for BESS as:   and poorer performance are observed for the type-1 FLC and the PI controller. The frequency deviations of the area 1 of scenario 4 for the three control methods are shown in Fig. 17. Overshoot in proposed controller is about 0.05, which is the lowest value and the best performance. Based on the results of the output response, the best performance is related to the type-2 ANFIS-EKF controller, and the deflection is less and dies faster because of this control method. The worst performance is associated with the PI control method. Further, the areas 2 and 3 frequency deviations for the scenario 4 are shown in Figs 18 and 19. Furthermore, it is well-known that the performance of the proposed FLC is better than the type-1 FLC.
As shown in Figs. 18 and 19, the type-2 ANFIS frequency variations are smooth and have less vibration amplitude than the other two controllers. In order to illustrate the effect of DR, BSS, and wind farm power separately, the frequency deviations of the area 1 are compared for each control method. Figures 20-22 illustrate the comparison for frequency deviations of the conventional PI controller, type-1  FLC, and type-2 FLC, respectively. Based on the simulation results, with respect to DR, frequency changes reduced considerably due to the supply of a part of load changes through DR. By adding the BESS, the frequency changes decreased again due to the high speed of the ESS response. However, the addition of wind farm did not change significantly, but caused a slight increase in the frequency deviation associated with wind power fluctuations.
In this paper, three different integral performance criteria of frequency deviation such as integrated absolute error (IAE) is defined: where T f is the final simulation time, are examined for the three control method. Tables 3-5 shows the value of performance index of the system for the proposed controller, type-1 fuzzy and PI controllers. It can be observed that the performance index of the system is less when an type-2 ANFIS-EKF controller is used rather than other controllers.        0.5 and 1 seconds, as shown in Fig. 23. According to Fig. 24, the random steps are used to all areas. The tie-line power deviation response, in the case of comparing the performance of conventional PI controller, type-1 FLC and the proposed controller are given in Fig. 25. The simulation verify the effectiveness of the designed method.     Remark 2: DR is used to respond quickly to changes in frequency fluctuations that lead to instability. Load response program is a suitable way to respond quickly to increase or decrease the frequency that leads to damage to the generator units or the operation of relays. This research uses DR to control the frequency and power system stability. The equation (23) is used to impose system responsiveness and participation in each area during the DR process. As the simulations show, the suggested scenario well stabilize the frequency deviation.
Remark 3: It should be noted that the suggested control scenario is updated at each sample time and there is no training-testing data sets. At each sample time the output signal (frequency deviation) is measured, the input vectors of NN and FLS are constructed, and then the parameters are updated. The output data at each sample time is got from system mathematical model.

X. CONCLUSION
This paper presents a new LFC for a multi-area power systems. The system dynamics are unknown, and are online modelled using MLP-NNs. The proposed controller is a type-2 neural FLC based on EKF optimization scheme. The suggested controller is applied on power systems that include thermal units, wind farms, BESS, and DR and some limitations such as GRC, governor dead-bands, demand response delays, and BESS.
The simulation results indicates that the designed LFC with the optimum participation of DR, BESS, and Wind farm, increases the stability of the network and improves the frequency changes of the areas, despite the limitations. For further evaluation, the proposed method is also applied on the practical case-study NETS-39b with 10 machines, and is compared with the type-1 and type-2 FLCs in four scenarios. We see from the results that the performance of our control method is better than other type-1 FLCs and PI control methods. For our future study, we investigate the effect of measurement noise in stability, learning algorithm and convergence.