Electric energy meter data acquisition and analysis method based on infrared communication technology
By optimizing infrared receiving module and data processing technology, the signal interference and noise problems of electricity meter data acquisition are solved, efficient data retrieval and power consumption data analysis are realized, and the system's performance and abnormal identification capabilities are improved.
Patent Information
- Application Number
- CN202411555268.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-11
AI Technical Summary
The existing power meter data acquisition technology based on infrared communication technology has problems such as signal interference, data noise, low data retrieval efficiency, insufficient in-depth analysis of electricity consumption data, and data congestion, which cannot meet the analysis of electricity consumption behavior and electricity consumption safety of electricity enterprises. Management requirements.
By optimizing the design of infrared receiving module, using filtering and noise reduction processing technology to process the electrical signals, establishing the data organization structure of the time series, using feature extraction and power consumption characteristic curve generation methods, and combining with the support vector machine algorithm to identify abnormal power consumption patterns.
It realizes stable data acquisition and analysis, improves signal-to-noise ratio, improves data retrieval efficiency and power consumption data analysis capabilities, can effectively identify abnormal power consumption states in multiple dimensions, and comprehensively improves the performance of the power meter data acquisition and analysis system.
Smart Images

Figure CN119416122A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid and data analysis technology, in particular to an electric energy meter data acquisition and analysis method based on infrared communication technology. Background Art
[0002] The data collection and analysis technology of electric energy meters is an important part of the construction of smart grids. It has experienced a technological evolution process from manual meter reading, power line carrier communication to wireless communication. In the 1990s, the data collection of electric energy meters mainly relied on manual meter reading; after entering the 21st century, power line carrier communication technology has been widely used, but due to the complexity of the power line network, severe channel attenuation, and the communication quality being greatly affected by the operation status of the power grid, its reliability and stability have not been fundamentally improved. In recent years, with the rapid development of communication technology, data collection technologies based on various communication methods such as infrared, micro-power wireless, and GPRS have emerged one after another. Among them, infrared communication technology has been widely used in the field of electric energy meter data collection because of its advantages such as reliable transmission, strong anti-interference ability, low cost, and low power consumption. At present, mainstream electric energy meter manufacturers at home and abroad have configured infrared communication interfaces that comply with the IEC62056 standard in their products, providing a hardware foundation for data collection.
[0003] However, the existing electric energy meter data acquisition technology based on infrared communication still has technical defects in many aspects: first, infrared signals are easily interfered by environmental factors such as direct sunlight, dust, and water vapor during transmission, resulting in signal distortion and data packet loss. The existing technology lacks effective signal processing and error correction mechanisms; second, the current data acquisition system generally adopts a simple data storage method and fails to establish a data organization structure based on time series, resulting in low data retrieval efficiency and difficulty in supporting subsequent time series analysis; third, the existing technology mainly focuses on the collection of basic data, and lacks in-depth analysis of electricity consumption data, especially in terms of electricity consumption behavior feature extraction, load curve analysis, and abnormal electricity consumption pattern recognition. The functions are relatively weak and cannot meet the needs of power companies for electricity consumption behavior analysis and electricity safety management; fourth, the existing system often adopts a real-time processing mode. When faced with a large number of electric energy meters communicating at the same time, it is prone to data congestion, processing delays and other problems, and lacks an effective data caching and classification processing mechanism. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention proposes an electric energy meter data collection and analysis method based on infrared communication technology.
[0005] Therefore, the problem to be solved by the present invention is to solve the data noise problem in the prior art and optimize the data collection and analysis process.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides an electric energy meter data collection and analysis method based on infrared communication technology, which comprises:
[0008] Collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal;
[0009] Performing filtering and noise reduction processing on the converted electrical signal to obtain filtered electric energy meter data;
[0010] The filtered electric energy meter data is stored in a data buffer area according to a time series, and the electric energy meter data in the data buffer area is grouped and classified according to the number of the electric energy meter;
[0011] Extract features from the grouped electric energy meter data and generate an electric energy characteristic curve based on the electric energy consumption;
[0012] A power consumption behavior model is established based on the power consumption characteristic curve to identify abnormal power consumption patterns.
[0013] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology described in the present invention, wherein: the infrared receiving module includes an infrared photodiode, a signal amplifier and a signal conversion circuit;
[0014] The infrared receiving module receives the infrared data signal and converts it into an electrical signal, comprising:
[0015] When the infrared photodiode receives the infrared data signal emitted by the electric energy meter, the photogenerated carriers inside the PN junction move in a directional manner under the action of the electric field, forming a photocurrent of a preset magnitude at both ends of the diode; the photocurrent is converted into a first preset voltage signal by the first-stage operational amplifier of the signal amplifier, and the second-stage operational amplifier amplifies the voltage signal by a preset multiple, and outputs an analog voltage signal of a second preset voltage;
[0016] The analog-to-digital converter in the signal conversion circuit quantizes the amplified analog voltage signal at a preset sampling frequency and converts the analog voltage signal into a digital level signal; the digital level signal is modulated into a differential level signal of the bus standard by a level conversion chip in the signal conversion circuit, completing the conversion of the infrared data signal into an electrical signal.
[0017] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology of the present invention, grouping and classifying the electric energy meter data in the data buffer area according to the number of the electric energy meter includes:
[0018] When receiving new electric energy meter data, first convert the time information of the current system clock into a standard timestamp format, accurate to the specified time precision, and write it into the data frame header as a time mark of a specific length, then detect the storage status of the circular queue according to the write controller of the data buffer area to determine whether it can be written. If it can be written, the write controller calculates the storage address of the new data according to a preset algorithm, writes a fixed-size data packet into the corresponding storage unit, and updates the pointer information of the circular queue;
[0019] After the data is written, the hash index table processor extracts the specified binary digit of the electric energy meter number to calculate the hash value, and then accesses the index table according to the calculated hash value. If the table item corresponding to the hash value is empty, a new data linked list node is initialized; if the hash value already exists in the corresponding linked list, the new data node is inserted into the linked list according to the preset rules, and the pointer information of the relevant nodes is updated at the same time;
[0020] When the number of stored records in the circular queue reaches a first preset threshold, that is, the remaining space is less than a second preset threshold, the data dump mechanism is triggered; the data dump mechanism first marks the corresponding records to be dumped within a specific time period in the hash index table, and sets a dump status identifier in the storage unit; the storage management processor configured in the data cache area transmits the data to be dumped to the external storage device in units of a preset data block size through a designated transmission channel. During the data dump process, the storage management processor establishes a hierarchical directory structure organized by time period in the external storage device, writes the data to be dumped into the corresponding directory according to the time information, and generates an index file of a specific size to record the storage location of the data block; after the data to be dumped is written to the external storage device, the storage management processor performs a cache area cleanup operation; the available space of the data cache area is restored to the preset capacity and returns to the normal data receiving state.
[0021] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology described in the present invention, the calculation of the hash value adopts a polynomial hybrid transformation method, as shown in the following formula: H(x)
[0022] Where X is the value of the 10-bit binary number input as an unsigned integer, A is the first-order polynomial coefficient, B is the second-order polynomial coefficient, C is the third-order polynomial coefficient, D is the constant term coefficient, P is the m is the prime modulus, M bits of mixing coefficient, R i Indicates the value after X is rotated right by i positions.
[0023] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology described in the present invention, the feature extraction includes:
[0024] Read the voltage and current data records of the same electric energy meter in the recent period from the data link table;
[0025] Performing signal spectrum calculation on the voltage value and the current value;
[0026] Extract the main frequency characteristics of voltage and current from the signal spectrum calculation results;
[0027] The phase difference angle is calculated according to the main frequency feature to complete feature extraction.
[0028] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology described in the present invention, the signal spectrum is calculated as shown in the following formula:
[0029]
[0030] The load correction function L(s,r) is defined as follows:
[0031] L(s,r)=[1+γ·sin(πs / N)]·[1+μ·cos(πr / 2)]
[0032] Wherein, L(s,r) is the load correction function, γ=0.15 is the load power correction coefficient, μ=0.2 is the power factor correction coefficient, j is the imaginary unit used to represent complex number calculation, Sg is the group index of the four-radix FFT operation, q is the point index of the four-radix FFT operation, r is the input sequence grouping index, s is the input sequence block index, and N is the input sequence length.
[0033] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology of the present invention, the extraction of the main frequency characteristics of the voltage and current is shown in the following formula:
[0034] V1(t)=|V1|·e jφv K(t)
[0035]
[0036] Where, λ is the voltage fluctuation correction coefficient, ∈ is the harmonic distortion correction coefficient, dV / dt is the voltage change rate, V rated is the rated voltage, K(t) is the dynamic compensation function, v is the instantaneous voltage sampling value, V1(t) is the complex expression of the fundamental voltage over time, a1 2 is the square of the cosine component of the voltage fundamental wave, b1 2 is the square of the fundamental sinusoidal component of the voltage, ω is the angular frequency, and φ is the phase angle.
[0037] As a preferred solution of the electric energy meter data collection and analysis method based on infrared communication technology described in the present invention, the calculation of the phase difference angle is shown in the following formula:
[0038] θ=(φ v -φ i )·F(P,Q)
[0039]
[0040] Among them, φ v is the voltage fundamental phase angle, φ i is the current fundamental phase angle, θ is the power factor angle, P is the active power, Q is the reactive power, δ is the reactive power correction coefficient, and sign (Q) represents the positive and negative characteristics of the reactive power Q.
[0041] In a second aspect, an embodiment of the present invention provides an electric energy meter data collection and analysis system based on infrared communication technology, which includes:
[0042] The data acquisition module is used to collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal;
[0043] The data processing and storage module is used to filter and reduce noise on the converted electric signal to obtain filtered electric energy meter data; store the filtered electric energy meter data in a data buffer area according to a time series, and group and classify the electric energy meter data in the data buffer area according to the number of the electric energy meter;
[0044] A feature extraction module, used to extract features from the grouped electric energy meter data, and generate an electric energy characteristic curve in combination with the electric energy consumption;
[0045] The data analysis module is used to establish an electricity consumption behavior model based on the electricity consumption characteristic curve and identify abnormal electricity consumption patterns.
[0046] The beneficial effects of the present invention are as follows: the present invention realizes stable data acquisition through the optimized infrared receiving module design, and improves the signal-to-noise ratio to more than 45 dB in combination with the fourth-order Butterworth filter; in the data processing link, the innovative composite window function is adopted to reduce the main lobe width by 18.3% and increase the side lobe attenuation speed by 31.5%, and cooperates with the load-adaptive four-base butterfly FFT algorithm to expand the load dynamic range by 42.6%, and improve the power factor measurement accuracy by 0.015; through the 32MB data cache area constructed by the dual-port RAM and the efficient storage structure based on the hash index, the rapid retrieval and intelligent dump of the data are realized; finally, the 672-dimensional feature vector is used to construct the power consumption behavior model, and the support vector machine algorithm is combined to realize the recognition accuracy of more than 85% of the multi-dimensional abnormal states such as abnormal power consumption (2.5 times the difference with the previous period), abnormal power factor and abnormal phase relationship, and comprehensively improve the performance indicators of the electric energy meter data acquisition and analysis system. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing 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 creative work. Among them:
[0048] Figure 1 The flowchart of the electric energy meter data collection and analysis method based on infrared communication technology. DETAILED DESCRIPTION
[0049] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0052] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0053] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0054] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] Example 1
[0056] Reference Figure 1 , which is the first embodiment of the present invention, and provides an electric energy meter data collection and analysis method based on infrared communication technology, comprising:
[0057] S1. Collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal.
[0058] Specifically, the data signal sent by the infrared port of the electric energy meter is collected by an infrared receiving module installed in front of the infrared port of the electric energy meter. The infrared receiving module is composed of an infrared photodiode, a signal amplifier and a signal conversion circuit; the infrared photodiode is made of germanium-doped silicon material, and its PN junction generates photogenerated carriers when irradiated by infrared light, and the photosensitive area is 4 square millimeters; the cathode end of the infrared photodiode is connected to a 5V bias voltage, and the anode end is connected to the input end of the signal amplifier; the light receiving surface of the infrared photodiode is arranged opposite to the emitting surface of the infrared port of the electric energy meter, and the distance between them is maintained at 3-5 cm; the infrared photodiode receives the infrared data signal sent by the infrared port of the electric energy meter with a wavelength of 940 nanometers.
[0059] The infrared data signal is encoded using the IEC62056 protocol, the data frame header is 7E, and the data transmission rate is 1200 bits / second; the signal amplifier amplifies the weak current signal output by the infrared photodiode, with an amplification factor of 100-150 times; the signal conversion circuit uses a 12-bit analog-to-digital converter to convert the amplified analog signal into a digital electrical signal, and the conversion sampling frequency is 10kHz.
[0060] The infrared data signal contains a 48-bit electricity meter number, a 32-bit cumulative power consumption value, a 16-bit voltage effective value and a 16-bit current effective value. Each data segment is separated by a synchronization byte; the converted electrical signal is transmitted to the data processing unit via the RS485 bus.
[0061] More specifically, when the infrared photodiode receives the infrared data signal emitted by the electric energy meter, the photogenerated carriers inside the PN junction move in a direction under the action of the electric field, forming a photocurrent of 0.1-0.5 mA at both ends of the diode; the photocurrent is converted into a 0.01-0.05V voltage signal by the first-stage operational amplifier of the signal amplifier, and the second-stage operational amplifier amplifies the voltage signal by 100-150 times to output a 1-7.5V analog voltage signal; the 12-bit analog-to-digital converter in the signal conversion circuit quantizes the amplified analog voltage signal at a sampling frequency of 10kHz, and converts the analog voltage signal into a digital level signal; the digital level signal is modulated into a differential level signal of the RS485 bus standard by the level conversion chip in the signal conversion circuit, completing the conversion of the infrared data signal into an electrical signal.
[0062] S2. Filter and reduce noise on the converted electrical signal, and use a Butterworth low-pass filter to filter high-frequency noise in the electrical signal to obtain filtered electric energy meter data;
[0063] Specifically, the Butterworth low-pass filter adopts a fourth-order structure design and is implemented through a double-T RC network, and the cut-off frequency is set to 2kHz; the RC network is composed of four groups of resistors and capacitors connected in series, each group has a resistance value of 10kΩ and a capacitance value of 0.01μF.
[0064] A voltage follower composed of an operational amplifier is arranged at the input end of the Butterworth low-pass filter, and its input impedance is greater than 100MΩ, so as to ensure that no waveform distortion is generated when the signal is input; the passband ripple of the Butterworth low-pass filter is less than 0.1dB, the stopband attenuation rate is -24dB / octave, and the attenuation of interference signals with a frequency above 2kHz is greater than 60dB; the output end of the filter is provided with a feedback compensation circuit, and the compensation circuit adopts a 100kΩ potentiometer to adjust the gain, so as to adjust the amplitude of the filtered signal to the standard level range; the signal-to-noise ratio of the electric energy meter data processed by the Butterworth low-pass filter is improved to more than 45dB, and the waveform distortion is less than 1%.
[0065] More specifically, the input electrical signal first passes through the high impedance input stage of the voltage follower, which uses a FET operational amplifier with an input bias current less than 1 picoampere and a common mode rejection ratio greater than 100 dB; when the electrical signal passes through the four-stage RC network in sequence, the effective signal component below 2 kHz is transmitted through capacitor coupling, while the high-frequency noise component above 2 kHz is short-circuited to the ground through the capacitor and gradually attenuated through the impedance voltage divider of the RC network; the superposition effect of the four-stage RC network produces a maximum flat response within the passband, and the group delay deviation within the passband is less than 50 microseconds; the filtered signal is amplitude calibrated by a 100 kΩ potentiometer in the compensation circuit, and the potentiometer is adjusted to the output signal amplitude equal to the effective component of the input signal by monitoring the root mean square value of the output signal.
[0066] S3. storing the filtered electric energy meter data in a data buffer in time series, and grouping and classifying the electric energy meter data in the data buffer according to the electric energy meter number;
[0067] Specifically, the data cache area is composed of a dual-port RAM with a storage capacity of 32MB, divided into 256 storage units, each with a capacity of 128KB; the write port clock frequency of the dual-port RAM is 20MHz, and the read port clock frequency is 10MHz, supporting simultaneous read and write operations;
[0068] Each set of energy meter data occupies 64 bytes of storage space, including an 8-byte timestamp, a 6-byte energy meter number, a 4-byte power consumption, a 2-byte voltage value, a 2-byte current value and a 42-byte checksum; the data cache organizes the data storage structure in a circular queue manner, and the queue length is 2048 records; the energy meter number is stored in a 6-byte hexadecimal code, the upper 3 bytes represent the area code, and the lower 3 bytes represent the device code; a hash index table is set in the data cache, and the hash index table contains 1024 table items, each of which stores the mapping relationship between the energy meter number and the storage address; the hash value is calculated according to the last 10 binary digits of the energy meter number, and the energy meter data with the same hash value are linked to form a data linked list; the data linked list adopts a bidirectional linked list structure, and each node contains a data storage address, a forward pointer and a backward pointer.
[0069] When receiving new electric energy meter data, the data buffer area first converts the time information of the current system clock into the Unix timestamp format, accurate to milliseconds, and writes it into the data frame header as an 8-byte time identifier; the write controller of the data buffer area detects the storage status of the circular queue, calculates the storage address of the new data, writes the 64-byte data packet into the corresponding storage unit, and updates the head pointer and tail pointer of the circular queue; after the data is written, the hash index table processor extracts the last 10 binary digits of the electric energy meter number to calculate the hash value; the hash index table processor accesses the index table according to the calculated hash value, and if the table item corresponding to the hash value is empty, a new data linked list node is created; if the hash value already exists in the corresponding linked list, the new data node is inserted into the head of the linked list, and the forward pointer and backward pointer of the node are updated at the same time; the data linked list supports a maximum of 128 nodes, and when the length of the linked list exceeds 128, the tail node of the linked list is automatically deleted.
[0070] When the number of stored records in the circular queue reaches 1920, that is, the remaining space is less than 128 records, the data dump mechanism is triggered; the data dump mechanism first marks the 512 records corresponding to the earliest timestamp in the hash index table as to-be-dumped, and sets a dump flag in the storage unit; the storage management processor configured in the data cache area transfers the data to be dumped in units of 64KB data blocks to the solid-state hard disk through the DMA channel. During the data dump process, the storage management processor establishes a directory tree structure organized by month in the solid-state hard disk, writes the data to be dumped into the corresponding directory according to the year and month information of the timestamp, and generates a 512-byte index file to record the storage location of the data block; after the data to be dumped is written to the solid-state hard disk, the storage management processor clears the storage space of these data in the cache area, releases the corresponding hash index table entry, and repositions the head pointer and tail pointer of the circular queue; the available space of the data cache area is re-expanded to 1920 records, and the normal data receiving state is restored.
[0071] It should be noted that the hash value is calculated using a polynomial hybrid transformation method to process the last 10 binary digits of the 6-byte electricity meter number. The specific calculation formula is:
[0072] H(x)
[0073] Where X is the value of the input 10-bit binary number parsed as an unsigned integer, A = 0x5A827999, which is the first-order polynomial coefficient, B = 0x6ED9EBA1, which is the second-order polynomial coefficient, C = 0x8F1BBCDC, which is the third-order polynomial coefficient, D = 0xCA62C1D6, which is the constant term coefficient, P m =65521 is the prime modulus, M = 0x6C07B6D4, bit mixing coefficient, R i Represents the value after X is cyclically shifted right by i bits; the final hash value range is an integer from 0 to 1023, which serves as the access address of the hash index table.
[0074] S4. Extracting features from the grouped electric energy meter data, calculating the phase difference between the voltage value and the current value by Fourier transform, and generating an electric consumption characteristic curve in combination with the electric consumption;
[0075] Specifically, the feature extraction processor reads the data records of the same electricity meter in the last 24 hours from the data link list, performs 1024-point fast Fourier transform on the voltage and current values, and uses a radix-4 butterfly algorithm to decompose the input sequence according to integer powers of 4, which is processed simultaneously by four groups of parallel computing units.
[0076] Then, the amplitude and phase angle information of the fundamental component are extracted from the Fourier transform result. The voltage fundamental amplitude is standardized to 220V, and the current fundamental amplitude is normalized according to the range of the electric energy meter. Then, the difference between the voltage phase angle and the current phase angle is calculated by the inverse tangent function to obtain the power factor angle.
[0077] Furthermore, the feature extraction processor divides the electricity consumption data within 24 hours into segments at intervals of 15 minutes, and subtracts the previous segment from each segment of electricity consumption data to obtain 96 electricity consumption increment values; the electricity consumption increment values and the power factor angles of the corresponding time periods are combined into two-dimensional data points, and a cubic spline interpolation algorithm is used to generate an electricity consumption characteristic curve, in which the horizontal axis of the curve is the 24-hour time axis, and the vertical axis is the combined characteristic value of the electricity consumption increment and the power factor angle.
[0078] For example, in a feasible embodiment, the feature extraction processor uses an innovative composite window function transformation algorithm to transform the 1024-point sampling data of the same electric energy meter in the last 24 hours through the following formula:
[0079]
[0080] Among them, W1(n) is the improved Gauss-Hanning window, and W2(n) is the logarithmic modified triangular window, which are defined as follows:
[0081]
[0082] Among them, α is the Gaussian-Hanning window weight coefficient, β is the logarithmic triangular window weight coefficient, and σ is the Gaussian function attenuation parameter.
[0083] Preferably, the traditional window function is prone to spectrum leakage under rapidly changing load conditions. When the electric energy meter measures transient events, the sidelobe attenuation speed of the conventional Hanning window is slow, and harmonics cannot be effectively suppressed, affecting the accuracy. In addition, the main lobe width of the standard triangular window is too large, resulting in insufficient frequency resolution. Therefore, this embodiment is improved, and it is found that after the improvement, the main lobe width is reduced by 18.3% compared with the traditional Hanning window, the sidelobe attenuation speed is increased by 31.5%, and the spectrum leakage suppression ability is improved by 26.7%. In the measurement of dynamic loads by the electric energy meter, these improvements significantly reduce the harmonic measurement error, thereby improving the measurement accuracy and reliability of the electric energy meter.
[0084] For example, in a feasible embodiment, the feature extraction processor performs fast Fourier transform by using a load-adaptive four-basis butterfly decomposition algorithm. The load-adaptive four-basis butterfly decomposition algorithm is shown in the following formula:
[0085]
[0086] The load correction function L(s,r) is defined as follows:
[0087] L(s,r)=[1+γ·sin(πs / N)]·[1+μ·cos(πr / 2)]
[0088] Wherein, L(s,r) is the load correction function, γ=0.15 is the load power correction coefficient, μ=0.2 is the power factor correction coefficient, j is the imaginary unit used to represent complex number calculation, Sg is the group index of the four-radix FFT operation, q is the point index of the four-radix FFT operation, r is the input sequence grouping index, s is the input sequence block index, and N is the input sequence length.
[0089] The conventional butterfly operation is not sensitive enough to the change of power factor, which leads to a significant decrease in the accuracy of the standard algorithm when processing high-power pulse loads. Therefore, this embodiment makes targeted improvements. After the improvement, the dynamic range of the load is expanded by 42.6%, and the accuracy of power factor measurement is improved by 0.015. The performance and measurement accuracy of the algorithm in a dynamic load environment are significantly enhanced.
[0090] For example, in a feasible embodiment, the fundamental wave component is extracted using an improved extraction formula:
[0091] V1(t)=|V1|·e jφv K(t)
[0092] Amplitude and correction factor:
[0093]
[0094] Dynamic compensation function K(t):
[0095]
[0096] Where, λ is the voltage fluctuation correction coefficient, ∈ is the harmonic distortion correction coefficient, dV / dt is the voltage change rate, V rated is the rated voltage, K(t) is the dynamic compensation function, v is the instantaneous voltage sampling value, V1(t) is the complex expression of the fundamental voltage over time, a1 2 is the square of the cosine component of the voltage fundamental wave, b1 2 is the square of the fundamental sinusoidal component of the voltage, ω is the angular frequency, and φ is the phase angle.
[0097] For example, in a feasible embodiment, the difference between the voltage phase angle and the current phase angle is calculated by an inverse tangent function to obtain the power factor angle as follows:
[0098] θ=(φ v -φ i )·F(P,Q)
[0099]
[0100] Among them, φ v is the voltage fundamental phase angle, φ i is the current fundamental phase angle, θ is the power factor angle, P is the active power, Q is the reactive power, δ is the reactive power correction coefficient, and sign (Q) represents the positive and negative characteristics of the reactive power Q.
[0101] S5. Establish an electricity consumption behavior model based on the electricity consumption characteristic curve, use a support vector machine algorithm to analyze the electricity consumption behavior model, identify abnormal electricity consumption patterns and generate an electricity consumption analysis report.
[0102] Specifically, the electricity consumption behavior model uses 7 days as the modeling period, and the electricity consumption characteristic curves for 7 consecutive days are composed into a 672-dimensional feature vector. The feature vector contains the electricity consumption increment value, power factor angle and its first-order difference value at 96 time points.
[0103] The support vector machine algorithm uses a radial basis kernel function, the kernel function parameter is set to 0.01, the penalty factor C is set to 100, and the vector machine algorithm is trained using a preset training sample set, which includes 1000 sets of feature vectors of normal power consumption patterns and 500 sets of abnormal power consumption patterns. The model is trained using a sequence minimum optimization algorithm, the number of iterations is set to 1000 times, and the convergence accuracy is 0.001. The vector machine algorithm used in the present invention uses an existing mature algorithm, so the present invention does not elaborate on it.
[0104] For the power consumption behavior model to be analyzed, the support vector machine calculates the distance between its feature vector and the classification hyperplane, and determines it as an abnormal power consumption mode when the distance is greater than the preset threshold of 0.8.
[0105] The support vector machine performs multi-dimensional feature analysis on the electricity consumption behavior model and sets the following abnormality judgment rules:
[0106] When the incremental power consumption value in any 15-minute period exceeds 2.5 times the average value of the same period in the previous week, or is lower than 0.3 times the average value, it is marked as abnormal power consumption;
[0107] When the power factor angle deviates from the standard value by more than 60 degrees for more than 30 minutes, or the power factor angle changes by more than 45 degrees within 15 minutes, it is marked as power factor abnormality;
[0108] Calculate the instantaneous phase difference between voltage and current. When the standard deviation of the phase difference exceeds 20 degrees, or reverse power occurs, it is marked as abnormal phase relationship.
[0109] The support vector machine combines the above three types of abnormal features into a determination vector and matches it with a preset abnormal pattern feature library; when the similarity between the determination vector and one or more types of abnormal feature patterns exceeds 85%, the power consumption pattern of the time period is determined to be abnormal; the system also records information such as the time when the abnormality occurred, the duration, the type of abnormality and the degree of abnormality.
[0110] Furthermore, this embodiment also provides an electric energy meter data collection and analysis system based on infrared communication technology, including:
[0111] The data acquisition module is used to collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal;
[0112] The data processing and storage module is used to filter and reduce noise on the converted electric signal to obtain filtered electric energy meter data; store the filtered electric energy meter data in a data buffer area according to a time series, and group and classify the electric energy meter data in the data buffer area according to the number of the electric energy meter;
[0113] A feature extraction module, used to extract features from the grouped electric energy meter data, and generate an electric energy characteristic curve in combination with the electric energy consumption;
[0114] The data analysis module is used to establish an electricity consumption behavior model based on the electricity consumption characteristic curve and identify abnormal electricity consumption patterns.
[0115] This embodiment also provides a computer device, which is suitable for the case of an electric energy meter data collection and analysis method based on infrared communication technology, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the electric energy meter data collection and analysis method based on infrared communication technology proposed in the above embodiment.
[0116] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0117] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for collecting and analyzing electric energy meter data based on infrared communication technology as proposed in the above embodiment is implemented.
[0118] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0119] Example 2
[0120] This is the second embodiment of the present invention. This embodiment provides an electric energy meter data collection and analysis method based on infrared communication technology. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0121] This example was conducted in a smart meter test laboratory of a provincial power grid company. Six different types of smart energy meters were selected for testing. The experiment lasted for 30 days. The experimental environment temperature was maintained at 23±2°C and the relative humidity was 45±5%. The test system consists of a dedicated infrared receiving module, a data acquisition and processing unit, a data storage server and other equipment.
[0122] The infrared receiving module uses a high-performance silicon-based photodiode (model S6968), and its PN junction uses germanium silicon material doped by a special process to achieve excellent response characteristics in the 0.8μm to 1.1μm band. Through a precise optical collimation system, the infrared receiving module is fixed 4 cm away from the infrared port of the electric energy meter to ensure the best signal reception effect. The signal amplification circuit adopts a two-stage operational amplifier cascade structure. The first stage uses an ultra-low noise operational amplifier OPA847 with an input bias current of only 2.5pA, and the second stage uses a broadband operational amplifier AD8099 with a gain-bandwidth product of 3.8GHz.
[0123] In order to verify the performance of the system under different load conditions, a load test scheme simulating various power consumption scenarios was designed. The programmable AC power supply was used to simulate grid voltage fluctuations, and the electronic load was used to simulate power consumption equipment with different power factors. During the test, key performance indicators such as data acquisition accuracy, signal processing delay, and feature extraction accuracy of the system were recorded. The details are shown in Table 1 and Table 2.
[0124] In the data processing link, an improved signal conditioning algorithm is used, including adaptive threshold detection, digital filtering, time series data compression and other technologies. A dedicated data analysis software platform is developed, integrating various innovative algorithms of the present invention, including composite window function transformation, load-adaptive four-base butterfly FFT, dynamic fundamental wave extraction, etc.
[0125] Table 1 Data collection performance test results of different types of electric energy meters
[0126]
[0127] Table 2 System performance test results under different load conditions
[0128]
[0129]
[0130] Through the analysis of the above test data, it can be concluded that the present invention has significant technical advantages in practical applications:
[0131] Data acquisition performance: As can be seen from Table 1, the data acquisition accuracy of this system for various types of electric energy meters is more than 99.94%, the signal processing delay is controlled within 1.6ms, the signal-to-noise ratio is generally higher than 47dB, and the waveform distortion is controlled below 0.88%. These indicators are significantly better than the existing technology level (usually the acquisition accuracy is 99.5%, the delay is 2-3ms, and the signal-to-noise ratio is about 45dB). In particular, the test results of the DTSD676 model are the most excellent, with an acquisition accuracy of 99.99% and a processing delay of only 1.1ms, indicating that the signal acquisition processing scheme of the present invention has extremely high reliability and efficiency.
[0132] Load adaptability: The test results in Table 2 show that the system maintains excellent performance under various load conditions. Even under the most complex variable frequency equipment load conditions, the harmonic measurement error is still controlled within 0.21%, and the phase measurement error does not exceed 0.19 degrees. This is due to the innovative composite window function transformation algorithm and load-adaptive four-base butterfly FFT algorithm of the present invention. Especially under complex working conditions such as pulse loads and variable frequency equipment, the system still maintains a high measurement stability (>99.91%) and accuracy level (0.2S level), which is significantly better than the existing technology.
[0133] These data fully demonstrate the innovation and practical value of this invention in the field of electric energy meter data collection and analysis. Through clever algorithm improvement and system optimization, the shortcomings of traditional technologies in signal quality, load adaptability and processing efficiency are solved, providing more reliable technical support for data collection and analysis of smart grids.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. The electric energy meter data collection and analysis method based on infrared communication technology is characterized by: include: Collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal; Performing filtering and noise reduction processing on the converted electrical signal to obtain filtered electric energy meter data; The filtered electric energy meter data is stored in a data buffer area according to a time series, and the electric energy meter data in the data buffer area is grouped and classified according to the number of the electric energy meter; Extract features from the grouped electric energy meter data and generate an electric energy characteristic curve based on the electric energy consumption; A power consumption behavior model is established based on the power consumption characteristic curve to identify abnormal power consumption patterns.
2. The electric energy meter data collection and analysis method based on infrared communication technology according to claim 1, characterized in that: The infrared receiving module includes an infrared photodiode, a signal amplifier and a signal conversion circuit; The process of the infrared receiving module receiving the infrared data signal and converting it into an electrical signal includes: When the infrared photodiode receives the infrared data signal emitted by the electric energy meter, the photogenerated carriers inside the PN junction move in a directional manner under the action of the electric field, forming a photocurrent of a preset magnitude at both ends of the diode; the photocurrent is converted into a first preset voltage signal by the first-stage operational amplifier of the signal amplifier, and the second-stage operational amplifier amplifies the voltage signal by a preset multiple, and outputs an analog voltage signal of a second preset voltage; The analog-to-digital converter in the signal conversion circuit quantizes the amplified analog voltage signal at a preset sampling frequency and converts the analog voltage signal into a digital level signal; The digital level signal is modulated into a differential level signal of the bus standard by the level conversion chip in the signal conversion circuit, completing the conversion of the infrared data signal into an electrical signal.
3. The electric energy meter data collection and analysis method based on infrared communication technology as claimed in claim 2, characterized in that: The process of grouping and classifying the electric energy meter data in the data buffer area according to the number of the electric energy meter includes: When receiving new electric energy meter data, first convert the time information of the current system clock into a standard timestamp format, accurate to the specified time precision, and write it into the data frame header as a time mark of a specific length, then detect the storage status of the circular queue according to the write controller of the data buffer area to determine whether it can be written. If it can be written, the write controller calculates the storage address of the new data according to a preset algorithm, writes a fixed-size data packet into the corresponding storage unit, and updates the pointer information of the circular queue; After the data is written, the hash index table processor extracts the specified binary digit of the electric energy meter number to calculate the hash value, and then accesses the index table according to the calculated hash value. If the table item corresponding to the hash value is empty, a new data linked list node is initialized; if the hash value already exists in the corresponding linked list, the new data node is inserted into the linked list according to the preset rules, and the pointer information of the relevant nodes is updated at the same time; When the number of stored records in the circular queue reaches a first preset threshold, that is, the remaining space is less than a second preset threshold, the data dump mechanism is triggered; the data dump mechanism first marks the corresponding records to be dumped within a specific time period in the hash index table, and sets a dump status identifier in the storage unit; the storage management processor configured in the data cache area transmits the data to be dumped to the external storage device in units of a preset data block size through a designated transmission channel. During the data dump process, the storage management processor establishes a hierarchical directory structure organized by time period in the external storage device, writes the data to be dumped into the corresponding directory according to the time information, and generates an index file of a specific size to record the storage location of the data block; after the data to be dumped is written to the external storage device, the storage management processor performs a cache area cleanup operation; the available space of the data cache area is restored to the preset capacity and returns to the normal data receiving state.
4. The electric energy meter data collection and analysis method based on infrared communication technology as claimed in claim 3 is characterized by: The hash value is calculated using a polynomial hybrid transformation method, as shown in the following formula: Where X is the value of the 10-bit binary number input as an unsigned integer, A is the first-order polynomial coefficient, B is the second-order polynomial coefficient, C is the third-order polynomial coefficient, D is the constant term coefficient, P is the m is the prime modulus, M bits of mixing coefficient, R i Indicates the value after X is rotated right by i positions.
5. The electric energy meter data collection and analysis method based on infrared communication technology as claimed in claim 4, characterized in that: The feature extraction comprises: Read the voltage and current data records of the same electric energy meter in the recent period from the data link table; Performing signal spectrum calculation on the voltage value and the current value; Extract the main frequency characteristics of voltage and current from the signal spectrum calculation results; The phase difference angle is calculated according to the main frequency feature to complete feature extraction.
6. The electric energy meter data collection and analysis method based on infrared communication technology as claimed in claim 5, characterized in that: The signal spectrum is calculated as follows: The load correction function L(s,r) is defined as follows: L(s,r)=[1+γ·sin(πs / N)]·[1+μ·cos(πr / 2)] Wherein, L(s,r) is the load correction function, γ=0.15 is the load power correction coefficient, μ=0.2 is the power factor correction coefficient, j is the imaginary unit used to represent complex number calculation, Sg is the group index of the four-radix FFT operation, q is the point index of the four-radix FFT operation, r is the input sequence grouping index, s is the input sequence block index, and N is the input sequence length.
7. The method for collecting and analyzing electric energy meter data based on infrared communication technology according to claim 6, characterized in that: The extraction of the main frequency characteristics of the voltage and current is shown in the following formula: V1(t)=|V1|·e jφv ·K(t) Where, λ is the voltage fluctuation correction coefficient, ∈ is the harmonic distortion correction coefficient, dV / dt is the voltage change rate, V rated is the rated voltage, K(t) is the dynamic compensation function, v is the instantaneous voltage sampling value, V1(t) is the complex expression of the fundamental voltage over time, is the square of the cosine component of the voltage fundamental wave, is the square of the fundamental sinusoidal component of the voltage, ω is the angular frequency, and φ is the phase angle.
8. The method for collecting and analyzing electric energy meter data based on infrared communication technology according to claim 7, characterized in that: The calculation of the phase difference angle is shown in the following formula: θ=(φ v -f i )·F(P,Q) Among them, φ v is the voltage fundamental phase angle, φ i is the current fundamental phase angle, θ is the power factor angle, P is the active power, Q is the reactive power, δ is the reactive power correction coefficient, and sign (Q) represents the positive and negative characteristics of the reactive power Q.
9. An electric energy meter data collection and analysis system based on infrared communication technology, based on the electric energy meter data collection and analysis method based on infrared communication technology according to any one of claims 1 to 8, characterized in that: include: The data acquisition module is used to collect the data signal sent by the infrared port of the electric energy meter, receive the infrared data signal through the infrared receiving module and convert it into an electrical signal; The data processing and storage module is used to filter and reduce noise on the converted electric signal to obtain filtered electric energy meter data; store the filtered electric energy meter data in a data buffer area according to a time series, and group and classify the electric energy meter data in the data buffer area according to the number of the electric energy meter; A feature extraction module, used to extract features from the grouped electric energy meter data, and generate an electric energy characteristic curve in combination with the electric energy consumption; The data analysis module is used to establish an electricity consumption behavior model based on the electricity consumption characteristic curve and identify abnormal electricity consumption patterns.
Citation Information
Cited By
Electric energy equipment receiving end phase angle deviation correction method based on Z-shaped winding
CN120611170A
Intelligent electric meter data transmission method based on carrier wave and wireless fusion and intelligent electric meter
CN122027915A
Smart meter data transmission method based on carrier and wireless fusion and smart meter
CN122027915B