# LSTM Recurrent Neural Network-Based Frequency Control Enhancement of the Power System with Electric Vehicles and Demand Management

Authors: G. Sundararajan; P. Sivakumar
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

Due to the unpredictable and stochastic nature of renewables, current power networks confront operational issues as renewable energy sources are more widely used. Frequency stability of modern power systems has been considerably harmed by fast and unpredictable power variations generated by intermittent power generation sources and flexible loads. The main objective of the power system frequency control is to ensure the generation demand balance at all times. In reality, obtaining precise estimates of the imbalance of power in both transmission and distribution systems is challenging, especially when renewable energy penetration is high. Electric vehicles have become a viable tool to reduce the occasional impact of renewable energy sources engaged in frequency regulation mainly because of vehicle-to-grid technologies and the quick output power management of EV batteries. The rapid response of EVs enhances the effectiveness of the LFC system significantly. This research work investigates a deep learning strategy based on a long short-term memory recurrent neural network to identify active power fluctuations in real-time. The new approach assesses power fluctuations from a real-time observed frequency signal precisely and quickly. The observed power fluctuations can be used as a control reference, allowing automatic generation control to maintain better system frequency and ensure optimum generation cost with the use of demand management techniques. To validate the suggested method and compare it with several classical methods, a realistic model of the Indian power system integrated with distributed generation technology is used. The simulation results clearly indicate the importance of power fluctuation identification as well as the benefits of the proposed strategy. The results clearly show a considerable improvement in response performance indices, as the maximum peak overshoot was decreased by 21.25% to 51.2%, and settling time was lowered by about 23.34% to 65.40% for the suggested control technique compared to other controllers.


---

## Body

## 1. Introduction

For many decades, load frequency control (LFC) in electrical power systems was extensively used to ensure a balance between load consumption and power production in each control area, thereby eliminating system frequency variations. Due to increased renewable energy penetration, deployment of innovative solutions such as smart grid, and modernization of the electric power system with insecure communication technologies, electric power systems increased their complexity which in turn directly affected the electric power system’s operation, stability, and safety [1, 2]. The inclusion of electric vehicles (EVs) into LFC systems through an aggregator has received a lot of interest in recent years [3–8]. EVs have become a viable tool to reduce the occasional impact of renewable energy sources engaged in frequency regulation because of vehicle-to-grid technologies and the quick output power management of EV batteries. The rapid response of EVs enhances the effectiveness of the LFC system significantly. Although EVs can be used as generators or loads, unwanted frequency changes can be reduced and thus the frequency response can be improved. To practically manage the involvement of EVs in the frequency control market, an aggregator is used. The aggregator's role is to gather and manage a group of EVs to meet frequency regulation criteria [9, 10].Hundreds of thousands of EVs can also be connected to the grid as a massive battery energy storage system (BESS). This is possible as EVs plug into the grid when parked at a station or at home. Due to the short response time of EV batteries, a fleet of EVs working as a massive BESS is specifically successful in regulating load demand and wind power oscillations [11]. EVs aggregation into the interconnected power system can engage in both primary and secondary frequency control to help conventional power plants promptly decrease system frequency fluctuations caused by load disruptions and unpredictable renewable energy sources. In terms of primary frequency control (PFC), EVs’ PFC can emulate the behavior of a turbine governor by adopting a droop control [12–19]. The author [12] presented a basic control strategy for EVs with a load estimator, in which all EVs are abruptly unplugged from the grids due to increased demand in the system. When the power of the disconnected EVs is greater than the system’s power imbalance, this control strategy, however, can have negative effects on system frequency.In secondary frequency control (SFC), an aggregation of EVs serves as a generating power source to assist an existing power generation system meet the LFC need quickly [20, 21]. EVs use bidirectional power electronic devices to communicate with the power grid, allowing them to respond to new load set-points faster than traditional generators [22]. For LFC analysis, EV-based battery storage was proposed in [20]. The usefulness of SFC with EVs in lowering the area control errors (ACEs) in a Western Danish power system is demonstrated in this simulation. Furthermore, the authors studied LFC power system topologies with EV integration in [23, 24]. LFC methods effectively control frequency fluctuation by using the SFC signal to manage EV power output.Moreover, EV aggregators send information to the controller about EVs energy capabilities, electrical power availability, and charging status. As a result, the aggregators restructure control instructions regarding the engagement of EVs for automatic generation control to control their output power [22, 25–28].Under unexpected and worsening changes in load conditions, it is not possible to keep the system frequency within a prescribed limit. Then, the demand management technique can be implemented using a nature-inspired algorithm to optimise system operation cost to find the flexible demand of EVs engaged by the system to maintain the supply-demand balance, which in turn is reflected in the frequency control.Over the last few decades, algorithms inspired by the natural behavior of species that rely on beneficial properties of biological systems have evolved rapidly. Swarm intelligence systems imitate the social behavior of birds, bees, and ants. Their prominence stems from their capacity to successfully tackle real-world global optimization problems [29]. Different swarm intelligence algorithms such as Ant Colony Optimization (ACO) [30], Ant Lion Optimizer (ALO) [31], Particle Swarm Optimization (PSO) [32], Firefly Algorithm (FA) [33], and Chimp Optimization (CO) [34] are based on simple notions related to physical phenomena and evolutionary psychology. These algorithms have drawn a lot of interest since they are derivative-free, robust, and can be used to solve a variety of optimization problems. These algorithms employ the randomization idea, which shifts the efficiency of local search to global search.However, due to their sluggish convergence speed, such single approaches are ineffective in solving optimization problems as these approaches take a long time to compute and are usually confined to the local search space. As a result, numerous optimization techniques have been merged to calculate better outputs to improve the benefits of such optimization algorithms. The efficiency of these optimization techniques, which combine the best aspects of two or three methods, has been demonstrated in terms of computing time and convergence rate. These algorithms are capable of finding optimal results more quickly than traditional algorithms. The suggested Firefly Algorithm hybridized with Flower Pollination Algorithm (FA/FPA) effectively utilizes two specific terms from the Firefly Algorithm (FA) and Flower Pollination Algorithm (FPA): exploration and exploitation. The proposed hybrid will be compared with the Firefly Algorithm (FA) and Flower Pollination Algorithm (FPA) based on their performance.To enhance the performance of the controller, the author [35] suggested a novel resilient LFC design for multiarea power systems based on the second-order sliding mode control and an extended disturbance observer. For a hybrid isolated microgrid, the author [36] devised a new frequency control mechanism based on a disturbance observer and double sliding mode controllers. Numerous methods such as distributed control, robust control, and model predictive control were proposed to enhance the LFC’s performance, though their efficiency and response time were largely dependent on the estimated imbalance of power [37–39].Deep learning has shown promise in solving complicated nonlinear engineering issues in current history. To handle short-term load forecasting problems in individual residential families, Kong [40] suggested a prediction framework based on the long short-term memory (LSTM) recurrent neural network (RNN). The short-term load demand prediction was performed using a radial basis function neural network (RBFNN) [41]. Most existing research on power fluctuations estimate of LFC relies on disturbance observers [35, 36, 42, 43].(i)
To the best of the authors’ knowledge, online power fluctuation detection using a data-driven strategy has not been resorted to in solving frequency deviation problems accompanying the application of demand management techniques.Because of the greater penetration of renewable power generation and controllable demands in power system, rapid and unpredictable power surges can dramatically degrade the power system’s frequency performance. The goal of this research is to apply a recurrent neural network to accurately assess real-time power fluctuations from frequency measurements along with the application of demand management techniques. This paper’s key contribution and novelty can be summarised as follows:(i)
An LSTM RNN is intended to provide an accurate control signal to the LFC to control the frequency of the power system.(ii)
The online application of the well-trained LSTM is used to recognize real-time power fluctuations from the recorded frequency. Control devices, such as synchronous generators and energy storage integrated EV systems, can keep the frequency in a steady condition by using identified power fluctuations.(iii)
Under unexpected and worsening changes in load conditions, it is not possible to keep system frequency within a prescribed limit. Thus, the demand management technique can be implemented using FA/FPA algorithm to optimise system operation cost to find the flexible demand of EVs engaged in the system to maintain the supply-demand balance, which is reflected in the frequency control.(iv)
With actual data on power and frequency changes, a model of the Indian power system that includes combined heat and power generation, solar photovoltaic generation, wind energy generation, and loads (including electric vehicles) is developed. The proposed algorithm is tested on this platform and compared to several conventional algorithms.The remainder of this work is structured as follows: Section2 describes the transfer function model of the multiarea system. Section 3 proposes the LSTM RNN method that is applied to optimise the fitness function. Section 4 narrates the FA/FPA algorithm and its application to find the optimal flexible load demand. Section 5 verifies the proposed logic using simulation results. Finally, Section 6 concludes the considered work.


