Single-phase intelligent electric energy meter with fault self-diagnosis function

CN122545925APending Publication Date: 2026-08-11SHANDONG DEYUAN POWER TECHNOLOGY CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明实施例提供了一种具有故障自诊断功能的单相智能电能表,以解决如何提高基于谐波成分进行用户侧的用电电能质量分析的准确性,进而增强用户侧的用电风险识别的问题

Benefits of technology

[0036]本发明中,通过对电压时序序列和电流时序序列进行短时傅里叶变换,并通过构建时间窗口,对每个时间窗口内的电压谐波和电流谐波进行融合分析处理,得到综合谐波程度,用于引入负荷时序序列分析每个时间窗口内的电网质量评价值,实现对“谐波—负荷”耦合关系的动态刻画;同时,通过DTW算法提取电网质量与负荷之间的时序关联性及电网质量自身的时序一致性,建立历史行为模式,以从负荷相似性与时间周期性两个维度分析每个非监测窗口对监测窗口在相对异常判断中的参考程度,进而对每个非监测窗口与监测窗口之间的相对电网质量差异进行自适应加权,最终形成基于历史模式的相对异常程度,也即是电网质量相对异常程度,实现电网异常识别,相较于单一谐波指标的方法,本发明能够有效区分正常用电扰动与异常工况,提高电能质量评估的准确性与适应性,增强用户侧电网运行的安全性与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122545925A_ABST
    Figure CN122545925A_ABST
Patent Text Reader

Abstract

This invention relates to the field of data processing technology, and in particular to a single-phase smart energy meter with fault self-diagnosis function. The meter includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps: acquiring the voltage, current, and load time sequence of the user-side single-phase smart energy meter at the current moment; dividing time windows and analyzing harmonics to obtain the comprehensive harmonic level; then acquiring the power grid quality evaluation value sequence; recording the window containing the current moment as the monitoring window; based on the coupling relationship between the power grid quality evaluation value sequence and the load time sequence, and the consistency of the sequence itself, acquiring the reference degree of each non-monitoring window to the monitoring window; and using the reference degree and the power grid quality evaluation value, obtaining the relative abnormality degree of the power grid quality of the monitoring window for use in fault anomaly early warning at the current moment. This can distinguish between normal power disturbances and abnormal operating conditions, improving the accuracy and adaptability of power quality assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a single-phase smart energy meter with a fault self-diagnosis function. Background Technology

[0002] In residential and small-scale commercial electricity consumption scenarios, single-phase smart meters, as core devices for electricity metering and consumption information collection, are widely used in household power distribution systems. In actual use, users typically connect various types of electrical equipment such as televisions, refrigerators, air conditioners, chargers, and switching power supplies. Some of these devices, due to manufacturing quality differences, aging, or abnormal operation, are prone to introducing power quality disturbances such as harmonics, voltage fluctuations, and transient impacts during operation. These disturbances are characterized by their suddenness, wide propagation range, and high concealment. They can couple to other electrical equipment in the same circuit through the power distribution line, thus affecting the stable operation of precision electrical equipment. In other words, when individual electrical devices are in faulty or abnormal operating conditions, the resulting electrical disturbances are difficult to identify in a timely manner, and the related impacts gradually accumulate in the power system, thereby increasing the electricity consumption risks for users and the uncertainty of equipment operation.

[0003] In existing technologies, signal analysis methods such as short-time Fourier transform are commonly used to extract and analyze harmonic components in the power grid to assess the power quality on the user side. However, in the actual power consumption process on the user side, the generation of harmonic components not only originates from power grid or electrical equipment faults and abnormalities, but is also closely related to the type of electrical equipment connected to the user. For example, chargers, switching power supplies, and variable frequency air conditioners are all typical nonlinear loads, which will also generate a certain degree of harmonic components under normal operating conditions. Therefore, judging the power quality on the user side solely based on the amount of extracted harmonic components can easily misjudge normal power consumption behavior as faulty or abnormal conditions, or mask real equipment faults within the normal harmonic background.

[0004] Therefore, improving the accuracy of user-side power quality analysis based on harmonic components, and thus enhancing the identification of user-side power consumption risks, has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a single-phase smart energy meter with fault self-diagnosis function to solve the problem of how to improve the accuracy of power quality analysis on the user side based on harmonic components, thereby enhancing the identification of power consumption risks on the user side.

[0006] This invention provides a single-phase smart energy meter with self-diagnostic fault function, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps:

[0007] At the current moment, acquire the voltage time sequence, current time sequence and load time sequence collected by the single-phase smart energy meter on the user side within a preset time period;

[0008] Using a window of preset length and a sliding step size, the preset time period is divided into multiple time windows. Based on the voltage time sequence and the current time sequence, the voltage harmonics and current harmonics in each time window are fused and analyzed to obtain the comprehensive harmonic level in each time window.

[0009] Based on the comprehensive harmonic level and the load time series, the power grid quality evaluation value within each time window is obtained, forming a power grid quality evaluation value sequence; the time window containing the current moment is recorded as the monitoring window; based on the temporal coupling relationship between the power grid quality evaluation value sequence and the load time series, as well as the temporal consistency of the power grid quality evaluation value sequence itself, the reference degree of each non-monitoring window to the monitoring window in relative anomaly judgment is obtained respectively.

