COMPUTER-IMPLEMENTED METHOD FOR COMMUNITY ENERGY MANAGEMENT USING MIXED-INTEGER LINEAR PROGRAMMING, MODEL PREDICTIVE CONTROL, NON-INVASIVE LOAD MONITORING TECHNIQUES, ROBUST FORECASTING MODELS AND RELATED SYSTEM

Information

  • Patent Application
  • 20250054081
  • Publication Number
    20250054081
  • Date Filed
    July 26, 2024
    a year ago
  • Date Published
    February 13, 2025
    8 months ago
Abstract
The present invention relates to a computer-implemented method and respective system (100) for community energy management in a community comprising energy consumers and energy producers. Such a community energy management method and system (100) allow optimal energy sharing within energy communities. The method of the present invention is based on mixed-Integer linear programming, operating under the receding horizon concept of Model Predictive Control.
Description
CROSS REFERENCE TO RELATED APPLICATIONS

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.


TECHNICAL FIELD OF THE INVENTION

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.


BACKGROUND OF THE INVENTION

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.


PRIOR ART

[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.


SUMMARY OF THE INVENTION

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.


SOLUTION TO TECHNICAL PROBLEM

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.


ADVANTAGEOUS EFFECTS OF THE INVENTION

As advantageous effects of the present invention, the following can be listed:

    • A—The proposed invention enables to implement sharing of electric energy within a community, as well as the management of energy transfer with the grid, using several different criteria, whether pre-programmed or user-defined.
    • B—By classifying the types of Electrical Appliance between Monitored (M)/Not Monitored (NM), Controlled (C)/Not Controlled (NC), and Manually-Controlled (MC)/Computer-Controlled (CC), it enables, on one hand, a better forecasting of the power demand of each house within the community, and, on the other hand, allows the user to set suitable schedules for User-Controlled devices (for instance, thermo-accumulators), as well as settings and control algorithms for Computer-Controlled devices (for instance, Air-Conditioners or swimming-pool pumps).
    • C—The operation and power consumption of Monitored devices can be estimated and forecasted using Non-Invasive Load Monitoring (NILM) techniques.
    • D—Power consumption of Not Monitored devices, as well as power produced by the (photovoltaic apparatus) PV installations, must be forecasted within the Prediction Horizon (PH). Typically, with, for example, a time-step of 15 minutes, if the PH is 24 hours, this means that the forecasts must be available for 96 steps-ahead. To speed-up the calculations, this period is divided into two sub-periods, as an example: for the last 15 hours, naïve forecasting is used; for the first 9 hours, the forecasts are obtained using Robust Forecasting models, which are an ensemble of models, designed not only to minimize the forecasting errors within PH, but also ensuring Prediction Intervals.
    • E—C) and D) enable the power demand of each house, as well as its forecast within PH, to be divided between NM demand and M demand. As the larger uncertainty is related with NM demand, this decreases the total forecasting error.
    • F—The control of all CC devices, including inverters and/on batteries for all houses are obtained by solving, at each time-step, a MILP problem, formulated with the selected energy shared criterion, using the NM and M demand and PV forecasts, over PH, and energy selling/buying grid tariffs.
    • G—As at each time-step, a new Mixed-Integer Linear Programming (MILP) problem is solved, in a Receding Horizon Scheme, the energy management scheme adapts to new situations (for instance the initial operation of a dishwasher, which is not controlled, but monitored using NILM.
    • H—All this computation is done in an aggregator computational unit (a software executing in a computer), which can reside in one of the houses, or in a separate energy management company. Data is received/sent wirelessly between each house and the aggregator computational unit, using data acquisition systems in each house.





BRIEF DESCRIPTION OF THE FIGURES

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:



FIGS. 1A and 1B—illustrate a flowchart representing the method steps according to an embodiment of the present invention;



FIG. 2—illustrates a schematic diagram representing the system according to an embodiment of the present invention;



FIG. 3—illustrates schematically an aggregator computational unit according to an embodiment of the present invention;



FIG. 4—illustrates a schematic diagram representing an embodiment of a part of the system according to the present invention;



FIG. 5—illustrates a hybrid forecasting scheme used in embodiments of the present invention;



FIG. 6—illustrates a flowchart of a ApproxHull used in embodiments of the present invention;



FIG. 7—illustrates a chromosome and input space lookup table of a neural network used in embodiments of the present invention;



FIG. 8—illustrates a MOGA flow of operation of a neural network used in embodiments of the present invention;



FIG. 9—illustrates a model design cycle used in embodiments of the present invention;



FIG. 10—illustrates a chart plotting different strategies for identifying the best out of 10 training trials of a neural network used in embodiments of the present invention; and



FIG. 11—illustrates a chart Detail of objective space for a problem of a model used in embodiments of the present invention.





DETAILED DESCRIPTION OF THE INVENTION

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:

    • {tws}—Time basis for weather data;
    • {R}—Global Solar Radiation;
    • {T}—Atmospheric Air Temperature


For every house h:

    • {tCons}—Time basis for Consumption data;
    • {Ph}-Active power of house h
    • {Rh}—Reactive power of house h
    • {tInv}-Time basis for Inverter data;
    • {PhPV}—AC Power generated by the PV installation of house h
    • {Oh}—Daily Occupation of house h


For every house h that has Manually Controlled Appliances:

    • StPh,j/EndPh,j, jε{MCh}—Start/end times of the operation of all Manually Controlled (MC) appliances of house h.
    • {Ph,j, J∈{MCh}}—Active Power of all Manually Controlled appliances of house h.
    • {tMCh}—Time basis for all Manually Controlled appliances of house h.


For every house h that has Computer Controlled Appliances (not Acs):

    • {Uh,j, j∈{CCh}} Control Actions for all appliances of house h to be Computer Controlled (CC)
    • {Ph,j, j∈{CC}}—Active Power of all appliances of house h to be Computer Controlled
    • {tcCh}—Time basis for all Computer Controlled appliances of house h.


For every house h that has Computer Controlled ACs:

    • {IThroom, room∈{ACh}}—Air temperature for all ACs of house h to be Computer Controlled
    • {RHPhroom, room∈{ACh}} Relative humidity for all ACs of house h to be Computer Controlled
    • {WThroom, room∈{ACh}} Wall temperature for all ACs of house h to be Computer Controlled
    • {Phroom, room∈{ACh}} Active Power for all ACs of house h to be Computer Controlled
    • {Uhroom, room∈{ACh}} Control Actions for all ACs of house h to be Computer Controlled
    • {tACh}—Time basis for all ACs of house h to be Computer Controlled


For every house h that has Monitored but not Controlled (M) appliances:

    • StPh,j/Endh,j, jε{M}—Start/end times of the operation of all Monitored (M) appliances of house h.
    • {Ph,j, j∈{Mh}}—Active Power of all Monitored appliances of house h.
    • {tMh}—Time basis for all Monitored appliances of house h.


      2—Model Design Procedure (step b))


The following procedure is employed for model design:

    • 1. Selection of the datasets from the available design data by using, for example, ApproxHull [3];
    • 2. Minimization of the different objectives, by formulating a Multi-Objective Genetic Algorithm (MOGA);
    • 3. Analysis of MOGA results, restricting some of the objectives and redefinition of the input space and/or the model topology;
    • 4. Usage of the preferential set of models obtained from the second MOGA execution;
    • 5. Determination of mepref using (1);
    • 6. From mepref obtain mepar using (2);
    • 7. If the model that should be designed is a Nonlinear Auto-Regressive model with Exogeneous (NARX) model, usage mepar for the exogenous variables;
    • 8. Obtaining the prediction intervals using (3)


The set mepref is defined as:










m
e
pref

=


{



m
pref

:


nw

(

m
pref

)





m


nw
pref


}



{



m
pref

:


fore
(

m
pref

)





m


fore
pref


}






(
1
)







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.










m
e
par

=

{



nd

(


fore
(

m
e
pref

)

,

nw

(

m
e
pref

)


)

:

#

nd

=
NS

}





(
2
)







The prediction intervals are obtained as:












