One of the main strength points of the UK's ES policy is the reduction of the operational cost for ES devices due to the removal of double network charges in the electricity markets. This is backed up by facilitating the planning permission for ES devices on a national and local scale. Another ES enabler factor is the co-location of ES devices with FiT and RO supporting schemes, which is a step forward in recognizing ES as a key enabler to greener electricity systems.

In terms of the weaknesses, the energy storage definition limits ES's role of generation only while this generation classification prevents a wide range of other revenue streams. Other barriers are preventing network owners from owning and operating ES from all sizes, payment of FCLs for small-scale ES introducing fixed charged for behind the meter storage, and de-rating the ES's capacity in the CM. These barriers can reduce the overall profit for ES assets.

Despite the aforementioned weaknesses, a number of opportunities have arisen. For instance, strengthening the 'unbundling' requirements for network owners can encourage private parties to invest in ES and stack multiple revenues from different services. Another opportunity is the shift towards allowing multiple smaller-scale ES assets to be aggregated together to provide vital ancillary services. Although stacking multiple revenues may be attractive for all ES assets, a threat of cannibalisation of the available revenue streams by all ES assets may occur. Another threat is the current high capital cost of ES.

The above analysed SWOT factors and their effects on ES's business case can be hugely changed due to the UK's exit from the EU (Brexit). The UK's electricity markets and the regulatory landscape are currently compliant with the EU regulation. Indeed, some studies such as in [108] analysed the implications of Brexit on the electricity sector and how the UK could lose the economic benefits of the interconnectors of some EU countries. These interconnectors usually provide valuable services to the UK's electricity network by managing intermittent RESs. In the case of a Brexit agreement that does not involve electricity market integration or interconnector share, there is a significant need for ES and other flexibility options to mitigate RESs intermittency [109]. Therefore, it seems that Brexit can raise the deployment of ES devices in the UK. A recent study also confirmed this finding by stating that the economic investment in large-scale ES to increase the UK's peaking capacity may be boosted without the EU's interconnectors sharing [110].

In case of a Brexit scenario that limits the UK's access to the EU's single market or a trade arrangement that sees tariffs imposed between the UK and the bloc, importing batteries from the EU may not be cost-effective to meet the local UK's demand. Therefore, the UK government should adopt policies to build battery gigafactories in the UK to cover the local demand whether it is for electric vehicles or the grid. The Faraday institution estimates that at least eight gigafactories are needed in the UK by 2040 [111].

#### **7. Conclusions**

ES is recognised as a key technology to mitigate the intermittency of many RES. Earlier research found many barriers to the rollout of ES in current energy networks. Since 2017, energy regulators in the EU and the UK proposed changes to enable a level playing field for ES and remove these barriers. The changes include (i) defining 'Electricity Storage' in the main legislation; (ii) removing double network and balancing charges for storage; (iii) co-locating storage with renewable generation sites that are supported through consumption levies policies; (iv) limiting the storage operation by network owners; (v) facilitating ES planning permission; and (vi) employing de-rating factors for storage in the capacity market (CM). Since the proposed regulatory changes at the UK and EU level are similar, the UK is taken as a case study considering its market design and relevant regulations.

This paper presented a SWOT analysis to explore the impact of the recent changes on the business potential of BESS and examined whether these regulatory changes have been supportive to BESS's business case in the UK.

Three main benefits of the recent regulatory changes were found. First, the removal of the double network charging for ES by eliminating the demand residual charges (when importing electricity from the grid) can reduce its operational cost. Second, ES co-location with RES sites that receive government subsidies can not only boost its business case but also recognise ES as a key player in integrating these intermittent resources. Third, facilitating ES access to the grid by allowing cost-effective infrastructure access and planning permission can positively affect investment decision in ES. The recent regulation supported faster implementation of composite projects that have a total capacity above 50 MW (for example, a generation unit with 40 MW and ES with 40 MW).

However, a number of drawbacks were found in the recent regulatory changes that may outweigh these benefits. First, the new definition for ES recognised it as a generation device, thus it has to compete with traditional generator assets in many instances, which it cannot do cost effectively. Second, the introduced regulations do not consider the different types and sizes of ES and tend to support large-scale ES with a capacity of 100 MW or above (similar to generators). However, there is a key role for smaller-scale ES in current energy systems in the form of BESS as discussed in the paper. From the perspective of the regulators, this makes sense as they do not want to disrupt the current energy market structure by creating an independent storage asset class. Instead, they are looking for a technological advance for different types of ES to increase its energy and power density to place it in the traditional generator's category. Third, only large-scale ES assets (above 100 MW) are exempt from paying FCLs, however, most of the current ES projects especially BESS are far below 100 MW. As such, in the case of BESS, this might be a longtime coming, limiting its value in current energy systems under current regulatory and market regimes. In the CM, for example, higher-duration BESS receives more payment than smaller-duration.

Despite the previous drawbacks and a high current capital cost for BESS, many opportunities have been found for private parties who are encouraged to own and operate ES devices to stack multiple revenues from different services. The recent regulation meant that private parties are in the best place to provide ES services. This is along with the suggestion that allows several ES units to be aggregated, and thus, provides services in the wholesale market.

Finally, we suggest a number of policy implications from the above SWOT analysis results. First, an independent asset class should be created for ES because the current energy markets are designed without electricity storage in mind. Second, a unique definition for ES that reflect its features is needed. For instance, the current definition for both the EU and the UK does not recognise the ES service when charging the device to help store the exceeded power from a wind farm. Third, in the CM where the capacity of the BESS asset is de-rated, the economic assessment of the degradation cost should be taken into account. This is because degradation can affect the availability of these assets, which in turn can affect the reliability and the energy security of the electricity network should the implementation of ES be increased.

**Funding:** This research received no external funding.

**Acknowledgments:** Teesside University is gratefully acknowledged for fully supporting Ahmed′ s PhD scholarship. We are grateful also to the two anonymous reviewers for their suggestions to improve the paper.

**Conflicts of Interest:** The authors declare no conflict of interest.

**Author Contributions:** Conceptualization, A.G. and T.C.; Methodology, A.G. and T.C.; Formal analysis, A.G., M.A.-G., M.S., N.D. and T.C.; Investigation, T.C., N.D. and M.S.; Writing—Original draft preparation, A.G. and T.C.; Writing—Review and editing, T.C., M.A.-G., N.D. and M.S.; Visualization, T.C.; Supervision, T.C., N.D., M.A.-G. and M.S. All authors have read and agreed to the published version of the manuscript.

#### **References**

In Proceedings of the 2012 9th International Conference on the European Energy Market, Florence, Italy, 10–12 May 2012; pp. 1–8.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

### *Article* **Time-Frequency Image Analysis and Transfer Learning for Capacity Prediction of Lithium-Ion Batteries**

#### **Ma'd El-Dalahmeh \*, Maher Al-Greer , Mo'ath El-Dalahmeh and Michael Short**