[0010] By utilizing the reference level and power grid quality evaluation value of each non-monitoring window, a relative anomaly analysis is performed on the power grid quality evaluation value of the monitoring window to obtain the relative anomaly degree of power grid quality of the monitoring window, which is used to provide early warning of fault anomalies in the power grid quality of the user side at the current moment.

[0011] Preferably, the step of performing fusion analysis on the voltage harmonics and current harmonics within each time window based on the voltage time sequence and the current time sequence to obtain the comprehensive harmonic level within each time window includes:

[0012] The voltage time series and the current time series are respectively subjected to frequency domain transformation to obtain voltage spectrum and current spectrum;

[0013] For any given time window, the voltage harmonic level within that time window is obtained based on the frequency and amplitude corresponding to that time window in the voltage spectrum diagram; the current harmonic level within that time window is obtained based on the frequency and amplitude corresponding to that time window in the current spectrum diagram.

[0014] Calculate the average value of the voltage harmonic level and the current harmonic level, obtain the maximum value of the voltage harmonic level and the current harmonic level, and perform a weighted summation of the average value and the maximum value to obtain the comprehensive harmonic level within any time window.

[0015] Preferably, obtaining the voltage harmonic level within any time window based on the frequency and amplitude corresponding to any time window in the voltage spectrum includes:

[0016] Calculate the square of the absolute value of the difference between each frequency and the fundamental frequency corresponding to any time window in the voltage spectrum, and record it as the weight of the corresponding frequency; obtain the amplitude corresponding to the fundamental frequency in the voltage spectrum, and record it as the fundamental frequency amplitude; calculate the amplitude ratio between the amplitude of each frequency and the fundamental frequency amplitude corresponding to any time window in the voltage spectrum; perform weighted averaging on all amplitude ratios to obtain the average amplitude ratio; normalize the average amplitude ratio to obtain the voltage harmonic level within any time window.

[0017] Preferably, obtaining the degree of current harmonics within any time window based on the frequency and amplitude corresponding to any time window in the current spectrum includes:

[0018] Calculate the square of the absolute value of the difference between each frequency and the fundamental frequency corresponding to any time window in the current spectrum, and record it as the weight of the corresponding frequency; obtain the amplitude corresponding to the fundamental frequency in the current spectrum, and record it as the fundamental frequency amplitude; calculate the amplitude ratio between the amplitude of each frequency and the fundamental frequency amplitude corresponding to any time window in the current spectrum; perform weighted averaging on all amplitude ratios to obtain the average amplitude ratio; normalize the average amplitude ratio to obtain the current harmonic level within any time window.

[0019] Preferably, obtaining the power grid quality evaluation value for each time window based on the comprehensive harmonic level and the load time sequence includes:

[0020] ;

[0021] in, This represents the power grid quality evaluation value within the t-th time window, where 1 represents a constant. Used to adjust the ratio of the influence of harmonic variation characteristics to load state characteristics. Represents the normalization function. This represents the overall harmonic level within the t-th time window. This represents the overall harmonic distortion level within the (t-1)th time window, where e represents the natural constant. This represents the normalized value of the load mean corresponding to the t-th time window in the load time series. This represents the normalized value of the load mean corresponding to the (t-1)th time window in the load time series.

[0022] Preferably, the step of obtaining the reference degree of each non-monitoring window in the relative anomaly judgment of the monitoring window based on the temporal coupling relationship between the power grid quality evaluation value sequence and the load time series sequence, as well as the temporal consistency of the power grid quality evaluation value sequence itself, includes:

[0023] A time-series coupling relationship analysis is performed on the power grid quality evaluation value sequence and the load time series sequence to obtain a time-series correlation index; a time-series autocorrelation index is obtained by performing a self-time-series consistency analysis on the power grid quality evaluation value sequence.

[0024] For any non-monitoring window, the time-series correlation index and the time-series autocorrelation index are used to adaptively weight the load change difference and time-series interval distance between the non-monitoring window and the monitoring window, so as to obtain the reference degree of the non-monitoring window for the monitoring window in the relative anomaly judgment.

[0025] Preferably, the step of performing time-series coupling analysis on the power grid quality evaluation value sequence and the load time-series sequence to obtain time-series correlation indicators includes:

[0026] The power grid quality evaluation value sequence is divided into subsequences according to a preset time period, resulting in multiple numbered first subsequences; the load time series sequence is divided into subsequences according to a preset time period, resulting in multiple numbered second subsequences.

[0027] Calculate the DTW distance between the first and second subsequences under each identical number, normalize each DTW distance to obtain the normalized DTW distance, and use the difference between the constant 1 and the average of all normalized DTW distances as the temporal correlation index.

[0028] Preferably, the step of performing self-time series consistency analysis on the power grid quality evaluation value sequence to obtain a time series autocorrelation index includes:

[0029] The DTW distance between each pair of first subsequences is normalized to obtain the corresponding normalized distance. The mean of all normalized distances is obtained, and the difference between the constant 1 and the mean is used as the time series autocorrelation index.

[0030] Preferably, the step of using the time-series correlation index and the time-series autocorrelation index to adaptively weight the load change difference and time-series interval distance between any non-monitoring window and the monitoring window to obtain the reference degree of any non-monitoring window to the monitoring window in relative anomaly judgment includes:

[0031] ;