y


_

k

=





y


k

-

Δ



y


k





y
k





y


k

+

Δ



y


k




=



y


_

k






(
3
)










Δ



y


k


=


t


1
-

α
/
2


,

N
-
p





σ
tot






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:




















σ
tot
2

=


σ
ε
2

(

1
+


φ
T

(


x
k

,
v





*)



(


Γ
T

(


Z
tr

,
v




*)



Γ
(


Z
tr

,
v



*)

)


-
1




φ
(


x
k

,
v



*)

)




(
4
)







where v* denotes the optimal value of the nonlinear parameters and the data noise variance, σε2, can be estimated as:












σ
^

ε
2

=






k
=
1

N



e
k
2



N
-
p


=





k
=
1

N



(


y
k

-


y


(

z
k

)


)

2



N
-
p




,




(
5
)







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.


Parameters

For the community:


Energy sharing method, with possible coefficient values


For all Houses with PV:

    • PhGrid−/PhGrid+ Contracted bought(−)/sold(+) power from/to the grid by house h


      For all houses with PV and Battery Bank:
    • PhB−/PhB+ Maximum discharged (charged) power of the battery bank of house h
    • SoCh/SoCh Minimum/Maximum value of the state of charge of the battery bank of house h
    • SoCh,initial Initial state of charge of the battery bank of house h
    • RUh/RDh Maximum values of the ramp-up/ramp down rates for charging or discharging of the battery bank of house h
    • ηhB−hB+ Charging/discharging efficiency of the battery bank of house h
    • ĒhB Rated capacity of battery bank of house h


      For All Houses with Computer-Controlled Acs (Air Conditioning Systems):
    • ts Start time when a room must be in thermal comfort
    • te End time when a room must be in thermal comfort
    • Δt Time before the start of the schedule when the AC might need to operate to ensure thermal comfort throughout the whole period
    • ΘT PMV (Predicted Mean Vote) threshold, typically assuming the value of 0.5


Models





    • MT Forecasting Temperature Model

    • MhP Forecasting Consumption Model for NMC appliances of house h

    • MR Forecasting Radiation Model

    • MhPV Forecasting PV Power Model for house h

    • Mh,jC Classifier model for monitored appliance j of house h


      5—Data acquisition (step e))





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 FIG. 4.


An Intelligent Weather Station (IWS) (120) represented in FIG. 2 is a device that measures the air temperature and relative humidity, and global solar radiation, and predicts their evolution within a self-defined prediction horizon. To enable these forecasts, a two stages strategy is employed. When little measured data are available, a nearest neighbor algorithm is employed. When enough data are available, neural networks predictive models are automatically off-line designed and uploaded to the IWS, for real-time use.


Finally, Self-Powered Wireless Sensors (SPWS) (150), represented in FIG. 4, are used for measuring room data, such as air temperature and relative humidity, status (open/close) of doors and windows, walls temperature, light and room movement. They are Ultra-Low-Power devices and communicate via ISM radio band working on 2.4 GHz or 868 MHz frequencies. They can be used to measure thermal comfort for usage in predictive control of air-conditioners in the house.


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 FIGS. 2 and 3.


