# A Method of Discriminating Between Power Swings and Faults Based on Principal Component Analysis
## 3 Power Swing Blocking Method Using PCA  
### Basic Principle  
For the scenarios of normal system operation, power swings, and line faults, the waveform of the voltage of the transmission line exhibits different characteristics under each of these scenarios. In other words, the three-phase voltage of the transmission line, to some extent, reflects the current state of the transmission line. If the instantaneous values of three-phase voltage are considered as the coordinates of a point in a three-dimensional coordinate system, then the set of points represented by a series of instantaneous three-phase voltage values under different scenarios will have different characteristics in their distribution within the three-dimensional coordinate system. However, it is not easy to directly observe the distribution of the points corresponding to the three-phase voltage in a three-dimensional coordinate system. In order to better observe the different distribution characteristics of the points corresponding to the three-phase voltage under different operating scenarios, a data processing method is needed to reduce the dimensionality of the three-dimensional data corresponding to the three-phase voltage. As analyzed in the second part of our study, PCA can reduce the dimensionality of the data while preserving the main features of the original data. PCA is employed here to process the three-phase voltage data, projecting the three-dimensional coordinate points represented by the three-phase voltage data onto a two-dimensional coordinate system for subsequent analysis. Figure 1: Schematic diagram of PCA processing results. To obtain the desired two-dimensional coordinate system, the three-phase voltage of the transmission line during normal operation is used. During normal operation, the three-phase voltage in the time domain can be expressed as follows:  
\[\left\{ \begin{array}{l}u_{\text{A}}=M\cos(\omega_{0}t+\varphi)\\ u_{\text{B}}=M\cos(\omega_{0}t+\varphi+\frac{4}{3}\pi)\\ u_{\text{C}}=M\cos(\omega_{0}t+\varphi+\frac{2}{3}\pi)\end{array} \right. \tag{6}\]  
where \(M\) is the amplitude of the voltage, \(\omega_{0}\) is the power frequency, and \(\varphi\) is the initial phase of phase A voltage. Taking the three-phase voltage sampling points over one cycle as three row vectors, matrix \(\mathbf{X}\) can be constructed as follows:  
\[\mathbf{X}= \begin{bmatrix}\mathbf{x}_{\text{A}}^{\text{T}}\\ \mathbf{x}_{\text{B}}^{\text{T}}\\ \mathbf{x}_{\text{C}}^{\text{T}}\end{bmatrix}  \tag{7}\]  
where the superscript \"T\" denotes the transpose of the matrix, and \(\mathbf{x}_{\text{A}},\mathbf{x}_{\text{B}}\), and \(\mathbf{x}_{\text{C}}\) are three column vectors, and can be expressed as follows:  
\[\mathbf{x}_{\text{A}}= \begin{bmatrix}M\cos\varphi\\ M\cos(\omega_{0}\Delta t+\varphi)\\ \vdots\\ M\cos[\omega_{0}(N-1)\Delta t+\varphi]\end{bmatrix}  \tag{8}\]  
\[\mathbf{x}_{\text{B}}= \begin{bmatrix}M\cos(\varphi+\frac{4}{3}\pi)\\ M\cos(\omega_{0}\Delta t+\varphi+\frac{4}{3}\pi)\\ \vdots\\ M\cos[\omega_{0}(N-1)\Delta t+\varphi+\frac{4}{3}\pi]\end{bmatrix}  \tag{9}\]  
\[\mathbf{x}_{\text{C}}= \begin{bmatrix}M\cos(\varphi+\frac{2}{3}\pi)\\ M\cos(\omega_{0}\Delta t+\varphi+\frac{2}{3}\pi)\\ \vdots\\ M\cos[\omega_{0}(N-1)\Delta t+\varphi+\frac{2}{3}\pi]\end{bmatrix}  \tag{10}\]  
In the expressions of \(\mathbf{x}_{\text{A}}\), \(\mathbf{x}_{\text{B}}\), and \(\mathbf{x}_{\text{C}}\), \(\Delta t\) is the sampling interval and \(N\) is the number of sampling points over a cycle. According to (7)-(10), each column of matrix \(\mathbf{X}\) represents the sampling values of three-phase voltage at a certain moment, which also corresponds to the coordinates of a point in a three-dimensional coordinate system. Since the data are sampled over a cycle during normal operation of the power system, the average value of each row in \(\mathbf{X}\) can be regarded as 0. From the definition of matrix \(\overline{\mathbf{X}}\) shown in (2), matrix \(\mathbf{X}\) in (7) can be used directly as \(\overline{\mathbf{X}}\) in the PCA calculation process.