Waveform identification method based on EMD and LSTM network
The EMD-LSTM method effectively identifies atypical faults in electrical systems by decomposing waveforms and enhancing features, ensuring timely alarms and stable operation through continuous learning.
Patent Information
- Application Number
- CN202411160839.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-17
AI Technical Summary
Existing fault recorders in electrical systems fail to detect hidden dangers such as slow melting of PTs and aging of secondary terminal blocks, and poor contact, leading to false operations and reduced detection efficiency.
A waveform recognition method using Empirical Mode Decomposition (EMD) to decompose and enhance features, combined with a Long Short-Term Memory (LSTM) network for continuous learning and fault identification, enabling timely alarms for atypical faults.
Enhances feature extraction and classification, reducing misdiagnosis and ensuring stable equipment operation by quickly identifying voltage and current waveform changes.
Smart Images

Figure CN119147891A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of waveform analysis and processing of electrical equipment, and in particular to a waveform recognition method based on EMD and LSTM network. Background Art
[0002] At present, the voltage, current and related microcomputer protection output information of important electrical equipment have been connected to the fault recorder. When a typical fault occurs in the electrical system, the microcomputer protection is activated and the fault recorder can record and save the cause and specific information of the action in detail.
[0003] Disadvantages of existing technology: When a typical fault occurs in the electrical system, the current and voltage change significantly. The microcomputer protection device is activated and the fault recorder records and saves the action information. However, when the system has hidden dangers such as slow melting of PT, aging of secondary terminal block and poor contact, the fault recorder cannot detect and issue an alarm in time. When other hidden dangers occur again, it may cause false operation and other phenomena. The staff only relies on daily inspections to discover waveform changes and analyze the causes of hidden dangers, which greatly reduces the efficiency of hidden danger detection and is not conducive to stable operation of equipment. Summary of the invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a waveform recognition method based on EMD and LSTM network, which uses EMD to decompose the waveform to extract and enhance the features, and LSTM network training and learning to quickly identify and issue an alarm when the voltage and current waveforms change, effectively reducing the hidden dangers of the equipment and providing a reliable basis for the stable operation of the equipment.
[0005] The technical solution of the present invention is as follows: comprising the following steps:
[0006] The following steps are involved:
[0007] Step 1: Sample and record the collected positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform at the generator end through a fault recorder;
[0008] Step 2: Convert the sampled machine-end positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform into a matrix mode;
[0009] Step 3: Perform empirical mode decomposition (EMD) on the above voltage and current signals respectively;
[0010] Step 4: Send the information after empirical mode decomposition and re-weighting into the LSTM network to effectively mark the characteristic information in the voltage and current signals. By continuously learning, extracting and strengthening the features, atypical faults such as PT slow melting and aging and poor contact of secondary terminal blocks can be effectively identified and alarms can be issued.
[0011] The present invention has the following beneficial effects: historical waveforms are classified and marked as training sets, and are decomposed into different IMF components and feature extracted using an empirical mode decomposition algorithm (EMD algorithm), and the decomposed IMF components are re-weighted and combined and sent to a long short-term memory (LSTM) network for training, and the decomposed waveforms are trained and feature training and learning are strengthened, so that the features of different types of waveforms can be effectively identified and memorized, and finally unlabeled waveform features are sent to classify them, so that hidden dangers that cause unstable operation of equipment can be quickly eliminated, and waveform recognition through EMD and LSTM networks can effectively prevent the occurrence of misdiagnosis events caused by insufficient technical capabilities of inspection personnel, and when voltage and current waveforms change, they can be quickly identified and alarmed, effectively reducing equipment hidden dangers and providing a reliable basis for the stable operation of equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a flow chart of the steps of the present invention.
[0013] Figure 2 This is the EMD decomposition waveform diagram of the present invention.
[0014] Figure 3 This is a structural diagram of the LSTM unit of the present invention. DETAILED DESCRIPTION
[0015] For the above and other technical contents, features and effects of the present invention, please refer to the following attached Figures 1 to 3 The detailed description of the embodiments will clearly show that the structural contents mentioned in the following embodiments are all based on the drawings in the specification.
[0016] Exemplary embodiments of the present invention will be described below with reference to the accompanying drawings.
[0017] Embodiment 1, a waveform recognition method based on EMD and LSTM network, is divided into two parts. The first part is empirical mode decomposition, which needs to be performed under the Microsoft system using MATLAB software. The second part is LSTM network training and learning, which needs to be performed under the Ubuntu 16.04 operating system using Pycharm Communtiy 2018.2 software. The neural network required by the present invention is constructed in the environment of tensorflow learning framework, such as Figure 1 As shown, the following steps are included:
[0018] Step 1: Sample and record the collected positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform at the generator end through a fault recorder;
[0019] Step 2: Convert the sampled machine-end positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform into a matrix mode;
[0020] Step 3: Perform empirical mode decomposition (EMD) on the voltage and current signals respectively, decompose the waveform into different IMF components, extract features and re-weight and combine them, which can enhance the effective features of the waveform and facilitate the learning of the neural network;
[0021] Step 4: Send the information after empirical mode decomposition and re-weighting into the LSTM network to effectively mark the characteristic information in the voltage and current signals. Through continuous learning, feature extraction and enhancement, atypical faults such as PT slow melting and aging and poor contact of secondary terminal blocks can be effectively identified and alarms can be issued. The LSTM network is a variant of the deep recurrent neural network and has the functions of a recurrent neural network. The gate structure effectively alleviates the gradient vanishing and gradient explosion phenomena of the recurrent neural network, and has good results in processing voltage and current waveform signals with large data volumes.
[0022] Embodiment 2, based on embodiment 1, the step 3 performs empirical mode decomposition (EMD) on the voltage and current signals respectively. The specific empirical mode decomposition features are as follows:
[0023] Step 3.1: x(t) represents the original signal. First, find the local maximum and local minimum of the original sequence x(t), and use the spline interpolation method to fit the original data x up (t) and x low (t) represent the upper and lower envelopes respectively, and the average value m(t) of the upper and lower envelopes is calculated according to the formula
[0024]
[0025] Step 3.2: Let the curve h(t) obtained by subtracting m(t) from x(t) be the intermediate discriminant curve.
[0026] h(t)=x(t)-m(t) (3-2)
[0027] Step 3.3: If the intermediate discriminant curve satisfies the IMF component constraint condition, it is recorded as the first IMF component C1(t). Otherwise, the decomposition is continued until the IMF condition is satisfied.
[0028] C1(t)=h(t) (3-3)
[0029] Step 3.4: r1(t) is the remaining component of the first residue, where r1(t) = x(t) - C1(t). r1(t) is used as the new original waveform to participate in the next decomposition. The above steps are repeated until the nth IMF component C is obtained after the nth repetition. n (t), when the nth residual component becomes a monotonic curve, the decomposition is stopped and the final residual component is recorded as the residual component r n (t);
[0030] C1(t)=h(t) (3-4)
[0031] r1(t)=x(t)-C1(t) (3-5)
[0032]
[0033] Step 3.5: Decomposed n IMF components and the remaining component r of the residue n (t) The original voltage and current waveform data can be obtained by direct accumulation;
[0034] Step 3.6: From the decomposition curve waveform, it can be seen that the initial components are mostly noise, C7 and C8 waveforms are the main components of the original sine waveform, and the final residual component R9 is the trend component, and the waveform is the current voltage and current waveform trend;
[0035] Step 3.7: When the slow melting of the fuse occurs, the main body of the voltage waveform remains basically unchanged, but the voltage waveform as a whole shows a slow downward trend. Therefore, the weight of the residual component R9 is appropriately increased, and the weight of the initial component is reduced. This can appropriately increase the waveform change trend, which is conducive to the LSTM network waveform analysis.
[0036] Embodiment 3, based on embodiment 1, step 4 sends the information after empirical mode decomposition and re-weighting to the LSTM network. The LSTM network is a network that can pass information from the previous step to the next step, and can effectively mark the characteristic information in the voltage and current signals. By continuously learning, extracting and strengthening the characteristics, it can effectively identify atypical faults such as PT slow melting and aging and poor contact of the secondary terminal block and issue an alarm, specifically:
[0037] Step 4.1: The specific structure of the LSTM unit is that a unidirectional LSTM unit consists of an input gate, an output gate, and a forget gate. It can be seen that at the current moment, a unit has a total of 3 inputs, which are the output h of a single unit at the previous moment t-1 , the current input x t , and the unit state C at the previous moment t-1 ;
[0038] Step 4.2: The function of the forget gate is to control whether the state of the hidden information at the previous moment is forgotten at the current moment, and to determine how much information of the previous unit can be retained and used as input at the current moment. Its mathematical expression is shown in 4-1, W f represents the weight matrix of the forget gate, b f represents the bias vector of the forget gate, f tIt represents the output value of the forget gate, Sigmoid represents the activation function of the forget gate structure, [h t-1 ,x t ] means to change the current x t and the output h at the previous moment t-1 Concatenate into a new vector;
[0039] Step 4.3: The input gate determines how much of the network's input information is stored in the current state at the current moment. Its mathematical expressions are shown in 4-2 and 4-3. i represents the weight matrix of the input gate, b i It represents the bias vector of the input gate, i t It represents the output value of the input gate, W c represents the weight matrix of the candidate memory state of the input gate, b c represents the bias vector of the candidate memory state of the input gate, It represents the output value of the candidate memory state of the input gate, and Sigmoid and Tanh represent the activation function of the input gate structure;
[0040] Step 4.4: The output mathematical expression of the candidate memory state of the input gate is shown in 4-4, C t It is the unit state at the current moment, mainly used for long-term memory;
[0041] Step 4.5: The output gate is responsible for processing the output of the data. This stage determines which data will be used as the output of the current state. Its mathematical expressions are shown in 4-5 and 4-6. o represents the weight matrix of the output gate, b o It represents the bias vector of the output gate, o t It represents the output value of the output gate, C t-1 is the unit state at the previous moment, Sigmoid and Tanh represent the activation function, h t It represents working memory or short-term memory;
[0042] f t =Sigmoid(W f [h t-1 ,x t ]+b f ) (4-1)
[0043] i t =Sigmoid(W i [h t-1 ,x t ]+b i ) (4-2)
[0044]
[0045] o t =Sigmoid(W o [h t-1, x t ]+b o ) (4-5)
[0046] h t =o t *Tanh(C t ) (4-6)
[0047] Step 4.6: Since the units at different times in the LSTM network are connected in a cumulative linear manner, but the information is filtered through the gate mechanism, the information of the previous moment can be selectively forgotten or retained, which can suppress the infinite accumulation of invalid information.
[0048] Embodiment 4, based on embodiment 3, the LSTM network is further optimized to maximize the detection rate of the LSTM network model. Specifically, the model is optimized by parameters such as model structure, batch size, learning rate, and time step number until the model with the best detection structure is selected. The detailed process is as follows:
[0049] 1. In the LSTM network model, the network model can be optimized by increasing the depth. Stacking LSTM hidden layers can make the network model deeper. However, the LSTM network mainly solves the gradient vanishing problem through propagation within the layer. From the effect of the model, two or three LSTM layers are sufficient to extract most features. When there are too many LSTM layers, information loss will occur during the information compression process, causing the gradient between layers to disappear, making it difficult for the model to converge. Therefore, setting a suitable LSTM layer will effectively improve the accuracy of network model detection;
[0050] 2. In the process of network model training, batch size is an important parameter. Setting an appropriate batch size can make full use of the parallel computing structure of the computer and improve the speed of network data processing. Different batch sizes will affect the detection results of the model during model training. A larger batch size will make the model converge faster, but the number of training times will be reduced, which will lead to slightly lower accuracy. A smaller batch size will make the model converge more slowly and may cause oscillation. Therefore, setting an appropriate batch size can effectively improve the model accuracy.
[0051] 3. The learning rate is an important parameter in the neural network. When the learning rate is too high, the network will oscillate near the optimal solution and may even fail to reach the local optimal solution. When the learning rate is too low, the network converges slowly and requires more time to train the neural network. Therefore, choosing a suitable learning rate will help the network reach the global optimal solution of the neural network better and faster.
[0052] 4. The time step is a unique parameter when constructing the LSTM network model. It indicates the total number of time inputs when constructing the network. If it is set to 1, it means that there is no propagation between time, and only propagation between layers, which affects the model detection results. If the time step is set to the same as the number of input sequence nodes, only one node is input at each time node, which will cause the time propagation process to be too long, resulting in too long model training and testing time and too much calculation. Therefore, choosing an appropriate time step will help improve the network model detection results.
[0053] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A waveform recognition method based on EMD and LSTM network, characterized in that: The following steps are involved: Step 1: Sample and record the collected positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform at the generator end through a fault recorder; Step 2: convert the sampled machine-end positive-sequence voltage, current waveform, zero-sequence voltage, and current waveform into a matrix mode; Step 3: Perform empirical mode decomposition (EMD) on the above voltage and current signals respectively; Step 4: Send the information after empirical mode decomposition and re-weighting into the LSTM network to effectively mark the characteristic information in the voltage and current signals. By continuously learning, extracting and strengthening the features, atypical faults such as PT slow melting and aging and poor contact of secondary terminal blocks can be effectively identified and alarms can be issued.
2. A waveform recognition method based on EMD and LSTM network as claimed in claim 1, characterized in that: The step 3 performs empirical mode decomposition (EMD) on the voltage and current signals respectively. The specific empirical mode decomposition features are as follows: Step 3.1: x(t) represents the original signal. First, find the local maximum and local minimum of the original sequence x(t), and use the spline interpolation method to fit the original data x up (t) and x low (t) represent the upper and lower envelopes respectively, and the average value m(t) of the upper and lower envelopes is calculated according to the formula Step 3.2: Let the curve h(t) obtained by subtracting m(t) from x(t) be the intermediate discriminant curve. h(t)=x(t)-m(t) (3-2) Step 3.3: If the intermediate discriminant curve satisfies the IMF component constraint condition, it is recorded as the first IMF component C1(t). Otherwise, the decomposition is continued until the IMF condition is satisfied. C1(t)=h(t) (3-3) Step 3.4: r1(t) is the remaining component of the first residue, where r1(t) = x(t) - C1(t). r1(t) is used as the new original waveform to participate in the next decomposition. The above steps are repeated until the nth IMF component C is obtained after the nth repetition. n (t), when the nth residual component becomes a monotonic curve, the decomposition is stopped and the final residual component is recorded as the residual component r n (t); C1(t)=h(t) (3-4) r1(t)=x(t)-C1(t) (3-5) Step 3.5: Decomposed n IMF components and the remaining component r of the residue n (t) The original voltage and current waveform data can be obtained by direct accumulation; Step 3.6: From the decomposition curve waveform, it can be seen that the initial components are mostly noise, C7 and C8 waveforms are the main components of the original sine waveform, and the final residual component R9 is the trend component, and the waveform is the current voltage and current waveform trend; Step 3.7: When the slow melting of the fuse occurs, the main body of the voltage waveform remains basically unchanged, but the voltage waveform as a whole shows a slow downward trend. Therefore, the weight of the residual component R9 is appropriately increased, and the weight of the initial component is reduced. This can appropriately increase the waveform change trend, which is conducive to the LSTM network waveform analysis.
3. A waveform recognition method based on EMD and LSTM network as claimed in claim 1, characterized in that: In step 4, the information after empirical mode decomposition and re-weighting is sent to the LSTM network. The LSTM network is a network that can pass information from the previous step to the next step, effectively mark the characteristic information in the voltage and current signals, and through continuous learning, extract and strengthen the characteristics, effectively identify non-typical faults such as PT slow melting and secondary terminal block aging and poor contact, and issue an alarm. Specifically: Step 4.1: The specific structure of the LSTM unit is that a unidirectional LSTM unit consists of an input gate, an output gate, and a forget gate. It can be seen that at the current moment, a unit has a total of 3 inputs, which are the output h of a single unit at the previous moment t-1 , the current input x t , and the unit state C at the previous moment t-1 ; Step 4.2: The function of the forget gate is to control whether the state of the hidden information at the previous moment is forgotten at the current moment, and to determine how much information of the previous unit can be retained and used as input at the current moment. Its mathematical expression is shown in 4-1, W f represents the weight matrix of the forget gate, b f represents the bias vector of the forget gate, f t It represents the output value of the forget gate, Sigmoid represents the activation function of the forget gate structure, [h t-1, x t ] means to change the current x t and the output h at the previous moment t-1 Concatenate into a new vector; Step 4.3: The input gate determines how much of the network's input information is stored in the current state at the current moment. Its mathematical expressions are shown in 4-2 and 4-3. i represents the weight matrix of the input gate, b i It represents the bias vector of the input gate, i t It represents the output value of the input gate, W c represents the weight matrix of the candidate memory state of the input gate, b c represents the bias vector of the candidate memory state of the input gate, It represents the output value of the candidate memory state of the input gate, and Sigmoid and Tanh represent the activation function of the input gate structure; Step 4.4: The output mathematical expression of the candidate memory state of the input gate is shown in 4-4, C t It is the unit state at the current moment, mainly used for long-term memory; Step 4.5: The output gate is responsible for processing the output of the data. This stage determines which data will be used as the output of the current state. Its mathematical expressions are shown in 4-5 and 4-6. o represents the weight matrix of the output gate, b o It represents the bias vector of the output gate, o t It represents the output value of the output gate, C t-1 is the unit state at the previous moment, Sigmoid and Tanh represent the activation function, h t It represents working memory or short-term memory; f t =Sigmoid(W f [h t-1 ,x t ]+b f ) (4-1) i t =Sigmoid(W i [h t-1 ,x t ]+b i ) (4-2) o t =Sigmoid(W o [h t-1, x t ]+b o ) (4-5) h t =o t *Fish(C) t ) (4-6) Step 4.6: Since the units at different times in the LSTM network are connected in a cumulative linear manner, but the information is filtered through the gate mechanism, the information of the previous moment can be selectively forgotten or retained, which can suppress the infinite accumulation of invalid information.
