Fault Detection of the Power System Based on the Chaotic Neural Network and Wavelet Transform

. The safety and stability of the power supply system are aﬀected by some faults that often occur in power system. To solve this problem, a criterion algorithm based on the chaotic neural network (CNN) and a fault detection algorithm based on discrete wavelet transform (DWT) are proposed in this paper. MATLAB/Simulink is used to establish the system model to output fault signals and travelling wave signals. Db4 wavelet decomposes the travelling wave signals into detail signals and approximate signals, and these signals are combined with the two-terminal travelling wave location method to achieve fault location. And the wavelet detail coeﬃcients are extracted to input to the proposed chaotic neural network. The results show that the criterion algorithm can eﬀectively determine whether there are faults in the power system, the fault detection algorithm has the capabilities of locating the system faults accurately, and both algorithms are not aﬀected by fault type, fault location, fault initial angle, and transition resistance.


Introduction
e rapid development of the power system has led to a gradual increase in voltage levels and increasingly complex transmission lines, and it is more and more difficult to detect power system faults. However, the normal operation of the enterprise and people's production and life are seriously affected by the fault of the power system. erefore, it is particularly critical to accurately locate the fault point of the power system.
Recently, many scholars in related fields have conducted in-depth and extensive research on power system fault diagnosis. With the further development of artificial intelligence, especially machine learning and data mining, many theories and methods are provided for fault diagnosis. e fault diagnosis methods proposed at present can be summarized as frequency domain feature detection methods and adaptive detection methods. e frequency domain feature detection methods mainly include Fourier transform, wavelet transform, and Hilbert-Huang transform. e adaptive detection methods mainly include neural networks and expert systems. Although these theoretical studies have achieved certain results, there are still some limitations. In [1], single-ended travelling wave fault location method was used to transmission line fault location, but it is difficult to identify the wave head and the positioning accuracy was not high. In [2], integrated empirical mode decomposition (EEMD) was used to optimize empirical mode decomposition (EMD). is method avoided modal aliasing, but introduced false components, resulting in low positioning accuracy. In [3], a fault phase selection method based on high-order multiresolution singular entropy of current fault components is proposed. is method is basically not affected by the fault type, fault location, and transition resistance, but the setting of optimal threshold is complicated. e wavelet transform is a further improvement and extension on the basis of the Fourier transform. e Fourier transform cannot express the time-frequency localization property of nonstationary signals, and the wavelet transform solves this problem. Wavelet transform not only has good overall waveform analysis ability but also has outstanding time-frequency localization analysis ability. It can effectively obtain the detailed information of the signal in the time and frequency domains and has the ability to determine the singular point of the signal and analyze the degree of signal distortion [4,5]. In [6], wavelet transform was applied to fault detection of the fars power distribution system, which improved detection accuracy and achieved good results. Using wavelet transform to analyze signals, the key process is the extraction of approximate features and detailed features. We need to determine the optimal decomposition level, separate the feature components as far as possible, and keep the error apart from the extracted features. e current many methods need either manual setting threshold control or results testing with extracted trend by wavelet transform, which increases the difficulty of extracting feature components and reduces the accuracy of fault detection. e neural network simulates the neuron network of the human brain, and the values of the neurons in the input layer are mapped to the output layer, so that a certain implicit function relationship is established between the input and the output. At present, the multilayer perceptron neural network theory based on the BP algorithm is most widely used in fault diagnosis. In [7], the MLP neural network was adaptively updated using the BP algorithm to minimize tracking errors, which enhanced the performance of an MLP controller and improved the recognition accuracy. e neural network adopts a knowledge-based nonlinear processing method. Compared with the traditional diagnosis method, it is more flexible in the application of knowledge. At the same time, the neural network has a strong learning ability, and its fault tolerance is better in fault diagnosis, but there are still some defects in the neural network: (1) Neural network needs a large number of samples for training, and it is difficult to obtain sufficient samples in the field of power system fault diagnosis. (2) e neural network was easy to be trapped in local minimum.
To address these problems, a fault detection algorithm based on wavelet transform and the chaotic neural network is proposed in this paper. e chaotic neural network is capable of overcoming the shortcoming of trapping into the local optimum. And it has good performance of fault tolerance and associative memory capabilities. e design parameters of the proposed algorithm are shown in Table 1.
e main contributions of this paper are as follows: (1) A fault phase selection algorithm based on the chaotic neural network is proposed. e fault features extracted by wavelet are input to the chaotic neural network, and the fault type is determined by the corresponding relationship between input and output. And this algorithm is not affected by fault type, fault location, fault initial angle, and transition resistance. (2) A two-terminal fault detection algorithm based on wavelet transform is proposed. e db4 wavelet is used to detect the travelling wave head to diagnose the fault. is algorithm has high detection accuracy and is not affected by fault type, fault location, fault initial angle, and transition resistance. e remainder of this paper is organized as follows: Section 2 briefly introduces wavelet transform theory and Mallat algorithm. Section 3 discusses the modulus maximum theory, the two-terminal travelling wave location method, and phase-model transformation. Section 4 analyzes the chaotic neural network model. Section 5 summarizes the selection basis of the mother wavelet function. In Section 6, simulation is carried out to illustrate and prove the effectiveness and practicability of the proposed algorithm and compare it with the EMD algorithm. Finally, further discussion and conclusions are in Section 7.

