Single-phase electric energy meter fault detection method and system based on carrier channel

Through the fault detection method of the carrier channel, combined with the MCU-controlled ADC sampling circuit and trend analysis algorithm, real-time fault detection and adaptive communication judgment of single-phase power meter are realized, solving the real-time and accuracy problems of power meter fault detection in the prior art, and improving the health status perception capability of the power meter.

CN120559567AActive Publication Date: 2025-08-29JIANGSU TONGCHI POWER AUTOMATION
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511056743.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-08-29
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

The existing single-phase power meter fault detection method relies on background response recording, and cannot judge faults in real time at the meter end. The voltage and communication abnormality recognition accuracy is low, and it is impossible to distinguish communication abnormality from equipment abnormality. It also lacks trend analysis and adaptive communication judgment capabilities in the power carrier communication environment.

Method used

The fault detection method based on carrier channel is adopted, and the abnormal judgment is made on the communication interface voltage and carrier load voltage through the MCU-controlled ADC sampling circuit combined with the trend analysis algorithm, and a dual-mode recognition processing is designed, including basic diagnosis and prediction diagnosis, standard input vectors are constructed, and real-time electrical parameter acquisition and event information acquisition are carried out.

Benefits of technology

It improves the timeliness and accuracy of fault identification, enhances the robustness and adaptability of communication initialization, improves the expression ability and generalization performance of the fault diagnosis model, and realizes the health status perception and adaptive diagnosis of the power meter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120559567A_ABST
    Figure CN120559567A_ABST
Patent Text Reader

Abstract

The invention discloses a single-phase electric energy meter fault detection method and system based on a carrier channel, and relates to the technical field of electric energy meter fault detection. An ADC sampling circuit controlled by an MCU is combined with a trend analysis algorithm to carry out abnormity judgment on a communication interface voltage and a carrier load voltage and establish communication; obtaining real-time electric parameters and event information according to abnormity judgment and communication result establishment, and constructing a standard input vector; and performing dual-mode identification processing by taking the standard input vector as input, and writing a result data structure. According to the method, abnormity judgment of the communication voltage and the carrier load voltage is carried out by adopting a trend analysis algorithm, the problem that the voltage fluctuation trend cannot be accurately captured by traditional static threshold judgment is solved, and the timeliness and the precision of fault identification are improved. A dual-protocol and multi-Baud-rate step-by-step handshake mechanism is designed, and the phenomenon that fixed communication parameters cannot be compatible with different meters is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric energy meter fault detection, and in particular to a single-phase electric energy meter fault detection method and system based on a carrier channel. Background Art

[0002] Single-phase electricity meters, as user-side metering terminals, are widely used in residential electricity metering and management scenarios. Some low-voltage power users' terminal electricity meters communicate with concentrators or data collection systems via power line carriers for meter reading and status monitoring. However, because the power line carrier communication path involves transformers, cables, and on-site loads, it is susceptible to interference from various factors, such as voltage fluctuations, load variations, and poor line contact. This can lead to unstable communication, data loss, and even frequent meter failures.

[0003] In existing technologies, the detection of abnormal operation of electricity meters often relies on background communication interruption records or periodic data comparisons, and cannot detect in real time whether there are potential abnormalities at the meter end, such as crystal oscillator drift, severe voltage fluctuations, or long-term abnormalities in the metering unit. In addition, traditional fault identification methods often use fixed rule settings, such as determining the number of consecutive communication failures, exceeding voltage upper and lower limits, and other indicators, lacking the ability to dynamically analyze abnormal trends. At the same time, some existing solutions rely on upper-level data collection systems and lack the ability for the meter end to independently judge and respond. It is difficult to distinguish between communication anomalies and hardware failures in a timely manner, affecting the efficiency of fault location and the formulation of on-site maintenance strategies.

[0004] To address the above issues, there is an urgent need for a fault detection method that can independently perform voltage sampling, communication judgment, anomaly identification, and structured fault data generation at the electricity meter end, especially in a power carrier communication environment with trend analysis, adaptive communication judgment, and multi-factor diagnosis capabilities, so as to improve the real-time and accuracy of fault judgment and assist in achieving the goal of health status perception on the distributed electricity meter side. Summary of the Invention

[0005] In view of the above-mentioned problems, the present invention is proposed.

[0006] Therefore, the technical problem solved by the present invention is: the existing single-phase electricity meter fault detection method relies on background response records, cannot judge the fault in real time at the meter end, has low accuracy in identifying voltage and communication anomalies, cannot distinguish between communication failure and equipment anomalies, and how to realize fault judgment and structured data generation at the terminal through trend analysis, voltage sampling and communication adaptive mechanism in the power carrier communication scenario.

[0007] To solve the above technical problems, the present invention provides the following technical solution: a single-phase electric energy meter fault detection method based on a carrier channel, comprising collecting a communication interface voltage and a carrier load voltage and performing preprocessing.

