Fault diagnosis method and system of electric energy metering device based on data mining technology
By improving the Haiou Optimization Algorithm to optimize the Support Vector Machine Model, the problem of long model training time and poor parameter optimization effect in fault diagnosis of the power metering device is solved, and more efficient and accurate fault identification is achieved to ensure the normal operation of the power metering device.
Patent Information
- Application Number
- CN202210328343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-03-31
AI Technical Summary
Fault diagnosis of the electrical energy metering device is caused by the increase in data samples and complex structure, which leads to the long training time of the model, which affects real-time fault diagnosis. The existing support vector machine model parameter optimization effect is poor, making it difficult to accurately identify the fault.
The improved Haigu Optimization Algorithm is used to optimize the kernel function parameter g and penalty factor C of the support vector machine. Through chaotic sine mapping initialization and wave state adaptive weight update, the support vector machine model is optimized, and the ISOA-SVM fault diagnosis model is built to improve diagnostic efficiency and accuracy.
It improves the identification accuracy and efficiency of fault diagnosis of the electric energy metering device, enhances the accuracy and stability of the fault diagnosis, ensures the accurate and reliable operation of the metering device, and provides convenience for the maintenance of the electric energy metering device.
Smart Images

Figure CN114638170B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fault diagnosis of electric energy metering devices, and in particular relates to a method and system for fault diagnosis of electric energy metering devices based on data mining technology. Background Art
[0002] With the development of social economy, domestic electricity consumption has increased, power grid technology has continued to develop, and the construction of smart grids has become a necessary condition for social production and life. As a device used to measure and record power generation, power consumption, and power loss, the electric energy metering device is an important part of the smart grid. The measurement accuracy and operational reliability of the electric energy metering device play an important role in ensuring fair and just electric energy measurement and safe and stable power grid operation. Therefore, it is necessary to analyze the real-time operating data of the electric energy metering device and accurately diagnose its fault status.
[0003] At present, the fault diagnosis of electric energy metering devices is mainly carried out by processing the user's electricity consumption data, analyzing the potential laws between the fault characteristics and the electricity consumption data, establishing a fault diagnosis model, and realizing accurate identification of the abnormal state of the metering device. The support vector machine (SVM) model is a data mining classification model with good performance. It can classify electric energy metering faults according to known training data and is suitable as a fault diagnosis model for electric energy metering devices. However, with the increase in electricity consumption, the increase in data samples leads to excessive calculation complexity. At the same time, the electric energy metering device has a complex structure and many abnormal working states, which makes the model training time too long, affecting the real-time fault diagnosis of the electric energy metering device. The internal parameter penalty factor C and the kernel function parameter g of the support vector machine directly determine the training efficiency and application effect of the support vector machine. The support vector machine model with randomly generated internal parameters has poor classification effect and cannot accurately diagnose the fault of the electric energy metering device.
[0004] In summary, the complex structure of the electric energy metering system, a large amount of electricity consumption data and various abnormal working conditions have brought difficulties to the fault diagnosis of the electric energy metering device. How to accurately and efficiently diagnose the faults of the electric energy metering device has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present invention provides a method and system for diagnosing faults of electric energy metering devices based on data mining technology. Given the user's electricity consumption data, the fault operation state of the electric energy metering device is diagnosed by using data mining technology. Compared with the existing methods, the accuracy and efficiency of fault diagnosis are higher.
[0006] A first aspect of an embodiment of the present invention provides a fault diagnosis system for an electric energy metering device based on data mining technology, comprising:
[0007] Step 1: Obtain data on different fault states of the electric energy metering device; collect the user's electricity consumption data over a period of time through the metering automation system; the electricity consumption data should include the operating parameters of the electric energy metering device under abnormal working states and normal working states.
[0008] Step 2: Process the fault data of the electric energy metering device, extract key operating parameters and classify the metering fault types;
[0009] Step 3: Construct a fault diagnosis model for electric energy metering devices based on the support vector machine optimized by the improved Seagull optimization algorithm;
[0010] Step 4: training the fault diagnosis model of the electric energy metering device;
[0011] Step 5: Use the electric energy metering device fault diagnosis model to perform fault diagnosis.
[0012] A second aspect of an embodiment of the present invention provides a method for diagnosing a fault of an electric energy metering device based on data mining technology, comprising:
[0013] A data acquisition module is used to obtain different fault data of the electric energy metering device, wherein the different fault data of the electric energy metering device is the power consumption data of the user collected by the metering automation system, wherein part of the data is used as a training sample set of the electric energy metering device for training the fault diagnosis model of the electric energy metering device, and the other part of the data is used as a test sample set of the electric energy metering device for fault diagnosis;
[0014] A data processing module is used to process different fault data of the electric energy metering device, extract key operating parameters and classify metering fault types;
[0015] A fault diagnosis model parameter optimization module is used to optimize the kernel function parameter g and penalty factor C of the support vector machine through the improved seagull algorithm to obtain the fault diagnosis model of the electric energy metering device based on the improved seagull optimization algorithm to optimize the support vector machine; the improved seagull algorithm regards the kernel function parameter g and penalty factor C of the support vector machine as the solution to be optimized, and after the seagull population is initialized based on the chaotic sine mapping, it continuously iterates to find the best, outputs the best seagull individual position (C, g) and substitutes it into the support vector machine model, so as to realize the parameter optimization of the fault diagnosis model;
[0016] The fault diagnosis model training module is used to input the electric energy metering device training sample set data into the electric energy metering device fault diagnosis model to train the electric energy metering device fault diagnosis model.
[0017] The fault diagnosis module is used to input the test sample set data of the electric energy metering device into the fault diagnosis model, output the fault type label, obtain the fault diagnosis result, and determine whether the electric energy metering device has a fault and the fault type.
[0018] The specific steps of the electric energy metering device fault diagnosis method based on data mining technology of the present invention are:
[0019] (1) Obtaining data on different fault states of electric energy metering devices
[0020] The user's electricity consumption data over a period of time is collected through the metering automation system; the electricity consumption data includes the operating parameters of the electric energy metering device under abnormal working conditions and normal working conditions.
[0021] (2) Processing fault data of electric energy metering devices, extracting key operating parameters and classifying the operating status of electric energy metering devices
[0022] 1) Clean the collected electricity consumption data to remove incomplete data with incomplete collection and operation parameters;
[0023] 2) Extract key operating parameters that are closely related to the failure of the electric energy metering device as input data of the support vector machine model; wherein the key operating parameters include: the phase voltage between phases A and B of the electric energy metering device, the phase current of phase A, the current and voltage of the metering unit, and the detection signal of the secondary side of the current transformer in the metering device.
[0024] 3) According to the collected electricity consumption data, the operating status of the electric energy metering device is classified, and corresponding classification labels are set, that is, each operating status corresponds to a number, and the fault type label is used as the output data of the support vector machine model; wherein, the fault operating status of the electric energy metering device includes: primary side short circuit of the current transformer, front end short circuit of the secondary side of the current transformer, rear end short circuit of the secondary side of the current transformer, secondary phase-to-phase short circuit of the current transformer and open circuit of the voltage transformer.
[0025] (3) Construct a fault diagnosis model for electric energy metering devices based on the support vector machine optimized by the improved Seagull optimization algorithm
[0026] The improved seagull optimization (ISOA) algorithm is used to optimize the internal parameter penalty factor C and kernel function parameter g of the support vector machine (SVM). When optimizing the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device, the seagull individual represents the candidate solution of the internal parameters of the SVM model, the seagull group represents the solution set generated by the internal parameters of the SVM model, and the individual position with the best fitness in the seagull population represents the optimal solution of the internal parameters (C, g) of the support vector machine model.
[0027] The ISOA algorithm is used to optimize the SVM model, and the objective function Obj of the algorithm is set as the accuracy of fault diagnosis of the electric energy metering device:
[0028]
[0029] Where Num.right is the number of data with correct fault diagnosis of the model; Num.total is the total number of data involved in fault diagnosis.
[0030] The specific steps of optimizing the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device using the improved Seagull optimization algorithm are as follows:
[0031] 1) Seagull population initialization based on chaotic sine mapping;
[0032] The population size and the maximum number of iterations are determined, and the seagull population is initialized using chaotic sine mapping to obtain the position of the initialized seagull.
[0033] The expression of chaotic sine map is:
[0034]
[0035] In the formula, g n+1 is the SVM kernel function parameter to be optimized, δ is the control factor, and its value range is [0, 4], x n is a chaotic variable, n=1, 2, ..., n.
[0036] 2) Calculate and evaluate individual fitness values to obtain the global optimal individual;
[0037] The fitness of each seagull position in the initial seagull group is calculated and sorted to find the seagull position with the best fitness. The fitness function Fit of the present invention is the objective function Obj, as shown below:
[0038]
[0039] 3) Update the migration positions of individual seagulls;
[0040] The migration behavior of individual seagulls represents the global search process in the algorithm. The internal parameters of the fault diagnosis model of the electric energy metering device should not be the same. The seagull individual corresponding to each internal parameter candidate solution updates the current individual position according to the best individual position.
[0041] The migration position update formula of individual seagulls is:
[0042] A new =A·X s (iter)
[0043] A=f c -(f c (iter / T)
[0044] D best =B·(X best (iter)-X p (iter))
[0045] B = 2 × A 2 ×rand
[0046] R dis =|A new +D best |
[0047] In the formula, A new represents the updated position of the seagull individual corresponding to the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device, X p (iter) represents the current position of the seagull individual, A represents the movement behavior of the seagull individual in the search space, and is used to calculate the update of the variable, f c represents the coefficient used to control the frequency of use of variable A, iter represents the current number of iterations, T represents the maximum number of iterations, B represents a random number for global search and local development of the balance algorithm, rand is a random number in the range of (0, 1), and D best Indicates the direction of the optimal seagull individual location, X best (iter) represents the position of the current optimal seagull individual, R dis Represents the distance between the seagull individual and the optimal seagull individual.
[0048] 4) Update the attack position of individual seagulls;
[0049] The attack behavior of individual seagulls represents the local development process in the algorithm. The update formula of the attack position of individual seagulls in space is:
[0050]
[0051]
[0052] X p (iter)=(R dis u·v·w)+X best (iter)
[0053] Where u, v and w represent the movement behavior of individual seagulls in three-dimensional space, r represents the radius of each spiral line when the attack position of individual seagulls is updated, is a random number in the range [0, 2π], k and j represent constants that define the shape of the spiral, and e is the base of the natural logarithm.
[0054] 5) Introduce wave state adaptive weights to update individual seagull positions;
[0055] The wave state adaptive weight S is introduced into the position update formula of the seagull individual, and the position of the seagull individual is updated according to the optimal individual position.
[0056] The expression for updating the individual position of seagulls is:
[0057] X p (iter)=(R dis ×u×v×w)+S×X best (iter)
[0058] Where S is the wave state adaptive weight.
[0059] 6) Update the global optimal position of the seagull group;
[0060] Calculate the fitness of each seagull's position after the position update and sort them, find the seagull position with the best current fitness, and use it as the global optimal position of the seagull group.
[0061] 7) Determine whether the end condition of the algorithm is met;
[0062] Check whether the algorithm has reached the maximum number of iterations and determine whether the algorithm's end condition is met. If the maximum number of iterations is reached, the algorithm ends and executes step 8). If the maximum number of iterations is not reached, the next iteration begins and steps 3) to 6) are repeated to continue searching for parameters.
[0063] 8) Output the best individual seagull position (C, g) and optimize the support vector machine
[0064] The best individual seagull position (C, g) after optimization by the improved seagull algorithm is output, and the best kernel function parameter g and penalty factor C are obtained, that is, the optimal solution for the internal parameters of the fault diagnosis model of the electric energy metering device.
[0065] Substitute the optimally selected C and g into the SVM model to obtain the fault diagnosis model of electric energy metering device based on improved Seagull optimization algorithm optimized support vector machine (ISOA-SVM).
[0066] (4) Training the fault diagnosis model of the electric energy metering device
[0067] The processed data of different fault states of electric energy metering devices are used as training sample sets, and the training sample set data are input into the ISOA-SVM electric energy metering device fault diagnosis model to train the electric energy metering device fault diagnosis model.
[0068] (5) Fault diagnosis using the fault diagnosis model of the electric energy metering device
[0069] The ISOA-SVM electric energy metering device fault diagnosis model is used for fault diagnosis. The electric energy metering device data that needs to be diagnosed is input, the fault type label is output, and the fault diagnosis result is obtained to determine whether a fault occurs and the fault type.
[0070] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0071] (1) The embodiment of the present invention provides a method and system for fault diagnosis of electric energy metering devices based on data mining technology. By improving the kernel function parameter g and penalty factor C of the support vector machine optimized by the improved Seagull algorithm, a fault diagnosis model of electric energy metering devices based on the improved Seagull optimization algorithm optimized support vector machine (ISOA-SVM) is constructed. The ISOA-SVM fault diagnosis model is used to mine and classify the collected electricity consumption data to achieve fault diagnosis of the electric energy metering device. Compared with the existing model, the ISOA-SVM fault diagnosis model has higher recognition accuracy and recognition efficiency for the operating status of the electric energy metering device, which is conducive to improving the fault diagnosis accuracy and stability of the electric energy metering device, ensuring the accurate, reliable and normal operation of the metering device, and providing convenience for the maintenance of the electric energy metering device.
[0072] (2) The present invention introduces a sinusoidal chaos mapping initialization strategy and a wave state adaptive weight into the traditional seagull algorithm, making it more suitable for the optimization problem of the fault diagnosis model of the electric energy metering device. The introduction of the sinusoidal chaos mapping to initialize the seagull population, the randomness and non-repetitive ergodicity of the chaotic sequence enable the seagull population to achieve a better distribution during the initialization process, and improve the optimization characteristics of the seagull optimization algorithm; the introduction of the wave state adaptive weight to update the individual positions of the seagulls avoids local rigidity during the individual update process, making the algorithm have a higher convergence accuracy, which is conducive to optimizing the fault diagnosis model of the electric energy metering device and improving the accuracy of fault diagnosis.
[0073] (3) The electric energy metering device fault diagnosis method and system design based on data mining technology of the present invention are reasonable, and the constructed ISOA-SVM electric energy metering device fault diagnosis model is not limited to the fault diagnosis of a specific type of simple electric energy metering device, but is suitable for the fault diagnosis of electric energy metering devices with complex abnormal working conditions. The present invention provides a new idea for realizing accurate and efficient fault diagnosis of electric energy metering devices, which is conducive to maintaining fair and just electric energy metering and safe and stable power grid operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 It is a flow chart of a method for diagnosing faults in an electric energy metering device based on data mining technology provided by an embodiment of the present invention.
[0075] Figure 2 It is a schematic diagram of an electric energy metering device provided in an embodiment of the present invention.
[0076] Figure 3 It is a schematic diagram of a process of optimizing a support vector machine model using an improved Seagull optimization algorithm provided in an embodiment of the present invention.
[0077] Figure 4This is a diagram of the fault diagnosis results of the ISOA-SVM model provided by an embodiment of the present invention.
[0078] Figure 5 It is a structural schematic diagram of a fault diagnosis system for an electric energy metering device based on data mining technology provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0079] In order to illustrate the technical solution of the present invention, specific embodiments will be described below in conjunction with the accompanying drawings.
[0080] The embodiment of the present invention provides a method for diagnosing faults of an electric energy metering device based on data mining technology. Figure 1 As shown, the method comprises the following steps:
[0081] (1) Obtain data on different fault states of electric energy metering devices;
[0082] The user's electricity consumption data over a period of time is collected through the metering automation system; the electricity consumption data includes the operating parameters of the electric energy metering device under abnormal working conditions and normal working conditions.
[0083] (2) Processing the fault data of the electric energy metering device, extracting the key operating parameters and classifying the operating status of the electric energy metering device;
[0084] 1) Clean the collected electricity consumption data to remove incomplete data with incomplete collection and operation parameters;
[0085] 2) Extract key operating parameters that are closely related to the failure of the electric energy metering device as input data of the support vector machine model; wherein the key operating parameters include: the phase voltage between phases A and B of the electric energy metering device, the phase current of phase A, the current and voltage of the metering unit, and the detection signal of the secondary side of the current transformer in the metering device.
[0086] In the embodiment of the present invention, eight key operating parameters closely related to the failure of the electric energy metering device are extracted, namely, U AB ,I A ,I a ,I b , U a , U b 、u a '、u b ', the basic structure of the electric energy metering device is as follows Figure 2 As shown; among them, U AB Indicates the phase voltage between phases A and B, I A Indicates the phase current of phase A, I a ,I b express Figure 2 Current of metering units 1 and 2, U a, U b Indicates the voltage of metering units 1 and 2, u a '、u b ' respectively represent the detection signals of the secondary side of the current transformer in the metering system, CT1 represents current transformer 1, CT2 represents current transformer 2, PT1 represents voltage transformer 1, and PT2 represents voltage transformer 2.
[0087] 3) According to the collected electricity consumption data, the operating status of the electric energy metering device is classified, and corresponding classification labels are set, that is, each operating status corresponds to a number, and the fault type label is used as the output of the support vector machine model; wherein, the fault operating status of the electric energy metering device includes: primary side short circuit of the current transformer, front end short circuit of the secondary side of the current transformer, rear end short circuit of the secondary side of the current transformer, secondary phase-to-phase short circuit of the current transformer and open circuit of the voltage transformer.
[0088] In an embodiment of the present invention, the operating status of the electric energy metering device is divided into 10 types, including a normal working status and nine abnormal working statuses; wherein the abnormal working statuses include: CT1 primary side short circuit, CT2 primary side short circuit, CT1 secondary side rear end short circuit, CT2 secondary side rear end short circuit, CT1 secondary side front end short circuit, CT2 secondary side front end short circuit, CT secondary phase short circuit, PT1 open circuit and PT2 open circuit. These 10 operating statuses are used as classification labels, each operating status corresponds to a number, and the support vector machine fault diagnosis model outputs a number to determine the corresponding operating status, thereby realizing fault diagnosis of the electric energy metering device.
[0089] The names of the operating states of the electric energy metering device in the embodiment of the present invention and their corresponding classification labels are shown in Table 1:
[0090] Table 1 Classification results of operating status of electric energy metering devices
[0091]
[0092] (3) Construct a fault diagnosis model for electric energy metering devices based on the support vector machine optimized by the improved Seagull optimization algorithm;
[0093] In an embodiment of the present invention, in order to meet the accuracy requirements of fault diagnosis of electric energy metering devices, an improved Seagull Optimization (ISOA) algorithm is used to optimize the internal parameter penalty factor C and kernel function parameter g of a support vector machine (SVM), and the internal parameters (C, g) with the best fault diagnosis effect are output and substituted into the SVM model to obtain an ISOA-SVM model for fault diagnosis of electric energy metering devices.
[0094] The Seagull Optimization Algorithm (SOA) is a new type of optimization algorithm that solves the problem to be optimized by simulating the migration and attack behavior of seagulls. In the embodiment of the present invention, the individual positions of seagulls represent candidate solutions to the problem of optimizing the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device, and the individual positions with the best fitness in the seagull population represent the optimal solutions to the internal parameters (C, g) of the support vector machine model.
[0095] The ISOA algorithm is used to optimize the SVM model, and the objective function Obj of the algorithm is set as the accuracy of fault diagnosis of the electric energy metering device:
[0096]
[0097] Where Num.right is the number of data with correct fault diagnosis of the model; Num.total is the total number of data involved in fault diagnosis.
[0098] Figure 3 The process of optimizing the support vector machine model by improving the seagull optimization algorithm in the embodiment of the present invention is as follows: start → initialize the seagull population based on chaotic sine mapping → calculate and evaluate the individual fitness value to obtain the global optimal individual → start iteration → update the migration position of the seagull individual → update the attack position of the seagull individual → introduce the wave state adaptive weight to update the position of the seagull individual → update the global optimal position of the seagull group → whether the algorithm end condition is met? → No, increase the number of iterations by 1 and start the next iteration; Yes, end and output the best seagull individual position (C, g) → optimize the support vector machine model → end.
[0099] The specific steps of constructing the fault diagnosis model of the electric energy metering device based on the improved Seagull optimization algorithm to optimize the support vector machine are:
[0100] 1) Seagull population initialization based on chaotic sine mapping;
[0101] The population size and the maximum number of iterations are determined, and the seagull population is initialized using chaotic sine mapping to obtain the positions of the initialized seagulls. In the embodiment of the present invention, the population size is 50, and the maximum number of iterations is 500.
[0102] The method of the present invention introduces a chaotic sine mapping initialization strategy. The chaotic sequence has the characteristics of randomness and non-repetitive ergodicity, so that the seagull group can achieve better spatial distribution during the initialization process, and improves the global optimization ability and convergence characteristics of the seagull optimization algorithm.
[0103] The expression of the chaotic sine map is:
[0104]
[0105] In the formula, gn+1 is the SVM kernel function parameter to be optimized, δ is the control factor, and its value range is [0, 4], x n is a chaotic variable, n=1, 2, ..., n.
[0106] 2) Calculate and evaluate individual fitness values to obtain the global optimal individual;
[0107] According to the fitness function, the fitness of each seagull position in the initial seagull group is calculated and sorted to find the seagull individual with the best fitness. In the embodiment of the present invention, the fitness function Fit is the objective function Obj, as shown in formula (3):
[0108]
[0109] Where Num.right is the number of data with correct fault diagnosis of the model; Num.total is the total number of data involved in fault diagnosis.
[0110] 3) Update the migration positions of individual seagulls;
[0111] The migration behavior of individual seagulls represents the global search process in the algorithm. Each candidate solution of the internal parameters of the fault diagnosis model of the electric energy metering device should not be the same. The seagull individual corresponding to each candidate solution of the internal parameters updates the current individual position according to the best individual position.
[0112] The migration position update formula of individual seagulls is:
[0113] A new =A·X s (iter) (4)
[0114] A=f c -(f c ·(iter / T)) (5)
[0115] D best =B·(X best (iter)-X p (iter)) (6)
[0116] B = 2 × A 2 ×rand (7)
[0117] R dis =|A new +D best | (8)
[0118] In the formula, A new represents the updated position of the seagull individual corresponding to the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device, X p(iter) represents the current position of the seagull individual, represents the current value of the internal parameters of the support vector machine model, A represents the movement behavior of the seagull individual in the search space, and is used to calculate the update of the variable, f c represents the coefficient used to control the frequency of use of variable A, iter represents the current number of iterations, T represents the maximum number of iterations, B represents a random number for global search and local development of the balance algorithm, rand is a random number in the range of (0, 1), and D best Indicates the direction of the optimal seagull individual location, X best (iter) represents the position of the current optimal seagull individual, R dis Represents the distance between the seagull individual and the optimal seagull individual.
[0119] 4) Update the attack position of individual seagulls;
[0120] The attack behavior of individual seagulls represents the local development process in the algorithm. The update formula of the attack position of individual seagulls in space is:
[0121]
[0122]
[0123] X p (iter)=(R dis u·v·w)+X best (iter) (11)
[0124] Where u, v and w represent the movement behavior of individual seagulls in three-dimensional space, r represents the radius of each spiral when the attack position of the individual seagull is updated, φ is a random number in the range of [0, 2π], k and j represent constants that define the spiral shape, and e is the base of the natural logarithm.
[0125] 5) Introduce wave state adaptive weights to update individual seagull positions;
[0126] The present invention introduces a wave state adaptive weight S into the position update formula of the seagull individual, updates the position of the seagull individual according to the optimal individual position, avoids falling into local rigidity during the individual update process, and improves the search efficiency of the optimal parameters.
[0127] The expression for updating the individual position of the seagull is:
[0128] X p (iter)=(R dis ×u×v×w)+S×X best (iter) (12)
[0129] Where S is the wave state adaptive weight.
[0130] 6) Update the global optimal position of the seagull group;
[0131] According to formula (3), the fitness of each seagull position after the position update is calculated and sorted, and the seagull position with the best current fitness is found and used as the global optimal position of the seagull group.
[0132] 7) Determine whether the end condition of the algorithm is met;
[0133] In the embodiment of the present invention, it is checked whether the number of iterations of the algorithm reaches 500 times to determine whether the end condition of the algorithm is met. If the maximum number of iterations is 500, the algorithm ends and step 8) is executed. If the maximum number of iterations is not reached, the next iteration is started and steps 3) to 6) are repeated to continue searching parameters.
[0134] 8) Output the best individual seagull position (C, g) and optimize SVM
[0135] The best individual seagull position (C, g) after optimization by the improved seagull algorithm is output, and the best kernel function parameter g and penalty factor C are obtained, that is, the optimal solution for the internal parameters of the fault diagnosis model of the electric energy metering device.
[0136] The optimally obtained C and g are substituted into the SVM model to obtain an electric energy metering device fault diagnosis model based on the improved Seagull optimization algorithm optimized support vector machine (ISOA-SVM), wherein the input of the ISOA-SVM electric energy metering device fault diagnosis model is: key operating parameters closely related to the electric energy metering device fault obtained from the user's electricity consumption data; the output of the ISOA-SVM electric energy metering device fault diagnosis model is: classification labels corresponding to the faulty operating states of the electric energy metering device.
[0137] (4) Training the fault diagnosis model of the electric energy metering device
[0138] In an embodiment of the present invention, 480 groups of data are randomly selected from multiple groups of 10 working status data of electric energy metering devices that have been processed as sample sets, and the sample sets are divided into the first 400 groups of data as training sample sets and the last 80 groups of data as test sample sets.
[0139] Eight key operating parameters in the training sample set data that are closely related to the fault of the electric energy metering device are input into the ISOA-SVM electric energy metering device fault diagnosis model to train the electric energy metering device fault diagnosis model; the key operating parameters include: AB ,I A ,I a ,I b , U a , U b 、u a'、u b '.
[0140] (5) Fault diagnosis using the fault diagnosis model of the electric energy metering device
[0141] The ISOA-SVM electric energy metering device fault diagnosis model is used for fault diagnosis. The electric energy metering device data that needs to be diagnosed is input, the fault type label is output, and the fault diagnosis result is obtained to determine whether a fault occurs and the fault type.
[0142] In the embodiment of the present invention, eight key operating parameters in the test sample set data that are closely related to the fault of the electric energy metering device are input into the ISOA-SVM electric energy metering device fault diagnosis model, and the key operating parameters include: AB ,I A ,I a ,I b , U a , U b 、u a '、u b '; Output the fault type label and obtain the fault diagnosis result. Figure 4 It is a diagram of the fault diagnosis results of the ISOA-SVM model provided by an embodiment of the present invention; wherein the horizontal axis is the electricity consumption data label, corresponding to 80 groups of test sample data, and the vertical axis is the fault type label, indicating the corresponding classification labels of 10 types of operating states of electric energy metering devices.
[0143] Figure 4 The comparison results of actual fault types and fault diagnosis types of the electric energy metering device according to the embodiment of the present invention are shown. Among 80 groups of data, only 5 groups were misdiagnosed. The fault diagnosis accuracy of the ISOA-SVM model was calculated to be 93.75%, which proves that the ISOA-SVM model has high accuracy in fault diagnosis of electric energy metering devices. It further illustrates that the electric energy metering device fault diagnosis method based on data mining technology of the present invention can accurately distinguish complex fault types and has more advantages in solving the fault diagnosis problem of electric energy metering devices.
[0144] The embodiment of the present invention also provides a fault diagnosis system for electric energy metering device based on data mining technology, such as Figure 5 As shown, the system includes: a data acquisition module S100, a data processing module S200, a fault diagnosis model parameter optimization module S300, a fault diagnosis model training module S400 and a fault diagnosis module S500.
[0145] The data acquisition module S100 is used to obtain different fault data of the electric energy metering device. The different fault data of the electric energy metering device is the electricity consumption data of the user collected by the metering automation system. Part of the data is used as a training sample set of the electric energy metering device for training the fault diagnosis model of the electric energy metering device, and the other part of the data is used as a test sample set of the electric energy metering device for fault diagnosis.
[0146] The data processing module S200 is used to process different fault data of the electric energy metering device, extract key operating parameters and classify metering fault types; wherein the key operating parameters include: the phase voltage between phases A and B of the electric energy metering device, the phase current of phase A, the current and voltage of the metering unit, and the detection signal of the secondary side of the current transformer in the metering device; the metering fault types include: primary side short circuit of the current transformer, front end short circuit of the secondary side of the current transformer, rear end short circuit of the secondary side of the current transformer, secondary phase-to-phase short circuit of the current transformer and open circuit of the voltage transformer.
[0147] The fault diagnosis model parameter optimization module S300 is used to optimize the kernel function parameter g and penalty factor C of the support vector machine through the improved seagull algorithm to obtain the fault diagnosis model of the electric energy metering device based on the support vector machine optimized by the improved seagull optimization algorithm; wherein, the improved seagull algorithm regards the kernel function parameter g and penalty factor C of the support vector machine as the solution to be optimized, and after the seagull population is initialized based on the chaotic sine mapping, it continuously iterates to find the optimal solution, outputs the optimal seagull individual position (C, g) and substitutes it into the support vector machine model, so as to realize the parameter optimization of the fault diagnosis model;
[0148] The fault diagnosis model training module S400 is used to input the electric energy metering device training sample set data into the electric energy metering device fault diagnosis model to train the electric energy metering device fault diagnosis model.
[0149] The fault diagnosis module S500 is used to input the test sample set data of the electric energy metering device into the fault diagnosis model, output the fault type label, obtain the fault diagnosis result, and determine whether the electric energy metering device has a fault and the fault type.
[0150] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific embodiments. Any other embodiments derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.
Claims
1. A method for fault diagnosis of electric energy metering device based on data mining technology, characterized in that: include: Step 1: Obtain data on different fault states of the electric energy metering device; The user's electricity consumption data over a period of time is collected through the metering automation system; the electricity consumption data should include the operating parameters of the energy metering device under abnormal working conditions and normal working conditions; Step 2: Process the fault data of the electric energy metering device, extract key operating parameters and classify the metering fault types; Step 3: Construct a fault diagnosis model for electric energy metering devices based on the support vector machine optimized by the improved Seagull optimization algorithm; Step 4: training the fault diagnosis model of the electric energy metering device; Step 5: Use the fault diagnosis model of the electric energy metering device to perform fault diagnosis; The specific implementation method of step 2 is: Clean the collected electricity consumption data to remove incomplete data with incomplete collection and operation parameters; Extract key operating parameters closely related to the failure of the electric energy metering device as input data of the support vector machine model; wherein the key operating parameters include: the phase voltage between phases A and B of the electric energy metering device, the phase current of phase A, the current and voltage of the metering unit, and the detection signal of the secondary side of the current transformer in the metering device; According to the collected power consumption data, the operating status of the electric energy metering device is classified and the corresponding classification label is set, that is, each operating status corresponds to a number, and the fault type label is used as the output of the support vector machine model; wherein the fault operating status of the electric energy metering device includes: primary side short circuit of the current transformer, front end short circuit of the secondary side of the current transformer, rear end short circuit of the secondary side of the current transformer, secondary phase short circuit of the current transformer and open circuit of the voltage transformer; The specific implementation method of step three is: Step (1): using an improved seagull optimization algorithm to optimize the internal parameters of the support vector machine, the internal parameters include a penalty factor C and a kernel function parameter g; wherein the seagull individual represents a candidate solution for the internal parameters of the support vector machine model, the seagull population represents a solution set generated by the internal parameters of the support vector machine model, and the individual position with the best fitness in the seagull population represents the optimal solution for the internal parameters (C, g) of the support vector machine model; Step (2): Substitute the optimal internal parameters (C, g) into the support vector machine model to obtain the fault diagnosis model of the electric energy metering device based on the support vector machine optimized by the improved Seagull optimization algorithm; The specific implementation method of step (1) is: 1) Set the objective function Obj of the improved Seagull optimization algorithm as the accuracy of fault diagnosis of the electric energy metering device: In the formula, Num.right is the number of data with correct fault diagnosis of the model; Num.total is the total number of data involved in fault diagnosis 2) Seagull population initialization based on chaotic sine mapping; Determine the population size and the maximum number of iterations, use chaotic sine mapping to initialize the seagull population, and obtain the position of the initialized seagull; The expression of chaotic sine map is: In the formula, g n+1 is the SVM kernel function parameter to be optimized, δ is the control factor, and its value range is [0, 4], x n is a chaotic variable, n=1, 2, ..., n; 3) Calculate and evaluate individual fitness values to obtain the global optimal individual; Calculate the fitness of each seagull position in the initial group of seagulls and sort them to find the seagull position with the best fitness; the fitness function Fit is the objective function Obj, as shown below: 4) Update the migration positions of individual seagulls; The migration behavior of seagull individuals represents the global search process in the algorithm. The internal parameters of the fault diagnosis model of the electric energy metering device should not be the same. The seagull individuals corresponding to each candidate solution of the internal parameters update the current individual position according to the best individual position. The migration position update formula of individual seagulls is: A new =A·X p (iter) A=f c -(f c ·(iter / T)) D best =B·(X best (iter)-X p (iter)) B=2×A 2 ×rand R dis =|A new +D best | In the formula, A new represents the updated position of the seagull individual corresponding to the internal parameters (C, g) of the fault diagnosis model of the electric energy metering device, X p (iter) represents the current position of the seagull individual, A represents the movement behavior of the seagull individual in the search space, and is used to calculate the update of the variable, f c represents the coefficient used to control the frequency of use of variable A, iter represents the current number of iterations, T represents the maximum number of iterations, B represents a random number for global search and local development of the balance algorithm, rand is a random number in the range of (0, 1), and D best Indicates the direction of the optimal seagull individual location, X best (iter) represents the position of the current optimal seagull individual, R dis represents the distance between the seagull individual and the optimal seagull individual; 5) Update the attack position of individual seagulls; The attack behavior of individual seagulls represents the local development process in the algorithm. The attack position update formula of individual seagulls in space is: X p (iter)=(R dis u·v·w)+X best (iter) Where u, v and w represent the movement behavior of individual seagulls in three-dimensional space, r represents the radius of each spiral line when the attack position of individual seagulls is updated, is a random number in the range [0, 2π], k and j represent constants defining the spiral shape, and e is the base of the natural logarithm; 6) Introduce wave state adaptive weights to update individual seagull positions; The wave state adaptive weight S is introduced into the position update formula of the seagull individual, and the position of the seagull individual is updated according to the optimal individual position; The expression for updating the individual position of seagulls is: X p (iter)=(R dis ×u×v×w)+S×X best (iter) Where S is the wave state adaptive weight; 7) Update the global optimal position of the seagull group; Calculate the fitness of each seagull position after the position update and sort them, find the seagull position with the best current fitness, and use it as the global optimal position of the seagull group; 8) Determine whether the end condition of the algorithm is met; Check whether the algorithm has reached the maximum number of iterations and determine whether the end condition of the algorithm is met; if the maximum number of iterations is reached, the algorithm ends and step 9) is executed; if the maximum number of iterations is not reached, the next iteration is started and steps 4) to 7) are repeated to continue searching parameters; 9) Output the best individual seagull position (C, g) and optimize the support vector machine; Output the best individual seagull position (C, g) after the improved seagull algorithm is optimized, and the best kernel function parameter g and penalty factor C are obtained, that is, the optimal solution of the internal parameters of the fault diagnosis model of the electric energy metering device; The specific implementation method of step 4 is: The data of different fault states of the electric energy metering device after data processing are used as training sample sets, and the training sample set data are input into the electric energy metering device fault diagnosis model based on the support vector machine optimized by the improved Seagull optimization algorithm to train the electric energy metering device fault diagnosis model; The specific implementation method of step five is: Fault diagnosis is performed using the fault diagnosis model of electric energy metering devices based on the improved Seagull optimization algorithm to optimize support vector machine. The data of the electric energy metering device that needs fault diagnosis is input, the fault type label is output, the fault diagnosis result is obtained, and it is determined whether a fault occurs and the fault type.
2. A fault diagnosis system for electric energy metering device based on data mining technology, characterized in that: For executing the method according to claim 1, comprising: A data acquisition module is used to obtain different fault data of the electric energy metering device, wherein the different fault data of the electric energy metering device is the power consumption data of the user collected by the metering automation system, wherein part of the data is used as a training sample set of the electric energy metering device for training the fault diagnosis model of the electric energy metering device, and the other part of the data is used as a test sample set of the electric energy metering device for fault diagnosis; A data processing module is used to process different fault data of the electric energy metering device, extract key operating parameters and classify the metering fault types; A fault diagnosis model parameter optimization module is used to optimize the kernel function parameter g and penalty factor C of the support vector machine through the improved seagull algorithm to obtain the fault diagnosis model of the electric energy metering device based on the improved seagull optimization algorithm to optimize the support vector machine; the improved seagull algorithm regards the kernel function parameter g and penalty factor C of the support vector machine as the solution to be optimized, and after the seagull population is initialized based on the chaotic sine mapping, the wave state adaptive weight is introduced to update the position, and the optimal position (C, g) of the best seagull individual is output and substituted into the support vector machine model to achieve the parameter optimization of the fault diagnosis model; A fault diagnosis model training module is used to input the electric energy metering device training sample set data into the electric energy metering device fault diagnosis model to train the electric energy metering device fault diagnosis model; The fault diagnosis module is used to input the test sample set data of the electric energy metering device into the fault diagnosis model, output the fault type label, obtain the fault diagnosis result, and determine whether the electric energy metering device has a fault and the fault type.
