A Topology Identiﬁcation Method to Enhance the Linear Estimation of Generator Rotor Speeds

—This paper proposes a methodology to avoid biased estimations of generator rotor speeds under network topology changes. The algorithm is based on deep neural networks and executes topology processing considering the relevant branches for rotor speed estimations. The proposed technique uses the measurements from the same phasor measurement units (PMUs) needed to carry out generator rotor speed estimations; thus, it does not imply an additional cost for the transmission system operator. The proposed methodology is demonstrated with a centralized and distributed approach, using a modiﬁed version of the New England test system and the IEEE 118-bus test system, respectively. The numerical results on both test systems demonstrate the reliability and the low computational burden of the proposed algorithm.


I. INTRODUCTION
A. Motivations D YNAMIC state estimation (DSE) algorithms require measurements from an electric network with a high sampling rate with the aim of executing state estimation within a short time frame. As a result, complementary tools such as bad data detection and topology identification (TI) also need to be executed faster. In this regard, the development of phasor measurement units (PMUs) has made possible the implementation of new DSE techniques. In this framework, this work proposes a fast topology identification (TI) method based on the information provided by PMUs. The proposed algorithm is focused on the DSE of generator rotor speeds, with the aim of avoiding a biased estimation in case a topology change is not properly detected with traditional methods.
B. Literature review of DSE and TI algorithms DSE algorithms applied to power systems have been under extensive study, and several new techniques have been developed in recent years. A comprehensive overview of the most recent DSE techniques, along with their principal benefits and future research needs, are provided in [1] and, more recently, in [2].
With respect to DSE formulations applied to the estimation of synchronous machine rotor speeds, several works based on different Kalman filter types have been recently proposed, e.g., [3]- [7]. All these methods require, at least to some extent, knowledge of the synchronous machine parameters and make use of a set of nonlinear differential algebraic equations.
A different approach to estimating generator rotor speeds is proposed in [8]. This method is linear and model-independent; its formulation is derived from the concept of the frequency divider formula (FDF) [9]. One of the main advantages of this algorithm is that it does not require the modeling of the generators and the loads, since their interactions with the rest of the system are reflected in the bus frequency variations captured by the PMUs. These frequency variations are then used to estimate the generator rotor speeds. However, as discussed later in Section V, erroneous network parameters and incorrect topology identification do affect the rotor speed estimations. This work focuses on the latter topic and provides a reliable and fast method to avoid biased rotor speed estimations due to an incorrect TI within the model-agnostic linear estimator framework [8].
The topology configuration is provided by the network topology processor (NTP), which relies on the status of the electrical switching devices. However, the NTP can be affected by malfunctions, as described in [10]. In this regard, several TI methods have been developed in recent years. Some of them are implemented in the power system state estimation framework and rely on one or several state estimation iterations. This is the case of the residual analysis method and the state vector augmentation method, both described in [10]. Other algorithms use more advanced techniques; for example, [11] carried out the TI by employing a fuzzy c-means clustering method. A methodology that includes the status of the switching devices in the state estimation vector is proposed in [12]. In [13], normalized Lagrange multipliers were used to detect topology errors along with bad data. An event-triggered TI based on a recursive Bayesian approach is proposed in [14]. However, these methods show computational times ranging between hundreds of milliseconds and some seconds. Therefore, they cannot be coupled with the model-agnostic linear estimator of generator rotor speeds, which has a very small computational burden [8].
In this work, a modified version of the algorithm proposed by the authors in [15] is used to carry out topology processing. The proposed methodology is based on deep neural networks (DNNs) and uses the measurements obtained from PMUs, which are in any case necessary to estimate the generator rotor speeds, to avoid biased estimations due to incorrect topology information.

C. Contributions
This work proposes a TI algorithm to avoid a biased estimation of synchronous generator rotor speeds under topology changes. The proposed method offers the following advantages: • It can be coupled with the model-independent rotor speed estimator in real-life implementations since its computational burden is sensibly smaller than the CPU cost of the considered DSE algorithm. It is worth mentioning that none of the other aforementioned TI algorithms seems computationally compatible with the rotor speed estimator since they require at least several hundred milliseconds to execute topology processing. • It does not require the installation of any additional measurement device, since it only needs the PMUs used to carry out the generator rotor speed estimation. • It is straightforward and simple to use once the model has been trained. • It is suitable for extended power networks since it can be applied with a distributed approach.