## 2. System Model

Building an appropriate hybrid power system model for the LFC analysis is quite important. In the proposed approach, the four-area model included a renewable energy source such as a wind turbine and a photovoltaic module in addition to an electric vehicle. Controlling output power from intermittent power generation systems is difficult due to uneven variations. It is also completely different compared to nonintermittent power generation systems. There have always been difficulties with stability when power demand was greater than power generation.The major goal of this study is to build an improved LFC for a four-area power system network using a superior controller. To achieve excellent performance in dynamic stability, various types of controllers, as reported earlier, were used. The conventional controller was created to tackle these challenges due to the nonlinearity of the power system component utilized in modeling the power system network. The controller in four-area modeling was mostly based on a proportional-integral controller, as the integral gain has the characteristics of both fast-transient recovery and minimal overshoot. The detailed transfer function modeling of intermittent and nonintermittent energy sources of the interconnected hybrid power system is presented in [16, 35].EVs’ demand management technique (DMT) gained popularity in recent years. The development and extensive use of electric vehicles could have a substantial influence on power grids. In this work, a system to model an electric vehicle fleet was devised, and the impact on the load demand of a power system network was investigated. However, it was considered that distinct EV classes’ features were not considered. An aggregate model of EV fleets is shown in Figure1. A deadband function with droop features was included in this model to prevent undesirable frequency fluctuation. ΔFUL and ΔFLL describe the dead band upper and lower limit values, respectively; ΔPAGmax and ΔPAGmin indicate the maximum and minimum power outputs of the EV fleet, respectively; RAG represents the model droop coefficient (same as conventional units), KEV represents the EV gain, NEV represents the number of connected EVs, TEV represents the battery time constant, and ΔPEV represents the incremental generation change of EV fleet. The transfer function model that describes the effect of the EV fleet is given as follows:(1)GEV=KEV1+STEV.Figure 1
Aggregate model of EV fleets.The state equations for all areas for the above interconnected hybrid power system as seen in Figure2 can be stated as follows:(2)Δf1.=12H1−ΔPD1−ΔPtie,12−ΔPtie,13+ΔPmd1+ΔPmd5−ΔPw1−ΔPsinv1−D1Δf1,ΔPmd1˙=1TT1ΔPgd1−ΔPmd1,ΔPmd5˙=1TT5ΔPgd5−ΔPmd5,ΔPsinv1˙=1Tinv1ΔPs1−ΔPsinv1,ΔPgd1˙=1Tg1ΔPtie,12+ΔPtie,13+Δf1B1−Δf1R1−ΔPgd1,ΔPgd5˙=1TbΔPtie,12+ΔPtie,13+Δf1B1−ΔPgd5,ΔPEV1˙=1TEV1ΔPtie,12+ΔPtie,13+Δf1B1−Δf1RAG1−ΔPEV1,Δf2˙=12H2−ΔPD2+A12ΔPtie,12−ΔPtie,24+ΔPmd2−ΔPw2−ΔPsinv2−D2Δf2,ΔPmd2˙=1TT2ΔPgd2−ΔPmd2,ΔPgd2˙=1Tg2−A12ΔPtie,12+ΔPtie,24+Δf2B2−Δf2R2−ΔPgd2,ΔPsinv2˙=1Tinv2ΔPs2−ΔPsinv2,ΔPEV2˙=1TEV2−A12ΔPtie,12+ΔPtie,24+Δf2B2−Δf2RAG2−ΔPEV2,Δf3˙=12H3−ΔPD3+A13ΔPtie,13−ΔPtie,34+ΔPmd3−ΔPw3−ΔPsinv3−D3Δf3,ΔPmd3˙=1TT3ΔPgd3−ΔPmd3,ΔPgd3˙=1Tg3−A13ΔPtie,13+ΔPtie,34+Δf3B3−Δf3R3−ΔPgd3,ΔPsinv3˙=1Tinv3ΔPs3−ΔPsinv3,ΔPEV3˙=1TEV3−A13ΔPtie,13+ΔPtie,34+Δf3B3−Δf3RAG3−ΔPEV3,Δf4˙=12H4−ΔPD4+A34ΔPtie,34+A24ΔPtie,24+ΔPmd4−ΔPw4−ΔPsinv4−D4Δf4,ΔPmd4˙=1TT4ΔPgd4−ΔPmd4,ΔPgd4˙=1Tg4−A34ΔPtie,34−A24ΔPtie,24+Δf4B4−Δf4R4−ΔPgd4,ΔPsinv4˙=1Tinv4ΔPs4−ΔPsinv4,ΔPEV4˙=1TEV4−A34ΔPtie,34−A24ΔPtie,24+Δf4B4−Δf4RAG4−ΔPEV4.Figure 2
System model of interconnected hybrid power system.The state-space equation for the considered system can be expressed as follows:(3)X˙=AX+BU+EW,Y=CX+DU,where U is the input variable vector, Y is the output variable vector, X is the state variable vector, and W is the disturbance vector. They are expressed as follows:(4)A=−1TP11TP10−1TP1000000000000000000−1TP1−1TP1000−1TT11TT100000000000000000000000−1R1Tg10−1Tg100000000000000000001Tg11Tg100000−1Tinv100000000000000000000000000−1TT51TT500000000000000000000B1Tb0000−1Tb00000000000000001Tb1Tb00−1RAG1TEV10−1TEV100000000000000000001TEV11TEV1000000000−1TP21TP20−1TP200000000000A12TP20−1TP2000000000−1TT21TT200000000000000000000000−1R2Tg20−1Tg2000000000000−A12Tg201Tg200000000000−1Tinv20000000000000000000000−1RAG2TEV20−1TEV2000000000000−A12TEV201TEV20000000000000−1TP31TP30−1TP30000000A13TP30−1TP30000000000000−1TT31TT300000000000000000000000−1R3Tg30−1Tg300000000A13Tg301Tg3000000000000000−1Tinv30000000000000000000000−1RAG3TEV30−1TEV300000000−A13TEV301TEV300000000000000000−1TP41TP40−1TP4000A24TP4A34TP4000000000000000000−1TT41TT400000000000000000000000−1R4Tg40−1Tg40000−A24Tg4−A34Tg400000000000000000000−1Tinv40000000000000000000000−1RAG4TEV40−1TEV40000−A24TEV4−A34TEV42πT12000000−2πT120000000000000000002πT1300000000000−2πT13000000000000000000002πT24000000000−2πT24000000000000000000002πT340000−2πT3400000000,(5)x=Δf1ΔPmd1ΔPgd1ΔPsinv1ΔPmd5ΔPgd5ΔPEV1Δf2ΔPmd2ΔPgd2ΔPsinv2ΔPEV2Δf3ΔPmd3ΔPgd3ΔPsinv3ΔPEV3Δf4ΔPmd4ΔPgd4ΔPsinv4ΔPEV4ΔPtie,12ΔPtie,13ΔPtie,24ΔPtie,34,(6)B=00000000001Tg10000000000000001Tg5000000000000000000001Tg200000000000000000000000001Tg300000000000000000000000001Tg4000000000000000000000000000000,(7)U=ΔPgd1ΔPgd5ΔPgd2ΔPgd3ΔPgd4T,(8)E=−1TP1−1TP1000000000000000000000000000000000000000000000000−1Tinv1000000000000000000000000000000000000000000000000−1TEV10000000000000000−1TP2−1TP2000000000000000000000000000000000000000000000000−1Tinv20000000000000000−1TEV20000000000000000−1TP3−1TP3000000000000000000000000000000000000000000000000−1Tinv30000000000000000−1TEV30000000000000000−1TP4−1TP4000000000000000000000000000000000000000000000000−1Tinv40000000000000000−1TEV40000000000000000000000000000000000000000000000000000000000000000,(9)W=ΔPD1ΔPW1ΔPS1ΔPEV1ΔPD2ΔPW2ΔPS2ΔPEV2ΔPD3ΔPW3ΔPS3ΔPEV3ΔPD4ΔPW4ΔPEV4T,(10)C=10000000000000000000000000000000010000000000000000000000000000001000000000000000000000000000000100000000,(11)D=0.