[0032] in, This represents the degree of reference of any non-monitoring window y to the monitoring window u in the judgment of relative anomalies, where 1 represents a constant. Represents the normalization function. This represents the normalized value of the load mean corresponding to the monitoring window u in the load time series. This represents the normalized value of the load mean corresponding to any non-monitoring window y in the load time series. This represents the time interval between the start time of any non-monitoring window y and the start time of the monitoring window u. This indicates the time-series correlation index. This represents the time-series autocorrelation index.

[0033] Preferably, the step of using the reference level and power grid quality evaluation value of each non-monitoring window to perform relative anomaly analysis on the power grid quality evaluation value of the monitoring window, and obtaining the relative anomaly degree of power grid quality of the monitoring window, includes:

[0034] The difference in power grid quality evaluation value between each non-monitoring window and the monitoring window is used as an exponent with the natural constant as the base to obtain the power grid quality level difference value between each non-monitoring window and the monitoring window. The reference degree of each non-monitoring window is used as the weight, and all power grid quality level difference values ​​are weighted and averaged to obtain the relative abnormality of power grid quality in the monitoring window.

[0035] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0036] In this invention, short-time Fourier transforms are performed on voltage and current time series sequences. By constructing time windows, voltage and current harmonics within each time window are fused and analyzed to obtain a comprehensive harmonic degree. This degree is then introduced into the load time series sequence analysis to determine the power grid quality evaluation value within each time window, achieving a dynamic characterization of the "harmonic-load" coupling relationship. Simultaneously, the DTW algorithm is used to extract the temporal correlation between power grid quality and load, as well as the temporal consistency of power grid quality itself. Historical behavior patterns are established to analyze the reference degree of each non-monitoring window to the monitoring window in relative anomaly judgment from two dimensions: load similarity and time periodicity. Furthermore, the relative power grid quality differences between each non-monitoring window and the monitoring window are adaptively weighted to ultimately form a relative anomaly degree based on historical patterns, which is also the relative anomaly degree of power grid quality. This enables power grid anomaly identification. Compared to methods using a single harmonic index, this invention can effectively distinguish between normal power disturbances and abnormal operating conditions, improving the accuracy and adaptability of power quality assessment and enhancing the safety and reliability of user-side power grid operation. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a flowchart of a fault self-diagnosis method for a single-phase smart energy meter provided in Embodiment 1 of the present invention. Detailed Implementation

[0039] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0040] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0041] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0042] This invention provides a single-phase smart energy meter with self-diagnosis function, including a processor and a memory. The processor executes a computer program stored in the memory to implement a self-diagnosis method for single-phase smart energy meters, such as... Figure 1 As shown, the method includes the following steps:

[0043] Step S101: At the current moment, acquire the voltage time sequence, current time sequence and load time sequence collected by the single-phase smart energy meter on the user side within a preset time period.

[0044] A single-phase smart meter includes a data acquisition module, a data storage module, a data analysis and intelligent monitoring module, and an anomaly warning module. To effectively monitor and warn of power quality anomalies caused by electrical equipment connected to the single-phase smart meter on the user side, the data acquisition module installed on the user side continuously collects power consumption data, including voltage, current, and load. After collecting the power consumption data, the data storage module inside the single-phase smart meter caches and manages the collected data. The data analysis and intelligent monitoring module then performs real-time power quality status assessment on the cached power consumption data. Finally, the anomaly warning module outputs anomaly alerts based on the real-time assessment results, thereby providing early warning of power quality degradation caused by harmonic disturbances resulting from abnormal connection or operation of electrical equipment.

[0045] When performing real-time power quality assessment on cached power consumption data, signal analysis methods such as short-time Fourier transform are typically used to extract and analyze harmonic components in the power grid to assess the power quality on the user side. However, in actual power consumption on the user side, the generation of harmonic components not only originates from power grid or electrical equipment malfunctions, but is also closely related to the type of electrical equipment connected to the user. For example, chargers, switching power supplies, and variable frequency air conditioners are all typical nonlinear loads, and will also generate a certain degree of harmonic components under normal operating conditions. For instance, when a user uses a charger and household appliances simultaneously, the system may detect an increase in harmonics, but this change does not necessarily indicate an abnormal power quality, thus reducing the accuracy of power quality assessment and early warning judgment, and affecting the effective identification of power consumption risks on the user side. Therefore, in order to improve the accuracy of single-phase smart meters in assessing power quality on the user side, this invention provides a method that combines user load and power consumption behavior characteristics to comprehensively analyze the power quality on the user side.

[0046] Specifically, firstly, taking a user as an example, the current time is recorded as the user's real-time monitoring time. Then, at the current time, the voltage time series, current time series, and load time series collected by the single-phase smart energy meter on the user's side within a preset time period are obtained. To ensure a full depiction of electricity consumption behavior and grid operation status, this embodiment of the invention sets the preset time period to one month up to the current time, that is, to obtain the voltage time series, current time series, and load time series within one month. Then, data analysis and intelligent monitoring are performed on the voltage time series, current time series, and load time series within one month to achieve the identification of power quality anomalies on the user's side at the current time. Specific data analysis and intelligent monitoring are described below.

[0047] Step S102: Using a window of preset length and a sliding step, the preset time period is divided into multiple time windows. Based on the voltage time sequence and the current time sequence, the voltage harmonics and current harmonics in each time window are fused and analyzed to obtain the comprehensive harmonic level in each time window.