The aggregator computational unit (110) is a computational unit that receives information about:

    • weather parameters—Air Temperature (T) and Solar Radiation (R)—from possibly a weather station, such as described above or collected by an internet application that, on one hand, is valid for all houses in the community and, on the other hand, measures or interpolates these values at the sampling interval considered (15 minutes);
    • Tariffs employed in the energy prices, both from the point of view of purchasing as well as selling, for the current sample and for all future samples within a Prediction Horizon (PH), for example of 24 hours;
    • Daily occupation (number of occupants) for each house (current and next day), inserted by a user:
    • Electric information related with the electric consumption of each house, sent by the consumption energy meter:
      • Ph,k—Active power of house h at instant k;
      • Rh,k—Reactive power of house h at instant k
    • information regarding possible PV installation, sent by the inverter energy meter:
      • {circumflex over (P)}h,kPV—AC Power generated by the PV installation of house h at instant I
    • possible energy storage, sent by the inverter energy meter:
      • SoCh,k—State of charge of the battery bank of house h at instant k
    • And possible climate information (Air temperature (ITh,kroom), Relative humidity (RHh,kroom), Wall temperature (WTh,kroom) about each room in house h that is computer-controlled using Predicted Mean Vote (PMV), at instant k.


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 FIG. 4.


8—Determination of the averaged active power consumption of each house (step k), by using:








P

h
,
k


=


P

h
,

k
1



N


,

N
=


Δ

k


k
1







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 FIG. 5 illustrates.


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:











P
^


h
,

{




k
+
1

...


k

+
PH

}



=



P
^


h
,

{




k
+
1

...


k

+
PH

}


NMC

+


P
^


h
,

{




k
+
1

...


k

+
PH

}


NC

+


P
^


h
,

{




k
+
1

...


k

+
PH

}


MC

+


P
^


h
,

{




k
+
1

...


k

+
PH

}


CC






(
6
)







Forecasting of House h not Monitored Neither Controlled Consumption Within the Prediction Horizon










P
^


h
,

{




k
+
1

...


k

+
PH

}


NMC

=




j
=
1


#


(


{

NM
i

}



{

NC
i

}


)






P
^


h
,
j
,

{




k
+
1

...


k

+
PH

}








(
7
)














P
^


h
,

{




k
+
1

...


k

+
PH

}


NMC

=



P
^


h
,

{




k
+
1

...


k

+
36

}


NMC




P
^


h
,

{




k
+
37

...


k

+
PH

}


NMC






(
8
)







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:











P
^


h
,

{




k
+
37

...


k

+
PH

}


NMC

=


P
^


h
,

{



k
-
59

...


k

}


NMC





(
9
)







The first 9 hours of forecasting are obtained by a RBF NARX model:











P
^


h
,

{




k
+
1

...


k

+
36

}


NMC

=

{



M
h
P

(



P
_


h
,
l

NMC

,


T
_

l

,

O

h
,
l


,

D
l


)

,

l
=

k
+

1





k

+
36



}





(
10
)







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 (Ph,lNMC), past values of the atmospheric air temperature (Tl), the current occupation of the house, and a codification of the corresponding day (Dl). Notice that it is assumed that the community houses are near enough so that we can consider there is no spatial variation of the atmospheric temperature.









TABLE 1







Day of the week and holiday occurrence encoding values












Day of the week
Regular day
Holiday
Special
















Monday
0.05
0.40
0.70



Tuesday
0.10
0.80



Wednesday
0.15
0.50



Thursday
0.20
1.00



Friday
0.25
0.60
0.90



Saturday
0.30
0.30



Sunday
0.35
0.35










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.










T

{




k
+
1

...


k

+
36

}


=

{



M
T

(


T
_

l

)

,

l
=

k
+

1





k

+
36



}





(
11
)







Forecasting of House h monitored but not controlled consumption within the Prediction Horizon











P
^


h
,

{




k
+
1

...


k

+
PH

}


NC

=




j
=
1


#


(


{

M
i

}



{

NC
i

}


)






P
^


h
,
j
,

{




k
+
1

...


k

+
PH

}








(
12
)







The forecasting can be obtained using Algorithm (Alg.) 1:












Alg. 1-Forecasting of House h monitored but not


controlled consumption of appliance j within the


Prediction Horizon















# Inputs


 # Ph,{custom-character...k},,Rh,{custom-character...k},,OPh,{custom-character...k-1},,{circumflex over (P)}h,{custom-character...k-1}


# Outputs


 # OPh,j,{k...k},{circumflex over (P)}h,j,{k1...k},{circumflex over (P)}h,j,{k+1...k+PH}


StPh,j = 0


EndPh,j = 0


for i=1:15


 k1 =(k−1)*15+i


 [OPh,j,k1 ,{circumflex over (P)}h,j,k1] = NILM (h, j, Ph,{k1−10...k1−1}, Rh,{k1−10...k1−1},


 {circumflex over (P)}h,j,{k1−10...k1−1})


 if OPh,j,k1 =1


  if OPh,j,k1−1 ≠ 1


   StPh,j = k1


  end


 else


  if OPh,j,k1−1 =1


   EndPh,j = k1


  end


 end


end


{circumflex over (P)}h,j,{k+1...k+PH} = UpdateProfileMNC (i, j, StPh,j , EndPh,j , OPh,j,{k...k}


{circumflex over (P)}h,j,{k...k} , k)









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 k.


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.












Alg. 2-NILM Operation and Power Estimation of


appliance j in House h at instant k

















# Inputs:



 # h,j,Ph,{k1−10...k1−1},Rh,{k1−10...k1−1},{circumflex over (P)}h,j,{k1−10...k1−1}



# Outputs



 # OP,{circumflex over (P)}



{circumflex over (P)} = 0



OP = Mh,jC(Ph,{k1−10...k1−1},Rh,{k1−10...k1−1})



if OP = 1



 {circumflex over (P)} = Mh,jE(Ph,{k1−10...k1−1},Rh,{k1−10...k1−1},{circumflex over (P)}h,j,{k1−10...k1−1})



end









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.












Alg. 3-Updates the Profile of the jth MNC appliance of house h















# Inputs


 # i, j, StPh,j , EndPh,j , OPh,j,{1...15} {circumflex over (P)}h,j,{1...15} , k


# Outputs


 # {circumflex over (P)}h,j,{k+1...k+PH}


k1 = (k−1)*15+1


[ StPbef , EndPbef , OP , P, P2]=LoadProfileMNC(h, j)


{circumflex over (P)}h,j,{k+1...k+PH} = 0


If ∃(OPh,j,{k...k}) ≠ 0


 Beg = 1


 BegP = StPh,j−k1+1


 StP = StPh,j


 If StPh,j = 0


   Beg = k1 − StPbef


   BegP=1;


   StP = StPbef


 end


 LastP = 15


 EndP = EndPbef


 If EndPh,j ≠ 0


   Last = EndPh,j −StPbef


   LastP= EndPh,j −k1


   EndP=EndPh,j


 end


  OP{Beg...Last} = OP{Beg...Last} + OPh,j,{BetP...LastP}


 P{Beg...Last} = P{Beg...Last} + Ph,j,{BetP...LastP}


 P2{Beg...Last} = P2{Beg...Last} + Ph,j,{BetP...LastP}·{circumflex over ( )}2


 SaveProfileMNC(h, j, StP , EndP , OP , P, P2)


 {circumflex over (P)}h,j,{k+1...k+m} ={mean(P{j...j}./ OP{j...j}),l=1...m}


end









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.


Forecasting of House h Manually Controlled Consumption Within the Prediction Horizon







P
^


h
,

{




k
+
1

...


k

+
PH

}


MC

=




m
=
1


#


(

{

MC
i

}

)






P
^


h
,
m
,

{




k
+
1

...


k

+
PH

}








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:








P
^


h
,
m
,

{




k
+
1

...


k

+
PH

}



=

RetrieveProfileMC

(

i
,
j
,
k

)















Alg. 4-Obtain the forecasting of the jth MC appliance


of house h

















# Inputs:



 # i, j, k



# Outputs



 # {circumflex over (P)}h,j,{k+1...k+PH}



[P]=LoadProfileMC(h, j)



kbeg = dayindex(k)



{circumflex over (P)}h,j,{k+1 k+PH} = [Pkbeg+1...96 P1...kbeg]









Forecasting of House h Computer-Controlled Consumption Within the Prediction Horizon







P
^


h
,

{




k
+
1

...


k

+
PH

}


CC

=




n
=
1


#


(

{

CC
i

}

)






P
^


h
,
n
,

{




k
+
1

...


k

+
PH

}








For this kind of appliances, the power can be obtained as for MC, or using other formulations, which are appliance specific.








P
^


h
,
m
,

{




k
+
1

...


k

+
PH

}



=

RetrieveProfileCC

(

h
,
m
,
k

)





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:










PV

h
,

{




k
+
1

...


k

+
36

}



=

{



M
h
PV

(



P
_




V
_


h
,
l



,


T
_

l

,


R
_

l


)

,

l
=

k
+

1





k

+
36



}





(
13
)







Where R denotes global solar radiation. This way, we need an additional forecasting model to determine the forecasts of solar radiation over PH.










R

{




k
+
1

...


k

+
36

}


=

{



M
R

(


R
_

l

)

,

l
=

k
+

1





k

+
36



}





(
14
)







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:











min



C
^

Com


=


min





h
=
1

Nh






s
=
1

PH




(



P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-



)



π
l

Grid
-



Δ

k




-


(



P
^


h
,
l


Grid
+


+


P
^


h
,
l


Com
+



)



π
l

Grid
+



Δ

k



,

l
=

k
+
s






(
15
)







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:









0



P
^


h
,
l


Grid
+






P
_

h

Grid
+


(

1
-

v

h
,
l

Grid


)





(
16
)












0



P
^


h
,
l


Grid
-






P
_

h

Grid
-




v

h
,
l

Grid






(
17
)







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.









0



P
^


h
,
l


Com
+






P
_

h

Com
+


(

1
-

v

h
,
l

Com


)





(
18
)












0



P
^


h
,
l


Com
-






P
_

h

Com
-




v

h
,
l

Com






(
19
)







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 PhCom+/PhCom− by house h. vh,lCom is the binary variable modelling the processes of selling/purchasing energy from house h to/from the community, assuming value 1 if selling or 0 if purchasing.


The energy balance can be given as:













h
=
1

Nh



P
^


k
,
l


Com
-



=




h
=
1

Nh



P
^


k
,
l


Com
+







(
20
)







It is not allowed to buy energy from the grid and sell energy to the community at the same time:











v

h
,
l

Grid

+

v

h
,
l

Com



1




(
21
)







10.1−Energy balance


Without Restrictions on the Transfer of Energy Within the Community

The energy balance of house h at instant k is:












P
^


h
,
l

PV

+


P
^


h
,
l


B
+


+


P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-



=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC

+


P
^


h
,
l


Com
+







(
22
)







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:

    • a) related to devices (NMC) that are not monitored (NM) neither controlled (NC).
    • b) related to devices that are monitored (M) but not controlled (NC).
    • c) related to devices that are manually controlled (MC).
    • d) related to devices that are computer controlled (CC).










P

h
,
k


=






j
=
1


#


(


{

NM
i

}



{

NC
i

}


)





P

h
,
j
,
k



+




l
=
1


#


(


{

M
i

}



{

NC
i

}


)





P

h
,
l
,
k



+




m
=
1


#


(

{

MC
i

}

)





P

h
,
m
,
k



+




n
=
1


#


(

{

CC
i

}

)





P

h
,
n
,
k




=


P

h
,
k

NMC

+

P

h
,
k

NC

+

P

h
,
k

MC

+

P

h
,
k

CC







(
23
)







Equation (22) is valid when it is possible to transfer energy between houses, without any restrictions. Several alternatives exist:


When There is No Transfer of Energy Between the Houses










P
^


h
,
l


Com
-


=



P
^


h
,
l


Com
+


=

0







(
24
)














P
^


h
,
l

PV

+


P
^


h
,
l


B
+


+


P
^


h
,
l


Grid
-




=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC






In this case it is still possible to use the MILP-MPC formulation for each house individually.


Energy is Shared Between Houses, Using Energy Sharing Coefficients










P
^


h
,
l


Com
+


=



P
^


h
,
l

PV







(
25
)














P
^


h
,
l


B
+


+


P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-




=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC














P
^


h
,
l


Com
-


=


β

h
,
l







h
=
1

Nh




P
^


h
,
l

PV




,





(
26
)















h
=
1

Nh


β

h
,
l



=
1

,






l
=

1



PH





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.










β

h
,
l


=

{






FC

h
,
l




[

0
,
1

]


;
Fixed








VC

h
,
l




[

0
,
1

]


;
Variable









P
^


h
,
l






l
=
1

Nh




P
^


h
,
l




;

Consumption
-
based










FC

h
,
l





P
^


h
,
l







l
=
1

Nh




FC

h
,
l





P
^


h
,
l





;
Hybrid









(
27
)







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)


