Intelligent line residual voltage detection method and power distribution terminal
By denoising the voltage signal and feature extraction, combined with the random forest model, intelligent detection of line residual voltage is realized, solving the problem of poor accuracy and certainty of detection results in the prior art, and improving the reliability and adaptability of detection.
Patent Information
- Application Number
- CN202510178866.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-30
AI Technical Summary
The existing line residual voltage detection methods are difficult to fully extract the frequency characteristics and high and low frequency amplitude characteristics of voltage signals, resulting in poor accuracy and certainty of the detection results, and lack the ability to intelligent analysis and automatic classification, making it difficult to cope with complex and changeable power conditions.
The voltage signal is denoised by low-pass filter, the frequency characteristics and amplitude characteristics of the noise-reducing voltage signal are extracted, and the frequency characteristics and amplitude characteristics of the noise-reducing voltage signal are combined into a voltage signal characteristic vector, and the residual voltage intelligent detection model is constructed based on a random forest to realize the real-time residual voltage classification result output.
By comprehensively extracting the multi-dimensional characteristics of the voltage signal, the reliability and accuracy of the detection results are significantly improved, intelligent analysis and automatic classification of residual voltage detection are realized, and adaptability to complex and variable power conditions is enhanced.
Smart Images

Figure CN120064763A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical signals, and particularly to an intelligent detection method for line residual voltage and a distribution terminal. Background Art
[0002] With the rapid development of modern power systems, the operating environment and load conditions of power lines are becoming increasingly complex, and the importance of the safe and stable operation of power lines is becoming more prominent. Line residual voltage (i.e., the remaining voltage on the line) is a common electrical parameter in power systems, and its effective monitoring is of great significance for preventing accidents, ensuring equipment safety, and improving operation efficiency. Especially the measurement of residual voltage after lightning strikes, short - circuit faults, or system operations has direct guiding value for the safety assessment and restoration of subsequent operations.
[0003] Currently, the detection method for line residual voltage is mainly an analog signal detection method, which realizes the measurement of residual voltage by installing traditional electromagnetic or electrostatic voltage transformers. This method relies on the characteristics of electrical equipment to extract the residual voltage signal and displays the detection result through subsequent instruments, which improves the safety and reliability of residual voltage monitoring in the operation of power systems to a certain extent.
[0004] However, the existing detection methods usually can only simply provide the change information of voltage amplitude, lack the comprehensive extraction of the frequency characteristics and high - and low - frequency amplitude characteristics of voltage signals, and are difficult to meet the multi - dimensional characteristics requirements of complex voltage signals, resulting in poor accuracy and certainty of detection results. At the same time, the detection methods rely on simple instrument displays and manual readings, lack intelligent analysis and automatic classification capabilities, are not only inefficient, but also difficult to effectively cope with complex and changeable power working conditions. Summary of the Invention
[0005] In order to solve the technical problems that the existing detection methods usually can only simply provide the change information of voltage amplitude, lack the comprehensive extraction of the frequency characteristics and high - and low - frequency amplitude characteristics of voltage signals, are difficult to meet the multi - dimensional characteristics requirements of complex voltage signals, resulting in poor accuracy and certainty of detection results. At the same time, these detection methods rely on simple instrument displays and manual readings, lack intelligent analysis and automatic classification capabilities, are not only inefficient, but also difficult to effectively cope with complex and changeable power working conditions, the present invention provides an intelligent detection method for line residual voltage and a distribution terminal.
[0006] The technical solutions provided by the embodiments of the present invention are as follows:
[0007] First aspect:
[0008] An intelligent detection method for line residual voltage provided by an embodiment of the present invention includes:
[0009] S1: Collect the voltage signal of the line;
[0010] S2: Denoise the voltage signal using a band-pass filter to obtain a denoised voltage signal;
[0011] S3: Extract the frequency characteristics and amplitude characteristics of the denoised voltage signal; wherein, the amplitude characteristics include the amplitude characteristics of the low-frequency component and the amplitude characteristics of the high-frequency component;
[0012] S4: Combine the frequency characteristics, the amplitude characteristics of the low-frequency component, and the amplitude characteristics of the high-frequency component to obtain a voltage signal feature vector;
[0013] S5: Construct a residual voltage intelligent detection model based on a random forest;
[0014] S6: Input the voltage signal feature vector into the residual voltage intelligent detection model and output a residual voltage classification result.
[0015] Second aspect:
[0016] A power distribution terminal provided by an embodiment of the present invention includes:
[0017] A processor;
[0018] A memory, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the line residual voltage intelligent detection method described in the first aspect is implemented.
[0019] Third aspect:
[0020] A computer-readable storage medium provided by an embodiment of the present invention, on which a computer program is stored, and when the program is executed by a processor, the line residual voltage intelligent detection method described in the first aspect is implemented.
[0021] The beneficial effects brought by the technical solution provided by the embodiment of the present invention at least include:
[0022] (1) In the embodiment of the present invention, after denoising the voltage signal using a low-pass filter to obtain a denoised voltage signal, the frequency characteristics and amplitude characteristics of the denoised voltage signal are extracted, and the frequency characteristics and amplitude characteristics are combined to generate a voltage signal feature vector. By comprehensively extracting the frequency characteristics and the high and low frequency amplitude characteristics of the voltage signal and effectively integrating the multi-dimensional feature information, the description ability of complex signals is significantly enhanced, thereby improving the reliability of the detection results.
[0023] (2) In the embodiments of the present invention, by constructing a residual voltage intelligent detection model based on random forest and inputting the generated voltage signal feature vectors into the model, the residual voltage classification results are output in real time. The powerful modeling ability of random forest for complex non-linear relationships is fully utilized to accurately learn the mapping relationship between the voltage signal features and the residual voltage state, realizing the intelligent analysis and automatic classification of residual voltage detection. While improving the detection efficiency, the adaptability to complex and changeable power conditions is significantly enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0025] Figure 1 It is a schematic flowchart of a method for intelligent detection of line residual voltage provided by an embodiment of the present invention;
[0026] Figure 2 It is a schematic structural diagram of a distribution terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The following will describe the technical solutions in the present invention with reference to the drawings.
[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as an "example" in the present invention should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, the use of the word "example" is intended to present concepts in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one of the two.
[0029] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same. "(of)", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference is not emphasized, their intended meanings are the same.
[0030] In the embodiments of the present invention, sometimes subscripts such as W 1 may be written in a non-subscript form such as W1. When the difference is not emphasized, their intended meanings are the same.
[0031] To make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the accompanying drawings and specific embodiments.
[0032] Refer to the attached Figure 1 , which shows a schematic flow chart of an intelligent line residual voltage detection method provided by an embodiment of the present invention.
[0033] An embodiment of the present invention provides an intelligent line residual voltage detection method, which can be implemented by an intelligent line residual voltage detection device, and the intelligent line residual voltage detection device can be a terminal or a server. The processing flow of the intelligent line residual voltage detection method can include the following steps:
[0034] S1: Collect the voltage signal of the line.
[0035] S2: Use a band-pass filter to perform noise reduction processing on the voltage signal to obtain a noise-reduced voltage signal.
[0036] Among them, a band-pass filter (Band-pass Filter, BPF) is a signal processing tool that allows frequency components in a signal within a specified frequency range (band-pass range) to pass through, while suppressing or attenuating frequency components below or above this range.
[0037] Specifically, determine the low cut-off frequency and high cut-off frequency of the band-pass filter;
[0038] Design the transfer function of the filter:
[0039]
[0040] Among them, H(z) represents the transfer function, h[k] represents the impulse response coefficient of the filter, z represents the complex frequency variable in the digital domain, N represents the order of the filter, and k represents the offset of the time instant;
[0041] Apply the filter to the input signal for noise reduction processing:
[0042]
[0043] Among them, y[n] represents the output signal of the filter at time t, x[n] represents the input signal at time t, b k represents the feedforward coefficient of the filter, a k represents the feedback coefficient of the filter, M represents the order of the feedforward part, N represents the order of the feedback part, and t represents the time index;
[0044] Use the fast Fourier transform (FFT) to perform spectral analysis on the signals before and after filtering to ensure that the filtered signal is between the cut-off frequency and the high cut-off frequency.
[0045] S3: Extract the frequency features and amplitude features of the noise-reduced voltage signal; among them, the amplitude features include the amplitude features of the low-frequency component and the amplitude features of the high-frequency component.
[0046] Among them, the frequency feature is the manifestation form of the signal in the frequency domain, mainly describing information such as the amplitude, phase or energy of each frequency component in the signal.
[0047] Among them, the amplitude feature is a key parameter used to describe the signal intensity, amplitude size or energy distribution in the time domain or frequency domain of the signal, reflecting the overall or local intensity characteristics of the signal.
[0048] In a possible implementation manner, S3 specifically includes:
[0049] S301: Use discrete wavelet transform and multi-resolution signal decomposition to decompose the noise-reduced voltage signal into a low-frequency component and a high-frequency component.
[0050] Among them, the discrete wavelet transform (DWT) is a method for decomposing a signal into different frequency ranges (frequency bands). It uses a set of discrete wavelet basis functions to analyze the local characteristics of the signal and is an important tool in time-frequency analysis.
[0051] Among them, the multi-resolution signal decomposition (MRSD) is a signal analysis method that realizes hierarchical and multi-scale analysis of the signal by decomposing the signal into multiple resolution levels (that is, signal components in different frequency ranges).
[0052] In a possible implementation manner, S301 specifically includes:
[0053] S3011: Use the discrete wavelet function to perform discrete transformation on the noise-reduced voltage signal to generate the low-frequency component coefficient and the high-frequency component coefficients of multiple levels:
[0054]
[0055] Among them, DWT m,n (t) represents the discrete wavelet transform result of the nth translation at the mth level, ψ() represents the mother wavelet function, m represents the scaling factor for controlling the signal decomposition level, n represents the translation factor, t represents the time variable of the voltage signal, n2 m represents the translation amount of the wavelet, 2 m represents the scaling amount of the wavelet.
[0056] S3012: Based on the high-frequency component coefficients of multiple levels and the low-frequency component coefficient, decompose the noise-reduced voltage signal into a low-frequency component and multiple high-frequency components through multi-resolution signal decomposition:
[0057]
[0058] Among them, AJ (t) represents the low-frequency component, represents the scaling function for reconstructing the low-frequency component, A J,k represents the low-frequency component coefficient, k represents the discrete index, J represents the highest level, D j (t) represents the high-frequency component, ψ j,k (t) represents the wavelet function, D j,k represents the high-frequency component coefficient, j represents the wavelet level corresponding to the high-frequency component.
[0059] In a possible implementation, the calculation formula for multi-resolution signal decomposition is specifically as follows:
[0060]
[0061] where x(t) represents the voltage signal after noise reduction processing, A J,k represents the low-frequency component coefficient, represents the scaling function for reconstructing the low-frequency component, k represents the discrete index, ψ j,k (t) represents the wavelet function, D j,k represents the high-frequency component coefficient, j represents the wavelet level corresponding to the high-frequency component, J represents the highest level.
[0062] In the present invention, wavelet transform can perform analysis in both the time domain and the frequency domain, decompose the high-frequency and low-frequency components of the signal, and effectively separate the trend and details of the signal. At the same time, multi-resolution decomposition can extract different frequency components of the signal layer by layer, refine the signal features, and improve the accuracy of analysis.
[0063] S302: Use the fast Fourier transform to extract the frequency features of the high-frequency component.
[0064] Among them, the fast Fourier transform (FFT) is an algorithm for efficiently calculating the discrete Fourier transform (DFT) and its inverse transform (Inverse DFT). The Fourier transform is an important tool in signal processing for converting a signal from the time domain to the frequency domain, and the fast Fourier transform makes the calculation of the Fourier transform more efficient by reducing the computational complexity, and is one of the core algorithms in the modern signal processing field.
[0065] In a possible implementation, S302 specifically includes:
[0066] S3021: Determine the frequency range of each level of wavelet decomposition:
[0067]
[0068] where f mrepresents the frequency range of the m-th level, where m ∈ 1, 2, … j, and j represents the level of wavelet decomposition corresponding to the high-frequency component, and f s represents the sampling frequency.
[0069] S3022: Based on the frequency range, use the fast Fourier transform to analyze the spectra of the high-frequency components in each level to extract the dominant frequencies of each high-frequency component.
[0070] In the present invention, extracting the dominant frequencies of high-frequency components through the fast Fourier transform (FFT) helps to accurately analyze the distribution and intensity of different frequency components in the voltage signal, can effectively distinguish key frequency features such as harmonics and spikes in the signal, and provides more comprehensive frequency-domain information for residual voltage detection.
[0071] S303: Calculate the amplitude characteristics of the low-frequency component and the high-frequency component through the two-norm.
[0072] In a possible implementation, S303 specifically includes:
[0073] S3031: Calculate the two-norm of each level of high-frequency component as the amplitude characteristic of the high-frequency component:
[0074]
[0075] where norm D (j) represents the amplitude characteristic of the high-frequency component of the j-th level, j represents the wavelet level corresponding to the high-frequency component, i represents the index of the data point in the signal, and D i,j represents the coefficient of the i-th discrete data point in the high-frequency component of the j-th level, and N represents the total number of data points.
[0076] It should be noted that the two-norm of the high-frequency component captures the drastic changes in the local signal and helps to detect abnormal signals.
[0077] S3032: Calculate the two-norm of the low-frequency component as the amplitude characteristic of the low-frequency component:
[0078]
[0079] where norm A (J) represents the amplitude characteristic of the high-frequency component of the J-th level, and A i,J represents the coefficient of the i-th discrete data point in the low-frequency component of the J-th level, and J represents the highest level.
[0080] It should be noted that the two-norm of the low-frequency component reflects the overall energy or trend of the signal and can be used to describe the global characteristics of the signal.
[0081] In summary, by extracting frequency features and amplitude features through discrete wavelet transform, multi-resolution signal decomposition, and fast Fourier transform, not only can the time-frequency characteristics of the signal be comprehensively characterized, but also the accuracy and robustness of residual voltage detection can be effectively improved. At the same time, combining the multi-resolution analysis ability of wavelet transform and the efficient frequency extraction ability of FFT provides reliable technical support for feature extraction and subsequent classification detection of complex voltage signals.
[0082] S4: Combine the frequency features, the amplitude features of the low-frequency components, and the amplitude features of the high-frequency components to obtain the voltage signal feature vector.
[0083] It should be noted that the amplitude features of the low-frequency components reflect the global trend of the signal (such as DC offset or slow change), which is crucial for describing the long-term changes and overall energy distribution of the signal.
[0084] The amplitude features of the high-frequency components capture the local changes, spikes, or mutations of the signal, and can reflect the detailed features and abnormal behaviors in the voltage signal.
[0085] The main frequency of the high-frequency components accurately describes the main frequency distribution of the high-frequency part of the signal, revealing the oscillation characteristics or harmonic characteristics of the signal.
[0086] In a possible implementation, the voltage signal feature vector is specifically:
[0087] V = [f D1 , f D2 ,..., f Dj , norm D (1), norm D (2),..., norm D (j), norm A (J)]
[0088] where V represents the voltage signal feature vector, f Dm represents the main frequency of the high-frequency components at the m-th level, norm D (m) represents the amplitude features of the high-frequency components at the m-th level, m ∈ 1, 2,... j, j represents the wavelet level corresponding to the high-frequency components, and norm A (J) represents the amplitude features of the low-frequency components.
[0089] In the present invention, combining the frequency features (main frequency), the amplitude features of the low-frequency components, and the amplitude features of the high-frequency components into the feature vector V can comprehensively describe the characteristics of the voltage signal, improve the signal discrimination and robustness, and provide high-quality input for the intelligent detection model. At the same time, this feature representation is applicable to complex power operating conditions and can significantly improve the accuracy and efficiency of residual voltage detection.
[0090] S5: Construct an intelligent residual voltage detection model based on random forest.
[0091] Among them, the intelligent residual voltage detection model based on random forest is an intelligent model that uses machine learning technology to classify and detect the residual voltage state (such as normal residual voltage or abnormal residual voltage) of voltage signals. Random forest is an efficient ensemble learning method that constructs multiple decision trees and combines a voting mechanism for prediction, and can show excellent performance in complex signal classification problems.
[0092] In a possible implementation manner, S5 is specifically:
[0093] S501: Obtain denoised voltage signal sample data with frequency characteristics and amplitude characteristics.
[0094] S502: Construct a random forest composed of multiple decision trees, and the decision tree includes multiple nodes.
[0095] S503: Determine the evaluation metrics for constructing each decision tree in the random forest. The evaluation metrics include the Gini index and the information gain ratio:
[0096] Among them, the Gini index is a metric used to measure the purity of a data set, and is widely used in decision tree models and random forest models in classification problems to select the best splitting feature. The Gini index reflects the "disorder degree" of the data in a node, that is, the probability distribution of the data belonging to different classes. If all samples in a node belong to the same class, the Gini index is 0, indicating that the node is the purest; if the samples are evenly distributed among all classes, the Gini index reaches the maximum value, indicating that the node is the most chaotic.
[0097] Among them, the information gain ratio is a metric used to measure the quality of decision tree node splitting, and is used to improve the splitting criterion of information gain. It normalizes the information gain and reduces the bias problem caused by data imbalance or a large number of feature values. In decision tree algorithms (such as C4.5), the information gain ratio is widely used to select the optimal splitting feature.
[0098]
[0099] Among them, Gini() represents the Gini index, A i represents the current candidate feature, c represents the total number of classes, p(y i ) represents the probability that the data sample in the current node belongs to y i , m i represents the number of values of the candidate feature, p(v i,j ) represents the probability that the jth value in the current node is v i,j , p(y i |vi,j ) represents the probability that the sample belongs to class y under the condition that the candidate feature value in the current node is v i,j . i .
[0100]
[0101] Among them, GR() represents the information gain ratio, and log represents the logarithmic function
[0102] In the present invention, the Gini index can quickly evaluate the splitting purity of features, while the information gain ratio solves the problem that the information gain is biased towards multi-valued features through normalization processing. The combination of the two indicators can adapt to the situation of unbalanced sample distribution or uneven feature values, select the optimal splitting feature, and improve the splitting effect. At the same time, the information gain ratio can avoid the excessive influence of high-dimensional discrete features (features with many values) on the splitting, thus ensuring that the splitting decision is more reasonable
[0103] S504: Each node randomly selects multiple features from the feature set of the sample data as candidate features
[0104] S505: Use the randomly selected evaluation index to evaluate the candidate features of each node, and select the candidate feature with the lowest Gini index or the highest information gain ratio as the best feature corresponding to each node
[0105] S506: Split each node based on the best feature corresponding to each node as the splitting basis
[0106] S507: When the depth of the tree reaches the preset maximum depth, stop splitting and complete the construction of the residual voltage intelligent detection model
[0107] In the present invention, after the random forest model training is completed, the prediction process has a small computational amount, can quickly classify the feature vector of the voltage signal input in real time, and improves the detection efficiency. At the same time, the splitting nodes of each decision tree randomly select some features from the feature set for evaluation, reducing the over-reliance on some strongly correlated features and improving the generalization ability of the model
[0108] Optionally, the residual voltage detection model is optimized by the mean square error loss function
[0109] The mean square error loss function is specifically
[0110]
[0111] Among them, L() represents the loss function of the submarine pipeline fault detection model, l represents the total number of samples represents the output value of the i-th sample predicted by the model, y iDenote the output label corresponding to the i-th input sample.
[0112] Aiming at minimizing the mean square error loss function, the residual voltage intelligent detection model is optimized by the particle swarm optimization algorithm.
[0113] Specifically, S701: Take the reciprocal of the cross-entropy loss function as the fitness function of the particle swarm optimization algorithm.
[0114] S702: Set the parameters of the particle swarm optimization algorithm, where the parameters of the particle swarm optimization algorithm include population size, inertia weight, acceleration factor, mutation probability, neighborhood range, mutation factor, and maximum number of iterations.
[0115] S703: Initialize the positions and velocities of each particle in the population, where each particle represents a feasible parameter solution of the residual voltage intelligent detection model.
[0116] S704: Calculate the fitness of each particle in the neighborhood range of each particle, and select the particle with the highest fitness value as the local optimal position within the neighborhood range.
[0117] S705: Update the velocities and positions of each particle according to the local optimal position:
[0118] V i (t + 1) = w·V i (t) + c 1 ·r 1 ·(Pbest i (t) - X i (t)) + c 2 ·r 2 ·(Gbest(t) - X i (t))
[0119]
[0120] Among them, V i (t + 1) represents the velocity of the i-th particle at the (t + 1)-th iteration, w represents the inertia weight, c 1 , c 2 represents a constant, r 1 , r 2 represents a constant, Pbest i represents the position where the fitness value of the i-th particle is optimal, X i represents, Gbest represents, X i (t) represents the position of the i-th particle at the t-th iteration, w max represents the maximum value of the inertia weight, w min represents the minimum value of the inertia weight, t represents the t-th iteration, T maxIndicates the maximum number of iterations.
[0121] X i (t + 1)= X i (t)+ V i (t + 1)
[0122] Wherein, X i (t + 1) represents the position of the i-th particle at the (t + 1)-th iteration.
[0123] Optionally, after the position update, a boundary check is required to ensure that the velocity or position of the particle does not exceed the predefined search space.
[0124] S706: Generate a random number rand, rand ∈ (0, 1), and determine whether the random number rand is less than the preset mutation probability. If so, perform a first mutation operation on the current individual's optimal position, i.e., the local optimal position, to obtain the first trial position, and enter S707; otherwise, perform a second mutation operation on the current individual's optimal position to obtain the second trial position, and enter S708.
[0125] In a possible implementation manner, the formula of the first mutation operation is specifically:
[0126] T 1 = X i + F·(Pbest r - X i )
[0127] Wherein, T 1 represents the first trial position, X i represents the current position of the i-th particle, F represents the mutation factor, F ∈ (0, 1), and Pbest r represents the individual optimal position of the first particle randomly selected from the population.
[0128] In a possible implementation manner, the formula of the second mutation operation is specifically:
[0129] T 2 = Lbest i + F·(Pbest r - Pbest s )
[0130] Wherein, T 2 represents the second trial position, Lbest i represents the position with the highest fitness value among all particles in the neighborhood of the i-th particle, F represents the mutation factor, F ∈ (0, 1), Pbest r represents the individual optimal position of the first particle randomly selected from the population, Pbest sRepresents the individual optimal position of the second particle randomly selected from the population.
[0131] In the present invention, by introducing the first mutation and the second mutation operations when updating the particle positions, the diversity of the search space is increased, and the particle swarm can jump out of the local optimal solution, thereby enhancing the global optimization ability. At the same time, the mutation operations enable the particles to try more potential solutions, thereby increasing the probability of searching for the global optimal solution. The first mutation operation expands the search range by randomly selecting perturbations of the individual optimal positions; the second mutation operation combines the fitness-optimal position in the neighborhood to refine the search and improve the accuracy of the solution.
[0132] S707: Update the local optimal position of the particle and the global optimal position of the particle according to the first trial position, and enter S709.
[0133] In a possible implementation manner, S707 specifically includes:
[0134] S7071: Calculate the fitness value of the particle corresponding to the first trial position.
[0135] S7072: According to the fitness value of the particle corresponding to the first trial position, select the first target position for the next iteration through the following formula:
[0136]
[0137] where T 1 represents the first trial position, f(T 1 ) represents the fitness value of the first trial position, and f(X i (t)) represents the fitness value of the position of the i-th particle at the t-th iteration.
[0138] S7073: Update the individual optimal position based on the first target position through the following formula:
[0139]
[0140] where Pbest i represents the optimal position of the individual optimal position of the i-th particle in all iterations, f(X i (t + 1)) represents the fitness value of the position of the i-th particle at the (t + 1)-th iteration, and f(Pbest i ) represents the fitness value of the historical individual optimal position of the i-th particle.
[0141] S7074: Update the global optimal position based on the updated individual optimal position through the following formula:
[0142]
[0143] Among them, Gbest represents the global optimal position, and f(Gbest) represents the fitness value of the global optimal position.
[0144] S708: Update the local optimal position and the global optimal position of the particle according to the second trial position, and enter S709.
[0145] In a possible implementation manner, S708 specifically includes:
[0146] S7081: Calculate the fitness value of the particle corresponding to the second trial position.
[0147] S7082: According to the fitness value of the particle corresponding to the first trial position, select the second target position for the next iteration through the following formula:
[0148]
[0149] where T 2 represents the second trial position, f(T 2 ) represents the fitness value of the second trial position, and f(X i (t)) represents the fitness value of the position of the i-th particle at the t-th iteration.
[0150] S7083: Based on the second target position, update the individual optimal position through the following formula:
[0151]
[0152] where Pbest i represents the optimal position of the individual optimal position of the i-th particle in all iterations, f(X i (t + 1)) represents the fitness value of the position of the i-th particle at the (t + 1)-th iteration, and f(Pbest i ) represents the fitness value of the historical individual optimal position of the i-th particle.
[0153] S7084: Based on the updated individual optimal position, update the global optimal position through the following formula:
[0154]
[0155] where Gbest represents the global optimal position, and f(Gbest) represents the fitness value of the global optimal position.
[0156] S709: Increment the iteration count by 1, determine whether the iteration count has reached the maximum iteration count. If so, end the training and output the residual voltage intelligent detection model parameters corresponding to the particle at the global optimal position; otherwise, return to S704.
[0157] In the present invention, the particle swarm optimization algorithm is a swarm intelligence optimization method that performs global search by simulating the foraging behavior of bird flocks. After introducing the mutation operation, the particle swarm can jump out of the local optimal solution, explore a wider search space, and improve the global optimization ability. Through global optimization, more suitable parameter configurations of the graph neural network can be found, enhancing the performance of the model.
[0158] Furthermore, by introducing the mutation operation, the particle swarm optimization achieves a balance between global search and local search. Global search ensures extensive exploration, while local optimization refines the search area and improves the quality of the solution.
[0159] S6: Input the voltage signal feature vector into the residual voltage intelligent detection model and output the residual voltage classification result.
[0160] In a possible implementation manner, S6 specifically includes:
[0161] S601: Input the voltage signal feature vector into the residual voltage intelligent detection model and output the predicted categories of each decision tree.
[0162] S602: Calculate the average classification margin value of each decision tree, and determine whether the average classification margin value of each tree is less than 0. If so, eliminate the corresponding decision tree. Otherwise, retain the corresponding decision tree, and use the average classification margin value corresponding to each decision tree as the weight of the decision tree, and proceed to the next step:
[0163] mr(x,y) = P(h(x)=y) - max j≠y P(h(x)=y j )
[0164] where mr(x,y) represents the classification margin, x represents the sample to be classified, y represents the true category of the sample to be classified, P(h(x)=y) represents the probability that the model predicts that the input sample belongs to the true category, max represents the maximum value, and max j≠y P(h(x)=y j represents the highest voting probability in the random forest that supports the sample to be classified belonging to the jth category.
[0165] In the present invention, the larger the classification margin, the stronger the confidence of the decision tree in the current classification result, the more reliable the classification result, and higher weights are assigned to the decision trees with high classification margins, making their contributions to the final classification result greater, thereby enhancing the classification accuracy.
[0166] It should be noted that if mr(x,y)>0, the model is more inclined to correct classification. If mr(x,y)<0, the model is more inclined to incorrect classification, and the larger the value of mr(x,y), the more stable the model's decision on classification.
[0167] S603: Determine the residual voltage classification result by combining the predicted categories of each retained decision tree and the corresponding weights.
[0168] In the present invention, by introducing a weight mechanism, the voting results of high-quality decision trees are given greater weights, which can improve the stability of the classification result and reduce the fluctuation of the classification result. At the same time, among the retained decision trees, the decision trees with a large classification margin represent higher certainty in their decisions, and the weighting mechanism can ensure that these decision trees play a more important role in the final classification result, thereby enhancing the stability.
[0169] Furthermore, through the dynamic screening mechanism combining the classification margin and the weight mechanism, the model is made more adaptable. Especially in the case of large fluctuations in power operating condition signals, it can effectively reduce misdetection and missed detection.
[0170] In a possible implementation manner, after S6, it further includes: performing a corresponding early warning processing scheme according to the residual voltage classification result.
[0171] The residual voltage classification result specifically includes:
[0172] Normal residual voltage and abnormal residual voltage.
[0173] The early warning processing scheme specifically includes:
[0174] When the residual voltage in the line is normal residual voltage, continuously monitor.
[0175] When the residual voltage in the line is abnormal residual voltage, send an abnormal residual voltage alarm to the maintenance personnel.
[0176] In the present invention, by performing a corresponding early warning processing scheme according to the residual voltage classification result, it can more efficiently identify and handle the residual voltage problem. It not only improves the classification accuracy and response speed, but also significantly enhances the safety, stability and reliability of the system. At the same time, this mechanism reduces the manual intervention cost and management burden, providing comprehensive support for the intelligent operation of the power system.
[0177] The beneficial effects brought by the technical solution provided by the embodiments of the present invention at least include:
[0178] (1) In the embodiments of the present invention, a low-pass filter is used to perform noise reduction processing on the voltage signal. After obtaining the noise-reduced voltage signal, the frequency characteristics and amplitude characteristics of the noise-reduced voltage signal are extracted, and the frequency characteristics and amplitude characteristics are combined to generate a voltage signal feature vector. By comprehensively extracting the frequency characteristics and high and low frequency amplitude characteristics of the voltage signal and effectively integrating the multi-dimensional feature information, the description ability of complex signals is significantly enhanced, thereby improving the reliability of the detection result.
[0179] (2) In the embodiments of the present invention, by constructing a residual voltage intelligent detection model based on random forest and inputting the generated voltage signal feature vector into the model, the residual voltage classification result is output in real time. Making full use of the powerful modeling ability of random forest for complex non-linear relationships, accurately learning the mapping relationship between voltage signal features and residual voltage states, realizing the intelligent analysis and automatic classification of residual voltage detection, while improving the detection efficiency, significantly enhancing the adaptability to complex and changeable power working conditions.
[0180] Refer to the attached Figure 2 figures, which show a schematic structural diagram of a distribution terminal provided by the present invention.
[0181] The present invention also provides a distribution terminal 20, which is applied to the above-mentioned line residual voltage intelligent detection method, including:
[0182] A processor 201.
[0183] A memory 202, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor 201, the line residual voltage intelligent detection method as in the method embodiments is realized.
[0184] The line residual voltage intelligent detection distribution terminal 20 provided by the present invention can execute the above-mentioned line residual voltage intelligent detection method and achieve the same or similar technical effects. To avoid repetition, the present invention will not elaborate further.
[0185] The beneficial effects brought by the technical solutions provided in the embodiments of the present invention at least include:
[0186] (1) In the embodiments of the present invention, after using a low-pass filter to perform noise reduction processing on the voltage signal to obtain a noise-reduced voltage signal, the frequency characteristics and amplitude characteristics of the noise-reduced voltage signal are extracted, and the frequency characteristics and amplitude characteristics are combined to generate a voltage signal feature vector. By comprehensively extracting the frequency characteristics and high and low frequency amplitude characteristics of the voltage signal and effectively integrating multi-dimensional feature information, the description ability of complex signals is significantly enhanced, thereby improving the reliability of the detection results.
[0187] (2) In the embodiments of the present invention, by constructing a residual voltage intelligent detection model based on random forest and inputting the generated voltage signal feature vector into the model, the residual voltage classification result is output in real time. Making full use of the powerful modeling ability of random forest for complex non-linear relationships, accurately learning the mapping relationship between voltage signal features and residual voltage states, realizing the intelligent analysis and automatic classification of residual voltage detection, while improving the detection efficiency, significantly enhancing the adaptability to complex and changeable power working conditions.
[0188] It should be understood that the processor in the embodiments of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0189] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0190] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains one or more collections of available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, or magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0191] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Here, A and B can be singular or plural. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, but it may also represent an "and / or" relationship, which can be specifically understood by referring to the context before and after.
[0192] In the present invention, "at least one" means one or more, and "a plurality" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or plural.
[0193] It should be understood that in various embodiments of the present invention, the magnitude of the sequence numbers of the above processes does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0194] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0195] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the devices, apparatuses, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0196] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0197] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] In addition, the functional units in each embodiment of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0199] When the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0200] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the line residual voltage intelligent detection method as described in the method embodiment.
[0201] The computer-readable storage medium provided by the present invention can implement the steps and effects of the line residual voltage intelligent detection method in the above method embodiment. To avoid repetition, the present invention will not elaborate further.
[0202] The beneficial effects brought by the technical solution provided by the embodiment of the present invention at least include:
[0203] (1) In the embodiment of the present invention, a low-pass filter is used to perform noise reduction processing on the voltage signal. After obtaining the noise-reduced voltage signal, the frequency characteristics and amplitude characteristics of the noise-reduced voltage signal are extracted, and the frequency characteristics and amplitude characteristics are combined to generate a voltage signal feature vector. By comprehensively extracting the frequency characteristics and high and low frequency amplitude characteristics of the voltage signal and effectively integrating the multi-dimensional feature information, the description ability of complex signals is significantly enhanced, thereby improving the reliability of the detection results.
[0204] (2) In the embodiment of the present invention, a residual voltage intelligent detection model based on random forest is constructed, and the generated voltage signal feature vector is input into the model to output the residual voltage classification result in real time. By making full use of the powerful modeling ability of random forest for complex non-linear relationships, accurately learning the mapping relationship between the voltage signal characteristics and the residual voltage state, the intelligent analysis and automatic classification of residual voltage detection are realized. While improving the detection efficiency, the adaptability to complex and changeable power working conditions is significantly enhanced.
[0205] As described above, this is only the specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
[0206] The following points need to be explained:
[0207] (1) The accompanying drawings of the embodiments of the present invention only relate to the structures involved in the embodiments of the present invention, and other structures can refer to the general design.
[0208] (2) For clarity, in the accompanying drawings used to describe the embodiments of the present invention, the thickness of layers or regions is enlarged or reduced, that is, these drawings are not drawn to actual scale. It can be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" or "under" another element, the element can be "directly" on or under the other element or there can be intermediate elements.
[0209] (3) Without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to obtain new embodiments.
[0210] As above, this is only the specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A line residual voltage intelligent detection method, characterized in that: include: S1: collects the voltage signal of the circuit; S2: Using a bandpass filter to perform noise reduction processing on the voltage signal to obtain a noise-reduced voltage signal; S3: extracting the frequency characteristics and amplitude characteristics of the noise reduction voltage signal; wherein the amplitude characteristics include the amplitude characteristics of the low-frequency component and the amplitude characteristics of the high-frequency component; S4: combining the frequency feature, the low-frequency component amplitude feature, and the high-frequency component amplitude feature to obtain a voltage signal feature vector; S5: Build a residual pressure intelligent detection model based on random forest; S6: Input the voltage signal feature vector into the residual voltage intelligent detection model, and output the residual voltage classification result.
2. The line residual voltage intelligent detection method according to claim 1, characterized in that: The S3 specifically includes: S301: Decomposing the noise reduction voltage signal into a low-frequency component and a high-frequency component by using discrete wavelet transform and multi-resolution signal decomposition; S302: extracting the frequency characteristics of the high-frequency component using fast Fourier transform; S303: Calculate the amplitude characteristics of the low-frequency component and the high-frequency component through the second norm.
3. The line residual voltage intelligent detection method according to claim 2, characterized in that: The S301 specifically includes: S3011: using a discrete wavelet function to perform discrete transformation on the noise reduction voltage signal to generate low-frequency component coefficients and high-frequency component coefficients of multiple levels; S3012: Based on the high-frequency component coefficients and the low-frequency component coefficients at multiple levels, decompose the noise reduction voltage signal into a low-frequency component and multiple high-frequency components through multi-resolution signal decomposition.
4. The line residual voltage intelligent detection method according to claim 3 is characterized in that: The calculation formula of the multi-resolution signal decomposition is specifically: Among them, x(t) represents the voltage signal after noise reduction processing, A J,k represents the low-frequency component coefficient, represents the scale function for reconstructing the low-frequency component, k represents the discrete index, ψ j,k (t) represents the wavelet function, D j,k represents the high-frequency component coefficient, j represents the wavelet level corresponding to the high-frequency component, and J represents the highest level.
5. The line residual voltage intelligent detection method according to claim 2, characterized in that: The S302 specifically includes: S3021: Determine the frequency range of each level of wavelet decomposition; S3022: Based on the frequency range, use fast Fourier transform to analyze the frequency spectrum of the high-frequency components at each level to extract the main frequency of each high-frequency component.
6. The line residual voltage intelligent detection method according to claim 2, characterized in that: The S303 specifically includes: S3031: Calculate the second norm of each level of high-frequency component as the high-frequency component amplitude feature: Among them, norm D (j) represents the amplitude characteristics of the high-frequency component of the jth level, j represents the wavelet level corresponding to the high-frequency component, i represents the index of the data point in the signal, D i,j represents the coefficient of the i-th discrete data point in the j-th level high-frequency component, and N represents the total number of data points; S3032: Calculate the second norm of the low-frequency component as the amplitude feature of the low-frequency component: Among them, norm A (J) represents the amplitude characteristics of the high-frequency component of the Jth level, A i,J Represents the coefficient of the i-th discrete data point in the low-frequency component of the J-th level, where J represents the highest level.
7. The line residual voltage intelligent detection method according to claim 1, characterized in that: The voltage signal characteristic vector is specifically: V=[f D1 ,f D2 ,...,f Dj ,norm D (1),norm D (2),...,norm D (j),norm A (J)] Where V represents the voltage signal characteristic vector, f Dm Indicates the main frequency of the high-frequency component of the mth level, norm D (m) represents the amplitude characteristics of the high-frequency component of the mth level, m∈1,2,…j, j represents the wavelet level corresponding to the high-frequency component, norm A (J) represents the amplitude characteristics of the low-frequency component.
8. The line residual voltage intelligent detection method according to claim 1, characterized in that: The S5 is specifically: S501: Acquire noise reduction voltage signal sample data with frequency characteristics and amplitude characteristics; S502: construct a random forest consisting of multiple decision trees, where the decision tree includes multiple nodes; S503: Determine the evaluation index for constructing each decision tree in the random forest, wherein the evaluation index includes the Gini index and the information gain ratio: Among them, Gini() represents the Gini index, A i represents the current candidate feature, c represents the total number of categories, p(y i ) indicates that the data sample in the current node belongs to y i The probability of m i represents the number of candidate feature values, p(v i,j ) The jth value in the current node is v i,j The probability, p(y i |v i,j ) indicates that the candidate feature value in the current node is v i,j Under the condition that the sample belongs to category y i The probability of Among them, GR() represents information gain ratio, log represents logarithmic function; S504: Each node randomly selects a plurality of features from the feature set of the sample data as candidate features; S505: Evaluate the candidate features of each node using a randomly selected evaluation index, and select the candidate feature with the lowest Gini index or the highest information gain ratio as the best feature corresponding to each node; S506: Splitting each node using the best feature corresponding to each node as a splitting basis; S507: When the depth of the tree reaches a preset maximum depth, the splitting is stopped, and the construction of the residual pressure intelligent detection model is completed.
9. The line residual voltage intelligent detection method according to claim 1, characterized in that: The S6 specifically includes: S601: Inputting the voltage signal feature vector into the residual voltage intelligent detection model, and outputting the prediction category of each decision tree; S602: Calculate the average classification margin value of each decision tree, and determine whether the average classification margin value of each tree is less than 0. If so, remove the corresponding decision tree; otherwise, retain the corresponding decision tree, and use the average classification margin value corresponding to each decision tree as the weight of the decision tree to which it belongs, and proceed to the next step: mr(x,y)=P(h(x)=y)-max j≠y P(h(x)=y j ) Among them, mr(x,y) represents the classification margin, x represents the sample to be classified, y represents the true category of the sample to be classified, P(h(x)=y) represents the probability that the model predicts that the input sample belongs to the true category, max represents the maximum value, max j≠y P(h(x)=y j Indicates the highest voting probability in the random forest that supports the sample to be classified belonging to the jth category; S603: Determine the residual pressure classification result by combining the prediction categories and corresponding weights of the retained decision trees.
10. A power distribution terminal, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the line residual voltage intelligent detection method according to any one of claims 1 to 9 is implemented.