Integrated electric energy generation and storage monitoring energy-saving system
Through weighted average filtering and multi-threshold load judgment, combined with oneNet platform and relay control, the existing system's low efficiency and insufficient intelligence are solved, and efficient and intelligent power management is achieved.
Patent Information
- Application Number
- CN202510508854.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-12
AI Technical Summary
The existing integrated power storage monitoring and energy-saving system has problems of low efficiency and insufficient intelligence.
The weighted average filtering processing module is used to smooth the power data, combine multiple power thresholds to judge the load state, and data upload and storage are realized through the oneNet platform module, and the M5311 command receiving module controls the relay to realize intelligent energy-saving management.
It improves the accuracy of the system's judgment of power changes, avoids frequent switching of relays, extends the service life of the equipment, and realizes intelligent energy management and efficient utilization.
Smart Images

Figure CN120474174A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy monitoring, and more specifically discloses an integrated electric energy generation, storage, monitoring and energy-saving system. Background Art
[0002] The integrated electric energy generation, storage, monitoring and energy-saving system combines photovoltaic power generation, intelligent storage and dynamic allocation technologies to build a complete energy ecosystem and realize intelligent management of electric energy. Against the background of rapid economic development in my country, the problem of energy consumption is becoming increasingly serious. Energy conservation has become an important part of the national energy strategy. Traditional energy management methods have problems such as low efficiency and insufficient intelligence, which cannot meet the needs of modern society for optimal energy utilization. Therefore, the development of an efficient and intelligent electric energy management system has important practical significance. Summary of the Invention
[0003] The main technical problem solved by the present invention is to provide an integrated electric energy generation, storage, monitoring and energy-saving system, which can solve the problems of low efficiency and insufficient intelligence of the current integrated electric energy generation, storage, monitoring and energy-saving system.
[0004] To solve the above technical problems, according to one aspect of the present invention, more specifically, an integrated electric energy generation, storage, monitoring and energy-saving system, including: when the system starts up, it first enters the hardware initialization module to perform hardware initialization, initializes the relevant hardware equipment, and ensures that all hardware is ready. Then the HLW8032 electric energy parameter acquisition module starts to collect electric energy parameters, and the collected data is transmitted to the monitoring and energy-saving module for preliminary energy-saving related processing. Subsequently, the data enters the weighted average filtering processing module for filtering processing, and the power data is smoothed by weighted averaging to reduce noise and instantaneous fluctuation interference. The processed power data enters the power judgment module, and according to the set power threshold, it is judged whether the system is in a high load, medium load or low load state. The data of the judgment result will be uploaded to the oneNet platform module to realize data upload and storage. After that, the M5311 instruction receiving module receives the instruction. If the instruction is received, the relay module performs the corresponding action according to the instruction to control the relay switch; if there is no instruction, it returns to continue collecting electric energy parameters and loops this process.
[0005] Furthermore, the HLW8032 electric energy parameter acquisition module measures electric energy parameters such as AC voltage, current, active power, apparent power and power factor.
[0006] Furthermore, the energy-saving monitoring module is a control center that immediately responds to and analyzes the power parameters periodically sent by the HLW8032 power parameter acquisition module.
[0007] Furthermore, the weighted average filtering processing module reduces the impact of noise and instantaneous fluctuations on system control by smoothing power data, better handles sudden fluctuations or noise, and assigns greater weight to the data to make it have a greater impact on the filtering results, thereby ensuring that the data has the greatest impact on the output. The calculation formula for weighted average filtering is as follows:
[0008]
[0009] in is the power value after weighted average, p i is the power data at the i-th moment, w i is the weight value of the power data at the i-th moment. According to the characteristics of weighted average, the weight w i As time goes by, it decreases. The following function is generally used to define the weight:
[0010]
[0011] in, Is a parameter that controls the decay rate, usually Between, big The larger the value, the greater the impact of data on the filtering results over a longer period of time, and the smaller the value, the greater the impact of data on the filtering results over a longer period of time. A larger value makes the filtering result more dependent on recent data.
[0012] Furthermore, the power judgment module adjusts the system load state according to different power thresholds to avoid frequent switching of control strategies due to slight power changes and ensure a smooth response of the system. Specifically:
[0013] When the power value is greater than the high threshold, the system will close both relays, indicating that the system is in a high-load state. When the power value is in a medium range, one relay will be closed, indicating that the system load is high, so that the system will not be overloaded. When the power value is lower than the low threshold, the system returns to its initial state and reopens both relays, indicating that the system load is low and normal working state is restored. The specific formula is as follows:
[0014]
[0015] The power threshold is p high and p low , used to determine whether the current power value is in a high load or low load state. When the power p is greater than p high When the system enters a high load state, the two relays are closed. When the power p is at p high and p low When the power p is less than p, the system is in a medium load state and a relay is closed. low When the system returns to its initial state, the two relays are reopened, indicating that the system load is light.
[0016] Furthermore, the oneNet platform module is based on the oneNet Internet of Things platform and adopts the LwM2M protocol, IPSO specification and AT command set to achieve efficient management and interoperability of devices.
[0017] Furthermore, the M5311 command receiving module is an NB-IoT communication module that adopts the LwM2M protocol, supports lightweight device management, and combines the IPSO standard to achieve efficient data transmission and device control.
[0018] The beneficial effects of the integrated electric energy generation, storage, monitoring and energy-saving system of the present invention are: by adopting a weighted average filtering processing module, a larger weight is given to the data, which can more effectively smooth the power data and reduce noise and instantaneous fluctuation interference. Compared with the existing system in the prior art that does not adopt targeted filtering or a simple filtering method, it can provide a more accurate data basis for subsequent power judgment, so that the system can judge the power changes more accurately. At the same time, the power judgment module sets multiple power thresholds for hierarchical control, which can adjust the system load state more finely, avoid frequent switching of relays due to slight power changes, make the control strategy more in line with actual load requirements, and extend the service life of relays and related equipment, ensuring the long-term stable operation of the system. In addition, the monitoring and energy-saving module is combined with the relay control, which can dynamically adjust the power supply of the equipment according to the load state, realize intelligent energy-saving management, and improve energy utilization efficiency. Moreover, the electric energy parameters collected by the system are uploaded to the OneNet platform module after multi-module processing, which is convenient for management personnel to analyze data and provide strong support for energy management decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0020] Figure 1 Schematic diagram of the system principle;
[0021] Figure 2 A schematic diagram of the software module structure. DETAILED DESCRIPTION
[0022] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0023] According to one aspect of the present invention, Figure 1-2As shown, an integrated electric energy generation, storage, monitoring and energy-saving system is provided, including: when the system starts, it first enters the hardware initialization module to perform hardware initialization, initializes the relevant hardware equipment, and ensures that all hardware is ready. Then the HLW8032 electric energy parameter acquisition module starts to collect electric energy parameters, and the collected data is transmitted to the monitoring and energy-saving module for preliminary energy-saving related processing. Subsequently, the data enters the weighted average filtering processing module for filtering processing, and the power data is smoothed by weighted averaging to reduce noise and instantaneous fluctuation interference. The processed power data enters the power judgment module, and according to the set power threshold, it is judged whether the system is in a high load, medium load or low load state. The data of the judgment result will be uploaded to the oneNet platform module to realize data upload and storage. After that, the M5311 instruction receiving module receives the instruction. If the instruction is received, the relay module performs the corresponding action according to the instruction to control the relay switch; if there is no instruction, it returns to continue collecting electric energy parameters and loops this process.
[0024] The HLW8032 electric energy parameter acquisition module is a high-precision single-phase electric energy metering chip that can measure the electric energy parameters of AC voltage, current, active power, apparent power and power factor, providing the original data basis for subsequent energy-saving control.
[0025] The energy-saving monitoring module is the STM32F103RCT6, a low-power, high-performance 32-bit ARM Cortex-M3 core microcontroller. It serves as the control center and instantly responds to and analyzes the power parameters (voltage, current, power, and power consumption) periodically sent by the HLW8032 power parameter acquisition module.
[0026] The weighted average filtering processing module reduces the impact of noise and instantaneous fluctuations on system control by smoothing power data, better handles sudden fluctuations or noise, and gives greater weight to the data to make it have a greater impact on the filtering results. Assume that the system receives a power data sequence p1, p2, ..., p n Each power data p i There is a corresponding weight w i , the weight value gradually decreases over time to ensure that the data has the greatest impact on the output. The calculation formula for weighted average filtering is as follows:
[0027]
[0028] in is the power value after weighted average, p i is the power data at the i-th moment, w i is the weight value of the power data at the i-th moment. According to the characteristics of weighted average, the weight w i As time goes by, it decreases. The following function is generally used to define the weight:
[0029]
[0030] in, Is a parameter that controls the decay rate, usually Between, big The larger the value, the greater the impact of data on the filtering results over a longer period of time, and the smaller the value, the greater the impact of data on the filtering results over a longer period of time. A larger value makes the filtering result more dependent on recent data.
[0031] The power judgment module adjusts the system's load state according to different power thresholds to avoid frequent switching of control strategies due to slight power changes and ensure a smooth response of the system. Assuming there are two relays, the specific steps are:
[0032] When the power value is greater than the high threshold p high , the system will close the two relays, indicating that the system is in a high load state. When the power value is in a medium range, that is, greater than the low threshold p low and is less than or equal to the high threshold p high (p low <p≤p high ), close a relay, indicating that the system load is high, so that the system will not be overloaded. When the power value is lower than the low threshold p low , the system returns to its initial state and reopens the two relays, indicating that the system load is low and normal working state is restored. The specific formula is as follows:
[0033]
[0034] The power threshold is p high and p low , used to determine whether the current power value is in a high load or low load state. When the power p is greater than p high When the system enters a high load state, the two relays are closed. When the power p is at p high and p low When the power p is less than p, the system is in a medium load state and a relay is closed. low When , the system returns to its initial state and reopens the two relays, indicating that the system load is low;
[0035] The advantage of multi-level control is that it avoids frequent switching. By introducing multiple thresholds, the relay can be prevented from switching frequently due to minor fluctuations. For example, when the power value fluctuates within a small range, the relay will not switch frequently, but will maintain its current state until the power changes significantly. This results in a smoother system response, without making drastic adjustments due to instantaneous power fluctuations. By setting multiple control levels (such as multiple power thresholds), the control strategy can be made more flexible and adaptable to different working environments and requirements.
[0036] The oneNet platform module is based on the oneNet IoT platform and adopts the LwM2M protocol, IPSO specification and AT command set to achieve efficient device management and interoperability;
[0037] The LwM2M protocol, developed by OMA and designed specifically for resource-constrained devices, utilizes a client / server architecture and features a lightweight design, a standardized data model, DTLS security support, and device management capabilities (such as registration, configuration, firmware updates, and remote control). Its data model utilizes an "object → instance → resource" hierarchy to facilitate modular management of device functions. In the system, the LwM2M protocol is used for data reporting, command issuance, and device management between the M5311 command receiving module and the oneNet platform module, ensuring secure data transmission and convenient device management.
[0038] The IPSO specification defines a set of standardized object models to achieve interoperability among IoT devices. The data model covers object representation, data types, operations, and content formats. Object type IDs, instance IDs, and resource types are mapped through a URI path hierarchy. The oneNet platform module uses the IPSO-specified Object (e.g., a certain sensor type), Instance (e.g., the number of sensors of the same type), and Resource (e.g., a description of certain sensor characteristics) to organize device data. This enables unified management and compatibility of different types of devices, providing a standardized foundation for the collaborative operation of various devices in the system.
[0039] The AT command set is used for communication between terminal devices and communication modules. It begins with "AT" and is followed by specific command parameters and ends with a carriage return or carriage return line feed. Functions include device control, mode adjustment, network configuration, status query, and data transmission. It is divided into execution commands, test commands, and query commands. The M5311 communication module has an expanded AT command set and supports multiple protocols such as LwM2M, MQTT, and HTTP. AT commands can be used to connect to the oneNet platform module and communicate with the MQTT protocol, facilitating device initialization, network configuration, and remote control, simplifying system configuration and data transmission.
[0040] During system operation, the LwM2M protocol is responsible for the management and communication logic between devices and the platform. The IPSO specification provides a standardized way to organize device data, and the AT command set serves as the command tool for interaction between devices and communication modules. These three work together. The M5311 command receiving module uses the LwM2M protocol and the extended AT command set to organize data according to the IPSO specification, achieving efficient connection and data interaction with the oneNet platform module. This module completes operations such as reporting device status and receiving platform commands to control relays, thereby realizing the system's intelligent monitoring and allocation of electrical energy.
[0041] The M5311 instruction receiving module is an NB-IoT communication module that relies on the STM32 microcontroller system to work. The main function is responsible for initializing the entire system and interacting with the M5311 instruction receiving module, coordinating the orderly operation of various parts of the system. During the communication process with the M5311 instruction receiving module, it undertakes key tasks such as data reception and analysis, power calculation, and relay control.
[0042] In the communication and data processing process, the usart3.c file provides the driver for serial port 3 (USART3) on the STM32 development board, which is used to implement data interaction with the M5311 instruction receiving module. It manages data reception by defining the receive and send buffers and the receive status flag. Timer 2 is used to detect the continuity of data reception to ensure stable data transmission. The M5311.c file focuses on implementing communication and configuration with the M5311 instruction receiving module. The m5311_check_cmd function checks whether the received data contains the specified command string. The m5311_send_cmd function sends a command to the M5311 instruction receiving module and waits for a response. The init_m5311 function is used to initialize the module, detect the connection status, configure functions and register the device to ensure the normal operation of the M5311 instruction receiving module.
[0043] At the same time, the usart2.c file involves the STM32 serial port 2 (USART2) and DMA configuration, providing data reception, transmission and DMA transfer related functions, receiving data through interrupt triggering and storing it in the receive buffer, using timer 4 to detect the data reception interval, combining DMA to optimize the transmission efficiency, achieving efficient data communication, and providing support for data interaction between the M5311 instruction receiving module and the system. The timer.c file is mainly used for interrupt-driven initialization and interrupt service of the timer TIM2 on the STM32 development board. The timer controls the counting cycle through the automatic reload register (ARR) and prescaler (PSC), generates a timer interrupt, and provides precise timing function for the system's data processing and communication process, ensuring the stable operation of the M5311 instruction receiving module and the entire system. The module adopts the LwM2M protocol, supports lightweight device management, and combines the IPSO standard to achieve efficient data transmission and device control.
[0044] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention also fall within the scope of protection of the present invention.
Claims
1. The integrated electric energy generation, storage, monitoring and energy-saving system is characterized by: include: When the system starts up, it first enters the hardware initialization module to initialize the hardware, initializes the relevant hardware devices, and ensures that all hardware is ready. Then the HLW8032 power parameter acquisition module starts to collect power parameters. The collected data is transmitted to the monitoring and energy-saving module for preliminary energy-saving related processing. Subsequently, the data enters the weighted average filtering processing module for filtering processing. The power data is smoothed by weighted averaging to reduce noise and instantaneous fluctuation interference. The processed power data enters the power judgment module. According to the set power threshold, it is judged whether the system is in a high load, medium load or low load state. The judgment result data will be uploaded to the oneNet platform module to realize data upload and storage. After that, the M5311 instruction receiving module receives the instruction. If the instruction is received, the relay module performs the corresponding action according to the instruction to control the relay switch; if there is no instruction, it returns to continue collecting power parameters and repeats this process.
2. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1, characterized in that: The HLW8032 electric energy parameter acquisition module measures the electric energy parameters of AC voltage, current, active power, apparent power and power factor.
3. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1 is characterized in that: The monitoring and energy-saving module is a control center that immediately responds to and analyzes the power parameters periodically sent by the HLW8032 power parameter acquisition module.
4. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1 is characterized in that: The weighted average filtering processing module reduces the impact of noise and instantaneous fluctuations on system control by smoothing power data, better handles sudden fluctuations or noise, and assigns greater weight to data to make it have a greater impact on the filtering results, thereby ensuring that the data has the greatest impact on the output. The calculation formula for weighted average filtering is as follows: in is the power value after weighted average, p i is the power data at the i-th moment, w i is the weight value of the power data at the i-th moment. According to the characteristics of weighted average, the weight w i As time goes by, it decreases. The following function is generally used to define the weight: in, Is a parameter that controls the decay rate, usually Between, big The larger the value, the greater the impact of data on the filtering results over a longer period of time, and the smaller the value, the greater the impact of data on the filtering results over a longer period of time. A larger value makes the filtering result more dependent on recent data.
5. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1 is characterized in that: The power judgment module adjusts the system's load status according to different power thresholds to avoid frequent switching of control strategies due to slight power changes and ensure a smooth response of the system. Specifically: When the power value is greater than the high threshold, the system will close both relays, indicating that the system is in a high-load state. When the power value is in a medium range, one relay will be closed, indicating that the system load is high, so that the system will not be overloaded. When the power value is lower than the low threshold, the system returns to its initial state and reopens both relays, indicating that the system load is low and normal working state is restored. The specific formula is as follows: in The power threshold is p high and pl ow , used to determine whether the current power value is in a high load or low load state. When the power p is greater than p high When the system enters a high load state, the two relays are closed. When the power p is at p high and p low When the power p is less than p, the system is in a medium load state and a relay is closed. low , the system returns to its initial state and reopens the two relays, indicating that the system load is low.
6. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1, characterized in that: The oneNet platform module is based on the oneNet Internet of Things platform and adopts the LwM2M protocol, IPSO specification and AT instruction set to achieve efficient management and interoperability of devices.
7. The integrated electric energy generation, storage, monitoring and energy-saving system according to claim 1 is characterized in that: The M5311 command receiving module is an NB-IoT communication module that adopts the LwM2M protocol, supports lightweight device management, and combines the IPSO standard to achieve efficient data transmission and device control.