Electrical fire early warning method based on modular intelligent electric meter
Through modular smart meter and NILM model based on attention mechanism, the problem of insufficient electrical fire warning caused by limited functions of smart meter is solved, accurate early warning and prevention of electrical fires are achieved, and the safety and stability of the power system is ensured.
Patent Information
- Application Number
- CN202411360117.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing smart meter has limited functions and it is difficult to achieve accurate and accurate early warnings and warnings for electrical fires, resulting in insufficient timeliness and accuracy of fire warnings.
Using modular smart meter, a true experimental platform for fault arcs is built, fault arc signals are collected to build a sample library, and a NILM model based on attention mechanism is used to analyze the user load characteristic map, extract the characteristics of electrical fire triggers, and realize early warning of electrical fires and prevention and control.
Through the edge computing power of modular smart meters, the capture and handling of electrical fire triggers is achieved, the accuracy and timeliness of early warning of electrical fires is improved, and a three-level electrical fire prevention and control system has been built to ensure the safe and stable operation of the power system. .
Smart Images

Figure CN119296291A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrical fire warning, and in particular is an electrical fire warning method based on a modular smart meter. Background Art
[0002] Electricity meters are extremely important electrical devices in the power system. Their functions are to measure energy consumption, meter power usage, monitor voltage and current, and support smart grid management. These functions not only help power suppliers with billing and energy distribution optimization, but also ensure the stability and security of the power system, while providing data support for predicting and analyzing electricity demand, thereby promoting more effective energy management and policy formulation.
[0003] The concept of smart meters has been proposed for many years. For a long time, many scholars and engineers have devoted themselves to the research and improvement of smart meter functions. Contemporary smart meters have functions such as real-time measurement, data collection, information storage, user electricity data transmission, and fee control. They can temporarily meet the needs of the current national grid, but their functions are still relatively limited.
[0004] There are more than 100,000 electrical fire accidents in the country every year, and 70% of the major fires in the country are electrical fires. The causes of electrical fires are diverse, and their occurrence mechanisms and evolution processes are complex. It is difficult to detect and identify the causes of fires, and it is difficult to achieve accurate real-time early warning and alarm, which is an urgent problem to be solved in the prevention and control of electrical fires. In this case, if the characteristics of electrical fires can be sensed and warned through meter information, it is expected to improve the timeliness and accuracy of fire warnings. However, due to the limitations of the functions of conventional smart meters, it is difficult to achieve this goal. Summary of the invention
[0005] The technical problem to be solved by the present invention is: how to develop electrical fire early warning and forecasting technology based on modular smart meters, obtain electrical fire precursor information from user-side electricity consumption information, and realize real-time early warning and alarm of electrical fires.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] An electrical fire warning method based on modular smart meters is proposed. In this method, a modular smart meter with a certain sampling frequency and edge computing capability is used to build a real arc fault experimental platform, collect arc fault signals to build a arc fault sample library, build a user load characteristic map, and identify the user's abnormal power consumption status.
[0008] Preferably, the modular smart meter includes a metering module, a management module and an extension module, wherein the management module and the metering module are components of the electric energy meter, and the extension module is added or deleted according to the application scenario, and the modules are connected through hardware interfaces, and the interfaces are protected by circuits.
[0009] Preferably, the metering module includes a metering MCU, a storage unit, a real-time clock, and a current and voltage adopting circuit. The metering module serves as a base meter and is a non-detachable structure. The management module includes an LCD, a key control module, a relay, a memory, and an MCU. An embedded real-time multi-tasking operating system runs on the management module. The extension module includes a load identification module, an orderly charging control module, and a power quality module. The extension module serves as an extension unit of the meter function.
[0010] Preferably, the hardware circuit of the modular smart meter includes a digital isolation circuit and a hot-swap circuit; the digital isolation circuit uses a digital isolation chip to isolate the signal lines between modules; the hot-swap circuit includes a power line hot-swap circuit and a signal line hot-swap circuit, the power line hot-swap circuit uses a power management chip with model LM25061, and in the signal line hot-swap circuit, the power and ground pins are long pins, the data signal lines use medium-long pins, and the short pins are module-in-place pins. The length difference between the short pin and the medium-long pin, and the length difference between the medium-long pin and the long pin are both 1.4 to 1.6 mm.
[0011] Preferably, the fault arc real experiment platform includes an arc generating device, a load, a current transformer, an oscilloscope, a sampling resistor, and a PC. When powered by a 220V / 50Hz AC power supply, an arc is generated by adjusting the distance between the copper electrode and the carbon electrode, a button-type current transformer is used to fasten the live wire and sense its current changes, and an oscilloscope is used to collect the current signal.
[0012] Preferably, the arc generating device includes a fixed base, a first insulating clamp is fixed on the fixed base, a sliding seat is slidably connected to the fixed base, a second insulating clamp is fixed on the sliding seat, a stationary electrode and a movable electrode are clamped on the first insulating clamp and the second insulating clamp respectively, the stationary electrode is electrically connected to the power supply, and the movable electrode is electrically connected to the load end.
[0013] Preferably, when using the fault arc real experiment platform for data collection, the sampling frequency is set to 100KHz, and the collection window size is set to 10 cycles of 0.2s; then, connect the 220v / 50Hz power supply, turn on the main switch, and control the branch load switch; adjust the distance between the copper electrode and the carbon electrode of the arc generator to generate simulated fault arcs of different sizes; then save the collected current data in psdata and csv formats; finally, turn off the power to end the signal collection.
[0014] Preferably, in the process of constructing the user load feature map, a NILM model based on the attention mechanism is adopted; the NILM model based on the attention mechanism outputs y i =g(y i-1 ,S i ,c i ), where S i Represents the decoder hidden state, calculated as S i =f(S i-1 ,y i-1 ,C i ); context vector C i is the encoder’s attention weight a ij and the hidden state h j The weighted sum of is as follows:
[0015]
[0016] Attention weight a ij The calculation method is as follows:
[0017]
[0018] Attention weight a ij Indicates the degree of association between the jth position of the input sequence and the ith position of the output sequence;
[0019] The calculation method of attention score is as follows:
[0020] score(s i-1 ,h j )=v T tanh(W 1 s i-1 +W 2 h j )
[0021] The attention score is the decoder hidden state S i-1 and the hidden state h at the jth position of the input sequence j The association weight of v, W 1 and W 2is the parameter matrix to be trained, which is determined by model training.
[0022] Preferably, in the model, the RNN is replaced by a self-attention layer; the self-attention layer linearly transforms the input sequence x to obtain q, k, and v respectively, then multiplies q and k to obtain the attention score of the input sequence x, and then calculates the attention weight α through a softmax function, and multiplies α by v to obtain the c matrix as the output of the self-attention layer.
[0023] Preferably, the calculation method of q, α, and c in the self-attention layer is as follows:
[0024]
[0025] The present invention provides an electrical fire warning method based on modular smart meters. The technical solution uses smart meters to realize tasks such as automatic collection, storage, analysis and transmission of power information, thereby achieving the conditions for artificial intelligence model training and reasoning, and providing a strong guarantee for the advancement of edge intelligence in the power Internet of Things on the electricity consumption side. The present invention collects a large amount of user-side data based on modular smart meters, thereby providing conditions for training artificial intelligence models, so that edge intelligence can be used to perform short-term load forecasting on the user side. The present invention uses modular smart meters as edge intelligent processing modules for cloud-edge-end coordination, which can achieve more powerful model training and reasoning capabilities.
[0026] The present invention can capture and process various information on electrical fire causes, extract electrical fire cause characteristics, and realize electrical fire feature identification. Combining user load characteristic maps, electrical fire causes, and temporal and spatial physical and chemical micro-characteristics, an electrical fire risk assessment method is formed to construct a three-level electrical fire prevention and control system before, during, and after the event. It ensures the safe and stable operation of the power system, is adaptable to a variety of occasions, and has high promotion value and application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a flow chart of the smart meter design in the present invention.
[0028] Figure 2 It is a system hardware framework diagram of the smart meter in the present invention.
[0029] Figure 3 It is a system software framework diagram of the smart meter in the present invention.
[0030] Figure 4 It is a schematic diagram of a digital isolation circuit of a smart electric meter in the present invention.
[0031] Figure 5 It is a schematic diagram of the hot-swap equivalent circuit of the smart meter in the present invention.
[0032] Figure 6 It is a schematic diagram of a power hot-swap protection circuit of a smart electric meter in the present invention.
[0033] Figure 7 It is a schematic diagram of the pin hot-swap circuit of the smart meter in the present invention.
[0034] Figure 8 Schematic diagram of arc types in the present invention.
[0035] Fig. 9 It is a typical arc current and voltage waveform diagram in the present invention.
[0036] Fig.10 It is a schematic diagram of the arc generating device in the present invention.
[0037] Fig.11 It is a schematic diagram of the fault arc signal acquisition platform in the present invention.
[0038] Fig.12 It is a data collection flow chart of the present invention. DETAILED DESCRIPTION
[0039] The specific embodiments of the present invention will be described in detail below. In order to avoid too much unnecessary details, the well-known structures or functions will not be described in detail in the following examples. The approximate language used in the following examples can be used for quantitative expression, indicating that the quantity can be allowed to have a certain change without changing the basic function. Unless otherwise defined, the technical and scientific terms used in the following examples have the same meaning as those generally understood by those skilled in the art to which the present invention belongs.
[0040] 1. Development of modular smart meters with high sampling frequency and edge computing capabilities
[0041] The present invention designs a smart meter based on a multi-core modular design concept. The design of a smart meter must first determine the specifications and requirements of the meter based on market research and relevant information, and then complete the design of the overall hardware structure and software architecture of the smart meter based on the specifications and requirements. In order to ensure development efficiency and product quality, the design of a smart meter needs to follow certain design principles and follow certain design steps.
[0042] The design of smart meters should not pursue advanced and complex solutions. Try to use simple and mature solutions while meeting the system performance requirements. When designing smart meters, you need to consider the R&D costs such as hardware design and software development, the hardware cost of the meter, and the subsequent maintenance costs and installation costs. Choose a reasonable design solution after comprehensively considering these factors.
[0043] As the available hardware and hardware costs are constantly changing, other components may be needed to replace the currently used components. Therefore, when designing smart meters, it is necessary to leave some room for the use of new hardware.
[0044] In order to ensure that problems in the design process can be quickly identified, a specific design step needs to be formulated and the smart meter needs to be developed strictly according to the design step. Figure 1 shown.
[0045] The steps to implement the program are as follows:
[0046] According to the overall plan, a top-down design method is adopted to divide the system into several functional modules, and the hardware circuit diagram and software flow chart of each functional module are drawn. After each functional module is completed, each functional module is debugged separately. After each module is debugged, the system is integrated. The implementation of the plan is divided into the following steps.
[0047] First, according to the overall plan, the main components of the meter system must be determined, such as intelligent control components, which directly affect the design of hardware and software and play a decisive role in the overall performance of the instrument and the R&D cycle.
[0048] Second, hardware design and software design. Hardware design is divided into different modules according to the hardware block diagram, and then the circuits of each module are designed and tested separately, and then synthesized into a complete hardware circuit. Software design is divided into multiple subtasks according to the principle of top-down based on the overall software block diagram, and the flowcharts of each subtask are drawn separately, and then programming and debugging are carried out.
[0049] Third, after the hardware and software designs are completed, the hardware and software are debugged together. During the debugging process, if a problem is found in the hardware, the hardware is modified; if a problem is found in the software, the software is modified until both are qualified. Finally, the system performance is tested.
[0050] The new generation of smart meters is divided into different modules according to their functions, which are composed of metering module, management module and expansion module. The overall hardware framework structure of the system is as follows: Figure 2 The management module and the metering module are essential modules of the electric energy meter. The expansion module can be added or deleted according to the actual application scenario. The modules are connected through standard hardware interfaces, and the interfaces need circuit protection.
[0051] The metering module consists of a metering MCU, a storage unit, a real-time clock, and current and voltage circuits. It is responsible for legal metering work. To ensure the accuracy and security of the metering data, the metering module is used as a base meter and cannot be disassembled during use.
[0052] The management module consists of LCD, key control, relay, memory, and MCU. The management module runs an embedded real-time multi-task operating system and is mainly responsible for data management, module management, and human-computer interaction of the energy meter. It can be replaced and upgraded during use.
[0053] Extension modules are used to expand the functions of electric meters, including but not limited to the expansion of functional modules such as load identification, orderly charging control, and power quality modules. As an expansion unit of the electric meter function, the extension module can be selected according to the actual usage scenario.
[0054] The hardware is divided into different modules according to different functions. The modules are independent of each other. Therefore, the software framework of the meter is also designed according to the principle of independence of each module. Figure 3 As shown in the figure, the metering module software and the management module software are independent of each other, and data is transmitted only through specific tasks. The metering module function is relatively simple, and the front-end and back-end design mode can meet the requirements, and no real-time operating system is required. The software functions of the management core are relatively complex, and the functions will continue to increase, so a real-time operating system is added. The management module software architecture includes the application program at the application layer, the real-time operating system kernel at the system layer, the protocol library, the module management subsystem, the hardware at the hardware layer, and the standard peripheral library.
[0055] Hardware circuit design and analysis:
[0056] 1) Digital isolation circuit
[0057] Since the new generation of smart meters requires that module failures should not affect the normal operation of other parts of the system, it is necessary to take certain measures to isolate the signal lines between modules to prevent faulty modules from interfering with other parts through the signal lines. The more traditional and economical signal isolation method is optocoupler, but its transmission rate is slow. Therefore, the present invention adopts the method of digital isolation chip, which has excellent performance characteristics and reliability, and its overall performance is better than optocoupler. After comparing various isolation chips, the digital isolation chip finally adopted by the present invention is CA-IS3582, which has six forward and two reverse channels. The direction of the arrows in the figure indicates the input and output direction of the pin data. The transmission channels are independent of each other, and multiple transmission directions can be configured. The maximum transmission speed is 10Mbps. Its circuit schematic is shown as follows Figure 4 shown.
[0058] 2) Hot-swap circuit design
[0059] Hot-swap means that inserting or removing a module while the system is powered on will not affect the normal operation of the system, nor will it cause damage to the module or the base meter. Generally, modules without hot-swap design cannot be inserted or removed while the system is powered on. Figure 5The equivalent circuit diagram during the hot-swap process is shown, with the power supply on the left and the module on the right. Since there are capacitors and inductors in the circuit, the module is abstracted into a load and capacitor C0. Since the capacitor C0 on the module has no charge, when the module is just inserted into the backplane, the capacitor will form a low-impedance path, C0 is equivalent to a short circuit, and the power supply quickly charges the capacitor C0, which will generate a large current. When the module is unplugged, the C0 capacitor on the module discharges, and a large transient current is also generated, which is called surge current. Surge current may cause damage to the module or base meter. Similarly, plugging and unplugging the signal line when the power is on will generate transient voltage, which will cause communication abnormalities, system reset or interruption. Both of these situations are fatal to the system, so the present invention is studied from two aspects: power line hot-swap design and signal line hot-swap design.
[0060] According to the power supply voltage and cost of the module, the LM25061 power management chip is selected. This chip has functions such as overcurrent limitation, automatic recovery, power threshold setting, and low voltage power-off protection. The application circuit of LM25061 is as follows Figure 6 shown.
[0061] The signal hot-swap design adopts the hierarchical pin method, such as Figure 7 As shown, the power and ground pins are long pins, the data signal line uses medium-long pins, and the short pin is the "module in place pin". When the module is inserted into the base table, the power and ground are connected first, the module is powered on, then the data signal is connected, and finally the short pin is connected, generating a module insertion interrupt. At this time, the module management system starts to load the module information to ensure that the connection is stable before starting communication. The module removal process is the opposite of the insertion process. The short pin is disconnected first, generating a module removal interrupt. At this time, the system communication is terminated and the module information is unloaded. Then the data signal is unplugged, and finally the power is disconnected. Through experiments, the length difference of the long, medium and short pins is 1.5mm, which can meet the requirements.
[0062] 2. Construction of a real-life arc fault experimental platform and a method for constructing a fault arc sample library.
[0063] 1) Fault arc classification and characteristics
[0064] According to IEEEStd1584-2018, an arc is defined as a plasma cloud generated in the gap between two electrodes when a sufficient potential difference is applied. When an arc occurs, an arc fault current flows through the arc plasma, the air is broken down, and an arc is immediately generated. Fault arcs are usually divided into parallel or series, such as Figure 8As shown. Parallel fault arcs occur between opposite polarity conductors connected in parallel with the load, which can be detected by the residual current protector to prevent arc hazards. Series fault arcs are mainly caused by broken wires connected in series with the load, loose connections, defects in the insulation layer of the wires, etc. Series arc currents are usually discontinuous, and they are lower than the tripping current of traditional thermal and magnetic circuit breakers, so they often cause the wiring system to overheat for a long time, causing fires.
[0065] In residential areas, parallel fault arcs can be detected by leakage protection devices when they occur in the lines. However, it is still challenging to correctly detect and identify series fault arcs. First, the amplitude of the resistive load current signal changes slightly and has a downward trend. Generally, the current amplitude of a series fault arc is in the range of 5-30A, and the normal current of some loads is also within this range and is difficult to judge by a simple amplitude. In addition, when different loads and combinations are connected in the line system, the current waveform of the series fault arc will also be significantly different. Even if the loads are the same, the current waveform of the fault arc cannot remain unchanged.
[0066] Previous research has analyzed the arc current and voltage, such as Fig. 9 As shown. It can be seen from the figure that during normal operation, the current and voltage waveforms are sinusoidal waves. When an arc fault occurs, the half-cycle voltage quickly reaches the maximum value, and then drops rapidly. The waveform shape is similar to a saddle shape; the current shows a "flat shoulder" phenomenon at the zero crossing point. The power distribution of general residences, shopping malls, etc. is generally routed inside the conduit, and the location where the fault arc may occur is random. If the arc voltage is collected, voltage transformers must be connected at both ends of the fault point, which is difficult to achieve in an environment with long lines. Considering the actual detection requirements of low-voltage AC series fault arcs, the present invention uses line fault arc current for research.
[0067] 2) Construction of arc platform
[0068] Since low voltage AC series arc faults are always random and difficult to capture or reproduce, a specific test platform must be used to capture arcs with different actual load types. Fig.10 As shown, the arc generator can simulate the real arc generated during the loose connection of the cable. It includes a base and two electrodes. The two electrodes are composed of a 6.4mm carbon electrode and a movable copper electrode respectively.
[0069] The present invention mainly studies the detection of low-voltage series fault arcs, which requires the collection of current signals, such as Fig.11As shown, the low-voltage series fault arc current signal acquisition device is mainly composed of an arc generating device, a load, a current transformer, an oscilloscope, a sampling resistor, and a PC. Under the power supply of 220V / 50Hz AC power, an arc is generated by adjusting the distance between the copper electrode and the carbon electrode. A button-type current transformer is used to tighten the live wire and sense its current changes, and the current signal is collected using a PicoScope 5442A oscilloscope. In order to accurately collect the current signal of the fault arc, the sampling frequency of the collected data is set to 100kHz and the sampling resistor is 100. By controlling the switch, a single load or multiple loads of different types are connected, and the main current of the load in normal operation and fault arc state is collected and saved. The principle of the experimental device is as follows Fig.11 As shown, the present invention mainly has two acquisition schemes. The first one is to collect the normal working current and fault working current of the main line for a single load connected to the circuit. For example: the switch of load 1 is turned on, and the switches of other loads are turned off. The distance between the copper electrode and the carbon electrode is adjusted by the side regulator to generate a fault arc so as to collect the fault arc current signal of load 1; then, by making the copper electrode and the carbon electrode fully contact, no arc is generated, and the current signal of the normal working state of load 1 is obtained. At present, domestic and foreign researchers mainly detect a single load, but there are multiple loads working at the same time and the main line fails. Therefore, the present invention collects data under multiple load conditions. The second one is to collect the normal and fault current signals of the main line for the situation where multiple loads are connected in parallel to the circuit. For example: if you want to collect the main line fault current signal of load 1 and load 3 working at the same time, you need to turn on the switches of load 1 and load 3, and turn off the switches of load 2 and load 4.
[0070] 3) Load type and data collection
[0071] Low-voltage series fault arc detection is mainly used for residential power protection, but household loads are diverse, so it is particularly important to select different household appliances as experimental loads. The load currents collected by different experimental loads are different when a fault occurs and when they work normally. Therefore, several typical types of different loads are considered to collect the fault arcs and normal working conditions of the diverse load currents. The loads used in the present invention are mainly combined with the laboratory's own conditions and the existing research hotspots in the open literature, and 6 types of loads commonly used in daily life are selected as experimental loads, including resistive load incandescent lamps, capacitive inductive load electric fans and soldering irons, and switch loads select three typical loads of laptops, dimming lamps and LED lamps. The type parameters of the corresponding loads are shown in Table 1.
[0072] Table 1 Typical electrical load types and parameters
[0073]
[0074] When collecting data, follow Fig.12 The flow chart is used. First, build the corresponding acquisition circuit according to the previous description. Secondly, the PicoScope oscilloscope parameters and the sampling frequency are set to 100KHz to collect as many frequency components as possible to facilitate data feature research and analysis. At the same time, considering the sampling rate that the hardware can withstand in actual applications, after forming the target characteristic frequency band, the current sampling rate can be changed according to demand during application; set the acquisition window size to 10 cycles (0.2s). Then, connect the 220v / 50Hz power supply, turn on the main switch, and control the branch load switch according to the acquisition plan. At the same time, adjust the distance between the copper electrode and the carbon electrode of the arc generator to generate arcs of different sizes to simulate fault arcs in complex environments. Then save the collected current data in psdata and csv formats to facilitate subsequent current data analysis. Finally, turn off the power supply to end the signal acquisition.
[0075] 3. Construction of user load characteristic maps and accurate identification technology of abnormal user electricity consumption.
[0076] Decomposing the load of specific equipment according to the total load characteristics is the core content of non-intrusive load decomposition, which needs to rely on algorithms to achieve. A large number of previous research results have proposed many different algorithms. The load identification algorithm based on equipment characteristic parameters is the most important one: first obtain the load characteristic parameters of various common electrical equipment to establish an equipment characteristic parameter model library, and identify the equipment type by comparing the extracted load characteristics with the model library. Hart's many papers published since the 1980s have laid the foundation for feature extraction methods based on signal classification, but they are all based on manual extraction of steady-state signals. Many subsequent scholars' research is limited to small-scale feature extraction. For example, some studies use feature similarity for load identification, and use the active power, reactive power, power factor angle, current peak coefficient, etc. of electrical equipment as feature parameters for load identification to establish an identification template, and obtain the maximum similarity between the feature quantity of the load to be identified and the identification template, and use the maximum membership principle to identify the load category. Because manual feature extraction is very inefficient, a large number of studies using computer algorithms for feature extraction have emerged. Load identification based on machine learning is the most popular direction. Machine learning load identification can be mainly divided into supervised learning and unsupervised learning. Supervised learning load identification requires labeled data for model training. Currently, it is very difficult to obtain data. The algorithms involved include: K-nearest neighbor algorithm, BP neural network, support vector machine, Adaboost algorithm, etc. Unsupervised learning load identification does not require labeled data of electrical equipment, but the accuracy is too low and the actual application effect is not good. The load features identified by machine learning mainly include two categories: signal features and state transition features. Most methods are based on signal features and require a high-frequency sampling training data set to identify the signal features of electrical appliances on / off and different operating states.
[0077] In short, the scope of use and decomposition accuracy of the classic NILM method are limited because it requires manual feature extraction and feature library establishment. The machine learning method reduces manual intervention and has better development prospects. Supervised learning is limited by the lack of labeled training data. Although the accuracy of unsupervised learning is not high at present, it is worth further study. The deep learning technology that has risen rapidly in recent years has been proven to be superior to traditional methods and is a hot topic in current NILM research. Based on previous research, this paper proposes a new deep neural network model to solve the NILM problem.
[0078] 1) NILM model based on attention mechanism
[0079] The attention mechanism is also called the attention model, which is similar to the way the human brain automatically ignores unimportant information and focuses on important information when processing information. The core idea is to calculate and assign attention weights, and focus on relevant content by increasing their weights. This solves the problem that the s2s model loses information and causes inaccurate predictions when the input sequence is long. Taking a typical machine translation scenario as an example, the s2s model only uses the final hidden state of the input sentence to calculate the context vector, while the attention model calculates a context vector for each word in the input sentence, which retains more information about the input sequence for the decoder.
[0080] The present invention adopts the Bahdanau attention model, and the final output y of the Bahdanau attention model is i =g(y i-1 ,S i ,c i ), where S i Represents the decoder hidden state, calculated as S i =f(S i-1 ,y i-1 ,C i ). Context vector C i is the encoder’s attention weight a ij and the hidden state h j The weighted sum of is shown in formula (1). ij The calculation method of is shown in formula (2), which represents the degree of association between the jth position of the input sequence and the ith position of the output sequence. The calculation method of the attention score is shown in formula (3), which means that the decoder hidden state S i-1 and the hidden state h at the jth position of the input sequence j The association weight of v, W 1 and W 2 is the parameter matrix to be trained, which needs to be determined through model training. The method of calculating the attention score using the hidden state of the decoder at the previous moment is an important feature of the Bahdanau attention model.
[0081]
[0082] score(s i-1 ,h j )=v T tanh(W 1 s i-1 +W 2 h j ) (3)
[0083] In the earliest proposed attention model, both the encoder and the decoder are recurrent neural networks (RNN). Since the calculation of RNN depends on the output of the previous moment, it cannot be parallelized, which will cause the model training time to be too long. The model proposed in the present invention uses a self-attention layer instead of RNN. Self-attention is very different from the traditional attention mechanism. Attention calculates the attention score based on the hidden state of the source and the target. The attention weight represents the dependency between each element of the source and each element of the target. It actually performs a softmax function operation on the attention score. The output of the attention layer is a context vector, which contains the information that the source needs to know when predicting the output. The difference of self-attention is that it is performed at the source and target respectively, capturing the dependency between the elements of the source or target sequence, and then calculating the attention between the source and the target. Therefore, self-attention is better than traditional attention because the traditional attention mechanism ignores the dependency between the elements of the source or target. The working principle of self-attention is to first transform the input sequence x linearly to obtain q, k, and v, then dot product q and k to obtain the attention score of the input sequence x, and then calculate the attention weight α through the softmax function, which represents the dependency relationship within the input sequence. The c matrix obtained by dot product of α and v is the output of the self-attention layer. The specific calculation is shown in Formula 4. Since the input and output size of the self-attention layer are the same as those of the RNN, it can completely replace the RNN layer.
[0084]
[0085] 2) Construction of S2P model based on attention mechanism
[0086] According to the length of the input and output sequences, the S2S model has three forms: many-to-many, many-to-one and one-to-many. The traditional S2S model uses a recurrent neural network as an encoder and decoder, and its input at the next moment is the output at the previous moment, so parallel computing cannot be achieved, resulting in a very long model training time. The S2P+BahdanauAttention+Self-Attention model proposed in the present invention consists of a time embedding layer, a self-attention layer, a Bahdanau attention layer, a unidirectional GRU network decoding layer and two fully connected layers.
[0087] The embodiments of the present invention are described in detail above, but the contents are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the scope of the present invention shall be included in the protection scope of the present invention.
Claims
1. An electrical fire early warning method based on a modular smart meter, characterized in that: In this method, a modular smart meter with a certain sampling frequency and edge computing capability is used to build a real-life arc fault experimental platform, collect arc fault signals to construct a arc fault sample library, build a user load characteristic map, and identify the user's abnormal power consumption status.
2. The electrical fire early warning method based on modular smart meter according to claim 1 is characterized in that: The modular smart meter includes a metering module, a management module and an extension module, wherein the management module and the metering module are components of the electric energy meter, and the extension module is added or deleted according to the application scenario. The modules are connected through hardware interfaces, and the interfaces are protected by circuits.
3. The electrical fire early warning method based on modular smart meter according to claim 2 is characterized in that: The metering module includes a metering MCU, a storage unit, a real-time clock, and a current and voltage adopting circuit. The metering module serves as a base meter and is a non-detachable structure. The management module includes an LCD, a key control module, a relay, a memory, and an MCU. An embedded real-time multi-tasking operating system runs on the management module. The extension module includes a load identification module, an orderly charging control module, and a power quality module. The extension module serves as an extension unit of the meter function.
4. The electrical fire early warning method based on modular smart meter according to claim 1, characterized in that: The hardware circuit of the modular smart meter includes a digital isolation circuit and a hot-swap circuit; the digital isolation circuit uses a digital isolation chip to isolate the signal lines between modules; the hot-swap circuit includes a power line hot-swap circuit and a signal line hot-swap circuit, the power line hot-swap circuit uses a power management chip with model LM25061, in the signal line hot-swap circuit, the power and ground pins are long pins, the data signal line uses medium-long pins, the short pins are the module-in-place pins, and the length difference between the short pin and the medium-long pin, and the length difference between the medium-long pin and the long pin are both 1.4 to 1.6 mm.
5. The electrical fire early warning method based on modular smart meter according to claim 1, characterized in that: The fault arc real experiment platform includes an arc generating device, a load, a current transformer, an oscilloscope, a sampling resistor, and a PC. When powered by a 220V / 50Hz AC power supply, an arc is generated by adjusting the distance between a copper electrode and a carbon electrode, a button-type current transformer is used to fasten the live wire and sense its current change, and an oscilloscope is used to collect the current signal.
6. The electrical fire early warning method based on modular smart meter according to claim 5, characterized in that: The arc generating device includes a fixed base, a first insulating clamp is fixed on the fixed base, a sliding seat is slidably connected to the fixed base, a second insulating clamp is fixed on the sliding seat, a stationary electrode and a movable electrode are clamped on the first insulating clamp and the second insulating clamp respectively, the stationary electrode is electrically connected to the power supply, and the movable electrode is electrically connected to the load end.
7. The electrical fire early warning method based on modular smart meter according to claim 1, characterized in that: When using the fault arc real experiment platform for data collection, the sampling frequency is set to 100KHz, and the acquisition window size is set to 10 cycles of 0.2s; then, connect the 220v / 50Hz power supply, turn on the main switch, and control the branch load switch; adjust the distance between the copper electrode and the carbon electrode of the arc generator to generate simulated fault arcs of different sizes; then save the collected current data in psdata and csv formats; finally, turn off the power to end the signal collection.
8. The electrical fire early warning method based on modular smart meter according to claim 1, characterized in that: In the process of constructing the user load feature map, the NILM model based on the attention mechanism is adopted; the NILM model based on the attention mechanism outputs y i =g(y i-1 ,S i ,c i ), where S i Represents the decoder hidden state, calculated as S i =f(S i-1 ,y i-1 ,C i ); context vector C i is the encoder’s attention weight a ij and the hidden state h j The weighted sum of is as follows: Attention weight a ij The calculation method is as follows: Attention weight a ij Indicates the degree of association between the jth position of the input sequence and the ith position of the output sequence; The calculation method of attention score is as follows: score(s i-1 ,h j )=v T fishy(W1s) i-1 +W2h j ) The attention score is the decoder hidden state S i-1 and the hidden state h at the jth position of the input sequence j , where v, W1 and W2 are the parameter matrices to be trained, which are determined by model training.
9. The electrical fire early warning method based on modular smart meter according to claim 8, characterized in that: In the model, the RNN is replaced by a self-attention layer; the self-attention layer linearly transforms the input sequence x to obtain q, k, and v respectively, then multiplies q and k to obtain the attention score of the input sequence x, and then calculates the attention weight α through the softmax function. After the dot multiplication of α and v, the c matrix is obtained as the output of the self-attention layer.
10. The electrical fire early warning method based on modular smart meter according to claim 9, characterized in that: The calculation method of q, α, and c in the self-attention layer is as follows:
Citation Information
Patent Citations
Multi-core modular intelligent electric energy meter
CN112557714A
Intelligent terminal fault arc detection method based on grey wolf optimization algorithm and Stacking
CN116975762A
Power load prediction method and device of power system and electronic equipment
CN118157115A
Artificial intelligence based fire and power anomaly prediction system and method
KR102283884B1
Cited By
Intelligent electric meter fault arc detection method based on intelligent sensing algorithm
CN120468752A