D. Paper organization
The rest of the paper is organized as follows. Section II briefly describes the model-agnostic linear estimation of generator rotor speeds and the DNNs used to implement the TI. In Section III, the proposed methodology is described, providing both a centralized and a distributed implementation. In Section IV, a case study description is provided, describing the training process of the DNN. The test results are provided in Section V, showing how the proposed TI method integrates with the linear generator rotor speed estimator with a centralized and distributed approach, implemented on a modified version of the New England test system and on the IEEE 118bus test system, respectively. Finally, Section VI concludes the paper.

II. DESCRIPTION OF THE ALGORITHMS
A. Model-agnostic linear generator rotor speed estimator The model-agnostic linear algorithm introduced in [8] allows us to estimate the synchronous generator rotor speeds based on the frequency variations measured by the PMUs. The following two different approaches are reported.
Optimization problem: In the first approach, a generator rotor speed estimator based on a convex optimization (OPT) problem is proposed. The optimization problem is formulated as follows: where e B is the vector of the frequency measurement errors; W is the diagonal covariance matrix of the frequency measurements; ∆ω G represents the vector of the sought generator rotor speed deviations; vector ∆ω B represents the bus frequency deviations measured by the PMUs; B BB and B BG are the imaginary parts of two matrices Y BB and Y BG that are included in the extended admittance matrix Y ext of the network; and finally, µ B are the dual variables of the constraint conditions. Solving the optimization problem, one can determine the following significant sensitivities: It is worth noting that if all PMUs employ the same technology, the diagonal elements of the matrix W are equal and therefore (3) can be simplified as follows: where D is the frequency divider matrix and D + is its left inverse. These sensitivities can be used to determine which bus frequencies are more significant to improve the estimation robustness and accordingly choose the PMU location. Weighted least square formulation: This method allows a more straightforward approach. In this case, the problem is solved using a conventional weighted least square (WLS) formulation, whose solution is expressed as follows: The WLS formulation allows a fully decoupled estimation of the rotor speed of each generator. In fact, the non-null elements of each row of D + correspond to the bus frequency measurements required to estimate the generator rotor speed associated with the analyzed row.
While the OPT approach presents a higher robustness to the loss of one measurement and a lower sensitiveness to measurement noise and latency, the WLS formulation has the advantage of allowing a decentralized rotor speed estimation and needs a lower number of PMUs to be installed. To achieve the real-world implementation of the model-agnostic linear estimator, a compromise between the advantages of the two algorithms must be found. This objective is beyond the scope of the paper, which focuses on avoiding biased estimations due to incorrect topology processing. For the complete mathematical derivation, along with illustrative examples and a description of the main advantages and disadvantages of both methods, the interested reader can refer to [8] and [16].

