State Estimation within IED Based Smart Grid Using Kalman Estimates

: State Estimation is a traditional and reliable technique within power distribution and control systems. It is used for building a topology of the power grid network based on state measurements and current operational state of different nodes & buses. The protection of sensors and measurement units such as Intelligent Electronic Devices (IED) in Central Energy Management System (CEMS) against False Data Injection Attacks (FDIAs) is a big concern to grid operators. These are special kind of cyber-attacks that are directed towards the state & measurement data in such a way that mislead the CEMS into making incorrect decisions and create generation load imbalance. These are known to bypass the traditional bad data detection systems within central estimators. This paper presents the use of an additional novel state estimator based on Kalman ﬁlter along with traditional Distributed State Estimation (DSE) which is based on Weighted Least Square (WLS). Kalman ﬁlter is a feedback control mechanism that constantly updates itself based on state prediction and state correction technique and shows improvement in the estimates. The additional estimator output is compared with the results of DSE in order to identify anomalies and injection of false data. We evaluated our methodology by simulating proposed technique using MATPOWER over IEEE-14, IEEE-30, IEEE-118, IEEE-300 bus. The results clearly demonstrate the superiority of the proposed method over traditional state estimation.


Introduction
Smart grid is an IED-based distribution and generation facility where all the power facilities such as buses, nodes, control centres and meters use duplex communication and share useful data for operational efficiency [1].The schematic view of the smart grid is shown in Figure 1.This intricate network includes customers ranging from single users, critical businesses, defence facilities, and airports.Since the smart grid is an Internet of Things (IoT) based network where every section of the network is interlinked, hence, cyber-attacks to a certain part of the network could take control of the complete grid [2].The attackers could use it for further malicious motives such as shutdown, cascaded blackouts, or terrorism activities [3].Therefore, the protection of smart grid from FDIAs and cyber-attacks require immediate attention.State estimation is a traditional technique that uses a limited number of measurements for determining the operational state of a system [4].State estimation is used to build a grid topology at the supervisory control and management layer [5].State estimation creates a matrix known as jacobian matrix by using the state data and covariance matrix that also helps with detection of errors [6].
It is also preferrable for an electrical grid because installation of metering devices at every bus is not practical.A bus refers to a part of transmission network within electrical grid where multiple transmission lines intersect.Cyber-attacks such as stealth and FDIAs have been known to target state estimation data and state measurements which are collected through IEDs such as phasor measurements units (PMUs) [7].A PMU like any other metering device is an IED that collects useful information and state data for monitoring the operational status of the sections of the grid [8].For synchronisation purpose, a global positioning system signal is used with every PMU.This helps for correlation of state data from different sections & buses within multi-distributed gird [9].FDIAs prepared based on the knowledge of the network configuration makes them more lethal and difficult to detect using traditional bad data detection approaches [10].Furthermore, it is also desirous to have quick detection of FDIAs, however quick detection operations are computationally expensive.
In most state estimation algorithms, the measurement observation model is highly nonlinear which can be solved by the possible use of Kalman filter for nonlinear systems [11].The Kalman filtering techniques have been improved significantly over the past few years with the variants such as extended Kalman filter, unscented Kalman filter and robust minimum variance unscented Kalman filter [12].In this paper, we have investigated the detection of FDIA by using a minimum variance unscented Kalman filter (mv-UKF) to predict and update the state function starting from the previously known states [13].These values were compared with the results acquired from a traditional weighted least square (WLS) based state estimation algorithm.The difference in the two deviates significantly when the system is under the influence of FDIA triggering the presence of an attack.As per author's knowledge, this technique has not been used in combination in distributed WLS.
Since WLS only collects a single set of measurements, it fails to estimate the state for a quasi-steady state load profile [14,15].For this purpose, we proposed the use of distributed state estimation in that improves the result by performing state estimation and false data detection in a distributed fashion [16].This also reduces the computational complexity of the central estimator.However, state estimation in a distributed fashion requires installation of PMUs at multiple locations hence there is a trade-off between number of PMUs versus detection accuracy [17].Therefore, dynamic state estimation is useful and can help with identifying presence of bad data and topology errors.A PMU like any other metering device is an IED that collects useful information and state data for monitoring the operational status of the sections of the grid [8].For synchronisation purpose, a global positioning system signal is used with every PMU.This helps for correlation of state data from different sections & buses within multi-distributed gird [9].FDIAs prepared based on the knowledge of the network configuration makes them more lethal and difficult to detect using traditional bad data detection approaches [10].Furthermore, it is also desirous to have quick detection of FDIAs, however quick detection operations are computationally expensive.
In most state estimation algorithms, the measurement observation model is highly nonlinear which can be solved by the possible use of Kalman filter for nonlinear systems [11].The Kalman filtering techniques have been improved significantly over the past few years with the variants such as extended Kalman filter, unscented Kalman filter and robust minimum variance unscented Kalman filter [12].In this paper, we have investigated the detection of FDIA by using a minimum variance unscented Kalman filter (mv-UKF) to predict and update the state function starting from the previously known states [13].These values were compared with the results acquired from a traditional weighted least square (WLS) based state estimation algorithm.The difference in the two deviates significantly when the system is under the influence of FDIA triggering the presence of an attack.As per author's knowledge, this technique has not been used in combination in distributed WLS.
Since WLS only collects a single set of measurements, it fails to estimate the state for a quasi-steady state load profile [14,15].For this purpose, we proposed the use of distributed state estimation in that improves the result by performing state estimation and false data detection in a distributed fashion [16].This also reduces the computational complexity of the central estimator.However, state estimation in a distributed fashion requires installation of PMUs at multiple locations hence there is a trade-off between number of PMUs versus detection accuracy [17].Therefore, dynamic state estimation is useful and can help with identifying presence of bad data and topology errors.
The main motivation of this study is to develop a new data attack detection technique to overcome the problem that the traditional WLS cannot identify [18,19].In the current literature, there is lot of emphasis being made on Kalman filter state estimation as well as distributed state estimation [20].However, there is not much work available to cite where both of these techniques are combined together.Our proposed technique will find new vulnerabilities for power system design that can target detection methods for corresponding vulnerability in order to improve system detection and robustness.Considering the historical state estimates of the system without being attacked, a correct reference for state estimation with Kalman filtering is proposed by combing WLS and mv-UKF filter estimates.
The main contribution of this paper is: • False data detection using measurement residual obtained from WLS based distributed state estimation • Acquire estimates using mv-UKF and form a covariance matrix • Observe the deviation in the output by performing two levels of state estimation using WLS and Kalman filter The remainder of paper is organised as follows.The related work is explained in Section 2. The mathematical formulation is explained in Section 3. The case studies and simulations are discussed in Section 5. Finally, Section 6 concludes the paper.