[0048] While existing technologies can extract harmonic components from the power grid for power quality assessment using signal analysis methods such as short-time Fourier transform, relying solely on harmonic amplitude or traditional harmonic indices without considering load characteristics and their dynamic changes makes it difficult to effectively distinguish between harmonic fluctuations caused by normal electricity consumption and power quality degradation caused by abnormal operating conditions. This can easily lead to misjudgments or omissions. For example, when a user simultaneously uses a charger and other household appliances, the system may detect an increase in harmonic indices, but this change may only reflect a change in load type rather than an abnormal power grid quality. Furthermore, the characteristics of power grid disturbances vary significantly depending on the time of day and the combination of electrical equipment. Existing methods often rely on single time windows or static thresholds for judgment, lacking analysis of the dynamic evolution of power quality over time and its correlation with load changes. This makes it difficult to reflect the true changing patterns of power grid quality under different electricity consumption scenarios, resulting in insufficient adaptability of the assessment results to complex electricity consumption scenarios.

[0049] Therefore, in this embodiment of the invention, a preset time period is first divided into multiple time windows using a preset window length and a sliding step size to address the shortcomings of a single time window analysis. Specifically, the preset length is set to 1 second, i.e., the window length is 1 second, and the sliding step size is half the window length, thus dividing the preset time period into multiple time windows of 1 second length. It should be noted that the window length and sliding step size can be adjusted according to actual application requirements: when the window is too small, it is easy to cause large fluctuations in the harmonic analysis results; when the window is too large, it may reduce the response capability to sudden disturbances. Therefore, a trade-off can be made between analysis stability and detection sensitivity in combination with the actual scenario. Then, a short-time Fourier transform is used to perform frequency domain transformation on the voltage time series and the current time series, respectively, to obtain the voltage spectrum and current spectrum. Frequency domain transformation is an existing technology and will not be described in detail here. Finally, the frequency distribution characteristics of voltage and current within each time window are analyzed based on the voltage spectrum and current spectrum.

[0050] Taking the t-th time window as an example, based on the frequency and amplitude corresponding to the t-th time window in the voltage spectrum, the voltage harmonic level within the t-th time window is obtained: the square of the absolute value of the difference between each frequency corresponding to the t-th time window in the voltage spectrum and the fundamental frequency is calculated, and denoted as the weight of the corresponding frequency; the amplitude corresponding to the fundamental frequency is obtained in the voltage spectrum, and denoted as the fundamental frequency amplitude; the amplitude ratio between the amplitude of each frequency corresponding to the t-th time window in the voltage spectrum and the fundamental frequency amplitude is calculated; all amplitude ratios are weighted and averaged to obtain the average amplitude ratio; the average amplitude ratio is normalized to obtain the voltage harmonic level within the t-th time window.

[0051] In one embodiment, the formula for calculating the voltage harmonic level within the t-th time window is:

[0052]

[0053] in, This indicates the degree of voltage harmonics within the t-th time window. This represents the normalization function, used to standardize the calculation results. This represents the maximum frequency corresponding to the t-th time window in the voltage spectrum. This represents the minimum frequency corresponding to the t-th time window in the voltage spectrum. , Let S and S represent the s-th frequency and its corresponding amplitude in the voltage spectrum for the t-th time window, respectively. This indicates the fundamental frequency; the standard power frequency for power systems is 50 Hz. The value represents the amplitude corresponding to the fundamental frequency in the voltage spectrum diagram, and | represents the absolute value sign.

[0054] It should be noted that, This ratio is used to characterize the energy proportion of the s-th frequency relative to the fundamental frequency within the t-th time window. The larger this ratio is, the more significant the impact of the s-th frequency on power quality. This is used to apply nonlinear weighting to the degree of frequency offset, thereby enhancing the role of high-frequency harmonics in the comprehensive index and reflecting the differences in the impact of different frequency harmonics on the power grid and electrical equipment.

[0055] Similarly, following the method for obtaining the voltage harmonic level within the t-th time window, the current harmonic level within the t-th time window is obtained based on the frequency and amplitude corresponding to the t-th time window in the current spectrum diagram. Calculate the square of the absolute value of the difference between each frequency and the fundamental frequency corresponding to the t-th time window in the current spectrum diagram, and denote it as the weight of the corresponding frequency; obtain the amplitude corresponding to the fundamental frequency in the current spectrum diagram, and denote it as the fundamental frequency amplitude; calculate the amplitude ratio between the amplitude of each frequency and the fundamental frequency amplitude corresponding to the t-th time window in the current spectrum diagram; perform weighted averaging on all amplitude ratios to obtain the average amplitude ratio; and normalize the average amplitude ratio to obtain the current harmonic level in the t-th time window.

[0056] After obtaining the voltage and current harmonic levels within the t-th time window, to further characterize the overall harmonic features within the t-th time window, the harmonic performance of both voltage and current signals is comprehensively considered. A fusion process is performed on both to obtain the comprehensive harmonic level within the t-th time window: the average value of the voltage and current harmonic levels is calculated, the maximum value of the voltage and current harmonic levels is obtained, and a weighted sum is performed on the average and the maximum value to obtain the comprehensive harmonic level within the t-th time window. The formula for calculating the comprehensive harmonic level within the t-th time window is as follows:

[0057]