[0008] Through the ADC sampling circuit controlled by the MCU and combined with the trend analysis algorithm, the abnormality of the communication interface voltage and the carrier load voltage is judged and communication is established.

[0009] According to the abnormal judgment and communication results, real-time electrical parameters and event information are obtained and a standard input vector is constructed.

[0010] Takes a standard input vector as input, performs bimodal recognition processing, and writes the result data structure.

[0011] As a preferred solution of the single-phase electric energy meter fault detection method based on the carrier channel described in the present invention, the acquisition of the communication interface voltage and the carrier load voltage includes using a voltage sampling circuit to connect the carrier load output end and the communication interface voltage end in parallel to a voltage-dividing resistor network, the carrier load voltage is divided by a first voltage-dividing resistor pair consisting of a series structure of 100k ohms and 10k ohms, and the communication interface voltage is divided by a second voltage-dividing resistor pair consisting of a series structure of 50k ohms and 10k ohms. After voltage division, the signal is connected to the analog-to-digital conversion channel inside the MCU, and the analog-to-digital conversion channel continuously samples each voltage at a frequency of 1kHz, and records each group of continuous voltage sampling data in an on-chip storage buffer area.

[0012] Voltage sampling data is input into trend judgment via DMA mode, supporting the execution of real-time judgment logic.

[0013] As a preferred solution of the single-phase electric energy meter fault detection method based on the carrier channel described in the present invention, the ADC sampling circuit controlled by the MCU is combined with the trend analysis algorithm, including that the MCU calls the internal analog-to-digital conversion module to synchronously sample the connected communication interface voltage and the carrier load voltage signal at a frequency of 1kHz, and each channel continuously obtains 1000 data points per second, and performs mean calculation according to every 8 sampling points as a group to obtain the average voltage value of the current time window.

[0014] The mean values ​​of the last three time windows are saved, and the mean difference between the current window and the previous window is calculated one by one to obtain the voltage change trend.

[0015] In each set of 8-point sampling, the difference between the maximum and minimum values ​​is calculated as the voltage fluctuation amplitude of the current window, and the obtained voltage mean, voltage change trend and fluctuation amplitude are output as characteristic parameters within the sampling period.

[0016] As a preferred solution of the single-phase electric energy meter fault detection method based on the carrier channel described in the present invention, the abnormality judgment includes the MCU comparing the voltage mean, voltage change trend and fluctuation amplitude with the preset static voltage threshold, voltage drop threshold and fluctuation limit respectively.

[0017] If the average value of any window is lower than 83% of the communication interface voltage calibration value of 3.3V and the load voltage calibration value of 12V, it is judged as a low voltage abnormality.

[0018] If the mean values ​​of two consecutive windows show a decreasing trend and the mean difference exceeds the set minimum change threshold of 0.5V, it is judged as a trend voltage drop.

[0019] If the difference between the maximum and minimum values ​​exceeds the set fluctuation limit of 1.5V, it is judged as unstable fluctuation.

[0020] Establishing communication includes, when the communication permission flag is activated, the MCU starts the communication initialization process, and tries multiple baud rate parameters in sequence to establish communication, each baud rate corresponds to a protocol handshake attempt.

[0021] The baud rate sequence includes 2400bps, 3600bps, 4800bps, 9600bps, 19200bps, 38400bps, 57600bps, and 115200bps.

[0022] At each baud rate, try to use the DL / T698-2017 protocol for communication handshake. If the handshake times out or the return value is abnormal, immediately fall back to the DL / T645-2007 protocol to perform the same handshake process.

[0023] During the communication handshake process, the MCU sends a standard data frame to the target electricity meter. If no valid response frame is received within the specified response time, it is recorded as a failure.

[0024] If any protocol successfully completes the frame response process, it is recorded as a successful communication establishment, and the corresponding protocol type and successful baud rate are recorded as the communication parameters of this session.

[0025] When any protocol is successfully established, the MCU outputs a communication success flag, activates the start signal of the data acquisition task, and sets the communication status symbol to a displayable state.

[0026] If the dual protocol attempts fail at all baud rates, a communication failure flag is output, and an F80 fault code is transmitted to the display module, and the current detection process is terminated.

[0027] As a preferred solution of the single-phase electric energy meter fault detection method based on the carrier channel described in the present invention, wherein: the acquisition of real-time electrical parameters and event information includes, after receiving the communication success mark, the MCU calls the protocol type and baud rate parameters determined in the current communication session, accesses the communication register address area of ​​the electric energy meter, and reads the current voltage instantaneous value, the most recent power factor value, the abnormal event status of the metering unit, and the abnormal event status of the crystal oscillator.

[0028] The abnormal event status of the metering unit includes the start time of the most recent abnormality, whether it has ended, and the event status flag.

[0029] The crystal oscillator abnormal event status includes the time when the most recent abnormality occurred and whether the status has been recovered.

[0030] For the power factor data, the MCU performs 10 consecutive read operations at an interval of 5 seconds, and caches the power factor data of the 10 time points in chronological order in the data buffer.