Literature Review
In Ref. [2], Amin et al.Presented a fault discrimination approach based on machine learning algorithm (MLA) based cyber-attack.State of the art MLA classifiers were used to distinguish between faults and cyber-attacks within smart grid.They clarified that the precision in the detection of classifiers decreases when they are trained only with faults and data.The future scope includes the analysis of different types of cyber-attacks and the use of synthesized data for the early training of MLA in distinguishing between faults and cyber-attacks.The proposed techniques in this work have needs to be verified with IEEE-bus systems with distributed estimation.
J. Cao et al. [3] investigated a potential invasion pathway of the FDIA against a cyber physical system and designed a novel model to detect different types of FDIA.The problem of high false alarm rate of the model caused by imbalance data was addressed.They also proposed oversampling in order to obtain pseudo-data and stored into the database that assists in training and evaluating the model.An ensemble classifier was constructed to detect the FDIA which improved the accuracy of difficult-classification samples and precision of FDIA detection.The results show that this model can detect different types of FIDAs.However, the system needs to be tested on a number of different size bus systems.
Al-Eryani and Baroudi in [4] analysed distributed partitioning state estimation using chi-square tests using IEEE-39 Bus system.The system was divided into 3 subsystems and each partition was treated as a separate independent system.False data was injected in two different places.The results demonstrate that false data was detected using subsystem partition while not treating the whole grid as one system.The downside of this technique was that it was tested on a small system.The proposed methodology does not deal well with non-linearities in the load profile.
Pei et al. in [5] proposed a deviation based false data detection method based on an additional Kalman filter for the purpose of dynamic state estimation.The exponential weighting functions were used to detect FDIA effectively.The measurements were collected using the PMUs synchronised using Global position system signals.However, due to continuous variation and non-linearities in the load profile, a time variant method needs to be looked into to improve the detection.
In Ref. [6], an online parametric estimate based on software defined controller was used with GPU enabled robust estimator.The graphical processing unit with deep learning algorithm, short-term memory, and an extended Kalman filter was used to solve the issue of massive connections.However, the implementation requires 6G enabled network in order to achieve minimum latency countering the transients in order to minimise the chances of cascading failures, therefore, it is not going to take place in coming years before trials and practical tests can take place.
In Ref. [7], chen et al. presented a false data detection model based on particle swarm optimization.The system was tested against false data attack with minimum attack residual increment.Two kinds of estimates were proposed for conducting chi-square tests.However, the system was not analysed for multiple cyber-attacks as this will lead to a much more complex residual model and hence it will be difficult to solve the false data attack vector.The proposed methodology needs to be verified for distributed state estimation.
In Ref. [9], a parallel dynamic state estimator using graphical processing units and markov model was proposed due to stochastic nature of the power system.The history of the system's behaviour was used to improve the accuracy of the results obtained through Euclidean distance metric.However, the detection accuracy needs to be improved by increasing the number of processing units which will lead to increased computational complexity.The use of parallel graphical processing units for state estimation may increase computational complexity.

