This application claims the benefit of priority of Portuguese Patent Application No. 118847, filed Jul. 31, 2023, the contents of which are all incorporated herein by reference in their entirety.
The present invention relates to the field of renewable energy communities and house energy management systems, specifically using prediction models based on artificial intelligence algorithms.
In 2019, to face the challenges presented by climate change, the European Union (EU) presented the European Green Deal strategy, which according to the EU aims to transform EU the first climate neutral continent by 2050 and decouple economic growth from resource use. It is expected that the European Green Deal will transform the EU into a modern, resource-effective, and competitive economy. Within the scope of energy, simultaneously with promoting the use of renewable energy sources, the EU presented a set of initiatives focused on the energy end-users. These initiatives focused on the end energy end-users trend to accelerate the change of power system organization paradigm, previously essentially centralized. Among these initiatives there is the promotion of prosumers (i.e., who both consume and produce energy) and stated that the decentralized production of energy by prosumers must constitute a relevant component of EU's energy policy. The appearance of prosumers has enhanced the appearance of so-called energy communities. According to the EU, Citizen Energy Community “is a voluntarily legal entity established at the local level for the local production of electricity, distribution, supply, consumption, aggregation, energy efficiency services, peer-to-peer energy trading, electric vehicles, and energy storage, etc.” Although with similar definitions, a Renewable Energy Community considers only production from renewable sources, and includes different aspects such as electricity, thermal, gas and water. Other definitions have been proposed for energy communities, such as “a group of buildings with low-carbon technologies to supply, store and internally share/trade electricity and heating”, “a group of consumers and/or prosumers, that together share generation units and electricity storage”, and even “community energy” and “energy community” are found in literature. According to EU estimates, by 2030 energy communities can account for 17% of all installed wind capacity and 21% of all photovoltaic capacity installed in the EU. Thus, it is possible to anticipate the great impact of energy communities in the future. However, it is not only necessary to create energy communities, but more importantly, it is necessary to develop intelligent and sustainable communities, and for this it is necessary to develop efficient energy management systems for energy communities.
[1] W. Su, A. Huang, in “The energy internet: An open energy platform to transform legacy power systems into open innovation and global economic engines”, Woodhead Publishing, 2018 proposes an energy management system is developed for energy communities. In fact, two models are developed. In the first the model for house energy management systems is presented, i.e., when houses operate separately, and then a model where houses can exchange energy with each other. In both cases the objective is the minimization of operation costs. In the first case the objective is the minimization of house operation costs and the second the minimization of community costs. The results show that it is possible to reduce community costs when houses operate together, but some houses can see their cost increases in favour of a collective cost reduction goal.
[2] A. Manso-Burgos, D. Ribó-Pérez, T. Gómez-Navarro, M. Alcázar-Ortega, in “Local energy communities modelling and optimisation considering storage, demand configuration and sharing strategies: A case study in Valencia (Spain), Energy Reports.” 8 (2022) 10395-10408 proposes an optimization for local energy communities, with a case study in Spain. Different sharing strategies are considered among community participants through different allocation coefficients, such as static and variable coefficients. The authors consider that static coefficient fixed throughout the year and variable coefficient changing every hour. An analysis is made to assess the impact of increasing battery capacity on system operation.
Patent application CA2809011 A1, “Adaptative energy management system”, priority date Nov. 6, 2012, published May 6, 2014, MacMaster University, CA, discloses systems, methods and devices related to a microgrid system for providing power to a facility. A self-contained power system provides power to a facility using a combination of power storage elements and renewable energy sources. A connection to an external power grid may also be provided. The system optimizes power flow to the facility using power from the storage elements and the renewable energy sources and, if necessary, the external power grid. The optimization process predicts future power usage by the facility using power usage data from a predetermined time window. The optimization process can also take into account predicted energy generation amounts by the renewable energy sources. To optimize economic effects, the optimization process can also determine whether to buy and when to buy power from the external power grid.
Although there is a great interest in the subject of energy communities, the literature fails to present complete solutions, that are able to adapt to communities having houses with completely different situations in terms of consumption and production, or storage of energy. In addition, the discussion on the form of energy sharing within energy communities is in a very initial phase, namely when it comes to the allocation coefficients, which are addressed in this application.
The present invention refers to a computer-implemented method and respective system for community energy management in a community comprising energy consumers and energy producers. Such a community energy management method and system allow optimal energy sharing within energy communities, as it is a central system that makes the global management of the entire community. The method and system of the present invention is based on mixed-Integer linear programming (MILP), operating under the receding horizon concept of Model Predictive Control (MPC). A systematic classification of electric appliances used in the houses of the community, the use of external information such as weather information, as well as the use of intelligent forecasting techniques enables the present invention to achieve an excellent efficiency. It also allows for an easy installation of as well as a smooth scaling with an increasing number of houses. The community energy management method formulations include sharing of energy without restrictions, as well as employing different allocation coefficients strategies.
In a first aspect, the present invention refers to a computer-implemented method community energy management.
In a second aspect, the present invention relates to a system configured to implement the method of the first aspect.
In a third aspect, the invention refers to a computer program product comprising instructions that are able to carry out the method steps when executed in a computer.
In a fourth aspect, the invention refers to a computer-readable storage medium comprising instructions that are able to carry out the method steps when ran in a computer.
The present invention addresses the problem of energy management of a community of houses by proposing complete, highly efficient, and user-defined community technical solutions which implement sharing of electric energy produced and/or stored by its members. It is a complete solution since it details all hardware and software needed to implement community energy management, such hardware and software being described in the appended claims of the present application. It allows the community to decide the methodology of energy sharing among a set of pre-defined and implemented techniques, easily extendable to other approaches. Finally, for the chosen sharing technique, it provides a highly efficient solution as: a) MILP provides an optimal solution to the community economic cost, according to the data used, adapting naturally to changes of equipment usage; b) the forecasts necessary in the MILP formulation are among the more accurate available worldwide due to: i) the use of state-of-the-art robust forecasting models; ii) the division of electric appliances into four classes, which significantly reduces the uncertainty of power consumption in each house in the community.
As advantageous effects of the present invention, the following can be listed:
Preferred embodiments of the present invention will be described with reference to the accompanying figures, which are to be construed as non-limiting the invention scope, which scope is defined by the appended claims, and wherein:
The present invention relates to a computer-implemented method for community energy management and to a system configured to implement said method.
In the following detailed description, the method steps will be described, (method steps are indicated between brackets below) together with the system object of the present patent application. Also the figures annexed will be referred to, for better clarification.
1—Data d0 acquisition (step a)), by an aggregator computational unit (110), during a minimum period of time of 15 days, typically during one month, wherein data do comprises at least one of the following data:
For every house h:
For every house h that has Manually Controlled Appliances:
For every house h that has Computer Controlled Appliances (not Acs):
For every house h that has Computer Controlled ACs:
For every house h that has Monitored but not Controlled (M) appliances:
The following procedure is employed for model design:
The set mepref is defined as:
where mpref is the set of preferred models obtained in the 2nd MOGA execution, m̆nwpref is the median of the linear weight norm for each model in mpref and m̆forepref the median of the sum of the forecasts for the prediction time-series obtained by models mpref.
The third subset of models, mepar, is obtained iteratively, by adding non-dominated models, considering nw(.) and fore(.) as the two criteria, until NS models are found. Initially, the set of models to be inspected, mi is initialized to mepref, and mepar to an empty set. In each iteration, both criteria are applied to mi. Then, the non-dominated solutions found are added to mepar and removed from mi.
The prediction intervals are obtained as:
Where t1-α2,N-p represents the α/2 quantile of a Student's t-distribution with N-p degrees of freedom. The total prediction variance for each prediction can be obtained as:
where v* denotes the optimal value of the nonlinear parameters and the data noise variance, σε2, can be estimated as:
Where N denotes the total number of samples and p the number of model parameters.
For classification models no forecasting criterion such as (62) is employed. In this case, criteria such as FPtr, FNtr, FPte, FNte are employed, where FP and FN denote the number of False Positives and False Negatives, respectively. Additionally, mepar will be the set with the smallest NS linear weight norm.
3—Determination of power profiles (step c)) for all monitored, manually controlled and computer-controlled appliances by computing the mean value of power consumption during all sampling intervals within a period of time, for example, within a day.
4—Initializations (step d))
Before executing the system, the information described in the heading Parameters, below, must be supplied. For each battery bank, the initial SOC value must be supplied.
Additionally, as several data-based models are used, they need to be designed first. The ANN models described in the heading Models, below, need around 1 month of data to be designed, using the methods described before. This way, this amount of data needs to be acquired. Additionally, for each appliance that will be manually controlled, its consumption profile needs to be determined, which also requires data. All this data can be measured by Wi-fi Smart Plugs devices, available commercially, connected to the data acquisition of each house.
For the community:
Energy sharing method, with possible coefficient values
For all Houses with PV:
A data acquisition system was developed and installed in a house.
In the example of implementation of the present invention, the consumption of the house is measured by a Carlo Gavazzi (EM340) 3 phase imported energy meter. This meter is a certificated device, and electrical measurement is done using a 2-wires Modbus RTU connection. EM340 supplies 45 different electric variables, sampled at 1 Hz. Variables related with the energy produced by a photovoltaic apparatus (PV), stored in a battery and injected in the grid are available from a Kostal smart energy meter (SEM). In total, 21 variables are obtained by KI, at a sampling interval of 1 min. The data access is done using a cable IP network using the Modbus IP protocol. Smart Plugs (SP) are used for on/off control of some equipment. Additionally, they allow sockets belonging to the same CB to be measured individually. This type of devices connects to an existing wireless network using an initial access point and a manufacturer mobile app. They can be read/controlled using a cloud API or directly using an internal web service, which is the case here. A smart Plug (180) is represented in
An Intelligent Weather Station (IWS) (120) represented in
Finally, Self-Powered Wireless Sensors (SPWS) (150), represented in
Gateways and a Technical Network are tasked with data transmission from/to the measurement devices. A technical IP-cabled and a wireless network have been created using a network router located inside an extension of the electric board case. This router separates the home network from the technical network. All devices, except the SPs and SPWS, are connected to that network. To perform the data acquisition from the existing devices EasyGateway devices are used. EasyGateway is a fault-tolerant IoT gateway that supports a variety of reception/acquisition protocols such as Modbus, SNMP, Easymodules and serial http, as well as a set of DataDelivered Connectors (DDC). The data transmission of the EasyGateways is always performed at a 1-min base, which means that the data acquired by the measurement devices related to each gateway are packed and transmitted at that rate. Control of electrical equipment is performed via Modbus.
The gateways can also send data to up to three different DDCs. Here, 2 DDCs and 2 IoT Platforms are used. One platform is used inside home, employing an EasyMqs DDC and another, using a Generic Ampq DDC, is in the cloud. Depending on where the aggregator resides, the former or the latter can be used. The same IoT platform is used inside home and in the cloud. It receives data from the configured message queue servers. The data arrived pass by a set of configured plug-ins for each type of entities configured on the platform. The application provides a web page where the end-user can configure a set of definitions related to data storage and management. It also allows data visualization using plots grouped by sensors category, and data download in 4 standard formats, csv, xlsx, mat and npz. For a more detailed description of the IoT platform, see [4].
6—Control Actions (step f) determined in the previous step, by the aggregator computational unit (110) sending to each data acquisition subsystem (140), which, on its turn, sends the respective control actions to the computer-controlled devices in each house of the community, via modbus;
7—Data reception by an Intelligent Aggregator (steps g), h), i), i)
The concept of the intelligent aggregator for community energy management system is represented in
The aggregator computational unit (110) is a computational unit that receives information about:
This information is sent wirelessly from the data acquisition of house h to the aggregator every sampling interval (for example, 15 minutes). Additionally, if there are appliances that should be monitored in house h, Active and Reactive Power sampled at, for example, 1 minute interval are also sent to the aggregator. If there are appliances that should be computer controlled in house h, then its data acquisition system receives from the aggregator, at each sampling interval, the corresponding actuation signals (in the case of battery control, the actions of charging the battery from the PV/discharging the battery; in the case a swimming pool pump, the on/off actuation signal; in the case of PMV control of air conditioners the on/off actuation signal and the reference temperature). The data acquisition system should supply these actuation signals to the corresponding device. Different acquisition systems can be used, provided they satisfy the above specifications. A data acquisition system according to the present invention is represented in
8—Determination of the averaged active power consumption of each house (step k), by using:
9—Forecasts (step I))
To implement the MILP-MPC approach, there is the need for forecasting both the consumption of each individual household and the PV generation of each PV system over the PH (obviously the community versions are just a sum of the values for the individual houses). Their forecasting, unless specified, is obtained as the joint usage of naïve forecasting and the use of multi-step NARX forecasting models, as
9.1—Electric consumption (substep I1) (EXAMPLE)
We have divided the appliances in four types, mainly because of the way that their forecasts are obtained. The forecast of the active Power of House h at instant k, within the Prediction Horizon, can be given as:
Equation (7) states that the not monitored neither controlled consumption is the sum of the active power of corresponding appliances. The naïve forecasting is obtained as:
The first 9 hours of forecasting are obtained by a RBF NARX model:
Equation (8) states that the forecasting of the first 36 steps for the NMC consumption of house h are obtained as a multi-step forecasting of model MhP, which uses past values (relative to I) of that consumption (
The encoding, presented in table 1, distinguishes the day of the week and the occurrence and severity of holidays based on the day they occur. The regular day column shows the coding for the days of the week when these are not a holiday. The following column presents the values encoded when there is a holiday, and finally, the special column shows the values that substitute the regular day value in two special cases: for Mondays when Tuesday is a holiday; and, for Fridays when Thursday is a holiday.
As the forecasts of the NMC consumption depend on the forecasts of the atmospheric temperature, another model, in this case a NAR model must be used to obtain these forecasts.
Forecasting of House h monitored but not controlled consumption within the Prediction Horizon
The forecasting can be obtained using Algorithm (Alg.) 1:
...
...
...
...
In Alg. 1, OPh,j,k denotes the Operation Status (0—Off; 1—On) of appliance j at house h at instant k. Rh,j,k is the reactive power of the main meter of house h at instant k. StPh,j/EndPh,j denote the start/end sample index of the operation of appliance j of house h.
It should be noted that NILM operates with data sampled at 1 minute, not with a 15 minutes sampling interval. The symbol k1 denotes sample indexes with a sampling interval of 1 min. The relation between k1 and k is k→k1∈{(k−1)*15+1. . .k *15}. The first index of k1 is denoted as k while the last one is
At each minute, the NILM operation for appliance j at house h is executed. If the appliance is operating (OPh,j,k=1), then the corresponding power estimation is performed ({circumflex over (P)}h,j,k). The algorithm then determines if the start of the operation and the end of the operation occur during this period. Then the profile of the appliance is updated.
For each appliance there are two models that intervene in the NILM operation: first a classifier model (Mi,jC) which outputs 1 if the operation is working, and 0 if not. If it is working, then another estimation model is executed, to estimate the active power consumed.
For each appliance a profile is stored, with the start and end of the last (or current) operation of appliance j at house h, a vector (OP) describing the number of times where the appliance was on since its operation started, for each sample, a vector (P) storing the sum of the powers for each sample, and a vector (P2) storing the sum of the square of powers for each sample. All these variables assume a sampling interval of 1 sec.
Then, the mean power is simply obtained as P./O, where the symbol “.I” means division element-by-element. If necessary, the variance of the power can be obtained as P2./O-(P./O){circumflex over ( )}2.
The forecasting of the power over the prediction horizon, with a sampling interval of 15 minutes, is just obtained as the mean of the mean powers over each period of 15 minutes.
Typically, for this kind of appliances, the power is obtained from a vector of daily mean power values, which are obtained offline through measurements. This way, for each appliance, we use:
For this kind of appliances, the power can be obtained as for MC, or using other formulations, which are appliance specific.
9.2—Forecasting of PV Power generated (substep I2) (EXAMPLE)
Here we use also hybrid forecasting. The first 36 steps-ahead forecasting are obtained as:
Where R denotes global solar radiation. This way, we need an additional forecasting model to determine the forecasts of solar radiation over PH.
10—MILP-MPC formulation (step m)
After having described a data acquisition system (140) according to the invention, it will now be described the software part that resides in the aggregator computational unit (110).
At every sampling instant k, the intelligent aggregator solves a Mixed-Integer Linear Programming (MILP) problem, formulated as:
In (15), Nh denotes the number of houses in the community, PH is the prediction horizon, and Δk is the sampling interval (in hours). Typical values for these two last parameters are 24 hours (96 steps) and ¼ hours, respectively. {circumflex over (P)}h,lGrid−/{circumflex over (P)}h,lGrid− are the estimates (in Kw) of the active power bought(−)/sold(+) from/to the grid at the sampling instant/by house h. In the same way, {circumflex over (P)}h,lCom−/{circumflex over (P)}h,lCom+ are the estimates (in Kw) of the active power bought(−)/sold(+) from/to the community at the sampling instant/by house h. Finally, πlGrid−/πlGrid+ are the price, per kWh of the energy bought(−)/sold(+) from/to the community or the grid at the sampling instant I. This way, the estimate of the cost of the energy bought from the grid by the community during PH is minimized, while the estimate of the profit of the energy sold to the grid by the community during PH is maximized.
Notice that the receding horizon principle is used here. The solution of (15) is a sequence of control actions (the binary values described later) over the whole steps-ahead within PH. But only the first (one-step ahead) of these actions are applied at that instant of time. In the next instant of time the same process takes place.
There are several constraints that must be satisfied:
In (16-17) it is defined that {circumflex over (P)}h,lGrid+/{circumflex over (P)}h,lGrid− are positive variables with maximum value equal to the contracted power from the grid {circumflex over (P)}hGrid+/{circumflex over (P)}hGrid+ by house h. vh,lGrid is the binary variable modelling the processes of selling/purchasing energy from house h to/from the grid, assuming value 1 if purchasing or 0 if selling.
In the same way, {circumflex over (P)}h,lCom+/{circumflex over (P)}Com− are positive variables with maximum value equal to the maximum value exchangeable with the community
The energy balance can be given as:
It is not allowed to buy energy from the grid and sell energy to the community at the same time:
10.1−Energy balance
The energy balance of house h at instant k is:
In (22), {circumflex over (P)}h,lPV is the estimate of the AC Power generated by the PV installation of house h at instant I.
The active power of house h, at instant k is composed of four terms:
Equation (22) is valid when it is possible to transfer energy between houses, without any restrictions. Several alternatives exist:
In this case it is still possible to use the MILP-MPC formulation for each house individually.
All PV power is shared by the community; its use for the individual houses is, however, governed by coefficients. In the case of fixed coefficients, the members of the community agree a certain fixed percentage of the total power of all PV systems to be allocated to each house. In the case of employing variable coefficients, the members agree that the optimal percentage of the total power of all PV systems to be allocated to house h is obtained through an optimization problem—here βh,l are variables to be optimized. The use of consumption-based coefficients the members agree that the percentage to be allocated to each house is calculated through the ratio between the consumption of the house and the total power consumption of all houses of the community. Finally, the use of a hybrid scheme implies that the members agree that the percentage to be allocated to house h is given by a hybrid coefficient that combines a predefined fixed coefficient and the percentage of the consumption relative to all houses of the community.
The methodology of energy transfer between the members of community is defined by the community.
11—Examples of forecast of consumption for certain Computer Controlled devices: (step I4) calculation of forecasts of consumption)
There is a series of restrictions related with the battery bank of house h at instant l:
In (28-29) it is defined that {circumflex over (P)}k,lB−/{circumflex over (P)}k,lB+ are positive variables with maximum value equal to the maximum charge/discharge power
The update of state of charge of battery bank of house h is defined in (30). ηhB−/ηhB+ are the charging/discharging efficiency of the battery bank. ĒhB is the rated capacity of battery bank of house h.
This is an example of a shiftable load, that must obey the following assumptions:
Restriction (38) ensures that the pump must remain on for at least Nmspp*Ts. Restriction (39) says that the power consumption is equal to the pump rated power consumption. Restriction (40) states that the pump must operate NTspp steps within a 24 hour period. Restriction (41) ensure the correct operation of the shiftable demand. Finally, (42) imposes that a start-up cannot occur at the same time of a shut-down. vh,kspp-on/off, vh,kspp-start and vh,kspp-shutdown are the binary variables for the state on/off, for the start-up and the shut-down binary variable of the swimming pool pump of house h.
It is assumed that the air-conditioner must ensure thermal comfort in a room between user-specified periods of time, or schedules. Assume that one of these periods is [ts te], which corresponds to the sample range [ks ke]. The reference temperature (a discrete, integer value) to apply to AC is given as the solution of the following Model Predictive Control (MPC) problem:
In (43), the solution is divided into 3 alternatives, depending on the instant of time considered: a) if it is before the start of the period, we only need to ensure that the room is in thermal comfort when, within the prediction horizon (PH), the time considered is after ts; b) near the end of the period, we do not need to ensure thermal comfort when time is larger than after te; c) all the other cases we determine the optimal sequence of actions, between the admissible sequence of actions (vPH) throughout PH. J[i] is the cost function at step i, whose profile must be supplied to the system. The thermal comfort (Θ) uses the Predicted Mean Vote (PMV) formulation, and ΘT is a threshold, typically assuming the value of 0.5. To compute Θk for a room, the following information is needed: Air temperature (ITh,kroom), Relative humidity (RHh,kroom ) and Wall temperature (WTh,kroom). Further details can be found in [5]. Δt, the time before the start of the schedule when the AC might need to operate to ensure thermal comfort throughout the whole period, must be specified.
With this explanation, the incorporation of the automatic control of an AC is given by the following equation:
In (44), ĴH,AC,k denotes the estimated cost of controlling the air conditioner AC of house i at step k and vh,kAC-on/off is the binary variable controlling the operation of AC during [ts-Δt,te].
Hereinafter it is described how good models can be obtained from a set of acquired or existent data.
Three sub-problems must be solved:
These sub-problems are solved by the application of a model design framework, composed of two tools. The first, denoted as ApproxHull, performs data selection, from the data available for design. Feature and topology search are solved by the evolutionary part of MOGA (Multi-Objective Genetic Algorithm), while parameter estimation is performed by the gradient part of MOGA.
To design data driven models like RBFs (Radial Basis Functions), it is mandatory that the training set involves the samples that enclose the whole input-output range where the underlying process is supposed to operate. To determine such samples, called convex hull (CH) points, out of the whole dataset, convex hull algorithms can be applied.
The standard convex hull algorithms suffer from both exaggerated time and space complexity for high dimensions studies. To tackle these challenges in high dimensions, ApproxHull was proposed in [3] as a randomized approximation convex hull algorithm. To identify the convex hull points, ApproxHull employs two main computational geometry concepts: the hyperplane distance and the convex hull distance.
Given the point x=[x1 . . . xd]T in a d-dimensional Euclidean space, and an hyperplane H, the hyperplane distance of x to His obtained by:
where n=[a1, . . . ad]T and d are the normal vector and the offset of H, respectively.
Given a set X={xi}i=1n⊂ and a point x∈
, the Euclidean distance between x and the convex hull of X, denoted by conv(X), can be computed by solving the following quadratic optimization problem:
where e=[1, . . . 1]T, Q=XTX and c=XTx. Assuming that the optimal solution of (46) is a*, the distance of point x to conv(X) is given by:
ApproxHull consists of five main steps. In Step 1, each dimension of the input dataset is scaled to the range [−1, 1]. In Step 2, the maximum and minimum samples with respect to each dimension are identified and considered as the vertices of the initial convex hull. In Step 3, a population of k facets based on the current vertices of the convex hull is generated. In Step 4, the furthest points to each facet in the current population are identified using (45) and they are considered as the new vertices of the convex hull, if they have not been detected before. Finally, in Step 5, the current convex hull is updated by adding the newly found vertices into the current set of vertices. Step 3 to Step 5 are executed iteratively until no vertex found in Step 4 or the newly found vertices are very close to the current convex hull, thus not containing useful information. The closest points to the current convex hull are identified using the convex hull distance under an acceptable user-defined threshold.
The flowchart of AproxHull is shown in
In a prior step before determining the CH points, ApproHull eliminates replicas and linear combinations of samples/features. After having identified the CH points, ApproxHull generates the training, test and validation sets to be used by MOGA, according to user-specifications, but incorporating the CH points in the training set.
This framework is described in detail in [6], and it will be briefly discussed here.
MOGA designs static or dynamic ANN (Artificial Neural Network) models, for classification, approximation or forecasting purposes.
MOGA employs models that are linear-nonlinearly separable in the parameters. The output of this type of models, at time step k, is given as:
In (48), xk is the ANN input at time step k, φis the basis functions vector, u is the (linear) output weights vector and v represents the nonlinear parameters. For simplicity, we shall assume here only one hidden layer, and v is composed of n vectors of parameters, each one for each neuron (v=[v1. . . vn]T). This type of models comprises Multilayer Perceptrons, Radial Basis Function (RBF) networks, B-Spline and Asmod models, Wavelet networks, and Mamdani, Takagi and Takagi-Sugeno fuzzy models (satisfying certain assumptions).
This means that the model parameters can be divided into linear and nonlinear parameters:
and that this separability can be exploited in the training algorithms. For a set of input patterns X, training the model means finding the values of w, such that the following criterion is minimized:
where ∥·∥2 denotes the Euclidean norm. Replacing (49) in (50), we have:
where Γ(X, v)=[φ(x1, v) . . . φ(xm, v)]T, m being the number of patterns in the training set. As (51) is a linear problem in u, its optimal solution is given as:
Where the symbol ‘+’ denotes a pseudo-inverse operation. Replacing (52) in (51), we have a new criterion, that is only dependent on the nonlinear parameters:
The advantages of using (53) instead of (51) are threefold:
Any gradient algorithm can be used to minimize (53) or (51). First-order algorithms, error back-propagation (or steepest descent method), conjugate-gradient method, or their variants, or second-order methods, such as quasi-Newton, Gauss-Newton or Levenberg-Marquardt (LM) algorithms can be employed. For non-linear least-squares problems, the LM method is recognized to be the state-of-the-art method, as it exploits the sum-of-squares characteristics of the problem. The LM search direction is given as the solution of:
Where gk is the gradient vector:
And Jk is the Jacobean matrix:
λis a regularization parameter, which enables the search direction to change between the steepest descent and the Gauss-Newton directions.
It has been proved that the gradient and Jacobean of criterion (53) can be obtained by: a) first computing (52); b) replacing the optimal values in the linear parameters; c) and determining the gradient and Jacobian in the usual way.
In MOGA, the training algorithm terminates after a predefined number of iterations or using an early-stopping technique.
In the case described here, RBF models will be employed. The basis functions employed by RBFs are typically Gaussian functions:
Which means that the nonlinear parameters for each neuron are constituted by a centre vector, ci, with as many components as the dimensions of the input, and a spread parameter, σi. The derivatives of the basis function with respect to the nonlinear parameters are:
Associated with each model, there are always heuristics that can be used to obtain the initial values of the parameters. For RBBs, centre values can be obtained randomly from the input data, or from the range of the input data. Alternatively, clustering algorithms can be employed. Initial spreads can be chosen randomly, or using several heuristics, such as:
where zmax represents the maximum distance between centres.
MOGA evolves ANN structures, whose parameters separate (in this case RBFs), each structure being trained by the algorithm described before. The text below is for the design of forecasting models; for classifiers we shall describe the changes in the end of the section.
As we shall be designing forecasting models, where we want to predict the evolution of a specific variable within a predefined PH (Prediction Horizon), the models should provide multi-step-ahead forecasting. This type of forecasts can be achieved in a direct mode, by having several one-step-ahead forecasting models, each providing the prediction of each-step ahead within a PH. An alternative, which is the one followed in this work, is to use a recursive version. In this case, only one model is used, but its inputs evolve with time. Consider the Nonlinear Auto-Regressive model with Exogeneous inputs (NARX), with just one input, for simplicity:
Where ŷk+1|k denotes the prediction for time-step k+1 given the measured data at time k, and di
The evolutionary part of MOGA evolves a population of ANN structures. Each topology comprises of the number of neurons in the single hidden layer (for an RBF model), and the model inputs or features. MOGA assumes that the number of neurons must be within user-specified bound, n∈[nm,nM]. Additionally, one needs to select the features to use for a specific model, i.e, must perform input selection. In MOGA we assume that, from a total number q of available features, denoted as F, each model must select the most representative d features within a user-specified interval, d∈[dm,dM], dM≤q. For this reason, each ANN structure is codified as shown in
The first component corresponds to the number of neurons. The next dm represents the minimum number of features, while the last white ones are a variable number of inputs, up to the predefined maximum number. The λj values correspond to the indices of the features fj in the columns of F.
The operation of MOGA is a typical evolutionary procedure, represented in
We shall refer the reader to publication [6] regarding the genetic operators.
The model design cycle is illustrated in
First, the search space should be defined. That includes the input variables to be considered, the lags to be considered for each variable, and the admissible range of neurons and inputs. The total input data, denoted as F, together with the target data, must then be partitioned into three different sets: training set, to estimate the model parameters, test set, to perform early-stopping, and validation set, to analyze the MOGA performance.
Secondly, the optimization objectives and goals need to be defined. Typical objectives are Root-Mean-Square Errors (RMSE) evaluated on the training set (ρtr), or on the test set (ρte), as well as the model complexity, #(v)—number of nonlinear parameters—or the norm of the linear parameters (∥u∥2). For forecasting applications, as it is the case here, one criterion is also used to assess its performance. Assuming a time-series sim, a subset of the design data, with p data points. For each point, the model (61) is used to make predictions up to PH steps-ahead. Then an error matrix is built:
where e[i,j] is the model forecasting error taken from instant i of sim, at step j within the prediction horizon. Denoting the RMS function operating over the ith column of matrix E, by ρsim(.,i), the forecasting performance criterion is the sum of the RMS of the columns of E:
One should notice that every performance criterion can be minimized, or set as a restriction, in the MOGA formulation.
After having formulated the optimization problem, and after setting other hyperparameters, such as the number of elements in the population (npop), number of iterations population (niter), and genetic algorithm parameters (proportion of random immigrants, selective pressure, crossover rate and survival rate), the hybrid evolutive-gradient method is executed.
Each element in the population corresponds to a certain RBF structure. As the model is nonlinear, a gradient algorithm such as the LM algorithm minimizing (53) is only guaranteed to converge to a local minimum. For this reason, the RBF model is trained a user-specified number of times, starting with different initial values for the nonlinear parameters. MOGA allows initial centers to be chosen from the heuristics, or using an adaptive clustering algorithm.
As the problem is multi-objective, there are several ways for identifying which training trial is the best one. One strategy is to select the training trial whose Euclidean distance from the origin is the smallest. Symbol “o” in
The other d strategies are to select the training trial which minimized the ith objective (i.e., i=1,2, . . . , d) better than the other trials. As an example, the symbols ‘<’e‘>’ in
After having executed the specified number of iterations, we have performance values of npop*niter different models. As the problem is multi-objective, a subset of these models corresponds to non-dominated models (nd), or Pareto solutions. If one or more objectives is (are) set as restriction(s), a subset of nd, denoted as preferential solutions, pref, corresponds to the non-dominated solutions, which meet the goals. An example is shown in
The performance of MOGA models is assessed on the non-dominated models set, or in the preferential models set. If a single solution is sought, it will be chosen on the basis of the objective values of those model sets, performance criteria applied to the validation set, and possibly other criteria.
When the analysis of the solutions provided by the MOGA requires the process to be repeated, the problem definition steps should be revised. In this case, two major actions can be carried out: input space redefinition by removing or adding one or more features (variables and lagged input terms in the case of modelling problems) and improving the trade-off surface coverage by changing objectives or redefining goals. This process may be advantageous as usually the output of one run allows reducing the number of input terms (and possibly variables for modelling problems) by eliminating those not present in the resulting population. Also, it usually becomes possible to narrow the range for the number of neurons in face of the results obtained in one run. This results in a smaller search space in a subsequent run of the MOGA, possibly achieving a faster convergence and better approximation of the Pareto front.
Typically, for a specific problem, an initial MOGA execution is performed, minimizing all objectives. Then a second execution is run, where typically some objectives are set as restrictions.
In the end of the 2nd MOGA execution, we obtain a set of preferential models. A sub-set of those, denoted as outset, will be selected using the procedure described below, and the model output, for a forecasting application, will be given as:
For a classification application, the output is given as:
Where the step function is given as:
In certain embodiments of a first aspect, the invention relates to a computer implemented method for community energy management (1000), comprising the following steps:
wherein R denotes global solar radiation,
wherein an additional forecasting model is needed for solar radiation over PH, to determine its evolution is used:
In other embodiments of the first aspect of the present invention, data do acquired in step a) is selected from the group consisting of:
Yet in other embodiments of the first aspect of the present invention, the initial values v0 of step b) are at least one selected from the group consisting of, for all houses with a photovoltaic energy generation subsystem:
Still in other embodiments of the first aspect of the present invention, the prediction horizon is between 1 hour and 30 days, preferably between 2 hours and 15 days, and most preferably the prediction horizon is 1 day.
Yet in other embodiments of the first aspect of the present invention, weather data d4 is retrieved from a weather database and/or data d4 is sent by a weather station (120).
In certain embodiments of the first aspect of the present invention, the computer implemented method for community energy management (1000) further comprises the following substep:
In other embodiments of the first aspect of the present invention, the sampling interval Δk belongs to the interval from 5 minutes to 1 hour, most preferably the sampling interval Δk is 15 minutes and that the sampling interval Δk1 belongs to the interval between 10 seconds to 2 minutes, most preferably the sampling interval Δk1 is 1 minute.
Yet in other embodiments of the first aspect of the present invention, the computer-controlled devices are selected from the group consisting of air conditioning systems (180), battery banks (190), swimming pool pumps (200), or any other electric device capable of being controlled remotely, namely using a smart plug (210).
In certain embodiments of a second aspect, the present invention relates to a community energy management system (100) comprising:
In certain embodiments of the second aspect, the community energy management system (100) according to the invention further comprises:
Yet in certain embodiments of the second aspect, the community energy management system (100) according to the invention further comprises:
Yet in certain embodiments of the second aspect, the aggregator computational unit (110) is selected from the group consisting of a server, a desktop computer, a laptop computer, or a combination thereof.
In a third aspect, the invention relates to a computer program product comprising logic instructions which, when executed by a computer of the community energy management system (100) of the second aspect, cause the computer to carry out the method of the first aspect of the present invention.
In a fourth aspect, the invention relates to a computer-readable storage medium comprising instructions which, when executed by a computer of the community energy management system (100) of the second aspect, cause the computer to carry out the method of the first aspect of the present invention.
Throughout this application, the terms “around” and “approximately” mean that the value to which they refer could also be within a range of plus and minus 10% of the mentioned value.
As used in this application, the term “or” is to be interpreted in an inclusive meaning instead of the exclusive meaning, unless otherwise clearly stated. That is, an expression like “X utilizes A or B” shall be interpreted as including all possible combinations, i.e., “X utilizes A”, “X utilizes B”, and “X utilizes A and B”.
As used in this application, the indefinite article “a”, “an”, shall be interpreted as including “one” or “one or more”, unless otherwise clearly stated.
Throughout this application, the examples provided shall be interpreted as having the purpose to illustrate one or more examples of embodiments of the present invention and shall not be interpreted as preferences, unless otherwise clearly stated.
As used throughout the present application, the terms “comprise/comprises”, “comprising”, “include/includes”, “including” specify the presence of the features, elements, components, steps, and related operations, and do not exclude whatsoever the presence of further features, elements, components, steps, and related operations.
The subject-matter above-described is provided as an illustration of the present invention and shall not be interpreted as limiting it. The terminology used with the purpose of describing specific embodiments according to the present invention, shall not be interpreted as a limitation of the invention.
In the following, the citations list is presented:
CA2809011 A1, “Adaptative energy management system”, priority date Nov. 6, 2012, published May 6, 2014, MacMaster University, CA.
Number | Date | Country | Kind |
---|---|---|---|
118847 | Jul 2023 | PT | national |