Wavelet Transform eory.
Wavelet transform is the process of convolving the signal with the wavelet basis function, and the signal is decomposed into different frequency bands and time periods [8]. e signal f(t) is expanded under the telescopic-translational signal ψ a,b (t), and the process of decomposing f(t) is called continuous wavelet transform (CWT), and the expression is (1) In the above formula, ψ a,b (t) is called the mother wavelet, a is the scaling parameter, and b is the translation parameter. e essence of wavelet transform is to filter the signal with different filters. In the high-frequency region, the high resolution is reflected in time, and in the low-frequency region, the high resolution is reflected in frequency [9,10].
Since discrete signals are often used in the actual project, ψ a,b (t) is discretized into the following formula: en, get the discrete wavelet transform (DWT): Under certain conditions, the signal f(t) can completely be characterized by discrete wavelet coefficient C j,k .

Wavelet Mallat Algorithm
e spectrum of f(t) is f(ω). However, in the actual project, the spectrum is limited. As long as j is selected large enough, f(t) can be expanded with V j+1 : In the above formula, c j+1,n is the scale factor of scale space V j+1 , and c j+1,n � 〈f, φ j+1,n 〉 and φ j+1,k (t) are the scale functions of scale space V j+1 . Because In formula (5), n c j,k φ j,k (t) is the low-frequency component of f(t), which is the approximate part of f(t), and k d j,k Ψ j,k (t) is the high-frequency component of f(t), which is the detail part of f(t). And the low-frequency coefficient c j,k and the high-frequency coefficient d j,k can be obtained as follows: From the above formula, the coefficient c j,k and the d j,k can be obtained from the coefficient c j+1,k in the space V j+1 . e decomposition process is shown in Figure 1.

Reconstruction
Algorithm. e essence of the Mallat reconstruction algorithm is the inverse operation of the decomposition algorithm. By substituting equations (6) and (7) into equation (5), we get the following equation: l ⟶ k, k ⟶ n, then, we get c j+1,k � n c j,n h k− 2n + n d j,n g k− 2n .
In formula (9), c j+1,k ∈ V j+1 , c j,k ∈ V j , and d j,k ∈ W j . Reconstruction is the process of calculating c j+1,k from the coefficient c j,k and d j,k . e reconstruction process is shown in Figure 2.

Modulus Maximum Detection
eory. e original signal discontinuity or its differential discontinuity leads to the singularity of the signal. e essence of singularity detection is to identify the singular point of the signal and analyze the degree of signal distortion. According to the time-frequency localization property of wavelet transform, the signal singularity can be effectively analyzed [11][12][13].
e wavelet transform with scale s at point then the maximum point at scale s is u 0 , and the modulus maximum of the wavelet transform is |W f (s, u 0 )| [14,15]. Signals at different scales will have different modulus maximum; therefore, the singularity of the signal can be analyzed by extracting the modulus maximum points in the signal. By constructing a smoothing function to smooth the signals of different scales, the first and second order differentials can be extracted to identify the singular points of the signal [16,17]. e smoothing function θ(t) satisfies +∞ − ∞ θ(t)dt � 1 and lim t⟶±∞ θ(t) � 0. By constructing the mother wavelet ψ (1) (t) � (dθ/dt) and ψ (2) (t) � (d 2 θ/dt 2 ) and introducing the function ξ s (t) � (1/s)ξ(t/s), the wavelet transform of f(t) at scale s and point t under is defined as Expand the above formula as follows: , It can be seen from the above formulas that the wavelet transform W 1 f (s, t) can be obtained by the first order differential and the W 2 f (s, t) can be obtained by the second order differential. e discontinuous point of f(t) corresponds to the modulus maximum point of W 1 f (s, t) and the zero point of W 2 f (s, t) [18,19]. However, the electrical quantity of the nonfault point will be disturbed during the signal transmission, which will affect the accuracy of the  Complexity zero-crossing detection, so the result of the zero-crossing detection is usually not a discontinuity point, but an inflection point of the signal, and the modulus maximum detection is more reliable than zero-crossing detection [20,21]. After wavelet transform, the discontinuity point of the signal f(t) corresponds to the maximum point of According to the definition of wavelet transform W f (s, t), the maximum point of |W f (s, t)| reflects the position of the singular point of f * θ s (t) [22]. erefore, the singular point of the signal at different scales can be determined by detecting the maximum point of |W f (s, t)|.