Battery Bank

There is a series of restrictions related with the battery bank of house h at instant l:









0



P
^


k
,
l


B
-






P
_

h

B
-




v

h
,
l

B






(
28
)












0



P
^


k
,
l


B
+






P
_

h

B
+


(

1
-

v

h
,
l

B


)






(
29
)














SoC

h
,
l


=


SoC

h
,

l
-
1



+




η
h

B
-





P
^


h
,
l


B
-





E
_

h
B



Δ

k

-




P
^


h
,
l


B
+





E
_

h
B



η
h

B
+





Δ

k






(
30
)














SoC
h

_



SoC

h
,
l





SoC
h

_






(
31
)














SoC

h
,
0


=

SoC

h
,
initial






(
32
)














v

h
,
l

B

+

v

h
,
l

Grid



1





(
33
)
















P
^


h
,
k


B
+


-


P
^


h
,

k
-
1



B
+





RU
h





(
34
)















P
^


h
,
k


B
-


-


P
^


h
,

k
-
1



B
-





RU
h





(
35
)















P
^


h
,

k
-
1



B
+


-


P
^


h
,
k


B
+





RD
h





(
36
)















P
^


h
,

k
-
1



B
-


-


P
^


h
,
k


B
-





RD
h





(
37
)







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 PhB−/PhB+ of the battery bank of house h. vh,lB is the binary variable modelling the processes of charge/discharge of battery bank of house h, assuming value 1 if charging or 0 if discharging. The minimum/maximum values of the state of charge of the battery bank, SoCh/SoCh are defined in (31). The initial state of charge for each, SoCh,initial is defined in (32). In (33) it is stated that the binary variables vh,lB and. vh,lGrid cannot assume the value 1 simultaneously, meaning that the battery cannot be charged directly with energy from the grid. To decrease the battery wear, in (34-35) maximum values of the ramp-up/ramp down rates RU/RD for charging or discharging of the battery bank are defined.


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.


Swimming Pool Pump

This is an example of a shiftable load, that must obey the following assumptions:

    • the pump must operate during a user-specified time (multiple of Ts) within one day—NTspp
    • it must remain on at least for a specified period of time (multiple of Δk)—Nmspp
    • The power consumption is constant and equal to the rated power—Pi,spp













j
=
k


k
+

N
mspp

-
1




v

h
,
j


spp
-

on
/
off







N
Tspp



v

h
,
k


spp
-
start







(
38
)













P

i
,
spp
,
k


=



P
_


i
,
spp




v

h
,
k


spp
-

on
/
off








(
39
)
















j
=
1

K



P

i
,
spp
,
j



=



P
_


i
,
spp




N
Tspp






(
40
)














v

h
,
k


spp
-
start


-

v

h
,
k


spp
-
shutdown



=


v

h
,
k


spp
-

on
/
off



-

v

h
,

k
-
1



spp
-

on
/
off









(
41
)















v

h
,
k


spp
-
start


+

v

h
,
k


spp
-
shutdown




1




(
42
)







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.


Air Conditioner

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:














(

t
<

t
s


)

^

(

t
>


t
s

-

Δ

t



)






min


U
[
k
]



v
PH



(




i
=

k
+
1



k
s




J
[
i
]


)




"\[RightBracketingBar]"



U
[
k
]


+





min


U
[
k
]



v
PH



(




i
=


k
s

+
1



k
+
PH




J
[
i
]


)



"\[RightBracketingBar]"



U
[
k
]





s
.
t
.



"\[LeftBracketingBar]"



Θ
^

[
i
]



"\[RightBracketingBar]"



<

Θ
T


,

i
=

1
:
PH








(
43
)













t
+
PH

>

t
e









min


U
[
k
]



v
PH



(




i
=

k
+
1



k
e




J
[
i
]


)



"\[RightBracketingBar]"



U
[
k
]





s
.
t
.



"\[LeftBracketingBar]"



Θ
^

[
i
]



"\[RightBracketingBar]"



<

Θ
T


,

i
=

1
:
PH














others







min


U
[
k
]



v
PH



(




i
=

k
+
1



k
+
PH




J
[
i
]


)



"\[RightBracketingBar]"



U
[
k
]





s
.
t
.



"\[LeftBracketingBar]"



Θ
^

[
i
]



"\[RightBracketingBar]"



<

Θ
T


,

i
=

1
:
PH










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:










P

h
,
AC
,
k


=



J
^


h
,
AC
,
k




v

h
,
k


AC
-

on
/
off








(
44
)







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].


Design of Classification or Forecasting Models (EXAMPLE)

Hereinafter it is described how good models can be obtained from a set of acquired or existent data.


Three sub-problems must be solved:

    • a) A pre-processing stage where, from the existing data, suitable sets (training, testing, validation, etc.) are obtained; this is known as a data selection problem;
    • b) Determine the “best” set of inputs (feature/delays selection) and network topology, given the above data sets;
    • c) Determine the “best” network parameters, given the data sets, inputs/delays and network topology


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.


ApproxHull

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:










ds

(

x
,
H

)

=




a
1



x
1


+

+


a
d



v
d


+
b




a
1
2

+




a
d
n









(
45
)







where n=[a1, . . . ad]T and d are the normal vector and the offset of H, respectively.


Given a set X={xi}i=1ncustom-character and a point x∈custom-character, 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:










min
a



(




a
T


Qa

2

-


c
T


a


)





(
46
)












s
.
t
.


e
T



a

=
1

,






a

0




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:










dc
(

x
,

conv

(
X
)


)

=




x
T


x

-

2


c
T


a
*

+
a


*
T

Qa
*







(
47
)







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 FIG. 6.


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.


MOGA

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.


Parameter Separability

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:











y
^

(


x
k

,
w

)

=



u
0

+




i
=
1

n




u
i




φ
i

(


x
k

,

v
i


)




=


φ

(


x
k

,
v

)


u






(
48
)







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:









w
=

[



u




v



]





(
49
)







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:










Ω

(

X
,
w

)

=





y
-


y
^

(

X
,
w

)




2
2

2





(
50
)







where ∥·∥2 denotes the Euclidean norm. Replacing (49) in (50), we have:










Ω

(

X
,
w

)

=





y
-


Γ

(

X
,
v

)


u




2
2

2





(
51
)







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:









u
*=



Γ
+

(

X
,
v

)


y





(
52
)







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:










Ψ

(

X
,
v

)

=





y
-


Γ

(

X
,
v

)




Γ
+

(

X
,
v

)


y




2
2

2





(
53
)







The advantages of using (53) instead of (51) are threefold:

    • It lowers the problem dimensionality, as the number of model parameters to determine is reduced;
    • The initial value of (53) is much smaller than (51);
    • Typically, the rate of convergence of gradient algorithms using (53) is faster than using (51).


Training Algorithm

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:











(



J
k
T



J
k


+


λ
k


I


)



p
k


=

-

g
k






(
54
)







Where gk is the gradient vector:










g
k

=



δΩ
k


δ


w
k





or




δΨ
k


δ


v
k








(
55
)







And Jk is the Jacobean matrix:










J
k

=



δ



y
^

k



δ


w
k





or




δ



y
^

k



δ


v
k








(
56
)







λ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.


Radial Basis Function Networks

In the case described here, RBF models will be employed. The basis functions employed by RBFs are typically Gaussian functions:











φ
i

(


x
k

,

v
i


)

=

e

-






x
k

-

c
i




2
2


2


σ
i
2









(
57
)







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:














φ
i

(

x
k

)





c

i
,
j




=



φ
i

(

x
k

)





x

k
,
j


-

c

i
,
j




σ
i
2







(
58
)

















φ
i

(

x
k

)





σ
i



=



φ
i

(

x
k

)








x
k

-

c
i




2
2


σ
i
3







(
59
)







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:









σ
=


z
max



2

b







(
60
)







where zmax represents the maximum distance between centres.