School of Computing, Engineering and Digital Technologies, Teesside University, Middlesbrough TS1 3BX, UK<EMAIL_ADDRESS>(M.A.-G<EMAIL_ADDRESS>(M.E.-D<EMAIL_ADDRESS>(M.S.) **\*** Correspondence<EMAIL_ADDRESS>Tel.: +44-(0)-16-4221-8121

Received: 18 September 2020; Accepted: 16 October 2020; Published: 19 October 2020

**Abstract:** Energy storage is recognized as a key technology for enabling the transition to a low-carbon, sustainable future. Energy storage requires careful management, and capacity prediction of a lithium-ion battery (LIB) is an essential indicator in a battery management system for Electric Vehicles and Electricity Grid Management. However, present techniques for capacity prediction rely mainly on the quality of the features extracted from measured signals under strict operating conditions. To improve flexibility and accuracy, this paper introduces a new paradigm based on a multi-domain features time-frequency image (TFI) analysis and transfer deep learning algorithm, in order to extract diagnostic characteristics on the degradation inside the LIB. Continuous wavelet transform (CWT) is used to transfer the one-dimensional (1D) terminal voltage signals of the battery into 2D images (i.e., wavelet energy concentration). The generated TFIs are fed into the 2D deep learning algorithms to extract the features from the battery voltage images. The extracted features are then used to predict the capacity of the LIB. To validate the proposed technique, experimental data on LIB cells from the experimental datasets published by the Prognostics Center of Excellence (PCoE) NASA were used. The results show that the TFI analysis clearly visualised the degradation process of the battery due to its capability to extract different information on electrochemical features from the non-stationary and non-linear nature of the battery signal in both the time and frequency domains. AlexNet and VGG-16 transfer deep learning neural networks combined with stochastic gradient descent with momentum (SGDM) and adaptive data momentum (ADAM) optimization algorithms are examined to classify the obtained TFIs at different capacity values. The results reveal that the proposed scheme achieves 95.60% prediction accuracy, indicating good potential for the design of improved battery management systems.

**Keywords:** lithium-ion battery; capacity prediction; state of health estimation; time–frequency image analysis; continuous wavelet transform (CWT)

#### **1. Introduction**

#### *1.1. Motivation*

Lithium-ion batteries (LIBs) are recognised as a key future form of technology for renewable energy and electric vehicles (EVs) due to their high power and energy densities, low maintenance cost, long lifetime, and low self-discharge rate [1]. However, to optimise the energy performance of the LIBs, prolong their life cycle, and reduce their cost, it is thus critical to monitor the internal state of the battery, such as state-of-charge (SoC), state-of-health (SoH), and remaining useful life (RUL) [2,3]. During operation, the continuous determination of the LIB's internal state is achieved through the battery management system (BMS), which guarantees the reliability and efficiency of LIBs. Over the battery's lifetime, however, the capability for LIBs to provide a certain amount of power and store energy is reduced due to internal ageing phenomena [4,5]. Therefore, monitoring SoH is an important and difficult task and one of many functions performed by the BMS [6]. SoH is typically the ability of LIBs to store energy compared to its initial value. The battery's SoH is often quantified by determining its capacity or resistance parameters [7]. When the capacity parameter is utilised as an indicator of the battery's SoH, the SoH is known as the ratio of the battery capacity at current cycle to its rated capacity at the beginning of life or initial capacity provided by the battery manufacturer [8]. An accurate evaluation of the battery's capacity provides reliable battery performance and forecasts failure conditions, to avoid the risks posed by the battery. Therefore, the useful life of the cell can be used completely without affecting LIB safety. Nonetheless, LIBs are complicated electrochemical devices which have unique non-linear functioning that is reliant on different internal and external conditions [9]. This makes the prediction of the capacity a relatively challenging task [10].

#### *1.2. Previous Work*

Many researchers have reported interesting methods for the online evaluation of the capacity of an LIB [11,12]. These capacity estimation techniques can be categorised into two types: (1) model-based approaches, including equivalent circuit models (ECMs) [13–15] and electrochemical models (EMs) [16,17]; (2) the data-driven approaches using neural network (NN) methods [18] and kernel regression methods [19]. In the case of ECM-based models, which are a combination of lumped elements such as resistors, capacitors, and inductors, their main advantage is ease of modelling and implementation in BMS. Plett [13] presented an online estimation of LIB cell capacity by combining an extended Kalman filter (EKF) and an enhanced self-correcting equivalent circuit model. However, ECMs are unable to capture the dynamic behaviour of the LIB and incapable of describing its internal reactions because of the lack of a physical-chemical representation [20].

Thus, special attention has been given to EMs for the capacity estimation of LIBs. The EMs are based on a set of coupled partial differential equations (PDEs) to explain the actual electrochemical reaction process within LIBs and describe its internal reaction process [21]. In doing so, it can capture the cell's dynamic behaviour with a greater degree of accuracy than ECMs. The authors in [22] proposed two sliding mode observers to determine the SoC and SoH of an LIB combined with a reduced order EM. However, the number of partial differential equations in EMs is large and, thus, their solution requires a significant amount of computational time. Creating precise LIB models is not easy since, usually, detailed physical understanding and in depth experimental data are needed in a controlled situation, and these tend to be either unfeasible or too costly [11]. On the other hand, learning algorithms or data-driven estimation techniques have recently been applied to estimate LIB capacity [23]. Data-driven approaches have gained more popularity in recent years for capacity estimation, since these methods do not require an understanding of LIB working principles and are only dependent on the collected/measured experimental data [24]. Examples of such methods are neural networks (NN) [18], support vector machines (SVM) [25], and k-nearest neighbour (kNN) regression [19]. These methods have been used to estimate capacity by learning the dependence of the cell's features as extracted from the measured signal of the voltage, current, and temperature [26]. The capacity estimation framework generally encompasses three key steps: (1) data acquisition; (2) exploration of historical data such as voltage, current, and voltage to extract and construct promising health indicators or features; and (3) using the selected health indicators to build a machine learning model to learn the correlation between the capacity and chosen indicators [12]. Of these three steps, the main challenge is to extract useful indicators from the measured signals to describe more precisely the degradation phenomena of the LIB over its lifetime [27]. For instance, the authors in [28] manually selected five diagnostic features from a charging curve to indicate LIB capacity. These diagnostic features were the initial charge voltage, the constant current (CC) charge capacity, the constant voltage (CV) charge capacity, the final charge voltage, and the final charge current. The selected diagnostic features were then input to a relevance vector machine (RVM) model to estimate the capacity of the

LIB. The above study investigated the diagnostic indicators under predetermined operation conditions, such as certain current or voltage ranges, which involve CC charge and cycling discharge. Nonetheless, in real-world applications like EV applications, the LIB never operates in a static scenario.

Few studies have evaluated a battery's capacity estimation under a dynamic current profile. Venugopal et al. [29] extracted 18 time-domain diagnostic features which affect the battery capacity from the measured voltage, current, and temperature of an LIB operated under a dynamic charging/discharging current profile. The selected features were fed into an independently recurrent NN (IndRNN) for capacity evaluation. The authors in [30] developed a data-driven LIB health diagnosis method based on time and frequency domain features such as mean, covariance, and kurtosis from the time domain features; from the frequency domain features, the authors selected median frequency, band-power, signal-to-noise ratio (SNR), and total harmonic distortion (THD) as the features to determine the battery's capacity. The extracted time and frequency features are then evaluated and ordered based on trendability and monotonicity metrics to select the most features that provide high accuracy and lower computational burden to estimate the battery's capacity. A Gaussian process regression (GPR) model was then designed to capture the correlation between the selected features and the capacity of the LIB.

To enhance the quality of the extracted diagnostic characteristics under a variable current profile, Jonghoon Kim [31] proposed an advanced signal processing method known as discrete wavelet transform (DWT) with multiresolution analysis (MRA) to analyse the non-linearity and non-stationarity behaviour of the battery terminal voltage under dynamic load profile. More useful diagnostic features were extracted for capacity evaluation in the time and frequency domains, respectively. Similarly, the authors in [32] proposed a fast wavelet transform to extract the dynamic features of voltage and current. Then, an xD-Markov machine learning model was established to obtain the battery's capacity from the extracted features. All of the above mentioned studies considered the time or frequency domain for the extraction of the most useful diagnostic features to describe the degradation process inside the LIB. Analyses are usually used to extract indicators from the measured signal and the time and frequency domains, known as conventional feature extraction techniques. However, conventional feature extraction and selection are time-consuming and labour-intensive processes requiring detailed knowledge of the relevant features of the system. This selection process can introduce uncertainty and biased results [33]. Moreover, the performance of machine learning techniques is based on the quality of the features extracted from the measured data. That is, if the extracted characteristic features are weak, this can negatively impact the performance of these approaches [34,35]. Another study [33] reported the difficulty of identifying suitable features with the relevant information required for capacity evaluation.

#### *1.3. Contributions*

To overcome the aforementioned issues, a time–frequency image (TFI) analysis-based approach has been proposed to analyse the non-stationary and non-linear behaviour of the LIB terminal voltage in both time and frequency domains and for online prediction of LIB capacity. Moreover, in this paper, we concentrate on the operation of the battery under the variable current load profiles of different battery cycles. The key benefit of the proposed solution is that the battery's terminal voltage is presented in a two-dimensional (2D) representation (time–frequency domain), which provides more helpful characteristics information related to the battery degradation than a one-dimensional (1D) representation (time or frequency domain). Wavelet transforms combined with a deep learning method have been developed for the analysis of the characteristics of LIBs under different operating conditions. The proposed method utilises a deep learning featureless methodology to learn the features of the data automatically, unlike traditional machine learning methods. This avoids manual feature extraction, which relies heavily on human knowledge and experience. Finally, the proposed scheme is a non-parametric estimation method, and, thus, offline testing and modelling are not required. To validate the proposed technique, experimental data on LIB cells from the experimental datasets

published by the Prognostics Center of Excellence (PCoE) NASA were used. The results reveal that the proposed scheme improves over competing baseline schemes and achieves 95.60% prediction accuracy. This indicates good potential for the design of improved battery management systems based upon this method.

#### *1.4. Structure*

The remainder of the paper is organised as follows: Section 2 introduces the randomised battery dataset analysis. Section 3 presents the proposed capacity imaging analysis scheme. Section 4 presents the results and discussion of the obtained results. Conclusions and future work directions are presented in Section 5.

#### **2. Randomised Battery Dataset**

The practical operating environment of a real-world EV battery includes a dynamic and partial driving pattern. Most of the literature utilises a battery dataset with limited assumptions; for example, the battery is cycled using only a constant current profile and specific voltage limit. Nevertheless, these assumptions do not cover the real operating situation of EV batteries. In this study, a randomised battery usage dataset was adopted from the NASA Ames Prognostics Center of Excellence [36,37], to ascertain the impact of actual, dynamic EV driving cycles. This dataset contains the ageing results of four LIBs named RW9, RW10, RW11, and RW12, acquired at room temperature. The general properties of the battery are summarised in Table 1. These four LIBs were cycled using two cycling protocols known as random walk cycling mode and reference charge and discharge cycling mode. The cycle process is shown in Figure 1 [36].

**Table 1.** The general characteristics of the tested cells.

#### *2.1. Random Walk Cycling Mode*

− − − − − − A sequence of currents set varying between (−4.5 A, −3.75 A, −3 A, −2.25 A, −1.5 A, −0.75 A, 0.75 A, 1.5 A, 2.25 A, 3 A, 3.75 A, 4.5 A) is used for charging and discharging; the four LIBs were continuously cycled. Hence, negative currents are related to the charging operation, while positive currents denote the discharge operation of the batteries. This mode of charging and discharging protocol is known as random walk (RW) operation mode. The aforementioned current sequence is randomly applied to an LIB for five minutes, which is identified as a step in the dataset. It is important to mention that a single random walk (RW) cycle consist of 1500 RW steps and 1500 rests; each RW profile consists of numerous RW cycles. After every RW profile, the battery undergoes several reference charging and discharging tests to measure its capacity and calculate its *SoH* value. Figures 2 and 3 show the measured voltage, current, and temperature of the first and last 100 RW charging and discharging steps of battery RW9, respectively [29].

**Figure 2.** Voltage, current, and temperature of the first 100 steps measured for battery RW9.

Time (h) **Figure 3.** Voltage, current, and temperature of the last 100 steps measured for battery RW9.

#### *2.2. Reference Charge and Discharge Cycle Mode*

௨௧ ௨௧ After the start of each RW cycle, a sequence of reference charging and discharge current profiles is implemented to set a standard benchmark for the battery's SoH. Initially, by applying a 2 A constant current profile, the LIB is charged to its maximum voltage and then a 4.2 V constant voltage is sustained until its current falls to 0.01 A, then it rests for 20 min. Afterwards, 2 A discharge constant current profile is applied to the LIB until its voltage reduces to its minimum voltage, 3.2 V. This procedure is known as reference charging and discharging cycle mode [38]. To measure the LIB's capacity and calculate its *SoH* value, after every RW cycle, the current cell capacity (*Qcurrent*) is calculated using the Coulomb counting method as follows:

$$Q\_{current}(\mathbf{t}) = \int\_{-0}^{t} I\_d(t)\mathbf{d}\mathbf{t} \tag{1}$$

ௗ ௗ where *I<sup>d</sup>* is the total discharge current of the battery cell. Once the battery capacity is calculated, the *SoH* of the battery can be calculated, as shown in (2).

$$\text{SoH} = \frac{\text{Q}\_{\text{Current}}}{\text{Q}\_{\text{Freslt}}} \text{-100\%} \tag{2}$$

௨௧ ி௦

where *QCurrent* is the measured capacity after every RW cycle and *QFresh* is the measured capacity of the battery at the beginning of its life. The capacities of the measured cells of the four batteries are shown in Figure 4.

**Figure 4.** Capacities of the measured cells for four batteries, RW9, RW10, RW11, and RW12.

As illustrated in Figure 4, the capacity fade is a non-linear and non-homogeneous process since each cell degrades in different ways, even under the same test conditions. Therefore, the main aim of this study is to investigate if the time–frequency image analysis method can capture the non-stationary behaviour of the battery during cycling.

#### **3. The Proposed Capacity Imaging Analysis Scheme**

Figure 5 shows the block diagram of the proposed TFI paradigm. Here, the terminal voltage of the cycled battery using randomised current profile data is utilised to predict the capacity of the battery. Initially, the terminal voltage of the battery is measured at different capacities, and then the measured voltage is transformed from 1D raw data to a 2D time-frequency image (TFI) by applying a CWT algorithm. The raw data of the measured voltage for the LIB at different capacities contains only the time-domain information, but the converted 2D TFI features of the raw data clearly represent the time and frequency domain information at once. Finally, the generated TFIs for different battery capacities are fed into a deep learning convolutional neural network for feature extraction and image classification. The following subsections explain the capacity prediction steps in detail.

0 20 40 60 80 100 120 140 160 180 200 Day

RW9 RW10 RW11 RW12

0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2

**Figure 5.** General flow chart of the proposed method for TFI capacity estimation.

#### *3.1. Time–Frequency Image (TFI) Analysis*

The main aim of this research was the analysis and classification of the measured voltage of LIBs at different capacities using TFI analysis. As stated in Section 1, most studies have used traditional methods of time or frequency domain to analyse the LIB's measured signals and extract diagnostic characteristics to describe the degradation inside the battery cell. Like most real-life signals, the measured LIB terminal voltage can exhibit non-stationary characteristics [31,32]. Thus, analysing the LIB's measured voltage using traditional time or frequency domains is insufficient to extract comprehensive features about the degradation process inside the battery [39]. Nevertheless, time–frequency approaches can extract several domain features in order to assess the measured signal for the time and frequency domains, precisely extracting better features from the measured signal [40]. The main goal of a time-frequency signal processing analysis is to extract useful information features from the measured battery terminal voltage by converting the time series signal into the time–frequency domain [41,42].

Various methods can be used for time-frequency representation, such as CWT, Wigner-Ville distribution, and short-time Fourier transform (STFT). Of these, CWT is employed to transform the measured signal from the time domain to a TFI, whose energy concentrations visualise changes in frequency components over time as the battery degrades [43]. In the proposed prediction scheme, shown in Figure 5, a CWT was applied to the measured terminal voltage, to transform it from a time domain signal into a time-frequency domain scalogram image. The aim of this conversion process was to extract more useful information about the degradation process inside the battery during a randomised charging/discharging current profile. Through a set of wavelet basis functions, the wavelet transforms (WT) degraded the LIB's terminal voltage in the time-frequency domain. This transform employed a wavelet function of a finite bandwidth in terms of the time and frequency domains. Via the scaling and translation of the wavelet basis function, the signal was degraded with various resolutions at differing scales of time and frequency [44]. Equation (3) describes the mathematical scaling and translation of basic wavelet function:

$$
\psi\_{a,b}(t) = \frac{1}{\sqrt{a}} \psi \left(\frac{t-b}{a}\right) \tag{3}
$$

where ψ*a*, *<sup>b</sup>* (*t*) is an analysis wavelet and is called a child wavelet, *a* ∈ (0, +∞) is the scale parameter of the wavelet transform, and *b* ∈ (−∞, +∞) is the translation or shift parameter in time. The function ψ(*t*) is known as the mother wavelet with finite length and fast depletion. Two limit conditions must be satisfied in the mother wavelet signal, which are ( R <sup>+</sup><sup>∞</sup> −∞ <sup>ψ</sup>(*t*)*dt* <sup>=</sup> <sup>0</sup> and <sup>R</sup> <sup>+</sup><sup>∞</sup> −∞ <sup>ψ</sup>(*t*) 2 *dt* = 1) [32]. For the given time series signal *x*(*t*), the wavelet coefficients *wt*(*a*, *b*) are obtained by the convolution integral of the mother wavelet ψ(*t*) and the given signal *x*(*t*), as presented in (4):

$$wt(a,b) = \frac{1}{\sqrt{a}} \int\_{-\infty}^{\infty} x(t) \psi^\*(\frac{t-b}{a}) dt\tag{4}$$

where ψ ∗ means the complex conjugate of function ψ. Throughout this procedure, the signal *x*(*t*) is divided into a sequence of scaled and shifted wavelet coefficients, in which the wavelet set is the basis function. After this, the signal *x*(*t*) is altered by CWT and sent to the 2D time-frequency domains [45]. With this approach, the 1D time domain signals are transformed into TFI. Figure 6 shows an example schematic of the battery measured voltage at three different capacities and the transformed time-frequency domain representation features for each capacity. It can be observed that there are clear discriminative variations in the CWT coefficients at each capacity in the TFI. Therefore, battery degradation is well reflected by the multi-domain TFI features, which can thus be used as input for the deep learning convolutional neural network (CNN) to classify the battery's capacity during the degradation.

**Figure 6.** Measured voltage of lithium-ion battery and transformed TFI energy concentration spectrum information of the measured voltage at three different capacity values.

#### *3.2. Time-Frequency Image Analysis and Classification Using Deep Learning Algorithm*

The obtained TFIs from the battery measured voltage at different capacities are fed into the deep learning predictive model to extract the relationship between the TFIs and corresponding capacity. In this research, a data-driven method based on transfer deep learning model is adopted to perform capacity classification in LIB.

Generally, a DL-CNN is built from three types of layers, namely (1) convolution layers, (2) pooling layers, and (3) fully connected layers [44]. The convolution and pooling layers are linked to form convolution blocks, and many of these blocks are stacked to create a deep architecture. The fully connected layer has generally been used as the final layer in the classification or regression. The general architecture of the DL-CNN is shown in Figure 7 [46].

Convolution + ReLU Pooling Convolution + ReLU

<sup>ᇱ</sup> = ቌ

∈ெೕ

ିଵ

∗

 + ቍ

Feature extraction Classification

**Figure 7.** Deep learning convolutional neural network architecture.

The convolutional layer combines the input image from the initial layer with several filters, known as kernels, and these are then fed to the activation function to create a features map [47]. The output features map is the convolutional result of the input maps and can be calculated as in (5) [48]:

$$\mathbf{x}\_{j}^{\prime} \stackrel{f}{=} \mathbf{f} \left( \sum\_{i \in M\_{j}} \mathbf{x}\_{i}^{\prime -1} \ast \mathbf{k}\_{ij}^{\prime} + \mathbf{b}\_{j}^{\prime} \right) \tag{5}$$

Here, ∗ is the convolutional operation, *x<sup>i</sup>* is ith input map, *k* is a F × F convolutional filter, *b<sup>j</sup>* is the additive bias, *M<sup>j</sup>* is the feature map of the convolutional layer, and *l* is the lth layers in the neural network. Lastly, the obtained results from the convolutional layers are fed to the activation function. The common used activation function is the rectified linear unit (ReLU), defined as in (6) [47–49]. ∗

$$ReLU(\mathbf{x}) = \max(0, \mathbf{x}) \tag{6}$$

For the pooling layer, which follows the convolutional layer, low-resolution maps are created from the most significant local information. The maximum value is derived from each region by using the max pooling layer, as shown in Figure 8 [48]. In the fully connected layer, a 1D vector is utilized to represent all the feature maps, which is fully connected to the output layer. The output of the fully connected layer is described as given in (7): ௗ

$$O\_i = f\left(\sum\_{j=1}^d \mathbf{x}\_j^F w\_{ij} + b\_i\right) \tag{7}$$

= 0.8

where *O<sup>i</sup>* is the output layer, *x<sup>j</sup> F* is the *j th* neuron in the fully connected layer, *wij* is the weight related to *O<sup>i</sup>* and *x<sup>j</sup> F* , *b<sup>i</sup>* is the bias corresponding to *O<sup>i</sup>* , and *f* is the activation function [48,50]. ி

= 2.1

ி

**Figure 8.** Max pooling layer.

In this study, two deep transfer learning algorithms were applied to classify the generated results from TFI. The classification results are presented in the Results and Discussion section.

#### **4. Results and Discussion**

The proposed scheme (see Figure 5) was implemented using the MATLAB environment. First, the results of TFI estimation using complex Morlet mother wavelet transform (CMMW) will be presented in this section, and then the results of image analysis and classification using deep learning algorithms will be demonstrated.

#### *4.1. Time–Frequency Image (TFI) Results*

Figure 9a shows the measured voltage signal of the first cycle of RW9 at the beginning of the life of the LIB, indicating that no degradation had occurred at this point and the battery's capacity was full (here, *C* = 2.1 Ah). Figure 9c presents the measured voltage at the end of the LIB's life and shows that the battery degraded, and its capacity decreased to its minimum value (*C* = 0.8 Ah). From both results, it can be clearly observed that the battery had aged and that the time period of the measured voltage (31.07 h) at the end of life was less than that for the first cycle of the battery (93.18 h). This is because the battery has reached its threshold voltage level very frequently due to an increase in the internal resistance of the LIB, and this inherently reduces the LIB capacity.

**Figure 9.** Time-domain measured voltage and plot of TFI energy concentration spectrum of battery cell (RW9): (**a**) measured voltage signal (beginning of life), (**b**) wavelet energy concentration spectrum (beginning of life), (**c**) measured voltage signal (end of life), and (**d**) wavelet energy concentration spectrum (end of life).

To extract appropriate features capable of describing the degradation phenomena inside the battery from the measured voltage, CMMW was applied using Equations (3) and (4) to the LIB terminal voltage, as illustrated in Figure 9b,d. In the TFI, the energy concentration of the measured voltage of the LIB is shown at different capacities, with the horizontal and vertical axes representing time and frequency, respectively. The amplitudes of the wavelet coefficients are represented in different colours on the TFI [47]; red colour indicates that the level of energy density is high. In Figure 9b, when the LIB is at the beginning of its life, the energy distribution is concentrated in the middle frequency range of the image and varies from 1 to 2 Hz [51]. In contrast, Figure 9d shows the energy distributed in the middle and high frequency bands (up to 100 Hz) of the image, meaning that the amplitude of the wavelet coefficients increased to cover the rapid changes between the upper and lower voltage range. A comparison of the TFIs for the battery at the beginning and end of its life clearly shows a significant difference in the energy density distribution. Therefore, the capacity degradation of the battery is well reflected by the TFI information and multiple domain features can be calculated using TFI.

The datasets for the four test batteries were processed by the proposed CMMW. Figure 10 presents a sample of the results of the time-frequency images of the measured LIB terminal voltage at different capacities. They show the energy concentration distribution of the battery terminal voltage according to the level of degradation in the TFI. As shown in Figure 10, as the battery's capacity decreases, the distribution of the energy in the TFI changes, clearly illustrating the degradation process inside the battery cell. From the extracted wavelet coefficients using CMMW, the energy concentrations for wavelet coefficients are calculated in the form of TFIs, which are then fed to the pre-trained CNN for image pattern recognition and classification.

**Figure 10.** TFI energy concentration spectrum results of the battery RW9 measured voltage at different capacities: (**a**) 2.1, (**b**) 1.8, (**c**) 1.6, (**d**) 1.4, (**f**) 1.2, (**e**) 0.8 Ah.

To further validate the proposed technique, the experimental datasets of the LIBs RW10, RW11, and RW12 at different capacity ranges from 2.1 to 1.2 Ah have been tested. Table 2 demonstrates the effectiveness of the proposed TFI method to predict the capacity of these cells. Ongoing research is mainly attempting to apply the proposed technique to quantify which type of degradation mode most affects the battery's capacity.

**Table 2.** TFIs energy concentration spectrum results of RW10, RW11, and RW12 LIBs measured voltage at different capacities.

#### *4.2. DL-CNN Results*

In this subsection, we demonstrate how the generated TFIs from the measured terminal voltage at different capacities through CWT were fed into AlexNet and VGG-16 DL-CNNs for capacity classification, after they had been trained for TFI classification. The Stochastic gradient descent (SGDM) and adaptive moment estimation (ADAM) optimisation algorithms were used to train the generated TFIs.

#### 4.2.1. AlexNet Neural Network

The AlexNet neural network was created in 2012 by Krizhevsky et al. [52] and is built from eight layers (five convolutional and three fully connected layers). In this study, we assumed that the battery's capacity is classified into five classes from the first measured capacity value, which is 2.1 Ah, to the measured capacity value of 1.20 Ah in the experimental dataset—similar to the work presented in [53,54]. The measured voltage of each battery per RW cycle was labelled to show its corresponding capacity. The datasets of LIBs RW9–12 were split into training data (70% of all TFI in the four folds) and 30% for testing data. Therefore, the LIB capacity estimation can be considered a 5-class classification. The size of the generated TFIs is 227 × 227 × 3, which is suitable for the pretrained AlexNet network. The training settings for modelling the network and the AlexNet architecture are given in Tables 3 and 4. The AlexNet output layer was replaced with a new output layer with five neurons corresponding to five classes of capacity values. Since the AlexNet network is not trained to classify TFIs, only the weights of the last convolution layer and fully connected layer were trained, while the first four convolution layers were not. Training only the last layers of the AlexNet network reduced the training time of the model [44].

**Table 3.** Hyperparameter settings for the trained AlexNet model.

**Table 4.** AlexNet architecture.

During the training phase, SGDM and ADAM optimisers were utilised with an initial learning rate of 0.0001, and the batch size was set at 50. Once the training process was finished, the accuracy of the classification by the model was evaluated using the test dataset. A deep learning toolbox from MATLAB was employed to train and test the model. Classification accuracy was calculated to evaluate the model's accuracy, and the test dataset results are given in Table 5. The results show that the trained model correctly classified the test data with an accuracy rate of 95.69%. Moreover, the SDGM and ADAM optimisers achieved good performance regarding updating the weights of our model. Thus, these classification results demonstrate that the proposed method achieved accurate predictions of battery capacity for each battery cell.

**Table 5.** Capacity prediction accuracy for each battery cell using AlexNet.

#### 4.2.2. VGG-16 Neural Network

The second pretrained model tested in this study is a convolutional neural network from the Oxford Visual Geometry Group (VGG) which is a 16-layer network [55]. VGG-16 has achieved classification accuracy performance on the ImageNet dataset and Table 6 shows the layer structure of VGG-16. With the same hyperparameter settings, the VGG-16 model is compared with the AlexNet model and the prediction accuracy results are presented in Table 7. The comparison classification results from Tables 5 and 7 for AlexNet and the VGG-16 models show that as the DL-CNN becomes deeper, the accuracy of the model will increase. However, as the DL-CNN becomes deeper, the training time will increase, and more computational complexity will be added to the model.

**Table 6.** VGG-16 architecture hyperparameters.

**Table 7.** Capacity prediction accuracy for each battery cell using the VGG-16 model.

#### **5. Conclusions**

This paper proposed a new capacity evaluation method for LIBs using multi-domain features obtained from a TFI algorithm. The terminal voltage of the battery was transformed into a 2D image feature using CWT instead of 1D raw data of terminal voltage or the extraction of multiple statistical features. The proposed method was applied CWT to produce a 2D multi-domain features time–frequency representation of the battery terminal voltage, known as a TFI. To this end, experimental data on four LIBs cells published by the Prognostics Center of Excellence (PCoE) NASA were adopted to validate the effectiveness of the proposed method. The generated TF images clearly demonstrated the degradation process of the battery throughout the distribution of the energy concentration of the measured voltage for the battery at different capacity values. Two pre-trained DL-CNN were utilised to classify the generated TFIs at various capacities into five classes. The classification results achieved 95.69% accuracy using the AlexNet network and 95.52% accuracy from the VGG-16 network. The accuracy of the proposed method indicates that the proposed technique can be an effective health prognostic tool for managing LIBs for various applications such as electric vehicles and grid applications. However, the proposed method should be tested under different operating conditions (i.e., different temperatures and high-discharge current profile) to increase the accuracy of prediction and to develop a general prediction model. It is important to emphasise that the TFIs generated can be improved since the TFIs were generated by the use of a classical CWT. The resolution of the obtained energy concentration spectra affects the performance of the deep learning algorithm for capacity estimation. Our future work will therefore explore the applicability of the multi-domain features using energy concentration in time–frequency image analysis to provide robust results under different operating and temperature conditions. In addition, other time–frequency techniques such as STFT and Winger–Ville distribution will be investigated and compared to each other in terms of time–frequency resolution and computational complexity for online capacity prediction. Finally, future work will also compare computation load for the proposed algorithms.

**Author Contributions:** Conceptualization, M.E.-D. (Ma'd El-Dalahmeh) and M.A.-G.; methodology, M.E.-D. (Ma'd El-Dalahmeh) and M.A.-G.; formal analysis, M.E.-D. (Mo'ath El-Dalahmeh), M.A.-G., and M.E.-D. (Ma'd El-Dalahmeh); investigation, M.E.-D. (Ma'd El-Dalahmeh) and M.A.-G.; writing—original draft preparation, M.E.-D. (Mo'ath El-Dalahmeh); writing—review and editing, M.A.-G., M.S.; supervision, M.A.-G., M.S. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

### *Article* **Stacked Boosters Network Architecture for Short-Term Load Forecasting in Buildings**

#### **Tuukka Salmi \*, Jussi Kiljander and Daniel Pakkala**

VTT Technical Research Centre of Finland, FI-02044 Espoo, Finland<EMAIL_ADDRESS>(J.K<EMAIL_ADDRESS>(D.P.)

**\*** Correspondence<EMAIL_ADDRESS>
Received: 19 March 2020; Accepted: 3 May 2020; Published: 9 May 2020

**Abstract:** This paper presents a novel deep learning architecture for short-term load forecasting of building energy loads. The architecture is based on a simple base learner and multiple boosting systems that are modelled as a single deep neural network. The architecture transforms the original multivariate time series into multiple cascading univariate time series. Together with sparse interactions, parameter sharing and equivariant representations, this approach makes it possible to combat against overfitting while still achieving good presentation power with a deep network architecture. The architecture is evaluated in several short-term load forecasting tasks with energy data from an office building in Finland. The proposed architecture outperforms state-of-the-art load forecasting model in all the tasks.

**Keywords:** deep neural networks; short-term load forecasting

#### **1. Introduction**

Due to increasing utilization of variable renewable energy (VAE), demand flexibility is becoming crucial part of the stabilization of smart grids. Buildings constitute 32% of global final energy consumption [1] and possess natural thermal storage capacity making them important resource for demand flexibility. Accurate short-term load forecasting is crucial part of demand-side flexibility management.

Short-term energy load forecasting has been studied extensively, but there are some limitations in the existing state-of-the-art solutions. According to a recent study by Amasyali et al. [2], Artificial Neural Networks (ANNs) are the most commonly used machine learning model in short-term forecasting of building energy loads. The challenge with artificial neural networks is that they require a lot of data to prevent overfitting. This is usually tackled by reducing the number of layers, which in turn reduces the presentation power of the model. For instance, a very typical neural network architecture in building load forecasting is a single hidden layer multilayer perceptron (MLP) model [3–6]. Besides neural network methods, support vector regression (SVR) is a common machine learning model for building load forecasting [7–9]. Although SVR is not a neural network model, it can be though as a single hidden layer ANN from the point view of the model capacity.

In addition to the shallow MLP and SVR models, deeper model architectures for building load forecasting have been proposed. Marino et al. [10] compare standard long short-term memory (LSTM) and LSTM sequence-to-sequence architectures (also known as encode-decoder) for building energy load forecasting. LSTM based architecture is also studied by Kong et al. in two papers [11,12]. Although the LSTM architectures studied in all three papers consist of only two stacked LSTM layers, the recurrent neural networks (RNN) such as LSTM are deep models due to the recursive call made at every time step. Amarasinghe et al. [13] present study on a convolutional neural networks (CNN) model for building load forecasting. The model consist of three CNN layers and two fully connected

layers. Yan et al. [14] propose a CNN-LSTM network consisting of two CNN layers and a single LSTM layer. The model is evaluated in five different building data sets. Mocanu et al. [15] study the performance of conditional restricted Boltzmann machine (CRBM) and factored conditional restricted Boltzmann machine (FCRBM) neural network architectures in short-term load forecasting.

A very deep ANN architecture for energy load forecasting is presented by Chen et al. [16]. The authors adopt residual connections [17], a successful approach for building deep CNNs for image processing, and form a 60 layer deep network for energy load forecasting. The proposed ResNet borrows some ideas from RNN type network since it contains connections from previous hour forecast to next hour forecasts, but the connection is not an actual feedback since there are no parameter sharing among different hour forecasters. The proposed ResNet combined with an ensemble approach achieves state of the art results in three public energy forecasting benchmarks. Although none of these data sets focuses on individual building loads, the proposed work is general energy load forecasting model and thus good state-of-the-art benchmark also for building level forecasting tasks.

The aforementioned deep learning models have been evaluated using data sets with large amount of relatively static training data, which allows the models to avoid overfitting and outperform shallower models. However, in many situations (e.g., with new buildings or locations with extreme weather conditions) it is useful to be able to avoid overfitting also in situations with limited amount of training data. Moreover, a big limitation of the machine learning methods in general is that they assume that the data distribution does not change. This assumption can cause problems when machine learning methods such as neural networks or SVR are used for modelling real-life systems that change over time. In the context of buildings these changes in the data distribution can be caused, for example, by changes in the people (e.g., habits of people change over time or new people move in) or in the building infrastructure (e.g., new appliances, or configuration of existing systems such as HVAC change). A good example on how the data distributions can change dramatically is demonstrated by the Covid-19 pandemic, which has reduced usage rate of office building dramatically and therefore affected to energy consumption of these buildings.

We propose a novel hierarchical neural network architecture for short-term load forecasting that has been designed to address the abovementioned limitations of state-of-the-art load forecasting models. The architecture, called Stacked Booster Network (SBN), tries to achieve the good properties of deep models while still avoiding overfitting in small sample size situations. The core idea is to reduce the model parameter space with following principles: (1) sparse interactions, (2) parameter sharing, and (3) equivariant representations. Another key idea of the architecture is a novel boosting technique, which makes it possible to transform the original multivariate time series problem into univariate one. This further reduces the model parameters while keeping the network capacity high enough. Additionally, the proposed boosting technique enables the model to correct systematic mistakes by utilizing residual information on historical forecasts. With these ideas we can build a deep learning framework for short-term load forecasting with following properties:

The paper is organized as follows. In Section 2, a general network architecture of the SBN is presented. Section 3 introduces the case studies and presents the evaluation where the SBN is compared to the state-of-the-art ResNet model [16]. Section 4 concludes the presentation and presents directions for future work.

#### **2. SBN Architecture**

The SBN is a general neural network architecture style, which can be instantiated in different ways. This section presents the general SBN architecture style and its main ideas and design principles. A concrete instance of the SBN for a particular case study with associated implementation details is presented in Section 3.3.

General model architecture is described in Figure 1. The architecture is composed of forecasting submodels at four levels:

The architecture and configuration of the Instant forecaster depends on the energy system to be modelled. Typically, it takes as input a multivariate time series consisting of some combination of weather, temporal and energy features. A key idea in the SBN architecture, is that the *Instant forecaster* is the only part of the model that needs to manipulate the multivariate timeseries. The boosting forecasters are more general and designed to be stacked over previous forecaster in a way that the next forecaster boosts the previous. To this end, each booster gets a timeseries of past residuals as input and forecast the error made by the previous layer of models.

The architecture of the whole boosting system is shown in Figure 1 while the architecture of an individual booster is shown Figure 2. Architecture of the *Instant forecaster* is shown in Figure 3.

The next three subsections cover each of the forecasters with more details with their limitations. Then, we present a more detailed demonstration on how the SBN works with illustrative figures. Final subsection covers some general implementation notes of the SBN.

**Figure 1.** SBN architecture.

**Figure 2.** Architecture of a single boosting forecasters. Each boosting forecaster has the same general architecture. Base learner in the figure is previous booster or the instant forecaster in case of the first booster. In the figure, value *N* is the amount of previous errors used in forecasting future error and value *k* is the amount of time steps to be forecasted.

**Figure 3.** Architecture of the *Instant forecaster*.

#### *2.1. Instant Forecaster*

The purpose of the *Instant forecaster* is to forecast energy consumption based on independent variables that are assumed to be fully observable without any information on past energy consumptions. In our case study, described with details in Section 3, the only independent time series are temperature, hour of the day, and day of the week. Here also temperature can be considered fully observable by replacing future temperature values by their forecasts. These independent variables are first feed with dimensionality reduction submodels to reduce time dimension of these univariate time series to one. Considering our case study, hour of the day and day of the week are deterministic time series and do not therefore require dimensionality reduction submodel.

It should be noted that we make a reasonable assumption that different temperature profiles behave exactly same way at every weekday and every hour. Therefore, with this assumption reducing temperature sequence dimension to one before merging to other inputs does not lose any usable information. If some other information sources would be used, it is crucial to analyse whether the approach loses information and whether extra complexity needs to be addressed in the submodel.

#### *2.2. Weekly Boosting Forecaster*

Energy time series have typically periodical loads that occur same time on specific days of the week. If the loads would be always at the same level at the same time, the *Instant forecaster* would estimate them perfectly. However, it is quite typical that the timing and volume of these loads varies over time. This is the phenomena that the *Weekly boosting forecaster* should compensate. Consider, for example, a load occurring at some specific weekday rapidly increases by fixed amount. Then the *Weekly boosting forecaster* gets time series having this constant value as an input, and forecasts this constant value for the future errors. Therefore, in this case, the *Weekly boosting forecaster* is capable for estimating this dynamic change perfectly after short reaction time.

#### *2.3. Daily Boosting Forecaster*

The *Daily boosting forecaster* works exactly same way as the *Weekly boosting forecaster* but it focuses on changes on loads that occurs daily basis rather than weekly. Consider, for example that daily occurring load rapidly increases by fixed amount. The *Weekly boosting forecaster* would need weeks of data to be able to estimate and correct it. Therefore, it remains uncorrected at the beginning. The role of the *Daily boosting forecaster* is address this delay.

#### *2.4. Hourly Boosting Forecaster*

Some energy time series have periodic fluctuations in the energy consumption that cannot be explained purely by the input data. This can be explained by phenomena where some devices may be turned on and off periodically and this periodicity can be changing by some unknown conditions. Therefore, this phenomena can be seen as error signal of the *Instant forecaster*. Moreover, if the periodicity is not divisible by 24 h, the *Weekly boosting forecaster* and the *Daily boosting forecaster* cannot compensate it. This is the phenomena that the *Hourly boosting forecaster* should compensate. Another more minor phenomena that hourly boosting forecaster should compensate is a situation where a constantly occurring load changes somehow. In this case weekly and daily boosting forecasters react with days delays but the *Hourly boosting forecaster* can react and estimate the errors more rapidly.

#### *2.5. Demonstration of Operation*

This section demonstrates the SBN network operation with figures. To simplify demonstration, the *Hourly boosting forecaster* is omitted. In this demonstration, the *Weekly Booster forecaster* uses three weeks of data and the *Daily booster forecaster* uses seven days of data.

In this setup, we consider forecasting some fixed hour on Day 1 on Week 4. First, we run the *Instant forecaster* for all the historical values (Figure 4). Then, we calculate the errors for these historical values using the real historical knowledge of energy consumption (Figure 5). Next step is to use the *Weekly boosting forecaster* to forecast error of Week 3 for each day by using errors of *Instant forecaster* on Weeks 1 and 2 (Figure 6). We correct errors of the *Instant forecaster* for Week 3 by estimated errors of the *Weekly booster forecasters* for Week 3. This way we get seven weekly boosted errors for Week 3. By using these values we forecast the error of our final forecasted time on Day 1 on Week 4.

Now, we are ready for forecasting energy consumption for our target time on Day 1 on Week 4. This step is demonstrated in Figure 7. Here we first run the *Instant forecaster* on the target day. Then we subtract the estimated weekly boosted error from this instant forecast. Finally, we subtract daily boosted forecast error from the weekly boosted forecast to get the final forecast.

From this illustration, one should note that the *Weekly boosting forecaster* uses two data points for forecasting the third and the *Daily boosting forecaster* uses seven data points for forecasting the eight. In more general, the last boosting forecaster uses the whole input length for making forecast while the previous boosting forecasters must use one data point less.

**Figure 4.** Step 1: Run historical values for given window through the *Instant forecaster*.

**Figure 5.** Step 2: Calculate errors of the *Instant forecasters* for historical data.

**Figure 6.** Step 3: Run historical values through the *Weekly boosting forecaster* and the *Daily boosting forecaster*.

**Figure 7.** Make the final forecast using the *Instant forecaster* and compensate the forecast with the *Weekly boosting forecaster* and the *Daily boosting forecaster*.

#### *2.6. Implementation Notes*

It should be noted that stacking of the *Hourly boosting forecaster*, the *Daily boosting forecaster* and the *Weekly boosting forecaster* can be done in any order. Moreover, some of the forecasters may not be needed at all. In fact, higher time resolution boosting forecaster can correct exactly the same issues than the lower time resolution forecaster when the time window it gets as input is big enough. However, due to fact that some energy load occurs typically in daily and weekly basis, these energy loads are more easily estimated and compensated by the *Daily boosting forecaster* and the *Weekly boosting forecaster*. We have not experimented different ordering of the boosters and our experiments presented in Section 3 uses only one fixed stacking order. This order is weekly booster, daily booster and lastly hourly booster.

A nice feature of the architecture is that it splits the big problem into small problems that can be optimized separately when stacking the forecasters. First, the network performing the *Instant forecaster* should be implemented and optimized. This network architecture can be optimized without the boosting forecasters. Then, the first boosting forecaster is implemented and stacked on top of the *Instant forecaster*. The network architecture of this boosting forecaster can now be optimized separately. Similarly all the network architectures of the other booster forecasters can be optimized one by one. It is still an open issue whether this iterative approach will provide an optimal total network architecture. However, it seems to offer a reasonable good architecture with an easy design flow.

#### **3. Case Study**

The SBN architecture is applied for forecasting thermal energy consumption of a Finnish office building located in Espoo. The building is a typical office building constructed in 1960s and having four floors.

The main problem is to forecast hourly thermal energy consumption of the building for 24 h in advance. In addition to this main problem, we evaluate the performance in 48 h and 96 h forecasts also. Moreover, the effect of the training data size is evaluated by altering the training data size from 6 months to 6 years. The target metric is Normalized Root Mean Square Error (NRMSE) that is calculated using formula

$$NRMSE = MSE/(\max - \min)\_{\prime}$$

where MSE is standard mean square error and maximum and minimum values are calculated over evaluation period.

Available data are the past hourly energy consumption and temperature measurements. Temperature measurements are measured from a weather station being a few kilometres away from the building. For the future timestamps, temperature forecasts are not used in this experiment but real temperature readings from the future timestamps.

#### *3.1. Data Set*

Thermal energy data set contains hourly energy measurements and hourly temperature measurements from 1.2.2012 to 31.12.2018. The data set is visualized in Figure 8 with an example forecast.

**Figure 8.** The whole data set and 24 h forecasts. Here one can see that there are some missing data that causes direct lines in the figure.

#### *3.2. Methodology*

The model architecture was optimized by using years 2012–2016 for training and year 2017 for the validation using manual architecture search. When reasonable model architecture was found, the final performance metric was run from year 2018. All the runs that was executed for year 2018 are presented in this paper. After running the metrics for year 2018 no modifications to model parameters was made.

#### *3.3. Model*

#### 3.3.1. Instant Forecaster

The *Instant forecaster* has three inputs:

1. Twelve consecutive hours temperature readings before each forecast hour are used.

It should be noted that there are many instances of the *Instant forecaster* submodel, and all the instances share the same parameters. Twelve temperature values are first fed through dimensionality reduction submodel that reduces the temperature dimension to one and then all the inputs are processed by two layer densely connected network to get simple forecasts where the hidden layer contains 32 units with dropout regularization.

#### 3.3.2. Boosting Forecasters

The problem shall be solved by stacking all the three boosting forecasters in the following order: weekly, daily, hourly. For simplicity all the boosting forecasters shall use the same structure having two fully connected layers where the hidden layer contains 32 units with dropout regularization. The *Weekly boosting forecaster* contains three weeks of data (i.e., two weeks as input and one week to be forecasted). Therefore, we have values *N* = 2 and *k* = 1 in Figure 2. The *Daily boosting forecaster* contains seven days of data indicating values *N* = 7 and *k* = 1 for 24 h forecast in Figure 2. Finally, the *Hourly boosting forecaster* contains 24 h data, indicating values *N* = 24 and *k* = 24 for 24 h forecast. It should be noted that there are multiple instances of each boosting forecaster submodels and the submodels share the same weights. However, for different booster levels, submodel weights are naturally different.

Some statistics of network architectures for each of the used booster setups is shown in Table 1.

**Table 1.** Architectures of different booster combinations.

#### *3.4. Training Details*

The proposed architecture offers multiple different ways of training the network:

We have evaluated all the approaches. The second and the fourth provided roughly equal good results in terms of NRMSE. However, the second one is naturally faster since it needs only one training round. It seems that providing some weights to earlier forecaster loss functions fights well against overfitting and it can be considered as a kind of regularization technique. This technique can also be considered as a kind of a short-cut connection used in ResNets [16,17].

It seems that the training is not very sensitive to the weight given to the *Instant forecaster* and the earlier boosting forecasters. In our case study, we used weight 0.1 for the *Instant forecaster* and earlier boosters and weight 0.9 for the final booster.

We used Adam optimizer [18] in training the network. Besides of learning rate decay of the built-in Adam optimizer, we used an additional exponential learning rate decay. The learning rate decay is dependent of training data size such that for 5 year training data learning rate is reduced by 2% after each epoch. For other training data sizes the decay is altered such that the total decay is same per batch. Initial learning rate is set to 0.0025. Batch size was 256 in our experiments.

Due to learning rate decay and other regularization techniques, early stopping is not needed and the model can be trained with fixed number of epochs.

The network was implemented with Keras library ([19]) using Tensorflow backend ([20]).

#### *3.5. Forecast Analysis*

This section provides some views of the target data sets and forecasts. First, the whole data set is shown in Figure 8 with an example forecast.

Figure 9 shows the forecasts for our evaluation year 2018. To get better understanding of the forecast and the actual energy consumption, one zoomed snapshot is shown in Figure 10.

For an ideal forecaster the difference between the actual energy consumption and the forecast is a pure white noise. This difference is shown in Figures 11 and 12. From the closer view one can see that the error is correlated but not very much.

**Figure 9.** 24 h forecasts of the test year 2018.

**Figure 10.** 24 h forecasts of a part of the test year 2018.

**Figure 11.** Difference of real energy consumption and 24 h forecasted one in the test year 2018.

**Figure 12.** Difference of real energy consumption and 24 h forecasted one in a part of year 2018.

#### *3.6. Performance Comparison*

Performance comparisons of the usage of the different booster setups are presented in Tables 2 and 3, Figures 13 and 14. First, Table 2 and Figure 13 compare the setups by altering the training data size. Here one should note that the basic *Instant forecaster* is the most sensitive to the training data size. When the training data size is only 6 months, and there are no training data available from all temperature conditions, the performance of the *Instant forecaster* decreases a lot. Nevertheless, boosting forecasts are still able to correct these errors to some extent. Moreover, when the training data size increases to 6 years, aging of the data (the building energy consumption has changed over the years so that it does not reflect the situation captured by the older data) starts to decrease the performance of the *Instant forecaster*. Again the boosting forecasters can compensate these errors to some extent. From Table 3 and Figure 14 one should note that usage of the *Hourly boosting forecaster* gets useless when the forecasting period increases since the old hourly energy consumptions do not provide any correlation to future data of different hours. It eventually decreases performance due to overfitting.

**Table 2.** Boosters NRMSE values in percentages in 24 h forecast.

**Figure 13.** NRMSE values of different booster setups in percentages in 24 h forecast.

**Table 3.** Boosters NRMSE values in percentages.

**Figure 14.** NRMSE values of different booster setups for different forecast lengths.

#### Performance Comparison to the State-of-Art

We used Residual network approach [16] as a presentation of state-of-the-art since it has implementation available (https://github.com/yalickj/load-forecasting-resnet) and it has done good job in public data sets. Let us call this solution simply ResNet. However, the comparison is not completely fair due to following reasons:

The target metrics for comparison is shown in Table 4 and in Figure 15. ResNet solutions seems to perform quite well for plug and play solution when there are a lot of training data available. However, when reducing the amount of training data, it starts to overfit and performance decreases dramatically. However, our SBN solution behaves very well on even a relative small training data size.

**Table 4.** Performance comparison between the SBN and the ResNet. Values are in percentages.

**Figure 15.** NRMSE values of the ResNet ([16]) NRMSE and the SBN(ours) in different training data lengths.

#### **4. Conclusions and the Future Work**

This paper presented a novel neural network architecture style, called SBN, for short-term energy load forecasting. The SBN aims to achieve the representation capacity of deep learning while at the same time (1) reduce overfitting and (2) provide the capability to adapt to changing data distributions caused by changes in the modelled energy system. This is achieved with following key ideas, which have driven the design of the SBN: (1) sparse interactions, (2) parameter sharing, (3) equivariant representations, and (4) feedback of residuals from past forecasts. In practice, the SBN architecture consists of a base learner and multiple boosting systems that are modelled as a single deep neural network.

A specific instance of the SBN was implemented on top of Keras and Tersorflow 1.14 to evaluate the architecture style in practice. The evaluation was performed with data from an office building in Finland and the evaluation consisted of following short-term load forecasting tasks: 96 h, 48 h, and 24 h forecasts with 6 years of training data, and 24 h forecast with 1 year and 6 months of training data to evaluate the data-efficiency of the model. As part of the evaluation, the SBN was compared to a state-of-the-art deep learning network [16], which it outperformed in all of the above mentioned forecasting tasks. In particular, the SBN provided significantly better results in terms of data-efficiency.

The SBN is general in the sense that it can be used for other similar time series forecasting domains. As a future work we will apply it to different type of energy forecasting problems and data sets. Moreover, approaches to make the SBN even more data-efficient will be investigated. An interesting idea to this end is related to the model pre-training with transfer learning. As is described in the paper, the SBN is composed of *Instant forecaster* and different boosters. Boosters solve very general univariate time series forecasting problem while Instant forecaster makes the data set specific prediction. Therefore, it could be possible to pre-train the boosters with totally different energy data sets and only train the *Instant forecaster* with the target data set. Since the booster would not need to be trained, this would make the SBN even more data-efficient with respect to training data from the specific building or energy system.

**Author Contributions:** conceptualization, T.S., J.K. and D.P.; methodology, T.S.; software, T.S.; writing–original draft preparation, T.S. and J.K.; writing–review and editing, T.S., J.K. and D.P.; visualization, T.S.; project administration, D.P.; funding acquisition, D.P. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work has been funded by VTT Technical Research Centre of Finland and Business Finland.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

*Article*

## **Smart Grid Monitoring by Wireless Sensors Using Binary Logistic Regression**

**Hariprasath Manoharan <sup>1</sup> , Yuvaraja Teekaraman <sup>2</sup> , Irina Kirpichnikova <sup>2</sup> , Ramya Kuppusamy <sup>3</sup> , Srete Nikolovski 4,\* and Hamid Reza Baghaee <sup>5</sup>**

Received: 19 June 2020; Accepted: 18 July 2020; Published: 2 August 2020

**Abstract:** This article focuses on addressing the data aggregation faults caused by the Phasor Measuring Unit (PMU) by installing Wireless Sensor Networks (WSN) in the grid. All data that is monitored by PMU should be sent to the base station for further action. But the data that is sent from PMU does not reach the main server properly in many situations. To avoid this situation, a sensor-based technology has been introduced in the proposed method for sensing the values that are monitored by PMU. Also, the basic parameters that are necessary for determining optimal solutions like energy consumption, distance and cost have been calculated for wireless sensors, whereas, for PMU optimal placements with cost analysis have been restrained. For analyzing and improving the accuracy of the proposed method, an effective Binary Logistic Regression (BLR) algorithm has been integrated with an objective function. The sensor will report all measured PMU values to an Online Monitoring System (OMS). To examine the effectiveness of the proposed method, the examined values are visualized in MATLAB and results prove that the proposed method using BLR is more effective than existing methods in terms of all parametric values and the much improved results have been obtained at a rate of 81.2%.

**Keywords:** smart grids (intelligent networks); phasor machine learning; binary logistic regression; wireless network; Sensors

### **1. Introduction**

In recent days, the application of Phasor Measuring Units (PMUs) and Wireless Sensor Networks (WSN) for monitoring electrical grid parameters has been observed as a developing area. For making the operation of the grid smarter and smoother, a sensing device that observes the functioning of PMU and intimates it to the Online Monitoring System (OMS) is essential. Therefore, this way of smart integration paves the way for preventing critical grid situations such as excessive loss of power consumption. Even though the global positioning system (GPS) receiver is present, it can only track the position of PMUs. In addition, all the measurements which are provided by the PMU will be transferred to the satellite and then to the control center. While transferring the parametric data, the occurrence of a fault may be present, and there is no way to detect faults such as wrong measurement data with noise. Moreover, the errors in measurement can only be controlled after detecting the type of problem that persists in PMU. This requires the help of a large amount of manpower, and immediate remedial actions cannot be taken. As a result, there might be a huge loss of energy where more blackouts can occur within a short period of time.

Therefore, the communicating PMU device requires a wireless device for supervision which will be able to detect the faults quickly and report them to the control center. In a modern trend, the wireless sensors which can sense the fault data in PMUs with less energy consumption can be integrated with PMUs for better control operations. The block diagram of the proposed method is indicated in Figure 1.

**Figure 1.** Incorporation of sensors with Phasor Measuring Units (PMU) for fault detection.

#### *1.1. Motivation of Proposed Work*

The primary motivation for deliberating this research work is to monitor the level of voltage, the status of PMU in the grid and to overcome the blackouts that occur in case of PMU failure within a short period. Therefore, the communicating PMU device requires an intelligent wireless device for controlling it. The installed group of sensors will be able to detect the faults quickly and reports it to the control center. The wireless sensors which can sense the fault data in PMUs with less energy consumption can be integrated with PMUs for better control operations.

#### *1.2. Short Review on Existing Literature*

There are numerous gaps that exist in the prevailing literature [1–12] when PMUs are connected in grid. In the following literature, all of the authors have installed PMU for monitoring the grid but fail to detect any of the important parameters. In many cases, the existing literature lacks discussion on the installation of sensors in the grid for making it smart, although the importance of placing sensors in the grid has been analyzed by several researchers where the framework consists of placement of PMUs at suitable locations for achieving full observability [1].

#### *1.3. Research Gap and Motivation*

All the existing literature has not provided any discussion related to the implementation of an additional communication device for monitoring the status of PMU, which includes parameters like energy consumption, voltage, and angle measurements. Also, no researchers have examined the detection of data faults in PMU, which provides necessary voltage values for operating the electric grids. Therefore, to overcome the drawbacks mentioned above, a sensor device has been integrated with all optimal PMUs that are installed in the grid. The sensor builds the gap (Table 1) by monitoring and reporting the status and fault information of PMU to the receiver (OMS). This will make the work station take remedial actions for preventing driving under emergencies, thus making the grid smart.

**Table 1.** Significant contributions associated with the proposed method.

#### *1.4. Outline of Article*

The remaining sections of the article is organized as follows: Section 2 describes a brief literature review where the fundamentals of the proposed work is designed. Section 3 formulates the proposed model on PMU with sensors. Section 4 integrates the optimization algorithm with proposed formulations. Section 5 validates the efficiency and parametric values of the projected method and finally, Section 6 concludes the research discussion with discussion on future revisions to be made.

#### **2. Literature Survey**

The importance of placing sensors in the grid has been analyzed by several researchers where the framework consists of placement of PMUs at suitable locations for achieving full observability [1]. Since there is a usage of traditional transformers across different areas around the world, a sensor must be needed for acquiring signals at the destination. Also, the control mechanisms in PMU are possible only when an accurate sensor is installed on the grid [1]. However, the major drawback in [1] is that only the placement locations of PMU are calculated where there is a possibility to replace the traditional transformer. Still, the same operation of the transformer has been performed in a digitalized way. Now, from the digital outcomes, which are indicated in [1], a challenging task on testing the bad data has been performed [2]. In this testing, the variation of data error is also detected and controlled by using a Kalman filter. The procedure starts by analyzing the previous state of PMU, which is under observation and compares it with the currently updated value where the PMU remains in a fully observable state. Even though this method produces less data error, it can only be applicable if there is any change in the voltage magnitude [2], and the sensor development procedure is not integrated into the place where voltage change occurs.

An optimal approach for wide-area systems has been developed [3] at a later phase for analyzing the impact of communication infrastructure that is integrated with PMU. In this case, the importance of communication infrastructure in the grid has been well-defined by using a genetic algorithm. This method uses a high number of sensor nodes where the cost of sensor placement will be much higher than traditional methods [3]. The method described in [3] for achieving complete observability is not possible in all situations because, in real-time, a mesh network cannot be formed under different situations. This limitation has been solved by using a phase-detection model [4] where the data attack procedure is evaluated using the Global Positioning System (GPS). Here, the clock precision error is also calculated, and the potential risk of placing the PMU data using time synchronization standard

is observed [4]. But, even though the method provides a solution to data attack methods, a detailed procedure of sensor integration with important parametric analysis like less energy consumption of nodes, proper data aggregation has not been described [4]. If the data is aggregated correctly, then there is no need to detect the phase of PMUs.

An image acquisition-based sensor visionary system has been developed [5] for real-time monitoring of grids. In this method, a line detection method has been developed where the three-dimensional image of the damaged line in a particular area will be identified. Therefore, once the image arrives at the receiver, the appropriate necessary actions will be taken. This method involves a high cost of computation, and there is a discussion-based in smart meter investigation [5]. Still, the sensors are not integrated with the PMU-based rectification system. Also, the power failures can be easily identified by the developed method [5], where a cloud storage system has been built. However, these methods will require manpower, and there is no proficiency in automatic rescue operation [5] if large scale systems are integrated. For solving the drawback mentioned above, a virtual method of PMU analysis has been carried out [6]. In this method, traffic will be generated where each region will be divided into different zones. A latency test with a communication overlay has been designed for locally generated data. Also, an online monitoring system using Google application engines has been integrated for data aggregation. However, in the outcome analysis, the only percent of power-saving with bandwidth has been discussed, and there is no clear information whether the distance covered by the communication device in the zonal areas are higher or lesser [6].

The method mentioned above [6] has been simplified using software-defined networks [7] for making the communication much easier through the channel. Since the demand for electricity increases day-by-day, the requirement for monitoring the individual grid using network software has also been increased. If the software-defined networks are used then, the automatic control process can be easily completed [7]. This paves the way for creating sensor-based technological solutions in analyzing the network grid. However, there is no practical information regarding control information and parametric monitoring of PMU when it is placed in different areas of grid networks [7]. The usage of multiple sensors in the grid paves the way for monitoring different parameters, which even includes the temperature and humidity of PMU [8]. This has been indicated as a power management unit, which in turn gives rise to energy harvesting systems. In this method, a battery and automated power platform have been designed for cost-efficient implementation [8]. It is observed that in this method, the only microcontroller has been used for effective operation with transmitting and receiving antennas. The usage of both microcontrollers and multiple sensors will increase cost, and thus the energy consumption of each node will be much higher [8].

A survey has been showing [9] on the generalization of PMU with reliable models where the procedure for data uncertainty, fault analysis in the grid has been discussed. The authors describe that for reliability evaluation methods such as Markov based models can be integrated, but the application of PMU has been advanced in different areas, and the only solution to overcome the defects in PMU is by integrating real-time communication equipment, which identifies fault even in remote locations [9]. While designing the sensor technologies for integration with PMU, the standards suggested by IEEE C37.118 should always be followed [10]. The merging unit for interoperability test has been suggested where the signal identification and transmission test has been showing, which are kept as per the standards of IEEE. This is followed while placing the PMUs at desired locations. However, the sensors can be integrated as per the requirement by considering the optimal placement of PMUs [10].

Further, the sensors should be feasible for integrating with PMUs [11], and the feasibility solutions have been described by using cloud-based networks. The process has been executed by considering synchrophasor systems, and a high standard of encryption is also provided for ensuring the safe process of data transfer [11]. Even though the best security solutions are provided in [11], only the data security cost has been analyzed without any discussion regarding the implementation cost. Finally, a discussion on self-healing smart grids has been offered [12] with different emerging techniques where network communication with middleware solutions has been provided. To date, the aforementioned

existing methods are the only available approaches for PMU integration with sensor-based networks, and all the methodologies have been analyzed for building a novel approach.

#### *Objectives*

The main objective of this study is to integrate a communicating device (Sensors) for monitoring the status and to report the fault information to the control center (OMS) that is observed by PMUs. This new flanged objective will be more efficient for building a smart grid environment by satisfying the constraints of energy consumption, range, and distance. The implementation design of the proposed objective which is formulated in Equation (7) is applied to a large-scale transmission system and small-scale distribution system.

#### **3. Problem Formulation**

Since the prime objective of the proposed method is to achieve complete communication observability in the presence of sensors, it is necessary to calculate the range covered by each individual sensor. For achieving long-distance communication, the entire area where the PMU is placed in the grid will be divided separately and will be marked as individual groups (Circles). Therefore, the maximum range will be achieved, and it can be calculated mathematically using (1).

$$d(i) = \max \sum\_{i=1}^{n} a\_i \tag{1}$$

where, *d*(*i*) represents the distance of the sensor to be maximized; and *a<sup>i</sup>* denotes the possible arrangements of PMU that are placed in the grid.

The above equation indicates that if the distance covered by the sensor is maximized then, the cost of installation will be automatically reduced, and the energy consumption of the installed nodes will be minimized as much as possible. All Equations (1)–(6) have been derived from [2,3] in a unique way where the objective function indicated in (7) has not been stated in any existing literature, which forms the novelty of the projected methodology. The possible arrangements represent the accurate connection that is provided by the sensors to the PMUs, which are denoted using (2).

$$a\_l = (a\_1 + a\_2 + \dots + a\_n) = e(i) \tag{2}$$

where, *e*(*i*) represents the exact value of the sensors that are placed near the PMUs.

Since the range covered by sensors in the grid which are located at different regions are in circles, the exact range can be calculated by combining (1) and (2) as,

$$e\_r(i) = 0.47 \times d(i)\tag{3}$$

where, for precise monitoring each sensor has been divided into separate groups where PMUs are installed in the grid. There are several areas where the installed sensors have to monitor, and after monitoring the precise value it will be uploaded to OMS. This is not possible by implementing a single sensor as the range covered by PMU is much higher. Therefore, sensors are deployed as groups in the same areas where PMUs are installed. Thus, 0.47 is the exact value which is covered by each sensor in each sub-region *a*1, *a*<sup>2</sup> . . . *a<sup>n</sup>* where the PMUs are placed. Once the range covered by the sensor is maximized then, the energy consumption should be minimized. This is an important concern in the case of PMUs because the energy of PMUs is already very high. If the energy of the sensor is also higher, then it is not logical to place the sensor in different regions.

In addition, these grouped sensors will determine important parameters which include energy consumption and cost. For example, if the number of PMUs in a particular area is much lesser, the installed sensor group will also be much lesser, and, even if any additional group is installed then, it will be switched off for a particular period of time thus resulting in energy saving processes. *Energies* **2020**, *13*, 3974

Therefore, energy consumption can be mathematically expressed using (4). In line with the above concern, if a group of sensors are placed in one region and if any sensor fails in one particular group then there is no need for replacing the sensor. Instead, the energy supplied to other sensors in the same group will be increased for equalizing the total supplied energy and the cost of installation will be saved.

$$T\_i(PMII\_i, S\_i) = \min \sum\_{i=1}^{n} \left[ V\_i(PMII\_i) - \Delta d\_i(PMII\_i) \right] + \left[ V\_i(S\_i) - \Delta d\_i(S\_i) \right] \tag{4}$$

where, *V<sup>i</sup>* denotes the input voltage of both PMU and sensors as per IEEEC37.118 standard; and ∆*d<sup>i</sup>* represents the cut off voltage of both PMU and sensors, respectively.

In the proposed work, only the voltage data of PMUs are integrated, so the energy consumption of both sensors and PMU will be determined based on the values of voltage only. Here, the maximum voltage (230V) will be converted to 5V inside the power supply module for suitable installation, and if the value is less, then cut-off voltage will be indicated. If the major parametric inputs such as distance and energy consumption are given properly, then the data can be aggregated appropriately. This is a major issue in several situations because the areas are divided into circles where the data aggregation should happen in sequence order, and it will be examined using an online monitoring system. Therefore, the data combination from different areas can be given as,

$$D\mathbb{C}\_{i} = \sum\_{i=1}^{n} O\_{i}^{PMII} \times d(i) \tag{5}$$

where, *OPMU i* represents the total number of observable PMUs.

It can be seen from (5) that once the distance of the sensor is multiplied with the maximum number of observable PMUs, then the data will be sent from transmitter to receiver in sequence order, and the same will follow for large-scale systems to reduce the data similarity index. Implementation of (5) will provide the data clearly (i.e.,) the data of the first area will be obtained, and once the data is stored, then the data of the next area will be attained. This will reduce the confusion among workers, and they can easily detect the areas where the problem has occurred. Analyzing the implementation cost of the proposed method is an important constraint because here, two different communication devices are combined (PMU and sensors). Therefore, the cost should be minimized as low as possible, and it is calculated mathematically by using (6).

$$T\mathcal{C}\_i = \min \sum\_{i=1}^n \left( \mathcal{C}\_i \mathcal{O}\_i^{PMII} \right) + \left( \mathcal{C}\_i \mathcal{N}\_i^S \right) \tag{6}$$

where, *N<sup>S</sup> i* denotes the number of sensors installed for observing the features of PMU.

The objective function can be represented using (7) as,

$$\text{COB}\_{i} = \min \sum\_{i=1}^{n} T\_{i}(\text{PMUL}\_{i}, \text{S}\_{i}), \text{TC}\_{i} \text{ \& } \max \sum\_{i=1}^{n} d(i) \tag{7}$$

The above equation indicates that if the distance covered by the sensor is maximized, then the cost of installation will be automatically reduced, and the energy consumption of the installed nodes will be minimized as much as possible. This objective function indicated in (7) has not been stated in any existing literature, which forms the novelty of the projected methodology.

#### **4. Optimization Algorithm**

An optimization algorithm plays a vital role in deciding the performance of the proposed methodology. Genetic algorithms are incorporated in existing literature [3] for monitoring PMU because of its natural selection process and ability to determine optimal solutions for subsequent iterations. Also, the basic setup using genetic algorithms has been followed [3], where the observability which is detected by binary values (0 or 1) will be different when genetic algorithms are introduced. In this process, unobservable PMUs will be automatically fixed thus allowing the algorithm to converge earlier. Even though the data transmission process is much higher when genetic algorithms are implemented, the same strategy cannot be followed when sensors are implemented, because sensors have unique characteristics for identifying erroneous values of PMU. Thus, the location of PMUs and the occurrence of faults are detected with binary numbers (0 or 1) by integrating a new improved Binary Logistic Regression (BLR) [13] to improve the performance of communication equipment that is implemented in the projected method. The major reason for choosing BLR is that it is one type of machine learning algorithm that exists in recent trends, and the PMU placement is a non-linear problem where the best solutions to non-linear equations will be provided only by BLR. Also, the integration of formulations with BLR has been derived from existing literatures [14,15].

For the projected method, accuracy in determining the fault that exists in PMUs through sensors is an important task; therefore, BLR is a perfect choice where the accuracy rate will be much higher when compared with other algorithms. The prediction of real value PMU using sensors will be mapped to binary values using the exponential function, which is given in (8).

$$b(i) = \frac{1}{1 + e^{T C\_i}} \tag{8}$$

where, *TC<sup>i</sup>* denotes the total cost of communication device which consists of both PMU and sensors.

The equivalent proposition for (8) can be defined using a sigmoid function and is given as,

$$y(i) = \sum\_{i=1}^{n} \sigma\_i(n) \tag{9}$$

where, σ*i*(*n*) represents the matrix equation for all the PMUs in logistic scale.

Therefore, (8) can be modified as,

$$b(i) = \frac{1}{1 + \sum\_{i=1}^{n} e^{(\mathbf{C}\_i \mathbf{O}\_i^{\text{PMII}}) + (\mathbf{C}\_i \mathbf{N}\_i^{\text{S}})}} \tag{10}$$

The cost function calculation of linear regression is easy to implement, and it is much similar to logistic regression. But if the cost function of linear terms is integrated, then a non-convex solution will be obtained where the major objective of minimizing the cost will result in failure. For a good communication system implementation, the cost function should be minimum, and it can be calculated using BLR as shown in Figure 2,

$$\text{Cost}(i) = \begin{cases} -\log(b(i)) & \text{if } b = 1 \\ -\log(1 - b(i)) & \text{if } b = 0 \end{cases} \tag{11}$$

**Figure 2.** Flow chart of Binary Logistic Regression (BLR)**.**

ݐݏܥ)݅ = (ቊ − log൫ܾ(݅)൯ if ܾ = 1 − log൫1 − ܾ(݅)൯ if ܾ = 0 ܥܶ Equation (11) indicates that, for calculating the cost of all installed PMUs in the grid, both the binary values will be taken into account; whereas, for the optimum cost of installation (*TC<sup>i</sup>* ) only the binary value 1 will be considered. For other communication devices (Sensors), the total cost of implementation will be calculated separately, and it depends on base cost and the number of sensors installed. For each parametric calculation, the gradient descent function will be calculated, which is given in Equation (12).

$$\log\_i = \min \sum\_{i=1}^n \varphi\_i - \tau \frac{\partial}{\partial \varphi\_i} \tag{12}$$

where, ϕ*<sup>i</sup>* and ∂ϕ*<sup>i</sup>* represents the first and second-order derivative of gradient descent function.

݃ = ݉݅݊ ߮ − ߬ ߲ ߲߮ ୀଵ In (12), all the parameters to be monitored will be implemented based on their derivative function values. From (12), the entire parametric convergence rate will be calculated where BLR has converged at a faster rate when compared to other algorithms. The flow chart of proposed algorithm is shown in Figure 2.

#### ߮ ߲߮ **5. Results and Discussion**

In this section, the effect of integrating the proposed formulations with BLR has been elaborated. It is necessary to analyze the impact of PMU on both transmission and distribution grids. An OMS will monitor all the updated status of PMU, which is provided by sensors. For better understanding, the OMS provides the simulation results in MATLAB for a specific time period. Therefore, to check the efficiency of the projected method, the following case studies are performed.

Case 1: Effect of energy consumption Case 2: Maximization of range Case 3: Minimization of cost

For each of the test cases, the following two test systems are taken under consideration (i.e.,); for transmission systems, a large-scale IEEE 118 bus [14] has been examined. For the distribution system, an IEEE 33 node [15] has been tested. All the test systems consist of only voltage measurements which are obtained from line data for detecting the occurrence of a fault in PMU, and the sensor will report the faults to the control center.

#### *5.1. Case 1*

In this case, the energy consumption of sensors that are integrated with PMU has been analyzed. It is essential that the communication devices should always provide low energy with enhanced performance. Particularly, for the case of PMU, it is very important because the energy consumed by PMU in the grid will be much higher. So, if there is a need for another communication device, then the energy acquired by the device should be as low as possible. Therefore, in this important case, it is necessary to minimize the energy consumption of nodes and is calculated using (4). Since voltage measurements are considered, the sensor will make use of the degenerated voltage measurements for accurate calculations. The power supply will be converted suitably to 5V for integrating the sensors with PMU.

The simulation result of the test systems for this case has been projected in Figure 3. It can be observed that the data transfer rate of PMU and sensor is much higher, which always varies between 100 to 500 Mbps. Even for much higher data rates, the energy consumption of the sensor is minimized. For example, in the IEEE 118 bus system (Figure 3a), if the transfer rate is 300 Mbps, then the corresponding energy consumed by the nodes in the proposed BLR will be 76 mW. In contrast, for the existing method [3] (GA), it is 89 mW. Similarly, for the IEEE 33 node system (Figure 3b), if the transfer rate is 400 Mbps, then the energy consumed by the nodes for the proposed system (BLR) will be 27 mW. But, for the same data transfer rate, the energy consumed by GA [3] is 42 mW. This proves that BLR is much more efficient than existing systems, and it consumes less energy for both transmission and distribution systems.

**Figure 3.** Energy consumption of test systems: (**a**) IEEE 118 bus and (**b**) IEEE 33 node.

#### *5.2. Case 2*

In this case, the fundamental parameter, which is the most important for all sensor integrations in the grid called a range of data measurement, is examined. It is always necessary that the distance covered by a distinct sensor should always be wider. Already, the communicating PMU device will provide a wide range of data measurements where the installed sensors should be able to cover the wide-ranging distance of PMUs. If this constraint is satisfied, then it is possible to measure all the data faults that are measured by PMU within a short interval of time.

The sensor should be calibrated in such a way that it should maximize the distance; therefore, in the proposed method for security protections, the regions covered by PMUs are divided into different zones (Circles). Therefore, accurate distant sensors can be placed for measuring the data of PMUs, and it will be updated in the OMS. Figure 4 shows the distance covered by sensors in both transmission and distribution test systems. It can be seen from Figure 4 that the distance covered by the proposed BLR is much higher than the existing GA method [3]. For example, in the IEEE 118 bus system, the number of PMUs for achieving full observability is 68, and the maximum distance covered by a distinct sensor in a particular area is around 11.36 km, whereas, for the same test system, the distance covered by GA is only 6.8 km. Similarly, for the IEEE 33 node, the number of optimal PMUs will be 11, and the appropriate distance covered by the sensor is 2.1 km. But, with the same number of PMUs, the GA method covers only 1.5 km per area, which are divided into circles.

**Figure 4.** Distance covered by sensors for test systems: (**a**) IEEE 118 bus; and (**b**) IEEE 33 node.

#### *5.3. Case 3*

After achieving maximum distance, the next case study relies on the calculation of the cost of installed sensors and PMUs from Equation (6). In the proposed method, two communicating devices are installed; therefore, the cost for both sensors and PMU should be minimized. For each area, the required maximum number of sensors should be integrated for proper data aggregation. Also, if it is possible, two additional low-cost sensors can be added in the area because sometimes there might be a failure in the data detection operation of sensors. If this case persists, the additional sensors can be switched on immediately. The base cost of PMU and sensor is about 3046200 and 11421.56 INR, respectively [16,17]. Figure 5 shows the maximum number of sensors necessary for monitoring the optimal PMUs with the equivalent installation cost.

From Figure 5, it can be realized that, for the proposed BLR implementation in IEEE 118 bus and IEEE 33 node systems, the maximum number of sensors in a specific area is 15 (Figure 5a) and 9 (Figure 5b), respectively. But for the existing GA [3], the number of sensors in a distinct area for IEEE 118 bus and IEEE 33 node systems is 16 and 11, respectively. Similarly, the equivalent total cost of the projected method is minimized to 1019870 INR for IEEE 118 bus system (Figure 5c), and for IEEE 33 nodes, the cost of implementation is around 154069 INR (Figure 5d). The total cost of communication device placement is compared with GA [3] for both IEEE 118 bus and IEEE 33 node systems, which affords nearly 1147912 INR and 166890 INR, respectively. This comparison statement proves that BLR is a cost-effective method when compared with other methodologies.

**Figure 5.** Concentrated installation and cost of communication devices for IEEE 118 bus and IEEE 33 node systems.

#### **6. Conclusions**

In this article, a new flanged method of detecting the data fault error in PMU by sensors has been addressed with the minimization of installation cost and energy consumption. Typically, PMU is a communicating device which measures the voltage magnitude and phase angle of all the corresponding buses. This is an important measurement relative to the grids because the voltage plays a major role in the supply of electricity. If there is any failure that is associated with PMUs, then it requires a large amount of manpower for resolving it. Therefore, an automated measuring device is necessary for monitoring the PMUs, which is provided by integrating the wireless sensors. Also, the basic parametric values such as maximum distance with minimization of cost and energy are also fulfilled by the proposed methodology by integrating BLR with OMS. Further, it is important to test the efficiency of the proposed method; therefore, the proposed arrangement has been applied for both transmission (IEEE 118 bus) and distribution systems (IEEE 33 node), and the results prove to be more effective when compared with the GA method.

#### *Directions for Future Work*

The proposed work on PMU with sensors can be extended to large-scale and practical real-time systems for observing the complete outcome of grids. Even the extension work on large-scale systems should be introduced for monitoring wide areas. The main challenge for incorporating this future work resides on placing the group of sensors and dividing them appropriately at areas where PMUs are going to be installed.

**Author Contributions:** Conceptualization, and methodology, H.M.; software, Y.T.; validation, R.K.; formal analysis, S.N.; investigation, H.R.B.; data curation, I.K.; writing—original draft preparation, H.M.; writing—review and editing, Y.T.; visualization, R.K. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

### *Article* **A Novel Intrusion Mitigation Unit for Interconnected Power Systems in Frequency Regulation to Enhance Cybersecurity**

**Faisal R. Badal <sup>1</sup> , Zannatun Nayem <sup>2</sup> , Subrata K. Sarker <sup>3</sup> , Dristi Datta <sup>3</sup> , Shahriar Rahman Fahim <sup>4</sup> , S. M. Muyeen 5,\* , Md. Rafiqul Islam Sheikh <sup>4</sup> and Sajal K. Das <sup>1</sup>**

**Abstract:** Cyberattacks (CAs) on modern interconnected power systems are currently a primary concern. The development of information and communication technology (ICT) has increased the possibility of unauthorized access to power system networks for data manipulation. Unauthorized data manipulation may lead to the partial or complete shutdown of a power network. In this paper, we propose a novel security unit that mitigates intrusion for an interconnected power system and compensates for data manipulation to augment cybersecurity. The studied two-area interconnected power system is first stabilized to alleviate frequency deviation and tie-line power between the areas by designing a fractional-order proportional integral derivative (*FPID*) controller. Since the parameters of the *FPID* controller can also be influenced by a CA, the proposed security unit, named the automatic intrusion mitigation unit (AIMU), guarantees control over such changes. The effectiveness of the AIMU is inspected against a CA, load variations, and unknown noises, and the results show that the proposed unit guarantees reliable performance in all circumstances.

**Keywords:** interconnected power system; cybersecurity; *FPID* controller; automatic intrusion mitigation unit

#### **1. Introduction**

The increasing use of modern devices has increased the energy crisis to meet the energy demands of the world's growing population [1–5]. Modern power systems integrated with information and communication technology (ICT) add flexibility for consumers but more challenges for stockholders due to their operation and control [6–8]. The reliable operation of modern power systems depends on many factors, such as accurate system modeling, control, disturbance-handling capabilities, and so forth [9–12].

Interconnected power systems (INPSs) consist of several subgeneration units or areas that can operate individually. Each area of an INPS has separate generation units connected by a tie line. The function of this line is to manage the flow of power between the areas [13–15].

Maintaining the tie-line power at its nominal value is a challenge and requires a great deal of attention [16–19]. Frequency deviation due to improper matching between the generation and demand may result in the loss of harmony and a complete blackout. Frequency deviation and tie-line power mismatch may introduce load damage, a reduction in production, overheating, and so on [12,20,21].

**Citation:** Badal, F.R.; Nayem, Z.; Sarker, S.K.; Datta, D.; Rahman Fahim, S.; Muyeen, S.M.; Islam Sheikh, M.R.; Das, S.K. A Novel Intrusion Mitigation Unit for Interconnected Power Systems in Frequency Regulation to Enhance Cybersecurity. *Energies* **2021**, *14*, 1401. https://doi.org/10.3390/en14051401

Academic Editor: Michael Short

Received: 12 January 2021 Accepted: 22 February 2021 Published: 4 March 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

Experts have reported several methods to compensate for the frequency deviation of INPSs [17,22–26]. These methods mitigate deviation against the uncertainty, disturbance, and nonlinear behavior of the system but not against a cyberattack (CA). The mitigation of a CA on power systems has brought a new research dimension for researchers. If the CA is realistic, the malefactors can easily provide false data through the communication link to the power system control station. The injection of false data may increase the possibility of unrealistic system performance [27–30].

The rate of CAs on cyberphysical systems (CPSs) has increased significantly over the last decade. Recent news has attracted the attention of the researchers to develop strong security for CPSs. The CA on the U.S. gas pipeline and smart grid, as well as on the Ukraine power system, indicates the frequent and regular occurrence of attacks on power systems [31–33]. Grid reliability and resiliency were largely affected by this CA. Unauthorized access, false data injection, data integrity, sensitive data collection, etc., are some of the objectives of attackers to hamper power systems [34–36].

Although several load frequency controllers (LFCs) are designed to minimize frequency deviation, they may also be largely affected by CAs. The function of LFCs is to collect data from the frequency sensor and regulate the speed of the generation units. Any changes in the speed regulator by the governor make the governor's speed uncontrollable and produce a large frequency as well as a tie-line power deviation of the INPS. Again, any changes in the associated control parameters are also responsible for reducing the stability margin and reliability of the system. Thus, the speed regulator and control variables are critical parameters that attract the attackers' attention [37–39].

Conventional control methods can only control the system performance against system dynamics and different disturbances. The control of a CA is rarely possible with the help of these control methods. The parameters of the system and the controller are sensitive data that can easily be modified by attackers. Thus, alone, the controller cannot assure the stability of the system during a CA, which ensures the requirement of a cybersecurity-based control algorithm [40].

A CA on the parameters and settings of the system can be mitigated by analyzing the behavior of the circuit breaker, protection devices, and logics [41]. The detection of false data injection based on the measurement variation method is proposed in [42]. The control algorithm detects the presence of a CA by measuring the distances between two probability distributions. Reference [43] proposes a transformation-based scheme used to find the modification or injection of false data into the smart grid. The investigation of a CA is carried out by proper estimation of the measurement variation based on the Kullback–Leibler distance algorithm. The power system has a quasistatic nature that reduces the detection capability of this method.

Reference [38] considers a technique to provide false data to the power system and investigates its impact on production costs and demands. Positively and negatively biased CAs and their impacts on the power system are discussed in [40]. This work proposes a switching technique to control a LFC with an integrator controller. Another switching algorithm is investigated in [44]. The authors of [45] analyzed the frequency deviation of a single-area power system with a LFC and an automatic generation control (AGC) against positively and negatively biased CAs. The positively biased CA produced a greater impact on both the LFC and AGC compared to the negatively biased CA.

The aforementioned research articles provide control structures against CAs for a single-area power system, although they are unable to protect the operation of the INPS during a CA. Although the integrator-based AGC confirms the reliable operation for a single-unit LFC, the use of INPSs can be questionable due to their multiple control parameters, and these controllers are also sensitive to change in operating conditions. Therefore, a separate protection unit for INPS must be considered during a CA. Inspired by the above issues, this work proposes a novel security unit, called the automatic intrusion mitigation unit (AIMU), to protect INPSs during a CA. The contributions of this article are:

This paper is organized as follows. Section 2 models the INPS, and Section 3 discusses the load frequency controller design. The impacts of a CA, the proposed switching technique, and the performance of the AIMU are investigated in Sections 4–6. The conclusions are presented in Section 7. ‐

#### **2. Interconnected Power System Modeling**

The control structure of the INPS is constructed by using two control loops; e.g., the primary and secondary loops for controlling frequency. The primary loop acts as a proportional loop that decreases the frequency deviation produced due to load and demand change, but it is unable to regain zero frequency deviation. The frequency deviation returns to a nominal value (i.e., zero deviation) by implementing another control loop, known as the secondary frequency control loop. ‐ ‐

Figure 1 presents a model of an INPS that has three main components: a governor, a turbine, and a mass-load system. The mass-load system produces an impact on the INPS, the model of which can be represented by [12,14,16,46,47] ‐ ‐

$$X\_{ml}(s) = \frac{1}{Ms + D} \tag{1}$$

where *M* and *D* are the inertia and damping constant. The governor can be modeled as

$$X\_{\mathcal{S}}(s) = \frac{1}{1 + \mathcal{Y}\_{\mathcal{S}}s} \tag{2}$$

**Figure 1.** Model of an interconnected power system.

The performance of the governor largely depends on the parameter known as the speed regulator (R). Any variation of this parameter is responsible for deviating the speed of the generation unit and increasing the frequency and power deviation. Another element known as the turbine can be modeled as

$$X\_t(s) = \frac{1}{1 + \Upsilon\_l s} \tag{3}$$

For an INPS, two or more areas are connected to each other and deliver power through the tie line, the model of which can be represented by

$$
\Delta P\_{12} = \frac{|V\_1||V\_2|}{X\_{12}} \sin(\phi\_1 - \phi\_2) \tag{4}
$$

where *X*<sup>12</sup> is the reluctance of the tie line and areas. The load change is usually kept small; e.g., 2%. Thus, the delivered tie-line power due to the small perturbation of load where *φ* = *φ* 0 can be represented by

$$
\Delta P\_{12} = T(\Delta f\_1 - \Delta f\_2) \tag{5}
$$

The reference signal and feedback construct the area control error (*ACE*) that feeds the error measurement to the controller to minimize the frequency and power deviation. The model of *ACE* can be given as

$$A\mathcal{C}E = \Delta P\_{12} + B\Delta f \tag{6}$$

where *B* is a biasing factor that can be represented by

$$B = \frac{1}{R} + D \tag{7}$$

In an INPS, there are nine total state variables. There are three state variables for each area; i.e., ∆*f*1, ∆*Pg*1, ∆*Pm*1, and ∆*f*2, ∆*Pg*2, and ∆*Pm*2. There is one state variable for the tie line; i.e., ∆*P*12. Finally, there are two state variables for the inputs ∆*Pc*<sup>1</sup> and ∆*Pc*2. Thus, the dynamic model of the INPS can be represented by

$$\begin{aligned} \Delta \dot{f}\_1 &= \frac{D\_1}{M\_1} \left\{ \frac{1}{D\_1} \Delta P\_{m1} - \frac{1}{D\_1} \Delta P\_{lc1} - \Delta f\_1 - \frac{1}{D\_1} \Delta P\_{12} \right\} \\ \Delta \dot{P}\_{\mathcal{S}1} &= \frac{1}{Y\_{\mathcal{S}1}} \left\{ \Delta P\_{c1} - \Delta P\_{\mathcal{S}1} - \frac{1}{R\_1} \Delta f\_1 \right\} \\ \Delta \dot{P}\_{m1} &= \frac{1}{Y\_{\mathcal{I}1}} \left\{ \Delta P\_{\mathcal{S}1} - \Delta P\_{m1} \right\} \\ \Delta \dot{P}\_{12} &= T \left\{ \Delta f\_1 - \Delta f\_2 \right\} \\ \Delta \dot{f}\_2 &= \frac{D\_2}{M\_2} \left\{ \frac{1}{D\_2} \Delta P\_{m2} - \frac{1}{D\_2} \Delta P\_{lc2} - \Delta f\_2 + \frac{1}{D\_2} \Delta P\_{l2} \right\} \\ \Delta \dot{P}\_{\mathcal{S}2} &= \frac{1}{Y\_{\mathcal{S}2}} \left\{ \Delta P\_{c2} - \Delta P\_{\mathcal{S}2} - \frac{1}{R\_2} \Delta f\_2 \right\} \\ \Delta \dot{P}\_{m2} &= \frac{1}{Y\_{\mathcal{I}2}} \left\{ \Delta P\_{\mathcal{S}2} - \Delta P\_{m2} \right\} \\ \Delta \dot{P}\_{c1} &= B\_1 f\_1 + \Delta P\_{l2} \\ \Delta \dot{P}\_{c2} &= B\_2 f\_2 - \Delta P\_{l2} \end{aligned}$$

Thus, the INPS in the form of state space can be written as

Table 1 lists the values of the parameters of the INPS.

**Table 1.** Description of the interconnected power system (INPS) parameters.

#### **3. Load Frequency Controller Design**

In an INPS, the frequency and *ACE* are two crucial pieces of data that need to be controlled to increase the level of protection of the power system. Any change in the supplyto-demand ratio or the speed regulator of the governor is responsible for deviations from the nominal frequency. A frequency controller is implemented to control these frequency deviations in the power system with an additional control approach. In this work, we designed a *FPID* controller for load frequency control.

The *FPID* controller is a modified conventional integer-order *PID* controller based on the fractional calculus used to design the integral and derivative mode of the *FPID* controller [48–50]. Thus, the construction of the *FPID* controller provides two more controlling parameters that enhance the tuning performance of the *FPID* controller.

The dynamic model of an integral part of the *FPID* controller can be written as

$$\, \_T I\_t^{\omega} f(t) = \frac{1}{\Xi(\omega)} \int\_T^t \frac{f(\sigma)}{(t - \sigma)^{1 - \omega}} d\sigma \tag{8}$$

Here, <sup>Ξ</sup>(•) is the function of the FI controller having fractional order *<sup>σ</sup>*.

Similarly, the derivative part of this controller can be defined as

$$\, \_T D\_t^{\omega} f(t) = \frac{1}{\Xi(n-\omega)} \frac{d^n}{d^n t} \int\_T^t (t-\sigma)^{n-\omega-1} f(\sigma) d\sigma \tag{9}$$

From the above two equations, the output of the *FPID* controller can be given as

$$y(t) = K\_p e(t) + K\_i D\_t^{-a} e(t)dt + K\_d D\_t^b e(t)dt\tag{10}$$

Thus, the *FPID* controller in the frequency domain can be represented by

$$\mathcal{L}\_{FPID} = K\_p + K\_i S^{-a} + K\_d S^b \tag{11}$$

where *a* and *b* are the power of the I and D of the *FPID* controller. The *FPID* controller has five modes of operation:

*a* and *b* of the *FPID* controller enhance the system quality and performance compared to the *PID* and *PI* controllers in the case of a smaller processing time and larger bandwidth, as well as being suitable for higher-order systems [51–53]. In this work, we selected *a*<sup>1</sup> = 0.995, *b*<sup>1</sup> = 1.5 and *a*<sup>2</sup> = 2, *b*<sup>2</sup> = 1.5 to design the *FPID* controller and compared the results with those of the integer-order *PI* and *PID* controllers, considering *a* = 1, *b* = 0 and *a* = 1, *b* = 1, respectively.

The high performance of the *FPID* controller compared to the *PI* and *PID* controllers can be investigated from Figure 2. As presented in Figure 2, the studied open-loop system indicates a high level of oscillation against a step input and deviates by a large frequency and tie-line power from the reference, whereas the *FPID* controller has approximately zero deviation of frequency and tie-line power from the reference, which is the lowest compared to the integer-order *PI* and *PID* controllers.

 Comparison of frequency deviations and tie-line power for open- and closed-loop systems. (**a**) Frequency deviation for Area 1; (**b**) frequency deviation for Area 2; (**c**) tie-line power.

#### **4. Effects of a Cyberattack**

‐ ‐ ‐ The design of the LFCs only for the INPS is not enough to guarantee protection against a CA. This is because the control parameters can also be targeted by attackers. Figure 2 shows that although the system is efficiently controlled by implementing different control approaches, any change in the controller or system parameters may lead to deviation from the nominal operation of the system. This work aimed to address the causes of parameter changes and present a solution to overcome these problems. Misleading information about the frequency measurement, speed regulator, or controller parameters due to a CA are

‐

**−**

**−**

**−**

**−**

**−**

**− − − − − − −**

**−**

**−**

**−**

**−**

**−**

**−**

responsible for generating false *ACE* signals, and the power system may produce or supply an undesirable amount of power. Thus, system frequency, as well as the power of the system, will be greatly affected [28].

The adverse effect on the INPS due to a parameter variation was investigated. The variation of sensitive parameters, such as the speed regulator, the biasing factor of the system, and *Kp*, *K<sup>i</sup>* , *K<sup>d</sup>* , *a*, and *b* of the *FPID*, *PID*, and *PI* controllers is considered. This case study is essential to address the need for INPS security and mitigate the effects of the unwanted changing of the parameters.

#### *4.1. Case Study 1: Variation of the Speed Regulator*

The speed regulator (R) is a sensitive parameter. The change of *R* produces an impact on the speed of the governor responsible for deviating the system frequency and power. Figure 3 shows that any small change of *R* is responsible for deviating the performance of the INPS and making the system operation unreliable.

**Figure 3.** Performance of the interconnected power system against the speed regulator variation without an automatic intrusion mitigation unit (AIMU).

#### *4.2. Case Study 2: Variation of the Biasing Factor*

**−**

**−**

**− − − − − −**

**−**

**−**

**− − − − − − −**

**−**

**− − − − − − − − − − −** The biasing factor (B) is another critical parameter that produces an impact on the construction of the *ACE* signal. The change of *B*1 and *B*2 is responsible for producing the wrong error signal fed to the controller. Thus, a wrong control signal is produced by the associated controller and may increase fluctuations in the INPS performance. The impact due to the change of *B* is shown in Figure 4. Figure 4 shows a huge change in the performance of the INPS due to the variable value of *B* that may cause the system to become unstable and damage the load.

> **− − − − − −**

> > **− − − −**

**− − − − − − −**

**−**

**−**

**−**

**−**

**− − − − − −**

**−**

**−**

**−**

**− − − − −**

**−**

**−**

**− − − − − − −**

**−**

**−**

**− − − − − −**

**− − − − − − −**

**− − − − −**

> **− − − − − −**

**−**

**−**

**−**

**−**

**Figure 4.** Performance of the interconnected power system against the biasing factor variation without an AIMU.

#### *4.3. Case Study 3: Variation of the Controller Parameter*