[0058] in, This represents the overall harmonic level within the t-th time window. As a weighting factor, This represents the function that takes the maximum value. This indicates the degree of voltage harmonics within the t-th time window. This represents the degree of current harmonics within the t-th time window.

[0059] It should be noted that the weighting factor To adjust the relationship between the overall harmonic level and the dominant local harmonics, in power quality analysis, voltage and current harmonics usually show strong consistency under normal operating conditions, and the mean value can well reflect the overall harmonic level. However, under local equipment abnormalities, the two may deviate significantly, and the maximum value can more sensitively reflect abnormal disturbances. Therefore, by introducing a weighting factor... This achieves an adaptive balance between overall characteristics and local anomalies. In this embodiment, to improve the overall stability of power quality assessment and avoid excessive influence of local transient fluctuations on the results, The value is 0.6. It should be noted that this value is only a preferred implementation method. In actual applications, the value can be adjusted according to the requirements of stability and sensitivity in the monitoring scenario. This represents the average of the voltage and current harmonic levels, used to reflect the overall harmonic level within the t-th time window. This indicates the maximum value of the two values, used to characterize the local dominant harmonic features, thereby highlighting possible abnormal disturbances in a single signal. When there is a significant difference between the voltage harmonic level and the current harmonic level, this term can enhance the sensitivity to abnormal sources.

[0060] According to the method for obtaining the comprehensive harmonic level within the t-th time window, the comprehensive harmonic level within each time window is obtained respectively. By integrating voltage harmonics and current harmonics, the overall power quality status can be characterized while taking into account the characteristics of local abnormal harmonics. This allows the comprehensive harmonic level to not only reflect the overall level of power grid harmonics but also to have a higher response capability to abnormal disturbances, thus providing a more reliable characteristic basis for subsequent power grid quality evaluation and anomaly identification in conjunction with load characteristics.

[0061] Step S103: Based on the comprehensive harmonic level and load time sequence, obtain the power grid quality evaluation value within each time window to form a power grid quality evaluation value sequence; denote the time window containing the current moment as the monitoring window; based on the temporal coupling relationship between the power grid quality evaluation value sequence and the load time sequence, as well as the temporal consistency of the power grid quality evaluation value sequence itself, obtain the reference degree of each non-monitoring window for the monitoring window in the relative anomaly judgment.

[0062] Considering that the number and operating status of user-side electrical equipment can affect power quality during actual power consumption, such as aging or failure of capacitors during equipment connection and operation, harmonic components may increase, and harmonic disturbances typically intensify with the increase in the number of connected devices. Therefore, in this embodiment of the invention, the operating quality of the power grid under different load and harmonic conditions is further integrated. The load average value within each time window is obtained based on the load time sequence within a preset period. The normalization function is used to normalize each load average value to obtain the corresponding normalized value, which is the normalized value W of the load average value within each time window. Based on the comprehensive harmonic level and the normalized value of the load average value within each time window, the power grid quality evaluation value for each time window is obtained. The formula for calculating the power grid quality evaluation value within the t-th time window is as follows:

[0063]

[0064] in, This represents the power grid quality evaluation value within the t-th time window, where 1 represents a constant. Used to adjust the ratio of the influence of harmonic variation characteristics to load state characteristics. Represents the normalization function. Indicates the overall harmonic level within, This represents the overall harmonic distortion level within the (t-1)th time window, where e represents the natural constant. This represents the normalized value of the load mean corresponding to the t-th time window in the load time series. This represents the normalized value of the load mean corresponding to the (t-1)th time window in the load time series.

[0065] It should be noted that, This is used to adjust the ratio of the influence of harmonic variation characteristics and load state characteristics, taking into account the relative influence characteristics of local disturbances and the whole. In this example, the value is set to 0.5 to balance the local disturbances and the overall influence. The specific setting can be selected according to actual needs. This represents the coefficient of variation of the overall harmonic intensity in the t-th time window compared to the (t-1)-th time window. This represents the change coefficient of electricity load in the t-th time window compared to the (t-1)-th time window. This ratio represents the dynamic response relationship between harmonic changes and load changes. When this ratio is large, it indicates that harmonic growth is more significant when load changes are not significant. In this case, it is more likely to be caused by factors such as the deterioration of the internal condition of the equipment, thus characterizing a higher degree of power grid disturbance. This represents the relative relationship between the harmonic level and the load level within the t-th time window. When this value is large, it indicates that a high harmonic level still occurs under low load conditions, suggesting poor power quality and the possible presence of abnormal electrical equipment or abnormal operating conditions.

[0066] Similarly, following the method for obtaining the power grid quality evaluation value within the t-th time window, the power grid quality evaluation value within each time window is obtained sequentially, and a power grid quality evaluation value sequence is formed according to the time sequence, thereby realizing a comprehensive assessment of the power grid operation quality and providing a basis for subsequent relative anomaly judgment based on historical time windows.

[0067] Furthermore, considering that the electricity consumption behavior of users and the types of electrical equipment connected to the power grid may have certain periodicity and correlation in the time dimension, the relationship between power grid quality and load changes, as well as the power grid quality itself, may exhibit certain evolutionary patterns in the time series. Therefore, in this embodiment of the invention, the temporal coupling relationship between the power grid quality evaluation value sequence and the load time series sequence, as well as the temporal consistency of the power grid quality evaluation value sequence itself, are analyzed to provide a basis for subsequent anomaly identification and relative deviation assessment based on historical patterns.