B. Deep neural network
DNNs are characterized by having several hidden layers between the input and output neurons. Generally, as their dimension increases, they can accomplish more complex tasks.
Before the DNN can be used to execute a prediction, it must be properly trained. During the training process, the input signal is propagated forward to the DNN through its synaptic connections until an output signal is generated at the output end of the structure. Then, the output signal is compared with a desired output, and an error signal is computed based on the error signal function. This error signal is back-propagated through the DNN to adjust the synaptic weights and the neuron bias and, consequently, to minimize the cost function of the error signal. The iterative process is repeated until an acceptable accuracy on the training set is obtained. The conceptual steps of the training process are briefly reported hereafter, but the interested reader can refer to [17] and [18] for a comprehensive explanation of DNNs and their optimization heuristics.
Feed-forward propagation: In the feed-forward step, the input signal is propagated from one neuron to the next layer neurons through the synaptic connections: where x i represents the input vector entering the i th layer, the matrix of (n, m) dimensions W i,i−1 represents the synaptic weights (where n and m are the number of neurons of the i th and i − 1 th layers, respectively), vector y i−1 represents the output signal coming out of the i − 1 th layer, and vector b i represents the neuron bias values to be applied to the i th layer neurons. Afterwards, the computation of the active function is performed, which is usually a nonlinear function of the input pattern: with a i being the neuron activation function, which generates the i th layer output vector y i . The activation function strongly modifies how the output signal is computed and the accuracy of the DNN on both the training and test phases; therefore, its formulation must be carefully evaluated [18]. Finally, when the input vector is propagated through all the hidden and output layers, the error signal can be calculated as follows: where e j is the error vector, j represents the output layer index, and ζ is a generic function that computes the output error based on the difference between the estimated output vector o and the desired output vectorô. As in the case of the activation functions, the error function formulations also have an important impact on the DNN performance. The interested reader is directed to [18] for a detailed discussion on this topic.
Backpropagation: During the backpropagation step, the partial derivative of the error signal with respect to the synaptic weights and bias are determined. In this way, it is possible to compute the adjustments in the weights and bias hyperspace that minimize the error signal. The general formulation, applied to the hidden layers, is the following: where ξ is the error signal backpropagated up to the i th hidden layer. In the case of the output layer, since there is a direct relationship between the error signal and the neurons, the formulation is simpler: with j being the output layer index. Once the partial derivatives are computed, the weights can be updated: where l r is the learning rate, which allows us to tune the trajectory rate of change in the weight and bias hyperspace.
To update the neuron bias, an analogous procedure is executed. Once the DNN achieves the desired accuracy over the training set, its performance must be tested. If the training process has been carried out preventing overfitting and underfitting phenomena, the DNN is able to correctly execute the predictions outside the training set.

III. METHOD DESCRIPTION
The proposed method uses a DNN to execute topology identification, solving a classification problem. The final aim of this formulation is to avoid a biased error of the modelindependent linear generator rotor speed estimator. The proposed methodology is illustrated in Fig. 1.
The input vector is composed of the bus voltages and the branch currents provided by the same PMUs used to carry out the rotor speed estimations. Before the measurements are used by the TI, they are normalized as follows: where x i is the i th measurement of the input vector, and x max and x min are the maximum and the minimum values of the training set, respectively, to be applied separately for each type of measurement. As explained in [15], this procedure avoids generalization problems and typically accelerates the training process. Once the input signal has propagated through the DNN, the output signal is obtained at the output end of the structure. Depending on the number of topology configurations to be estimated, a different number of output neurons must be used. For example, if the number of topology configurations is between 9 and 16, then a 4-digit binary number must be used. The topology configurations considered for the centralized and distributed case studies of this work can be found in [19]. In this work, all the hidden and output layer neurons employ the sigmoid activation function: The formulation of the error signal used to train the DNN is the following: In this work, the extended admittance matrix corresponding to each topology configuration is calculated offline. Subsequently, when topology processing has been executed, the corresponding elements are used to compute the D + matrix.
Since the DNN needs a fixed number of input values, in case the PMU measurements are affected by gross errors, a bad data detection and identification algorithm and a subsequent bad data replacement methodology should be used. The objective is beyond the scope of this paper, but some possible algorithms that seem suitable for these tasks can be found in [20] and [21].
The proposed algorithm is applicable using a centralized or a distributed implementation. Since it can significantly affect the practical application of the proposed method, its main advantages and disadvantages are described.

A. Centralized TI approach
The centralized TI approach allows the algorithm to determine the relevant topology configurations for the generator rotor speed estimations using only one DNN. It is a straightforward implementation, but it may not be applicable in large power systems since the number of possible topology configurations grows exponentially. This fact significantly increases the training times and the possibility that the DNN experiences overfitting or underfitting phenomena. Extensive simulations made by the authors of this work show that the centralized approach is advisable up to a few tens of topology configurations. After that, distributed implementation is preferable.

B. Distributed TI approach
For extended power systems, the training process of the DNN can be time consuming since the number of relevant topology configurations for rotor speed estimation increases drastically. As previously described, this fact can lead to a cumbersome training process. Fortunately, since the WLS estimator allows a decentralized estimation of the generator rotor speeds, topology processing can also be employed in a distributed way, i.e., for each generator taken individually. Since only the branches that connect the generation bus with its neighboring buses must be taken into account, this implementation minimizes the number of possible topology configurations. Thus, the training set is smaller, and the training process is sensibly easier. As discussed later in Section V, this distributed implementation seems particularly interesting in case a trade-off between the WLS and OPT estimators is used.