## 3. Proposed Methodology

### 3.1. LSTM Network

An RNN is a type of artificial neural network that takes advantage of time information in input data, as opposed to a regular neural network that merely has interactions between layers. As a result, RNN performs better when dealing with time-series learning problems. The structure of the LSTM cell includes the input gate, forget gate, and output gate.The LSTM defines and maintains the cell state to manage information flow, which is an essential factor in the LSTM architecture, to acquire long-term temporal functional relationships [44]. Relying on the results of prior stages and inputs of the current time step, the memory cell state Ct−1 interacts with the intermediate output ht−1 and the succeeding input xt to determine which parts of the internal state vector should be modified, retained, or discarded. The following are the compact expression of an LSTM network with a forget gate:(12)it=σxtUi+ht−1Wi,ft=σxtUf+ht−1Wf,ot=σxtUo+ht−1Wo,C˜t=σxtUg+ht−1Wg,Ct=ft∗Ct−1+it∗C˜t,ht=tanhCt∗ot,where i denotes the input gate; f denotes the forget gate; o denotes the output gate; σ denotes the sigmoid activation function; the operator ∗ denotes element-wise multiplication; Wi, Wf, Wo,andWg denote the weight matrices that need to be learned during training; Ui, Uf, Uo,andUg are coefficient matrixes; C˜t is a “candidate” hidden state, which is calculated based on the current input and the previous hidden state; Ct is the internal memory of the unit, and ht represents the final output of the memory unit.LSTM memory units can record sophisticated correlation patterns inside time-series data in both short and long term through the function of different gates, which is a significant advance over other RNNs.


### 3.2. LSTM Network for Power Identification

The LSTM RNN is used in this work to present an active identification approach for real power perturbations. This provides a new realistic reference for automatic generation control (AGC) to preserve system frequency. The proposed technique is divided into two parts: offline training and online application of the LSTM, with the entire procedure being depicted in Figure3.Figure 3
Offline training and online application of the LSTM.


#### 3.2.1. Offline Training Progress

The statistical data of frequency variations, which provides the input for the LSTM training, can be considered the preceding information. The target (i.e., the output) is the real power fluctuation. The training processes are as follows:(i)
Step 1: data on the frequency and active power fluctuations should be collected.(ii)
Step 2: initialize weight matrices and bias vectors, includingWi, Wf, Wo,Wg,Ui, Uf, Uo,andUg after normalizing data.(iii)
Step 3: by updating the weight coefficients and bias vectors, the neural network is trained using the backward propagation approach with the gradient-based optimizer to minimize the cost function.(iv)
Step 4: invert the recognized power fluctuations from the normalized to real values, then output the results of the identification.


#### 3.2.2. Online Application

The proposed LSTM network is trained using previous data in the offline environment and created using power and frequency changes. Once the LSTM network is properly trained, it may be used online to calculate power fluctuations based on the frequency observed online. It is worth noting that varied system running conditions can be considered for training database development when in the offline training mode. In addition, the model can be updated on a regular basis if fresh online measurement and generated data becomes available, or if the system’s conditions change unexpectedly. Frequency control resources, such as synchronous generators and ESSs, clear out all the recognized real-time power perturbations and form a control signal for AGC.


#### 3.2.3. Performance Evaluation

To assess the identification accuracy of the proposed LSTM RNN methodology, the Integral Time Absolute Error (ITAE) is considered as the performance index. Compared to other performance indices such as Integral Squared Error (ISE), Integral Absolute Error (IAE), and Integral Time-Weighted-Squared Error (ITSE), ITAE performs well in the fine-tuning of PID controller gains due to lesser overshoots/undershoots and fluctuations [10]. Equations (14)–(17) describe the fitness function of ITAE and the PID controller gain limits, respectively. By optimizing the fitness function of ITAE, the PID controller gains are well-tuned.For area-n,(13)un=KpnACEn+Kin∫0tACEndt+KdndACEndt,(14)Fitness Function=MinimizeITAE=∫0tACEndt=∫0tΔFn+ΔPtie,n−jdt.Subjected to PID gain limits,(15)Kpjmin≤Kpj≤Kpjmax,(16)Kijmin≤Kij≤Kijmax,(17)Kdjmin≤Kdj≤Kdjmax,where n denotes the number of areas; j=1,2,…nj≠n; ΔFn denotes the frequency deviations in the nth area; ΔPtie,n−j denotes the tie line power fluctuation.