Two-Terminal Travelling Wave Location Principle.
e schematic diagram of the two-terminal travelling wave location method is shown in Figure 3. When a fault occurs at point F, the transient travelling wave propagates to both sides along the transmission line. At the same time, reflection and refraction occur at the point where the wave impedance is discontinuous. Assume that the time when the travelling wave head reaches the detection point M and the detection point N is t m1 and t n1 , respectively, and after reflection, the time when the wave head reaches the detection point M and N is t m2 and t n2 , respectively. e total length of the line is L MN , the distance between the fault point F and M is L MF , the distance between F and N is L NF , and the travelling wave propagation speed is v; then, en, the formula of two-terminal travelling wave location is obtained: e two-terminal travelling wave location method only needs to detect the initial wave head of the fault travelling wave and does not need to consider the reflection and refraction at the discontinuity point of wave impedance [23][24][25]. erefore, the location algorithm is more simple. In this paper, the discrete wavelet transform is used to detect the transient travelling wave head, and the time t m1 propagated to the detection point M and t n1 propagated to the detection point N are used to locate the fault point.

Phase-Model Transformation.
In the three-phase transmission line, the electromagnetic coupling between each phase will affect the precision of fault location. In order to reduce the positioning error caused by electromagnetic coupling, it is necessary to transform the three-phase nonindependent phase components into mutually independent mode components. In this paper, Clarke transformation is used to decouple the signal.
e Clarke transformation matrices are as follows: In the above formulas, u a , u b , and u c are the phase voltages of the three-phase line.u α , u β , and u 0 are the mode components of the phase voltages. i a , i b , and i c are the phase currents of the three-phase line. i α , i β , and i c are the mode components of the phase currents.

Lyapunov Exponent.
In the process of dynamic evolution, the phase volume of the dissipative system continuously shrinks the trajectories to a limited range and separates the trajectories from each other. Because of its essential properties, the adjacent trajectories can be repelled and separated. is makes the trajectories converge and separate, separate and converge again, forming a self-similar structure with infinite levels. And this structure is called chaotic attractor. Two phase trajectories will attract or separate at an exponential rate over time. And the Lyapunov exponent is used to measure the degree of attraction or separation. e rate of convergence or divergence of the trajectories is called the Lyapunov exponent, which is often used as an effective parameter to describe the dynamic characteristics of the system. For a dissipative system, one of its Lyapunov exponents must be positive. erefore, the largest Lyapunov exponent can be used to determine whether the system or signal is chaotic.
For mapping x n+1 � F(x n ), in the process of continuous iteration, the two points separate and converge with the change of the value of dF/dx. Assuming that the discrete exponent caused by each iteration is constant λ. en, after n times iteration, the two points at the initial distance ε will evolve into the following formula: Figure 3: Schematic diagram of fault location.

Complexity
Taking the limit ε ⟶ 0, n ⟶ ∞, we get the following formula: It can be obtained from the above formula that It can be seen from the above formula that the constant λ is independent of the selection of the initial value, and this constant is the Lyapunov exponent of the system. e sensitivity of the Lyapunov exponent is related to the contraction and expansion of the phase space motion trajectory. In the direction with negative Lyapunov exponent, the trajectory is contracted and is not sensitive to the initial value. However, in the direction with positive Lyapunov exponent, the motion trajectory is rapidly separated and sensitive to the change of the initial value.