The Evolutionary Part

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:











y
^



k
+
1


k


=


f

(

z
k

)

=

f
(


y

k
-

d

0
1




,


,

y

k
-

d

0
n




,

x

k
-

d

i
1




,


,

x

k
-

d

i
m





)






(
61
)







Where ŷk+1|k denotes the prediction for time-step k+1 given the measured data at time k, and dij the/h delay for variable i. This represents the 1-step-ahead prediction within a prediction horizon. As we iterate (61) over PH, some or all of the indices in the right hand-side will be larger than k, which means that the corresponding forecast must be employed. What has been said for NARX models is also valid for NAR models (with no exogeneous inputs).


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 FIG. 7. In that figure, C denotes a chromosome and F the input space.


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 FIG. 8.


We shall refer the reader to publication [6] regarding the genetic operators.


The model design cycle is illustrated in FIG. 9.


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:










E

(

sim
,
PH

)

=

[




e
[

1
,
1

]




e
[

1
,
2

]







e
[

1
,
PH

]






e
[

2
,
1

]




e
[

2
,
2

]







e
[

2
,
PH

]




















e
[


p
-
ph

,
1

]




e
[


p
-
ph

,
2

]







e
[


p
-
ph

,
PH

]




]





(
62
)







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:











ρ
sim

(
PH
)

=




i
=
1

PH



ρ

(


E

(

sim
,
PH

)

,
i

)






(
63
)







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 FIG. 10 illustrates this situation for d=2. In the second strategy, the average of objective values for all training trails is calculated and then the trial whose value is the closest to the average value will be selected as the best one (i.e., symbol “x”—or nearest to average, in FIG. 10).


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 FIG. 10 are the best training trials which minimized objective 1 and objective 2, respectively.


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 FIG. 11, wherein the small dots represent all models, the larger dots in black represent non-dominated solutions and the large dot in white represents the chosen solution. In the graph shown in FIG. 11, εt represents an objective defined as the root mean square error obtained in the training set and εg represents an objective defined as the root mean square error obtained in the generalization training data set.


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.


Robust Model Ensemble

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:











y


(
·
)

=

median



(

{




y
^

i

(
·
)

,

i

outset


}

)






(
64
)







For a classification application, the output is given as:











y


(
·
)

=

majority_vote



(

{


step



(



y
^

i

(
·
)

)


,

i

outset


}

)






(
65
)







Where the step function is given as:










step
(
x
)

=

{




1
,




x

0







-
1

,




x
<
0









(
66
)







In certain embodiments of a first aspect, the invention relates to a computer implemented method for community energy management (1000), comprising the following steps:

    • a) acquisition, by an aggregator computational unit (110), of data d0 that will be used for designing prediction models and appliance profiles, during a period of time, preferably during at least one month;
    • b) design, using a cloud-based server (115) of Radial Basis Function prediction models to use for predicting selected from the group consisting of: global solar radiation and atmospheric air temperature of the community, power consumption and power generation in each house h of the community, as well as operation and power consumption for all monitored appliances by Non-Invasive Load Monitoring models, wherein said design comprises the following substeps:
      • b1) selection of the data available for design from the data d0 acquired in step a);
      • b2) minimization of the model objectives through a Multi-Objective Genetic Algorithm;
      • b3) analysis of the results of the first design, restricting some of the objectives minimized in step b2) and redefinition of the input space and/or the model topology;
      • b4) utilization of the preferential set of models obtained from a second Multi-Objective Genetic Algorithm execution;
      • b5) determination of a second set of the preferred models mepref obtained in the previous substep through the following equation:







m
e
pref

=


{


m
pref

:


nw

(

m
pref

)




m


nw
pref



}



{


m
pref

:


fore

(

m
pref

)




m


fore
pref



}








    • wherein mpref is the set of preferred models obtained in the second Multi-Objective Genetic Algorithm 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;
      • b6) obtaining of a third set of models, mepar from the previous step by using the following equation:











m
e
par

=

{



nd

(


fore
(

m
e
pref

)

,

nw

(

m
e
pref

)


)

:
#

nd

=
NS

}


,






    • wherein nd(.) stands for non-dominated solutions and NS is its number, preferably NS=25;
      • b7) if the model that should be designed is a Nonlinear Auto-Regressive model with Exogeneous inputs, usage, by the server of mepar for the exogenous variables;

    • c) determination of the power profiles for all monitored, manually controlled and computer-controlled appliances in the community, by the cloud-based server (115);

    • d) reception, by the aggregator computational unit (110), of all models designed in b), all power profiles determined in c), initial values v0 and initial control actions, through a user-interface, as well as data history for all models supplied by a data acquisition subsystem (140) installed in each house h, one or more consumption energy meters (130) installed in at least one house h, one or more inverter energy meters (160) installed in at least one house h, one or more sensors (150) installed in at least one house h;

    • e) reception, by a data acquisition subsystem (140), of data related to house h, wherein said data is sent wirelessly and/or wired and wherein said reception includes the following substeps:
      • e1) reception of electric consumption data di sent by a consumption energy meter (130) installed at each house h, wherein data d1 comprise active power being consumed in house h at all instants k1 within the sampling interval Δk, Ph,k1, and reactive power being consumed in house h at all instants k1 within the sampling interval Δk, Rh,k1;
      • e2) reception of data d2 related to at least one energy producing photovoltaic subsystem installed in at least one house h, sent by an inverter energy meter (160) wherein data d2 comprise the power generated by at least one energy producing photovoltaic subsystem of house h at an instant k, Ph,kPV; the power imported from the grid Ph,kGrid−, and the power exported to the grid Ph,kGrid+, wherein PV refers to photovoltaic;
      • e3) reception of data d3 related to at least one battery bank installed in at least one house h, sent by an inverter energy meter (160) wherein data d3 comprises at least the state of charge of the battery;

    • f) sending of the control actions determined in the previous step, by the aggregator computational unit (110) 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;

    • g) reception, by an aggregator computational unit (110), of the data d1, d2 and d3 related to house h at an instant k, sent by the data acquisition subsystem (140);

    • h) reception, by the aggregator computational unit (110), of weather data d4, related to the community, wherein said weather data d4 comprises air temperature data and global solar radiation data;

    • i) reception of tariff-related data ds of each house h in the community, wherein said data d5 is retrieved from a database (125) by the aggregator computational unit (110);

    • j) reception, by the aggregator computational unit (110), of occupation-related data d6 of each house h, inserted in a database by each user via a user interface (145);

    • k) determination of the averaged active power consumption of each house:











P

n
,
k


=


P

h
,

k
1



N


,


N
=


Δ

k


k
1



;







    • l) calculation of forecasts for a user-specified Prediction Horizon PH of both the energy consumption of each individual house h and the energy generation of each energy producing photovoltaic apparatus in the community over the prediction horizon, by using one or more of the methods of the group consisting of naive forecasting methods, multi-step Nonlinear Auto-Regressive Exogenous forecasting models, AutoRegressive Integrated Moving Average, ARIMA, Classification and Regression Trees, CART, Wavelet, Fuzzy or Neuro-Fuzzy models, and an hybrid combination thereof; wherein the present calculation step comprises the following substeps:
      • l1) calculation of forecasts of consumption for the devices in each house that are monitored and not controlled NMC, which is given as the sum of the active power of corresponding appliances in each house, given by:















P
^


h
,

{

k
+

1





k

+
PH

}


NMC

=




j
=
1


#


(


{

NM
i

}



{

NC
i

}


)





P
^


h
,
j
,

{

k
+

1





k

+
PH

}





;




(
I
)











      • for the devices in each house h that are monitored but not controlled NC by means of:
















P
^


h
,

{

k
+

1





k

+
PH

}


NMC

=



P
^


h
,

{

k
+

1





k

+

PH
NARX


}


NMC




P
^


h
,

{

k
+

PH
NARX

+

1





k

+
PH

}


NMC