#### 3.2.4. Demand Management Technique

The primary goal of the DMT is to reduce system peak demand and its operational cost. In this considered work, the clipping of system peak demand can be achieved with the help of the working behavior of EVs while the system operational cost can be managed with the help of nonintermittent power generation units such as thermal units and combined heat and power generation units. The formulation of the objective function with their constraints is listed as follows:(18)MinimizeΔVmin,iΔPd+∑i=1NPCiPip+∑j=1NcCjPjc,Hjc,where ΔVmin,i is the variation in minimum voltage, Pd is the variation in electrical power demand, Np and Nc represent the number of conventional thermal and cogeneration units, respectively, CiPip represents the fuel cost of the conventional thermal units, and CjPjc,Hjc represents the fuel cost of the cogeneration units and they are expressed as follows:(19)CiPip=αiPip2+βiPip+γi,CjPjc,Hjc=ajPjc2+bjPjc+cj.Subject to the following constraints,(20)∑i=1NpPip+∑j=1NcPjc=Pd,Pipmin≤Pip≤Pipmaxwherei=1,2…Np,PjcminHjc≤Pjc≤PjcmaxHjcwherej=1,2…Nc.The operation of the suggested DMT is to determine the best timings for charging electric vehicles and turning on various heating loads while adhering to the aforementioned restrictions [45, 46]. To keep frequency oscillation to the minimum, the considered system fully relies on the nonintermittent power generation units. However, it is also limited by their upper and lower bounds. Therefore, in such a scenario, the FA/FPA algorithm can be used to find the optimal flexible demand, which will reduce the system operation cost and ensure standard system frequency. The implementation logic of the DMT coordinated LFC is described in Figure 4.Figure 4
Implementation logic of the DMT-coordinated LFC.The system frequency rises due to an unexpected drop in load. Nonintermittent power generation must be altered to achieve zero frequency variation. In some unconditional situations, this cannot be performed beyond a certain limit as it will further increase the system’s operational cost due to the temporary shutdown and startup. Then, given a time constraint, the FA/FPA algorithm is run to determine optimum flexible demand, which can then be introduced to the system to satisfy zero frequency deviation and to calculate the optimal cost function.


## 3.1. LSTM Network

An RNN is a type of artificial neural network that takes advantage of time information in input data, as opposed to a regular neural network that merely has interactions between layers. As a result, RNN performs better when dealing with time-series learning problems. The structure of the LSTM cell includes the input gate, forget gate, and output gate.The LSTM defines and maintains the cell state to manage information flow, which is an essential factor in the LSTM architecture, to acquire long-term temporal functional relationships [44]. Relying on the results of prior stages and inputs of the current time step, the memory cell state Ct−1 interacts with the intermediate output ht−1 and the succeeding input xt to determine which parts of the internal state vector should be modified, retained, or discarded. The following are the compact expression of an LSTM network with a forget gate:(12)it=σxtUi+ht−1Wi,ft=σxtUf+ht−1Wf,ot=σxtUo+ht−1Wo,C˜t=σxtUg+ht−1Wg,Ct=ft∗Ct−1+it∗C˜t,ht=tanhCt∗ot,where i denotes the input gate; f denotes the forget gate; o denotes the output gate; σ denotes the sigmoid activation function; the operator ∗ denotes element-wise multiplication; Wi, Wf, Wo,andWg denote the weight matrices that need to be learned during training; Ui, Uf, Uo,andUg are coefficient matrixes; C˜t is a “candidate” hidden state, which is calculated based on the current input and the previous hidden state; Ct is the internal memory of the unit, and ht represents the final output of the memory unit.LSTM memory units can record sophisticated correlation patterns inside time-series data in both short and long term through the function of different gates, which is a significant advance over other RNNs.


## 3.2. LSTM Network for Power Identification

The LSTM RNN is used in this work to present an active identification approach for real power perturbations. This provides a new realistic reference for automatic generation control (AGC) to preserve system frequency. The proposed technique is divided into two parts: offline training and online application of the LSTM, with the entire procedure being depicted in Figure3.Figure 3
Offline training and online application of the LSTM.


### 3.2.1. Offline Training Progress

The statistical data of frequency variations, which provides the input for the LSTM training, can be considered the preceding information. The target (i.e., the output) is the real power fluctuation. The training processes are as follows:(i)
Step 1: data on the frequency and active power fluctuations should be collected.(ii)
Step 2: initialize weight matrices and bias vectors, includingWi, Wf, Wo,Wg,Ui, Uf, Uo,andUg after normalizing data.(iii)
Step 3: by updating the weight coefficients and bias vectors, the neural network is trained using the backward propagation approach with the gradient-based optimizer to minimize the cost function.(iv)
Step 4: invert the recognized power fluctuations from the normalized to real values, then output the results of the identification.


### 3.2.2. Online Application

The proposed LSTM network is trained using previous data in the offline environment and created using power and frequency changes. Once the LSTM network is properly trained, it may be used online to calculate power fluctuations based on the frequency observed online. It is worth noting that varied system running conditions can be considered for training database development when in the offline training mode. In addition, the model can be updated on a regular basis if fresh online measurement and generated data becomes available, or if the system’s conditions change unexpectedly. Frequency control resources, such as synchronous generators and ESSs, clear out all the recognized real-time power perturbations and form a control signal for AGC.


### 3.2.3. Performance Evaluation

To assess the identification accuracy of the proposed LSTM RNN methodology, the Integral Time Absolute Error (ITAE) is considered as the performance index. Compared to other performance indices such as Integral Squared Error (ISE), Integral Absolute Error (IAE), and Integral Time-Weighted-Squared Error (ITSE), ITAE performs well in the fine-tuning of PID controller gains due to lesser overshoots/undershoots and fluctuations [10]. Equations (14)–(17) describe the fitness function of ITAE and the PID controller gain limits, respectively. By optimizing the fitness function of ITAE, the PID controller gains are well-tuned.For area-n,(13)un=KpnACEn+Kin∫0tACEndt+KdndACEndt,(14)Fitness Function=MinimizeITAE=∫0tACEndt=∫0tΔFn+ΔPtie,n−jdt.Subjected to PID gain limits,(15)Kpjmin≤Kpj≤Kpjmax,(16)Kijmin≤Kij≤Kijmax,(17)Kdjmin≤Kdj≤Kdjmax,where n denotes the number of areas; j=1,2,…nj≠n; ΔFn denotes the frequency deviations in the nth area; ΔPtie,n−j denotes the tie line power fluctuation.


