## 3 Novel Framework for Advanced Synchrophasor Analysis in Modern Control Centres
### Disturbance Classification
Afterwards, a feature vector \(\underline{x}_{\text{F}}\) of dimension \(P\) is generated from the high-dimensional hidden state matrix using an embedding function \(f_{\text{E}}\) with \(\underline{\theta}_{\text{E}}\). The general equations are given in (9) and (10). \[\mathbf{H}=f_{\text{F}}\big{(}\mathbf{X}_{\text{N}},\underline{\theta}_{\text{F}}\big{)} \text{ with }\mathbf{X}\in\mathbb{R}^{\text{T}\times\text{K}}\text{ and }\mathbf{H}\in\mathbb{R}^{\text{T}\times\text{Q}} \tag{9}\]  
\[\underline{x}_{\text{F}}=f_{\text{E}}\big{(}\mathbf{H},\underline{\theta}_{\text {E}}\big{)}\text{ with }\underline{x}_{\text{F}}\in\mathbb{R}^{\text{P}} \tag{10}\]  
The goal of the embedding function is to capture the necessary information from the hidden state matrix to differentiate between the classes. According to (11) and (12), the classifier \(f_{\text{C}}\) is based on a standard softmax regression to compute the class probability vector \(\underline{x}_{\text{P}}\) with the parameters \(\underline{\theta}_{\text{C}}\) over all \(C\) classes. \[\underline{x}_{\text{P}}=f_{\text{C}}\big{(}\underline{x}_{\text{F}},\underline {\theta}_{\text{C}}\big{)}\text{ with }\underline{x}_{\text{P}}\in\mathbb{R}^{\text{C}} \tag{11}\]  
\[\underline{x}_{\text{P}}=\frac{exp\big{(}\underline{w}_{\text{C}}\underline{ x}_{\text{F}}+b_{\text{C}}\big{)}}{\sum_{C}exp\big{(}\underline{w}_{\text{C}} \underline{x}_{\text{F}}+b_{\text{C}}\big{)}}\text{ with }\underline{w}_{\text{C}}\in\mathbb{R}^{\text{P}} \tag{12}\]  
The final class assignment \(\hat{y}\) is based on the maximum probability value estimated by the classifier. The parameters of the feature extraction \(\underline{\theta}_{\text{F}}\), embedding \(\underline{\theta}_{\text{E}}\) and classifier \(\underline{\theta}_{\text{C}}\) are learned jointly via backpropagation using the cross-entropy loss formulation given in (13). \[e=-\sum_{C}y_{\text{C}}\log x_{\text{P}} \tag{13}\]  
Figure 6: GRU based classification model with additional embedding function. The GRU layer in the feature extraction step contains the most expensive operations in the _disturbance classification module_. For each time step \(t\), the GRU computes a hidden state vector \(\underline{h}^{t}\) using the actual input vector \(\underline{x}^{t}\) and the hidden state vector from the previous time step \(\underline{h}^{t-1}\). This is done sequentially over all \(T\) time steps to compute the hidden state matrix \(\mathbf{H}\). The weights and biases of the GRU \(\underline{\theta}_{\text{F}}\) are shared among all time steps. The principle workflow is shown in Figure 7.  
Inside a GRU, the input vector and the last hidden state vector are used to compute the output vectors of the update gate \(\underline{z}^{t}\) and the reset gate \(\underline{r}^{t}\). From that, a candidate hidden state vector \(\underline{\overline{h}}^{t}\) is estimated, which represents the actual information gained by the GRU. In the last step, the new hidden state vector \(\underline{h}^{t}\) is computed depending on the output of the update gate vector, which decides whether to keep the old information (\(\underline{z}^{t}\to 1\)) or to forget them and to use the new information (\(\underline{z}^{t}\to 0\)). These gating mechanisms allow a very flexible control over the learned representations and accounts for the vanishing gradient problem when applying backpropagation over time (BPTT). The basic formulations for the gate calculations are given in (14) to (17). \[\underline{z}^{t}=\sigma\big{(}\mathbf{U}_{\text{z}}\underline{h}^{t-1}+\mathbf{W}_{ \text{z}}\underline{x}^{t}+\underline{b}_{\text{z}}\big{)}\text{ with }\mathbf{U}_{\text{z}}\in\mathbb{R}^{\text{Q}\times\text{Q}}\text{ and }\mathbf{W}_{\text{z}}\in\mathbb{R}^{\text{K}\times\text{Q}} \tag{14}\]  
Figure 6.0  
Figure 6.1  
Figure 6.2  
Despite of the gating mechanisms, the information cannot be maintained over long time periods.