[0068] First, a time-series coupling analysis is performed on the power grid quality evaluation value sequence and the load time-series sequence to obtain a time-series correlation index, which is used to characterize the time-series correlation between the power grid quality evaluation value sequence and the load time-series sequence: the power grid quality evaluation value sequence is divided into subsequences according to a preset time-series period, resulting in multiple numbered first subsequences; the load time-series sequence is also divided into subsequences according to a preset time-series period, resulting in multiple numbered second subsequences; the DTW distance between the first and second subsequences with the same number is calculated, and each DTW distance is normalized to obtain a normalized DTW distance. The difference between the constant 1 and the average value of all normalized DTW distances is used as the time-series correlation index.

[0069] In one embodiment, the power grid quality evaluation value sequence and the load time series sequence are divided into multiple subsequences according to a daily time period. The subsequence of the power grid quality evaluation value sequence is designated as the first subsequence, and the subsequence of the load time series sequence is designated as the second subsequence. That is, the preset time period is divided into multiple days, so that one first subsequence and one second subsequence can be obtained each day. Then, based on the first subsequence and the second subsequence of each day, the time series correlation index between the power grid quality evaluation value sequence and the load time series sequence is analyzed.

[0070]

[0071] in, This represents a time-series correlation index, where 1 indicates a constant. This indicates the number of days to be divided into the preset time period. Represents the normalization function. This represents the first subsequence of the power grid quality evaluation value sequence on day r. This represents the second subsequence of the load time series on day r. This represents the Dynamic Time Warping (DTW) distance.

[0072] It should be noted that D The DTW distance between the first and second subsequences on day r is used to measure the similarity of two time series even when there is a time axis offset. The smaller the value, the more consistent the temporal changes of the two, and the stronger the temporal correlation between the power grid quality evaluation value sequence and the load time sequence.

[0073] Then, a time-series consistency analysis is performed on the power grid quality evaluation value sequence to obtain the time-series autocorrelation index: the DTW distance between each pair of first subsequences is normalized to obtain the corresponding normalized distance, the mean of all normalized distances is obtained, and the difference between the constant 1 and the mean is used as the time-series autocorrelation index. The calculation formula for the time-series autocorrelation index is as follows:

[0074]

[0075] in, This represents the time-series autocorrelation index, where 1 indicates a constant. This indicates the number of pairwise combinations between the first subsequences. Represents the normalization function. This represents the DTW distance between the two first subsequences under the z-th combination.

[0076] It should be noted that, The smaller the value, the higher the similarity between the first subsequences, and the stronger the time-series autocorrelation of the corresponding power grid quality evaluation value sequence.

[0077] After quantifying the time-series correlation index characterizing the "grid quality-load coupling relationship" and the time-series autocorrelation index characterizing the "time-series correlation of grid quality itself," the time window containing the current moment is designated as the monitoring window, and the remaining time windows are designated as non-monitoring windows, also representing historical time windows. Furthermore, using the time-series correlation index and the time-series autocorrelation index, adaptive weighting is applied to the load change differences and time intervals between historical time windows and monitoring windows to analyze the reference degree of each historical time window to the monitoring window in relative anomaly judgment. Taking any non-monitoring window y as an example, the reference degree of any non-monitoring window y to the monitoring window u in relative anomaly judgment is as follows:

[0078]

[0079] in, This represents the degree of reference of any non-monitoring window y to the monitoring window u in the judgment of relative anomalies, where 1 represents a constant. Represents the normalization function. This represents the normalized value of the load mean corresponding to the monitoring window u in the load time series. This represents the normalized value of the load mean corresponding to any non-monitoring window y in the load time series. This represents the time interval between the start time of any non-monitoring window y and the start time of the monitoring window u. Indicators representing time-series correlation This represents the time-series autocorrelation index.

[0080] It should be noted that, This represents the load level difference between any non-monitoring window y and the monitoring window u. The smaller the load level difference, the closer the electricity load structure of the two windows is, and the higher the load reference value of any non-monitoring window y for the monitoring window u. This is achieved by introducing a time-series correlation index to represent the strength of the correlation between power grid quality and load. This is to achieve adaptive weighting when performing correlation analysis on this dimension; It represents the distance between any non-monitoring window y and monitoring window u on the time axis. It is calculated based on a circular time coordinate with a period of 24 hours. That is, it does not consider the number of days in which the time window is located, but only the interval between specific moments. This is used to describe the time difference between two time periods corresponding to any non-monitoring window y and monitoring window u. The smaller the interval, the closer the operating conditions, and the higher the reference value of any non-monitoring window y. This is achieved by introducing the autocorrelation of power grid quality in the time dimension. It can be used to implement adaptive weighting when performing correlation analysis on this dimension.

[0081] Similarly, following the method for obtaining the reference degree of any non-monitoring window y to the monitoring window u in the relative anomaly judgment, the reference degree of each non-monitoring window to the monitoring window in the relative anomaly judgment is obtained respectively.

[0082] Step S104: Using the reference level and power grid quality evaluation value of each non-monitoring window, perform relative anomaly analysis on the power grid quality evaluation value of the monitoring window to obtain the relative anomaly degree of power grid quality of the monitoring window, which is used to provide early warning of fault anomalies in the power grid quality of the user side at the current moment.