(
II
)











      • wherein the first term in the right-hand-side of (II) refers to the use of the Nonlinear Auto-Regressive model with Exogeneous NARX model and the second term to the naïve forecast technique;

      • wherein PHNARX denotes the first steps within PH whose forecasts are obtained as the median of the outputs of the models mepref:

















P
^


h
,

{

k
+

1





k

+

PH
NARX


}


NMC

=

{



M
h
P

(



P
_


h
,
l

NMC

,


T
_

l

,

O

h
,
l


,

D
l


)

,

l
=

k
+

1





k

+

PH
NARX




}


;




(
III
)











      • wherein the second term is given as:
















P
^


h
,

{

k
+

PH
NARX

+

1





k

+
PH

}


NMC

=

P

h
,

{

k
+

PH
NARX

+
1
-


24

Δ

k







k

+
PH
-

24

Δ

k



}

,

NMC





(
IV
)











      • i.e., the value obtained one day ago;

      • wherein Ph,lNMC denotes a set of past values relative to l of Ph,lNMC, Tl denotes a set of past values relative to l of Tl Oh,l denotes the daily occupation relative to instant/of house h, and Dl corresponds to a codification of the day, within the week:

      • wherein as the multi-step iteration of (III) involves predictions of the atmospheric temperature, these forecasts will be given as a multi-step iteration of a NAR model:

















T
^


{

k
+

1





k

+

PH
NARX


}


=

{



M
T

(


T
_

l

)

,

l
=

k
+

1





k

+

PH
NARX




}


;




(
V
)









    • l2) calculation of forecasts of consumption for the devices in each house that are monitored but not controlled NC, which is given as the sum of the active power of corresponding appliances in each house, given by:















P
^


h
,

{

k
+

1





k

+
PH

}


NC

=




j
=
1


#


(


{

M
i

}



{

NC
i

}


)





P
^


h
,
j
,

{

k
+

1





k

+
PH

}





;




(
VI
)











      • wherein the forecasts of consumption of each device, {circumflex over (P)}h,j,{k+1 . . .k+PH}, are given by the joint application of Non-Invasive Load Monitoring NILM classification models configured to determine if the appliance is operating or is off for every instant in PH and, if the appliance is on, the estimate of consumption given by the NILM forecasting model, and the power profile of the appliance, determined offline and updated on-line;

      • l3) calculation of forecasts of consumption for the devices in each house that are manually controlled MC, which is given as the sum of the active power of corresponding appliances in each house, given by:

















P
^


h
,

{

k
+

1





k

+
PH

}


MC

=




m
=
1


#


(

{

MC
i

}

)





P
^


h
,
j
,

{

k
+

1





k

+
PH

}





;




(
VII
)











      • wherein the forecasts of consumption of each device














m
=
1


#


(

{

MC
i

}

)





P
^


h
,
m
,

{

k
+

1





k

+
PH

}











      • are obtained using the power profiles determined off-line;

      • l4) calculation of forecasts of consumption for the devices in each house that are computer controlled CC, which is given as the sum of the active power of corresponding appliances in each house, given by:

















P
^


h
,

{

k
+

1





k

+
PH

}


CC

=




n
=
1


#


(

{

CC
i

}

)





P
^


h
,
n
,

{

k
+

1





k

+
PH

}





;




(
VIII
)











      • wherein the operation of each appliance is given as the solution of the Mixed-Integer Linear Programming MILP problem carried out in step m), and whose consumption estimation can be given using the power profiles determined off-line;

      • l5) calculation of forecasts of photovoltaic power generation by means of a combination of the naive forecasting method and multi-step Nonlinear Auto-Regressive Exogenous NARX forecasting models for each energy generation photovoltaic subsystem in each house h comprising an energy generation photovoltaic subsystem; the NARX forecasts are given by:
















PV

h
,

{

k
+

1





k

+

PH
NARX


}



=

{



M
h
PV

(



P
_




V
_


h
,
l



,



T
_

l





,
R

_

l



)

,

l
=

k
+

1





k

+

PH
NARX




}


;




(
IX
)







wherein R denotes global solar radiation,


wherein an additional forecasting model is needed for solar radiation over PH, to determine its evolution is used:












R

{

k
+

1





k

+
36

}


=


M
R

(


R
l

_

)


,

l
=

k
+

1





k

+
36



}




(
X
)









    • m) formulation, by the aggregator computational unit (110), of a Mixed-Integer Linear Programming problem as indicated in formula (XI) below














min




C
^

Com


=


min






h
=
1

Nh






s
=
1

PH



(




P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-



)



π
l

Grid
-



Δ

k




-


(




P
^


h
,
l


Grid
+


+


P
^


h
,
l


Com
+



)



π
l

Grid
+



Δ

k



,

l
=

k
+
s






(
XI
)











      • wherein

      • Nh denotes the number of houses in the community;

      • PH is a prediction horizon, and

      • Δk is the sampling interval;

      • {circumflex over (P)}h,lGrid−/{circumflex over (P)}h,lGrid+ are estimates of the active power P bought−/sold+ from/to an electrical energy grid at a sampling instant/by house h in the community;

      • {circumflex over (P)}h,lCom−/{circumflex over (P)}h,lCom+ are estimates of the active power P bought−/sold+ from/to the community at the sampling instant/by house h;

      • πlGrid−lGrid + are the price of the energy bought-/sold+from/to the community or the electrical energy grid at the sampling instant I;

      • wherein the following constraints (XII) and (XIII) related to the electrical energy grid are satisfied:














0




P
^


h
,
l


Grid
+







P
_

h

Grid
+


(

1
-

v

h
,
l

Grid


)





(
XII
)













0




P
^


h
,
l


Grid
-







P
_

h

Grid
-




v

h
,
l

Grid



;




(
XIII
)











      • wherein

      • {circumflex over (P)}h,lGrid+/{circumflex over (P)}h,lGrid− are positive variables with a maximum value equal to the contracted power form the electrical energy grid, PhGrid+/PhGrid− by house h,

      • wherein vh,lGrid is the binary variable modelling the selling/purchasing energy from house h to/from the electrical energy grid, assuming 1 for purchasing and 0 for selling; and wherein the following constraints (XIV) and (XV) related to the community are satisfied:














0




P
^


h
,
l


Com
+







P
_

h

Com
+


(

1
-

v

h
,
l

Com


)





(
XIV
)












0




P
^


h
,
l


Com
-







P
_

h

Com
-




v

h
,
l

Com






(
XV
)











      • wherein


      • P
        h,l
        Com+/Ph,lCom− are positive variables with a maximum value equal to the maximum value exchangeable with the community, Ph,l Com+/PhCom − by house h, wherein vh,lCom is the binary variable modelling the selling/purchasing energy from house h to/from the community, assuming 1 for selling and 0 for purchasing, and considering that it is not allowed to buy energy form the grid and sell energy to the community at the same time: vh,lGrid+vh,lCom≤1;

      • wherein the energy balance of the community is given as (XVI):



















h
=
1

Nh



P
^


k
,
l


Com
-



=




h
=
1

Nh



P
^


k
,
l


Com
+




;




(
XVI
)











      • wherein the energy balance of house h in the community can be obtained by several ways, selected by the community:

      • m1) if there are no restrictions on the transfer of energy between the community, the energy balance of house h is given by the equality restriction:

















P
^


h
,
l

PV

+


P
^


h
,
l


B
+


+


P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-



=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC

+


P
^


h
,
l


Com
+







(
XVII
)











      • wherein {circumflex over (P)}h,lPV is the estimate of the alternate current power generated by the PV installation of house h at instant I; wherein {circumflex over (P)}h,lB+/{circumflex over (P)}h,lB− is the estimate of the discharged or charged power of the battery bank of house h at instant I;

      • wherein the {circumflex over (P)}h/lNMC term relates to the estimate of the active power of house h being consumed at instant I by devices that are not monitored neither controlled, the {circumflex over (P)}h,lNC term relates to the estimate of the active power of house h being consumed at instant/by devices that are monitored but not controlled, the {circumflex over (P)}h/lMC term relates to the estimate of the active power of house h being consumed at instant/by devices manually controlled, and the PCC term relates to the estimate of the active power of house h being consumed at instant/by devices that are computer controlled;

      • m2) energy balance of house h (VIII) in the community, if it is not allowed the transfer of energy between the community, is given by the equality restriction:



