### 3.2.4. Demand Management Technique

The primary goal of the DMT is to reduce system peak demand and its operational cost. In this considered work, the clipping of system peak demand can be achieved with the help of the working behavior of EVs while the system operational cost can be managed with the help of nonintermittent power generation units such as thermal units and combined heat and power generation units. The formulation of the objective function with their constraints is listed as follows:(18)MinimizeΔVmin,iΔPd+∑i=1NPCiPip+∑j=1NcCjPjc,Hjc,where ΔVmin,i is the variation in minimum voltage, Pd is the variation in electrical power demand, Np and Nc represent the number of conventional thermal and cogeneration units, respectively, CiPip represents the fuel cost of the conventional thermal units, and CjPjc,Hjc represents the fuel cost of the cogeneration units and they are expressed as follows:(19)CiPip=αiPip2+βiPip+γi,CjPjc,Hjc=ajPjc2+bjPjc+cj.Subject to the following constraints,(20)∑i=1NpPip+∑j=1NcPjc=Pd,Pipmin≤Pip≤Pipmaxwherei=1,2…Np,PjcminHjc≤Pjc≤PjcmaxHjcwherej=1,2…Nc.The operation of the suggested DMT is to determine the best timings for charging electric vehicles and turning on various heating loads while adhering to the aforementioned restrictions [45, 46]. To keep frequency oscillation to the minimum, the considered system fully relies on the nonintermittent power generation units. However, it is also limited by their upper and lower bounds. Therefore, in such a scenario, the FA/FPA algorithm can be used to find the optimal flexible demand, which will reduce the system operation cost and ensure standard system frequency. The implementation logic of the DMT coordinated LFC is described in Figure 4.Figure 4
Implementation logic of the DMT-coordinated LFC.The system frequency rises due to an unexpected drop in load. Nonintermittent power generation must be altered to achieve zero frequency variation. In some unconditional situations, this cannot be performed beyond a certain limit as it will further increase the system’s operational cost due to the temporary shutdown and startup. Then, given a time constraint, the FA/FPA algorithm is run to determine optimum flexible demand, which can then be introduced to the system to satisfy zero frequency deviation and to calculate the optimal cost function.


## 3.2.1. Offline Training Progress

The statistical data of frequency variations, which provides the input for the LSTM training, can be considered the preceding information. The target (i.e., the output) is the real power fluctuation. The training processes are as follows:(i)
Step 1: data on the frequency and active power fluctuations should be collected.(ii)
Step 2: initialize weight matrices and bias vectors, includingWi, Wf, Wo,Wg,Ui, Uf, Uo,andUg after normalizing data.(iii)
Step 3: by updating the weight coefficients and bias vectors, the neural network is trained using the backward propagation approach with the gradient-based optimizer to minimize the cost function.(iv)
Step 4: invert the recognized power fluctuations from the normalized to real values, then output the results of the identification.


## 3.2.2. Online Application

The proposed LSTM network is trained using previous data in the offline environment and created using power and frequency changes. Once the LSTM network is properly trained, it may be used online to calculate power fluctuations based on the frequency observed online. It is worth noting that varied system running conditions can be considered for training database development when in the offline training mode. In addition, the model can be updated on a regular basis if fresh online measurement and generated data becomes available, or if the system’s conditions change unexpectedly. Frequency control resources, such as synchronous generators and ESSs, clear out all the recognized real-time power perturbations and form a control signal for AGC.


## 3.2.3. Performance Evaluation

To assess the identification accuracy of the proposed LSTM RNN methodology, the Integral Time Absolute Error (ITAE) is considered as the performance index. Compared to other performance indices such as Integral Squared Error (ISE), Integral Absolute Error (IAE), and Integral Time-Weighted-Squared Error (ITSE), ITAE performs well in the fine-tuning of PID controller gains due to lesser overshoots/undershoots and fluctuations [10]. Equations (14)–(17) describe the fitness function of ITAE and the PID controller gain limits, respectively. By optimizing the fitness function of ITAE, the PID controller gains are well-tuned.For area-n,(13)un=KpnACEn+Kin∫0tACEndt+KdndACEndt,(14)Fitness Function=MinimizeITAE=∫0tACEndt=∫0tΔFn+ΔPtie,n−jdt.Subjected to PID gain limits,(15)Kpjmin≤Kpj≤Kpjmax,(16)Kijmin≤Kij≤Kijmax,(17)Kdjmin≤Kdj≤Kdjmax,where n denotes the number of areas; j=1,2,…nj≠n; ΔFn denotes the frequency deviations in the nth area; ΔPtie,n−j denotes the tie line power fluctuation.


## 3.2.4. Demand Management Technique

The primary goal of the DMT is to reduce system peak demand and its operational cost. In this considered work, the clipping of system peak demand can be achieved with the help of the working behavior of EVs while the system operational cost can be managed with the help of nonintermittent power generation units such as thermal units and combined heat and power generation units. The formulation of the objective function with their constraints is listed as follows:(18)MinimizeΔVmin,iΔPd+∑i=1NPCiPip+∑j=1NcCjPjc,Hjc,where ΔVmin,i is the variation in minimum voltage, Pd is the variation in electrical power demand, Np and Nc represent the number of conventional thermal and cogeneration units, respectively, CiPip represents the fuel cost of the conventional thermal units, and CjPjc,Hjc represents the fuel cost of the cogeneration units and they are expressed as follows:(19)CiPip=αiPip2+βiPip+γi,CjPjc,Hjc=ajPjc2+bjPjc+cj.Subject to the following constraints,(20)∑i=1NpPip+∑j=1NcPjc=Pd,Pipmin≤Pip≤Pipmaxwherei=1,2…Np,PjcminHjc≤Pjc≤PjcmaxHjcwherej=1,2…Nc.The operation of the suggested DMT is to determine the best timings for charging electric vehicles and turning on various heating loads while adhering to the aforementioned restrictions [45, 46]. To keep frequency oscillation to the minimum, the considered system fully relies on the nonintermittent power generation units. However, it is also limited by their upper and lower bounds. Therefore, in such a scenario, the FA/FPA algorithm can be used to find the optimal flexible demand, which will reduce the system operation cost and ensure standard system frequency. The implementation logic of the DMT coordinated LFC is described in Figure 4.Figure 4
Implementation logic of the DMT-coordinated LFC.The system frequency rises due to an unexpected drop in load. Nonintermittent power generation must be altered to achieve zero frequency variation. In some unconditional situations, this cannot be performed beyond a certain limit as it will further increase the system’s operational cost due to the temporary shutdown and startup. Then, given a time constraint, the FA/FPA algorithm is run to determine optimum flexible demand, which can then be introduced to the system to satisfy zero frequency deviation and to calculate the optimal cost function.


## 4. FA/FPA Algorithm