[0083] Based on the reference level of each non-monitoring window, the power grid quality of the monitoring window is relatively abnormally assessed by introducing the power grid quality evaluation value of each non-monitoring window: the difference between the power grid quality evaluation value of each non-monitoring window and the monitoring window is used as an exponent with the natural constant as the base to obtain the power grid quality level difference value between each non-monitoring window and the monitoring window. The reference level of each non-monitoring window is used as the weight to perform a weighted average of all power grid quality level difference values ​​to obtain the relative abnormality of the power grid quality of the monitoring window.

[0084] The formula for calculating the relative degree of power grid quality anomaly in the monitoring window is as follows:

[0085]

[0086] in, K represents the relative degree of power grid quality anomaly within the monitoring window, and K represents the number of non-monitoring windows. This represents the power grid quality evaluation value within any non-monitoring window y. This represents the power grid quality evaluation value within the monitoring window u, where e represents the natural constant. This indicates the degree to which any non-monitoring window y is referenced to the monitoring window u in the judgment of relative anomalies.

[0087] It should be noted that, This value is used to characterize the relative difference in power grid quality levels between any non-monitoring window y and the monitoring window u. When the power grid quality of any non-monitoring window y is better than that of the monitoring window u, The value of increases, thereby enhancing the ability to characterize abnormal states within the monitoring window. When the power grid quality of monitoring window u is better than that of any non-monitoring window y, The smaller the value, the less likely the monitoring window is to be in an abnormal state; at the same time, the reference level of any non-monitoring window y is used for weighting to reflect the principle that "the higher the historical similarity, the greater the impact on the current judgment." Therefore, The larger the value, the better. The larger the value, the greater the relative anomaly in the power grid quality within the corresponding monitoring window.

[0088] After obtaining the relative degree of power grid quality anomaly within the monitoring window, in order to effectively determine and warn of abnormal states, this embodiment further constructs an anomaly determination and early warning triggering mechanism:

[0089] A threshold is set to determine the relative anomaly level of power grid quality. If the relative anomaly level of power grid quality in the monitoring window exceeds a certain proportion of the historical reference level, it is determined to be an abnormal state. For example, when the relative anomaly level of power grid quality in the monitoring window is greater than 70% of the historical reference value (exemplary threshold), an early warning can be triggered. Alternatively, a statistical method can be used to set the threshold. Based on the relative anomaly level of power grid quality in the historical monitoring window, an adaptive threshold can be constructed using multiple standard deviations (such as the 3σ criterion) to improve adaptability under different power consumption scenarios.

[0090] When the monitoring window indicates an abnormal power grid quality, the early warning module outputs an early warning signal and can execute corresponding protection or control measures, such as triggering the single-phase smart meter to disconnect (trip) to prevent abnormal power from damaging electrical equipment. Simultaneously, the abnormal information is uploaded to a remote terminal system via the single-phase smart meter's built-in communication module. The remote system then sends alerts (such as SMS messages or application notifications) to the user's terminal, thus providing timely early warnings and feedback to the user.

[0091] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A single-phase smart energy meter with self-diagnostic fault function, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: At the current moment, acquire the voltage time sequence, current time sequence and load time sequence collected by the single-phase smart energy meter on the user side within a preset time period; Using a window of preset length and a sliding step size, the preset time period is divided into multiple time windows. Based on the voltage time sequence and the current time sequence, the voltage harmonics and current harmonics in each time window are fused and analyzed to obtain the comprehensive harmonic level in each time window. Based on the comprehensive harmonic level and the load time series, the power grid quality evaluation value within each time window is obtained, forming a power grid quality evaluation value sequence; the time window containing the current moment is recorded as the monitoring window; based on the temporal coupling relationship between the power grid quality evaluation value sequence and the load time series, as well as the temporal consistency of the power grid quality evaluation value sequence itself, the reference degree of each non-monitoring window to the monitoring window in relative anomaly judgment is obtained respectively. By utilizing the reference level and power grid quality evaluation value of each non-monitoring window, a relative anomaly analysis is performed on the power grid quality evaluation value of the monitoring window to obtain the relative anomaly degree of power grid quality of the monitoring window, which is used to provide early warning of fault anomalies in the power grid quality of the user side at the current moment.

2. A single-phase smart energy meter with fault self-diagnosis function according to claim 1, characterized in that, The step of performing a fusion analysis on the voltage harmonics and current harmonics within each time window based on the voltage time sequence and the current time sequence to obtain the comprehensive harmonic level within each time window includes: The voltage time series and the current time series are respectively subjected to frequency domain transformation to obtain voltage spectrum and current spectrum; For any given time window, the voltage harmonic level within that time window is obtained based on the frequency and amplitude corresponding to that time window in the voltage spectrum diagram; the current harmonic level within that time window is obtained based on the frequency and amplitude corresponding to that time window in the current spectrum diagram. Calculate the average value of the voltage harmonic level and the current harmonic level, obtain the maximum value of the voltage harmonic level and the current harmonic level, and perform a weighted summation of the average value and the maximum value to obtain the comprehensive harmonic level within any time window.