IV. CASE STUDY DESCRIPTION
To verify how the proposed TI method integrates with the model-independent linear rotor speed estimator, several simulations are conducted using a modified version of the New England test system and the IEEE 118-bus test system. In all the considered cases, the WLS generator rotor speed estimator is considered. However, the benefits of a correct TI are extendable to the OPT approach. For both the centralized and distributed approaches, the structure of the DNNs is reported along with the accuracy achieved during their training and test process. Finally, three specific study cases are reported in Section V to show how the generator rotor speed estimation can benefit from correct topology processing.
• Centralized TI approach -Modified New England test system In the modified New England test system, the centralized approach of the TI is applied. Fig. 2 a) shows the location of the PMUs, along with the branches whose status needs to be estimated to correctly execute the rotor speed estimation. In this case, a set of 48 PMU measurements is used to feed the DNN; they can be found in [19]. As can be observed in Fig. 2 a), most of the generators are connected in antenna. Based on the WLS estimator properties, only the information of the branch connecting the generator bus to the adjacent bus is necessary. In these cases, if the branch opens, the generator remains isolated. Consequently, if no load is considered, the generator simply trips. More interesting cases occur when the generator is connected with two transformers working in parallel and when the generator is connected to two different buses. To highlight this last situation, the New England test system has been modified by adding a new bus 40. This new bus is connected to bus 30 through a new transformer and to bus 25 by means of a new line. Because the test system is relatively small, a unique DNN that is able to predict the relevant topology configurations can be implemented, obtaining a centralized approach. The DNN implemented for this case is able to detect significant topological changes for each generator. Therefore, it is trained to recognize 16 possible configurations, which are reported in [19]. The learning rate used for this case is lr = 5 · 10 −5 . As reported in Table I, the DNN has 48 input neurons, 3 hidden layers of 30, 15 and 8 neurons, and 4 output neurons.
• Distributed TI approach -IEEE 118-bus test system In this work, to show a distributed implementation, a study case on the IEEE 118-bus test system is reported. For the sake of example, the distributed approach is applied to the estimation of the generator 31 rotor speed. Exploiting the properties of the WLS rotor speed estimator, only the frequency measurements of bus 31 and its neighboring buses are used, namely, bus 17, bus 29 and bus 32. The portion of the test system considered for the implementation of the decentralized approach is represented in Fig. 2 b). To train the DNN, a set of 10 PMU measurements is used. In this case, since the connection status of 3 branches must be considered, the number of relevant topology configurations for the rotor speed estimations of this generator is 2 3 = 8.
These topology configurations and their associated binary outputs, along with the input measurements, are reported in [19]. The learning rate used in this case is lr = 10 −5 . As can be observed in Table I, the DNN has 10 input neurons, 2 hidden layers of 7 and 5 neurons, and 3 output neurons.
For both the centralized and distributed approaches, the training process of the DNN is executed considering generation and load events. These events produce fluctuations in the electric network so that the bus voltage varies from 0.8 p.u. to 1.20 p.u., and the branch current flows from approximately 0 to 120%. As explained in [15], these variations allow the DNN to be properly trained and to extract the relevant features that enable correct input-output mapping. The DNN of the centralized approach is trained considering 145 generation and load events, and its training set is composed of 5648 samples. In the case of the distributed approach, 33 events are considered, and the training set has 2424 training samples. For both the modified New England and IEEE 118-bus systems, the DNN testing phase is executed considering a topology change following a short-circuit clearance. All the simulations last 10 s, the short-circuit occurs at t=1 s, and the fault clearance occurs 100 ms later. The simulation time step used is 10 ms, and therefore, the DNN executes 1000 topology processing for each simulation. This scenario is repeated for every topology configuration considered. Table I shows the DNN structures, along with the accuracy achieved during the training and test phases. The test accuracy is very high; for both configurations, it is approximately 99.5%. The only situations in which the proposed TI method misforecasts topology processing occur throughout the shortcircuit event. In fact, during the training process, these events were not considered, and it is therefore predictable that the DNN cannot properly interpret them.
The set of measurements used for the DNN training and test phases, along with the input measurements of the bus frequencies and the actual rotor speeds (taken as reference output values), are imported from the software DIgSILENT PowerFactory [22]. The model used by PowerFactory to compute the bus frequency values, used as input values of the simulations, is a classical phase-locked loop (PLL).
To test the sensitivity of the proposed TI method to the presence of noise, a Gaussian distributed error with zero mean and a σ standard deviation is added to all the measurements used to execute the topology processing. The accuracy of the measurement devices corresponds to 3σ, and the supposed value for this work is taken from [23]: 0.7% of the reading value for both the bus voltage magnitude and line current magnitude measurements. No noise for the bus frequency measurement is supposed since the WLS rotor speed estimator used in this work is quite sensitive to these types of turbulence, and the results may be significantly affected by this factor. This effect can be decreased through appropriate filtering [8]. However, this topic is beyond the scope of this paper, and therefore, no noise is considered for this type of measurement.
To quantitatively compare the results obtained using the proposed TI method with the case in which no TI is considered, the root mean square (RMS) of the residuals is used: where ω Gi is the estimation of the i th generator rotor speed, t represents the considered time step, T is the number of time steps of the simulation, andω Gi is the actual generator rotor speed value. The algorithms used in this paper have been coded in MATLAB. The computer used to run the simulations is an Intel Core i7-3770 3.40 GHz with 6 GB of RAM. Table I shows the test accuracy of the proposed TI method. As described in the previous section, the proposed method is able to correctly detect all the relevant topology configurations. In this section, some interesting cases are reported to demonstrate how the model-agnostic linear generator rotor speed estimator can benefit from a correct TI.

