Phase identification method and device for single-phase meter users
By acquiring and preprocessing data in the power consumption information collection system, using the current fluctuation consistency and voltage mutual information gain ratio models combined with the classification decision tree model, the phase problems caused by no power and consistent terminal phase voltage fluctuations in the existing technology are solved. It solves the problem of inaccurate identification and improves the identification accuracy and efficiency.
Patent Information
- Application Number
- CN202410798227.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-20
Smart Images

Figure CN118364417B
Abstract
Description
Technical Field
[0001] The invention relates to the field of electric power technology application, and in particular to a phase identification method and device for a single-phase meter user. Background Art
[0002] The existing phase identification is mainly achieved by home detection with a transformer identification instrument or by installing a high-speed power line carrier (HPLC) low-voltage power line high-speed carrier communication module in the electric energy meter. However, home detection is time-consuming and labor-intensive, and the transformer identification instrument has a limit on the distance between the terminal and the user's electric energy meter. If the distance is too large, the phase cannot be detected; and installing HPLC has a certain cost, and the concentrator program has multiple versions, poor compatibility, and strong dependence on module solutions.
[0003] Although the result data obtained by traditional substation detectors for phase identification is accurate and reliable, the work of home detection is very cumbersome. It not only includes the installation of terminal identification instruments, but also includes the search and phase detection of each electric energy meter in the power user's residence. When there are many meters in the substation, it requires a lot of time and effort.
[0004] HPLC module detection also has the problem of home installation, and even if the installation is completed, there may be situations where phase information cannot be identified due to signal problems, and the identified phase information cannot be guaranteed to be 100% accurate.
[0005] Currently, no effective solution has been proposed to address the problem that related technologies cannot identify phases due to lack of electricity and that the phase voltage fluctuations of the terminal itself are highly consistent, resulting in inaccurate identification. Summary of the invention
[0006] In order to solve the above technical problems, the embodiments of the present invention hope to provide a phase identification method and device for single-phase meter users, so as to at least solve the problem that the related technology cannot identify the phase due to lack of electricity and the terminal's own phase voltage fluctuations are highly consistent and thus inaccurate.
[0007] The technical solution of the present invention is achieved in this way:
[0008] An embodiment of the present invention provides a phase identification method for single-phase meter users, comprising: obtaining user and terminal load data and user and terminal archive data collected daily in an electricity consumption information collection system; performing data preprocessing on the load data and archive data to obtain preprocessed load data and archive data; inputting the preprocessed load data and archive data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification to obtain an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; associating and merging the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, taking the actual phase of the electric energy meter as the target variable, establishing a classification decision tree model, and obtaining the optimal strategy model output phase according to the classification decision tree model.
[0009] Optionally, obtaining user and terminal load data collected daily in the electricity consumption information collection system and archival data of users and terminals includes: obtaining user and terminal load data collected daily in a preset number of days and archival data of users and terminals through the electricity consumption information collection system.
[0010] Optionally, data preprocessing is performed on the load data and the archive data to obtain the preprocessed load data and the archive data, including: removing the values of repeated current and voltage records in the load data and the archive data to obtain deduplicated load data and the archive data; identifying and correcting the current and voltage in the deduplicated load data and the archive data according to the abnormality type to obtain repaired load data and the archive data; converting the user current and voltage in the repaired load data and the archive data, and the terminal A / B / C phase current and voltage into primary side current and voltage data according to a preset formula, and generating the current change of the user and the terminal based on the current change at the previous and next time points to obtain the preprocessed load data and the archive data.
[0011] Further, optionally, the preprocessed load data and archive data are input into a current fluctuation consistency recognition model for recognition, and the recognition phase output by the current fluctuation consistency recognition model is obtained, including: inputting the processed load data and archive data into the current fluctuation consistency recognition model, and calculating the fluctuation index of the user and the terminal in the same direction of A / B / C; calculating the number of same-direction fluctuations of the user and terminal currents through the current fluctuation consistency recognition model based on the A / B / C same-direction fluctuation index, and determining the phase at which the maximum value occurs as the recognition phase.
[0012] Optionally, the preprocessed load data and archive data are input into a voltage mutual information gain ratio recognition model for recognition, and the recognition phase output by the voltage mutual information gain ratio recognition model is obtained, including: inputting the preprocessed load data and archive data into the voltage mutual information gain ratio recognition model, calculating the phase with the largest mutual information gain ratio between the user and the terminal based on the load data in the user and the terminal and the voltage in the archive data, and obtaining the recognition phase.
[0013] Further, optionally, the preprocessed load data and archive data are input into the voltage mutual information gain ratio recognition model, and the phase with the largest mutual information gain ratio between the user and the terminal is calculated based on the load data in the user and the terminal and the voltage in the archive data, to obtain the recognition phase, including: inputting the preprocessed load data and archive data into the voltage mutual information gain ratio recognition model to calculate the information entropy of the user's voltage and the information entropy of the A / B / C phase voltage of the terminal; calculating the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal based on the information entropy of the user's voltage and the information entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model; calculating the mutual information between the A / B / C phases of the user and the terminal based on the information entropy of the user's voltage, the information entropy of the A / B / C phase voltage of the terminal, the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model; calculating the mutual information between the A / B / C phases of the user and the terminal based on the mutual information between the A / B / C phases of the user and the terminal; calculating the mutual information gain ratio based on the mutual information between the A / B / C phases of the user and the terminal; taking the phase with the largest mutual information gain ratio as the recognition phase, and outputting the gain ratio increase value of the phase compared to other phases.
[0014] Optionally, obtaining the optimal strategy model output phase based on the classification decision tree model includes: dividing the sample set into a training set and a validation set according to a preset ratio; training the classification decision tree model with the training set to obtain a trained classification decision tree model; verifying the validation set phase by inputting the trained classification decision tree model into the validation set, and calculating the model accuracy; and obtaining the optimal strategy model output phase through the trained classification decision tree model.
[0015] Furthermore, optionally, training the classification decision tree model with the training set to obtain the trained classification decision tree model includes: selecting nodes for sorting the training set according to the Gini coefficient, selecting the feature with the smallest Gini coefficient as the root node, splitting the data set, and establishing left and right child nodes; recursively calling the Gini coefficient algorithm for the left and right child nodes, splitting the left and right child nodes, and establishing new child nodes; and training the classification decision tree model by setting a pruning strategy to obtain a trained classification decision tree model.
[0016] The embodiment of the present invention provides a phase identification device for single-phase meter users, comprising: a data source, used to obtain user and terminal load data collected daily in an electricity consumption information collection system and archival data of users and terminals; a data preprocessing module, used to perform data preprocessing on load data and archival data to obtain preprocessed load data and archival data; a phase identification model library, used to input the preprocessed load data and archival data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification, to obtain an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; a phase output module, used to associate and merge the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, take the actual phase of the electric energy meter as the target variable, establish a classification decision tree model, and obtain the optimal strategy model output phase according to the classification decision tree model.
[0017] Optionally, a data source is used to obtain user and terminal load data collected daily on preset days and archival data of users and terminals through an electricity consumption information collection system.
[0018] The embodiment of the present invention provides a phase identification method and device for single-phase meter users, which obtains user and terminal load data and user and terminal archive data collected daily in an electricity consumption information collection system; performs data preprocessing on the load data and archive data to obtain preprocessed load data and archive data; inputs the preprocessed load data and archive data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification, to obtain an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; associates and merges the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, takes the actual phase of the electric energy meter as the target variable, establishes a classification decision tree model, and obtains the optimal strategy model output phase according to the classification decision tree model, thereby achieving the technical effect of improving the accuracy of phase identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 A schematic flow chart of a phase identification method for a single-phase meter user provided in an embodiment of the present invention;
[0021] Figure 2A schematic diagram of an execution flow of a phase identification method for a single-phase meter user provided in an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a decision process of a pruned decision tree in a phase identification method for a single-phase meter user provided in an embodiment of the present invention;
[0023] Figure 4 A schematic flow chart of another phase identification method for a single-phase meter user provided in an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of a phase identification device for a single-phase meter user provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second" and the like in the specification, claims and drawings of the present invention are used to distinguish different objects rather than to limit a specific order.
[0027] It should also be noted that the following embodiments of the present invention may be executed separately, or in combination with each other, and the embodiments of the present invention do not impose specific limitations on this.
[0028] The embodiment of the present invention provides a phase identification method for a single-phase meter user. Figure 1 A flow chart of a phase identification method for a single-phase meter user provided in an embodiment of the present invention; Figure 1 As shown, the phase identification method for a single-phase meter user provided in an embodiment of the present application includes:
[0029] Step S102, obtaining user and terminal load data and user and terminal file data collected daily in the power consumption information collection system;
[0030] Optionally, obtaining user and terminal load data collected daily in the electricity consumption information collection system and user and terminal archive data in step S102 includes: obtaining user and terminal load data collected daily in a preset number of days and user and terminal archive data through the electricity consumption information collection system.
[0031] Figure 2A schematic diagram of the execution flow of a phase identification method for a single-phase meter user provided in an embodiment of the present invention; Figure 2 As shown, in the embodiment of the present application, there are four steps including data acquisition, data preprocessing, current and voltage phase identification model and optimal strategy model output phase, and step S102 corresponds to Figure 2 The data source obtains load data and archive data through the electricity consumption information collection system.
[0032] Specifically, the load data collected daily by users and terminals in the electricity consumption information collection system and the archive data of users and terminals in the past N days (ie, the preset number of days in the embodiment of the present application) are obtained.
[0033] User load data and archive data are shown in Table 1:
[0034] Table 1
[0035]
[0036] The terminal load data and archive data are shown in Table 2:
[0037] Table 2
[0038]
[0039] Step S104, preprocessing the load data and the archive data to obtain preprocessed load data and archive data;
[0040] Among them, Figure 2 As shown, step S104 corresponds to Figure 2 Data preprocessing.
[0041] Optionally, in step S104, data preprocessing is performed on the load data and the archive data to obtain the preprocessed load data and the archive data, including: removing the values of the repeated current and voltage records in the load data and the archive data to obtain the deduplicated load data and the archive data; identifying and correcting the current and voltage in the deduplicated load data and the archive data according to the abnormality type to obtain the repaired load data and the archive data; converting the user current and voltage in the repaired load data and the archive data, and the terminal A / B / C phase current and voltage into primary side current and voltage data according to a preset formula, and generating the current change of the user and the terminal based on the current change at the previous and next time points to obtain the preprocessed load data and the archive data.
[0042] Specifically, in the process of power data collection, there are inevitably certain interference factors that lead to data missing and anomalies, which have an adverse impact on the phase identification results. Therefore, it is necessary to preprocess the data, including data cleaning, identification and repair of missing and abnormal data, to ensure the quality of the original data.
[0043] First, identify duplicate load data. If the voltage and current data are repeated due to abnormality of the electric energy meter, it will directly lead to deviation of the later model. Therefore, it is necessary to identify the records of the current and voltage that repeat the same value and remove such data (that is, in the embodiment of the present application, the values of the current and voltage that are repeated in the load data and archive data are removed to obtain the deduplicated load data and archive data).
[0044] Secondly, identify and repair abnormal load data. Electricity consumption data is a typical time series data, and the data as a whole has obvious characteristics such as trend, periodicity, randomness, and comprehensiveness. Although the current and voltage data are closely related, the data characteristics and data meanings are very different. When performing data preprocessing, the same set of algorithms cannot be used for identification and correction (that is, in the embodiment of the present application, the current and voltage in the deduplicated load data and archive data are identified and corrected according to the abnormal type, respectively, to obtain the repaired load data and archive data).
[0045] According to the characteristics of abnormal data, the abnormal data are divided into abnormal maximum values, abnormal minimum values, abnormal zero values, negative values, missing values and other types. According to different abnormal types, different methods are used to identify and correct the voltage and current.
[0046] Normal voltage and current cannot be negative values. Negative data is identified. If a negative value appears only once, the voltage is corrected using the KNN algorithm and the current is treated as 0. If the voltage and current negative values appear multiple times in a row, the correction using the KNN algorithm may result in large deviations, so such abnormal data is directly eliminated.
[0047] In case of extreme values or minimum values in voltage data, a threshold is set according to the rated voltage of the electric energy meter. If the threshold is exceeded, it is considered abnormal. Secondly, the standard deviation is calculated based on the data distribution. If the voltage exceeds the voltage mean + N times the standard deviation, it is identified as a maximum value. If the voltage is less than the voltage mean - N times the standard deviation, it is identified as a minimum value and corrected using the KNN algorithm.
[0048] Third, feature derivation is performed for later model construction. Since the current transformer and voltage transformer ratios of the terminal and the user are different, it is first necessary to uniformly convert the user current and voltage, and the terminal A / B / C phase current and voltage into primary side current and voltage data according to the following formula (that is, in the embodiment of the present application, the user current and voltage in the repaired load data and the archive data, and the terminal A / B / C phase current and voltage are uniformly converted into primary side current and voltage data according to the preset formula, and based on the current changes at the previous and next time points, the current changes of the user and the terminal are generated to obtain the pre-processed load data and archive data). volt_d=volt*pt;current_d=current*ct;
[0049] Secondly, based on the current changes at the previous and next time points, the current changes of the user and the terminal are generated. The calculation formula is as follows:
[0050] user_current_diff = user's current_d at the current moment - user's current_d at the previous moment;
[0051] ter_a_diff = current_d of terminal A at the current moment - current_d of terminal A at the previous moment;
[0052] ter_b_diff=current_d of terminal B at the current moment - current_d of terminal B at the previous moment; ter_c_diff=current_d of terminal C at the current moment - current_d of terminal C at the previous moment.
[0053] Step S106, inputting the preprocessed load data and archive data into the current fluctuation consistency recognition model and the voltage mutual information gain ratio recognition model for recognition, and obtaining the recognition phase output by the current fluctuation consistency recognition model and the recognition phase output by the voltage mutual information gain ratio recognition model;
[0054] Among them, Figure 2 As shown, step S106 corresponds to Figure 2 Current and voltage phase recognition model. In the embodiment of the present application, step S160 is performed in two parts, namely, the first part: inputting the preprocessed load data and archive data into the current fluctuation consistency recognition model for recognition, and obtaining the recognition phase output by the current fluctuation consistency recognition model; the second part: inputting the preprocessed load data and archive data into the voltage mutual information gain ratio recognition model for recognition, and obtaining the recognition phase output by the voltage mutual information gain ratio recognition model; the details are as follows:
[0055] Part 1: In step S106, the preprocessed load data and archive data are input into the current fluctuation consistency recognition model for recognition, and the recognition phase output by the current fluctuation consistency recognition model is obtained, including: inputting the processed load data and archive data into the current fluctuation consistency recognition model, calculating the fluctuation index of the user and the terminal in the same direction of A / B / C; calculating the number of same-direction fluctuations of the user and terminal currents through the current fluctuation consistency recognition model based on the A / B / C same-direction fluctuation index, and determining the phase with the maximum value as the recognition phase.
[0056] Specifically, when the user current under the substation fluctuates, the fluctuation will be transmitted to the substation total meter current, causing the substation total meter current to fluctuate. When the user current fluctuates greatly, the fluctuation amplitude of the substation total meter current will also increase accordingly. The transmission of this fluctuation is due to the interaction between the user current and the substation total meter current. By analyzing the relationship between the user current fluctuation under the substation and the current fluctuation of each phase of the substation total meter, the terminal phase corresponding to the user can be identified. Based on the current and terminal current data of 96 points of the user every day in the electricity consumption information collection system, the current fluctuation trend and fluctuation amplitude of the user and the terminal are taken into consideration, and the corresponding terminal phase of the electric energy meter is output through fluctuation consistency and correlation identification.
[0057] When large current fluctuations occur on the user side, the probability of large fluctuations in the same direction occurring at the terminal is calculated. The higher the probability of fluctuations in the same direction, the higher the probability that the user is connected to that phase. The terminal phase to which the meter belongs is output accordingly.
[0058] The calculation steps are as follows:
[0059] Step 1: Calculate the same direction fluctuation index flag of the user and the terminal (that is, in the embodiment of the present application, the processed load data and archive data are input into the current fluctuation consistency identification model to calculate the same direction fluctuation index of the user and the terminal in A / B / C):
[0060]
[0061] Step 2: Calculate the number of times the user and terminal currents fluctuate in the same direction and use the phase at which the maximum value occurs as the identification phase (i.e., in the embodiment of the present application, the number of times the user and terminal currents fluctuate in the same direction is calculated through a current fluctuation consistency identification model based on the A / B / C same direction fluctuation index, and the phase at which the maximum value occurs is determined as the identification phase).
[0062] Count the cumulative sum of flag_a, flag_b, flag_c of the same electric energy meter: sum_a, sum_b, sum_c. Output the identified phase phase_1 according to the following formula, and output the identification ratio increase rate of this phase compared to other phases.
[0063] The output results are shown in Table 3:
[0064] Table 3
[0065] Meter Asset Number sum_a sum_b sum_c max Phase_1 rate 0001002049****54 290 204 198 290 A 0.18575 0001002049****47 47 28 23 47 A 0.33929 0001002048****99 133 91 104 133 A 0.12446 0001002049****15 40 33 39 40 A 0.01695 0001002049****71 69 61 49 69 A 0.07018 0001002049****70 77 52 67 77 A 0.07042 0001002049****25 12 15 8 15 B 0.13043 0001002048****50 85 73 106 106 C 0.12353 0001002049****12 79 53 52 79 A 0.24074 0001002049****11 122 94 95 122 A 0.13568 0001002049****67 12 11 7 12 A 0.05556 0001002049****18 110 131 159 159 C 0.11765 0001002050****80 15 22 14 22 B 0.21875 0001002050****89 116 85 82 116 A 0.16316 0001002050****34 140 112 207 207 C 0.23427 0001002050****72 301 217 241 301 A 0.11673 0001002050****84 74 66 111 111 C 0.2327 0001002050****83 20 18 23 23 C 0.08108 0001002050****38 51 86 39 86 B 0.34314 0001002050****76 50 33 34 50 A 0.19277 0001003335****35 34 37 26 37 B 0.05455 0001002048****03 130 102 105 130 A 0.1046 0001002048****59 21 18 26 26 C 0.11111
[0066] Part 2: In step S106, the preprocessed load data and archive data are input into the voltage mutual information gain ratio recognition model for recognition, and the recognition phase output by the voltage mutual information gain ratio recognition model is obtained, including: the preprocessed load data and archive data are input into the voltage mutual information gain ratio recognition model, and the phase with the largest mutual information gain ratio between the user and the terminal is calculated based on the load data in the user and the terminal and the voltage in the archive data to obtain the recognition phase.
[0067] Further, optionally, the preprocessed load data and archive data are input into the voltage mutual information gain ratio recognition model, and the phase with the largest mutual information gain ratio between the user and the terminal is calculated based on the load data in the user and the terminal and the voltage in the archive data, to obtain the recognition phase, including: inputting the preprocessed load data and archive data into the voltage mutual information gain ratio recognition model to calculate the information entropy of the user's voltage and the information entropy of the A / B / C phase voltage of the terminal; calculating the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal based on the information entropy of the user's voltage and the information entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model; calculating the mutual information between the A / B / C phases of the user and the terminal based on the information entropy of the user's voltage, the information entropy of the A / B / C phase voltage of the terminal, the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model; calculating the mutual information between the A / B / C phases of the user and the terminal based on the mutual information between the A / B / C phases of the user and the terminal; calculating the mutual information gain ratio based on the mutual information between the A / B / C phases of the user and the terminal; taking the phase with the largest mutual information gain ratio as the recognition phase, and outputting the gain ratio increase value of the phase compared to other phases.
[0068] Specifically, there is a close connection between the voltage of the user's electric energy meter and the terminal voltage because they share the same transmission line. The wires leading out of the user's electric energy meter through the terminal are directly affected by the terminal voltage, and the fluctuation of the terminal voltage will be directly transmitted to the voltage of the user's electric energy meter, causing the voltage of the user's electric energy meter to change accordingly. Based on the daily user voltage and terminal voltage data, the mutual information gain ratio of the user voltage and the terminal is studied to identify the terminal phase corresponding to the user's electric energy meter (that is, in the embodiment of the present application, the pre-processed load data and archive data are input into the voltage mutual information gain ratio identification model, and the phase with the largest mutual information gain ratio between the user and the terminal is calculated based on the voltage in the load data and archive data in the user and the terminal, and the identification phase is obtained).
[0069] The calculation steps are as follows:
[0070] Step 1: Calculate the information entropy of the user voltage and the information entropy of the terminal A / B / C phase voltage (that is, in the embodiment of the present application, the pre-processed load data and archive data are input into the voltage mutual information gain ratio recognition model to calculate the information entropy of the user's voltage and the information entropy of the terminal's A / B / C phase voltage). Information entropy is used to describe the uncertainty of each possible event of the information source. The larger the information entropy value, the greater the uncertainty of the random variable or system. The calculation formula is as follows:
[0071]
[0072] Step 2: Calculate the conditional entropy of the user voltage and the terminal phase voltage (that is, the voltage mutual information gain ratio recognition model in the embodiment of the present application calculates the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal based on the information entropy of the user's voltage and the information entropy of the A / B / C phase voltage of the terminal). Conditional entropy is used to measure the degree of reduction in the uncertainty of a random variable under a known condition. It is usually expressed as H(Y|X), which represents the uncertainty of the random variable Y under the condition of the known random variable X. The calculation formula is as follows:
[0073] Conditional entropy between user and terminal A:
[0074] Conditional entropy between user and terminal B:
[0075] Conditional entropy between user and terminal C:
[0076] Step three: Calculate the mutual information between the user and each phase of the terminal (that is, the voltage mutual information gain ratio recognition model in the embodiment of the present application calculates the mutual information between the user and the A / B / C phase of the terminal based on the information entropy of the user's voltage, the information entropy of the A / B / C phase voltage of the terminal, the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal). Mutual information is a measure of the mutual dependence between two random variables, represented by I(X;Y). Mutual information measures the information shared by two random variables: it indicates the degree to which the uncertainty of random variable Y is reduced when random variable X is known (or the degree to which the uncertainty of random variable X is reduced when random variable Y is known.) The calculation formula is as follows:
[0077]
[0078] Step 4: Calculate the mutual information gain ratio (i.e., the mutual information gain ratio is calculated based on the mutual information of the A / B / C phases between the user and the terminal in the embodiment of the present application). Due to the insufficiency of the data set and the objective law of large numbers, it is easy to estimate a small conditional entropy when calculating the conditional entropy for features with many values, so the mutual information gain ratio is used for measurement. The calculation formula is as follows:
[0079]
[0080] According to the above steps, the mutual information gain ratio of each electric energy meter corresponding to the terminal A phase is calculated. , the mutual information gain ratio of the electric energy meter corresponding to the terminal B phase , the mutual information gain ratio of the electric energy meter corresponding to the terminal C phase .
[0081] Step 5: Identify the phase phase_2 according to the phase with the largest mutual information gain ratio, and output the increase value diff of the phase gain ratio compared to other phases (that is, in the embodiment of the present application, the phase with the largest mutual information gain ratio is identified as the phase, and the increase value of the phase gain ratio compared to other phases is output). The calculation formula is as follows:
[0082] .
[0083] The output results are shown in Table 4:
[0084] Table 4
[0085]
[0086] It should be noted that the phase identification method for single-phase meter users provided in the embodiment of the present application can effectively reduce the identification deviation caused by the high consistency of the fluctuation trend of two phases of voltage by identifying the phase based on the mutual information gain ratio voltage, compared with the existing Pearson correlation coefficient and association analysis model. The following are the results of the same batch of electric energy meters using the mutual information gain ratio, Pearson correlation coefficient and association analysis model for identification. Details are shown in Table 5:
[0087] Table 5
[0088] Energy meter asset number On-site phase Ira Irb Irc Mutual Information Gain Ratio Identification r_a r_b r_c Association analysis identification p_a p_b p_c Pearson correlation coefficient identification 0001000752****46 A 0.258 0.253 0.198 A 0.786 0.739 0.731 A 0.930 0.928 0.868 A 0001002048****59 C 0.308 0.282 0.333 C 0.722 0.776 0.749 B 0.961 0.951 0.967 C 0001002048****97 C 0.298 0.275 0.352 C 0.638 0.733 0.675 B 0.958 0.947 0.973 C 0001002048****03 A 0.209 0.208 0.162 A 0.690 0.639 0.662 A 0.885 0.887 0.807 B 0001002048****58 A 0.250 0.246 0.191 A 0.792 0.762 0.746 A 0.925 0.925 0.861 A 0001002048****96 A 0.243 0.242 0.189 A 0.783 0.741 0.731 A 0.918 0.918 0.851 A 0001002048****16 C 0.310 0.285 0.333 C 0.700 0.751 0.733 B 0.962 0.952 0.968 C 0001002048****23 A 0.225 0.220 0.172 A 0.792 0.783 0.760 A 0.901 0.899 0.823 A 0001002048****30 C 0.306 0.279 0.356 C 0.755 0.824 0.784 B 0.960 0.949 0.974 C 0001002048****47 A 0.210 0.208 0.162 A 0.807 0.810 0.784 B 0.887 0.888 0.808 B 0001002048****61 A 0.218 0.215 0.169 A 0.791 0.804 0.774 B 0.895 0.897 0.820 B 0001002048****78 B 0.286 0.301 0.293 B 0.650 0.743 0.683 B 0.952 0.957 0.956 B 0001002048****85 B 0.302 0.323 0.282 B 0.621 0.733 0.653 B 0.959 0.966 0.951 B 0001002048****15 B 0.282 0.294 0.286 B 0.699 0.781 0.726 B 0.949 0.954 0.951 B 0001002048****22 A 0.217 0.216 0.169 A 0.758 0.709 0.712 A 0.895 0.896 0.820 B 0001002048****39 A 0.247 0.247 0.192 A 0.773 0.726 0.717 A 0.923 0.924 0.861 B 0001002048****59 B 0.308 0.333 0.290 B 0.722 0.810 0.752 B 0.961 0.968 0.954 B 0001002048****97 A 0.221 0.217 0.168 A 0.797 0.802 0.774 B 0.900 0.898 0.822 A 0001002048****03 A 0.256 0.251 0.196 A 0.773 0.724 0.716 A 0.929 0.928 0.866 A 0001002048****41 C 0.303 0.275 0.351 C 0.664 0.762 0.697 B 0.960 0.948 0.973 C 0001002048****58 C 0.313 0.286 0.338 C 0.681 0.757 0.717 B 0.963 0.952 0.970 C 0001002048****96 A 0.251 0.249 0.193 A 0.780 0.735 0.724 A 0.926 0.927 0.864 B
[0089] The meter recognition accuracy of the three types of algorithms is as follows: the phase accuracy based on mutual information gain ratio recognition is 16.8 percentage points higher than that based on Pearson correlation coefficient recognition, as shown in Table 6.
[0090] Table 6
[0091]
[0092] Step S108, the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model are associated and merged as independent variables according to the meter asset number, the actual phase of the electric energy meter is used as the target variable, a classification decision tree model is established, and the optimal strategy model output phase is obtained based on the classification decision tree model.
[0093] Among them, Figure 2 As shown, step S108 corresponds to Figure 2 The model output section.
[0094] Optionally, obtaining the optimal strategy model output phase based on the classification decision tree model in step S108 includes: dividing the sample set into a training set and a validation set according to a preset ratio; training the classification decision tree model with the training set to obtain a trained classification decision tree model; verifying the validation set phase by inputting the trained classification decision tree model into the validation set, and calculating the model accuracy; and obtaining the optimal strategy model output phase by the trained classification decision tree model.
[0095] Furthermore, optionally, training the classification decision tree model with the training set to obtain the trained classification decision tree model includes: selecting nodes for sorting the training set according to the Gini coefficient, selecting the feature with the smallest Gini coefficient as the root node, splitting the data set, and establishing left and right child nodes; recursively calling the Gini coefficient algorithm for the left and right child nodes, splitting the left and right child nodes, and establishing new child nodes; and training the classification decision tree model by setting a pruning strategy to obtain a trained classification decision tree model.
[0096] Specifically, for long-term zero electricity consumption meters, since there is no change in electricity consumption, the phase cannot be calculated based on the consistency of current fluctuations. Therefore, such users directly output the results based on the voltage mutual information gain ratio identification model.
[0097] The remaining electric energy meter associates and merges the output value of the current consistent identification and the output value of the voltage mutual information gain ratio model according to the meter asset number as independent variables, takes the actual phase of the electric energy meter as the target variable, and establishes a classification decision tree model.
[0098] The sample set is divided into a training set and a validation set at a ratio of 8:2 (i.e., the preset ratio in the embodiment of the present application). The training set is used to train the decision tree, and the trained decision tree is input into the validation set samples to calculate the model accuracy (i.e., in the embodiment of the present application, the training set is used to train the classification decision tree model to obtain the trained classification decision tree model; the validation set phase is verified by inputting the trained classification decision tree model into the validation set to calculate the model accuracy).
[0099] Step 1: Select nodes to sort based on the Gini coefficient, select the feature with the smallest Gini coefficient as the root node, split the data set, and establish left and right nodes (that is, in the embodiment of the present application, select nodes to sort the training set based on the Gini coefficient, select the feature with the smallest Gini coefficient as the root node, split the data set, and establish left and right child nodes). The Gini coefficient calculation formula is:
[0100]
[0101] Step 2: For the left and right child nodes, recursively call the Gini coefficient algorithm, continue to split the left and right nodes, and establish new child nodes (that is, in the embodiment of the present application, recursively call the Gini coefficient algorithm for the left and right child nodes, split the left and right child nodes, and establish new child nodes).
[0102] Step 3: Set the pruning strategy. The maximum depth of the decision tree is controlled to be N, the minimum number of samples of leaf nodes is K, or the samples under all categories have the same attributes. If any of the above conditions are met, the iteration is terminated (that is, the classification decision tree model is trained by setting the pruning strategy in the embodiment of the present application to obtain a trained classification decision tree model). The decision process of the decision tree after pruning is as follows Figure 3 As shown, Figure 3 A schematic diagram of the decision-making process of a pruned decision tree in another phase identification method for a single-phase meter user provided in an embodiment of the present invention.
[0103] The phase of the validation set is predicted based on the model of the training set, and the recognition accuracy of the validation set reaches 100%.
[0104] It should be noted that the phase identification method for single-phase meter users provided in the embodiment of the present application can effectively correct the deviation in the voltage identification process by fusing current and voltage and identifying based on the classification decision tree model, and the accuracy is significantly better than the accuracy of a single algorithm. During the verification process, the final identification accuracy of the electric energy meter calculated by the present invention reached 100%. The results are shown in Table 7:
[0105] Table 7
[0106]
[0107] The accuracy comparison of the three types of algorithms is shown in Table 8:
[0108] Table 8
[0109]
[0110] In summary, if Figure 4 As shown, Figure 4A flow chart of another phase identification method for a single-phase meter user provided in an embodiment of the present invention; in combination with steps S102 to S108, the phase identification method for a single-phase meter user provided in an embodiment of the present application obtains the load data, archive data of the single-phase meter user and the load data and archive data of the corresponding terminal; performs data cleaning, removes duplicate values, repairs abnormal values, and performs feature derivation on the user's load data, archive data and the load data and archive data of the corresponding terminal to generate primary side current, voltage and current change; after the above-mentioned preprocessing of the user's load data, archive data and the load data and archive data of the corresponding terminal, the phase is identified by the current fluctuation consistency model and the phase is identified by the voltage mutual information gain ratio model, and finally the optimal strategy model outputs the identification result, thereby avoiding the situation where the phase cannot be identified due to no electricity use and the inaccurate identification due to the highly consistent phase voltage fluctuation of the terminal itself, thereby greatly improving the accuracy of phase identification.
[0111] It should be noted that the data involved in the phase identification method for single-phase meter users provided in the embodiment of the present application is only illustrated using the above example as an example, and is subject to the phase identification method for single-phase meter users provided in the embodiment of the present application, and is not specifically limited.
[0112] The embodiment of the present invention provides a phase identification method for single-phase meter users, which obtains user and terminal load data and user and terminal archive data collected daily in an electricity consumption information collection system; performs data preprocessing on the load data and archive data to obtain preprocessed load data and archive data; inputs the preprocessed load data and archive data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification, to obtain an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; associates and merges the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, takes the actual phase of the electric energy meter as the target variable, establishes a classification decision tree model, and obtains the optimal strategy model output phase according to the classification decision tree model, thereby achieving the technical effect of improving the accuracy of phase identification.
[0113] The embodiment of the present invention provides a phase identification device for a single-phase meter user. Figure 5 A schematic diagram of a phase identification device for a single-phase meter user provided by an embodiment of the present invention; Figure 5As shown, the phase identification device for single-phase meter users provided in the embodiment of the present application includes: a data source 52, which is used to obtain user and terminal load data collected daily in the electricity consumption information collection system and archival data of users and terminals; a data preprocessing module 54, which is used to perform data preprocessing on the load data and archival data to obtain preprocessed load data and archival data; a phase identification model library 56, which is used to input the preprocessed load data and archival data into the current fluctuation consistency identification model and the voltage mutual information gain ratio identification model for identification, and obtain the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model; a phase output module 58, which is used to associate and merge the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, and take the actual phase of the electric energy meter as the target variable, establish a classification decision tree model, and obtain the optimal strategy model output phase according to the classification decision tree model.
[0114] Optionally, the data source 52 is used to obtain user and terminal load data collected daily in a preset number of days and archival data of users and terminals through the electricity consumption information collection system.
[0115] The embodiment of the present invention provides a phase identification device for single-phase meter users, which obtains user and terminal load data and user and terminal archive data collected daily in an electricity consumption information collection system; performs data preprocessing on the load data and archive data to obtain preprocessed load data and archive data; inputs the preprocessed load data and archive data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification, to obtain an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; associates and merges the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model according to the meter asset number as independent variables, takes the actual phase of the electric energy meter as the target variable, establishes a classification decision tree model, and obtains the optimal strategy model output phase according to the classification decision tree model, thereby achieving the technical effect of improving the accuracy of phase identification.
[0116] The above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention.
Claims
1. A phase identification method for a single-phase meter user, characterized in that: include: Obtain user and terminal load data collected daily in the electricity consumption information collection system as well as user and terminal archive data; Performing data preprocessing on the load data and the archive data to obtain the preprocessed load data and the archive data; Inputting the preprocessed load data and the archive data into a current fluctuation consistency identification model and a voltage mutual information gain ratio identification model for identification, and obtaining an identification phase output by the current fluctuation consistency identification model and an identification phase output by the voltage mutual information gain ratio identification model; The identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model are associated and merged as independent variables according to the meter asset number, the actual phase of the electric energy meter is used as the target variable, a classification decision tree model is established, and the optimal strategy model output phase is obtained according to the classification decision tree model; The step of inputting the pre-processed load data and the archive data into a current fluctuation consistency recognition model for recognition, and obtaining the recognition phase output by the current fluctuation consistency recognition model comprises: inputting the processed load data and the archive data into the current fluctuation consistency recognition model, and calculating the A / B / C same direction fluctuation index of the user and the terminal; calculating the number of same-direction fluctuations of the user and the terminal current through the current fluctuation consistency recognition model according to the A / B / C same direction fluctuation index, and determining the phase with the maximum value as the recognition phase; The step of inputting the preprocessed load data and the archive data into a voltage mutual information gain ratio recognition model for recognition to obtain a recognition phase output by the voltage mutual information gain ratio recognition model comprises: inputting the preprocessed load data and the archive data into a voltage mutual information gain ratio recognition model, calculating a phase at which the mutual information gain ratio between the user and the terminal is maximum according to the load data in the user and the terminal and the voltage in the archive data, and obtaining the recognition phase; The step of inputting the preprocessed load data and the archive data into the voltage mutual information gain ratio recognition model, and calculating the phase at which the mutual information gain ratio of the user and the terminal is the largest according to the load data in the user and the terminal and the voltage in the archive data, to obtain the recognition phase comprises: inputting the preprocessed load data and the archive data into the voltage mutual information gain ratio recognition model to calculate the information entropy of the voltage of the user and the information entropy of the A / B / C phase voltage of the terminal; and obtaining the recognition phase according to the information entropy of the voltage of the user and the information entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model. The voltage mutual information gain ratio recognition model is used to calculate the mutual information between the user and the terminal according to the information entropy of the user's voltage, the information entropy of the A / B / C phase voltage of the terminal, the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal; the mutual information gain ratio is calculated based on the mutual information between the user and the terminal's A / B / C phase; the phase with the largest mutual information gain ratio is taken as the identified phase, and the gain ratio increase value of the phase compared to other phases is output.
2. The phase identification method for single-phase meter users according to claim 1, characterized in that: The acquisition of user and terminal load data collected daily in the power consumption information collection system and user and terminal archive data includes: The user and terminal load data collected daily in a preset number of days and the archive data of the user and terminal are obtained through the power consumption information collection system.
3. The phase identification method for a single-phase meter user according to claim 1 or 2, characterized in that: The performing data preprocessing on the load data and the archive data to obtain the preprocessed load data and the archive data comprises: Removing duplicate values of current and voltage in the load data and the archive data to obtain the deduplicated load data and the archive data; According to the abnormality type, the current and voltage in the deduplicated load data and the archive data are respectively identified and corrected to obtain the repaired load data and the archive data; The repaired load data and the user current and voltage in the archive data, and the terminal A / B / C phase current and voltage are uniformly converted into primary side current and voltage data according to a preset formula, and based on the current changes at previous and subsequent time points, the current changes of the user and the terminal are generated to obtain the preprocessed load data and the archive data.
4. The phase identification method for single-phase meter users according to claim 1, characterized in that: The optimal strategy model output phase obtained according to the classification decision tree model includes: Divide the sample set into a training set and a validation set according to a preset ratio; Using the training set to train the classification decision tree model to obtain a trained classification decision tree model; Verify the validation set phase by inputting the trained classification decision tree model into the validation set, and calculate the model accuracy; The optimal strategy model output phase is obtained through the trained classification decision tree model.
5. The phase identification method for single-phase meter users according to claim 4, characterized in that: The training of the classification decision tree model with the training set to obtain the trained classification decision tree model comprises: Sort the training set by selecting nodes according to the Gini coefficient, select the feature with the smallest Gini coefficient as the root node, split the data set, and establish left and right child nodes; Recursively calling the Gini coefficient algorithm on the left and right child nodes, splitting the left and right child nodes, and establishing new child nodes; The classification decision tree model is trained by setting a pruning strategy to obtain the trained classification decision tree model.
6. A phase identification device for a single-phase meter user, characterized in that: include: Data source, used to obtain user and terminal load data collected daily in the electricity consumption information collection system and user and terminal archive data; A data preprocessing module, used for performing data preprocessing on the load data and the archive data to obtain the preprocessed load data and the archive data; A phase recognition model library, used for inputting the preprocessed load data and the archive data into a current fluctuation consistency recognition model and a voltage mutual information gain ratio recognition model for recognition, and obtaining a recognition phase output by the current fluctuation consistency recognition model and a recognition phase output by the voltage mutual information gain ratio recognition model; A phase output module is used to associate and merge the identification phase output by the current fluctuation consistency identification model and the identification phase output by the voltage mutual information gain ratio identification model as independent variables according to the meter asset number, and take the actual phase of the electric energy meter as the target variable, establish a classification decision tree model, and obtain the optimal strategy model output phase according to the classification decision tree model; The step of inputting the pre-processed load data and the archive data into a current fluctuation consistency recognition model for recognition, and obtaining the recognition phase output by the current fluctuation consistency recognition model comprises: inputting the processed load data and the archive data into the current fluctuation consistency recognition model, and calculating the A / B / C same direction fluctuation index of the user and the terminal; calculating the number of same-direction fluctuations of the user and the terminal current through the current fluctuation consistency recognition model according to the A / B / C same direction fluctuation index, and determining the phase with the maximum value as the recognition phase; The step of inputting the preprocessed load data and the archive data into a voltage mutual information gain ratio recognition model for recognition to obtain a recognition phase output by the voltage mutual information gain ratio recognition model comprises: inputting the preprocessed load data and the archive data into a voltage mutual information gain ratio recognition model, calculating a phase at which the mutual information gain ratio between the user and the terminal is maximum according to the load data in the user and the terminal and the voltage in the archive data, and obtaining the recognition phase; The step of inputting the preprocessed load data and the archive data into the voltage mutual information gain ratio recognition model, and calculating the phase at which the mutual information gain ratio of the user and the terminal is the largest according to the load data in the user and the terminal and the voltage in the archive data, to obtain the recognition phase comprises: inputting the preprocessed load data and the archive data into the voltage mutual information gain ratio recognition model to calculate the information entropy of the voltage of the user and the information entropy of the A / B / C phase voltage of the terminal; and obtaining the recognition phase according to the information entropy of the voltage of the user and the information entropy of the A / B / C phase voltage of the terminal through the voltage mutual information gain ratio recognition model. The voltage mutual information gain ratio recognition model is used to calculate the mutual information between the user and the terminal according to the information entropy of the user's voltage, the information entropy of the A / B / C phase voltage of the terminal, the conditional entropy of the user's voltage and the conditional entropy of the A / B / C phase voltage of the terminal; the mutual information gain ratio is calculated based on the mutual information between the user and the terminal's A / B / C phase; the phase with the largest mutual information gain ratio is taken as the identified phase, and the gain ratio increase value of the phase compared to other phases is output.
7. The phase identification device for single-phase meter users according to claim 6, characterized in that: The data source is used to obtain the user and terminal load data collected daily in preset days and the archive data of the users and terminals through the electricity consumption information collection system.
