Method and device for synchronizing electric parameter data in electric energy meter frozen data
By utilizing the interrupt signal and RAM memory of the metering chip and MCU in the smart energy meter, the synchronous processing of electrical parameter data is realized, which solves the problem of frozen data being out of sync, improves power utilization, and reduces electricity bills.
Patent Information
- Application Number
- CN202410480117.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-23
AI Technical Summary
Smart energy meters are prone to out-of-synchronization of electrical parameter data in frozen data, resulting in inconsistent voltage, current, power and power factor, affecting power utilization and electricity bills.
The metering chip sends an interrupt signal to the MCU when the data is updated. The MCU reads the electrical parameter data at one time and puts it into the RAM memory to determine whether the data is synchronized. If it does not meet the synchronization, it will be cleared. The data will not be stored until the freezing time expires to ensure that the data is synchronized. synchronous.
It effectively solves the problem of out-of-synchronization of electrical parameter data in frozen data of electric energy meters, ensures the synchronicity of data when frozen, improves power utilization and reduces electricity expenses.
Smart Images

Figure CN118534403A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart electric energy meters, and in particular to a method and device for synchronizing electric parameter data in frozen data of an electric energy meter. Background Art
[0002] With the transformation of smart grids, the installation of smart energy meters has been fully popularized. Especially in the industrial field, the power factor can be assessed by collecting the relevant electrical parameter data frozen in the smart energy meter. The necessity of assessing the power factor of industrial electricity is mainly reflected in the following aspects: 1. Improve power utilization: Power factor is an important indicator to measure the utilization rate of electrical equipment. If the power factor is low, it means that part of the electrical energy is wasted; therefore, by improving the power factor, the utilization efficiency of electricity can be effectively improved.
[0003] 2. Reduce electricity bills: According to the sampling results, the proportion of large users with a power of 315kVA and above who reduced their electricity bills was significantly higher than the proportion of those who increased their electricity bills. In other words, reasonable control and improvement of power factor may help users reduce their electricity bills.
[0004] 3. Optimize the operation of the power system: Improving the power factor can reduce the load on transmission lines and transformers, reduce equipment losses, and thus improve the operating efficiency and stability of the power system.
[0005] Therefore, assessing the power factor of industrial electricity consumption is not only necessary to improve electricity utilization efficiency and save energy, but also necessary for the economic operation of the power system and the economic benefits of the power users themselves.
[0006] However, when testing various smart energy meters, the voltage, current, power, and power factor measured at the same freezing time point are often not synchronized, that is, power / (voltage*current)≠power factor. The main reasons for this problem include: 1) After the time is up, the freeze is triggered, and the voltage, current, power, and power factor are obtained from the metering chip and stored. Since the data update cycle in the metering chip is very short, when the data is obtained, it is possible that data A and data B are in two cycles, resulting in data asynchrony.
[0007] 2) Obtain voltage, current, power and power factor every 1 second or a certain period of time. It may be that the four electrical parameters of voltage, current, power and power factor are obtained at one time, or one electrical parameter is obtained in a cycle, and then put into RAM. When the time is up, it triggers freezing and stores the data in RAM. In this case, the data asynchrony phenomenon is not only caused by the asynchronous data in the metering chip, but also may be caused by the time difference between the MCU and the metering chip data. Summary of the invention
[0008] Based on this, it is necessary to provide a method and device that can solve the problem of asynchronous electrical parameter data in frozen data of electric energy meters in response to the above technical problems.
[0009] In a first aspect, the present application provides a method for synchronizing electric parameter data in frozen data of an electric energy meter, wherein the electric energy meter includes a metering chip and an MCU. The method includes: S1, the metering chip sends an interrupt signal to the MCU every time the data is updated; S2, MCU reads the electrical parameter data from the metering chip at one time according to the received interrupt signal, and puts the electrical parameter data into the free RAM memory; S3, judging whether the electrical parameter data stored in the RAM memory is in sync, if not, clearing the data and returning to step S2, otherwise proceeding to the next step; S4, when the freezing time is triggered, the electrical parameter data in the idle RAM memory is obtained, and at the same time, it is determined whether the electrical parameter data conforms to the synchronization. If it conforms to the synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, and reads the electrical parameter data at one time, and stores the electrical parameter data that conforms to the synchronization.
[0010] A further technical solution is that the electrical parameter data includes voltage, current, power and power factor.
[0011] A further technical solution is to determine whether the electrical parameter data is synchronized, including: Check whether the power factor is greater than 1 or equal to 0. If so, it does not meet the synchronization requirements. Otherwise, Compare power / (voltage x current) and power factor to see if they are equal. If they are equal, then synchronization is met, otherwise, it is not met.
[0012] A further technical solution is that the RAM memory at least includes a first random access memory RAM1 and a second random access memory RAM2.
[0013] A further technical solution is that the data update cycle is 300ms.
[0014] Its further technical solution is that the method further comprises: The electrical parameter data within the same data update cycle are set with matching serial number tags. When the electrical parameter data is obtained, it is checked whether the serial number tags match. If they match, they are stored, otherwise they are not stored.
[0015] In a second aspect, the present application also provides a device for synchronizing electric parameter data in frozen data of an electric energy meter, which implements the steps of any of the above methods. The device includes: The signal sending module is used for the metering chip to send an interrupt signal to the MCU every time the data is updated; The data reading module is used for the MCU to read the electrical parameter data from the metering chip at one time according to the received interrupt signal, and put the electrical parameter data into the free RAM memory; Synchronous judgment module, used to judge whether the electrical parameter data stored in the RAM memory is in synchronization, and clear the data if it is not in synchronization; The data storage module is used to obtain the electrical parameter data in the idle RAM memory when the freezing time is triggered, and to determine whether the electrical parameter data is in synchronization. If it is in synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, reads the electrical parameter data at one time, and stores the electrical parameter data that is in synchronization.
[0016] Its further technical solution is that the device also includes: A label setting module is used to set matching serial number labels for the electrical parameter data within the same data update cycle; The tag matching module is used to check whether the serial number tag matches when acquiring electrical parameter data. If it matches, it is stored, otherwise it is not stored.
[0017] The beneficial technical effects of the present invention are: The present application connects the data update interrupt of the metering chip to the MCU, puts the read electrical parameter data into the RAM memory and clears the asynchronous electrical parameter data through verification, ensures the synchronization of the stored electrical parameter data when the freezing time arrives, and effectively solves the problem of asynchronous electrical parameter data in the frozen data of the electric energy meter. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic flow chart of a method for synchronizing electric parameter data in frozen data of an electric energy meter according to an embodiment; Figure 2 The present invention is a schematic block diagram of a device for synchronizing electric parameter data in frozen data of an electric energy meter according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0020] In one embodiment, Figure 1 As shown, a method for synchronizing electric parameter data in frozen data of an electric energy meter is provided, the electric energy meter includes a metering chip and an MCU, and the method includes the following steps: Step 10: The metering chip sends an interrupt signal to the MCU each time the data is updated.
[0021] Optionally, the data update cycle is 300ms.
[0022] Step 20: The MCU reads the electrical parameter data from the metering chip at one time according to the received interrupt signal, and puts the electrical parameter data into the free RAM memory.
[0023] Specifically, the electrical parameter data includes voltage, current, power and power factor.
[0024] Step 30, determine whether the electrical parameter data stored in the RAM memory is synchronized. If it is not synchronized, clear the data and return to step S2, otherwise proceed to the next step.
[0025] Optionally, judging whether the electrical parameter data is in synchronization includes: Step 301, check whether the power factor is greater than 1 or equal to 0, if so, it does not meet the synchronization; otherwise, Step 302, compare whether power / (voltage×current) is equal to the power factor. If they are equal, synchronization is met, otherwise, synchronization is not met.
[0026] Step 40, when the freezing time is triggered, the electrical parameter data in the idle RAM memory is obtained, and it is determined whether the electrical parameter data is in synchronization. If it is in synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, and reads the electrical parameter data at one time, and stores the electrical parameter data that is in synchronization.
[0027] Optionally, the RAM memory includes at least a first random access memory RAM1 and a second random access memory RAM2.
[0028] Specifically, in step 20 of the above embodiment, after the MCU reads the electrical parameter data, it first detects whether RAM1 and RAM2 are idle, and puts the data into the idle RAM memory; if RAM1 and RAM2 are both idle, RAM1 is prioritized by default; if both are busy, then wait. In step 40 of the above embodiment, when the freeze is triggered, first detect whether RAM1 and RAM2 are idle, obtain the electrical parameter data in the idle RAM memory, and then determine whether the data is synchronized; if both are busy, then wait.
[0029] At least two random access memories are provided so that when one of them is busy, the other one can access data in time when needed, thus reducing waiting time.
[0030] Optionally, the method for synchronizing electrical parameter data further includes: The electrical parameter data within the same data update cycle are set with matching serial number tags. When the electrical parameter data is obtained, it is checked whether the serial number tags match. If they match, they are stored, otherwise they are not stored.
[0031] This implementation method connects the data update interrupt of the metering chip to the MCU, puts the read electrical parameter data into the RAM memory, clears the asynchronous electrical parameter data through the verification process, and ensures the synchronization of the stored electrical parameter data when the freezing time is reached, effectively solving the problem of asynchronous electrical parameter data in the frozen data of the electric energy meter; at the same time, an improvement is made, and a serial number label is set for each voltage, current, power and power factor in the same data update cycle. When the real-time data is obtained by the master station, it is necessary to verify whether the serial number label matches, further avoiding the phenomenon of data asynchrony.
[0032] Based on the same inventive concept, the embodiment of the present application also provides a device for synchronizing electric parameter data in frozen data of an electric energy meter, which implements the steps of any of the above methods. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more devices for synchronizing electric parameter data in frozen data of an electric energy meter provided below can refer to the limitations of the method for synchronizing electric parameter data in frozen data of an electric energy meter above, and will not be repeated here.
[0033] In one embodiment, Figure 2 As shown, a device for synchronizing electric parameter data in frozen data of an electric energy meter is provided, comprising: The signal sending module is used for the metering chip to send an interrupt signal to the MCU every time the data is updated; The data reading module is used for the MCU to read the electrical parameter data from the metering chip at one time according to the received interrupt signal, and put the electrical parameter data into the free RAM memory; Synchronous judgment module, used to judge whether the electrical parameter data stored in the RAM memory is in synchronization, and clear the data if it is not in synchronization; The data storage module is used to obtain the electrical parameter data in the idle RAM memory when the freezing time is triggered, and to determine whether the electrical parameter data is in synchronization. If it is in synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, reads the electrical parameter data at one time, and stores the electrical parameter data that is in synchronization.
[0034] Optionally, the device further comprises: A label setting module is used to set matching serial number labels for the electrical parameter data within the same data update cycle; The tag matching module is used to check whether the serial number tag matches when acquiring electrical parameter data. If it matches, it is stored, otherwise it is not stored.
[0035] Each module in the electric parameter data synchronization device in the frozen data of the electric energy meter can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0036] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0037] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for synchronizing electric parameter data in frozen data of an electric energy meter, the electric energy meter comprising a metering chip and an MCU, characterized in that: The method comprises: S1, the metering chip sends an interrupt signal to the MCU every time the data is updated; S2, the MCU reads the electrical parameter data from the metering chip at one time according to the received interrupt signal, and puts the electrical parameter data into an idle RAM memory; S3, judging whether the electrical parameter data stored in the RAM memory is in synchronization, if not, clearing the data and returning to step S2, otherwise proceeding to the next step; S4, when the freezing time is triggered, the electrical parameter data in the idle RAM memory is obtained, and it is determined whether the electrical parameter data is in synchronization. If it is in synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, and reads the electrical parameter data at one time, and stores the electrical parameter data that is in synchronization.
2. The method according to claim 1, characterized in that: The electrical parameter data include voltage, current, power and power factor.
3. The method according to claim 2, characterized in that Determine whether the electrical parameter data is synchronized, including: Check whether the power factor is greater than 1 or equal to 0. If so, it does not meet the synchronization requirements. Otherwise, Compare power / (voltage x current) and power factor to see if they are equal. If they are equal, then synchronization is met, otherwise, it is not met.
4. The method according to claim 1, characterized in that The RAM memory at least includes a first random access memory RAM1 and a second random access memory RAM2.
5. The method according to claim 1, characterized in that The data update cycle is 300ms.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The electrical parameter data within the same data update cycle are set with matching serial number tags. When the electrical parameter data is acquired, it is checked whether the serial number tags match. If they match, they are stored, otherwise they are not stored.
7. A device for synchronizing electric parameter data in frozen data of electric energy meter, characterized in that: The device implements the steps of the method according to any one of claims 1 to 6, and the device comprises: The signal sending module is used for the metering chip to send an interrupt signal to the MCU every time the data is updated; A data reading module, used for the MCU to read the electrical parameter data from the metering chip at one time according to the received interrupt signal, and put the electrical parameter data into an idle RAM memory; A synchronization judgment module, used to judge whether the electrical parameter data stored in the RAM memory is in synchronization, and if it is not in synchronization, clear the data; The data storage module is used to obtain the electrical parameter data in the idle RAM memory when the freezing time is triggered, and determine whether the electrical parameter data is in synchronization. If it is in synchronization, the electrical parameter data is stored; otherwise, the MCU directly waits for the interrupt signal sent by the metering chip, reads the electrical parameter data at one time, and stores the electrical parameter data that is in synchronization.
8. The device according to claim 7, characterized in that The device also includes: A label setting module is used to set matching serial number labels for the electrical parameter data within the same data update cycle; The tag matching module is used to check whether the serial number tag matches when acquiring the electrical parameter data. If it matches, it is stored, otherwise it is not stored.
Citation Information
Cited By
Autonomous verification method for frozen data storage function of intelligent electric energy meter
CN120578347A