[0031] After the step is completed, the voltage value, power factor sequence and event status flag are output as a combined data group as the input source of the input vector construction step.

[0032] Constructing the standard input vector includes assembling the output voltage value, power factor sequence and event status flag into a standard structure data format according to a set sequence.

[0033] The standard structure data format includes a voltage average value field, a voltage fluctuation value field, 10 power factor fields and two event status flag fields.

[0034] The power factor fields are numbered PF1 to PF10 in chronological order. The voltage average value is calculated by taking a simple arithmetic average of the voltage values ​​within 10 sampling periods. The voltage fluctuation value is calculated by the difference between the maximum and minimum values. The final input vector maintains the field order unchanged and is written into the data receiving buffer for diagnostic processing according to the preset byte alignment rules.

[0035] The event status field includes a measurement abnormality flag and a crystal oscillator abnormality flag, both of which are stored as Boolean values.

[0036] As a preferred solution of the single-phase electricity meter fault detection method based on the carrier channel described in the present invention, the dual-mode recognition processing includes: after the diagnostic processing receives the input vector, it determines whether to enter the predictive diagnosis mode based on the total number of historical diagnostic samples recorded in the memory and the number of fault types covered.

[0037] If the number of historical samples is less than 300 or the number of recorded fault types is less than 20, the system enters the basic diagnosis mode.

[0038] In the basic diagnosis mode, the status field of the metering unit abnormal event flag in the input vector is used to determine whether there is an unrecovered metering fault. If the event flag is 1 and the end time is an illegal value, it is determined that the current metering unit is abnormal.

[0039] If the crystal oscillator abnormal event status field flag is 1 and the corresponding time field is abnormal, it is determined that the crystal oscillator is abnormal.

[0040] Determine whether the average voltage value in the input vector is lower than 198.6V or higher than 235.4V. If either condition is met, it is determined to be a voltage abnormality. At the same time, the 10 sets of power factor data read continuously are judged. If any three consecutive sets of them are less than 0.8 or a total of more than five sets are less than 0.8, it is determined to be a power factor abnormality.

[0041] When the amount of historical data is sufficient, the system enters the predictive diagnosis mode. The diagnostic process calls the lightweight analysis model stored in the MCU, inputs the fields of the input vector in the original order, analyzes the time series structure of the power factor, the voltage fluctuation characteristics and the combination pattern of the event flag state in the input vector, and compares and matches them with the built-in historical fault feature combination, and outputs the identification result based on the degree of matching.

[0042] Predictive diagnosis output includes basic judgment results, model identification labels and related feature explanation information.

[0043] As a preferred solution of the carrier channel-based single-phase electric energy meter fault detection method described in the present invention, the writing result data structure includes generating a result data packet by the diagnostic processing after the pattern recognition processing is completed.

[0044] The data packet includes the current system timestamp field, the original input vector field, the basic diagnosis judgment result, the predicted diagnosis output label, the manual feedback field and the training mark field.

[0045] The timestamp field uses the YYYYMMDDHHMMSS structure to record the current detection time.

[0046] The input vector fields include voltage average value, voltage fluctuation value, 10 groups of power factors, metering abnormal event bit, and crystal oscillator abnormal event bit.

[0047] The basic judgment result field is recorded in a predefined fault code format, and the prediction output label field records the output result and its related combination feature description code.

[0048] The manual feedback field is used for subsequent user verification input. The button interface or host computer software can be used to manually mark whether the judgment result is accurate. The mark value is recorded in Boolean type.

[0049] The training tag field is used to distinguish whether the sample will be included in the future model optimization process. If it is a high-confidence sample or a labeled sample, it is marked as 1, and if it is unconfirmed, it is marked as 0.

[0050] All fields are encapsulated and written into the EEPROM non-volatile storage unit in a set order. Each set of records occupies a fixed byte length. During the writing process, data updates are maintained according to the first-in-first-out strategy. After storing 500 records, the earliest data is automatically overwritten.

[0051] The written structure record serves as the training input for the model evolution mechanism and provides a data source for the LCD module.

[0052] Another object of the present invention is to provide a single-phase electricity meter fault detection system based on a carrier channel, which can make real-time judgments on the communication status through voltage sampling trend judgment combined with a dual-protocol handshake mechanism, solving the problem that the current electricity meter remote communication detection technology cannot effectively distinguish between communication anomalies and equipment failures and lacks independent judgment capabilities on the terminal side.

[0053] As a preferred solution of the single-phase electric energy meter fault detection system based on carrier channel described in the present invention, it includes: a voltage acquisition and preprocessing module, an abnormality judgment and communication establishment module, an electrical parameter reading and vector construction module, and a dual-mode diagnosis and result recording module.

[0054] The voltage acquisition and preprocessing module is used to acquire the communication interface voltage and the carrier load voltage and perform preprocessing.