State Estimation Using Weighted Least Squares
The state estimation within power grid uses an internal bad data detection system known as chi-square test based on a normalized residual of collected phasor measurements [20].Based on these phasor measurements, a threshold limit is created that defines the normal operating conditions of the grid.The estimates will always stay below this threshold limit created by the system, under normal operating conditions, unless there is bad data present.A residual superseding the threshold limit triggers the presence of bad data alarm, hence the estimator will not accept the measurement as an authentic.In order to formulate the objective function for chi-square test, the non-linear model for a state estimation can be represented as follows [21]: where z is the meter measurement, h(x) is the function of state variable x represents a Jacobian matrix depending on the network topology, and e is the noise that follows a Gaussian distribution.
In order to solve the WLS estimation problem, the objective function can be defined as follows [22]: where J( x) is the weighted-sum square residual that follows chi-square distribution, x is an estimate of x solved by WLS, X 2 (m−n) is the detection threshold corresponding to p, where p is the detection confidence which is taken as 95%, and n is the number of state variables.We examine the function J( x) ≥ X 2 (m−n) , if the resulting value is greater, then bad data is detected, otherwise no bad data.

False Data Injection Attack Mathematical Formulation
In order to inject false attack, the measurements at each bus are falsified by adding an attack vector a.The state estimates can be represented as follows [23,24]: a = [a 1 , a 2 , . . ., a m ] T (5) where a = [a 1 , a 2 , . . ., a m ] T represents the attack at corresponding bus, H is the Jacobian matrix representing the topology of the network, c = (c 1 , c 2 , . . ., c n ) T is an arbitrary vector, e is the system noise [25].This attack is not detected since the state (x + c) is treated as the real value in the estimator.The hypothesis tests fail to detect the FDIA as this will not change the measurement.For this purpose, the use of dynamic state estimator based on Kalman filter is used.

Kalman Filter as an Estimator
The Kalman filter is better suited for dealing with non-linearities in the load profile which WLS cannot estimate [26].It takes a set of data and estimates the trend of data by using a distribution function of these variables.As shown in Algorithm 1, the additional estimator is mv-UKF where kalman estimates are acquired based on a priori knowledge of the previous estimates.These estimates are used to measure the deviation between the WLS estimate and mv-UKF estimates.Collection of sigma point is necessary in order to form the mean and covariance matrix of the kalman estimates.
A Kalman filter contains feedback loops and can be used for time series prediction with historical data [11].The non-linear equations in kalman are not linearized as with other gradients methods [12].Instead, a statistical distribution of the state is represented through sigma points which provides estimates of the actual state and the posterior covariance matrix [11][12][13].The test results in [1] were completed using DSE only and was limited to IEEE-14 and IEEE-30 Bus without the use of Kalman filter.In this work, we have expanded the research work in [1] by using the similar methodology, however, included the IEEE-118 and IEEE-300 bus and an additional Kalman filter has also been incorporated.