Chaotic Neural Network Model.
e neural network designed in this paper for power system fault phase selection is a three-layer chaotic neural network, composed of an input layer, a hidden layer, and an output layer, as shown in Figure 4. Four nodes are set at the input layer, and four discrete wavelet transform coefficients W u i (s, k), (i � α, β, c, 0) are input, respectively. e phase voltages are transformed into the mode components by Clarke phase-mode transformation. e mode components are convolved with discrete wavelet basis function: 〈u i , ψ s,k 〉, (i � α, β, c, 0), and the wavelet transform coefficient W u i (s, k) is obtained, as shown in the following formula: e number of output layer is 1, and the output result T is "0" or "1." When the output result is "0," it means that the line is operating normally and the starting element does not act; when the output is "1," it means that there are faults in transmission line, the starting element will act, and the protection device will start.

Fault Signal Detection Algorithm
Based on Daubechie4

Selection of Wavelet Function.
ere are certain differences in the transformation characteristics of different wavelet functions. If the selected mother wavelet is different, the wavelet coefficients are also different; so, before using MATLAB for simulation analysis, we need to select the appropriate mother wavelet function [26]. e selection of wavelet function needs to take into account its vanishing moment, symmetry, and compactly support (support length). e compactly support and vanishing moment determine the influence range of wavelet function at a specific scale, so a compromise must be dealt with when choosing a smaller support length and a higher order vanishing moment [27,28]. Symmetry describes the smoothness of the signal after wavelet reconstruction. Common wavelet functions and characteristics are shown in Table 2.
In order to further analyze the effect of different wavelets on the detection of discontinuities, we construct a freqbrk signal, which includes a low-frequency sinusoidal signal within t ∈ [0, 500] and a high-frequency signal within t ∈ [500, 1000]. ree different kinds of wavelet, haar wavelet, sym4 wavelet, and db4 wavelet, are used to 3-layer wavelet decomposition, and the analysis results are shown in Figure 5. e results show that all these three wavelets can detect signal discontinuities, but obviously, the db4 wavelet has a better effect; so, the db4 wavelet is used to detect the singularity of the signal in this paper.

Algorithm
Steps. Combining the characteristics of the fault signal, the criterion algorithm based on the chaotic neural network and the detection algorithm based on wavelet transform are proposed as follows: (1) Simulink is used to build a power system model and output three-phase voltage signals and three-phase current signals (2) Travelling wave signal is obtained from three-phase voltage signals and three-phase current signals (3) e mother wavelet is selected, and the number of decomposition layers is determined (4) Clarke transformation is used to transform the threephase voltage signals into mode components (5) Wavelet transform is performed to the mode components, and the detail coefficients are input to the chaotic neural network (6) e discrete wavelet transform (DWT) is used to analyze the travelling wave signal f to obtain the  Figure 6. e system is a dual-power three-phase power supply system, consisting of transmission lines, voltage measuring elements, current measuring elements, oscilloscopes, and fault generators. e three-phase phase angle of the two power sources is 30°, the sampling frequency is 20 kHz, the simulation duration is T � 0.1 s, the fault occurrence time is t 0 � 0.035 s, and the sampling points are 10000. e system can simulate all kinds of faults that may occur in the power system. e transmission line parameters are shown in Table 3.

Extract Simulation Signal.
By setting the parameters of "three-phase Fault" element, the phase voltages and phase currents of the system can be extracted, as shown in Figures 7 and 8. e effective values of phase voltages and phase currents of the system can be extracted through Scope1 and Scope2, respectively, as shown in Figures 9 and 10. When the fault occurs, the voltage of phase A drops sharply, the voltages of phase B and phase C rise slightly, and the phase currents increase.

Extract Travelling Wave
Signal. e phase voltages and phase currents of the three-phase transmission line are obtained through the system model, and the corresponding mode components are obtained with equations (16) and (17). en, the travelling wave signals detected at the M-side and N-side are obtained, as shown in Figures 11 and 12.