[0055] The abnormality judgment and communication establishment module is used to judge the abnormality of the communication interface voltage and the carrier load voltage and establish communication through the ADC sampling circuit controlled by the MCU in combination with the trend analysis algorithm.

[0056] The electrical parameter reading and vector construction module is used to obtain real-time electrical parameters and event information and construct a standard input vector based on abnormal judgment and communication establishment results.

[0057] The dual-mode diagnosis and result recording module is used to perform dual-mode recognition processing on the standard input vector as input and write the result into the data structure.

[0058] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a single-phase electric energy meter fault detection method based on a carrier channel.

[0059] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a single-phase electric energy meter fault detection method based on a carrier channel.

[0060] Beneficial effects of the present invention: The carrier channel-based single-phase electricity meter fault detection method provided by the present invention uses a trend analysis algorithm to determine abnormalities in the communication voltage and carrier load voltage, resolving the problem that traditional static threshold judgment cannot accurately capture voltage fluctuation trends and improving the timeliness and accuracy of fault identification. A dual-protocol + multi-baud rate step-by-step handshake mechanism is designed to avoid the problem that fixed communication parameters are incompatible with different meters, enhancing the robustness and adaptability of communication initialization. A standard input vector structure is constructed and the power factor time series and event flag fields are introduced to address the problem of the narrow input dimension of existing methods, improving the expressiveness and generalization performance of the fault diagnosis model. A dual-mode recognition mechanism for basic diagnosis and predictive diagnosis is proposed, which can still execute rule judgment when historical samples are insufficient and switch to a lightweight model when samples are sufficient, achieving adaptive switching of diagnostic methods and improving initial deployment availability and later evolution capabilities. A unified structure is used to encapsulate diagnostic result data and support manual feedback and training labeling, facilitating continuous model optimization and data closure in the future, thus establishing a framework for a self-evolving diagnostic system with continuous learning. The present invention achieves better results in communication voltage anomaly analysis, diagnostic input standardization construction, and dual-mode recognition processing mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0062] Figure 1 This is an overall flow chart of a single-phase electric energy meter fault detection method based on a carrier channel provided in the first embodiment of the present invention.

[0063] Figure 2 A schematic structural diagram of a single-phase electric energy meter fault detection device based on a carrier channel provided in the first embodiment of the present invention. DETAILED DESCRIPTION

[0064] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.

[0065] Example 1, with reference to Figure 1-Figure 2 , as one embodiment of the present invention, provides a single-phase electric energy meter fault detection method based on a carrier channel, comprising: S1: Collect the communication interface voltage and carrier load voltage and perform preprocessing.

[0066] The voltage sampling circuit is used to connect the carrier load output terminal and the communication interface voltage terminal in parallel to the voltage divider resistor network.

[0067] The communication interface voltage is divided by a second voltage-dividing resistor pair, which is a series structure consisting of 50k ohms and 10k ohms.

[0068] A preferred solution for collecting the communication interface voltage is: ; in, Indicates the communication voltage sampling value sent to the MCU after voltage division. Indicates the original voltage value of the communication interface. 、 Indicates the communication voltage sampling divider resistor.

[0069] The carrier load voltage is divided by a first voltage-dividing resistor pair, which is a series structure consisting of 100k ohms and 10k ohms.

[0070] An optimal solution for collecting the carrier load voltage is: ; in, Indicates the carrier load voltage sampling value sent to the MCU after voltage division. Indicates the original voltage of the carrier load, 、 Represents the carrier load voltage dividing resistor.

[0071] The divided signal is connected to the analog-to-digital conversion channel inside the MCU. The analog-to-digital conversion channel continuously samples each voltage at a frequency of 1kHz and records each set of continuous voltage sampling data in the on-chip storage buffer.

[0072] Voltage sampling data is input into trend judgment via DMA mode, supporting the execution of real-time judgment logic.

[0073] Furthermore, the MCU calls the internal analog-to-digital conversion module to synchronously sample the connected communication interface voltage and the carrier load voltage signal at a frequency of 1kHz. Each channel continuously obtains 1000 data points per second, and performs mean calculation on every 8 sampling points as a group to obtain the average voltage value of the current time window.

[0074] A preferred solution for obtaining the average voltage value of the current time window is: ; in, Represents a time window The average voltage within Display window Neidi A voltage sampling value, Indicates the sampling point number in the voltage window.

[0075] The mean values ​​of the last three time windows are saved, and the mean difference between the current window and the previous window is calculated one by one to obtain the voltage change trend.

[0076] An optimal solution for obtaining the voltage variation trend is: ; in, Indicates the average voltage of the previous window, Indicates the current window voltage average value, Indicates the window number, Indicates the current window Same as the previous window The mean difference of .

[0077] In each set of 8-point sampling, the difference between the maximum and minimum values ​​is calculated as the voltage fluctuation amplitude of the current window, and the obtained voltage mean, voltage change trend and fluctuation amplitude are output as characteristic parameters within the sampling period.