The proposed technique is based on two metaheuristic algorithms, Firefly Algorithm and Flower Pollination Algorithm, which were thoroughly examined in this research work. These proposed algorithms combine the concepts of exploration (diversification) and exploitation (intensification) to create a hybrid algorithm. Exploration is a global search term, while exploitation is a local search term. The Firefly Algorithm (FA) is based on the blinking characteristic of fireflies, which are influenced by their natural behavior and bioluminescence phenomena. These fireflies move toward an attractive firefly that serves as the present global best. Optimization is used to determine the flashing brightness of fireflies.The Flower Pollination Algorithm (FPA) is based on the properties of the flowers of various plants. The main goal is to reproduce by transferring pollen and pollinators such as insects, birds, bees, and flies assist in this process. Abiotic (self-pollination) and biotic (cross-pollination) pollination are the different sorts of pollination. As pollinators travel a great distance, global pollination (biotic) happens over vast distances. Cross-pollination occurs within flowers of the same plant. To reach speedier optimums, both processes are regulated by a switch probabilityp.Both FA and FPA algorithms employ biological notions. The fundamental goal of hybridization is to solve the drawbacks of existing separate optimization algorithm components and generate a better form. Second, to establish the robustness of this suggested algorithm in terms of achieving global optima in very little time while maximizing the utilization of the exploration and exploitation concepts. Both these concepts are used to investigate new potential outcomes as well as improve the current solution. The flowchart that describes the considered work using FA/FPA is shown in Figure5.Figure 5
Flowchart that describes the work using FA/FPA algorithm.The suggested algorithm introduces both concepts. The movement of particles in this method is based on moving less brighter particles toward brighter ones by completing local and global walks in two phases, identical to the Firefly Algorithm and Flower Pollination Algorithm. The FA/FPA algorithm incorporates the Firefly Algorithm concept by first opting for a local search as all particles are divided into numerous subgroups and then selecting the best value from each group. By preventing from being trapped within local optima and reducing the randomness effect, they were able to find a global best one value from all these values, allowing particles to explore a better optima solution. As a result, the entire process includes the global step, which is efficiently completed by the particles. The suggested algorithm (FA/FPA) then uses the Flower Pollination Algorithm paradigm to create an interaction between local and global search. This results in a switch probability having a magnitude bigger than the random number generation of particles, as the particles can move in any direction in a local walk and hence the effect of randomization is greater.The exploitation impact is included in the local search of the Flower Pollination Algorithm because flowers of the same species are selected using the flower consistency process, and pollen transfer occurs in the same plant. Similarly, the proposed algorithm’s local search exploits particles belonging to the same species. As a result, the convergence rate is quicker as particles will do a more efficient local search. In the considered work, the minimum system operational cost can be taken as the objective function, which can be achieved with the application of FA/FPA. The implementation logic of the FA/FPA can be described as a pseudocode in Figure6.Figure 6
Implementation logic of the FA/FPA algorithm.


## 5. Simulation Results and Discussion

Due to the significant penetration of intermittent power generation and variable flexible loads, the frequency stability of an Indian power system is challenged. The one-line diagram of the typical 62-bus Indian utility system is shown in Figure7 and their corresponding generator data is shown in Table 1. The area-wise number of both intermittent and nonintermittent power generation units is provided in [47]. The four-area power system is modeled using MATLAB/Simulink tools, which includes the effects of renewable energy sources and electric vehicles. This four-area power system is linked to the proposed controller, which has been put through its paces under various operating situations to test the efficiency of the controller’s response. The test system is simulated in four different scenarios, and the suggested controller response is compared to that of a standard PID controller and a fuzzy controller.Figure 7
62 bus Indian utility system.Table 1
Generator data of 62 bus Indian utility system.
Gen. No.Pi, min(MW)Pi, max MWai (CU/(MWhr)2)bi (CU/MWhr)ci (CU/hr)Bus noVoltage mag.Angle deg.MWMvarQminQmaxAreaG1503000.00706.809511.050192.6423.5504502G2504500.00554.003021.050190.580.0001302G3504500.00554.004551.050255.680.0002552G401500.00250.851091.05078.2021.21801002G5503000.00604.6020141.050171.08233.905002G6504500.00554.0090171.050190.610.00004G7502000.00654.7042231.050151.84147.903404G8505000.00755.0046251.050250.2486.5203954G906000.00856.0055321.050106.620.00−1004003G1001000.00200.5058331.05062.3800.000303G11501500.00451.6065341.050134.50410413G1201000.00250.8578371.05078.5330.000873G13503000.00501.8075491.050213.950.000801G1401500.00451.6085501.05092.7840.0002001G1505000.00654.7080511.05082.95741.5402451G16501500.00451.4090521.05024.608350351G1701000.00250.8510541.05072.6330.0001001G18503000.00451.6025571.050219.440.000201G191006000.00805.5090581.050339.701001004201


### 5.1. Case 01 (System Response with All Energy Resources)

Case 01 deals with intermittent and nonintermittent power generation in all four areas. Figures8–11 show the simulation of the system’s reaction with a load variation of 0.01 p.u and the accompanying responses associated with the suggested controller, which delivers a superior and faster response when compared to traditional PID and fuzzy controllers. Moreover, better frequency response is required to reduce associated power generation cost. Nonintermittent power generation units in each of the four zones are responsible for this.Figure 8
Case 01—Frequency Deviation for area 1.Figure 9
Case 01—Frequency Deviation for area 2.Figure 10
Case 01—Frequency Deviation for area 3.Figure 11
Case 01—Frequency Deviation for area 4.


### 5.2. Case 02 (System Response with Change of ∆Pw)

For frequency regulation with the effects of wind power, Case 02 considers both intermittent and nonintermittent power generation in the four areas under study. Variations in solar power and load are retained as constant, whereas only variations in wind power are implemented with rising and falling ∆Pw values. As wind power is an intermittent power source, it is frequently encountered in the power system. Figures 12–15 present the findings of the system response using the proposed controller to handle these variations in ∆Pw values. Compared to PID and fuzzy controllers, frequency deviation provides a better and faster reaction while minimizing power generation costs with good frequency response, meeting the frequency deviation within ±0.5 when using the FA/FPA algorithm.Figure 12
Case 02—Frequency Deviation for area 1.Figure 13
Case 02—Frequency Deviation for area 2.Figure 14
Case 02—Frequency Deviation for area 3.Figure 15
Case 02—Frequency Deviation for area 4.


### 5.3. Case 03 (System Response with Change of ∆PS)

