Smart switch coordination-based electric energy metering box separate phase metering correction method
Patent Information
- Application Number
- CN202610997897.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本发明提供基于智能开关协同的电能计量箱分相计量校正方法,以解决现有技术中分相识别易受负荷波动和并发用电影响、事件可靠性难以量化、多次监测结果融合粗糙以及分相计量校正准确性不足的技术问题
[0010]进一步地,当监测到特定用户智能开关发生状态切换时,截取切换前后预设时段的独立用电功率时序数据并作差分处理,生成表示切换事件的响应时序模板,包括:当监测到目标智能开关的瞬时有功功率发生突变且超过预设变化阈值时,判定发生状态切换事件;以发生功率突变的时刻为基准,按照预设截取时长分别截取基准时刻之前和之后的采样数据,构成定域截取窗,并提取定域截取窗内对应的独立用电功率时序数据;对定域截取窗内的独立用电功率时序数据执行一阶差分处理,计算每个采样点的数值与前一相邻采样点数值的差值,生成表示切换事件瞬态波动特征的响应时序模板。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent switch coordination technology, specifically relating to a phase metering correction method for power metering boxes based on intelligent switch coordination. Background Technology
[0002] In the daily operation and management of low-voltage distribution networks, electricity metering boxes play a crucial role in power distribution, user metering, and operational analysis. The accuracy of user phase assignment information directly affects the effectiveness of line loss calculation, three-phase imbalance management, and distribution area topology management. Due to factors such as historical line modifications, changes in user-side equipment access, and distribution network topology adjustments, the actual phase connection relationships of users within the electricity metering box may differ from the records in the back-end ledger, leading to deviations in phase metering data. Current phase sequence verification and phase correction typically rely on manual on-site power outages or live-line inspections with instruments, which suffers from high workload, high maintenance costs, and insufficient real-time performance, making it difficult to meet the needs of refined operation and maintenance of distribution networks and real-time sensing of new power systems.
[0003] Patent document CN111881415B discloses a method and device for identifying phase sequence and line-customer relationship in a distribution transformer area. The method includes: collecting time-series data of current and power factor of each phase of the low-voltage outgoing lines of the distribution transformer and time-series data of current and power factor of the smart meters in the target distribution transformer area at multiple time sections; calculating the active current time-series values of each phase of the low-voltage outgoing lines and the smart meters at each time section from the current and power factor time-series data; establishing an overdetermined set of equations reflecting the phase sequence and line-customer affiliation relationship of the user's smart meters; substituting the active current time-series values into the overdetermined set of equations and solving the least-squares solution of the overdetermined set of equations to obtain the phase sequence and line-customer affiliation relationship of the user's smart meters. This method solves the problems of existing technologies requiring additional equipment, resulting in high investment costs, and being difficult to apply in distribution transformer areas with low-power wireless solutions.
[0004] Currently, some methods attempt to use collected power operation data for phase identification or distribution network relationship identification. However, in actual low-voltage distribution areas, multi-user loads exhibit randomness, concurrency, and time-varying characteristics. Frequent load fluctuations, strong background noise, and simultaneous power consumption by multiple users can easily interfere with the identification process. Especially when using load switching events for attribution identification, existing methods typically do not fully consider the differences in power consumption characteristics among different users and the reliability of information from a single switching event. When the power background fluctuation before a user switch is large, the identification results are easily affected by false responses. Furthermore, in the process of fusion of multiple monitoring events, equal-weighted accumulation or voting mechanisms are insufficient to distinguish the confidence levels of different events. Therefore, how to leverage the synergy between power metering boxes and user smart switches, mine the time-series response characteristics before and after load state switching, and establish a phase identification mechanism capable of evaluating event weights, screening high-confidence results, and achieving weighted fusion of multiple pieces of evidence to complete phase metering data correction has become a technical problem that needs to be solved in the fields of smart electricity consumption and distribution operation and maintenance. Summary of the Invention
[0005] This invention provides a phase metering correction method for power metering boxes based on intelligent switch collaboration, in order to solve the technical problems in the prior art, such as the susceptibility of phase identification to load fluctuations and concurrent power consumption, the difficulty in quantifying event reliability, the coarse fusion of multiple monitoring results, and the insufficient accuracy of phase metering correction.
[0006] This invention provides a phase-by-phase metering correction method for energy metering boxes based on intelligent switch collaboration, comprising the following steps: S1, acquiring the total power time-series data of each phase in the energy metering box, and the independent power consumption time-series data of each user's intelligent switch; S2, when a state switch change of a specific user is detected, extracting the independent power consumption time-series data of a preset time period before and after the switch and performing differential processing to generate a response time-series template representing the switch event; simultaneously extracting the total power time-series data of each phase during the time period and performing differential processing, calculating the norm-normalized cross-correlation coefficient between the data and the response time-series template, as the time-series correlation coefficient between the user and each phase; based on the independent power consumption of the specific user before the switch... The power time-series data is used to calculate the stable coefficient of variation, and the event weight of this switching event is determined based on the stable coefficient of variation. S3, based on the time-series correlation, the posterior probability of a specific user belonging to each phase assignment type is updated within the Bayesian inference framework. Phase assignment types include single-phase and multi-phase connection combinations. Confidence judgment conditions are set using event weights, and a discrimination threshold is determined based on the event weights. When the difference between the highest and second-highest posterior probabilities is greater than the threshold, it is judged as a high-confidence result. Multiple high-confidence results are accumulated, and the corresponding posterior probabilities are weighted and fused according to the event weights to determine the phase assignment with the highest weighted cumulative probability, and the phase metering data is corrected accordingly.
[0007] Its effects are as follows: It fully constructs a phase identification and metering correction process that does not require on-site manual inspection. It constructs switching event templates through power time-series differential analysis, quantifies the correlation between load and phase synchronization through norm normalization and cross-correlation, designs event weights based on the power fluctuation before switching to distinguish the reliability of different switching events, it iteratively updates the posterior probabilities of seven phase affiliations for users by combining Bayesian inference, selects high-confidence results and weighted fusion to determine the final phase relationship, reconstructs the metering mapping based on accurate phase files, and corrects the phase power under the constraint of energy conservation. It effectively overcomes the misjudgment problems caused by multi-user concurrent loads and noise interference, significantly reduces maintenance labor costs, improves the stability of phase affiliation identification and the accuracy of phase metering correction, and optimizes the data foundation for three-phase imbalance management and line loss calculation in the transformer area.
[0008] Furthermore, the process involves acquiring the total power time-series data for each phase within the power metering box, as well as the independent power consumption time-series data for each user's smart switch. This includes: setting the three-phase power meter located at the input of the power metering box to collect the total active power data for each phase according to a preset acquisition cycle; acquiring the total active power values of phases A, B, and C at the current moment according to the preset acquisition cycle, and recording them in chronological order to form the total power time-series data for each phase; setting each user's smart switch to upload its own instantaneous active power value according to the corresponding data reporting cycle; adding a timestamp to the power values uploaded by each user's smart switch and storing them sequentially; and merging the power values uploaded by the same user's smart switch at consecutive moments into an independent power sequence to form independent power consumption time-series data.
[0009] Its effects are as follows: it standardizes the periodic acquisition and time-series storage rules for the total phase power of three-phase energy meters and the independent power of user smart switches, standardizes the generation logic of raw time-series data, unifies the acquisition cycle and time-series organization of power data for the two types of devices, provides a raw power data source with a unified format and complete time sequence for subsequent differential operations, correlation calculations, and Bayesian probabilistic inference, avoids time-series data breakage and misalignment caused by chaotic acquisition logic, and ensures that all subsequent phase identification algorithms can run stably.
[0010] Furthermore, when a state switch of a specific user's smart switch is detected to have changed state, the independent power consumption time-series data for a preset time period before and after the switch is extracted and differentially processed to generate a response time-series template representing the switching event. This includes: when a sudden change in the instantaneous active power of the target smart switch is detected and exceeds a preset change threshold, a state switch event is determined to have occurred; based on the time of the power change, sampling data before and after the reference time is extracted according to a preset extraction duration to form a local extraction window, and the corresponding independent power consumption time-series data within the local extraction window is extracted; first-order differential processing is performed on the independent power consumption time-series data within the local extraction window, and the difference between the value of each sampling point and the value of the previous adjacent sampling point is calculated to generate a response time-series template representing the transient fluctuation characteristics of the switching event.
[0011] Its effects are as follows: it clarifies the judgment conditions for power mutation, the construction rules for localized truncation windows and the first-order differential noise reduction methods, accurately extracts the transient load fluctuation characteristics at the moment of switch switching to generate a standardized response template, filters out the interference brought by static base DC load, clearly depicts the power change pattern of a single on / off event, provides a standardized feature reference for the calculation of phase-sequence correlation, and reduces the negative impact of steady-state load and grid drift on the judgment of load synchronicity.
[0012] Furthermore, the norm-normalized cross-correlation coefficients of the data and the response timing template are calculated separately as the user's timing correlation with each phase. This includes: performing first-order difference processing on the total power timing data within the time intervals of phases A, B, and C, calculating the arithmetic mean of the differenced sequences, subtracting the arithmetic mean from the values of each sampling point, and removing the DC bias to obtain a zero-mean corrected total power sequence; calculating the arithmetic mean of the response timing template, subtracting the arithmetic mean from each value within the template to obtain a zero-mean ground-state template sequence; calculating the vector inner product of the corrected total power sequence and the ground-state template sequence as the cross-correlation numerator; calculating the L2 norm of the corrected total power sequence and the ground-state template sequence, and using their product as the normalized denominator constant; dividing the cross-correlation numerator by the normalized denominator constant to obtain the norm-normalized cross-correlation coefficient for each phase, which is used as the user's timing correlation with the corresponding phase.
[0013] Its effects are as follows: by eliminating the time-series DC bias through zero-mean normalization, and by relying on vector inner product and L2 norm normalization to calculate the time-series correlation, the synchronization similarity between user load fluctuations and total power fluctuations of each phase is constrained to the [-1,1] interval for quantitative representation, the comparison standard of power sequences with different amplitudes is unified, the correlation deviation caused by power amplitude differences is weakened, the matching degree between user load changes and total power changes of each phase is accurately quantified, and a reliable quantitative index is provided for Bayesian likelihood calculation.
[0014] Furthermore, based on the time-series data of independent power consumption before the switching of a specific user, a stable coefficient of variation is calculated, and the event weight of this switching event is determined according to the stable coefficient of variation. This includes: extracting the independent power consumption values within a preset historical period before the state switching of the target smart switch, as a discrete basis set; calculating the arithmetic mean of each independent power consumption value in the discrete basis set; calculating the sum of squares of the differences between each independent power consumption value and the arithmetic mean in the discrete basis set, and performing meanization and square root processing according to the number of sampling points in the discrete basis set to obtain the standard deviation of the discrete basis set; dividing the standard deviation by the maximum value between the absolute value of the arithmetic mean and the preset power lower limit greater than 0 to obtain the stable coefficient of variation; setting a fixed proportional constant and a preset stability term, dividing the fixed proportional constant by the sum of the stable coefficient of variation and the preset stability term, and using the calculation result as the event weight of this state switching event.
[0015] Its effects are as follows: by using the historical power base set before the handover to calculate the stable coefficient of variation to quantify the magnitude of load fluctuation, and then mapping it to generate event weights, reliable handover events with stable load and low noise before the handover are given higher decision weights, while the weights of events with violent fluctuations and strong interference are reduced, automatically weakening the interference of low-quality events on the final judgment result, quantifying the data credibility of a single handover event, and providing a reliable weight basis for high confidence screening and multi-event weighted fusion.
[0016] Furthermore, based on temporal relevance, the posterior probability of a specific user belonging to each phase classification type is updated within the Bayesian inference framework. This includes: constructing a phase classification type library containing seven independent categories: single-phase A, single-phase B, single-phase C, two-phase AB, two-phase BC, two-phase CA, and three-phase ABC; assigning an initial prior probability of one-seventh to each type; establishing a Gaussian probability density function with a mean of 1 and a fixed variance as the scale, as the benchmark model for likelihood calculation; calculating the arithmetic mean difference between the temporal relevance of each phase classification type to the corresponding classified and unclassified phases to obtain the comprehensive temporal relevance, with a mean of 0 when there is no corresponding unclassified phase; and substituting the comprehensive temporal relevance of each type into the benchmark model to solve for the likelihood of the user corresponding to the seven phase classification types under the current switching event.
[0017] Furthermore, it also includes: multiplying the initial prior probability by the calculated likelihood term by term to obtain the unnormalized posterior probability of each classification type; calculating the sum of the unnormalized posterior probabilities of all 7 classification types as the normalized denominator; and dividing the unnormalized posterior probability of each classification type by the normalized denominator to obtain the updated posterior probability.
[0018] Furthermore, by accumulating multiple high-confidence results and weighting and fusing the corresponding posterior probabilities according to the weights of each event, the phase attribution with the highest weighted cumulative probability is determined. This includes: constructing an independent counter accumulator for each user, setting an upper limit threshold of M judgments, where M is a positive integer, as the criterion for stopping data collection; when a high-confidence result is obtained, multiplying the posterior probabilities of the seven phase attribution types calculated for this event by the event weight of this event to obtain a single-event weighted probability vector; accumulating the single-event weighted probability vectors of the user under M high-confidence events to obtain the total cumulative weighted value of the seven attribution types; dividing the total cumulative weighted value of each attribution type by the sum of the event weights of the M events to obtain the weighted fusion probability of each attribution type; and selecting the phase attribution type corresponding to the maximum weighted fusion probability as the user's phase attribution.
[0019] Furthermore, the phase-by-phase metering data is corrected, including: extracting the original registration phase-by-phase attribution data of the target user from the file management system in the metering backend; comparing the determined phase attribution with the extracted original registration phase-by-phase attribution data; if they match, maintaining the original system file and stopping the correction process; if they do not match, using the phase attribution to overwrite and replace the original registration phase-by-phase attribution data in the file management system; based on the updated phase attribution, re-establishing the mapping relationship between the target user equipment and the underlying metering module, and according to the updated mapping relationship, under the energy conservation constraints of single-phase full allocation and multi-phase shared allocation, redistributing the phase-by-phase power consumption of the electricity metering box and correcting the metering data.
[0020] Furthermore, the user's smart switch is a smart miniature circuit breaker, and clock alignment is completed at the communication gateway layer through the network time protocol when acquiring switch data.
[0021] The beneficial effects are as follows: This invention performs differential processing on the time-series data of the total phase power of the power metering box and the individual power consumption of users to generate a switching event response time-series template. It also quantifies the synchronization degree between user load changes and changes in the total phase power by normalizing the cross-relationships using norm normalization. Furthermore, it utilizes an event weighting mechanism based on stabilized coefficient of variation to assess the fluctuation degree of the power base state before switching, reducing the impact of unstable load events on the identification results. Within a Bayesian inference framework, it updates the posterior probability of user phase attribution and combines event weights for high-confidence screening and weighted fusion of multiple results, reducing the risk of misjudgment of a single switching event and improving the stability of phase attribution identification and the reliability of phase metering data correction. Attached Figure Description
[0022] Figure 1 This is a flowchart of a phase-by-phase metering correction method for energy metering boxes based on intelligent switch coordination.
[0023] Figure 2 This is a time series comparison diagram of the differential power and response template of phase A.
[0024] Figure 3 Line graph showing the error comparison of the four schemes. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] An embodiment of the phase metering correction method for energy metering boxes based on intelligent switch coordination provided by this invention: like Figure 1 As shown, the phase metering correction method for energy metering boxes based on intelligent switch coordination includes the following steps: S1 collects the timing data of the phase-by-phase metering box and the user's switching power.
[0027] Acquire the total power time-series data of each phase in the power metering box, as well as the independent power consumption time-series data of each user's smart switch.
[0028] The system periodically reads the total power of phase A, phase B, and phase C collected by the three-phase energy meter installed at the inlet of the energy metering box via the Internet of Things (IoT) communication protocol, and reads the real-time power consumption uploaded by the built-in metering module of each user's smart switch on the downstream branch circuit to form raw power time-series data.
[0029] To address the issues of inconsistent timestamps and missing samples in the original power timing data caused by network latency, communication packet loss, or device restarts, we first perform time format unification processing and time index alignment processing, and then resample according to a preset fixed sampling period of 1 second.
[0030] For missing sampling points that still exist after resampling, linear interpolation is used to complete the data, resulting in time-aligned total power time-series data matrices for each phase and independent power consumption time-series data matrices for each user with consistent sampling intervals.
[0031] In an optional embodiment, the total power time-series data of each phase within the power metering box, and the independent power consumption time-series data of each user's smart switch are obtained, including: The three-phase energy meter located at the input terminal of the energy metering box is set to collect the total active power data of each phase according to the preset collection cycle; The total active power values of phases A, B, and C at the current moment are obtained according to the preset acquisition cycle, and the total power time series data of each phase are recorded in time sequence. Each user's smart switch is configured to upload its instantaneous active power value according to the corresponding data reporting cycle; Add timestamps to the power values uploaded by each user's smart switch and store them sequentially. Merge the power values uploaded by the same user's smart switch at consecutive times into an independent power sequence to form independent power consumption time-series data.
[0032] Based on the energy metering chip, the interrupt period of the underlying hardware timer is configured to 1000ms via RS485 communication bus to ensure consistent sampling periods for the three-phase energy meter and user smart switch. Simultaneously, a unified timestamp is appended to the three-phase energy meter data and user smart switch data by the communication gateway or local server, and resampling and time alignment are performed according to this unified timestamp. When acquiring the total active power values of phases A, B, and C at the current moment, a floating-point data structure is used for storage. For example, in a continuous acquisition window, the active power data of phase A read in the first 5 moments is a one-dimensional array [2105.3, 2106.1, 2105.8, 2107.2, 2106.9].
[0033] Data is acquired from each user's smart switch, which employs a smart miniature circuit breaker. Clock alignment is performed using the Network Time Protocol (NTP) at the communication gateway layer. A corresponding form is created in the time-series database based on the device's unique MAC address, and the instantaneous active power with timestamps is appended to the array cache. For example, the smart switch with user ID 001 has the independent sequence record [120.1, 120.2, 120.1, 120.3, 120.0] for timestamps from 1682496000 to 1682496004, thus achieving continuous time-series sequence splicing and storage.
[0034] S2 detects switch switching, constructs templates, and calculates relevance and event weights.
[0035] When a state switch change for a specific user's smart switch is detected, the independent power consumption time-series data for a preset period before and after the switch is extracted and differentially processed to generate a response time-series template representing the switch event. At the same time, the total power time-series data for each phase during the period is extracted and differentially processed, and the norm-normalized cross-correlation coefficient between the data and the response time-series template is calculated as the time-series correlation between the user and each phase. Based on the independent power consumption time-series data of the specific user before the switch, the stabilized coefficient of variation is calculated, and the event weight of this switch event is determined according to the stabilized coefficient of variation.
[0036] A sliding window combined with a mutation detection algorithm is used to iterate through the independent power consumption time-series data of a specific user in real time, calculating the first-order difference value of power between adjacent time points. When the absolute value of this first-order difference value exceeds the set power mutation threshold for switch switching, it is determined that the user's smart switch has undergone a state switch. At this time, taking this mutation time point as the center, a 5-second slice operation is used to extract the data forward and forward, resulting in an independent power consumption time-series sequence containing 11 sampling points.
[0037] First-order differential calculations were performed on the sequence to filter out DC background power, and the resulting differential sequence was used as the response timing template for the switching event. At the same time, the total power timing data of phases A, B, and C within the corresponding time period were extracted using the same time index slices, and first-order differential calculations were also performed to obtain the total power differential sequence of each phase.
[0038] Calculate the cross-correlation values between the response time series template and the total power difference sequence of each phase, and calculate the L2 norm of the response time series template and the L2 norm of the total power difference sequence of each phase. Divide the calculated cross-correlation value by the product of the corresponding L2 norms to obtain the norm-normalized cross-correlation coefficient, which ranges from -1 to 1. This coefficient represents the time series correlation between a specific user and each phase.
[0039] In addition, for independent power consumption time-series data within a preset historical period prior to the abrupt change, the standard deviation and arithmetic mean are calculated. The preset historical period can be the same as the period selected by the response time-series template, or an independently set historical benchmark period can be used. The standard deviation is divided by the maximum value between the absolute value of the arithmetic mean and the preset lower limit of power consumption greater than 0 to obtain the stabilized coefficient of variation, representing the degree of fluctuation in user power consumption. A fixed proportional constant and a preset stability term are set, and the fixed proportional constant is divided by the sum of the stabilized coefficient of variation and the preset stability term. The calculation result is used as the event weight for this switching event.
[0040] In an optional embodiment, when a state switch change for a specific user is detected, independent power consumption time-series data for a preset period before and after the switch are extracted and differentially processed to generate a response time-series template representing the switch event, including: When a sudden change in the instantaneous active power of the target smart switch is detected and exceeds a preset change threshold, a state switching event is determined to have occurred. Based on the moment when the power change occurs, the sampled data before and after the reference moment are extracted according to the preset extraction time to form a local extraction window, and the corresponding independent power consumption time series data within the local extraction window are extracted. First-order differential processing is performed on the independent power consumption time-series data within the localized intercept window. The difference between the value of each sampling point and the value of the previous adjacent sampling point is calculated to generate a response time-series template representing the transient fluctuation characteristics of the switching event.
[0041] In the state transition monitoring stage, the edge computing module traverses the received instantaneous active power sequence of the smart switch, calculates the absolute difference between the current data and the previous data, and sets the preset change threshold to a specific proportion of the line's rated load, such as 50W. When a sudden change in power from 120W to 650W is detected at a certain moment, a state transition event is determined to have occurred.
[0042] After the event is triggered, the index point is centered on the moment of mutation. Extract the index range from the circular buffer. to A total of 11 consecutive sampling points form a time-series subsequence spanning 10 seconds. Discrete difference equations are used to calculate the differences between adjacent points term by term. For example, the extracted 11 time-series data points are [120,120,120,120,120,120,650,652,650,651,650]. After first-order differencing, the original sequence is transformed into a sequence of 10 difference data points [0,0,0,0,0,530,2,-2,1,-1]. This difference array serves as the response time-series template, filtering out static base load and representing the power step characteristics of the transient start-up process.
[0043] In an optional embodiment, the total power time-series data for each phase of the time period is extracted and differentially processed. The norm-normalized cross-correlation coefficient between the data and the response time-series template is calculated as the user's time-series correlation for each phase, including: The total power time series data of phases A, B and C are extracted and processed by first-order differential processing. The arithmetic mean of the differential sequence is calculated. The arithmetic mean is subtracted from the value of each sampling point, and the DC bias is removed to obtain the corrected total power sequence with zero mean. Calculate the arithmetic mean of the response time sequence template, and subtract the arithmetic mean from each value in the template to obtain the ground state template sequence with zero mean; Calculate the vector inner product of the corrected total power sequence and the ground state template sequence, respectively, as the cross-correlation molecule; Calculate the L2 norm of the corrected total power sequence and the L2 norm of the ground state template sequence respectively, and use their product as the normalized denominator constant. Divide the cross-correlation numerator by the normalized denominator constant to obtain the norm-normalized cross-correlation coefficient of each phase, which is used as the temporal correlation between the user and the corresponding phase.
[0044] When extracting the total power time-series data, a one-dimensional array with 11 sampling points is used. After performing first-order differencing, a vector containing 10 elements is obtained. Taking phase A as an example, if the differencing sequence is [5,-2,3,1,-4,528,6,-1,4,0], its arithmetic mean is calculated to be 54W. By iterating through the array and subtracting 54 from each element, a zero-mean corrected total power sequence with DC bias removed is obtained, reducing the constant term error caused by system grid drift. Similarly, the mean of 53W is calculated for the response time-series template, and differencing is performed to obtain a ground-state template sequence with a mean of 0. The time-domain waveforms of the phase A total power difference sequence after zero-mean processing and the response time-series template are compared as follows. Figure 2 As shown.
[0045] When calculating the similarity metric, a vector inner product operation is performed on the two zero-mean sequences mentioned above, i.e., element-wise multiplication followed by summation, and the sum is used as the numerator of the cross-correlation. Simultaneously, based on the Euclidean distance formula, the arithmetic square root of the sum of squares of each element of the two vectors is calculated as the L2 norm, and the two norms are multiplied to obtain a normalized denominator constant. Division is then performed to obtain the norm-normalized cross-correlation coefficient. This coefficient is constrained within the interval [-1, 1], quantifying the morphological synchronicity and energy correlation between user-independent load fluctuations and the overall load fluctuations of phase A.
[0046] In an optional embodiment, a stable coefficient of variation is calculated based on the independent power consumption time-series data of a specific user before the handover, and the event weight of this handover event is determined according to the stable coefficient of variation, including: Extract the independent power consumption values within a preset historical period before the target smart switch changes state, and use them as a discrete basis set; Calculate the arithmetic mean of the independent power consumption values within the discrete basis set; Calculate the sum of squares of the differences between each independent power consumption value and the arithmetic mean in the discrete basis set, and perform mean normalization and square root extraction based on the number of sampling points in the discrete basis set to obtain the standard deviation of the discrete basis set; The stable coefficient of variation is obtained by dividing the absolute value of the standard deviation by the arithmetic mean and the maximum value between the preset power lower limit that is greater than 0. Set a fixed proportional constant and a preset stable term, divide the fixed proportional constant by the sum of the stabilized coefficient of variation and the preset stable term, and use the calculation result as the event weight of this state transition event.
[0047] Discrete base sets are extracted by tracing back to historical caches, for example, extracting time intervals as follows. to The system uses 30 consecutive sampling points. Assuming the target smart switch is in standby mode, the extracted power values fluctuate between 12W and 13W, with the calculated arithmetic mean being 12.5W. The squares of the differences between each sampling point and 12.5W are calculated and accumulated. This sum of squares is divided by the total sample size of 30, and then the square root is taken to obtain the overall standard deviation of this discrete basis set. For example, this standard deviation is 0.25W.
[0048] After obtaining the above statistical parameters, the stable coefficient of variation is obtained by dividing the larger of the standard deviation, the absolute value of the arithmetic mean, and the preset power lower limit that is greater than 0. For example, when the standard deviation is 0.25W, the arithmetic mean is 12.5W, and the preset power lower limit is 1W, since 12.5W is greater than 1W, 12.5W is used as the denominator to calculate the stable coefficient of variation as 0.02. A fixed proportional constant and a preset stabilization term are further configured, where the fixed proportional constant can be set in the range of 0.01 to 0.1. Assuming the fixed proportional constant is 0.05 and the preset stabilization term is 0.001, dividing 0.05 by the sum of the stable coefficient of variation 0.02 and the preset stabilization term 0.001 yields an event weight of approximately 2.38 for this state transition event. This mechanism enables events with relatively stable power ground states before the transition to receive higher weights, thereby increasing the influence of highly reliable events in multi-source information fusion decision-making.
[0049] S3, Bayesian update probability, weighted fusion to determine phase separation and correct measurement.
[0050] Based on temporal relevance, the posterior probability of a specific user belonging to each phase attribution type is updated within the Bayesian inference framework. Phase attribution types include single-phase and multi-phase connection combinations. Confidence judgment conditions are set using event weights, and a discrimination threshold is determined based on the event weights. When the difference between the highest and second-highest posterior probabilities is greater than the threshold, it is judged as a high-confidence result. Multiple high-confidence results are accumulated, and the corresponding posterior probabilities are weighted and fused according to the event weights of each event to determine the phase attribution with the highest weighted cumulative probability, and the phase measurement data is corrected accordingly.
[0051] The state space for phase attribution types is defined as seven discrete states, including phases A, B, and C, as well as any two-phase and three-phase combinations thereof. During initialization, these seven states are assigned the same uniform prior probability. For each of the seven discrete states, a corresponding comprehensive temporal correlation is constructed based on the temporal correlation of each phase. This comprehensive temporal correlation is then input into a preset likelihood calculation model to obtain the likelihood corresponding to each phase attribution type. The preset likelihood calculation model uses a Gaussian probability density function with a mean of 1 (described later). Using Bayes' theorem, the likelihood of the current event is multiplied by the prior probability, and then divided by the sum of the products of the likelihood and prior probabilities of each phase attribution type. This process calculates and updates the posterior probability distribution of a specific user belonging to one of the seven phase attribution types.
[0052] After completing a probability update, the seven posterior probability values are sorted in descending order, and the highest posterior probability (ranked first) and the second highest posterior probability (ranked second) are extracted. A discrimination threshold function, inversely proportional to the event weight, is constructed by dividing a predefined constant benchmark discrimination threshold by the event weight. The difference between the highest and second highest posterior probabilities is calculated. If this difference is greater than the threshold, it indicates that the classification has sufficient discrimination, and the result is classified as a high-confidence outcome and added to the valid event pool.
[0053] For multiple high-confidence results accumulated within the valid event pool, the posterior probability distribution vector corresponding to each event is extracted, and each posterior probability distribution vector is multiplied by its corresponding event weight. The weighted probability vectors are then summed element-wise over the time dimension of the multiple events to obtain the fused comprehensive probability distribution vector. The index of the maximum value in this comprehensive probability distribution vector is identified; the state corresponding to this index is the actual phase assignment determined for a specific user.
[0054] Based on the determined phase assignment results, an SQL update statement is generated and written to the device topology mapping table in the underlying relational database to update the association between the target user and the actual phase. At the same time, using SQL aggregation query statements, the power consumption of users who were assigned to other phases due to the original incorrect phase assignment in the historical metering data is re-collected and accumulated and adjusted, thereby realizing the correction of the phase metering data of the power metering box.
[0055] In an optional embodiment, the posterior probability of a specific user belonging to each phase affiliation type is updated within the Bayesian inference framework based on temporal relevance, including: A phase classification library is constructed, which includes seven independent categories: single-phase A, single-phase B, single-phase C, two-phase AB, two-phase BC, two-phase CA, and three-phase ABC. The initial prior probability of each category is equally assigned to one-seventh. A Gaussian probability density function with a mean center of 1 and a fixed variance is established as the benchmark model for likelihood calculation. The difference between the arithmetic mean of the time-series correlation of the assigned phases and the arithmetic mean of the time-series correlation of the non-assigned phases is calculated as the comprehensive time-series correlation of each phase assignment type. If there are no non-assigned phases, the arithmetic mean of the time-series correlation of the non-assigned phases is taken as 0. The comprehensive time-series correlation of each phase assignment type is substituted into the baseline model to calculate the likelihood that a specific user belongs to the above 7 phase assignment types under the current handover event. The initial prior probability is multiplied by the likelihood calculated in this study to obtain the unnormalized posterior probability of each classification type. Calculate the sum of the unnormalized posterior probabilities of all 7 attribution types as the normalized denominator, and divide the unnormalized posterior probability of each attribution type by the normalized denominator to obtain the updated posterior probability.
[0056] In the initialization phase, a phase attribution type library containing 7 possibilities is established, and the initial prior probability array is assigned the values [0.1428, 0.1428, ..., 0.1428]. The fixed variance parameter in the Gaussian distribution probability density function is determined through offline search, for example, configured to 0.05. The constructed baseline model is... Taking the "two-phase AB" attribution type as an example, assuming the extracted time-series correlations of phases A, B, and C are 0.85, 0.81, and 0.10 respectively, the arithmetic mean of the attributed phases is 0.83, and the average of the non-attributed phases is 0.10. The difference between the two yields the comprehensive time-series correlation x = 0.73. For the "three-phase ABC" type, since there are no non-attributed phases in the fully attributed type, the three-phase mean is taken and 0 is subtracted.
[0057] Substituting the comprehensive temporal relevance x=0.73 into the established Gaussian baseline model, the likelihood corresponding to type "two-phase AB" is calculated, for example, to be 0.82. Using the Bayesian update rule, the prior probability 0.1428 is multiplied by the likelihood 0.82, yielding the unnormalized posterior probability of "two-phase AB" as 0.117. After calculating the likelihood and unnormalized posterior probability for all 7 feature classes, these 7 unnormalized probability values are summed to obtain the normalized denominator, for example, a sum of 0.455. Each unnormalized probability is divided by 0.455 to ensure the sum of probabilities equals 1, where the updated posterior probability of "two-phase AB" becomes approximately 0.257.
[0058] In an optional embodiment, multiple high-confidence results are accumulated, and the corresponding posterior probabilities are weighted and fused according to the event weights of each result to determine the phase attribution with the highest weighted cumulative probability, including: An independent counter accumulator is built for each user, and the upper limit threshold for the number of judgments is set to M, where M is a positive integer, as the judgment condition for stopping data collection; Each time a high-confidence result is obtained, the posterior probabilities of the seven phase attribution types calculated for this event are multiplied by the event weight for this event to obtain a single weighted probability vector. By summing the single-weighted probability vectors of users under M high-confidence events, the total cumulative weighted values of the 7 attribution types are obtained; Divide the total cumulative weighted value of each attribution type by the sum of the event weights of M events to obtain the weighted fusion probability of each attribution type; The phase attribution type corresponding to the maximum weighted fusion probability is selected as the phase attribution for the user.
[0059] Initialize a counter variable and a 1×7 dimensional accumulation array for each individual user MAC address in the storage area or cache. The counter variable increments by 1 when a specific user's state transition meets a threshold condition. Assuming that in the first high-confidence event, the calculated event weight coefficient is 2.0, and the posterior probability vectors for the seven types are [0.8, 0.05, 0.05, 0.03, 0.02, 0.02, 0.03], multiply the weight coefficient by all elements of the above vectors to obtain a single-event weighted probability vector of [1.6, 0.1, 0.1, 0.06, 0.04, 0.04, 0.06], and store it in the accumulation array.
[0060] When the value of the accumulator reaches a set upper limit threshold, the data settlement mechanism is triggered. For example, if the upper limit threshold for the number of judgments is 6, the sum of the event weights in these 6 judgment events is 12.0, and the total cumulative weighted value corresponding to "Single Phase A" recorded in the accumulator array reaches 10.5. By performing division, the weighted fusion probability of "Single Phase A" is calculated to be 0.875. The weighted fusion probability values of the 7 types are traversed, the index category "Single Phase A" corresponding to the maximum value of 0.875 is determined, and this is output as the judgment result. This mechanism helps reduce the risk of misjudgment caused by single abnormal fluctuations and improves the stability of fusion decisions.
[0061] In an optional embodiment, correcting phase metering data includes: Extract the original registration and attribution data of the target users from the record management system in the metering backend; The determined phase classification is compared with the extracted original registration phase classification file data for consistency. If the two are consistent, the original system files will remain unchanged, and the calibration process will be stopped. If there is a discrepancy between the two, the original registration data of the classification and attribution in the file management system will be overwritten and replaced. Based on the updated phase assignment, the mapping relationship between the target user equipment and the underlying metering module is re-established. Then, according to the updated mapping relationship, under the energy conservation constraints of single-phase full allocation and multi-phase shared allocation, the phase power consumption of the electricity metering box is redistributed and the metering data is corrected.
[0062] Based on the interface of the electricity information collection system, the system extracts the archive information from the database by inputting the meter identification number of the target user, and parses out the original registered phase assignment archive data, such as "Original Phase: Phase B". If the determined phase assignment is "Single Phase A", an inconsistency is detected during the comparison process. After triggering a modification transaction, an update command is sent to the archive management system to change "Phase B" to "Phase A" in the corresponding field of the database, thereby completing the update of the background virtual topology ledger.
[0063] In the metering mapping correction stage, the main control chip rewrites the phase guidance parameters used for correlation calculation in the energy meter register according to the updated ledger relationship. If the user's phase is classified as "single-phase A", the underlying metering module will include the user's total independent electricity consumption in the input node of the A-phase line loss calculation for accumulation and summarization; while if the user is classified as "two-phase AB", the underlying module will divide the user's electricity consumption by 2 and distribute it equally among the virtual calculation summaries of A-phase and B-phase at a ratio of 50%, so that the overall transformer area metering follows the principle of energy conservation in node summarization, improving the accuracy of transformer area line loss rate calculation.
[0064] The ablation experiment was conducted based on the operating environment of three typical distribution areas under the jurisdiction of a power supply station. The experiment deployed 150 user smart switches and corresponding three-phase energy meters, continuously collecting 1-second-level synchronous time-series data for 30 days, during which a total of 8450 load state switching events were triggered. Four comparison schemes were set up: Scheme 1 was the complete application of the entire process of this invention; Scheme 2 removed the first-order difference processing and norm normalization of the response time-series template, replacing it with the calculation of the Euclidean distance of the original power sequence; Scheme 3 removed the event weight allocation mechanism based on the stabilized coefficient of variation, assigning all switching events the same fixed weight of 1 for Bayesian updates; Scheme 4 removed the Bayesian inference and the multi-timescale cumulative fusion mechanism with a preset number of iterations, relying solely on the maximum similarity of a single power mutation to determine phase affiliation.
[0065] Experimental results show that Scheme 1 can identify the phase affiliation of most users, with a phase identification accuracy rate of 99.3% and an average absolute error of 0.12% in calculating the transformer area line loss rate. Scheme 2 has a phase identification accuracy rate of 82.5% and a line loss calculation error of 0.85%. Scheme 3 has a phase identification accuracy rate of 91.4% and a line loss calculation error of 0.46%. Scheme 4 has a phase identification accuracy rate of 75.8%, but experienced multiple misjudgments during peak electricity consumption periods, leading to errors in ledger association, and an average absolute error of 1.35% in calculating the transformer area line loss rate. A comparison of the average absolute errors in calculating the transformer area line loss rate for the four schemes is provided below. Figure 3 As shown.
[0066] The above results indicate that first-order difference and norm normalization help reduce the constant term error caused by static base load and system grid drift, improving the stability of time-series correlation calculation. The event weight allocation mechanism based on stabilized coefficient of variation enables switching events triggered under a stable ground state to receive relatively higher fusion weights, reducing the interference of complex background grid noise on phase identification results. The Bayesian posterior probability framework and the mechanism of accumulating multiple high-confidence events help reduce the random judgment bias caused by single abnormal load fluctuations, improving the stability of phase attribution fusion decisions and metering data correction.
[0067] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A phase-by-phase metering correction method for energy metering boxes based on intelligent switch coordination, characterized in that, The process includes the following steps: S1, acquiring the total power time-series data of each phase in the power metering box, and the independent power consumption time-series data of each user's smart switch; S2, when a state switch change for a specific user is detected, extracting the independent power consumption time-series data for a preset time period before and after the change and performing differential processing to generate a response time-series template representing the change event; simultaneously, extracting the total power time-series data of each phase during the time period and performing differential processing, calculating the norm-normalized cross-correlation coefficient between the data and the response time-series template, which serves as the time-series correlation between the user and each phase; and calculating the stabilized coefficient of variation based on the independent power consumption time-series data of the specific user before the change. S3, based on the stable coefficient of variation, the event weight of this switching event is determined; S4, based on the temporal correlation, the posterior probability of a specific user belonging to each phase classification type is updated within the Bayesian inference framework. The phase classification type includes each single phase and multi-phase connection combination; confidence judgment conditions are set using event weights, and the discrimination threshold is determined based on the event weights. When the difference between the highest posterior probability and the second highest posterior probability is greater than the threshold, it is judged as a high-confidence result; multiple high-confidence results are accumulated, and the corresponding posterior probabilities are weighted and fused according to the event weights of each event to determine the phase classification with the largest weighted cumulative probability, and the phase measurement data is corrected accordingly.
2. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 1, characterized in that, Acquire the total power time-series data of each phase in the power metering box, as well as the independent power consumption time-series data of each user's smart switch. This includes: setting the three-phase power meter installed at the input end of the power metering box to collect the total active power data of each phase according to a preset acquisition cycle; acquiring the total active power values of phases A, B, and C at the current moment according to the preset acquisition cycle, and recording them in chronological order to form the total power time-series data of each phase; setting each user's smart switch to upload its own instantaneous active power value according to the corresponding data reporting cycle; adding a timestamp to the power values uploaded by each user's smart switch and storing them sequentially; merging the power values uploaded by the same user's smart switch at consecutive moments into an independent power sequence to form independent power consumption time-series data.
3. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 2, characterized in that, When a state switch of a specific user's smart switch is detected to have changed state, the independent power consumption time-series data for a preset time period before and after the switch is extracted and differentially processed to generate a response time-series template representing the switching event. This includes: when a sudden change in the instantaneous active power of the target smart switch is detected and exceeds a preset change threshold, a state switch event is determined to have occurred; based on the time of the power change, sampling data before and after the reference time is extracted according to a preset extraction duration to form a local extraction window, and the corresponding independent power consumption time-series data within the local extraction window is extracted; first-order differential processing is performed on the independent power consumption time-series data within the local extraction window, and the difference between the value of each sampling point and the value of the previous adjacent sampling point is calculated to generate a response time-series template representing the transient fluctuation characteristics of the switching event.
4. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 1, characterized in that, The norm-normalized cross-correlation coefficients of the data and the response timing template are calculated separately to serve as the user's timing correlation with each phase. This includes: performing first-order difference processing on the total power timing data within the time intervals of phases A, B, and C; calculating the arithmetic mean of the differencing sequence; subtracting the arithmetic mean from the values at each sampling point; and removing the DC bias to obtain a zero-mean corrected total power sequence; calculating the arithmetic mean of the response timing template; subtracting the arithmetic mean from each value within the template to obtain a zero-mean ground-state template sequence; calculating the vector inner product of the corrected total power sequence and the ground-state template sequence, which serves as the cross-correlation numerator; calculating the L2 norm of the corrected total power sequence and the ground-state template sequence, and using their product as the normalized denominator constant; and dividing the cross-correlation numerator by the normalized denominator constant to obtain the norm-normalized cross-correlation coefficient for each phase, which serves as the user's timing correlation with the corresponding phase.
5. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 1, characterized in that, The stabilized coefficient of variation is calculated based on the time-series data of independent power consumption before a specific user's switchover, and the event weight of this switchover event is determined based on the stabilized coefficient of variation. This includes: extracting the independent power consumption values within a preset historical period before the target smart switch's state switchover, as a discrete base set; calculating the arithmetic mean of each independent power consumption value within the discrete base set; calculating the sum of squares of the differences between each independent power consumption value and the arithmetic mean within the discrete base set, and performing meanization and square root processing based on the number of sampling points within the discrete base set to obtain the standard deviation of the discrete base set; dividing the standard deviation by the maximum value between the absolute value of the arithmetic mean and the preset power lower limit greater than 0 to obtain the stabilized coefficient of variation; setting a fixed proportional constant and a preset stability term, dividing the fixed proportional constant by the sum of the stabilized coefficient of variation and the preset stability term, and using the calculation result as the event weight of this state switchover event.
6. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 1, characterized in that, Based on temporal relevance, the posterior probability of a specific user belonging to each phase classification type is updated within the Bayesian inference framework. This includes: constructing a phase classification type library containing seven independent categories: single-phase A, single-phase B, single-phase C, two-phase AB, two-phase BC, two-phase CA, and three-phase ABC; assigning an initial prior probability of one-seventh to each type; establishing a Gaussian probability density function with a mean of 1 and a fixed variance as the scale, as the benchmark model for likelihood calculation; calculating the arithmetic mean difference between the temporal relevance of each phase classification type to the corresponding classified and unclassified phases to obtain the comprehensive temporal relevance, with a mean of 0 when there is no corresponding unclassified phase; and substituting the comprehensive temporal relevance of each type into the benchmark model to solve for the likelihood of the user corresponding to the seven phase classification types under the current switching event.
7. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 6, characterized in that, Also includes: The initial prior probability is multiplied by the calculated likelihood term by term to obtain the unnormalized posterior probability of each classification type. Calculate the sum of the unnormalized posterior probabilities of all 7 attribution types as the normalized denominator, and divide the unnormalized posterior probability of each attribution type by the normalized denominator to obtain the updated posterior probability.
8. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 1, characterized in that, Accumulate multiple high-confidence results, and weight and fuse the corresponding posterior probabilities according to the weight of each event to determine the phase assignment with the maximum weighted cumulative probability. This includes: constructing an independent counter accumulator for each user, setting an upper limit threshold of M judgments, where M is a positive integer, as the criterion for stopping data collection; when a high-confidence result is obtained, multiplying the posterior probabilities of the 7 phase assignment types calculated for this event by the event weight of this event to obtain a single-event weighted probability vector; accumulating the single-event weighted probability vectors of the user under M high-confidence events to obtain the total cumulative weighted value of the 7 assignment types; dividing the total cumulative weighted value of each assignment type by the sum of the event weights of the M events to obtain the weighted fusion probability of each assignment type; and selecting the phase assignment type corresponding to the maximum weighted fusion probability as the user's phase assignment.
9. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 7, characterized in that, The process of correcting phase-by-phase metering data includes: extracting the original registration phase-by-phase attribution data of the target user from the record management system in the metering backend; comparing the determined phase attribution with the extracted original registration phase-by-phase attribution data; if they match, maintaining the original system record and stopping the correction process; if they do not match, using the phase attribution to overwrite and replace the original registration phase-by-phase attribution data in the record management system; and, based on the updated phase attribution, re-establishing the mapping relationship between the target user's equipment and the underlying metering module, and, according to the updated mapping relationship, redistributing and correcting the phase-by-phase power consumption of the electricity metering box under the energy conservation constraints of single-phase full allocation and multi-phase shared allocation.
10. The method for phase-by-phase metering correction of an energy metering box based on intelligent switch coordination according to claim 2, characterized in that, The user's smart switch is an intelligent miniature circuit breaker. When acquiring switch data, clock alignment is completed at the communication gateway layer through the network time protocol.
Citation Information
Patent Citations
A method and apparatus for identifying the phase sequence and line-household relationship of a transformer substation.
CN111881415B