P
^


h
,
l


Com
-


=


P

h
,
l


Com
+


=

0














P
^


h
,
l

PV


+


P
^


h
,
l


B
+


+


P
^


h
,
l


Grid
-



=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC









(
XVIII
)











      • m3) wherein the energy is shared between the houses using energy sharing coefficients Bh, as shown in the formulas (XIX) e (XX):



















P
^


h
,
l


Com
+


=



P
^


h
,
l

PV














P
^


h
,
l


B
+



+


P
^


h
,
l


Grid
-


+


P
^


h
,
l


Com
-



=



P
^


h
,
l


B
-


+


P
^


h
,
l


Grid
+


+


P
^


h
,
l

NMC

+


P
^


h
,
l

NC

+


P
^


h
,
l

MC

+


P
^


h
,
l

CC









(
XIX
)


















P
^


h
,
l


Com
-


=


β

h
,
l







h
=
1

Nh



P
^


h
,
l

PV




,









h
=
1

Nh


β

h
,
l



=
1

,

l
=

1





PH


,







(
XX
)











      • wherein said coefficients follow one of the following different alternatives (XXI):















β

h
,
l


=

{







FC

h
,
l




[

0
,
1

]


;

Fixed








VC

h
,
l




[

0
,
1

]


;

Variable









P
^


h
,
l






h
=
1

Nh



P
^


h
,
l




;

Consumption
-
based










FC

h
,
l





P
^


h
,
l







l
=
1

Nh



FC

h
,
l





P
^


h
,
l





;

Hybrid




;






(
XXI
)











      • wherein FCh,l represent fixed coefficients, and VCh,l variable coefficients which are obtained through an optimization problem;



    • n) solution, by the aggregator computational unit (110), of the problem formulated in step m), using the receding horizon principle, wherein said solution includes the determination of all control actions, for the whole prediction horizon PH, but where only the ones calculated for the first step within PH will be sent to the corresponding data-acquisition systems (140), in step f);

    • o) update of the history for every model used;


      wherein steps e) through o) are repeated every sampling interval Δk.





In other embodiments of the first aspect of the present invention, data do acquired in step a) is selected from the group consisting of:

    • tws, time basis for weather data;
    • R, global Solar Radiation;
    • T, atmospheric air temperature; and, for every house h:
    • tCons, time basis for consumption data;
    • Ph, active power of house h;
    • Rh, reactive power of house h,
    • tInv, time basis for inverter data;
    • {PhPV}, alternate power generated by the PV installation of house h,
    • {Oh}, daily occupation of house h; and, for every house h that has manually controlled appliances:
    • StPh,j/EndPh,j, j∈{MCh}, start/end times of the operation of all manually controlled appliances of house h;
    • {Ph,j, j∈{MCh}}, active Power of all Manually Controlled appliances of house h;
    • tMCh, time basis for all Manually Controlled appliances of house h; and for every house h that has Computer Controlled Appliances that are not air conditioning systems:
    • {Uh,j, j∈{CCh}} control actions for all appliances of house h to be computer controlled;
    • {Ph,j, j∈{CCh}}, active power of all appliances of house h to be Computer Controlled;
    • tcCh, Time basis for all Computer Controlled appliances of house h; and for every house h that has Computer Controlled air conditioning systems:
    • {IThroom, room∈{ACh}}, Air temperature for all air conditioning systems of house h to be Computer Controlled;
    • {RHhroom, room∈{ACh}}, Relative humidity for all air conditioning systems of house h to be Computer Controlled;
    • {WThroom, room∈{ACh}} Wall temperature for all air conditioning systems of house h to be Computer Controlled;
    • {Phroom, room∈{ACh}}, Active Power for all air conditioning systems of house h to be Computer Controlled;
    • {Uhroom, room∈{ACh}}, Control Actions for all air conditioning systems of house h to be Computer Controlled;
    • tAch, Time basis for all air conditioning systems of house h to be Computer Controlled; and for every house h that has Monitored but not Controlled appliances:
    • {StPh,j/EndPh,j, j∈{Mh}}, Start/end times of the operation of all Monitored appliances of house h;
    • {Ph,j, j∈{Mh}}, Active Power of all Monitored appliances of house h;
    • tMh—Time basis for all Monitored appliances of house h.


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:

    • PhGrid−/PhGrid+ contracted bought(−)/sold(+) power from/to an electrical energy grid by each house h; and for all houses with a photovoltaic energy generation subsystem and battery:
    • PhB −/PhB+ maximum discharged/charged power of a battery bank of at least one house h;
    • SOCh,SoCh minimum/maximum value of the state of charge of a battery bank of a house h;
    • SoCh,initial initial state of charge of a battery bank of a house h;
    • RUh/RDh maximum values of ramp-up/ramp down rates for charging or discharging of a battery bank of a house h;
    • ηhB−hB+ charging/discharging efficiency of a battery bank of a house h;
    • ĒhB rated capacity of a battery bank of a house h; and, for all houses with computer-controlled air conditioning systems:
    • ts start time when a room must be in thermal comfort;
    • te end time when a room must be in thermal comfort;
    • Δt time interval before the start of the schedule when an air conditioning system needs to operate to ensure thermal comfort throughout a whole period;
    • ΘT predicted mean value threshold.


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:

    • h4) reception of data d7 related to climate information about at least one room in at least one house in the community, sent by at least one sensor (150), wherein the at least one sensor (150) is electrically powered; and wherein substep h4) is carried out within step h).


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:

    • a source of weather-related data d4 wherein such data d4 is at least one of the group consisting of air temperature, relative humidity, global solar radiation;
    • an aggregator computational unit (110) for community energy management system comprising:
      • a communication unit (11), configured to communicate with one or more data acquisition systems (140), one or more consumption energy meter (130), one or more inverter energy meter (160), one or more sensors (150), one or more smart plugs (210);
      • a processing unit (12);
      • a data storage unit (13), configured to store data before, during or after processing by the processing unit (12);
    • at least one energy generation photovoltaic subsystem, comprised of photovoltaic panels and one inverter;
    • at least one battery bank (170), configured to store energy produced by the at least one energy generation photovoltaic subsystem;
    • at least one data acquisition subsystem (140) installed in each house h of the community;
    • at least one consumption energy meter (130) configured to measure the energy consumption at each house h;
    • at least one inverter energy meter (160) configured to measure the energy produced at each house h;
    • at least one smart plug (180), configured to switch on and off electrical equipment connected thereof;
    • at least one cloud-based server (115);


      wherein the aggregator computational unit (110) is configured to carry out the method according to the first aspect of the invention.


In certain embodiments of the second aspect, the community energy management system (100) according to the invention further comprises:

    • one or more indoor sensors (150) configured to measure at least one quantity from the group consisting of air temperature, relative humidity, wall temperature.


Yet in certain embodiments of the second aspect, the community energy management system (100) according to the invention further comprises:

    • the source of weather-related data d4 is a weather station (120) configured to measure d4 wherein such data d4 is selected from the group consisting of air temperature, relative humidity, global solar radiation.


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.


DEFINITIONS

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.


REFERENCE SIGNS LIST






    • 11—communication unit


    • 12—processing unit


    • 13—data storage unit (memory, data base)


    • 100—system according to the invention


    • 110—aggregator computational unit


    • 115—cloud-based server


    • 120—weather station


    • 125—database (tariff-related data)


    • 130—consumption energy meter


    • 140—data acquisition subsystem


    • 145—user interface


    • 150—sensors


    • 160—inverter energy meter


    • 180—smart plug


    • 190—computer-controlled equipment


    • 1000—method according to the invention





CITATIONS LIST

In the following, the citations list is presented:


Patent Literature

CA2809011 A1, “Adaptative energy management system”, priority date Nov. 6, 2012, published May 6, 2014, MacMaster University, CA.