[0078] A preferred solution for calculating the difference between the maximum and minimum values ​​as the current window voltage fluctuation amplitude is: ; in, Display window Internal voltage fluctuation range.

[0079] S2: Through the ADC sampling circuit controlled by the MCU and combined with the trend analysis algorithm, the communication interface voltage and the carrier load voltage are judged to be abnormal and communication is established.

[0080] The MCU compares the voltage average, voltage change trend, and fluctuation amplitude with the preset static voltage threshold, voltage drop threshold, and fluctuation limit respectively.

[0081] If the average value of any window is lower than 83% of the communication interface voltage calibration value of 3.3V and the load voltage calibration value of 12V, it is judged as a low voltage abnormality.

[0082] If the mean values ​​of two consecutive windows show a decreasing trend and the mean difference exceeds the set minimum change threshold of 0.5V, it is judged as a trend voltage drop.

[0083] If the difference between the maximum and minimum values ​​exceeds the set fluctuation limit of 1.5V, it is judged as unstable fluctuation.

[0084] Establishing communication includes, when the communication permission flag is activated, the MCU starts the communication initialization process, and tries multiple baud rate parameters in sequence to establish communication, each baud rate corresponds to a protocol handshake attempt.

[0085] The baud rate sequence includes 2400bps, 3600bps, 4800bps, 9600bps, 19200bps, 38400bps, 57600bps, and 115200bps.

[0086] At each baud rate, try to use the DL / T698-2017 protocol for communication handshake. If the handshake times out or the return value is abnormal, immediately fall back to the DL / T645-2007 protocol to perform the same handshake process.

[0087] During the communication handshake process, the MCU sends a standard data frame to the target electricity meter. If no valid response frame is received within the specified response time, it is recorded as a failure.

[0088] If any protocol successfully completes the frame response process, it is recorded as a successful communication establishment, and the corresponding protocol type and successful baud rate are recorded as the communication parameters of this session.

[0089] When any protocol is successfully established, the MCU outputs a communication success flag, activates the start signal of the data acquisition task, and sets the communication status symbol to a displayable state.

[0090] If the dual protocol attempts fail at all baud rates, a communication failure flag is output, and an F80 fault code is transmitted to the display module, and the current detection process is terminated.

[0091] S3: Based on the abnormal judgment and communication results, real-time electrical parameters and event information are obtained and a standard input vector is constructed.

[0092] After receiving the communication success flag, the MCU calls the protocol type and baud rate parameters determined in the current communication session, accesses the communication register address area of ​​the electricity meter, and reads the current instantaneous voltage value, the most recent power factor value, the abnormal event status of the metering unit, and the abnormal event status of the crystal oscillator.

[0093] The abnormal event status of the metering unit includes the start time of the most recent abnormality, whether it has ended, and the event status flag.

[0094] The crystal oscillator abnormal event status includes the time when the most recent abnormality occurred and whether the status has been recovered.

[0095] For the power factor data, the MCU performs 10 consecutive read operations at an interval of 5 seconds, and caches the power factor data of the 10 time points in chronological order in the data buffer.

[0096] After the step is completed, the voltage value, power factor sequence and event status flag are output as a combined data group as the input source of the input vector construction step.

[0097] An optimal solution for obtaining the power factor sequence is: ; in, Indicates the average value of the power factor, Indicates the The power factor collected at a time point, Indicates the power factor time series index.

[0098] Constructing the standard input vector includes assembling the output voltage value, power factor sequence and event status flag into a standard structure data format according to a set sequence.

[0099] A preferred approach to constructing the input vector is: ; in, represents the standard input vector, Indicates the average of the last 10 window voltage averages, Indicates the voltage fluctuation values ​​of the last 10 windows. Indicates the power factor sequence value, Indicates the abnormal event flag of the measurement unit. Indicates the crystal oscillator abnormal event flag.

[0100] The standard structure data format includes a voltage average value field, a voltage fluctuation value field, 10 power factor fields and two event status flag fields.

[0101] The power factor fields are numbered PF1 to PF10 in chronological order. The voltage average value is calculated by taking a simple arithmetic average of the voltage values ​​within 10 sampling periods. The voltage fluctuation value is calculated by the difference between the maximum and minimum values. The final input vector maintains the field order unchanged and is written into the data receiving buffer for diagnostic processing according to the preset byte alignment rules.

[0102] The event status field includes a measurement abnormality flag and a crystal oscillator abnormality flag, both of which are stored as Boolean values.

[0103] S4: Take the standard input vector as input for dual-mode recognition processing and write the result data structure.

[0104] After receiving the input vector, the diagnostic processing determines whether to enter the predictive diagnosis mode based on the total number of historical diagnostic samples recorded in the memory and the number of fault types covered.

[0105] If the number of historical samples is less than 300 or the number of recorded fault types is less than 20, the system enters the basic diagnosis mode.

[0106] In the basic diagnosis mode, the status field of the metering unit abnormal event flag in the input vector is used to determine whether there is an unrecovered metering fault. If the event flag is 1 and the end time is an illegal value, it is determined that the current metering unit is abnormal.