For frequency regulation with the effects of solar power, Case 03 considers both intermittent and nonintermittent power generation in the four areas under study. Only variations in solar power are implemented with a rise in the value of ∆PS, while variations in wind power and load remain constant. As solar power is an intermittent power source, it is frequently encountered in the power system. Figures 16–19 present the findings of the system response using the proposed controller to handle variations in ∆PS values. To maintain better frequency response, control inputs to nonintermittent power generation units such as thermal, and CHP are modified in a decreasing manner when solar power increases. Simultaneously, the suggested FA/FPA algorithm reduces power-generating costs by improving frequency response and achieving a frequency deviation of less than ±0.5.Figure 16
Case 03—Frequency Deviation for area 1.Figure 17
Case 03—Frequency Deviation for area 2.Figure 18
Case 03—Frequency Deviation for area 3.Figure 19
Case 03—Frequency Deviation for area 4.


### 5.4. Case 04 (System Response with Change of ∆PL, ∆PW, and ∆PS)

Case 04 considers both intermittent and nonintermittent power generation in all four areas for load frequency regulation with all conceivable system disturbances. This case connects the problems discussed in the three earlier cases at the same time. If changes in solar and wind power are accompanied by increases in the values of ∆PS and ∆PW, and changes in load value are accompanied by decreases in the value of ∆PL, then the nonintermittent power generation units must be modified to suit the power demand while still being within their constraints to keep the frequency deviation (+0.5) within a limit. If the nonintermittent power generation units fail to match the above criteria, the FA/FPA algorithm-based DMT can be used to determine the best flexible demand (such as electric vehicle charging) with a time constraint, which can then be incorporated to achieve zero frequency deviation. Figures 20–23 present the findings of the system response using the suggested controller to handle these changes in ∆PL, ∆PW, and ∆PS. The frequency deviation of the system for the proposed controller is superior in maintaining almost zero frequency deviation compared to other controllers, as shown in Figures 20–23.Figure 20
Case 04—Frequency Deviation for area 1.Figure 21
Case 04—Frequency Deviation for area 2.Figure 22
Case 04—Frequency Deviation for area 3.Figure 23
Case 04—Frequency Deviation for area 4.Table2 shows the MATLAB/Simulink’s numerical results for the prescribed four-area power system network for frequency deviation using different types of controllers and power generation cost using different optimization techniques. In addition to this, the ANFIS controller [48] was also tested for the considered network to mitigate frequency deviation problems. However, the performance was almost the same as that of the fuzzy controller. It was found that the LFC with LSTM provided the best performance with minimum overshoot and settling time compared to the other two considered controllers in all four areas. As discussed in Section 3, the accuracy of the proposed LSTM RNN methodology can be assessed with the help of ITAE and the corresponding numerical figures for all the 4 considered scenarios that are given in Table 3. It is clear from the results that the ITAE of the proposed methodology was well minimized by about 6.54% to 69.65% compared to other controllers. Power generation cost was also calculated for all the four distinct situations and depicted in Figure 24. It is clear that the application of the hybrid algorithm performs well in optimizing the flexible load demand so that the optimum generation cost can be obtained with the consideration of bounds in system frequency.Table 2
Performance measures of Proposed Controller.
S. NoCaseAreaParameterPID controllerFuzzy controllerProposed controller1.Case 01Area 01|Peak Mag| (Hz)0.01170.01120.0080Settling time (sec)18.448.086.38Area 02|Peak Mag| (Hz)0.01330.01270.0091Settling time (sec)17.848.316.65Area 03|Peak Mag| (Hz)0.01310.01260.0089Settling time (sec)17.988.386.72Area 04|Peak Mag| (Hz)0.01470.01400.0100Settling time (sec)13.448.526.802.Case 02Area 01|Peak Mag| (Hz)0.02220.02190.0109Settling time (sec)67.8859.3748.36Area 02|Peak Mag| (Hz)0.02510.02480.0124Settling time (sec)70.3460.8649.28Area 03|Peak Mag| (Hz)0.02500.02460.0122Settling time (sec)70.8260.5048.88Area 04|Peak Mag| (Hz)0.02790.02740.0137Settling time (sec)69.4661.4548.143.Case 03Area 01|Peak Mag| (Hz)0.01430.01410.0112Settling time (sec)57.8849.3738.36Area 02|Peak Mag| (Hz)0.01620.01590.0127Settling time (sec)60.3450.8639.28Area 03|Peak Mag| (Hz)0.01600.01570.0126Settling time (sec)60.8250.5038.88Area 04|Peak Mag| (Hz)0.01790.01760.0140Settling time (sec)59.4651.4538.144.Case 04Area 01|Peak Mag| (Hz)0.01590.01540.0099Settling time (sec)47.1243.8736.12Area 02|Peak Mag| (Hz)0.01800.01740.0110Settling time (sec)49.7745.1036.84Area 03|Peak Mag| (Hz)0.01770.01720.0112Settling time (sec)48.4844.7836.52Area 04|Peak Mag| (Hz)0.01990.01920.0124Settling time (sec)48.0643.5835.98Table 3
ITAE of the proposed controller.
S. NoCaseAreaPID controllerFuzzy controllerProposed controller1.Case 01Area 010.50230.29170.2740Area 020.23180.21010.1681Area 032.69511.02080.8179Area 040.82140.81100.76762.Case 02Area 010.47970.27780.2770Area 020.18030.15950.1592Area 032.17580.99320.7964Area 040.82000.80510.75263.Case 03Area 010.49520.28680.2859Area 020.18610.16460.1644Area 032.24601.02530.8220Area 040.83880.82250.77294.Case 04Area 010.49700.28860.2711Area 020.22940.20790.1663Area 032.66671.01000.8092Area 040.81270.80250.7595Figure 24
Power generation cost comparison for all cases.


## 5.1. Case 01 (System Response with All Energy Resources)

Case 01 deals with intermittent and nonintermittent power generation in all four areas. Figures8–11 show the simulation of the system’s reaction with a load variation of 0.01 p.u and the accompanying responses associated with the suggested controller, which delivers a superior and faster response when compared to traditional PID and fuzzy controllers. Moreover, better frequency response is required to reduce associated power generation cost. Nonintermittent power generation units in each of the four zones are responsible for this.Figure 8
Case 01—Frequency Deviation for area 1.Figure 9
Case 01—Frequency Deviation for area 2.Figure 10
Case 01—Frequency Deviation for area 3.Figure 11
Case 01—Frequency Deviation for area 4.


## 5.2. Case 02 (System Response with Change of ∆Pw)

For frequency regulation with the effects of wind power, Case 02 considers both intermittent and nonintermittent power generation in the four areas under study. Variations in solar power and load are retained as constant, whereas only variations in wind power are implemented with rising and falling ∆Pw values. As wind power is an intermittent power source, it is frequently encountered in the power system. Figures 12–15 present the findings of the system response using the proposed controller to handle these variations in ∆Pw values. Compared to PID and fuzzy controllers, frequency deviation provides a better and faster reaction while minimizing power generation costs with good frequency response, meeting the frequency deviation within ±0.5 when using the FA/FPA algorithm.Figure 12
Case 02—Frequency Deviation for area 1.Figure 13
Case 02—Frequency Deviation for area 2.Figure 14
Case 02—Frequency Deviation for area 3.Figure 15
Case 02—Frequency Deviation for area 4.