V. TEST RESULTS
In all of the simulations reported in this section, the time step is 10 ms, and random Gaussian noise, as described in Section IV, is applied to the measurements used to feed the DNN.
A. Case 1: Centralized implementation; topology change in branch [20][21][22][23][24][25][26][27][28][29][30][31][32][33][34] In this case, the centralized TI implementation on the modified New England test system is considered. The event that leads to a topology change is the disconnection of one of the two parallel transformers connecting machine bus 34 with bus 20. The simulation includes a three-phase shortcircuit with zero fault impedance at t=1 s located at the low voltage side of one of the two parallel transformers between buses 34 and 20. The fault is cleared by the disconnection of the affected transformer 100 ms later. This event leads to a topology change that affects the elements (5,20) and (5,34) of D + [19] and therefore affects the rotor speed estimation of the generator at bus 34. Fig. 3 shows the actual rotor speed of the considered synchronous machine and the estimated rotor speed with and without the proposed TI. The proposed method avoids a biased estimation of the generator rotor speed due to prompt detection of the new topology configuration.
It is worth mentioning that the spikes observed during the fault occurrence and its clearance are due to the frequency estimation technique of the PMUs. In this work, as already mentioned, they are provided by the software PowerFactory and are based on a PLL model [22].
Observing the last instants of the simulation, it can be noticed how both rotor speed estimations converge to the actual rotor speed values. The benefit of using correct topology information manifests only during transient periods. In fact, only during this time lapse do the bus frequencies vary, and the weight given by the non-null elements of D + affects the rotor speed estimations.
With the proposed TI method, the enhanced performance of the rotor speed estimations is also reflected in the RMS of the residuals, which are reported in Table II. It can be observed that the computational time of the entire ten-second simulation for the two estimators is quite similar. Therefore, the usage of the proposed TI method does not imply a significant computational increase. In fact, the average CPU time of the proposed approach is approximately 4 · 10 −5 s. However, the rotor speed estimator CPU time is on the order of milliseconds  per time step using the indicated software. These results lead to the fact that the proposed methodology not only avoids biased estimations but is also suitable for integration with fast DSE algorithms. It is worth remarking that the other topology processing algorithms described in Section I are not suitable for DSE implementations since they have high computational burdens and cannot be coupled with fast estimators.