Non-Patent Literature





    • [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.

    • [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.

    • [3] Khosravani, H. R.; Ruano, A. E.; Ferreira, P. M. A convex hull-based data selection method for data driven models. Applied Soft Computing 2016, 47, 515-533, doi:10.1016/j.eswa.2016.06.028.

    • [4] Silva, S.; Ruano, A. The IMBPC HVAC system: Wireless Sensors and IoT Platform. IFAC-PapersOnLine 2018, 51 1-8, doi:https://doi.org/10.1016/j.ifacol.2018.06.227.

    • [5] Ruano, A. E.; Pesteh, S.; Silva, S.; Duarte, H.; Mestre, G.; Ferreira, P. M.; Khosravani, H. R.; Horta, R. The IMBPC HVAC system: A complete MBPC solution for existing HVAC systems. Energy Build. 2016, 120, 145-158, doi:10.1016/j.enbuild.2016.03.043.

    • [6] Ferreira, P.; Ruano, A. Evolutionary Multiobjective Neural Network Models Identification: Evolving Task-Optimised Models. In New Advances in Intelligent Signal Processing, Ruano, A., Várkonyi-Kóczy, A., Eds.; Studies in Computational Intelligence; Springer Berlin/Heidelberg: 2011; Volume 372, pp. 21-53.




Claims
  • 1. A computer implemented method for community energy management (1000), characterized in that the method comprises the following steps: a) acquisition, by an aggregator computational unit (110), of data d0 that will be used for designing prediction models and appliance profiles, during a period of time, preferably during at least one month;b) design, using a cloud-based server (115) of Radial Basis Function prediction models to use for predicting selected from the group consisting of: global solar radiation and atmospheric air temperature of the community, power consumption and power generation in each house h of the community, as well as operation and power consumption for all monitored appliances by Non-Invasive Load Monitoring models, wherein said design comprises the following substeps: b1) selection of the data available for design from the data do acquired in step a);b2) minimization of the model objectives through a Multi-Objective Genetic Algorithm;b3) analysis of the results of the first design, restricting some of the objectives minimized in step b2) and redefinition of the input space and/or the model topology;b4) utilization of the preferential set of models obtained from a second Multi-Objective Genetic Algorithm execution;b5) determination of a second set of the preferred models mepref obtained in the previous substep through the following equation:
  • 2. The computer implemented method for community energy management (1000) according to claim 1, characterized in that data d0 acquired in step a) is selected from the group consisting of: tws, time basis for weather data;R, global Solar Radiation;T, atmospheric air temperature; and, for every house h:tCons, time basis for consumption data;Ph, active power of house h;Rh, reactive power of house h,tInv, time basis for inverter data;{PhPV}, alternate power generated by the PV installation of house h,{Oh}, daily occupation of house h; and, for every house h that has manually controlled appliances:StPh,j/EndPh,j, j∈{MCh}, start/end times of the operation of all manually controlled appliances of house h;{Ph,j, j∈{MCh}}, active Power of all Manually Controlled appliances of house h;tMCh, time basis for all Manually Controlled appliances of house h; and for every house h that has Computer Controlled Appliances that are not air conditioning systems:{Uh,j, j∈{CCh}} control actions for all appliances of house h to be computer controlled;{Ph,j, j∈{CCh}}, active power of all appliances of house h to be Computer Controlled;tcCh, Time basis for all Computer Controlled appliances of house h; and for every house h that has Computer Controlled air conditioning systems:{IThroom, room∈{ACh}}, Air temperature for all air conditioning systems of house h to be Computer Controlled;{RHhroom, room∈{ACh}}, Relative humidity for all air conditioning systems of house h to be Computer Controlled;{WThroom, room∈{ACh}} Wall temperature for all air conditioning systems of house h to be Computer Controlled;{Phroom, room∈{ACh}}, Active Power for all air conditioning systems of house h to be Computer Controlled;{Uhroom, room∈{ACh}}, Control Actions for all air conditioning systems of house h to be Computer Controlled;tAch, Time basis for all air conditioning systems of house h to be Computer Controlled; and for every house h that has Monitored but not Controlled appliances:{StPh,j/EndPh,j, j∈{Mh}}, Start/end times of the operation of all Monitored appliances of house h;{Ph,j, j∈{Mh}}, Active Power of all Monitored appliances of house h;tMh—Time basis for all Monitored appliances of house h.
  • 3. The computer implemented method for community energy management (1000) according to claim 1, characterized in that 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: PhGrid−/PhGrid + contracted bought(−)/sold(+) power from/to an electrical energy grid by each house h; and for all houses with a photovoltaic energy generation subsystem and battery:PhB−/PhB+ maximum discharged/charged power of a battery bank of at least one house h;SoCh/SoCh minimum/maximum value of the state of charge of a battery bank of a house h;SOCh,initial initial state of charge of a battery bank of a house h;RUh/RDh maximum values of ramp-up/ramp down rates for charging or discharging of a battery bank of a house h;ηhB−/ηhB+ charging/discharging efficiency of a battery bank of a house h;ĒhB rated capacity of a battery bank of a house h; and, for all houses with computer-controlled air conditioning systems:ts start time when a room must be in thermal comfort;te end time when a room must be in thermal comfort;Δt time interval before the start of the schedule when an air conditioning system needs to operate to ensure thermal comfort throughout a whole period;ΘT predicted mean value threshold.
  • 4. The computer implemented method for community energy management (1000) according to claim 1, characterized in that 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.
  • 5. The computer implemented method for community energy management (1000) according to claim 1, characterized in that weather data d4 is retrieved from a weather database and/or data d4 is sent by a weather station (120).
  • 6. The computer implemented method for community energy management (1000) according to claim 1, characterized in that the method further comprises the following substep: h4) reception of data d7 related to climate information about at least one room in at least one house in the community, sent by at least one sensor (150), wherein the at least one sensor (150) is electrically powered; andwherein substep h4) is carried out within step h).
  • 7. The computer implemented method for community energy management (1000) according to claim 1, characterized in that 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.
  • 8. The computer implemented method for community energy management (1000) according to claim 1, characterized in that 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).
  • 9. A community energy management system (100) comprising: a source of weather-related data d4 wherein such data d4 is at least one of the group consisting of air temperature, relative humidity, global solar radiation;an aggregator computational unit (110) for community energy management system comprising: a communication unit (11), configured to communicate with one or more data acquisition systems (140), one or more consumption energy meter (130), one or more inverter energy meter (160), one or more sensors (150), one or more smart plugs (210);a processing unit (12);a data storage unit (13), configured to store data before, during or after processing by the processing unit (12);at least one energy generation photovoltaic subsystem, comprised of photovoltaic panels and one inverter;at least one battery bank (170), configured to store energy produced by the at least one energy generation photovoltaic subsystem;at least one data acquisition subsystem (140) installed in each house h of the community;at least one consumption energy meter (130) configured to measure the energy consumption at each house h;at least one inverter energy meter (160) configured to measure the energy produced at each house h;at least one smart plug (180), configured to switch on and off electrical equipment connected thereof;at least one cloud-based server (115);
  • 10. The community energy management system (100) according to claim 9 characterized in that it further comprises: one or more indoor sensors (150) configured to measure at least one quantity from the group consisting of air temperature, relative humidity, wall temperature.
  • 11. The community energy management system (100) according to claim 9, characterized in that it further comprises: the source of weather-related data d4 is a weather station (120) configured to measure d4 wherein such data d4 is selected from the group consisting of air temperature, relative humidity, global solar radiation.
  • 12. The community energy management system (100) according to claim 9, characterized in that the aggregator computational unit (110) is selected from the group consisting of a server, a desktop computer, a laptop computer, or a combination thereof.
  • 13. A computer program product characterized in that it comprises logic instructions which, when executed by a computer of a community energy management system (100), cause the computer to carry out the method of claim 1.
  • 14. A computer-readable storage medium characterized in that it comprises instructions which, when executed by a computer of the community energy management system (100), cause the computer to carry out the method of claim 1.
Priority Claims (1)
Number Date Country Kind
118847 Jul 2023 PT national