3. A single-phase smart energy meter with fault self-diagnosis function according to claim 2, characterized in that, The step of obtaining the voltage harmonic level within any given time window based on the frequency and amplitude corresponding to that time window in the voltage spectrum includes: Calculate the square of the absolute value of the difference between each frequency and the fundamental frequency corresponding to any time window in the voltage spectrum, and record it as the weight of the corresponding frequency; obtain the amplitude corresponding to the fundamental frequency in the voltage spectrum, and record it as the fundamental frequency amplitude; calculate the amplitude ratio between the amplitude of each frequency and the fundamental frequency amplitude corresponding to any time window in the voltage spectrum; perform weighted averaging on all amplitude ratios to obtain the average amplitude ratio; normalize the average amplitude ratio to obtain the voltage harmonic level within any time window.

4. A single-phase smart energy meter with fault self-diagnosis function according to claim 2, characterized in that, The step of obtaining the degree of current harmonics within any given time window based on the frequency and amplitude corresponding to that time window in the current spectrum includes: Calculate the square of the absolute value of the difference between each frequency and the fundamental frequency corresponding to any time window in the current spectrum, and record it as the weight of the corresponding frequency; obtain the amplitude corresponding to the fundamental frequency in the current spectrum, and record it as the fundamental frequency amplitude; calculate the amplitude ratio between the amplitude of each frequency and the fundamental frequency amplitude corresponding to any time window in the current spectrum; perform weighted averaging on all amplitude ratios to obtain the average amplitude ratio; normalize the average amplitude ratio to obtain the current harmonic level within any time window.

5. A single-phase smart energy meter with fault self-diagnosis function according to claim 1, characterized in that, The process of obtaining the power grid quality evaluation value for each time window based on the comprehensive harmonic level and the load time sequence includes: ; in, This represents the power grid quality evaluation value within the t-th time window, where 1 represents a constant. Used to adjust the ratio of the influence of harmonic variation characteristics to load state characteristics. Represents the normalization function. This represents the overall harmonic level within the t-th time window. This represents the overall harmonic distortion level within the (t-1)th time window, where e represents the natural constant. This represents the normalized value of the load mean corresponding to the t-th time window in the load time series. This represents the normalized value of the load mean corresponding to the (t-1)th time window in the load time series.

6. A single-phase smart energy meter with fault self-diagnosis function according to claim 1, characterized in that, The step of obtaining the reference level of each non-monitoring window in the relative anomaly judgment of the monitoring window based on the temporal coupling relationship between the power grid quality evaluation value sequence and the load time series sequence, as well as the temporal consistency of the power grid quality evaluation value sequence itself, includes: A time-series coupling relationship analysis is performed on the power grid quality evaluation value sequence and the load time series sequence to obtain a time-series correlation index; a time-series autocorrelation index is obtained by performing a self-time-series consistency analysis on the power grid quality evaluation value sequence. For any non-monitoring window, the time-series correlation index and the time-series autocorrelation index are used to adaptively weight the load change difference and time-series interval distance between the non-monitoring window and the monitoring window, so as to obtain the reference degree of the non-monitoring window for the monitoring window in the relative anomaly judgment.

7. A single-phase smart energy meter with fault self-diagnosis function according to claim 6, characterized in that, The time-series coupling relationship analysis of the power grid quality evaluation value sequence and the load time-series sequence yields time-series correlation indicators, including: The power grid quality evaluation value sequence is divided into subsequences according to a preset time period, resulting in multiple numbered first subsequences; the load time series sequence is divided into subsequences according to a preset time period, resulting in multiple numbered second subsequences. Calculate the DTW distance between the first and second subsequences under each identical number, normalize each DTW distance to obtain the normalized DTW distance, and use the difference between the constant 1 and the average of all normalized DTW distances as the temporal correlation index.

8. A single-phase smart energy meter with fault self-diagnosis function according to claim 7, characterized in that, The self-time consistency analysis of the power grid quality evaluation value sequence to obtain the time-series autocorrelation index includes: The DTW distance between each pair of first subsequences is normalized to obtain the corresponding normalized distance. The mean of all normalized distances is obtained, and the difference between the constant 1 and the mean is used as the time series autocorrelation index.

9. A single-phase smart energy meter with fault self-diagnosis function according to claim 6, characterized in that, The step of using the time-series correlation index and the time-series autocorrelation index to adaptively weight the load change difference and time-series interval distance between any non-monitoring window and the monitoring window to obtain the reference degree of any non-monitoring window to the monitoring window in relative anomaly judgment includes: ; in, This represents the degree of reference of any non-monitoring window y to the monitoring window u in the judgment of relative anomalies, where 1 represents a constant. Represents the normalization function. This represents the normalized value of the load mean corresponding to the monitoring window u in the load time series. This represents the normalized value of the load mean corresponding to any non-monitoring window y in the load time series. This represents the time interval between the start time of any non-monitoring window y and the start time of the monitoring window u. This indicates the time-series correlation index. This represents the time-series autocorrelation index.

10. A single-phase smart energy meter with fault self-diagnosis function according to claim 1, characterized in that, The method involves using the reference level and power grid quality evaluation value of each non-monitoring window to perform relative anomaly analysis on the power grid quality evaluation value of the monitoring window, thereby obtaining the relative anomaly degree of power grid quality of the monitoring window, including: The difference in power grid quality evaluation value between each non-monitoring window and the monitoring window is used as an exponent with the natural constant as the base to obtain the power grid quality level difference value between each non-monitoring window and the monitoring window. The reference degree of each non-monitoring window is used as the weight, and all power grid quality level difference values ​​are weighted and averaged to obtain the relative abnormality of power grid quality in the monitoring window.