B. Case 2: Centralized implementation; branch 2-30 outage
In this second case, the centralized approach on the modified New England system is considered. The simulated event is a three-phase short-circuit with zero fault impedance that occurs at t=1 s in the low voltage terminals of transformer 2-30 at the bus 30 side. Subsequently, the transformer protection opens after 100 ms, provoking a topology change that affects the generator 30 rotor speed estimation. Due to the inclusion of the new bus 40, the generator remains connected to the network through transformer 30-40 and line 25-40. As in the previous study case, the topology change affects the rotor speed estimation. Before the switching device intervention, the elements of the D + matrix that affected the rotor speed estimation of generator 30 were (1,2), (1,30) and (1,40) [19], i.e., the relevant frequency measurements to conduct the estimation were those of bus 2, bus 30 and bus 40. However, due to the disconnection of branch 2-30, the bus 2 frequency measurements must no longer be taken into account. In fact, if the topology configuration is not properly detected and the bus 2 frequency values remain considered for the estimation, the rotor speed estimations will be biased. These considerations can be used to interpret the results shown in Fig. 4.
In Table III, the RMS of the residuals are reported. Also with this comparison index, it is possible to observe how the proposed TI increases the rotor speed estimation accuracy. Similar considerations with respect to the previous study case can be made about the computational burden of the proposed TI method.   In this third case, the distributed TI is used to estimate the rotor speeds of the generator connected to bus 31. The simulation includes a short-circuit current at t=1 s located at the bus 31 side of line 29-31. One hundred ms later, the protection of line 29-31 opens to clear the perturbation. A coordination error is supposed, and the protection of line 31-32 also trips. The disconnection of these two lines leads to a topological change that affects the estimation of the rotor speed of generator 31. The considerations made for the previous case can also be extended to this situation, i.e., the bus 29 and 32 frequency measurements should not be taken into account after the fault clearance.
Observing Fig. 5, it is possible to see how correct topology processing allows accurate rotor speed estimation. With respect to the previous study cases, the differences with the estimator that does not employ the TI are more obvious. This is because, in the case where no TI is employed, the estimator uses two frequency measurements that are no longer mathematically related to the generator 31 rotor speed, at least using the WLS formulation. The RMS of the residuals and the CPU times of this case are reported in Table IV.

D. Additional remarks on the simulation results
The results reported in this section show that the proposed TI method is computationally compatible with the modelindependent linear generator rotor speed estimator since the former has CPU times two orders of magnitude lower than those of the latter. It is possible to observe that the higher the topology errors are, the greater the rotor speed estimation benefits from the TI. In fact, in the first case, the generator remains connected to the network through one of the two transformers connected in parallel. Hence, adjacent bus frequency measurements remain useful for estimating the generator rotor speed. Thus, the estimation bias is attributable to the wrong weights, i.e., the relative elements of D + , given to the frequency measurements. In the second case, the complete disconnection of branch 2-30 implies that the bus 30 frequency measurements must not be taken into account after the switching device opens. Otherwise, the estimations will be strongly biased. This justifies the significant difference between the estimation with and without the TI. In the third case where two bus frequency measurements are erroneously taken into account to perform the estimation, the bias is even larger.
Finally, it is worth noting that generator 31 considered in the third case is connected in antenna through an elevator transformer, which is not represented in the single-line diagram. In fact, to estimate the rotor speeds, it would be sufficient to use the frequency variations of the generator bus (not represented in the test system) and its adjacent bus 31. With this consideration, it is possible to observe that the proposed methodology is applicable, and probably with more interest, to the cases in which redundant PMU measurements are used. In fact, the measurements of buses 17, 29 and 32 can be used to reconstruct the bus 31 frequency in case its measurement is lost. Actually, this case represents a possible trade-off between the fast and completely decoupled WLS rotor speed estimator and the more robust OPT estimator, both introduced in [8]. The proposed TI is also applicable in this case.

VI. CONCLUSION
This paper proposes a TI method that can be coupled with the model-agnostic linear generator rotor speed estimator to compensate topological errors and avoid biased estimations.
The simulation results show that the proposed methodology is reliable and computationally compatible with the fast rotor speed estimator considered in this work.
A centralized implementation on a modified New England test system is proposed. This approach is straightforward since only one DNN needs to be tuned and trained, but it cannot be easily implemented on extended electric networks.
A distributed application is proposed on the IEEE 118-bus test system. This approach is simpler, and can be used on large power systems to include redundant frequency measurements without compromising the TI performance. In fact, the distributed approach can be applied to a trade-off scenario between the WLS and OPT formulations, which is the situation that looks more promising for real-life implementations.
Future work may be directed toward the handling of bad data and noise mitigation affecting the PMUs, for both the TI and the generator rotor speed estimator.