[0107] If the crystal oscillator abnormal event status field flag is 1 and the corresponding time field is abnormal, it is determined that the crystal oscillator is abnormal.

[0108] Determine whether the average voltage value in the input vector is lower than 198.6V or higher than 235.4V. If either condition is met, it is determined to be a voltage abnormality. At the same time, the 10 sets of power factor data read continuously are judged. If any three consecutive sets of them are less than 0.8 or a total of more than five sets are less than 0.8, it is determined to be a power factor abnormality.

[0109] When the amount of historical data is sufficient, the system enters the predictive diagnosis mode, and the diagnostic process calls the lightweight analysis model stored in the MCU.

[0110] The lightweight analysis model stored in the MCU includes a single hidden layer feedforward neural network, and the model training data is composed of sample pairs consisting of historically collected voltage average values, voltage fluctuation values, power factor sequences and abnormal flag fields.

[0111] A preferred solution for constructing model training data is: ; in, represents the training dataset, represents the total number of samples, Indicates the sample input vectors, Indicates the Fault category labels for samples.

[0112] The labels come from basic diagnostic judgments, and the training objective function is cross entropy loss.

[0113] An optimal solution for the training objective function is: ; in, represents the cross entropy loss, represents the total number of categories, Represents a sample Is it the first kind, Indicates the model The predicted probability of the class.

[0114] The model is iteratively optimized through the back-propagation algorithm and is ultimately used to predict the fault type to which the input vector belongs in real time.

[0115] A preferred solution for iterative optimization via the back-propagation algorithm is: ; in, represents the set of model parameters, represents the optimal parameters after training. It indicates that the optimization method is achieved through the back propagation algorithm.

[0116] The fields of the input vector are input in the original order. By analyzing the time series structure of the power factor, the voltage fluctuation characteristics and the combination pattern of the event flag state in the input vector, they are compared and matched with the built-in historical fault feature combination, and the recognition result is output according to the degree of matching.

[0117] A preferred solution for outputting recognition results is: ; in, represents the prediction model function, Represents the model recognition result.

[0118] Predictive diagnosis output includes basic judgment results, model identification labels and related feature explanation information.

[0119] After the pattern recognition process is completed, the diagnostic process generates a result data packet.

[0120] A preferred solution for generating result data packets from diagnostic processing is: ; in, Indicates the final encapsulated diagnostic data packet, Indicates the current system timestamp, Indicates the basic judgment result, Represents the predicted diagnosis result, Indicates manual feedback flag, Represents a training mark.

[0121] The data packet includes the current system timestamp field, the original input vector field, the basic diagnosis judgment result, the predicted diagnosis output label, the manual feedback field and the training mark field.

[0122] The timestamp field uses the YYYYMMDDHHMMSS structure to record the current detection time.

[0123] The input vector fields include voltage average value, voltage fluctuation value, 10 groups of power factors, metering abnormal event bit, and crystal oscillator abnormal event bit.

[0124] The basic judgment result field is recorded in a predefined fault code format, and the prediction output label field records the output result and its related combination feature description code.

[0125] The manual feedback field is used for subsequent user verification input. The button interface or host computer software can be used to manually mark whether the judgment result is accurate. The mark value is recorded in Boolean type.

[0126] The training tag field is used to distinguish whether the sample will be included in the future model optimization process. If it is a high-confidence sample or a labeled sample, it is marked as 1, and if it is unconfirmed, it is marked as 0.

[0127] All fields are encapsulated and written into the EEPROM non-volatile storage unit in a set order. Each set of records occupies a fixed byte length. During the writing process, data updates are maintained according to the first-in-first-out strategy. After storing 500 records, the earliest data is automatically overwritten.

[0128] The written structure record serves as the training input for the model evolution mechanism and provides a data source for the LCD module.

[0129] Example 2 is an embodiment of the present invention, which provides a single-phase electricity meter fault detection system based on a carrier channel, including a voltage acquisition and preprocessing module, an abnormality judgment and communication establishment module, an electrical parameter reading and vector construction module, and a dual-mode diagnosis and result recording module.

[0130] Among them, the voltage acquisition and preprocessing module is used to acquire the communication interface voltage and carrier load voltage and perform preprocessing.

[0131] The abnormality judgment and communication establishment module is used to judge the abnormality of the communication interface voltage and the carrier load voltage and establish communication through the ADC sampling circuit controlled by the MCU and the trend analysis algorithm.

[0132] The electrical parameter reading and vector construction module is used to obtain real-time electrical parameters and event information and construct standard input vectors based on abnormal judgment and communication establishment results.

[0133] The dual-mode diagnosis and result recording module is used to take the standard input vector as input to perform dual-mode recognition processing and write the result data structure.

Claims

