Smart system, management device and method for optimising the management of electrical energy generation, consumption and storage
The intelligent energy management system integrates weather and consumption predictions with battery status using advanced machine learning, optimizing energy use and reducing costs by accurately forecasting and distributing energy.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-10-02
- Publication Date
- 2026-04-09
AI Technical Summary
Existing energy management systems fail to effectively integrate consumption, generation, and storage predictions using meteorological forecasts, energy prices, and battery charging/discharging patterns, leading to suboptimal energy decision-making.
An intelligent system and management device that incorporates a central processing unit with modules for weather forecasting, generation prediction, home consumption prediction, and battery status, utilizing advanced machine learning techniques like LSTM and CNN, combined with a genetic algorithm for optimal energy distribution.
Accurately predicts energy consumption and generation, optimizing energy use by considering weather, prices, and battery states, reducing reliance on the grid and lowering energy costs through efficient energy management.
Smart Images

Figure ES2024070600_09042026_PF_FP_ABST
Abstract
Description
[0001] INTELLIGENT SYSTEM, MANAGEMENT DEVICE AND OPTIMIZING PROCEDURE FOR THE MANAGEMENT OF THE GENERATION, CONSUMPTION AND STORAGE OF ELECTRICAL ENERGY
[0002] DESCRIPTION
[0003] OBJECT OF THE INVENTION
[0004] The object of the present invention, as stated in the title of the invention, is, on the one hand, an intelligent system for the management of the generation, consumption and storage of electrical energy, on the other hand, the management device used in said system and finally the optimization procedure used in said management device.
[0005] The present invention is characterized by the special design, configuration and functionality of each and every one of the elements that form part of the system and in particular of the management device that allows the intelligent and optimal management of the generation, storage and consumption of energy, making the most convenient decisions based on the prediction of household consumption, the prediction of energy production or generation, where both predictions are based on the meteorological forecast, where also the prices of electricity and the state and history of charging and discharging the batteries are taken into account.
[0006] Therefore, the present invention falls within the scope of intelligent energy consumption, generation and storage systems.
[0007] BACKGROUND OF THE INVENTION
[0008] In the prior art, numerous documents describe intelligent energy management for users with renewable energy generation facilities, such as patent US20230369863 A1, or with storage facilities. These documents also consider factors such as consumption patterns, as in patent CN115511276 A, energy prices, as in patent CN 115065081 A, or weather forecasts to determine whether to store, consume, or feed generated energy into the grid, as in patent CN115511276 A. However, no document is known to specifically indicate that it considers weather forecasting as a means of modeling consumption and generation predictions.
[0009] Therefore, the object of the present invention is to develop a management system together with a management device used in said management system that together take into account the following conditions:
[0010] Consumption forecast
[0011] Generation prediction
[0012] Weather forecast
[0013] Energy price
[0014] Battery charging and discharging patterns.
[0015] Where the prediction of consumption and photovoltaic generation is based on the meteorological forecast, the prediction of both consumption and possible generation is much more refined and closer to reality by taking into account meteorological predictions, allowing for the adoption of an optimal solution.
[0016] To achieve these aims and objectives, a system and device are developed as described below and included in its essentials in claim one.
[0017] DESCRIPTION OF THE INVENTION
[0018] The object of the present invention is set out in its essentials in the independent claim and the different embodiments are set out in the dependent claims.
[0019] The present invention relates, on the one hand, to an intelligent system for managing the generation, consumption, and storage of electrical energy, additionally to the management device used in said system, and finally to the procedure used by an optimizer module housed in the intelligent manager.
[0020] The system for the intelligent management of generation, consumption and storage comprises an intelligent management device connected to an inverter which in turn is connected to the distribution network with which an energy exchange is established, either consuming energy from the distribution network, or feeding energy from the inverter into the distribution network; in addition, the inverter is connected to the home or building in which intelligent consumption is desired; the inverter is also connected to the energy generation means;Finally, connected to the inverter are energy storage means by means of batteries to which the energy produced can be supplied or the stored energy extracted for consumption, where the intelligent management device comprises a central processing unit, a communication module with inverters and other equipment, a communication module with the central server, a storage memory and current sensors, the intelligent management device has a meteorological station (14).;
[0021] The central processing unit has an optimizer module that uses an optimization algorithm to achieve the optimal energy management result:
[0022] A weather forecasting module
[0023] A generation prediction module
[0024] A home consumption prediction module
[0025] Electricity prices
[0026] Battery status and charging / discharging history
[0027] Where the results of the weather forecasting module are used in the generation forecasting module and in the household consumption forecasting module.
[0028] The weather prediction module combines 1D convolutional layers (ConvI D) and Long Short-Term Memory (LSTM) layers and comprises
[0029] • Convl D layers for processing time sequences of meteorological data,
[0030] • LSTM Layers: to return complete sequences, and as an innovation, it includes the incorporation of an additional LSTM layer. This layer processes the data sequences in more detail.
[0031] • Dense Outflow Layer, responsible for producing the final weather forecasts,
[0032] • Early Stopping Mechanism, monitors the loss function in a validation set and stops training when no significant improvement is observed, using the mean squared error (MSE) as the loss function.
[0033] The Home Energy Consumption Prediction Module provides accurate predictions about energy consumption. To achieve this, various machine learning algorithms have been explored and refined, notably models based on neural networks such as LSTM (Long Short-Term Memory) and CNN (Convolutional Neural Networks).
[0034] The development of the prediction model begins with the extraction of relevant data from the photovoltaic system's inverter and open-source meteorological sources, using the Wattabit and Open-Meteo APIs, respectively. The extracted variables include both photovoltaic system properties and meteorological variables.
[0035] This information is consolidated into a data frame. The machine learning models that have been observed to perform best are: a CNN model using only the consumption series, an LSTM model using only the series, and an LSTM model that also includes other variables.
[0036] The PV generation prediction module is based on multivariate Long Short-Term Memory (LSTM) neural networks and is partially based on predictions made by the weather prediction model. The final model selected was the multivariate bidirectional LSTM layered model.
[0037] The energy optimizer module proposes optimal energy distribution strategies in a photovoltaic installation, combining predictions of energy consumption, photovoltaic generation and electricity prices, along with additional information on the current state of the battery and the charge and discharge histories.
[0038] A genetic algorithm was used, an advanced technique that simulates the process of natural selection to find optimal solutions to complex problems, and which comprises the following actions:
[0039] 1. Initial Configuration of the Genetic Algorithm.
[0040] 2. Generation of Individuals.
[0041] 3. Crossing and Mutation.
[0042] 4. Evaluation and Selection.
[0043] 5. Algorithm Execution.
[0044] Unless otherwise stated, all technical and scientific terms used herein have the meanings commonly understood by a person skilled in the art to which this invention belongs. Similar or equivalent procedures and materials to those described herein may be used in the practice of the present invention. Throughout the description and claims, the word "comprises" and its variants are not intended to exclude other technical features, additives, components, or steps. For those skilled in the art, other objects, advantages, and features of the invention will become apparent partly from the description and partly from the practice of the invention.
[0045] EXPLANATION OF THE FIGURES
[0046] To complement the description being made and in order to help a better understanding of the characteristics of the invention, according to a preferred example of its practical embodiment, a set of drawings is included as an integral part of said description, in which the following has been represented for illustrative and non-limiting purposes.
[0047] In Figure 1, we can observe a schematic representation of the intelligent management system that is the subject of the invention.
[0048] Figure 2 shows the elements that make up the intelligent management device.
[0049] In Figure 3, we can observe a schematic representation of the modules and other variables taken into account in the optimizer module present in the microprocessor unit of the managing device.
[0050] Figure 4 shows the parts that make up the optimization algorithm of the intelligent manager optimizer.
[0051] PREFERRED EMBODIMENT OF THE INVENTION
[0052] In view of the figures, a preferred embodiment of the proposed invention is described below.
[0053] In Figure 1, we can observe that the system for the intelligent management of generation, consumption, and storage comprises an intelligent management device (1) connected to an inverter (2), which in turn is connected to the distribution network with which an energy exchange (5) is established, either for energy consumption from the distribution network or for energy to be fed from the inverter (2) into the distribution network; in addition, the inverter is connected to the dwelling or building in which intelligent consumption (5) is desired; the inverter is also connected to the energy generation means, which in the embodiment shown are photovoltaic panels (3); finally, energy storage means by means of batteries (6) are connected to the inverter, to which the produced energy can be supplied or the stored energy extracted for consumption.
[0054] On the other hand, and additionally, the smart manager device (1) has a connection to the cloud or network (8) as well as a connection to a router (7).
[0055] Figure 2 shows the construction elements that are part of the intelligent management device (1) which, as can be seen, has a central processing unit (9), a communication module with inverters (15) and other equipment, a communication module with the central server (16), a storage memory (29) and current sensors (30).
[0056] Additionally, the intelligent management device (1) has, either integrated or connectable to the device, a meteorological station (14) equipped with:
[0057] A wind speed sensor (10)
[0058] A temperature and humidity sensor (11)
[0059] A solar radiation sensor (12)
[0060] An atmospheric pressure sensor (13)
[0061] In one possible, non-limiting embodiment, the elements that make up the intelligent management device are:
[0062] The central processing unit (9) is a Raspberry Pi 4 Model B with the following features: o CPU: Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz o RAM: Available in 2GB, 4GB and 8GB o Connectivity: Gigabit Ethernet, Wi-Fi 802.11ac, Bluetooth 5.0, BLE o Ports: 2 x USB 3.0, 2 x USB 2.0, 2 x Micro HDMI, 40-pin GPIO
[0063] The weather station includes the following elements: The wind speed sensor (10) is a Davis 6410 anemometer; the temperature and humidity sensor (11) is a DHT22; the solar radiation sensor (12) is an Apogee SP-215; and the atmospheric pressure sensor (13) is a BMP280. The communication module with inverters and other equipment uses a Modbus and MQTT communication protocol with possible hardware:
[0064] 1. Modbus RTU to TCP / IP Adapter: USR-W610 or Features: Supports RS232 / RS485 to TCP / IP, web configuration or Advantages: Enables integration of Modbus RTU devices with TCP / IP networks
[0065] 2. Zigbee Module: XBee Series 3 or Features: Compatible with Zigbee 3.0, range up to 100 meters indoors or Advantages: Low power consumption, easy integration with Zigbee devices
[0066] 3. Bluetooth Adapter: Adafruit Bluefruit LE or Features: Bluetooth 4.0 (BLE), range up to 10 meters or Advantages: Low power consumption, compatible with devices
[0067] BLE
[0068] The current sensors (29) can be STC-013-000 clamp meters, ZEMIC HJ-8
[0069] The communication module with the central server, in one possible implementation, uses an MQTT, HTTP / HTTPS communication protocol. The recommended hardware could be: 4G LTE Modem: Features: 4G LTE connectivity, USB port. Advantages: High data speed, easy to configure and use. Satellite Modem: Starlink. Features: Global connectivity, high speed and low latency. Advantages: Ideal for remote locations without access to terrestrial networks.
[0070] Storage memory can be provided by means of a 128GB microSD card.
[0071] Figure 3 shows an optimizer module (22) with an optimization algorithm (28) that is part of the central processing unit (9). A weather prediction module (17) is used to obtain the optimal energy management result.
[0072] A generation prediction module (18)
[0073] A home consumption prediction module (19)
[0074] Electricity prices (20)
[0075] Battery status and charging and discharging history (21)
[0076] Where in a preferred but not limiting form of embodiment:
[0077] The module of combines 1 D convolutional layers (ConvI D) and Long Short-Term Memory (LSTM) layers, where:
[0078] • Convl D layers for processing time sequences of meteorological data, such as temperature, solar radiation, and humidity. These layers apply filters of different sizes to the data sequences, allowing the model to capture patterns at multiple time scales.
[0079] • LSTM Layers: After extracting the relevant features with the ConvI D layers, the data is processed through two sequential LSTM layers. The first LSTM layer is configured to return complete sequences, allowing the second LSTM layer to process these sequences and condense them into a final vector that represents the most relevant information from the historical data.
[0080] • Dense Output Layer: Finally, the module includes a dense layer with linear activation, responsible for producing the final weather forecasts. This layer takes the vector condensed by the LSTM layers and translates it into concrete values for the variables of interest, such as temperature, solar radiation, cloud cover, and relative humidity. To optimize the module's performance, the Adam optimizer is used, which efficiently adjusts the module's weights, along with a custom loss function that penalizes predictions of physically impossible values (for example, negative values for solar radiation or humidity).
[0081] • Early Stopping Mechanism, monitors the loss function in a validation set and stops training when no significant improvement is observed, using the mean squared error (MSE) as the loss function.
[0082] In addition, a second weather forecasting module is being developed: Refinement for the Specific Station. Following the creation and evaluation of the initial module, a second module is used, based on the lessons learned from the first. This additional module is specifically adjusted to refine the predictions according to the particular characteristics of the station where it will be installed. This refinement is key to improving the accuracy of forecasting meteorological variables that can vary significantly depending on the location and local conditions.
[0083] 1. Additional LSTM Layer:
[0084] One of the main improvements in this second module is the addition of an extra LSTM layer. This layer processes data sequences in greater detail, allowing the module to capture more complex temporal relationships and improve its ability to predict station-specific weather variations. The additional layer also helps reduce prediction error in scenarios where weather conditions can change rapidly, such as at stations near bodies of water or in mountainous areas.
[0085] 2. Final Dense Layer:
[0086] The final dense layer in this second module adjusts the output size to match the exact number of weather features to be predicted. As in the initial module, linear activation is used, enabling the module to provide accurate and continuous predictions for the weather variables. This final layer is critical to ensuring the module's adaptability and ability to adjust to different prediction requirements based on the season and specific user needs.
[0087] 3. An Optimization and Evaluation Layer:
[0088] The second module again employs the Adam optimizer, known for its efficiency and ability to handle large volumes of data. However, in this iteration, the mean squared error (MSE) is used as the loss function, which simplifies the evaluation of the module's performance and facilitates the interpretation of the results. The use of MSE is especially useful in this context, as it provides a direct measure of the average error of the predictions, allowing for precise adjustments during the training process.
[0089] 4. Implementation of Early Stopping:
[0090] As with the first module, the second module also incorporates an Early Stopping mechanism with similar criteria to prevent overfitting. This approach ensures that the module not only learns from historical data but also maintains its ability to generalize to new weather conditions that may not have been part of the training set.
[0091] The result of this process is a highly sophisticated and adaptive weather prediction module, capable of accurately predicting critical variables such as temperature, solar radiation, cloud cover, and relative humidity.
[0092] The module not only improves the accuracy of weather forecasts but also adapts to the specific characteristics of each season, which is crucial for installations in locations with variable weather conditions. Thanks to this approach, Wall-AI can offer users a powerful tool to manage their energy consumption more efficiently, making the most of available solar energy and reducing their reliance on the electrical grid.
[0093] In conclusion, the weather forecasting module used in the smart energy manager represents a significant advancement in the integration of machine learning with energy management. Its ability to combine deep learning techniques, such as CNN and LSTM, with an adaptable and station-specific approach makes it an essential component for achieving the project's efficiency and sustainability goals. With this module, the smart energy manager not only predicts the weather but also transforms how users interact with energy, optimizing the use of renewable resources and promoting a more sustainable future.
[0094] The home energy consumption prediction module provides accurate predictions about energy use. To achieve this, several machine learning algorithms have been explored and refined, with particular emphasis on modules based on neural networks such as LSTM (Long Short-Term Memory) and CNN (Convolutional Neural Networks).
[0095] The development of the predictive model begins with the extraction of relevant data from the photovoltaic system's inverter and open-source meteorological sources, using the Wattabit and Open-Meteo APIs, respectively. The extracted variables include both photovoltaic system properties and meteorological variables. This information is consolidated into a data frame. The machine learning models that have performed best are: a CNN model using only the consumption series, an LSTM model using only the series, and an LSTM model that also includes other variables.
[0096] The main objective of this module is to provide accurate predictions about energy consumption to optimize facility operations, such as storing energy in the battery or consuming directly from the grid.
[0097] The development of the prediction module begins with the extraction of relevant data from the photovoltaic system's inverter and open-source meteorological sources, using the Wattabit and Open-Meteo APIs, respectively. The extracted variables include both photovoltaic system properties (such as battery charge / discharge energy, photovoltaic production, and grid consumption) and meteorological variables (temperature, solar radiation, among others). This information is consolidated into a data frame, taking into account any data gaps, which are imputed using interpolation and averaging techniques, depending on the temporal context.
[0098] Data cleaning and preprocessing are performed in a general script, where null values are imputed, outliers are detected and handled, and variables are standardized as needed. Additionally, time transformations, such as converting the time of day or month to sinusoidal values, are added to improve the predictive capabilities of certain modules.
[0099] To address consumption prediction, different machine learning models were evaluated, including SARIMA, SARIMAX, MLP, CNN, and LSTM.
[0100] Several versions were created. The most suitable ones are: a CNN model with only the consumption series, an LSTM model with only the series, and an LSTM model that also includes other variables, allowing you to select one of the following versions:
[0101] • CNN Network: Only the 'Total Consumption' variable is used. Two convolutional layers with their corresponding pooling layers are used. The output is a dense layer with one neuron and linear activation, as it works with regression. Few epochs were set because if the network iterated more times, the overfitting increased too much with some datasets. • RNN Network with only the consumption series: To create recurrent networks with time series, the data must be divided into a format that the network can understand. A function is used for this purpose. The network is generated with bidirectional hidden layers (LSTM), meaning that to predict a step, it considers both the preceding and subsequent data. A dropout, L2 regularizer, etc., are fitted to reduce overfitting. In this case, an 'early stopping' function is used to train the module, which will halt the procedure when the loss function does not improve after a certain number of epochs.
[0102] • RNN network with variable layers: As in the previous case, the data must be restructured. Again, bidirectional LSTM hidden layers are used. A normalization layer is incorporated at the input. Early stopping can also be implemented.
[0103] In addition to all this, combinations of CNN and LSTM were used. Since further parameter adjustments are needed to make it generalizable to all installations, its use is left open for future development.
[0104] After multiple tests and evaluations, the multivariable LSTM model was selected as the most suitable for predicting household energy consumption. This model effectively captured the complex temporal and nonlinear relationships between system variables, providing accurate predictions that are essential for optimizing real-time energy management.
[0105] The multivariable LSTM model stands out for its ability to adapt to different consumption patterns across various installations, making it a crucial tool within the Wall-AI ecosystem. This approach not only improves the accuracy of predictions but also enables greater efficiency in operational decision-making, contributing to the overall optimization of the energy system and, ultimately, to reduced energy costs for users.
[0106] PV generation prediction module
[0107] The photovoltaic (PV) generation prediction module is based on multi-voltage Long Short-Term Memory (LSTM) neural networks.
[0108] This module is partially based on predictions made by the weather forecasting module. By knowing the weather conditions for the next few hours, it's possible to more reliably model how much photovoltaic energy will be generated at a given installation.
[0109] The photovoltaic generation module is based on multivariable LSTM networks, which are especially suitable for handling complex time data.
[0110] Training the multivariable LSTM model involves processing large volumes of historical data to identify relationships between meteorological variables and solar energy production. During training, the module adjusts its internal parameters, optimizing its ability to predict photovoltaic generation as accurately as possible.
[0111] The selected multivariable LSTM model has shown excellent performance in predicting photovoltaic generation.
[0112] This module allows for accurate prediction of the amount of energy that will be generated in the next 12 hours, which is fundamental for real-time decision-making within the Wall-AI system.
[0113] Energy optimization module
[0114] This module proposes optimal energy distribution strategies in a photovoltaic installation, combining predictions of energy consumption, photovoltaic generation, meteorological data and electricity prices, along with additional information on the current state of the battery and the charge and discharge histories.
[0115] This combination of data allows the system to make accurate decisions about three main actions:
[0116] • Self-consumption: The amount of energy that is directly allocated to the consumption of the installation.
[0117] • Battery Charge: The amount of energy that must be stored in the battery for later use.
[0118] • Sale to the Grid: The amount of surplus energy that can be sold to the electricity grid.
[0119] The optimization process not only focuses on maximizing self-consumption but must also comply with certain constraints, such as battery capacity and the need to meet the installation's energy demand. These constraints are handled using linear programming techniques, implemented through Python's Pulp library, which allow for the efficient formulation and solution of the optimization problem.
[0120] The optimizer module adapts and recalibrates itself based on real-time data and future predictions provided by the consumption, generation, and pricing modules. This adaptability ensures continuous alignment with changing market conditions and the facility's energy needs.
[0121] To address the optimization problem, a genetic algorithm was used, an advanced technique that simulates the process of natural selection to find optimal solutions to complex problems. The implementation of this algorithm (28) is described in detail below, as shown in Figure 4:
[0122] 1. Initial Configuration of the Genetic Algorithm (23):
[0123] The genetic algorithm begins with the configuration of several key parameters, such as the number of generations (n_gen), the population size (njnd), the crossover probability (cross_pb), and the mutation probability (mut_pb). These parameters are crucial for defining how the population of potential solutions will evolve over the generations.
[0124] In addition, specific problem parameters are defined, such as the maximum battery capacity (BATTERY_CAPACITY), the initial state of charge (Q_0), and the discharge (D_0), storage (PQ_0), and sales (VQ_0) histories. These parameters are combined with predictions of photovoltaic generation and consumption (PV and C, respectively), as well as electricity prices (PL), to form the database that feeds the optimization process.
[0125] 2. Generation of Individuals (24):
[0126] Each individual in the population represents a potential solution to the energy optimization problem. Individuals are initially generated with random values within the allowed limits, ensuring a diversity of possible solutions. The algorithm calculates the values of key variables such as self-consumed energy (A), battery discharged energy (D), stored energy (PQ), and energy sold to the grid (VQ and V). These variables are calculated for each of the 12 hours in the prediction horizon.
[0127] 3. Crossover and Mutation (25): The evolution process of the genetic algorithm includes two fundamental operations: crossover and mutation. Crossover combines parts of two individuals to generate offspring that inherit characteristics from both parents. This allows for the exploration of new combinations of solutions. In this case, a custom crossover is used that adjusts the predictions based on the costs associated with each individual, recalculating the actions from a specific time to maximize efficiency.
[0128] Mutation introduces random variations in individuals, which helps maintain genetic diversity within the population and prevents the algorithm from becoming stuck in suboptimal solutions. In the context of the Energy Optimizer, mutation can alter energy storage or sales decisions at a specific time, potentially leading to a more efficient solution in the next generation.
[0129] 4. Evaluation and Selection (26):
[0130] Each individual is evaluated based on their total cost, calculated as the difference between the cost of purchased energy and the revenue generated from selling energy. The goal is to minimize this cost, resulting in lower electricity bills for the user.
[0131] The selection of individuals for the next generation is carried out through a tournament, in which the best individuals (those with the lowest costs) have a greater probability of being selected to reproduce. This process ensures that the most efficient solutions are propagated in successive generations.
[0132] 5. Algorithm Execution (27):
[0133] The algorithm runs over several generations, during which individuals interbreed, mutate, and are repeatedly selected, progressively improving the optimal solution. At the end of the run, the algorithm selects the best individual—that is, the solution that offers the most efficient and economical energy distribution.
[0134] Having sufficiently described the nature of the present invention, as well as the manner of putting it into practice, it is stated that, within its essential nature, it may be put into practice in other forms of embodiment that differ in detail from the one indicated as an example, and which will also achieve the protection sought, provided that it does not alter, change or modify its fundamental principle.
Claims
CLAIMS 1.- System for the intelligent management of generation, consumption and storage comprising an intelligent management device (1) connected to an inverter (2) which in turn is connected to the distribution network with which an energy exchange is established (5) either energy consumption from the distribution network or energy is fed in from the inverter (2) to the distribution network; in addition, the inverter is connected to the dwelling or building in which intelligent consumption (5) is desired; the inverter is also connected to the energy generation means;Finally, energy storage means by means of batteries (6) are connected to the inverter, to which the produced energy can be supplied or the stored energy extracted for consumption, where the intelligent management device (1) comprises a central processing unit (9), a communication module with inverters (15) and other equipment, a communication module with the central server (16), a storage memory (29), current sensors (30), the intelligent management device (1) has a meteorological station (14), characterized in that the central processing unit (9) has an optimizer module (22) which has an optimization algorithm (28) where the following are used to obtain the optimal result of energy management: A weather prediction module (17), A generation prediction module (18), A home consumption prediction module (19), Electricity prices (20), Battery status and charging and discharging history (21), Where the results of the meteorological prediction module (17) are used in the generation prediction module (18) and in the household consumption prediction module (19).
2. A system for the intelligent management of generation, consumption and storage according to claim 1, characterized in that the weather prediction module combines 1D convolutional layers (ConvI D) and Long Short-Term Memory (LSTM) layers, wherein the module comprises: • Convl D layers for processing time sequences of meteorological data, such as temperature, solar radiation and humidity, which apply filters of different sizes to the data sequences, • LSTM Layers: After extracting relevant features with the ConvI D layers, the data is processed through two sequential LSTM layers. The first LSTM layer is configured to return complete sequences, allowing the second LSTM layer to process these sequences and condense them into a final vector representing the most relevant information from the historical data. • Dense Output Layer: Finally, the module includes a dense layer with linear activation, responsible for producing the final weather predictions. This layer takes the vector condensed by the LSTM layers and translates it into concrete values for the variables of interest, such as temperature, solar radiation, cloud cover, and relative humidity. • Early Stopping Mechanism, monitors the loss function in a validation set and stops training when no significant improvement is observed, using the mean squared error (MSE) as the loss function.
3. System for the intelligent management of generation, consumption and storage according to claim 2, characterized in that after the creation and evaluation of the initial meteorological prediction module, a second module is used based on the weights learned from the first, this module comprises: an Additional LSTM Layer A Final Dense Layer, which adjusts the output size to match the exact number of weather features you want to predict. An Optimization and Evaluation layer, in this iteration, uses the mean squared error (MSE) as the loss function, An Early Stopping mechanism.
4. System for the intelligent management of generation, consumption and storage according to claim 1, characterized in that the home consumption prediction module provides accurate predictions on energy consumption and may comprise any of the following alternatives: • CNN Network: Only the 'Total Consumption' variable is used. Two convolutional layers are used with their corresponding pooling layers. The output is a dense layer with one neuron and linear activation, as it is working with regression. • RNN network with consumption series only: The network is generated with bidirectional LSTM hidden layers, meaning that to predict a step they take into account both previous and subsequent data. • RNN network with variable layers: As in the previous case, the data must be restructured. Again, bidirectional LSTM hidden layers are used. A normalization layer is incorporated at the input. Early stopping can also be implemented. It uses relevant data from the photovoltaic installation inverter and meteorological sources.
5. System for the intelligent management of generation, consumption and storage according to claim 1 characterized in that the photovoltaic (PV) generation prediction module is based on multi-voltage Long Short-Term Memory (LSTM) neural networks.
6. An intelligent management device for managing generation, consumption, and storage according to the management system according to any of the preceding claims, characterized in that the intelligent management device (1) comprises a central processing unit (9), a communication module with inverters (15) and other equipment, a communication module with the central server (16), a storage memory (29), current sensors (30), and a meteorological station (14), characterized in that the central processing unit (9) includes an optimizer module (22) which has an optimization algorithm (28) where, for obtaining the optimal energy management result, the following are employed A weather prediction module (17) A generation prediction module (18) A home consumption prediction module (19) Electricity prices (20) Battery charge and discharge status and history (21), where the results of the weather prediction module (17) are used in the generation prediction module (18) and in the home consumption prediction module (19). 7.- Intelligent management device for the management of generation, consumption and storage according to claim 6 characterized in that the meteorological station (14) is provided with: A wind speed sensor (10) A temperature and humidity sensor (11) A solar radiation sensor (12) An atmospheric pressure sensor (13).
8. Intelligent management device for the management of generation, consumption and storage according to claim 6 or 7, characterized in that the communication module with inverters and other equipment uses a Modbus and MQTT communication protocol and has the following hardware: - A Modbus RTU to TCP / IP adapter: USR-W610 A Zigbee module: XBee Series 3 A Bluetooth adapter: Adafruit Bluefruit LE. 9.- Intelligent management device for the management of generation, consumption and storage according to claim 8 characterized in that the communication module with the central server uses an MQTT, HTTP / HTTPS communication protocol where the hardware used is a 4G LTE modem. 10.- Optimizing procedure for the management of the generation, consumption and storage of electrical energy in a system with an intelligent management device as claimed above, characterized in that the optimizer module comprises an optimization algorithm (28) that carries out the following actions: Initial Configuration of the Genetic Algorithm (23): The genetic algorithm begins with the configuration of several key parameters, such as the number of generations (n_gen), the population size (njnd), the crossover probability (cross_pb), and the mutation probability (mut_pb). These parameters are crucial for defining how the population of potential solutions will evolve over the generations. In addition, specific problem parameters are defined, such as the maximum battery capacity (BATTERY_CAPACITY), the initial state of charge (Q_0), and the discharge (D_0), storage (PQ_0), and sales (VQ_0) histories, where these parameters are combined with predictions of photovoltaic generation and consumption (PV and C, respectively), as well as with electricity prices (PL), to form the database that feeds the optimization process. Generation of Individuals (24): Each individual in the population represents a potential solution to the energy optimization problem. Individuals are initially generated with random values within the allowed limits, ensuring a diversity of possible solutions. The algorithm calculates the values of key variables such as self-consumed energy (A), battery discharged energy (D), stored energy (PQ), and energy sold to the grid (VQ and V). These variables are calculated for each of the 12 hours in the prediction horizon. Crossing and Mutation (25): The evolution process of the genetic algorithm includes two fundamental operations: crossover and mutation. Crossover combines parts of two individuals to generate offspring that inherit characteristics from both parents. This allows for the exploration of new combinations of solutions. In this case, a custom crossover is used that adjusts predictions based on the costs associated with each individual, recalculating actions from a specific time to maximize efficiency. Mutation introduces random variations in individuals, helping to maintain genetic diversity within the population and preventing the algorithm from becoming stuck in suboptimal solutions. In the context of the Energy Optimizer, mutation can alter energy storage or sales decisions at a specific time, potentially leading to a more efficient solution in the next generation. Evaluation and Selection (26): Each individual is evaluated based on their total cost, calculated as the difference between the cost of purchased energy and the revenue generated from selling energy. The goal is to minimize this cost, resulting in lower electricity bills for the user. Algorithm Execution (27): The algorithm runs over several generations, during which individuals interbreed, mutate, and are repeatedly selected, progressively improving the optimal solution. At the end of the run, the algorithm selects the best individual—that is, the solution that offers the most efficient and economical energy distribution.
Citation Information
Patent Citations
Estimating Energy Consumption for a Building Using Dilated Convolutional Neural Networks
US20230324860A1