Disclosure of Invention
The invention aims to provide a method, equipment, a storage medium and a product for positioning the leakage fault of a branch line before a meter, which are used for solving the problems of poor instantaneity and accuracy and low efficiency of the traditional leakage positioning method.
The invention solves the technical problems by adopting the following technical scheme that the method for positioning the leakage fault of the branch line before the meter comprises the following steps:
acquiring total voltage, user ammeter active power and user ammeter reactive power of a station area in a measurement period;
solving a user virtual impedance based on the total voltage, the user ammeter active power and the user ammeter reactive power;
Extracting global associated features and adjacent associated features from the user virtual impedance;
calculating symmetrical relative entropy of the global associated feature and the adjacent associated feature according to the extracted global associated feature and the adjacent associated feature;
Calculating the comprehensive anomaly score of the user virtual impedance according to the user virtual impedance and the symmetrical relative entropy;
And positioning the electric leakage fault according to the comprehensive abnormal score of the virtual impedance of the user.
Further, solving the user virtual impedance based on the total voltage, the user meter active power, and the user meter reactive power, comprising:
based on the user ammeter voltage, the user ammeter active power and the user ammeter reactive power, a total surface voltage estimation function is constructed, and the specific expression is as follows:
;
Wherein,Represents the total voltage estimated value corresponding to the nth user at the nth time,Indicating the active power of the nth user meter at the t-th moment,Indicating the nth consumer meter reactive power at time t,Representing the nth user virtual resistance at time t,Representing the nth user virtual reactance at time t,Representing the nth user ammeter voltage at the nth time;
Solving the virtual impedance of the user according to the total surface voltage estimation function and the total surface voltage, wherein the solving function is as follows:
;
;
wherein T represents the number of sampling moments in the measurement period, N represents the number of user meters in the station area,Indicating the total voltage at time t,Representing the nth user virtual impedance at time t.
Further, global association features and adjacent association features of the user virtual impedance are extracted by utilizing a pre-trained neural network model;
The neural network model comprises a feature extraction module, and the feature extraction module is used for extracting global associated features and adjacent associated features of the virtual impedance of the user, and the specific process comprises the following steps:
according to the user virtual impedance, calculating a query vector, a key vector, a value vector and Gaussian kernel scale parameters, wherein a specific calculation formula is as follows:
,,,;
Wherein,、、AndRespectively representing a query vector, a key vector, a value vector and Gaussian kernel scale parameters of a first layer in the feature extraction module; representing the input quantity of the first layer in the feature extraction module, when l=1,;、、AndRespectively representing weight parameter matrixes of a first layer in the feature extraction module;
From the query vectorKey vectorSum vectorThe global associated feature is calculated according to the following specific calculation formula:
;
Wherein,Representing the global associated features of the first layer in the feature extraction module,Representing the normalization function, the superscript T representing the matrix transpose,The input quantity dimension of the first layer in the table feature extraction module;
According to the Gaussian kernel scale parameterThe specific calculation formula of the adjacent correlation feature is as follows:
;
Wherein,Representing the adjacent associated features of the first layer in the feature extraction module,Representing a normalization function, T representing the number of sampling instants in the measurement period,、Each of which indicates a time point number in the measurement period.
Further, the neural network model further comprises a first calculation module, the first calculation module is utilized to calculate the symmetrical relative entropy of the global association feature and the adjacent association feature according to the extracted global association feature and the adjacent association feature, and a specific calculation formula is as follows:
;
Wherein,Representing the symmetrical relative entropy of the global associated feature and the adjacent associated feature, L representing the number of layers of the feature extraction module,Representing the relative entropy.
Further, calculating the comprehensive anomaly score of the user virtual impedance according to the user virtual impedance and the symmetrical relative entropy, wherein the method specifically comprises the following steps:
calculating a reconstruction error according to the user virtual impedance and the symmetrical relative entropy, wherein a specific calculation formula is as follows:
;
Wherein,Representing a reconstruction error; representing the nth user virtual impedance at the nth time; Representing the nth user virtual impedance at t timesIs a predicted value of (2); Representing a loss factor; Representing the F norm; Representing a 1-norm;
Calculating the abnormal score of the virtual impedance of the user according to the symmetrical relative entropy and the reconstruction error, wherein the specific calculation formula is as follows:
;
Wherein,Representing the anomaly score for the nth user virtual impedance at time t,Representing the element-by-element product,Representing a normalization function;
and summing the abnormal scores of the user virtual impedance at all the moments to obtain the comprehensive abnormal score of the user virtual impedance.
Further, the electric leakage fault positioning is performed according to the comprehensive abnormal fraction of the virtual impedance of the user, and specifically includes:
and determining the position of the electric leakage fault according to the abnormal quantity of single electric leakage fault positioning and the comprehensive abnormal score of the virtual impedance of all users.
Further, the method further comprises:
After eliminating the leakage fault according to the leakage fault positioning result, obtaining the residual current of the transformer area, judging whether the leakage fault exists or not according to the residual current of the transformer area, and if so, repeating the leakage fault positioning step.
Based on the same conception, the invention also provides an electronic device comprising a memory, a processor and a computer program/instruction stored on the memory, wherein the processor executes the computer program/instruction to realize the method for positioning the leakage fault of the branch line before the meter.
Based on the same conception, the present invention also provides a computer-readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, implements the pre-table branch line leakage fault localization method as described above.
Based on the same conception, the present invention also provides a computer program product comprising a computer program/instruction which, when executed by a processor, implements the method for positioning a pre-table branch line leakage fault as described above.
Compared with the prior art, the invention has the advantages that:
the electric leakage fault positioning method does not need manual participation, can position the electric leakage fault of the user branch line in real time only through the total voltage, the user ammeter active power and the user ammeter reactive power, improves the electric leakage fault positioning efficiency, effectively improves the operation and maintenance working efficiency of the low-voltage distribution network, fuses user virtual impedance modeling and global-adjacent double-dimensional correlation characteristic analysis, accurately captures the user virtual impedance mutation characteristic caused by electric leakage, and remarkably improves the electric leakage detection precision.
Detailed Description
The following description of the embodiments of the present invention will be made more apparent and fully by reference to the accompanying drawings, in which it is shown, however, only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The technical scheme of the application is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Example 1
In order to solve the problems that the real-time performance and the accuracy are poor and the intermittent electric leakage detection capacity is poor due to the fact that the traditional electric leakage fault positioning mainly depends on manual experience and traditional instrument measurement, the invention provides a method for positioning electric leakage faults of branch lines before a user meter of a transformer area, which is applied to electric leakage identification and positioning of the branch lines before the user meter of a low-voltage transformer area. As shown in fig. 1, the leakage fault positioning method includes the following steps:
And 1, when the electric leakage fault positioning is needed, acquiring the total voltage of the station area, the voltage of the user ammeter, the active power of the user ammeter and the reactive power of the user ammeter in the measurement period.
And monitoring the residual current of the transformer area in real time, and when the residual current of the transformer area is larger than a current threshold value, indicating that the transformer area has the leakage phenomenon, and positioning the leakage fault. The current threshold is a trip threshold of the earth leakage protection element, and the current threshold in this embodiment is 300mA.
In the measurement period, according to the sampling interval, the user information acquisition system is utilized to acquire the total voltage of the transformer area, the user ammeter voltage, the user ammeter active power and the user ammeter reactive power, so that the total voltage of each sampling moment T in the measurement period T can be obtainedVoltage of each user meter n at each sampling time t(I.e., the utility meter voltage), the active power of each utility meter n at each sampling instant tAnd reactive power(I.e., utility meter active power and utility meter reactive power).
Step 2 based on the total surface voltageVoltage of user's ammeterActive power of user ammeterAnd reactive power of user ammeterSolving for user virtual impedance。
A shortest power supply path exists between each user ammeter and the transformer, loop impedance on the shortest power supply path is defined as user virtual impedance, and the specific expression is:
(1)
Wherein,Representing the nth user virtual impedance at the nth time; Representing the nth user virtual resistance at the nth time; the nth user virtual reactance at the nth time is represented, and j represents an imaginary unit. Voltage drop over shortest supply pathCan be composed of longitudinal componentsAdding transverse componentsIs expressed in terms of:
(2)
(3)
(4)
Wherein,Representing the nth user voltage drop at the nth time; Representing the longitudinal component of the nth user voltage drop at time t; representing the lateral component of the nth user voltage drop at time t.
According to the formulas (1) to (4), a total voltage estimation function can be constructed, wherein the user virtual impedance is taken as an independent variable, and the user electricity meter voltage, the user electricity meter active power and the user electricity meter reactive power are taken as dependent variables:
(5)
Wherein,Indicating the estimated value of the total voltage corresponding to the nth user at the nth time.
Converting the solving user virtual impedance problem into an objective function optimization problem with the minimum difference value between the total surface voltage of the solving platform area and the total surface voltage estimated value, wherein the specific expression is as follows:
(6)
wherein T represents the number of sampling moments in the measurement period, N represents the number of user meters in the station area,Representing an objective function. Carrying out optimization solution on the formula (6) to obtain、Then according to the formula (1), the virtual impedance of the user can be solved. The virtual impedance of each user at each sampling instant in the measurement period can thus be derived:
(7)
flattening equation (7) into a one-dimensional form to facilitate subsequent feature extraction operations.
And 3, extracting global associated features and adjacent associated features of the virtual impedance of the user.
In a specific embodiment of the present invention, feature extraction, symmetric relative entropy calculation and anomaly score calculation are performed by using a pre-trained neural network model, the neural network model of this embodiment adds a feature extraction module, a first calculation module and a second calculation module based on an original transducer model, uses a newly added feature extraction module to perform global correlation feature and adjacent correlation feature extraction on user virtual impedance, uses the newly added first calculation module to calculate symmetric relative entropy of the global correlation feature and the adjacent correlation feature according to the extracted global correlation feature and the adjacent correlation feature, uses the newly added second calculation module to calculate comprehensive anomaly score of the user virtual impedance according to the user virtual impedance and the symmetric relative entropy, and uses the original transducer model to perform user virtual impedance prediction to obtain a user virtual impedance prediction value。
In a specific embodiment of the present invention, the extracting of the global associated feature and the adjacent associated feature of the virtual impedance of the user by using the newly added feature extracting module specifically includes:
step 3.1, according to the virtual impedance of the user, calculating a query vector, a key vector, a value vector and Gaussian kernel scale parameters, wherein the specific calculation formula is as follows:
(8)
(9)
(10)
(11)
Wherein,、、AndRespectively representing a query vector, a key vector, a value vector and Gaussian kernel scale parameters of a first layer in the feature extraction module; representing the input quantity of the first layer in the feature extraction module, when l=1,;、、AndAnd respectively representing the weight parameter matrix of the first layer in the feature extraction module.
Step 3.2, according to the query vectorKey vectorSum vectorThe global associated feature is calculated according to the following specific calculation formula:
(12)
Wherein,Representing the global associated features of the first layer in the feature extraction module,Representing the normalization function, the superscript T representing the matrix transpose,Representing the input dimension of the first layer in the feature extraction module. The global correlation feature adopts a multi-head attention mechanism in the original transducer model for quantifying inherent electrical interconnection attributes among different users.
Step 3.3, according to the Gaussian kernel scale parameterThe specific calculation formula of the adjacent correlation feature is as follows:
(13)
Wherein,Representing the adjacent associated features of the first layer in the feature extraction module,Representing a normalization function, T representing the number of sampling instants in the measurement period,Each of which indicates a time point number in the measurement period. The proximity correlation feature employs an adaptive gaussian kernel to capture the proximity leakage users that are most affected by the leakage points.
Fig. 2 and 3 show the adjacent and global correlation characteristic distributions of the normal user virtual impedance, respectively, and fig. 4 and 5 show the adjacent and global correlation characteristic distributions of the leakage user virtual impedance, respectively, wherein numerals represent correlation characteristic values, and closer to 1 represents greater correlation.
The pre-training process of the neural network model is similar to the electric leakage fault positioning process, and the weight parameter matrix of the feature extraction module is determined through pre-training、、AndAnd parameters in the original transducer model. In order to obtain training samples, a real power distribution network laboratory is utilized for simulation, the simulation platform area is divided into 117 simulation users (namely N=117), the measurement period is 1 month, the sampling interval is 15 min/time (T=2880), the total surface voltage, the simulation user ammeter active power and the simulation user ammeter reactive power are obtained, the simulation platform area is classified according to the scenes of table 1, each scene is divided into a training set and a testing set according to the proportion of 7:3, and the number of the samples is 24750.
All leakage scenarios contained in the Table 1 sample
The pre-training of the neural network model comprises the training of the original transducer model and the training of the feature extraction module, and the training of the original transducer model is firstly carried out, and then the training of the feature extraction module is carried out. The training process of the original transducer model is as follows:
calculating a virtual impedance of the analog subscriber (e.g., equation (5) and equation (6)) based on the total voltage, the analog subscriber meter active power, and the analog subscriber meter reactive power;
and training and testing the original transducer model by taking the total voltage, the analog user ammeter active power and the analog user ammeter reactive power as input quantities and taking the calculated analog user virtual impedance as a real label.
And predicting the virtual impedance of the user by using the original transducer model after training and testing to obtain a predicted value of the virtual impedance of the user. After the training and testing of the original transducer model are completed, training the feature extraction module, wherein the specific training process of the feature extraction module is as follows:
The method comprises the steps of carrying out global correlation feature extraction and adjacent correlation feature extraction on calculated virtual impedance of a simulation user, calculating symmetrical relative entropy of the global correlation feature and the adjacent correlation feature according to the extracted global correlation feature and the adjacent correlation feature, calculating comprehensive anomaly score of the virtual impedance of the simulation user according to the virtual impedance of the simulation user and the symmetrical relative entropy, determining a predicted leakage simulation user according to the comprehensive anomaly score of the virtual impedance of the simulation user, and reversely adjusting parameters in a feature extraction module according to the predicted leakage simulation user and a real leakage simulation user to realize pre-training of the feature extraction module. If the number of the predicted leakage simulation users is equal to the abnormal number of single leakage fault positioning, and the predicted leakage simulation users are the same as the actual leakage simulation users, the prediction is correct, otherwise, the parameters in the feature extraction module are adjusted. Table 2 shows the parameter settings at model training.
Table 2 model training parameter settings
After training, the neural network model was evaluated by using the test set, and the evaluation index results are shown in table 3.
TABLE 3 evaluation index results of neural network model
And 4, calculating symmetrical relative entropy of the global associated feature and the adjacent associated feature according to the extracted global associated feature and the adjacent associated feature.
The symmetrical relative entropy is used for quantifying the characteristic difference between a normal user and a leakage user, and the symmetrical relative entropy of the global correlation characteristic and the adjacent correlation characteristic is calculated by utilizing a first calculation module according to the extracted global correlation characteristic and the adjacent correlation characteristic, wherein a specific calculation formula is as follows:
(14)
Wherein,Representing the symmetrical relative entropy of the global associated feature and the adjacent associated feature, L representing the number of layers of the feature extraction module,Representing the relative entropy.
And 5, calculating the comprehensive anomaly score of the user virtual impedance according to the user virtual impedance and the symmetrical relative entropy.
In a specific embodiment of the present invention, the calculating, by using the second calculating module, the comprehensive anomaly score of the virtual impedance of the user according to the virtual impedance of the user and the symmetrical relative entropy specifically includes:
And 5.1, calculating a reconstruction error according to the virtual impedance of the user and the symmetrical relative entropy, wherein a specific calculation formula is as follows:
(15)
Wherein,Representing a reconstruction error; Representing the nth user virtual impedance at t timesIs used to determine the predicted value of (c),Predicting by an original transducer model; Representing a loss factor; The F-norm is represented by,Representing a 1-norm.
Reconstruction error computation enhances the ability of the model to extract both neighboring associated features and global associated features.
And 5.2, calculating the abnormal fraction of the virtual impedance of the user according to the symmetrical relative entropy and the reconstruction error, wherein the specific calculation formula is as follows:
(16)
Wherein,Representing the anomaly score for the nth user virtual impedance at time t,Representing the element-by-element product,Representing the normalization function. The abnormal score of the virtual impedance of each user at each moment integrates two parts of symmetrical relative entropy and reconstruction error, and scoring accuracy is improved.
And 5.3, summing the abnormal scores of the user virtual impedance at all times to obtain the comprehensive abnormal score of the user virtual impedance.
And summing the abnormal scores of the virtual impedance of each user at all times to obtain the total abnormal score of the virtual impedance of the user, and converting the problem of branch line leakage positioning before the meter into the problem of time sequence abnormal detection.
And 6, positioning the electric leakage fault according to the comprehensive abnormal score of the virtual impedance of the user.
In a specific embodiment of the invention, the position of the electric leakage fault is determined according to the abnormal number of single electric leakage fault positioning and the comprehensive abnormal fraction of virtual impedance of all users.
The abnormal number of single leakage fault location refers to the number of leakage fault users determined during single leakage fault location. When the electric leakage fault positioning is needed, at least 1 electric leakage fault user exists, so that the abnormal number of single electric leakage fault positioning is more than or equal to 1.
The number of users in the transformer area is 117, and the abnormal number of single leakage fault positioning is 1, which indicates that 1 leakage fault user needs to be positioned when the leakage fault positioning method is adopted for one leakage fault positioning. Therefore, the maximum comprehensive abnormal score is selected from the comprehensive abnormal scores of all the user virtual impedances, and the branch line in front of the user table corresponding to the maximum comprehensive abnormal score is the electric leakage fault position, as shown in fig. 6. In fig. 6, when the number of abnormalities in single leakage fault location is 1, the method of the invention can calculate the comprehensive abnormal scores of the virtual impedances of 117 users, and locate the branch line before the 40 th user is the leakage fault location, and the threshold delta in fig. 6 is determined according to the number of abnormalities in single leakage fault location and the comprehensive abnormal scores of the virtual impedances of all users. In this embodiment, the threshold δ is 0.21, that is, when the total abnormal score of the virtual impedance of the user exceeds the threshold δ, the corresponding branch line before the user table is the leakage fault location.
And 7, after the electric leakage fault is eliminated according to the electric leakage fault positioning result of the step 6, obtaining the residual current of the transformer area, judging whether the electric leakage fault exists or not according to the residual current of the transformer area, and if so, repeating the steps 1 to 7.
Example two
The embodiment of the application also provides electronic equipment, which comprises a memory, a processor and computer programs/instructions stored on the memory, wherein the processor executes the computer programs/instructions to realize the method for positioning the leakage faults of the branch line before the user table of the platform area.
Although not shown, the electronic device includes a processor that can perform various appropriate operations and processes according to programs and/or data stored in a Read Only Memory (ROM) or programs and/or data loaded from a storage portion into a Random Access Memory (RAM). The processor may be a multi-core processor or may include a plurality of processors. In some embodiments, the processor may comprise a general-purpose main processor and one or more special coprocessors, such as, for example, a Central Processing Unit (CPU), a Graphics Processor (GPU), a neural Network Processor (NPU), a Digital Signal Processor (DSP), and so forth. In the RAM, various programs and data required for the operation of the device are also stored. The processor, ROM and RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
The above-described processor is used in conjunction with a memory to execute programs/instructions stored in the memory that when executed by a computer are capable of carrying out the methods, steps or functions described in the above embodiments.
Although not shown, the embodiment of the present application also provides a computer-readable storage medium having stored thereon a computer program/instruction which, when executed by a processor, implements the method for positioning a pre-table branch line leakage fault in a zone user according to the embodiment of the present application.
Readable storage media, including both permanent and non-permanent, removable and non-removable media, may be implemented in any method or technology for information storage. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
Although not shown, embodiments of the present application also provide a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method for locating a branch line leakage fault before a subscriber table in a cell area in the embodiments of the present application.
The foregoing disclosure is merely illustrative of specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art will readily recognize that changes and modifications are possible within the scope of the present invention.