## 5.3. Case 03 (System Response with Change of ∆PS)

For frequency regulation with the effects of solar power, Case 03 considers both intermittent and nonintermittent power generation in the four areas under study. Only variations in solar power are implemented with a rise in the value of ∆PS, while variations in wind power and load remain constant. As solar power is an intermittent power source, it is frequently encountered in the power system. Figures 16–19 present the findings of the system response using the proposed controller to handle variations in ∆PS values. To maintain better frequency response, control inputs to nonintermittent power generation units such as thermal, and CHP are modified in a decreasing manner when solar power increases. Simultaneously, the suggested FA/FPA algorithm reduces power-generating costs by improving frequency response and achieving a frequency deviation of less than ±0.5.Figure 16
Case 03—Frequency Deviation for area 1.Figure 17
Case 03—Frequency Deviation for area 2.Figure 18
Case 03—Frequency Deviation for area 3.Figure 19
Case 03—Frequency Deviation for area 4.


## 5.4. Case 04 (System Response with Change of ∆PL, ∆PW, and ∆PS)

Case 04 considers both intermittent and nonintermittent power generation in all four areas for load frequency regulation with all conceivable system disturbances. This case connects the problems discussed in the three earlier cases at the same time. If changes in solar and wind power are accompanied by increases in the values of ∆PS and ∆PW, and changes in load value are accompanied by decreases in the value of ∆PL, then the nonintermittent power generation units must be modified to suit the power demand while still being within their constraints to keep the frequency deviation (+0.5) within a limit. If the nonintermittent power generation units fail to match the above criteria, the FA/FPA algorithm-based DMT can be used to determine the best flexible demand (such as electric vehicle charging) with a time constraint, which can then be incorporated to achieve zero frequency deviation. Figures 20–23 present the findings of the system response using the suggested controller to handle these changes in ∆PL, ∆PW, and ∆PS. The frequency deviation of the system for the proposed controller is superior in maintaining almost zero frequency deviation compared to other controllers, as shown in Figures 20–23.Figure 20
Case 04—Frequency Deviation for area 1.Figure 21
Case 04—Frequency Deviation for area 2.Figure 22
Case 04—Frequency Deviation for area 3.Figure 23
Case 04—Frequency Deviation for area 4.Table2 shows the MATLAB/Simulink’s numerical results for the prescribed four-area power system network for frequency deviation using different types of controllers and power generation cost using different optimization techniques. In addition to this, the ANFIS controller [48] was also tested for the considered network to mitigate frequency deviation problems. However, the performance was almost the same as that of the fuzzy controller. It was found that the LFC with LSTM provided the best performance with minimum overshoot and settling time compared to the other two considered controllers in all four areas. As discussed in Section 3, the accuracy of the proposed LSTM RNN methodology can be assessed with the help of ITAE and the corresponding numerical figures for all the 4 considered scenarios that are given in Table 3. It is clear from the results that the ITAE of the proposed methodology was well minimized by about 6.54% to 69.65% compared to other controllers. Power generation cost was also calculated for all the four distinct situations and depicted in Figure 24. It is clear that the application of the hybrid algorithm performs well in optimizing the flexible load demand so that the optimum generation cost can be obtained with the consideration of bounds in system frequency.Table 2
Performance measures of Proposed Controller.
S. NoCaseAreaParameterPID controllerFuzzy controllerProposed controller1.Case 01Area 01|Peak Mag| (Hz)0.01170.01120.0080Settling time (sec)18.448.086.38Area 02|Peak Mag| (Hz)0.01330.01270.0091Settling time (sec)17.848.316.65Area 03|Peak Mag| (Hz)0.01310.01260.0089Settling time (sec)17.988.386.72Area 04|Peak Mag| (Hz)0.01470.01400.0100Settling time (sec)13.448.526.802.Case 02Area 01|Peak Mag| (Hz)0.02220.02190.0109Settling time (sec)67.8859.3748.36Area 02|Peak Mag| (Hz)0.02510.02480.0124Settling time (sec)70.3460.8649.28Area 03|Peak Mag| (Hz)0.02500.02460.0122Settling time (sec)70.8260.5048.88Area 04|Peak Mag| (Hz)0.02790.02740.0137Settling time (sec)69.4661.4548.143.Case 03Area 01|Peak Mag| (Hz)0.01430.01410.0112Settling time (sec)57.8849.3738.36Area 02|Peak Mag| (Hz)0.01620.01590.0127Settling time (sec)60.3450.8639.28Area 03|Peak Mag| (Hz)0.01600.01570.0126Settling time (sec)60.8250.5038.88Area 04|Peak Mag| (Hz)0.01790.01760.0140Settling time (sec)59.4651.4538.144.Case 04Area 01|Peak Mag| (Hz)0.01590.01540.0099Settling time (sec)47.1243.8736.12Area 02|Peak Mag| (Hz)0.01800.01740.0110Settling time (sec)49.7745.1036.84Area 03|Peak Mag| (Hz)0.01770.01720.0112Settling time (sec)48.4844.7836.52Area 04|Peak Mag| (Hz)0.01990.01920.0124Settling time (sec)48.0643.5835.98Table 3
ITAE of the proposed controller.
S. NoCaseAreaPID controllerFuzzy controllerProposed controller1.Case 01Area 010.50230.29170.2740Area 020.23180.21010.1681Area 032.69511.02080.8179Area 040.82140.81100.76762.Case 02Area 010.47970.27780.2770Area 020.18030.15950.1592Area 032.17580.99320.7964Area 040.82000.80510.75263.Case 03Area 010.49520.28680.2859Area 020.18610.16460.1644Area 032.24601.02530.8220Area 040.83880.82250.77294.Case 04Area 010.49700.28860.2711Area 020.22940.20790.1663Area 032.66671.01000.8092Area 040.81270.80250.7595Figure 24
Power generation cost comparison for all cases.


## 6. Conclusion

This work discussed the effect of fast and unpredictable power variations generated by intermittent power generation sources and electric vehicles on the frequency stability of modern power systems. Active power fluctuations in real-time were investigated using a deep learning strategy based on a long short-term memory recurrent neural network. The observed power fluctuations could be used as a control reference for automatic generation control to maintain better system frequency and obtain optimum generation cost with the use of FA/FPA based demand management techniques. The suggested method was applied to the realistic model of an Indian power system integrated with distributed generation technology and validated and compared to the classical methods. Simulation results revealed decent improvements in frequency response performance indices, as the maximum peak overshoot was decreased by 21.25% to 51.2%, settling time was lowered by about 23.34% to 65.40% and ITAE was minimized about 6.54% to 69.65% for the suggested control technique compared to other controllers. The simulation results clearly indicate the importance of power fluctuation identification as well as the benefits of the proposed strategy. The findings show that the proposed technique was successful in improving controller performance by minimizing performance characteristics such as peak overshoot, settling time, and ITAE.



---

*Source: 1281248-2022-10-31.xml*