Mathematical Formulation Based on Kalman Estimates
Kalman filter estimator can be represented as follows: where x is the state vector, q t−1 is the system noise, r t is the measurement Gaussian noise with zero mean, and z is the measurement vector.The function f and h are nonlinear equations representing the system and measurements model in terms of the state variables [13].The Kalman filter implementation consists of the prediction and correction steps.First, it obtains the state and matrix covariance prediction, in the second step it calculates the Kalman gain and the state and matrix covariance update steps [11,12]: The sets of 2n + 1 point is created in (8) for the state vector x at time t − 1 as follows: The initial state vector and the initial covariance matrix is defined based on a priori knowledge of the historical estimates [13].The sets of sigma points are estimated by the state update function [14].
Step I: where i = 0, 1, . . ., 2n, X i t−1 is the (i + 1)th column of matrix X t−1 and the resulting X t is an n × (2n + 1) matrix propagated by points.The predicted state mean vector x − t and covariance matrix P − t are defined as follows: where W m i refers to weights of the Kalman filter and Xi k are sigma points [11].Q t−1 is the covariance matrix of the process noise [12].A minimal set of sampling points known as sigma points are selected and transformed using the nonlinear function, whereas the new mean and the covariance are formed out of those transformed points [13].The idea is that it is easier to approximate a Gaussian distribution than it is to approximate an arbitrary nonlinear function [14].
Step II: State Correction The points around the predicted state mean vector and the covariance matrix are defined as: Derive points from the measurement update function as, The mean is calculated as: where W m i is the weights and Y −i t is the measurement update function for the corrected state estimate [11].
The covariance S k and the cross-covariance C t matrix of the state and measurements are given as: where R t is the covariance matrix of the observation noise vector [12][13][14].
The filter gain K t , the mean x t and the covariance P t are estimated as: With the help of additional online estimator, state variables can be forecasted based on prior knowledge of historic measurement.

Results & Discussion
In order to evaluate the performance of the proposed algorithm, the simulations were conducted on IEEE-14, IEEE-30, IEEE-118 and IEEE-300 bus systems using MATLAB & MATPOWER.The state variables were estimated using WLS based state estimation and mv-UKF techniques.The system was subjected to FDIA on various bus and the deviation in the output of the two results was measured.As shown in Figure 2, the WLS based distributed state estimates DSE were plotted against real input and proposed methodology, when there was no FDIA introduced.The normalized residual for all the voltage magnitudes were found to be below the predefined threshold level set to trigger the presence of FDIA.
Table 1 shows the estimates obtained through DSE and an additional estimator based on mv-UKF.This clearly shows that the size of the subsystem plays an effective role in improving the results.The tests were carried out with different subsystems.Table 2 demonstrates the attack cases, number of measurements and the value of objective function obtained using Equation (2).It is clear from the readings that the values obtained using DSE stays below threshold limit hence presence of bad data is not detected.The proposed estimator gives a value higher than the threshold limit hence indicating the presence of bad data.
Electronics 2021, 10, x FOR PEER REVIEW 7 of 12 where is the covariance matrix of the observation noise vector [12][13][14].The filter gain , the mean xt and the covariance Pt are estimated as: With the help of additional online estimator, state variables can be forecasted based on prior knowledge of historic measurement.