Simulation of the Chaotic Neural Network Criterion
Algorithm. In order to verify the effectiveness of the proposed chaotic neural network criterion algorithm in this paper, the wavelet transform coefficients of four mode components are input. e modulus maximum of wavelet transform coefficients |W u i (s, k)| max , (i � α, β, c, 0) is extracted. And it is analyzed whether this method is accurate and reliable under different operation conditions such as different fault types, fault positions, transition resistances, and fault initial angles. e simulation results are shown in Tables 4-7. Within the allowable error range, it can be seen from |W u i (s, k)| max , (i � α, β, c, 0) that when the power system operates normally, |W u i (s, k)| max � 0, when phase A is grounded, |W u α (s, k)| max � 2|W u i (s, k)| max , (i � β, c, 0), when both phase A and phase B are grounded, , 0), and when there is a three-phase short circuit fault, erefore, it is concluded from Tables 4-7 that when the transmission line operates normally, the output result is 0, and the starting element does not work, and when there is a fault in the line, the output result is 1, and the starting element takes effect. And the proposed criterion algorithm based on the chaotic neural network is not affected by fault types, fault positions, transition resistances, and fault initiation angles.

Simulation of the Wavelet Transform Fault Detection
Algorithm.
e travelling wave signal is sampled, and 500 sampling points are obtained. Daubechies 4 discrete wavelet transform is used to analyze the travelling wave signal, and the simulation results are shown in Figures 13 and 14. e signal shown in Figure 13 is the detail coefficient of 4-layer wavelet decomposition of the M-side travelling wave. e signal shown in Figure 14 is the detail coefficients of 4-layer     In order to verify the accuracy and good performance of the discrete wavelet transform algorithm proposed in this paper, EMD is performed on the signal as a comparison, as shown in Figures 15 and 16. e signal shown in Figure 15 is the intrinsic mode functions (IMFs) of EMD of the M-side travelling wave. e signal shown in Figure 16 is the IMFs of     (15): L MF � 101.135 km; so, the error is 0.378%, which is ten times of the algorithm proposed in this paper. It can be seen that the algorithm proposed in this paper is accurate and reliable. Next, it is analyzed whether this method can locate accurately and reliably under different operation conditions such as different fault types, fault positions, transition resistances, and fault initial angles.
(1) Different Fault Types. e parameters are set as follows: the length of the transmission line is L MN � 350 km, the transition resistance is R f � 10 Ω, the fault initial angle is δ � 30°, and the fault position is 150 km away from the M-side bus. e simulation results of different fault types are shown in Table 8.
e results show that no matter what type of the fault, the measurement error is less than 0.05%.  Table 9. e results show that the positioning algorithm is not affected by fault positions, and the positioning error is less than 0.03%.  Table 10. e results show that the positioning algorithm is not affected by transition resistances, and the positioning error is less than 0.04%.  Table 11. e results show that the positioning algorithm is not affected by fault initial angles, and the positioning error is less than 0.03%.

Conclusion
When there are faults in the power system, it is very important to implement relay protection quickly and accurately. Travelling wave signals will be generated at the fault point and propagate to both sides of the line. During the transmission of the travelling wave, the forward travelling wave and the travelling wave generated by refraction and reflection superimpose each other, which makes it difficult to determine the wave heads of the travelling wave. Based on the power system model built by MATLAB/Simulink, a criterion algorithm based on the chaotic neural network and a fault detection algorithm based on discrete wavelet transform are proposed in this paper. e criterion algorithm based on the chaotic neural network is capable of overcoming the shortcomings of trapping into the local optimum, and it has good performance of fault tolerance and associative memory capabilities. e fault detection algorithm has the capability of detecting the fault location of transmission lines. e two-terminal travelling wave location method only needs to detect the initial wave head of the fault travelling wave and does not need to consider the    reflection and refraction of the fault travelling wave; so, the location algorithm is more simple. Due to the difference in the transformation characteristics of different wavelet functions, a detection method based on db4 wavelet is determined to obtain more accurate results. After multiresolution wavelet decomposition, we find that the distribution of the energy of the fault signal on each wavelet coefficient is different. e valuable part of the signal is mainly reflected in the specific wavelet coefficients. ese detail coefficients are input to the chaotic neural network to verify that the criterion algorithm has the capabilities of determining whether there are faults in transmission lines. And these detail coefficients are used to accurately determine the time when the fault travelling wave head reaches the Mside bus and the N-side bus, and then, the fault position is detected with the two-terminal travelling wave location algorithm. Finally, it is illustrated that both the criterion algorithm and the fault detection algorithm are not affected by fault type, fault positions, transition resistance, and fault initial angle. erefore, the criterion algorithm based on the chaotic neural network and the fault detection algorithm based on discrete wavelet transform are of great significance, which provide a favorable exploration method for the realtime fault detection of some systems and has a broad and farreaching application prospect.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.