Smart home real-time energy consumption monitoring and dynamic distribution system
Through the smart home real-time energy consumption monitoring and dynamic allocation system, data acquisition, spatio-temporal feature fusion and multi-objective optimization algorithms are used to achieve efficient and intelligent distribution of home energy, solving the problems of waste in home energy management and shortening of equipment life, reducing electricity costs and improving system reliability.
Patent Information
- Application Number
- CN202510327787.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Home energy management is complex, and existing systems are difficult to achieve efficient energy utilization, cost control and coordinated operation of equipment. The lack of intelligent energy distribution strategies has led to waste of energy and shortening of the life of energy storage equipment.
The real-time energy consumption monitoring and dynamic allocation system of smart home is adopted, and through the data acquisition module, the spatiotemporal feature fusion module, the energy distribution module and the dynamic control module, the graph convolution neural network, the multi-objective optimization model and the improved quantum particle swarm algorithm, the precise distribution of home energy and the intelligent adjustment of equipment are achieved.
It improves energy utilization efficiency, reduces electricity costs, extends the life of energy storage equipment, and enhances the reliability and intelligence of system operation.
Smart Images

Figure CN120406223A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart home, and specifically to a real-time energy consumption monitoring and dynamic allocation system for smart home. Background Art
[0002] With the rapid development of technology and the continuous improvement of people's living standards, the concept of smart home has gradually become popular. More and more families are starting to equip various smart home appliances and energy devices, such as photovoltaic power generation devices, energy storage batteries, etc. While this trend improves the convenience and comfort of life, it also makes home energy management increasingly complex. Traditional energy allocation methods are difficult to meet the modern family's requirements for efficient energy utilization, cost control, and coordinated operation of devices. In the current home energy usage scenario, the energy supply and demand situation is complex and changeable. Renewable energy such as solar energy is increasingly widely used in homes. The power generation of photovoltaic power is significantly affected by factors such as weather and sunlight duration, and has strong uncertainty. For example, on cloudy days or at night, the photovoltaic power generation will drop significantly or even be zero; while during sunny periods, there may be an excess of electrical energy. In addition, there are a wide variety of household electrical devices, and the energy consumption characteristics and usage times of different devices are different. High-power devices such as air conditioners and electric water heaters consume a large amount of electrical energy when operating; while lighting devices and small household appliances have relatively low power, but may have a high usage frequency. There are also significant differences in users' electricity consumption habits and demands, which further increases the difficulty of energy supply and demand management.
[0003] From the perspective of energy cost, the real-time electricity price of the external power grid fluctuates according to factors such as electricity usage time periods and seasons. During peak electricity usage periods, the electricity price is often high; while during off-peak periods, the electricity price is relatively low. However, most families lack effective means to reasonably adjust their electricity usage strategies according to electricity price changes, resulting in high electricity costs. Many families still use electricity in the conventional way during peak electricity price periods, and fail to make full use of off-peak electricity prices for energy storage charging or arranging the operation of high-power devices, resulting in unnecessary economic expenditures.
[0004] In terms of energy storage device management, the energy storage battery is a key device for home energy storage, and its charge and discharge strategy is crucial for battery life and energy utilization efficiency. Unreasonable charge and discharge operations will accelerate the aging of the battery and reduce the service life and performance of the battery. Currently, when many families use energy storage batteries, they lack a scientific charge and discharge plan, and often simply charge when the battery power is low and discharge when the power is high, without comprehensively considering factors such as the remaining capacity of the battery, charge and discharge efficiency, and the energy demand of the family, resulting in the advantages of the energy storage battery not being fully utilized.
[0005] Existing home energy distribution systems have obvious deficiencies in the coordination and intelligence among devices. Each device usually operates independently, lacking an effective information interaction and coordination mechanism, and unable to achieve the optimal distribution of energy. For example, when the photovoltaic power generation is excessive, it is unable to automatically coordinate the charging of the energy storage battery and the power consumption of high-power devices, resulting in waste of electric energy; when the grid electricity price changes, it is also unable to timely adjust the operating state of the devices to reduce the electricity cost. Summary of the Invention
[0006] The purpose of the present invention is to provide a smart home real-time energy consumption monitoring and dynamic distribution system to solve the problems raised in the above background technology.
[0007] To achieve the above purpose, the present invention provides the following technical solutions: A smart home real-time energy consumption monitoring and dynamic distribution system, the system includes:
[0008] A data acquisition module for obtaining real-time data on home energy supply and demand, including photovoltaic power generation power, remaining capacity of the energy storage battery, time-series data of home device energy consumption, and real-time electricity price of the external power grid;
[0009] A spatio-temporal feature fusion module that performs spatio-temporal feature fusion processing on the real-time data based on a graph convolutional neural network to generate an energy state feature matrix; inputs the energy state feature matrix into a pre-trained multi-objective optimization model, the multi-objective optimization model adopts a hierarchical genetic algorithm structure, and iteratively optimizes the energy distribution strategy based on a dynamic constraint function to generate strategy parameters;
[0010] An energy distribution module that constructs a dynamic energy distribution model according to the strategy parameters, the dynamic energy distribution model aims at the lowest electricity cost and the longest energy storage life, and performs global optimization using an improved quantum particle swarm algorithm, where the improved quantum particle swarm algorithm introduces an adaptive inertia weight and a dynamic contraction factor; outputs an optimal energy distribution sequence based on the dynamic energy distribution model;
[0011] A dynamic control module that establishes a hierarchical control architecture according to the optimal energy distribution sequence, the hierarchical control architecture includes a decision-making layer, a scheduling layer, and an execution layer, where the decision-making layer performs long-term energy planning based on the strategy parameters, the scheduling layer performs short-term load distribution based on the optimal energy distribution sequence, and the execution layer realizes real-time adjustment of device power based on distributed model predictive control; outputs energy control instructions through the hierarchical control architecture to complete the dynamic distribution of home energy.
[0012] Preferably, the multi-objective optimization model adopts a hierarchical genetic algorithm structure, and iteratively optimizes the energy distribution strategy based on a dynamic constraint function to generate strategy parameters including:
[0013] Construct a multi-dimensional state space, where the state space includes the predicted value of photovoltaic power generation, the charge and discharge efficiency of energy storage batteries, the device priority weight, and the electricity price fluctuation range; define energy allocation actions based on the executable action space, and the action space includes the charge and discharge power of energy storage, the start and stop states of devices, and the grid interaction power threshold;
[0014] Design a multi-objective fitness function, where the fitness function includes a cost penalty term, a life attenuation term, and a load balancing term. Among them, the cost penalty term is calculated by the product of the real-time electricity price and the grid interaction power, the life attenuation term is calculated by the weighted integral of the charge and discharge cycle times of the energy storage battery, and the load balancing term is calculated by the variance between the operating power of the device and the rated power;
[0015] Construct a hierarchical genetic algorithm structure, which includes a main population and a sub-population. The main population is used for global policy search, and the sub-population is used for local constraint satisfaction; both the main population and the sub-population use real number coding, the crossover operator uses adaptive arithmetic crossover, and the mutation operator uses Gaussian perturbation;
[0016] Design a dynamic constraint function, where the constraint function includes the energy storage capacity boundary constraint, the device maximum power constraint, and the grid interaction power limit. The constraint conditions are embedded in the fitness function by the Lagrange multiplier method;
[0017] Update the population using the elitist retention strategy, directly retain the best individual of each generation to the next generation, and realize the information exchange between the main population and the sub-population through the migration operator; output the optimized policy parameters, including the device scheduling sequence, the energy storage charge and discharge plan, and the grid interaction strategy.
[0018] Preferably, the improved quantum particle swarm optimization algorithm introduces an adaptive inertia weight and a dynamic contraction factor, including:
[0019] Define the quantum particle position vector as a set of continuous variables of the energy allocation action, and the velocity vector as the probability distribution of the action adjustment amount;
[0020] Design an adaptive inertia weight update formula, where the weight decays exponentially in segments with the number of iterations, retaining the global search ability in the initial stage and enhancing the local convergence accuracy in the later stage;
[0021] Introduce a dynamic contraction factor, which is dynamically adjusted according to the particle swarm diversity index. When the variance of the particle positions is lower than the threshold, the contraction factor increases to compress the search range;
[0022] Construct a quantum potential well model to confine the particle motion within the feasible solution space, and control the particle jump probability through the potential well depth;
[0023] Use non-dominated sorting to screen the Pareto front solution set, and combine the crowding degree calculation to select the optimal compromise solution in the front solutions.
[0024] Preferably, the decision-making layer's long-term energy planning based on policy parameters includes:
[0025] Establish a Markov decision process model for household energy supply and demand. The states of the Markov decision process model include the predicted photovoltaic output for the next 24 hours, the electricity price fluctuation curve, and the user behavior pattern.
[0026] Use a deep reinforcement learning algorithm to solve the optimal policy. The algorithm adopts a double-delayed deep deterministic policy gradient framework, and jointly optimizes action selection and value evaluation through an Actor-Critic network.
[0027] Design a reward function that includes economic rewards, energy storage health rewards, and comfort rewards. Among them, the comfort reward is calculated based on the duration of the device operation deviating from the user's preset mode.
[0028] Construct a periodic rolling optimization mechanism, re-initialize the policy parameters every 6 hours, and update the state transition probability matrix based on the latest data.
[0029] Preferably, the execution layer's real-time adjustment of device power based on distributed model predictive control includes:
[0030] Construct a device-level prediction model, which includes the thermodynamic equation of the air conditioner, the dimming curve of lighting equipment, and the non-linear efficiency characteristics of an electric vehicle charger.
[0031] Design a distributed rolling horizon optimization framework. Each device controller independently solves the local optimization problem and exchanges boundary state information through a consensus protocol.
[0032] Construct a coupling constraint coordination mechanism, use the alternating direction method of multipliers to handle the power competition constraints between devices, and determine the iteration termination condition through residual convergence.
[0033] Design a robust feedback correction module to correct the control command based on the deviation between the real-time power measurement value and the predicted value.
[0034] Preferably, the distributed model predictive control introduces a fault tolerance mechanism, including:
[0035] Construct a device health assessment model, and calculate the deterioration index based on the current harmonic spectrum, the wavelet packet energy of the vibration signal, and the temperature rise rate.
[0036] Design redundant control channels. When it is detected that the health of a certain actuator is lower than the threshold, automatically switch to the standby control link and reconstruct the optimization problem.
[0037] Construct a directed graph model of fault propagation, and use a graph neural network to predict the impact path of local faults on the system-level performance.
[0038] Implement a preventive control strategy. Before predicting that the device is about to fail, actively adjust the energy distribution plan to avoid the risk of cascading failures.
[0039] Preferably, the short-term load distribution by the scheduling layer based on the optimal energy distribution sequence includes:
[0040] Discretize the 24-hour scheduling cycle into 96 15-minute time periods, construct a three-dimensional decision matrix, and the dimensions include time period index, device type identifier, and power adjustment margin; establish a multi-party interest coordination model based on dynamic game theory, and the multi-party includes user comfort requirements, grid peak shaving requirements, and energy storage life maintenance goals.
[0041] Preferably, the spatio-temporal feature fusion processing of the real-time data by the graph convolutional neural network includes:
[0042] Construct a home energy topology graph, and the nodes include photovoltaic arrays, energy storage batteries, electrical appliances, and grid connection points. The edge weights are jointly determined by the electrical connection relationship and the power transmission efficiency;
[0043] Design spatio-temporal convolutional kernels. The spatial convolutional layer extracts the energy flow characteristics between nodes, and the temporal convolutional layer extracts the power time-series change patterns of each node;
[0044] Adopt a multi-head attention mechanism to fuse features of different time scales, and suppress the influence of noise data through a gated recurrent unit;
[0045] Output an energy state feature matrix, and its dimensions are consistent with the number of nodes and the number of feature channels of the topology graph.
[0046] Compared with the prior art, the beneficial effects of the present invention are:
[0047] Precisely adapt to energy supply and demand. The data acquisition module comprehensively collects energy data, and the spatio-temporal feature fusion module deeply analyzes data features, providing an accurate basis for energy distribution. The energy distribution module uses an improved algorithm to precisely plan the energy flow direction and improve energy utilization efficiency. For example, when photovoltaic power generation is sufficient, it preferentially satisfies household electricity consumption and charges the energy storage battery to avoid energy waste.
[0048] Greatly reduce electricity costs. The system closely combines real-time electricity prices to formulate energy strategies. During low electricity price periods, purchase electricity from the grid for storage or operate high-power devices; during high electricity price periods, rely on photovoltaic power generation and energy storage for power supply to reduce high-price electricity purchases and save electricity bills for users.
[0049] Effectively extend the energy storage life. Through the precise calculation and management of the charge and discharge cycle times of the energy storage battery, the system reasonably arranges the charge and discharge plan, avoids overcharging and over-discharging, slows down the battery aging speed, and reduces the replacement cost of energy storage devices.
[0050] Improve the intelligent management of equipment, and the decision-making layer, dispatching layer, and execution layer of the dynamic control module work together. The decision-making layer makes long-term plans considering user comfort, the dispatching layer balances the interests of multiple parties for short-term load distribution, and the execution layer precisely adjusts the equipment power to achieve intelligent and efficient operation of the equipment.
[0051] Enhance the reliability of system operation. The fault-tolerant mechanism of the execution layer monitors the health status of equipment in real time. Once an abnormality occurs in the equipment, the redundant channels are switched in time, the impact of the predicted fault is estimated, and the energy distribution is adjusted in advance to ensure stable energy supply and reduce fault losses. Brief Description of the Drawings
[0052] Figure 1 It is the working principle diagram of the smart home real-time energy consumption monitoring and dynamic allocation system described in the present invention;
[0053] Figure 2 It is the schematic diagram of solving the energy distribution sequence based on the improved quantum particle swarm optimization algorithm;
[0054] Figure 3 It is the working principle diagram of introducing a fault-tolerant mechanism into distributed model predictive control. Detailed Embodiments
[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0056] Please refer to Figures 1-3 , the present invention provides a technical solution: a smart home real-time energy consumption monitoring and dynamic allocation system, and the system includes:
[0057] The data acquisition module collects real-time household energy supply and demand data through various sensors and data interfaces. For example, a photovoltaic power sensor is used to measure the photovoltaic power generation; a battery management system is used to obtain the remaining capacity of the energy storage battery; energy consumption monitoring devices are installed on each household device to collect its energy consumption time series data; and the real-time electricity price of the external power grid is obtained from the power grid data interface. These data provide a basic basis for subsequent energy distribution decisions.
[0058] The spatio-temporal feature fusion module uses a graph convolutional neural network to process the collected real-time data. First, a home energy topology graph is constructed, with the photovoltaic array, energy storage battery, electrical appliances, and grid connection points as nodes, and the edge weights are determined based on the electrical connection relationship and power transmission efficiency. By designing spatio-temporal convolutional kernels, the spatial convolutional layer extracts the energy flow characteristics between nodes, and the temporal convolutional layer captures the power time-series change patterns of each node. The multi-head attention mechanism is used to fuse features at different time scales, and the gated recurrent unit suppresses noise data to generate an energy state feature matrix. Subsequently, this matrix is input into a pre-trained multi-objective optimization model. This model adopts a hierarchical genetic algorithm structure and iteratively optimizes the energy allocation strategy based on a dynamic constraint function to generate strategy parameters.
[0059] Based on the strategy parameters generated by the multi-objective optimization model, the energy allocation module constructs a dynamic energy allocation model with the objectives of minimizing electricity costs and maximizing the lifespan of the energy storage. This model uses an improved quantum particle swarm optimization algorithm for global optimization, which introduces an adaptive inertia weight and a dynamic contraction factor. The adaptive inertia weight decays exponentially in segments with the number of iterations, retaining the global search ability in the initial stage and enhancing the local convergence accuracy in the later stage; the dynamic contraction factor is dynamically adjusted according to the particle swarm diversity index. When the variance of the particle positions is lower than the threshold, the contraction factor is increased to compress the search range. By constructing a quantum potential well model, the particle motion is constrained within the feasible solution space, and the well depth is used to control the particle jump probability. Finally, non-dominated sorting is used to screen the Pareto front solution set, and the optimal compromise solution in the front is selected by combining the crowding degree calculation to output the optimal energy allocation sequence.
[0060] The dynamic control module establishes a hierarchical control architecture based on the optimal energy allocation sequence, including a decision-making layer, a scheduling layer, and an execution layer. The decision-making layer establishes a Markov decision process model for home energy supply and demand based on the strategy parameters, uses a deep reinforcement learning algorithm to solve the optimal strategy, constructs a periodic rolling optimization mechanism by designing a reward function including economic rewards, energy storage health rewards, and comfort rewards, re-initializes the strategy parameters and updates the state transition probability matrix every 6 hours for long-term energy planning. The scheduling layer discretizes the 24-hour scheduling cycle into 96 15-minute time periods, constructs a three-dimensional decision matrix, and establishes a multi-party interest coordination model based on dynamic game theory for short-term load allocation. The execution layer constructs a device-level prediction model, designs a distributed rolling horizon optimization framework, constructs a coupled constraint coordination mechanism, designs a robust feedback correction module, and realizes the real-time adjustment of device power based on distributed model predictive control to complete the dynamic allocation of home energy.
[0061] The present invention will be further described below in conjunction with Embodiments 1 to 5:
[0062] Embodiment 1:
[0063] This embodiment aims to elaborate in detail the specific process in which the multi-objective optimization model adopts a hierarchical genetic algorithm structure to iteratively optimize the energy distribution strategy based on a dynamic constraint function and generate strategy parameters. This process plays a crucial role in improving the scientificity and rationality of the energy distribution strategy and realizing the efficient utilization of household energy.
[0064] First, construct a multi-dimensional state space. The predicted value of the photovoltaic power generation in the state space is obtained by predicting historical photovoltaic power generation data, combining weather prediction information, and using a time series analysis model (such as the ARIMA model). The charge and discharge efficiency of the energy storage battery can be calibrated by the technical parameters provided by the battery manufacturer and combined with the charge and discharge data during actual use. The device priority weight is set according to the user's usage requirements and importance of different devices. For example, the priority weight of medical devices can be set to 10, while the priority weight of entertainment devices can be set to 3. The electricity price fluctuation range is determined by analyzing the fluctuation law of historical electricity price data and combining the electricity price adjustment information released by the power grid.
[0065] Define the energy distribution actions based on the executable action space. The charge and discharge power of the energy storage is determined according to the capacity of the energy storage battery, the current remaining power, and the charge and discharge limits, and its value range is [-P_max, P_max], where P_max is the maximum charge and discharge power of the energy storage battery. The start-stop state of the device is represented by 0 and 1, where 0 represents the device is off and 1 represents the device is on. The grid interaction power threshold is determined according to the capacity limit of the grid and the electricity consumption agreement signed between the household and the grid.
[0066] Next, design a multi-objective fitness function, which includes a cost penalty term, a life attenuation term, and a load balancing term. The cost penalty term is calculated by the formula where p t is the real-time electricity price at time t, P grid,t is the power interacting with the grid at time t, and T is the calculation period. The life attenuation term is calculated by the formula where w is the weight coefficient, set according to the characteristics of the energy storage battery, and N cycle (t)dt is the charge and discharge cycle times of the energy storage battery at time t. The load balancing term is calculated by the formula where n is the number of devices, P i is the operating power of the i-th device, and P is the average rated power of all devices.
[0067] Construct a hierarchical genetic algorithm structure. The main population size is set to 100, and the sub-population size is set to 50. Both the main population and the sub-population use real number coding to facilitate the representation of continuous energy distribution actions. The crossover operator adopts adaptive arithmetic crossover, and its formula is where x1 and x2 are two parent individuals, and x1 newand x2 new is the offspring individual generated after crossover, α is the adaptive crossover coefficient, which is dynamically adjusted according to the fitness value of the individual. The mutation operator uses Gaussian perturbation, and the formula is x i is the individual before mutation, is the individual after mutation, σ is the standard deviation, which is dynamically adjusted according to the number of evolutionary generations, and N(0,1) is a random number of the standard normal distribution.
[0068] Design a dynamic constraint function. The boundary constraint formula for the energy storage capacity is E min ≤E(t)≤E max , where E(t) is the remaining capacity of the energy storage battery at time t, and E min and E max are the minimum and maximum allowable capacities of the energy storage battery respectively. The maximum power constraint formula for the device is P i ≤P i,max , P i is the actual operating power of the i-th device, and P i,max is the maximum power of the i-th device. The formula for the limit of the power interaction with the power grid is P grid,min ≤P grid,t ≤P grid,max , P grid,t is the power interacting with the power grid at time t, and P grid,min and P grid,max are the lower and upper limits of the power interaction with the power grid respectively. These constraint conditions are embedded in the fitness function by the Lagrange multiplier method, and the population is updated using the elitist retention strategy. The 5 individuals with the best fitness values in each generation of the population are directly retained to the next generation. The information exchange between the main population and the sub-population is realized through the migration operator. The migration operator is executed every 5 generations. 10% of the individuals with the best fitness values are selected from the main population and migrated to the sub-population, and at the same time, 10% of the individuals with the best fitness values are selected from the sub-population and migrated to the main population. After multiple generations of iterative optimization, the optimized strategy parameters are output, including the device scheduling sequence, the energy storage charging and discharging plan, and the power grid interaction strategy.
[0069] Example 2:
[0070] This example details the specific implementation method of introducing an adaptive inertia weight and a dynamic contraction factor into the improved quantum particle swarm algorithm to improve the search efficiency and optimization accuracy of the algorithm, and ensure that the energy distribution model can obtain the optimal energy distribution sequence more accurately.
[0071] Define the quantum particle position vector as a set of continuous variables of energy distribution actions. For example, for a problem containing n energy distribution actions, the particle position vector X = [x1, x2, …, x n , x iThe value representing the i-th energy distribution action, such as the continuous variable representation corresponding to the charge-discharge power of energy storage, the start-stop state of equipment, etc. The velocity vector is the probability distribution of the action adjustment amount, denoted by V = [v1, v2, …, v n , where v i determines the probability and amplitude of the position adjustment of the particle in the i-th dimension.
[0072] Design an adaptive inertia weight update formula. Let w be the inertia weight, t be the current iteration number, T be the maximum iteration number, w max and w min be the initial maximum value and the final minimum value of the inertia weight respectively. The adaptive inertia weight update formula is:
[0073]
[0074] In the initial stage (0 ≤ t ≤ T / 2), the inertia weight is relatively large, enabling the particle to have a strong global search ability and explore possible optimal solutions in a larger solution space; as the iteration progresses (T / 2 < t ≤ T), the inertia weight gradually decreases to the minimum value w min , enhancing the local convergence accuracy of the algorithm and enabling the particle to perform fine search in the local area and approach the optimal solution.
[0075] Introduce a dynamic contraction factor. First, define the particle swarm diversity index, which is measured by the variance of the particle positions. The formula is n is the number of particles, x i is the position vector of the i-th particle, is the average value of all particle position vectors. Set the threshold When , it indicates that the diversity of the particle swarm is low and the particles are too concentrated. At this time, increase the contraction factor. The adjustment formula for the contraction factor c is:
[0076]
[0077] c0 is the initial value of the contraction factor, c max is the maximum value of the contraction factor. When the contraction factor increases, the search range of the particle is compressed, which helps to search for the optimal solution more precisely in the local area.
[0078] Construct a quantum potential well model to confine the particle motion within the feasible solution space. Assume that the feasible solution space is [a, b], and the quantum potential well function U(x) is defined as
[0079]
[0080] Control the particle hopping probability by the depth of the potential well. The hopping probability P of a particle within the potential well is related to the depth D of the potential well and the particle energy E. The Metropolis criterion is used to calculate the hopping probability, and the formula is:
[0081]
[0082] ΔE is the energy difference before and after the particle hops, k is the Boltzmann constant, and T is the temperature parameter. As the iteration progresses, T gradually decreases, and the simulated annealing process makes the particles more inclined to hop towards the low-energy region (i.e., the region of better solutions).
[0083] Use non-dominated sorting to screen the Pareto front solution set. For a set of solutions S, if solution x i is not inferior to solution x j in all objective functions, and is superior to solution x j in at least one objective function. Then it is said that solution x i dominates solution x j . All non-dominated solutions are divided into the first front solution set F1, and non-dominated solutions are continuously searched from the remaining solutions and divided into the second front solution set F2, and so on. Combine the crowding degree calculation to select the optimal compromise solution in the front solutions. The crowding degree calculation formula is:
[0084]
[0085] I i is the crowding degree of the i-th solution, m is the number of objective functions, are the values of the (i + 1)-th and (i - 1)-th solutions after sorting on the j-th objective function respectively, are the maximum and minimum values of the j-th objective function respectively. Select the solution with a larger crowding degree as the optimal compromise solution because a large crowding degree means that the solutions around this solution are more sparsely distributed, and it is more representative and diverse.
[0086] Example 3:
[0087] This example details the specific process of the decision layer for long-term energy planning based on policy parameters, which is of great significance for the macro management and reasonable allocation of household energy and for achieving long-term economic and efficient energy utilization.
[0088] Establish a Markov decision process model for household energy supply and demand. The photovoltaic power output prediction for the next 24 hours is obtained by combining information such as light intensity and cloud cover rate in the weather forecast and training and modeling historical photovoltaic power output data using machine learning algorithms (such as support vector regression SVR). The electricity price fluctuation curve is predicted by analyzing the electricity price policy issued by the power grid and the change trend of historical electricity price data, using a time series prediction model (such as LSTM neural network). The user behavior pattern is classified by collecting long-term data on the usage time and frequency of user devices and using a clustering analysis algorithm (such as K-Means clustering) to obtain different user behavior pattern categories, such as weekday mode, weekend mode, etc. Model state is the predicted value of photovoltaic power output for the next 24 hours, is the electricity price fluctuation curve, user pattern is the user behavior pattern.
[0089] Use a deep reinforcement learning algorithm to solve the optimal strategy. In this embodiment, the Twin Delayed Deep Deterministic Policy Gradient (TD3) framework is adopted. This framework includes an Actor network and a Critic network. The Actor network is used to generate actions, and the Critic network is used to evaluate the value of actions. The input of the Actor network is the model state S, and the output is the energy allocation action a. The input of the Critic network is the state S and the action a, and the output is the action value Q(S, a). Through the joint optimization of the Actor-Critic network for action selection and value evaluation, the optimization goal is to maximize the cumulative reward.
[0090] Design the reward function to include economic reward, energy storage health reward, and comfort reward. The economic reward R ecom is calculated by the formula p t is the real-time electricity price at time t, P grid,t is the power interacting with the power grid at time t, T is the calculation period, and taking a negative value indicates that reducing the electricity cost is the reward. The energy storage health reward R health is calculated by the formula β is the weight coefficient, set according to the importance of the energy storage battery, N cycle (t) is the charge and discharge cycle times of the energy storage battery at time t, is the maximum charge and discharge cycle times of the energy storage battery. The comfort reward R comfort is calculated by the formula γ is the weight coefficient, n is the number of devices, t i is the actual operating time of the i-th device, is the preset operating time of the i-th device by the user. The total reward function R = R econ + R health + Rcomfort .
[0091] Build a periodic rolling optimization mechanism and reinitialize the strategy parameters every 6 hours. Reacquire the latest PV output forecast for the next 24 hours, electricity price fluctuation curve and user behavior pattern data, and update the model state. Update the state transition probability matrix based on the latest data, the state transition probability P(S t+1 |S t ,a t ) indicates that in state S t Next, perform action a t Then transfer to state S t+1 Through continuous rolling optimization, decision-makers can dynamically adjust long-term energy planning strategies based on real-time changes in energy supply and demand and environmental factors, thereby improving the adaptability and effectiveness of energy allocation.
[0092] Example 4:
[0093] This embodiment mainly describes the execution layer's real-time adjustment process of device power based on distributed model predictive control and the introduced fault-tolerant mechanism, which plays a key role in ensuring the stable operation of the home energy distribution system, improving device control accuracy, and responding to device failures.
[0094] First, a device-level prediction model is constructed. For air conditioners, the thermodynamic equation is based on the law of conservation of energy, taking into account factors such as indoor and outdoor temperature, air conditioner cooling (heating) power, and room heat capacity.
[0095] The dimming curve for lighting equipment is determined by the equipment's characteristics and is generally expressed as the relationship between current or voltage and light intensity, such as I = aL + b, where I is the operating current of the lighting equipment, L is the light intensity, and a and b are coefficients determined by the lighting equipment type. The dimming curve can be used to predict the lighting equipment's power consumption based on actual lighting requirements.
[0096] For electric vehicle chargers, considering their nonlinear efficiency characteristics, the following model is established:
[0097] P charge =η(P input )P input
[0098] Among them, P charge is the electric vehicle charging power, P input is the charger input power, η(P input ) is the charger efficiency, which is a nonlinear function of input power and can be obtained by fitting experimental data.
[0099] Design a distributed rolling horizon optimization framework. Each device controller independently solves a local optimization problem. The optimization goal of each device is to minimize its own operating cost or maximize a certain performance index while satisfying its own operating constraints and the overall energy allocation strategy. For example, the optimization goal of an air conditioner can be to minimize energy consumption under the condition of meeting the indoor temperature comfort range; the optimization goal of lighting equipment can be to minimize power consumption under the condition of meeting the lighting demand.
[0100] Each device controller exchanges boundary state information through a consensus protocol. Assume that there is power interaction between device i and device j. Device i sends its boundary state information related to device j (such as power transmission amount, voltage, etc.) to device j, and device j also feeds back the corresponding information to device i. Taking the power transmission amount as an example, the power sent by device i to device j is P ij , and the power sent by device j to device i is P ji . Through the consensus protocol, it is ensured that P ij = -P ji , thus realizing the coordinated operation between devices.
[0101] Build a coupled constraint coordination mechanism and use the alternating direction method of multipliers to handle the power competition constraints between devices. Assume that there are two devices A and B competing for limited energy supply, and the power constraint is P A + P B ≤ P total , where P A and P B are the power demands of devices A and B respectively, and P total is the total available power.
[0102] Design a robust feedback correction module to correct the control instruction based on the deviation between the real-time power measurement value and the predicted value. Let the power predicted value of the device be and the real-time measurement value be P meas . The deviation Adjust the control instruction according to the deviation. For example, for an air conditioner, if ΔP > 0, it means that the actual power consumption is greater than the predicted value, and the set temperature of the air conditioner can be appropriately reduced (within the allowable comfort range) to reduce power consumption; if ΔP < 0, the set temperature can be appropriately increased.
[0103] Introduce a fault tolerance mechanism. First, build a device health assessment model. Calculate the degradation index based on the current harmonic spectrum, the wavelet packet energy of the vibration signal, and the temperature rise rate. Taking the current harmonic spectrum as an example, calculate the total harmonic distortion rate of the current where I nis the effective value of the nth harmonic current, and I1 is the effective value of the fundamental wave current. The wavelet packet energy of the vibration signal is obtained by performing wavelet packet decomposition on the vibration signal and calculating the energy distribution of each frequency band. The temperature rise rate is calculated by measuring the temperature change during the operation of the device. Combining these indicators, the deterioration index DI = w1THD I + w2E vib + w3r, where w1, w2, and w3 are weights determined according to the degree of influence of each indicator on the device health.
[0104] Design a redundant control channel. When the health of a certain actuator is detected to be lower than the threshold, it automatically switches to the standby control link and reconstructs and optimizes the problem. Assume the health DI of actuator X X is lower than the preset threshold DI th , the system automatically switches to the standby actuator X', and at the same time reconstructs and optimizes the problem according to the characteristics of the standby actuator and the current system state, and recalculates the control command.
[0105] Construct a directed graph model of fault propagation, and use a graph neural network to predict the impact path of local faults on the system-level performance. In the directed graph of fault propagation, nodes represent devices, edges represent the association relationships such as power and signals between devices, and the weights of the edges represent the tightness of the associations. The graph neural network learns from historical fault data and system state changes to predict which other devices the fault may spread to and the impact path on the overall system performance (such as total energy consumption, user comfort, etc.) when a certain device fails.
[0106] Implement a preventive control strategy. Before predicting that a device is about to fail, actively adjust the energy distribution plan to avoid the risk of cascading failures. For example, when it is predicted that the deterioration index of a certain key device is approaching the fault threshold, reduce the load of this device in advance, transfer some of its functions to other standby devices or adjust the operating modes of other devices to avoid the cascading reaction of the entire system caused by the failure of this device and ensure the stable operation of the home energy distribution system.
[0107] Example 5:
[0108] This example details the process of short-term load distribution by the scheduling layer based on the optimal energy distribution sequence. By constructing a reasonable decision matrix and using dynamic game theory to establish a coordination model, the reasonable distribution of short-term household energy is realized, and the interests of all parties are balanced.
[0109] Discretize the 24-hour scheduling cycle into 96 15-minute time slots and construct a three-dimensional decision matrix. The first dimension is the time slot index, ranging from 1 to 96, representing different 15-minute time periods; the second dimension is the device type identifier, such as the identifier for air conditioners is 1, for lighting equipment is 2, for electric vehicle chargers is 3, etc., which is used to distinguish different types of household devices; the third dimension is the power regulation margin, and the power regulation margin is determined according to the rated power and the current operating state of the device. For example, for an air conditioner, if its rated power is P rated , and the current operating power is P current , then the power regulation margin ΔP = P rated - P current (the adjustable ranges are different in cooling or heating modes and are calculated separately). Through this three-dimensional decision matrix, the power regulation possibilities at different time slots and for different device types can be comprehensively represented.
[0110] Based on dynamic game theory, establish a multi-party interest coordination model, where the multi-party includes the user's comfort requirements, the grid peak shaving requirements, and the energy storage life maintenance goal. For the user's comfort requirements, taking the air conditioner as an example, the comfortable temperature range set by the user is [T min , T max . During a certain time slot, if the indoor temperature exceeds this range, the user's comfort level will decrease. Define the user comfort function U comfort . When the indoor temperature T room is within the comfortable range, U comfort = 1; when T room < T min , (T low is the acceptable minimum temperature); when T room > T max , (T high is the acceptable maximum temperature).
[0111] Integrate the interests of these three aspects to construct the total utility function U = w1U comfort + w2U grid + w3U battery , where U grid is the grid peak shaving requirement function, U battery is the energy storage life maintenance goal function, and w1, w2, and w3 are weights determined according to the user's emphasis on the interests of each party. The scheduling layer solves the maximum value of this utility function based on dynamic game theory for each element in the three-dimensional decision matrix to determine the power regulation strategies of different devices at each time slot, achieve a reasonable distribution of short-term loads, balance the interest relationships among users, the grid, and energy storage devices, and ensure the efficient operation of the home energy system in the short term.
[0112] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device.
[0113] Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A real-time energy consumption monitoring and dynamic allocation system for smart homes, characterized in that, Including: A data acquisition module, which is used to obtain real-time data of household energy supply and demand, including photovoltaic power generation, remaining capacity of energy storage batteries, time-series data of energy consumption of household appliances, and real-time electricity prices of the external power grid; A spatio-temporal feature fusion module, which performs spatio-temporal feature fusion processing on the real-time data based on a graph convolutional neural network to generate an energy state feature matrix; inputs the energy state feature matrix into a pre-trained multi-objective optimization model, and the multi-objective optimization model adopts a hierarchical genetic algorithm structure, and iteratively optimizes the energy allocation strategy based on a dynamic constraint function to generate strategy parameters; An energy allocation module, which constructs a dynamic energy allocation model according to the strategy parameters. The dynamic energy allocation model aims at the lowest electricity cost and the longest energy storage life, and uses an improved quantum particle swarm optimization algorithm for global optimization, where the improved quantum particle swarm optimization algorithm introduces an adaptive inertia weight and a dynamic contraction factor; outputs an optimal energy allocation sequence based on the dynamic energy allocation model; A dynamic control module, which establishes a hierarchical control architecture according to the optimal energy allocation sequence. The hierarchical control architecture includes a decision-making layer, a scheduling layer, and an execution layer. The decision-making layer performs long-term energy planning based on the strategy parameters, the scheduling layer performs short-term load allocation based on the optimal energy allocation sequence, and the execution layer realizes real-time adjustment of equipment power based on distributed model predictive control; outputs an energy control instruction through the hierarchical control architecture to complete the dynamic allocation of household energy.
2. The smart home real-time energy consumption monitoring and dynamic allocation system according to claim 1, wherein The multi-objective optimization model adopts a hierarchical genetic algorithm structure, and iteratively optimizes the energy allocation strategy based on a dynamic constraint function. The generated strategy parameters include: Construct a multi-dimensional state space, and the state space includes predicted values of photovoltaic power generation, charge and discharge efficiency of energy storage batteries, equipment priority weights, and electricity price fluctuation ranges; define energy allocation actions based on an executable action space, and the action space includes charge and discharge power of energy storage, start-stop states of equipment, and grid interaction power thresholds; Design a multi-objective fitness function, and the fitness function includes a cost penalty term, a life attenuation term, and a load balancing term. The cost penalty term is calculated by the product of the real-time electricity price and the grid interaction power, the life attenuation term is calculated by the weighted integral of the charge and discharge cycles of the energy storage battery, and the load balancing term is calculated by the variance between the operating power of the equipment and the rated power; Construct a hierarchical genetic algorithm structure, which includes a main population and a sub-population. The main population is used for global strategy search, and the sub-population is used for local constraint satisfaction; both the main population and the sub-population adopt real number coding, the crossover operator adopts adaptive arithmetic crossover, and the mutation operator adopts Gaussian perturbation; Design a dynamic constraint function, and the constraint function includes energy storage capacity boundary constraints, maximum equipment power constraints, and grid interaction power limits. The constraint conditions are embedded in the fitness function through the Lagrange multiplier method; Update the population using the elite retention strategy, directly retain the optimal individual of each generation to the next generation, and realize information exchange between the main population and the sub-population through the migration operator; output the optimized strategy parameters, including equipment scheduling sequences, energy storage charge and discharge plans, and grid interaction strategies.
3. The real-time energy consumption monitoring and dynamic allocation system for smart home according to claim 1, wherein The improved quantum particle swarm optimization algorithm introduces an adaptive inertia weight and a dynamic contraction factor, including: Defining the quantum particle position vector as a set of continuous variables of energy distribution actions, and the velocity vector as the probability distribution of action adjustment amounts; Designing an adaptive inertia weight update formula, where the weight decays exponentially in segments with the number of iterations, retaining the global search ability in the initial stage and enhancing the local convergence accuracy in the later stage; Introducing a dynamic contraction factor, which is dynamically adjusted according to the particle swarm diversity index. When the variance of particle positions is lower than the threshold, the contraction factor increases to compress the search range; Constructing a quantum potential well model to confine the particle motion within the feasible solution space and controlling the particle jump probability through the potential well depth; Using non-dominated sorting to screen the Pareto front solution set and combining crowding degree calculation to select the optimal trade-off solution among the front solutions.
4. The smart home real-time energy consumption monitoring and dynamic allocation system according to claim 1, characterized in that, The decision-making layer conducts long-term energy planning based on policy parameters, including: Establishing a Markov decision process model for household energy supply and demand, where the states of the Markov decision process model include the predicted photovoltaic power output, electricity price fluctuation curve, and user behavior pattern in the next 24 hours; Using a deep reinforcement learning algorithm to solve the optimal policy, where the algorithm adopts a double-delayed deep deterministic policy gradient framework and jointly optimizes action selection and value evaluation through an Actor-Critic network; Designing a reward function that includes economic rewards, energy storage health rewards, and comfort rewards, where the comfort reward is calculated based on the duration of the device operation deviating from the user's preset mode; Constructing a periodic rolling optimization mechanism to re-initialize the policy parameters every 6 hours and update the state transition probability matrix based on the latest data.
5. The smart home real-time energy consumption monitoring and dynamic allocation system according to claim 1, wherein The execution layer realizes the real-time adjustment of device power based on distributed model predictive control, including: Constructing a device-level prediction model, which includes the thermodynamic equation of the air conditioner, the dimming curve of lighting equipment, and the non-linear efficiency characteristics of an electric vehicle charger; Designing a distributed rolling horizon optimization framework, where each device controller independently solves the local optimization problem and exchanges boundary state information through a consensus protocol; Constructing a coupled constraint coordination mechanism, using the alternating direction method of multipliers to handle the power competition constraints between devices, and determining the iteration termination condition through residual convergence; Designing a robust feedback correction module to correct the control instruction based on the deviation between the real-time power measurement value and the predicted value.
6. The real-time energy consumption monitoring and dynamic allocation system for smart home according to claim 5, characterized in that The distributed model predictive control introduces a fault tolerance mechanism, including: Constructing a device health assessment model and calculating the degradation index based on the current harmonic spectrum, the wavelet packet energy of the vibration signal, and the temperature rise rate; Designing redundant control channels. When it is detected that the health of a certain actuator is lower than the threshold, it automatically switches to the standby control link and reconstructs the optimization problem; Constructing a directed graph model of fault propagation and using a graph neural network to predict the impact path of local faults on the system-level performance; Implementing a preventive control strategy. Before predicting that a device is about to fail, actively adjust the energy distribution plan to avoid the risk of cascading failures.
7. The smart home real-time energy consumption monitoring and dynamic allocation system according to claim 1, characterized in that The scheduling layer conducts short-term load distribution based on the optimal energy distribution sequence, including: The 24-hour scheduling cycle is discretized into 96 15-minute time slots, and a three-dimensional decision matrix is constructed, with dimensions including time slot index, device type identifier, and power regulation margin; a multi-party interest coordination model is established based on dynamic game theory, and the multi-party includes user comfort requirements, power grid peak shaving requirements, and energy storage life maintenance goals.
8. The real-time energy consumption monitoring and dynamic allocation system for smart home according to claim 1, wherein The spatio-temporal feature fusion processing of the real-time data by the graph convolutional neural network includes: Construct a home energy topology graph, where the nodes include a photovoltaic array, an energy storage battery, electrical appliances, and a grid connection point, and the edge weights are jointly determined by the electrical connection relationship and the power transmission efficiency; Design spatio-temporal convolutional kernels. The spatial convolutional layer extracts the energy flow characteristics between nodes, and the temporal convolutional layer extracts the power time series change patterns of each node; Adopt a multi-head attention mechanism to fuse features of different time scales, and suppress the influence of noise data through a gated recurrent unit; Output an energy state feature matrix, whose dimensions are consistent with the number of nodes and the number of feature channels of the topology graph.
Citation Information
Cited By
Data driving power distribution method and system for H-bridge module health degree balance
CN121030204A
Smart factory energy management method and system based on cloud computing
CN121073118A
A cloud computing-based intelligent factory energy management method and system
CN121073118B
Modular unit control method and device, air conditioning unit and computer readable medium
CN121323110A