1. A single-phase electric energy meter fault detection method based on a carrier channel is characterized in that: include: Collect the communication interface voltage and carrier load voltage and perform preprocessing; Through the ADC sampling circuit controlled by the MCU and combined with the trend analysis algorithm, the abnormality of the communication interface voltage and the carrier load voltage is judged and communication is established; According to the abnormal judgment and communication results, real-time electrical parameters and event information are obtained and standard input vectors are constructed; Takes a standard input vector as input, performs bimodal recognition processing, and writes the result data structure.

2. The single-phase electric energy meter fault detection method based on carrier channel according to claim 1, characterized in that: The acquisition of communication interface voltage and carrier load voltage includes: A voltage sampling circuit is used to connect the carrier load output terminal and the communication interface voltage terminal to a voltage-divider resistor network in parallel. The carrier load voltage is divided by a first voltage-divider resistor pair consisting of a series structure of 100k ohms and 10k ohms, and the communication interface voltage is divided by a second voltage-divider resistor pair consisting of a series structure of 50k ohms and 10k ohms. The divided signals are connected to the analog-to-digital conversion channel inside the MCU. The analog-to-digital conversion channel continuously samples each voltage at a frequency of 1kHz and records each set of continuous voltage sampling data in an on-chip storage buffer. Voltage sampling data is input into trend judgment via DMA mode, supporting the execution of real-time judgment logic.

3. The single-phase electric energy meter fault detection method based on carrier channel according to claim 2, characterized in that: The ADC sampling circuit controlled by the MCU combined with the trend analysis algorithm includes: The MCU uses the internal analog-to-digital conversion module to synchronously sample the connected communication interface voltage and the carrier load voltage signal at a frequency of 1kHz. Each channel continuously acquires 1000 data points per second, and performs mean calculation on every 8 sampling points as a group to obtain the average voltage value of the current time window. Save the average of the last three time windows and calculate the difference between the average of the current window and the previous window one by one to obtain the voltage change trend; In each set of 8-point sampling, the difference between the maximum and minimum values ​​is calculated as the voltage fluctuation amplitude of the current window, and the obtained voltage mean, voltage change trend and fluctuation amplitude are output as characteristic parameters within the sampling period.

4. The single-phase electric energy meter fault detection method based on carrier channel according to claim 3, characterized in that: The abnormality judgment includes: The MCU compares the voltage average, voltage change trend, and fluctuation amplitude with the preset static voltage threshold, voltage drop threshold, and fluctuation limit respectively; If the average value of any window is lower than 83% of the communication interface voltage calibration value of 3.3V and the load voltage calibration value of 12V, it is judged as a low voltage abnormality; If the mean values ​​of two consecutive windows show a decreasing trend and the mean difference exceeds the set minimum change threshold of 0.5V, it is judged as a trend voltage drop; If the difference between the maximum and minimum values ​​exceeds the set fluctuation limit of 1.5V, it is judged as unstable fluctuation; Establishing communication includes, when the communication permission flag is activated, the MCU starts the communication initialization process, and tries multiple baud rate parameters in sequence to establish communication, each baud rate corresponds to a protocol handshake attempt; The baud rate sequence includes 2400bps, 3600bps, 4800bps, 9600bps, 19200bps, 38400bps, 57600bps, and 115200bps; At each baud rate, try to use the DL / T698-2017 protocol for communication handshake. If the handshake times out or the return value is abnormal, immediately fall back to the DL / T645-2007 protocol to perform the same handshake process; During the communication handshake process, the MCU sends a standard data frame to the target energy meter. If no valid response frame is received within the specified response time, it is recorded as a failure; If any protocol successfully completes the frame response process, it is recorded as a successful communication establishment, and the corresponding protocol type and successful baud rate are recorded as the communication parameters of this session; When any protocol is successfully established, the MCU outputs a communication success flag, activates the start signal of the data acquisition task, and sets the communication status symbol to a displayable state; If the dual protocol attempts fail at all baud rates, a communication failure flag is output, and an F80 fault code is transmitted to the display module, and the current detection process is terminated.

5. The single-phase electric energy meter fault detection method based on carrier channel according to claim 4, characterized in that: The acquisition of real-time electrical parameters and event information includes: After receiving the communication success flag, the MCU calls the protocol type and baud rate parameters determined in the current communication session, accesses the communication register address area of ​​the electric energy meter, and reads the current instantaneous voltage value, the most recent power factor value, the abnormal event status of the metering unit, and the abnormal event status of the crystal oscillator; The abnormal event status of the metering unit includes the start time of the most recent abnormality, whether it has ended, and the event status flag; The crystal oscillator abnormal event status includes the time of the most recent abnormality and whether it has recovered; For power factor data, the MCU performs 10 consecutive read operations at 5-second intervals and caches the power factor data of the 10 time points in chronological order in the data buffer; After the step is completed, the voltage value, power factor sequence and event status flag are output as a combined data group as the input source of the input vector construction step; Constructing a standard input vector includes assembling the output voltage value, power factor sequence and event status flag into a standard structure data format according to a set order; The standard structure data format includes a voltage average value field, a voltage fluctuation value field, 10 power factor fields and two event status flag fields; The power factor fields are numbered PF1 to PF10 in chronological order. The voltage average value is calculated by taking a simple arithmetic average of the voltage values ​​within 10 sampling periods, and the voltage fluctuation value is calculated by the difference between the maximum and minimum values. The final input vector maintains the field order unchanged and is written into the data receiving buffer for diagnostic processing according to the preset byte alignment rules. The event status field includes a measurement abnormality flag and a crystal oscillator abnormality flag, both of which are stored as Boolean values.