Results & Discussion
In order to evaluate the performance of the proposed algorithm, the simulations were conducted on IEEE-14, IEEE-30, IEEE-118 and IEEE-300 bus systems using MATLAB & MATPOWER.The state variables were estimated using WLS based state estimation and mv-UKF techniques.The system was subjected to FDIA on various bus and the deviation in the output of the two results was measured.As shown in Figure 2, the WLS based distributed state estimates DSE were plotted against real input and proposed methodology, when there was no FDIA introduced.The normalized residual for all the voltage magnitudes were found to be below the predefined threshold level set to trigger the presence of FDIA.Table 1 shows the estimates obtained through DSE and an additional estimator based on mv-UKF.This clearly shows that the size of the subsystem plays an effective role in improving the results.The tests were carried out with different subsystems.Table 2 demonstrates the attack cases, number of measurements and the value of objective function obtained using eq (2).It is clear from the readings that the values obtained using DSE stays below threshold limit hence presence of bad data is not detected.The proposed estimator gives a value higher than the threshold limit hence indicating the presence of bad data.After the FDIA at bus 20, 40, 60, 80, 100 as shown in Table 1, the intensity of the voltage magnitude was changed.It can be observed that the WLS based state estimates remain below the threshold limit, hence the presence of FDIA was not detected.With the proposed methodology, the voltage magnate exceeds the threshold level defined by the objective function, hence triggering the FDIA attack.Table 2 shows different attack scenarios and the value of estimates against J(x).It is clear that by using the proposed technique, the magnitude exceeds the J(x) hence indicative of FDIA, whereas the traditional WLS estimates stay below the threshold, hence no FDIA can be detected.
The test spanned over 4 h, samples collected every 30 s, which is an expected sampling period within SCADA.The results show that the estimated values with our method are improving in the case of large-sized grids.All meter readings are contaminated by gaussian noise with covariance of 10 −1 .In order to simulate Equations ( 4) and ( 5), the voltage magnitudes were falsified at corresponding bus to emulate the injection of false data attack.In the Figure 2, the estimates obtained through proposed estimator were plotted along with the results obtained through DSE and actual input in per unit scale against each bus number, when there is no FDIA.
The estimates obtained using mv-UKF estimator were plotted against each bus along with real values and DSE in case of an FDIA.It can be easily seen that the Kalman filter estimates based on priori information are closer to the actual values in case of FDIA.For example, in Figure 3, at Bus no. 10 for IEEE-300 Bus, the estimates through Kalman filter are improved compared with WLS method where the measurements are recorded at 0.90 per unit which is below the threshold limit 1.The DSE alone fails to detect this kind of attack.At Bus no.58, Figure 3, in IEEE-300 Bus, the estimates obtained through WLS is 0.93 which is below the threshold limit 1 per unit.This implies the residual will stay below the threshold limit hence false data will not be detected.The results from the proposed online detector based on Kalman filter gives an improvement and a value that exceeds the threshold; hence the presence of false data will be triggered.The simulation results confirm the improvement in state estimation and false data detection.It is concluded that in the case of FDIA, the deviation in the results of WLS and Kalman filter was larger in the case of FDIA.

Conclusions
Paper propose the use of online Kalman filter estimator based on prior knowledge of the state estimates in addition to traditional WLS state estimator within DSE.The proposed estimator improves the state estimation results and detect FDIA which is not detected using DSE alone.The measurements collected through metering devices are compared with the estimates produced by online estimator and the difference of two identifies the presence of bad data.The effectiveness of the proposed estimator was proven by the tests conducted over IEEE-14 bus, IEEE-30 bus, IEEE-118 bus, and IEEE-300 bus using MATLAB.The false data is injected at different buses and the output of the WLS was recorded.The results are plotted along with actual measurements and from online estimator.The results prove that the estimates generated by additional estimator have im- The DSE alone fails to detect this kind of attack.At Bus no.58, Figure 3, in IEEE-300 Bus, the estimates obtained through WLS is 0.93 which is below the threshold limit 1 per unit.This implies the residual will stay below the threshold limit hence false data will not be detected.The results from the proposed online detector based on Kalman filter gives an improvement and a value that exceeds the threshold; hence the presence of false data will be triggered.The simulation results confirm the improvement in state estimation and false data detection.It is concluded that in the case of FDIA, the deviation in the results of WLS and Kalman filter was larger in the case of FDIA.

Conclusions
Paper propose the use of online Kalman filter estimator based on prior knowledge of the state estimates in addition to traditional WLS state estimator within DSE.The proposed estimator improves the state estimation results and detect FDIA which is not detected using DSE alone.The measurements collected through metering devices are compared with the estimates produced by online estimator and the difference of two identifies the presence of bad data.The effectiveness of the proposed estimator was proven by the tests conducted over IEEE-14 bus, IEEE-30 bus, IEEE-118 bus, and IEEE-300 bus using MATLAB.The false data is injected at different buses and the output of the WLS was recorded.The results are plotted along with actual measurements and from online estimator.The results prove that the estimates generated by additional estimator have improved in the case of FDIA.The difference in the reading of two estimators identifies the false data.The simulation results prove the superiority of the proposed method over WLS under false data injection attack.

Figure 1 .
Figure 1.A schematic of an IED based smart grid.

Figure 1 .
Figure 1.A schematic of an IED based smart grid.
(a) Estimation using WLS and Proposed technique for IEEE-14 Bus (b) Estimation using WLS and Proposed technique for IEEE-30 Bus

Figure 2 .
Figure 2. Estimate data collected using DSE WLS and Proposed technique.

Table 1 .
Compromised Bus numbers with Error.
Figure 2. Estimate data collected using DSE WLS and Proposed technique.

Table 1 .
Compromised Bus numbers with Error.

Table 2 .
Objective function for different Attack scenarios.