A method and system for intelligent analysis of gateway electric energy meter operation failure
Through the integration of rule-based particle swarm optimization and SSA-SVM algorithm, the problem of low fault diagnosis efficiency of gateway power metering devices is solved, and high-accuracy intelligent fault diagnosis is achieved, which is suitable for gateway power with complex structures and multiple fault types. Metering device.
Patent Information
- Application Number
- CN202210912347.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing technology has problems in fault diagnosis of gateway electric energy metering devices, such as low working efficiency, long fault location period, and inability to form a complete fault diagnosis system, especially in the case of complex structures and multiple fault types.
The rule-based particle swarm optimization algorithm is used to optimize parameters to obtain the optimal voltage and current rule definition threshold under the actual operation conditions of the electric energy metering device, and input it into the SSA-SVM algorithm model to realize intelligent analysis and judgment of operational faults of the gateway electric energy meter. Integrate particle swarm optimization and SSA-SVM algorithm to extract fault characteristics and make judgments.
It improves the rationality and effectiveness of the fault characteristics description of the gateway electric energy metering device, achieves a higher fault diagnosis accuracy, and can effectively identify functional and non-functional faults of the electric energy meter.
Smart Images

Figure CN115166626B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to an electric energy meter operation fault detection technology in the field of electric energy metering, and specifically relates to an intelligent analysis method and system for gateway electric energy meter operation faults. Background Art
[0002] As a device for electricity settlement between power generation and supply enterprises, between power supply enterprises and users, and between regional power grids, the normal operation and metering accuracy of gateway electric energy metering devices are directly related to the economic and social benefits of power generation and power supply enterprises, and are key equipment to ensure the normal operation of the power market. According to the management requirements of DL / T 448-2016 "Technical Management Regulations for Electric Energy Metering Devices", a large number of weekly inspections of metering devices need to be carried out regularly every year. With the continuous upgrading of the power grid structure and the continuous operation of new energy power plants, the gateway metering points are increasing year by year, and the workload and difficulty of on-site inspection and test data management are increasing. At the same time, the requirements for refined, informationized, and automated management are also increasing.
[0003] In order to ensure the safe and reliable operation of electric energy metering devices and improve the operation and management level of electric energy metering devices, professional personnel generally conduct on-site tests on electric energy metering devices on a periodic basis. However, due to the large number of gateway electric energy metering devices and the large workload of periodic inspection, the traditional manual inspection method has problems such as low work efficiency, high inspection cost, long fault location cycle, and uncontrollable operation status. In response to the above problems, the United States, Australia and other developed countries with electric energy metering have conducted relevant research on the fault diagnosis and status evaluation of electric energy metering devices. The United States uses the current transformer secondary admittance measurement technology as a mature technology to perform fault diagnosis of CT secondary circuits. Australia, Japan and other countries have also developed some secondary circuit status monitoring systems for electric energy metering devices. Foreign research institutions focus on using leading DSP, communication and other technologies to develop mature electric energy metering device status monitoring solutions based on the requirements of regulatory authorities and the needs of production departments, but have not made much involvement in the modeling of fault diagnosis methods for electric energy metering devices and the application of status monitoring data. Due to the complex structure of gateway metering devices and the wide variety of fault types, the research on fault diagnosis and status assessment of electric energy metering devices by some domestic power research institutions often starts from fault instances and uses professional experience to diagnose the faults that have occurred. It mainly stays on local diagnosis and only targets specific fault types. A complete fault diagnosis system has not yet been formed and cannot be extended to other fault diagnoses. Summary of the invention
[0004] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a method and system for intelligent analysis of operating faults of gateway electric energy meters are provided. The present invention adopts a rule-based particle swarm optimization algorithm to optimize parameters, and obtains the optimal voltage and current rule definition thresholds under the actual operation of the electric energy metering device, so that the description and extraction of fault characteristics of the gateway metering electric energy device are more reasonable and effective; the present invention uses the optimal voltage and current rule definition thresholds under the actual operation of the gateway electric energy meter as partial fault characteristics, and inputs them into the SSA-SVM algorithm model, thereby realizing the fusion algorithm of rule-based particle swarm optimization and SSA-SVM, and proposes an intelligent analysis method for operating faults of gateway electric energy meters with high accuracy.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0006] A method for intelligently analyzing and judging operation failures of gateway electric energy meters, comprising:
[0007] S1, collects voltage, current, load electric energy data, and retrieves historical fault data from the database to form the basic data of the gateway metering electric energy meter to be tested;
[0008] S2, preprocessing the basic data of the gateway meter to be tested to improve the accuracy of the data;
[0009] S3, according to the voltage secondary circuit and current secondary circuit fault data in the historical fault data, the secondary circuit voltage / current threshold is obtained through a preset rule-based particle swarm optimization algorithm model, and the secondary circuit voltage / current fault judgment is performed based on the obtained secondary circuit voltage / current threshold;
[0010] S4, based on the offline diagnostic data of the electric energy meter in the historical fault data, the functional attribute data of the electric energy meter and the secondary circuit voltage / current fault judgment result, respectively extract the feature variable list and use the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operational fault judgment result about the functional / non-functional fault of the electric energy meter.
[0011] Optionally, the data preprocessing in step S2 includes removing abnormal data and supplementing missing data by interpolation.
[0012] Optionally, step S3 includes: S3.1, using the particle swarm optimization algorithm model to obtain the duration of abnormal events of any phase of the secondary circuit and the voltage threshold value (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), where KU1 is the voltage loss threshold, K U2 is the undervoltage threshold, K U3 is the overvoltage threshold, K I1 is the loss of flow threshold, K I2 is the undercurrent threshold, K I3 is the overcurrent threshold; S3.2, for each phase of the secondary circuit, the rule base model is used to judge the secondary circuit voltage / current fault: if the voltage monitoring value U of the voltage secondary circuit is less than the voltage loss threshold K U1 , and any phase current of the secondary circuit in the non-power-off state I>0.5%K I When the voltage monitoring value U of the voltage secondary circuit is greater than or equal to the voltage loss threshold K U1 , and is less than the undervoltage threshold K U2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overvoltage threshold K U3 , and the duration is greater than the duration of the abnormal event, the phase is judged to be overvoltage; if the current monitoring value I of the voltage secondary circuit is less than the loss of current threshold K I1 , and determine that the phase is out of current; if the current monitoring value I of the voltage secondary circuit is greater than or equal to the out-of-current threshold K I1 , and is less than the undercurrent threshold K I2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overcurrent threshold K I3 , and the duration is greater than the duration of the abnormal event, the phase is judged to be overcurrent, where K I Represents the rated current.
[0013] Optionally, in step S3.1, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the abnormal event duration of any phase of the secondary circuit and the voltage threshold value (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), the objective function used is:
[0014] f=min(FP),
[0015] In the above formula, f is the objective function, min means minimization, and FP means the false positive of the secondary circuit voltage / current fault judgment by the rule base model in step S3.2; the constraint adjustment adopted is:
[0016] Meter Abnormal =100%,
[0017] In the above formula, MeterAbnormal Represents the constraints on the variables in the objective function in the particle swarm optimization algorithm.
[0018] Optionally, extracting the feature variable list in step S4 includes:
[0019] S4.1, firstly extracting a list of characteristic variables according to the offline diagnosis data of the electric energy meter, the functional attribute data of the electric energy meter and the secondary circuit current / current threshold in the historical fault data;
[0020] S4.3, normalize the feature variable list;
[0021] S4.4, input the normalized feature variable list into the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operation fault judgment result about the functional / non-functional fault of the electric energy meter.
[0022] Optionally, the list of characteristic variables includes: load current, power factor, frequency fluctuation, ambient humidity value, switch switching load, main and sub-meter value error value, power-on reset circuit failure, insufficient communication load capacity, program error, LCD drive failure, software dead loop, welding process problem, poor current column contact, secondary circuit voltage difference, secondary circuit voltage difference, junction box burnout, power-off detection circuit failure, operating voltage, ambient temperature value, error in setting value of calibration register, single-chip microcomputer and crystal oscillator failure, software dead loop or damage, metering peripheral circuit failure, timing disorder, poor hardware contact, power supply line failure, closure and accuracy level, a total of twenty-eight fault types; the functional / non-functional faults of the electric energy meter include eight fault types, including intermittent communication, meter failure, display error, secondary circuit voltage failure, non-metering, error out of tolerance, wiring error, and secondary circuit current failure.
[0023] Optionally, the support vector machine algorithm model optimized based on the sparrow search algorithm refers to a support vector machine algorithm model after the penalty factor C and the kernel function parameter g are optimized based on the sparrow search algorithm.
[0024] Optionally, before step S4, the step of optimizing the penalty factor C and kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm is also included, and when optimizing the penalty factor C and kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm, the classification accuracy of the support vector machine algorithm model is used as the fitness value of each sparrow in the sparrow search algorithm.
[0025] In addition, the present invention also provides a gateway electric energy meter operation fault intelligent analysis system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the gateway electric energy meter operation fault intelligent analysis method.
[0026] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the steps of the intelligent analysis method for gateway electric energy meter operation faults.
[0027] Compared with the prior art, the present invention mainly has the following advantages:
[0028] 1. The present invention adopts a rule-based particle swarm optimization algorithm to optimize parameters and obtain the optimal voltage and current rule definition thresholds under the actual operation of the electric energy metering device, so that the fault feature description and extraction of the gateway metering electric energy device are more reasonable and effective;
[0029] 2. The present invention defines the optimal threshold values of voltage and current rules under actual operation of gateway electric energy meters as partial fault features, inputs them into the SSA-SVM algorithm model, realizes the fusion algorithm of rule-based particle swarm optimization and SSA-SVM, and proposes an intelligent analysis method for gateway electric energy meter operation faults with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0032] like Figure 1 As shown, the intelligent analysis method for the operation failure of the gateway electric energy meter in this embodiment includes:
[0033] S1, collects voltage, current, load electric energy data, and retrieves historical fault data from the database to form the basic data of the gateway metering electric energy meter to be tested;
[0034] S2, preprocessing the basic data of the gateway meter to be tested to improve the accuracy of the data;
[0035] S3, according to the voltage secondary circuit and current secondary circuit fault data in the historical fault data, the secondary circuit voltage / current threshold is obtained through a preset rule-based particle swarm optimization algorithm model, and the secondary circuit voltage / current fault judgment is performed based on the obtained secondary circuit voltage / current threshold;
[0036] S4, based on the offline diagnostic data of the electric energy meter in the historical fault data, the functional attribute data of the electric energy meter and the secondary circuit voltage / current fault judgment result, respectively extract the feature variable list and use the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operational fault judgment result about the functional / non-functional fault of the electric energy meter.
[0037] In this embodiment, step S1 also includes monitoring the operating environment parameters and operating status of the gateway metering electric energy meter to be tested, and collecting voltage, current, and load electric energy data from the monitoring data.
[0038] In this embodiment, the data preprocessing in step S2 includes eliminating abnormal data and interpolating to supplement missing data. The abnormal data refers to data whose size exceeds a set value, or data whose distance from the cluster center exceeds a set value when clustered by a clustering algorithm; the missing data refers to the vacant value between two data in the time or space dimension, so as to obtain the data required for applying (constructing) the fault diagnosis model.
[0039] In this embodiment, step S3 includes:
[0040] S3.1, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the abnormal event duration of any phase of the secondary circuit and the voltage threshold of any phase (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), where K U1 is the voltage loss threshold, K U2 is the undervoltage threshold, K U3 is the overvoltage threshold, K I1 is the loss of flow threshold, K I2 is the undercurrent threshold, K I3 is the overcurrent threshold;
[0041] S3.2, for each phase of the secondary circuit, the rule base model is used to judge the secondary circuit voltage / current fault: if the voltage monitoring value U of the voltage secondary circuit is less than the voltage loss threshold K U1 , and any phase current of the secondary circuit in the non-power-off state I>0.5%K I When the voltage monitoring value U of the voltage secondary circuit is greater than or equal to the voltage loss threshold K U1 , and is less than the undervoltage threshold K U2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overvoltage threshold K U3, and the duration is greater than the duration of the abnormal event, the phase is judged to be overvoltage; if the current monitoring value I of the voltage secondary circuit is less than the loss of current threshold K I1 , and determine that the phase is out of current; if the current monitoring value I of the voltage secondary circuit is greater than or equal to the out-of-current threshold K I1 , and is less than the undercurrent threshold K I2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overcurrent threshold K I3 , and the duration is greater than the duration of the abnormal event, the phase is determined to be overcurrent, where KI represents the rated current.
[0042] In step S3, the voltage secondary circuit and current secondary circuit fault data in the historical fault data include normal electric energy meters, faulty electric energy meters and corresponding power, current, and voltage, and calculate the average power, average current, and average voltage data. In step S3.1, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the duration of abnormal events of any phase of the secondary circuit, the voltage threshold of any phase (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), the objective function used is:
[0043] f=min(FP),
[0044] In the above formula, f is the objective function, min means minimization, and FP means the false positive of the secondary circuit voltage / current fault judgment by the rule base model in step S3.2; the constraint adjustment adopted is:
[0045] Meter Abnormal =100%,
[0046] In the above formula, Meter Abnormal Indicates the constraints on the variables in the objective function in the particle swarm optimization algorithm. Only the solution performed under the constraint conditions can be an effective solution. Based on the above function expression, it can be known that in this embodiment, the optimization is performed under the condition that the detected fault is 100% abnormal.
[0047] As an optional implementation, in step S3.1 of this embodiment, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the abnormal event duration of any phase of the secondary circuit, the voltage threshold value (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,KI3 ), for any phase voltage threshold (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ) adopts the threshold coefficient optimization method: by defining the pressure loss threshold as K U1 =αU base , where α is the voltage loss threshold coefficient; the undervoltage threshold is defined as K U2 =λ*U base , where λ is the undervoltage threshold coefficient; the overvoltage threshold is defined as K U3 =γ*U base , where γ is the overvoltage threshold coefficient, so that any phase voltage threshold (K U1 ,K U2 ,K U3 ) is converted into the optimization of the corresponding threshold coefficient. Similarly, the loss of flow threshold is defined as K I1 =σI base , where σ is the loss-of-current threshold coefficient, and the undercurrent threshold is defined as K I2 =η*I base , where η is the undercurrent threshold coefficient, and the overcurrent threshold is defined as K I3 =β*I base , where β is the overcurrent threshold coefficient, so that any phase current threshold (K I1 ,K I2 ,K I3 ) is converted into the optimization of the corresponding threshold coefficient.
[0048] In step S3.1, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the abnormal event duration of any phase of the secondary circuit and the voltage threshold (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), the duration of the abnormal event of any phase and the voltage threshold of any phase (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3) are respectively represented as abnormal event duration (X1), arbitrary phase voltage threshold (X2, X3, X4), arbitrary phase current threshold X5, X6, X7). The particle swarm algorithm is used to optimize the parameters of the rule-based model. The number of particles in the particle swarm is m, and each particle has two parameters, namely, position X i and speed V i , the dimension is n, where n is the number of variables in the problem. Individual search particles include abnormal event duration (X1), arbitrary phase voltage threshold (X2, X3, X4), arbitrary phase current threshold X5, X6, X7). The final result is the optimal abnormal event duration (X1), arbitrary phase voltage threshold (X2, X3, X4), arbitrary phase current threshold X5, X6, X7), and the steps are as follows:
[0049] S101: Randomly initialize position X i and speed V i , where X i and V i In the preset position interval [X min,d , X max,d ] and speed range [V min,d , V max,d ] can be represented by the following symbols:
[0050] X i =[X i1 ,X i2 ,…,X id ,…,X in ],X min,d ≤X id ≤X max,d ,i∈{1,m},d∈{1,n}
[0051] V i =[V i1 ,V i2 ,…,V id ,…,V in ],V min,d ≤V id ≤V max,d
[0052] In the above formula, m is the number of particles in the particle group, and n is the dimension.
[0053] S102: Initialize the loss function f(X i ), initialize the local optimal value Lbest i And the global optimal value Gbest:
[0054] Lbest i =∞
[0055] Gbest=∞
[0056] S103: Calculate the particle loss Loss i :
[0057] Loss i =f(X i );
[0058] S104: Update the local optimal value Lbest i And the global optimal value Gbest:
[0059] If the condition Loss is met i <Lbest i , then update the local optimal value Lbest according to the following formula i :
[0060] Lbest i =Loss i ,Pos Lbest,i =X i ,
[0061] Among them, Pos Lbest,i is the local optimal position;
[0062] If the condition min(Lbest i )=Gbest, then update the global optimal value Gbest according to the following formula:
[0063] Gbest=min(Lbest i ), Pos Gbest =X i ,
[0064] min(Lbest i ) is the smallest local optimal value Lbest i ,Pos Gbest is the global optimal position;
[0065] S105: Update the position X of each particle i and speed V i :
[0066] V i (t+1)=ωV i (t)+C cognitive +C social
[0067] X i (t+1)=X i (t)+V(t)
[0068] In the above formula, V i (t+1) and Vi (t) are the speed V before and after the update respectively i , X i (t+1) and X i (t) are the positions X before and after the update respectively. i , ω is the inertia weight, C cognitive is the cognitive component, C social is the social component, t is the current iteration number, and:
[0069] C cognitive =c1r1(Pos Lbest,i -X i (t))
[0070] C social =c2r2(Pos Lbest,i -X i (t))
[0071] ω(t)=[(ω1-ω2)*(Max_Iter-t) / Max_Iter]+ω2
[0072] In the above formula, c1 is the cognitive constant, c2 is the social constant, r1 and r2 are random variables ∈ {0,1}. ω1 is the initial inertia, ω2 is the final inertia weight, and Max_Iter is the maximum number of iterations;
[0073] S106: Update the current number of iterations t (increase 1 or decrease 1). If the current number of iterations t is equal to the maximum number of iterations Max_Iter, the global best value Gbest of each particle is output as the best value obtained by optimization; otherwise, jump to step S103.
[0074] In this embodiment, 916 normal cases and 84 abnormal cases (faults) are selected from the historical fault data. Therefore, the number of normal cases is about 92%, and the number of abnormal cases is about 8%. According to the voltage rule definition and the current rule definition, the particle swarm algorithm is used to optimize the parameters. Randomly initialized, without loss of generality, run the particle swarm algorithm three times to determine the optimal value settings of the abnormal event duration (X1), any phase voltage threshold (X2, X3), and any phase current threshold (X4, X5). The parameters are selected as follows: ω1=0.9, ω2=0.35, c1=0.5, c2=1.00, m=24, Max_Iter=40, V min,d =-X max,d, V max,d =X max,d .
[0075] In this embodiment, the feature variable list extracted in step S4 includes:
[0076] S4.1, firstly extracting a list of characteristic variables according to the offline diagnosis data of the electric energy meter, the functional attribute data of the electric energy meter and the secondary circuit current / current threshold in the historical fault data;
[0077] S4.3, normalize the feature variable list;
[0078] S4.4, input the normalized feature variable list into the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operation fault judgment result about the functional / non-functional fault of the electric energy meter.
[0079] In this embodiment, the list of characteristic variables includes: load current, power factor, frequency fluctuation, ambient humidity value, switch switching load, main and auxiliary meter value error value, power-on reset circuit failure, insufficient communication load capacity, program error, LCD driver failure, software dead loop, welding process problem, poor contact of current column, secondary circuit voltage difference, secondary circuit voltage difference, junction box burnout, power-off detection circuit failure, operating voltage, ambient temperature value, error in setting value of calibration register, single-chip microcomputer and crystal oscillator failure, software dead loop or damage, metering peripheral circuit failure, timing disorder, poor hardware contact, power line failure, closure and accuracy level, a total of 28 fault characteristics, as shown in Table 1:
[0080] Table 1: List of twenty-eight fault characteristics.
[0081] Feature number Feature Description Feature number Feature Description F1 Load current F15 Secondary circuit voltage difference F2 Power Factor F16 Junction box burnt F3 Frequency Fluctuation F17 Power failure detection circuit failure F4 Ambient humidity value F18 Operating voltage F5 Switching load F19 Ambient temperature value F6 Error value between main and auxiliary meters F20 The setting value of the calibration register is wrong F7 Power-on reset circuit failure F21 MCU and crystal oscillator failure F8 Insufficient communication capacity F22 Software dead loop or corruption F9 Program Error F23 Metering peripheral circuit failure F10 LCD driver failure F24 Timing Disorder F11 Software dead loop F25 Bad hardware contact F12 Welding process problems F26 Power line failure F13 The current column has poor contact F27 Closed F14 Secondary circuit voltage difference F28 Accuracy level
[0082] If the difference between the measured secondary circuit voltage / current and the secondary circuit voltage / current threshold is greater than the difference between the measured secondary circuit voltage / current and the secondary circuit voltage / current threshold, according to the definition of the secondary circuit voltage / current fault rule in step S3, it is considered that there is a possibility of a secondary circuit voltage / current fault. The functional / non-functional faults of the electric energy meter include eight types of faults, including intermittent communication, meter failure, display error, secondary circuit voltage fault, non-metering, error exceeding tolerance, wiring error, and secondary circuit current fault, as shown in Table 2:
[0083] Table 2: Table of eight fault types.
[0084] Status number Status Type Status number Status Type 1 Communications are spotty 5 Not metered 2 The meter is not working properly 6 Error Exceeding Tolerance 3 Display Error 7 Wiring Error 4 Secondary circuit voltage fault 8 Secondary circuit current fault
[0085] A certain fault state in Table 2 can be described by multiple feature variables in Table 1. Features can describe states. Different combinations of features can describe different states, so states can be identified and classified. Different combinations can be expressed as different feature values.
[0086] In this embodiment, the support vector machine algorithm model optimized based on the sparrow search algorithm refers to the support vector machine algorithm model after the penalty factor C and the kernel function parameter g are optimized based on the sparrow search algorithm.
[0087] In this embodiment, before step S4, the step of optimizing the penalty factor C and kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm is also included, and when optimizing the penalty factor C and kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm, the classification accuracy of the support vector machine algorithm model is used as the fitness value of each sparrow in the sparrow search algorithm. In this embodiment, the step of optimizing the penalty factor C and kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm includes: constructing a training set and a test set, for 8 states of electric energy meter fault and normal state, a total of 9 state labels, selecting equal samples for each state in the electric energy meter historical fault data set for training, and normalizing the eigenvalues. The normalized eigenvalues are shown in Table 3.
[0088] Table 3: Eight states of electric energy meter faults and normalized characteristic values.
[0089]
[0090]
[0091] When constructing the SVM diagnostic model based on the sparrow search algorithm optimization in this embodiment, firstly, the normalized eigenvalues and corresponding state labels in the training set constructed in step 4 are used as the input of the SVM diagnostic model, that is, the normalized eigenvalue data is mapped to a high-dimensional space through a kernel function, and a linear classification method can be used in the high-dimensional space for classification to match the corresponding state labels; then, the sparrow search algorithm is used to optimize the penalty factor C and the kernel function parameter g of the SVM diagnostic model to obtain a better global optimization parameter combination to achieve a higher classification accuracy. In this embodiment, the optimization step includes:
[0092] S201, set the classification accuracy of the SVM diagnosis model to the current fitness value of each sparrow, randomly initialize the penalty factor C and kernel function parameter g of the SVM diagnosis model, set the number of sparrows N, the maximum number of iterations M, and the search space dimension D of the sparrow search algorithm, then the position of the i-th sparrow in the D-dimensional search space is Xi = [x i1 , x i2 , …, x id , …, x iD ]. The position of a flock X consisting of N sparrows is expressed as:
[0093]
[0094] Among them, x id represents the position of the i-th sparrow in the d-th dimension, d = 1, 2,…, D.
[0095] S202. Determine the fitness value F of all sparrows by calculating the classification accuracy of the SVM diagnostic model. X .
[0096]
[0097] where f i is the fitness value of the i-th sparrow. The calculation of the fitness value includes, but is not limited to, using the Griewank function, Rastrigin function, Schaffer function, and Ackley function.
[0098] S203. Calculate the position: During the optimization process, the fitness value F X represents the energy reserve. Producers with a higher energy reserve during the search process will obtain food preferentially. Generally, the producers that forage are 10% - 20% of the bird flock, and their foraging range is larger than that of the thieves in the flock. At the same time, the producers should continuously calculate their positions:
[0099]
[0100] In the above formula, represent the positions of the i-th sparrow in the d-dimensional space at the (t + 1)-th and t-th iterations respectively. T represents the maximum number of iterations, α ∈ (0, 1) is a uniformly random number, Q is a random number following a normal distribution, L is a matrix with all elements being 1 and size L×d; R2 ∈ [0, 1], ST ∈ [0.5, 1] are the warning value and the safety value respectively. When R2 < ST, there are no predators around the foraging area, and the producers can perform extensive search operations; when R2 ≥ ST, the sparrows detected in the flock have identified a predator and immediately send it to other sparrows. Then the flock starts anti-predation behavior, adjusts the search strategy, and quickly moves to the safe area.
[0101] S204. Update the position: During the foraging process, except for the producers, all sparrows are cheaters looking for the best foraging area. The cheaters update their positions according to the following formula:
[0102]
[0103] In the above formula, represents the worst position of the sparrow in the d-th dimension in the t-th iteration of the flock, represents the optimal position of the sparrow in the d-th dimension in the (t + 1)-th iteration of the flock. A is a 1×d matrix, where each element is randomly assigned as 1 or -1, so as to ensure that A + = A T (AA T ) -1When i>n / 2, the i-th sparrow cannot get any food and is in a hungry state with low adaptability. This sparrow is likely to fly to another place to forage and obtain higher energy. When i≤n / 2, the i-th sparrow finds a random location near the current optimal location xb to forage.
[0104] When danger is detected, sparrows at the edge will quickly move to a safe area to get a better position, while sparrows in the middle will move randomly to get closer to other sparrows. The mathematical expression is as follows:
[0105]
[0106] In the above formula, β represents the step length control parameter, which is a normally distributed random number with a mean of 0 and a variance of 1; K∈[-1,1] is a random number of the sparrow's movement direction, which is also the step length control parameter; e is a small constant to avoid the situation where the denominator is 0. i The fitness value of the i-th sparrow, f i and f g are the optimal and worst fitness values of the current sparrow group respectively. i ≠f g When the sparrow is at the edge of the flock, it is vulnerable to attacks by predators; when the i =f g Once a sparrow senses a threat from a predator, it will move closer to other sparrows and adjust its search strategy to avoid being attacked.
[0107] S205, calculate and update the maximum fitness value, that is, the classification accuracy of the SVM diagnostic model. If the current fitness value of the sparrow is greater than the saved fitness value, the original fitness value is updated; otherwise, the original fitness value remains unchanged. Therefore, the saved sparrow fitness value is the optimal value, that is, when the classification accuracy of the SVM diagnostic model reaches the optimal value, the penalty factor C and kernel function parameter g of the SVM diagnostic model corresponding to the current optimal value are saved. Finally, the SVM diagnostic model optimized based on the sparrow search algorithm can be used, that is, the penalty factor C and kernel function parameter g of the corresponding SVM diagnostic model are saved using the optimal fitness value, and the test set data is input into the model to obtain the classification result. If the classification accuracy condition is met, the SVM diagnostic model optimized based on the sparrow search algorithm is trained. If the classification accuracy condition is not met, the number of iterations of the sparrow search algorithm is increased, and the penalty factor C and kernel function parameter g of the SVM diagnostic model are retrained. In this embodiment, for the eight states of the electric energy meter fault and the normal state, a total of nine states, 60 samples are selected for training in each state in the electric energy meter historical fault data set, and another 40 samples are selected for testing, that is, there are a total of 420 training samples and 280 test samples. The 420 training samples are used as the input training model, the number of iterations is set to 10 times, the population number pop is set to 9, the proportion of discoverers p_percent is set to 20%, the proportion of sparrows aware of danger is set to 10%, the safety threshold ST is set to 0.85, and the fitness function fun selects the classification accuracy as the fitness function. Since the penalty factor C and the kernel function parameter g need to be optimized here, the parameter dimension dim is 2. After the optimization is completed, the optimal penalty factor C and kernel function parameter g combination (0.5, 1) can be obtained, so the SSA-SVM diagnostic model that can classify electric energy meter faults is also obtained, and only the test sample needs to be input to output a high-accuracy classification result.
[0108] Since the number of abnormal classes in the training data in the original data of the historical faults of the energy meter is small, the ability of the model to detect new fault measurement patterns is limited. This limitation can be overcome by searching for suspicious faults in the normal meter group. A staff member can be sent to the site to check the suspected faults. If a fault is found, its usage pattern is added to the training set to update the original data of the historical faults of the energy meter.
[0109] In this embodiment, the performance of the intelligent fault analysis method is verified, and the main steps are as follows: (1) Verify the performance of the rule-based particle swarm optimization algorithm model. The optimal threshold value obtained after the rule-based particle swarm optimization algorithm model is run in the actual operation of the electric energy metering device is brought into the rule definition of the secondary circuit voltage fault and the secondary circuit current fault, and the untrained data in the fault data in the historical data (including 94 abnormal data and 105 normal data) is used for testing; when the MCC value is 94.185%, the accuracy rate can reach 95.24%. The results show that although most of the training data are normal classes, the optimized parameters in the rule-based particle swarm optimization algorithm model can well describe the voltage fault and current fault in the secondary circuit under the actual operation of the gateway electric energy meter, and the difference between the real-time current and voltage data and the threshold can well describe some characteristics of the electric energy meter fault. (2) Verify the performance of the SSA-SVM algorithm model. After several iterations, the SSA-SVM algorithm model can quickly identify the optimal value, optimize the support vector machine parameters to obtain the optimal penalty factor C and kernel function parameter g combination (0.5, 1), and then perform sample testing. 280 samples were selected for testing, of which 258 were fault-free and 22 were faulty. The test results are shown in Table 4 and Table 5:
[0110] Table 4: Confusion matrix for evaluating intelligent fault analysis methods.
[0111]
[0112] Table 5: Performance evaluation of intelligent fault analysis methods.
[0113] Classification accuracy 97.5% Classification Accuracy 99.215% Recall 98.06%
[0114] Combining Table 4 and Table 5, it can be seen that the SSA algorithm in this embodiment has a fast optimization speed and a high diagnosis rate. The SSA-SVM model accurately classifies 273 samples out of 280 samples, with an accuracy rate of 97.5%, which is sufficient to complete the classification task of functional faults and non-functional faults of gateway electric energy meters. The fusion algorithm of rule-based particle swarm optimization and SSA-SVM can be used for intelligent analysis of electric energy meter faults at gateway electric energy meters. The model has high accuracy, strong optimization ability, fast convergence speed and good convergence performance.
[0115] In summary, this embodiment proposes a multi-algorithm fusion gateway electric energy meter operation fault intelligent analysis method, provides a solution for the secondary circuit voltage and current faults that are difficult to locate, builds a rule-based particle swarm optimization algorithm, obtains the secondary circuit voltage and current fault characteristics in the actual operation of the gateway electric energy meter, and inputs them into the support vector machine algorithm (SSA-SVM) model based on the sparrow search algorithm, which has a good classification and diagnosis effect with a high accuracy rate; for the fault types that cannot be quantitatively described in the electric energy meter fault, the support vector machine algorithm (SSA-SVM) based on the sparrow search algorithm is adopted, and a very high accuracy rate can also be obtained; the gateway electric energy meter operation fault intelligent analysis method that integrates the two solves the current problem of low accuracy and difficulty in locating faults.
[0116] In addition, this embodiment also provides a gateway electric energy meter operation fault intelligent analysis system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the steps of the aforementioned gateway electric energy meter operation fault intelligent analysis method. In addition, this embodiment also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used to be programmed or configured by the microprocessor to execute the steps of the aforementioned gateway electric energy meter operation fault intelligent analysis method.
[0117] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0118] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. An intelligent method for analyzing and judging the operation failure of gateway electric energy meters. It is characterized in that include: S1, collects voltage, current, load electric energy data, and retrieves historical fault data from the database to form the basic data of the gateway metering electric energy meter to be tested; S2, preprocessing the basic data of the gateway meter to be tested to improve the accuracy of the data; S3, according to the voltage secondary circuit and current secondary circuit fault data in the historical fault data, the secondary circuit voltage / current threshold is obtained through a preset rule-based particle swarm optimization algorithm model, and the secondary circuit voltage / current fault judgment is performed based on the obtained secondary circuit voltage / current threshold; S4, based on the offline diagnostic data of the electric energy meter in the historical fault data, the functional attribute data of the electric energy meter and the secondary circuit voltage / current fault judgment result, respectively extract the feature variable list and use the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operational fault judgment result about the functional / non-functional fault of the electric energy meter.
2. According to the intelligent analysis method of gateway electric energy meter operation failure according to claim 1, It is characterized in that The data preprocessing in step S2 includes removing abnormal data and supplementing missing data by interpolation.
3. According to the intelligent analysis method of gateway electric energy meter operation failure according to claim 2, It is characterized in that Step S3 includes: S3.1, using the particle swarm optimization algorithm model to obtain the duration of abnormal events of any phase of the secondary circuit and the voltage threshold value (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), where K U1 is the voltage loss threshold, K U2 is the undervoltage threshold, K U3 is the overvoltage threshold, K I1 is the loss of flow threshold, K I2 is the undercurrent threshold, K I3 is the overcurrent threshold; S3.2, for each phase of the secondary circuit, the rule base model is used to judge the secondary circuit voltage / current fault: if the voltage monitoring value U of the voltage secondary circuit is less than the voltage loss threshold K U1 , and any phase current of the secondary circuit in the non-power-off state I>0.5%K I When the voltage monitoring value U of the voltage secondary circuit is greater than or equal to the voltage loss threshold K U1 , and is less than the undervoltage threshold K U2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overvoltage threshold K U3 , and the duration is greater than the duration of the abnormal event, the phase is judged to be overvoltage; if the current monitoring value I of the voltage secondary circuit is less than the loss of current threshold K I1 , and determine that the phase is out of current; if the current monitoring value I of the voltage secondary circuit is greater than or equal to the out-of-current threshold K I1 , and is less than the undercurrent threshold K I2 If the voltage monitoring value U of the voltage secondary circuit is greater than the overcurrent threshold K I3 , and the duration is greater than the duration of the abnormal event, the phase is judged to be overcurrent, where K I Represents the rated current.
4. According to the intelligent analysis method of gateway electric energy meter operation failure according to claim 3, It is characterized in that In step S3.1, the voltage secondary circuit and current secondary circuit fault data in the historical fault data are used to obtain the abnormal event duration of any phase of the secondary circuit and the voltage threshold (K U1 ,K U2 ,K U3 ), any phase current threshold (K I1 ,K I2 ,K I3 ), the objective function used is: f=min(FP), In the above formula, f is the objective function, min means minimization, and FP means the false positive of the secondary circuit voltage / current fault judgment by the rule base model in step S3.2; the constraint adjustment adopted is: MeteY Abnormal =100%, In the above formula, Meter Abnormal Represents the constraints on the variables in the objective function in the particle swarm optimization algorithm.
5. According to the intelligent analysis method of gateway electric energy meter operation failure according to claim 1, It is characterized in that The feature variable list extracted in step S4 includes: S4.1, firstly extracting a list of characteristic variables according to the offline diagnosis data of the electric energy meter, the functional attribute data of the electric energy meter and the secondary circuit current / current threshold in the historical fault data; S4.3, normalize the feature variable list; S4.4, input the normalized feature variable list into the support vector machine algorithm model optimized based on the sparrow search algorithm to obtain the operation fault judgment result about the functional / non-functional fault of the electric energy meter.
6. According to the intelligent analysis method of gateway electric energy meter operation failure according to claim 5, It is characterized in that The list of characteristic variables includes: load current, power factor, frequency fluctuation, ambient humidity value, switch switching load, main and sub-meter value error value, power-on reset circuit failure, insufficient communication load capacity, program error, LCD driver failure, software dead loop, welding process problem, poor current column contact, secondary circuit voltage difference, secondary circuit voltage difference, junction box burnout, power-off detection circuit failure, operating voltage, ambient temperature value, error in the setting value of the calibration register, single-chip microcomputer and crystal oscillator failure, software dead loop or damage, metering peripheral circuit failure, timing disorder, poor hardware contact, power supply line failure, closure and accuracy level, a total of 28 fault types; the functional / non-functional failures of the electric energy meter include eight fault types, including intermittent communication, meter failure, display error, secondary circuit voltage failure, non-metering, error out of tolerance, wiring error, and secondary circuit current failure.
7. According to claim 1, the intelligent analysis method for gateway electric energy meter operation failure, It is characterized in that The support vector machine algorithm model based on sparrow search algorithm optimization refers to a support vector machine algorithm model after the penalty factor C and the kernel function parameter g are optimized based on the sparrow search algorithm.
8. The intelligent analysis method for gateway electric energy meter operation failure according to claim 7, It is characterized in that Before step S4, the method also includes the step of optimizing the penalty factor C and the kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm, and when optimizing the penalty factor C and the kernel function parameter g of the support vector machine algorithm model based on the sparrow search algorithm, the classification accuracy of the support vector machine algorithm model is used as the fitness value of each sparrow in the sparrow search algorithm.
9. An intelligent analysis and judgment system for gateway electric energy meter operation faults, comprising a microprocessor and a memory connected to each other, It is characterized in that The microprocessor is programmed or configured to execute the steps of the method for intelligently analyzing the operation fault of a gateway electric energy meter as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored therein. It is characterized in that The computer program is used to be programmed or configured by a microprocessor to execute the steps of the method for intelligent analysis of gateway electric energy meter operating faults as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Rare earth extraction stirring shaft fault diagnosis method and system based on SSA-SVM
CN113221998A
Power electronic circuit fault diagnosis method for optimizing ELM based on improved sparrow search algorithm
CN113269252A