6. The single-phase electric energy meter fault detection method based on carrier channel according to claim 5, characterized in that: The dual-mode recognition process includes, After receiving the input vector, the diagnostic processing determines whether to enter the predictive diagnosis mode based on the total number of historical diagnostic samples recorded in the memory and the number of fault types covered; If the number of historical samples is less than 300 or the number of recorded fault types is less than 20, the system enters the basic diagnosis mode; In the basic diagnosis mode, the status field of the metering unit abnormal event flag in the input vector is used to determine whether there is an unrecovered metering fault. If the event flag is 1 and the end time is an illegal value, the current metering unit is determined to be abnormal. If the crystal oscillator abnormal event status field flag is 1 and the corresponding time field is abnormal, it is determined that the crystal oscillator is abnormal; Determine whether the average voltage value in the input vector is lower than 198.6V or higher than 235.4V. If either condition is met, it is determined to be a voltage abnormality. At the same time, the 10 sets of power factor data read continuously are judged. If any three consecutive sets of values ​​are less than 0.8 or a total of more than five sets of values ​​are less than 0.8, it is determined to be a power factor abnormality. When the amount of historical data is sufficient, the system enters the predictive diagnosis mode. The diagnostic process calls the lightweight analysis model stored in the MCU, inputs the fields of the input vector in the original order, analyzes the time series structure of the power factor, voltage fluctuation characteristics, and event flag status combination in the input vector, and compares and matches them with the built-in historical fault feature combination. The identification result is output based on the degree of match. Predictive diagnosis output includes basic judgment results, model identification labels and related feature explanation information.

7. The single-phase electric energy meter fault detection method based on carrier channel according to claim 6, characterized in that: The write result data structure includes: After the pattern recognition process is completed, the diagnostic process generates a result data packet; The data packet includes the current system timestamp field, the original input vector field, the basic diagnosis judgment result, the predicted diagnosis output label, the manual feedback field, and the training mark field; The timestamp field uses the YYYYMMDDHHMMSS structure to record the current detection time; The input vector fields include voltage average value, voltage fluctuation value, 10 groups of power factors, metering abnormal event bit, and crystal oscillator abnormal event bit; The basic judgment result field is recorded in the predefined fault code format, and the prediction output label field records the output result and its related combination feature description code; The manual feedback field is used for subsequent user verification input. The accuracy of the judgment result can be manually marked through the button interface or the host computer software. The mark value is recorded in Boolean type. The training tag field is used to distinguish whether the sample will be included in the future model optimization process. If it is a high-confidence sample or a labeled sample, it is marked as 1, and if it is unconfirmed, it is marked as 0; All fields are encapsulated and written into the EEPROM non-volatile storage unit in a set order. Each set of records occupies a fixed byte length. During the writing process, data updates are maintained according to the first-in-first-out strategy. When 500 records are stored, the earliest data is automatically overwritten. The written structure record serves as the training input for the model evolution mechanism and provides a data source for the LCD module.

8. A system using the single-phase electric energy meter fault detection method based on a carrier channel according to any one of claims 1 to 7, characterized in that: It includes voltage acquisition and preprocessing module, abnormality judgment and communication establishment module, electrical parameter reading and vector construction module, dual-mode diagnosis and result recording module; The voltage acquisition and preprocessing module is used to acquire the communication interface voltage and the carrier load voltage and perform preprocessing; The abnormality judgment and communication establishment module is used to judge the abnormality of the communication interface voltage and the carrier load voltage and establish communication through the ADC sampling circuit controlled by the MCU in combination with the trend analysis algorithm; The electrical parameter reading and vector construction module is used to obtain real-time electrical parameters and event information and construct a standard input vector based on abnormal judgment and communication establishment results; The dual-mode diagnosis and result recording module is used to perform dual-mode recognition processing on the standard input vector as input and write the result into the data structure.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the single-phase electric energy meter fault detection method based on the carrier channel according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the single-phase electric energy meter fault detection method based on a carrier channel according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Field intelligent electric energy meter fault diagnosis method

    CN110398708A

  • Data acquisition and line loss analysis method based on broadband carrier

    CN115940429A

  • Electric energy meter remote monitoring trial hanging test system and method

    CN118074325A

  • Communication fault monitoring and passive meter reading system and method based on electric meter communication module

    CN119629511A

  • Detection method and system for ammeter load optimization

    CN120195614A