https://wiki.hevs.ch/agreflex/api.php5?action=feedcontributions&user=Jaq&feedformat=atomagreflex - User contributions [en]2024-03-28T23:56:10ZUser contributionsMediaWiki 1.18.1https://wiki.hevs.ch/agreflex/index.php5/Main_PageMain Page2014-04-07T15:12:20Z<p>Jaq: </p>
<hr />
<div>= Welcome to the Wiki of the Project Agreflex =<br />
{{TOC right}}<br />
[[File:hesso_logo.png|left|200px|HESSO Valais Wallis Logo|link=http://www.hevs.ch]] This is the knowledge database of the project Agreflex. <br />
<br />
Find more information about our technical and educational program in the [http://wiki.hevs.ch/uit UIT Wiki] or [http://wiki.hevs.ch/fsi FSI Wiki].<br />
<br />
<br />
[[File:Icontexto-inside-rss.png|link=Help:http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss|48px]] [http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss Get informed about all changes to this wiki by signing up to this RSS feed]<br />
<br />
= Administration =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex.pdf|Project proposal]]'''<br />
* '''[[Meetings]]'''<br />
<br />
= Preliminary Study =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex_EtudePreliminaire_Gabioud.pdf|Report]]'''<br />
* '''[[media:AgreflexPreliminary1.0.pdf|Presentation]]'''<br />
<br />
= Introduction =<br />
<br />
== Contexte ==<br />
Aujourd’hui, les électriciens considèrent la consommation d’énergie électrique comme une grandeur non asservie, qu’il s’agit de prévoir de la manière la plus exacte possible, de manière à planifier au mieux la production.<br />
Le projet Agreflex part d’une autre hypothèse : la part de la consommation de courant électrique flexible doit être pilotée au même titre que sont pilotées aujourd’hui les centrales de production flexibles.<br />
<br />
== Survol des Work Packages ==<br />
Agreflex aborde cette problématique à plusieurs niveaux :<br />
* Dans le WP1, il s’agit de qualifier et de quantifier la contribution de la gestion des charges flexibles aux besoins de stockage induits par le remplacement de la production nucléaire en Suisse par des nouvelles énergies renouvelables.<br />
* Dans les WP2 un simulateur permettant de définir des systèmes avec des unités de production et de consommation de différents types (éventuellement flexibles et pilotables) et, de faire « tourner » ces systèmes pendant une certaine période d’analyse et d’évaluer les résultats.<br />
* Le WP3 a pour objectif de concevoir des algorithmes de contrôle des charges flexibles, algorithmes qui seront évalués avec le simulateur.<br />
* Le WP4 traite des aspects techniques, réglementaires et économiques relatifs au déploiement de systèmes de gestion de la charge.<br />
* Des mesures sont effectuées dans WP5, essentiellement pour caler les modèles du simulateur et/ou pour vérifier les performances des algorithmes de contrôle.<br />
Le présent document s’inscrit dans le cadre du WP2 et concerne le simulateur à développer. Il s’agit d’un document liminaire, sur lequel la spécification du simulateur devrait se baser.<br />
<br />
== Attentes des sponsors du projet ==<br />
Le projet est financé par la fondation EOS Holding, à travers un comité dans lequel sont représentés les principaux électriciens romands.<br />
Ces électriciens attendent les réponses suivantes :<br />
* Est-ce que la gestion de la charge a le potentiel d’apporter une contribution significative aux besoins de stockage induits par la transition énergétique ? Le WP1 devrait apporter une première réponse à cette question.<br />
* (On suppose une réponse positive à la première question). Comment exploiter le potentiel de la gestion de la charge ? Une réponse à cette question doit être apportée à deux niveaux :<br />
** Au niveau algorithmique, il s’agit d’élaborer quelques stratégies de gestion de la charge et de vérifier par simulation leur performance (WP2 et WP3, calage des modèles de simulation dans WP5).<br />
** Au niveau du déploiement, il s’agit de mettre en évidence les éléments réglementaires, techniques et économiques nécessaires (WP4).<br />
<br />
= Technical Content =<br />
* '''[[Switzerland: Nuclear power replaced by renewables]]''': Estimation of storage needs and possible contribution of Demand Side Management / Demand Response (''WP1: Jean-françois Affolter'')<br />
<br />
* '''[[Elements modelling]]''': Physical models for category of elements for the simulator (''WP2: Thierry Robert'')<br />
<br />
* '''[[Simulator design]]''': Design of a framework for the definition of the simulated system and of control strategies and for the execution of simulation scenarios (''WP3 Simulator Design: Dominique Gabioud'')<br />
** '''[[Power flow computation]]''': Power flow computation in an electric power network (theoretical basis for the simulator)<br />
<br />
* '''[[Optimisation strategies]]''': Design of distributed optimisation algorithms (''WP3 Algorithms: Guido Bologna & Paul Albuquerque'')<br />
<br />
* '''[[Mathematical aspects of optimization]]''': Communication line between central and local controllers (''WP3 Simulator Design: Philippe Jacquod & Dominique Gabioud'')<br />
<br />
* '''[[Simulated scenarios and their assessment]]''': Simulation scenarios results with performance assessment (''WP3'')<br />
<br />
* '''[[Considerations on deployment]]''': Regulatory, economical and technical considerations on the deployment of demand side management / demand response systems (''WP4: Patrick Favre-Perrod'')<br />
<br />
* '''[[Services for system operators and suppliers]]''': Elaboration of a "joystick" for system operators and / or suppliers (''WP4'')<br />
<br />
* '''[[On-site measurement]]''': Validation of key points through on-site measurement (''WP5'')<br />
* '''[[External Links]]'''<br />
<br />
= Getting started =<br />
Use the ''Navigation'' to the left to enter the different sections or follow any of the following links:<br />
* [[Help:Contents|Help]]<br />
* [//meta.wikimedia.org/wiki/Help:Contents Wikimedia's Help]<br />
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]<br />
* [[Sandbox|Sandbox for test purposes]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Main_PageMain Page2014-04-07T15:11:33Z<p>Jaq: </p>
<hr />
<div>= Welcome to the Wiki of the Project Agreflex =<br />
{{TOC right}}<br />
[[File:hesso_logo.png|left|200px|HESSO Valais Wallis Logo|link=http://www.hevs.ch]] This is the knowledge database of the project Agreflex. <br />
<br />
Find more information about our technical and educational program in the [http://wiki.hevs.ch/uit UIT Wiki] or [http://wiki.hevs.ch/fsi FSI Wiki].<br />
<br />
<br />
[[File:Icontexto-inside-rss.png|link=Help:http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss|48px]] [http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss Get informed about all changes to this wiki by signing up to this RSS feed]<br />
<br />
= Administration =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex.pdf|Project proposal]]'''<br />
* '''[[Meetings]]'''<br />
<br />
= Preliminary Study =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex_EtudePreliminaire_Gabioud.pdf|Report]]'''<br />
* '''[[media:AgreflexPreliminary1.0.pdf|Presentation]]'''<br />
<br />
= Introduction =<br />
<br />
== Contexte ==<br />
Aujourd’hui, les électriciens considèrent la consommation d’énergie électrique comme une grandeur non asservie, qu’il s’agit de prévoir de la manière la plus exacte possible, de manière à planifier au mieux la production.<br />
Le projet Agreflex part d’une autre hypothèse : la part de la consommation de courant électrique flexible doit être pilotée au même titre que sont pilotées aujourd’hui les centrales de production flexibles.<br />
<br />
== Survol des Work Packages ==<br />
Agreflex aborde cette problématique à plusieurs niveaux :<br />
* Dans le WP1, il s’agit de qualifier et de quantifier la contribution de la gestion des charges flexibles aux besoins de stockage induits par le remplacement de la production nucléaire en Suisse par des nouvelles énergies renouvelables.<br />
* Dans les WP2 un simulateur permettant de définir des systèmes avec des unités de production et de consommation de différents types (éventuellement flexibles et pilotables) et, de faire « tourner » ces systèmes pendant une certaine période d’analyse et d’évaluer les résultats.<br />
* Le WP3 a pour objectif de concevoir des algorithmes de contrôle des charges flexibles, algorithmes qui seront évalués avec le simulateur.<br />
* Le WP4 traite des aspects techniques, réglementaires et économiques relatifs au déploiement de systèmes de gestion de la charge.<br />
* Des mesures sont effectuées dans WP5, essentiellement pour caler les modèles du simulateur et/ou pour vérifier les performances des algorithmes de contrôle.<br />
Le présent document s’inscrit dans le cadre du WP2 et concerne le simulateur à développer. Il s’agit d’un document liminaire, sur lequel la spécification du simulateur devrait se baser.<br />
<br />
== Attentes des sponsors du projet ==<br />
Le projet est financé par la fondation EOS Holding, à travers un comité dans lequel sont représentés les principaux électriciens romands.<br />
Ces électriciens attendent les réponses suivantes :<br />
* Est-ce que la gestion de la charge a le potentiel d’apporter une contribution significative aux besoins de stockage induits par la transition énergétique ? Le WP1 devrait apporter une première réponse à cette question.<br />
* (On suppose une réponse positive à la première question). Comment exploiter le potentiel de la gestion de la charge ? Une réponse à cette question doit être apportée à deux niveaux :<br />
** Au niveau algorithmique, il s’agit d’élaborer quelques stratégies de gestion de la charge et de vérifier par simulation leur performance (WP2 et WP3, calage des modèles de simulation dans WP5).<br />
** Au niveau du déploiement, il s’agit de mettre en évidence les éléments réglementaires, techniques et économiques nécessaires (WP4).<br />
<br />
= Technical Content =<br />
* '''[[Switzerland: Nuclear power replaced by renewables]]''': Estimation of storage needs and possible contribution of Demand Side Management / Demand Response (''WP1: Jean-françois Affolter'')<br />
<br />
* '''[[Elements modelling]]''': Physical models for category of elements for the simulator (''WP2: Thierry Robert'')<br />
<br />
* '''[[Simulator design]]''': Design of a framework for the definition of the simulated system and of control strategies and for the execution of simulation scenarios (''WP3 Simulator Design: Dominique Gabioud'')<br />
** '''[[Power flow computation]]''': Power flow computation in an electric power network (theoretical basis for the simulator)<br />
<br />
* '''[[Optimisation strategies]]''': Design of distributed optimisation algorithms (''WP3 Algorithms: Guido Bologna & Paul Albuquerque'')<br />
<br />
* '''[[Mathematical aspects of noninvasive demand-side management]]''': Communication line between central and local controllers (''WP3 Simulator Design: Philippe Jacquod & Dominique Gabioud'')<br />
<br />
* '''[[Simulated scenarios and their assessment]]''': Simulation scenarios results with performance assessment (''WP3'')<br />
<br />
* '''[[Considerations on deployment]]''': Regulatory, economical and technical considerations on the deployment of demand side management / demand response systems (''WP4: Patrick Favre-Perrod'')<br />
<br />
* '''[[Services for system operators and suppliers]]''': Elaboration of a "joystick" for system operators and / or suppliers (''WP4'')<br />
<br />
* '''[[On-site measurement]]''': Validation of key points through on-site measurement (''WP5'')<br />
* '''[[External Links]]'''<br />
<br />
= Getting started =<br />
Use the ''Navigation'' to the left to enter the different sections or follow any of the following links:<br />
* [[Help:Contents|Help]]<br />
* [//meta.wikimedia.org/wiki/Help:Contents Wikimedia's Help]<br />
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]<br />
* [[Sandbox|Sandbox for test purposes]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-07T15:10:44Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
== Link to a high-resolution pdf file ==<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]<br />
<br />
== Notes on mathematical aspects of noninvasive demand-side management ==<br />
[[File:c_generation_Page_1.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_2.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_3.png|720px|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-07T15:10:00Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
== Link to a high-resolution pdf file ==<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]<br />
<br />
== Notes on mathematical aspects of optimization ==<br />
[[File:c_generation_Page_1.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_2.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_3.png|720px|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-07T15:09:13Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_1.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_2.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_3.png|720px|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-07T15:08:55Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_1.png|720px|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_2.png|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_3.png|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/File:C_generation_Page_3.pngFile:C generation Page 3.png2014-04-07T15:07:33Z<p>Jaq: </p>
<hr />
<div></div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/File:C_generation_Page_2.pngFile:C generation Page 2.png2014-04-07T15:07:14Z<p>Jaq: </p>
<hr />
<div></div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/File:C_generation_Page_1.pngFile:C generation Page 1.png2014-04-07T15:06:55Z<p>Jaq: </p>
<hr />
<div></div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-07T15:06:24Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_1.png|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_2.png|notes on the mathematics of communication between the central and the local controllers]]<br />
[[File:c_generation_Page_3.png|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T13:00:28Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:c_generation.pdf|notes on the mathematics of communication between the central and the local controllers]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:58:08Z<p>Jaq: Replaced content with "{{private}}
{{TOC right}}
File:c_generation.pdf"</p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:c_generation.pdf]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:50:46Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|2}}}}<br />
<br />
<br />
{{NumBlk|:|<math><br />
E_i = \frac{E_{\rm tot} }{\sum_j (\frac{c_i}{c_j})^{1/(a-1)}} \, .<br />
</math>|{{EquationRef|1}}}}<br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|2}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|3}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:49:07Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <br />
{{NumBlk|:|<math><br />
E_i = \frac{E_{\rm tot} }{\sum_j (\frac{c_i}{c_j})^{1/(a-1)}} \, .<br />
</math>|{{EquationRef|1}}}}<br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|2}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|3}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:46:08Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}</math>&#47;<math>\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:45:42Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot} &#47; \sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:44:42Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot} / \sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:44:11Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:43:34Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}/\sum_j </math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:43:06Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = </math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:41:45Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
== Inputs ==<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
== Processing of inputs ==<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
== Generating the main output: passive case ==<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:40:47Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
=== Inputs ===<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:38:53Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:38:19Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) can be applied to give <math>E_i = E_{tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:35:57Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see e.g.<br />
http://en.wikipedia.org/wiki/Lagrange_multiplier) <br />
can be <br />
applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:32:01Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum_{i=1}^{96} c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum_{i=1}^{96} E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see <br />
<a href="http://en.wikipedia.org/wiki/Lagrange_multiplier"> wikipedia </a>) <br />
can be <br />
applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:29:54Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in <math>N=96</math> 15 mins. periods). The function to be minimized is expressed<br />
as <math>f(\{E_i\}) = \sum_{i=1}^{96} c_i E_i^a</math>, where <math>\{c_i\}</math> is the set of "weight" and <math>\{ E_i\}</math> gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, <math>\sum_{i=1}^{96} E_i = E_{\rm tot}</math>, the method of Lagrange multipliers (see <br />
en.wikipedia.org/wiki/Lagrange_multiplier) <br />
can be <br />
applied to give <math>E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}</math>. <br />
<br />
Our first observation is that the method fails if <math>a \le 1</math>. For <math>a=1</math>, the<br />
minimization gives <math>E_j=E_{\rm tot}</math> if <math>c_j = {\rm min}_i \{c_i\}</math> and <math>E_i=0</math> otherwise. For <math>a<1</math>, it is even more advantageous<br />
to put all <br />
possible loads on the spot <math>j</math> with smallest <math>c_j</math>. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set <math>\{c_i\}</math>, the method is more sensitive (gives more contrasted <math>\{E_i\}</math>)<br />
for smaller values of <math>a</math> (close to but above one) -- the tendency of the <math>E_i</math>'s to congregate persists. The optimal value of <math>a</math> to be used<br />
remains to be determined, not however that<br />
different choices of <math>a</math> by the local controller can be counterbalanced by a different choice <math>c_i \rightarrow c_i^{a-1}</math><br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
<math>\{c_i\}</math> to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights <math>\{c_i\}</math>, <math>i=1,2,...N</math> being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of <math>\{ c_i \}</math> and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve <math>\{ P_i\}</math> is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve <math>\{ E_i^{(0)}\}</math> is determined from (ii). (I put a superindex <math>^{(0)}</math> to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights <math>\{ c_i \}</math><br />
which define a cost function <math>f(\{E_i\})=\sum_i c_i E_i^a</math> for the consumption <math>E_i</math> in each period <math>i=1,...N</math>.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of <math>\{ c_i \}</math><br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates <math>\{ c_i \}</math> without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production <math>\{ P_i \}</math>; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each <math>E_i</math> is allowed to vary as <math>E_i \in [0,E_{\rm tot}]</math> with no further constraint than fixed total consumption, <br />
<math>\sum_i E_i = E_{\rm tot}</math>.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
{{NumBlk|:|<math><br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
</math>|{{EquationRef|1}}}}<br />
This choice of weights ensures that <br />
minimizing <math>\sum_i c_i E_i^a</math> with <math>\sum_i E_i = E_{\rm tot}</math> gives <math>E_i = P_i</math>, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
<math>E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}</math>. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements <math>\sum_i (P_i - E_i)^2</math>], <br />
{{NumBlk|:|<math><br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
</math>|{{EquationRef|2}}}}<br />
with, as before, the number <math>N</math> of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. <math>P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N</math>, <math>\forall i</math>.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
<math>(i)</math> fully flexible loads, i.e. those just defined and discussed,<br />
<br />
<math>(ii)</math> partially controllable loads, which have a finite time window <math>[ i_i,i_f]</math> in which they act, and<br />
<br />
<math>(iii)</math> fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set <math>\{ c_i \}</math>, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
<math>E^{ff}_{\rm tot}</math> for class <math>(i)</math>, <math>E^{pf}_{\rm tot}</math> for class <math>(ii)</math> and <math>E^{ul}_{\rm tot}</math> for class <math>(iii)</math> (such that<br />
<math>P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}</math>). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set <math>\{ c_i \}</math> is generated as in Eq.~(\ref{eq:ciideal}). Class <math>(i)</math><br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class <math>(iii)</math> will not react at all -- it wouldn't anyway,<br />
regardless of our choice of <math>\{ c_i \}</math>. Thus we only need to discuss the reaction of class <math>(ii)</math>. <br />
Each load in class <math>(ii)</math> is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set <math>\{ c_i \}</math> for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices <math>j</math> on the right-hand-side runs over all time slices, <math>j=1,2,... N</math>. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition <math>\sum_i P_i = P_{\rm tot} = E_{\rm tot}</math>, in which case one sees that <math>\sum_j c_j^{-1/(a-1)} = 1 </math>. This is no longer the<br />
case once the procedure is restricted to a partial time window, say <math>[i_i,i_f]</math>. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with <math>E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i</math>, and <math>\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}</math>.<br />
Additionally, it is not anymore the case that in that time window, <math>E_{\rm tot} = P_{\rm tot}</math>, thus we need to substitute<br />
<math>P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}</math>, with <math>\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}</math>,<br />
<math>\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}</math> and <math>N_{\rm win} = i_f-i_i</math>, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class <math>(ii)</math>, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined <math>\{ \tilde{c}_i \}</math> satisfy <math>\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1</math>, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation <math>c_i \rightarrow \tilde{c}_i</math> can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only <math>\{ c_i \}</math> but also the <math>\{ E_i^{(0)} \}</math>, they can reconstruct the set <math>\{ P_i\}</math> and calculate<br />
<math>E_{\rm win}</math> and <math>P_{\rm win}</math>. It seems promising to have the central controller<br />
send <math>\{ c_i \}</math> as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption <math>\{ E_i^{(0)}</math> and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with <math>\{ P_i \}</math>, subtract the forecasted consumption of uncontrollable loads, <math>\{ E_i^{(ul)} \}</math> to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from <math>\{ \tilde{P}_i \}</math> to obtain <br />
<math>\{\overline{P}_i\}</math>, to finally<br />
optimize the fully flexible loads with respect to <math>\{\overline{P}_i\}</math>. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:20:03Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in $N=96$ 15 mins. periods). The function to be minimized is expressed<br />
as $f(\{E_i\}) = \sum_{i=1}^{96} c_i E_i^a$, where $\{c_i\}$ is the set of "weight" and $\{ E_i\}$ gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, $\sum_{i=1}^{96} E_i = E_{\rm tot}$, the method of Lagrange multipliers (see <br />
en.wikipedia.org/wiki/Lagrange$_-$multiplier) <br />
can be <br />
applied to give $E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}$. <br />
<br />
Our first observation is that the method fails if $a \le 1$. For $a=1$, the<br />
minimization gives $E_j=E_{\rm tot}$ if $c_j = {\rm min}_i \{c_i\}$ and $E_i=0$ otherwise. For $a<1$, it is even more advantageous<br />
to put all <br />
possible loads on the spot $j$ with smallest $c_j$. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set $\{c_i\}$, the method is more sensitive (gives more contrasted $\{E_i\}$)<br />
for smaller values of $a$ (close to but above one) -- the tendency of the $E_i$'s to congregate persists. The optimal value of $a$ to be used<br />
remains to be determined, not however that<br />
different choices of $a$ by the local controller can be counterbalanced by a different choice $c_i \rightarrow c_i^{a-1}$<br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
$\{c_i\}$ to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
= Central controller and its action =<br />
<br />
The main task of the central controller is thus to generate a set of weights $\{c_i\}$, $i=1,2,...N$ being a discrete time variable.<br />
We first give a general sketch of how this can be done. At this stage, we restrict ourselves to day-ahead operation.<br />
<br />
\subsection{Inputs}<br />
<br />
The central controller gets the following information:<br />
<br />
(i) next day weather forecast, 15 mins per 15 mins. These include temperature, wind and insolation data and so forth;<br />
<br />
(ii) history of consumption, given the current and forecasted weather as well as other relevant <br />
factors (day of the week; holidays aso.);<br />
<br />
(iii) current status of storages;<br />
<br />
(iv) history of $\{ c_i \}$ and, possibly, some measure (grading) on how successful they were.<br />
<br />
\noindent Note: at this point (i.e. 01.04.2014) it is unclear that we will need (iv).<br />
<br />
\subsection{Processing of inputs}<br />
<br />
The forecasted next day production curve $\{ P_i\}$ is determined from (i). Wind and insolation data, together with <br />
the geographic distributions of solar panels and wind turbines allows to forecast the pv and wind electricity production curve. <br />
To this, ribbon-like productions are added (geothermal, biomass, run-of-the-river hydroelectricity, as well as thermal, including<br />
nuclear electricity. Finally, the production of more flexible sources (mostly dammed hydro) has to be forecasted. This will be made<br />
based on day-before production, current and expected evolution of the filling of dams [point (iii) above] and other factors. <br />
<br />
The forecasted next day consumption curve $\{ E_i^{(0)}\}$ is determined from (ii). (I put a superindex $^{(0)}$ to indicate that this is<br />
the forecasted consumption, not the adapted consumptions to be optimized).<br />
<br />
\subsection{Generating the main output: passive case}<br />
<br />
The task is then to try and influence loads to operate in such a way as to modify the final consumption curve so that it gets<br />
closer to the production curve: one would like to increase consumption when the latter is predicted to be below production<br />
and decrease consumption when it is above production. This will be done by generating a set of weights $\{ c_i \}$<br />
which define a cost function $f(\{E_i\})=\sum_i c_i E_i^a$ for the consumption $E_i$ in each period $i=1,...N$.<br />
This function will be minimized by the local controllers. The goal of the central controller is to generate sets of $\{ c_i \}$<br />
giving optimal reaction from the local controllers. <br />
<br />
In the initial operation stage, stored historical consumption curves [input (ii) above] are "passive ones", i.e. they<br />
were not influenced by demand-side management/load-shifts. At this level, one generates $\{ c_i \}$ without information on <br />
previous attempts to do so, if these attempts/the generated sets were successful aso. The method we develop now for this case<br />
does not rely anyway on any knowledge of consumption, only on the forecasted production $\{ P_i \}$; right now we do not need/include<br />
the history of success/failure of the approach. <br />
<br />
<br />
<br />
\subsubsection{Ideally flexible loads} <br />
<br />
The case of ideal loads is easily solved analytically. <br />
Ideal loads are fully flexible, i.e. they have to be turned on at some point during the day, but it does no matter at all when.<br />
Each $E_i$ is allowed to vary as $E_i \in [0,E_{\rm tot}]$ with no further constraint than fixed total consumption, <br />
$\sum_i E_i = E_{\rm tot}$.<br />
We first consider that the total consumption is equal to the total production -- this the real-life situation, where imports and/or exports<br />
are included in the production/consumption. The Lagrange multiplier method gives us<br />
the weights as<br />
\begin{equation}\label{eq:ciideal}<br />
c_i = \left(\frac{E_{\rm tot}}{P_i}\right)^{(a-1)} \, .<br />
\end{equation}<br />
This choice of weights ensures that <br />
minimizing $\sum_i c_i E_i^a$ with $\sum_i E_i = E_{\rm tot}$ gives $E_i = P_i$, i.e. that the consumption profile matches the <br />
production profile. <br />
<br />
For later use, we next waive the condition of equal total consumption and production, <br />
$E_{\rm tot} = \sum_i E_i \ne \sum_i P_i = P_{\rm tot}$. One then obtains, using also the Lagrange multiplier approach<br />
[with the additional minimization of the sum of square displacements $\sum_i (P_i - E_i)^2$], <br />
\begin{equation}\label{eq:ci}<br />
c_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm tot}-E_{\rm tot})/N} \right)^{(a-1)} \, ,<br />
\end{equation}<br />
with, as before, the number $N$ of time slices. This corresponds to a consumption curve with constant distance to the production curve,<br />
i.e. $P_i - E_i = (P_{\rm tot}-E_{\rm tot})/N$, $\forall i$.<br />
<br />
\subsubsection{Nonideal loads}<br />
<br />
The above results, obtained in a simple situation suggest that an efficient strategy would be to consider three <br />
different classes of loads:<br />
<br />
$(i)$ fully flexible loads, i.e. those just defined and discussed,<br />
<br />
$(ii)$ partially controllable loads, which have a finite time window $[ i_i,i_f]$ in which they act, and<br />
<br />
$(iii)$ fully uncontrollable loads.<br />
<br />
There are two situations to be differentiated. In the first one, we know nothing about the loads, and only want to generate<br />
a set $\{ c_i \}$, and hope for the best. In the second one, we know the forecasted <br />
consumption curve for each class above, with in particular total consumptions<br />
$E^{ff}_{\rm tot}$ for class $(i)$, $E^{pf}_{\rm tot}$ for class $(ii)$ and $E^{ul}_{\rm tot}$ for class $(iii)$ (such that<br />
$P_{\rm tot} = E^{ff}_{\rm tot}+E^{pf}_{\rm tot}+E^{ul}_{\rm tot}$). We consider these two situations sequentially. <br />
<br />
First, assume that we know nothing about the loads. The set $\{ c_i \}$ is generated as in Eq.~(\ref{eq:ciideal}). Class $(i)$<br />
will act as planned - the process is optimized for that class of ideally flexible loads. Class $(iii)$ will not react at all -- it wouldn't anyway,<br />
regardless of our choice of $\{ c_i \}$. Thus we only need to discuss the reaction of class $(ii)$. <br />
Each load in class $(ii)$ is restricted to a time window - these windows may or may not be different. <br />
Applying the algorithm we developed for fully flexible loads, but restricted to one time window optimizes the set $\{ c_i \}$ for the<br />
load corresponding to that window. We rewrite Eq.~(\ref{eq:ciideal}) in the form,<br />
\begin{equation}\label{eq:cigen}<br />
c_i^{-1/(a-1)} = \frac{P_i}{E_{\rm tot}} \cdot \sum_{j=1}^N c_j^{-1/(a-1)} \, ,<br />
\end{equation}<br />
where we stress that<br />
the sum over indices $j$ on the right-hand-side runs over all time slices, $j=1,2,... N$. Eq.~(\ref{eq:ciideal}) is recovered under<br />
the condition $\sum_i P_i = P_{\rm tot} = E_{\rm tot}$, in which case one sees that $\sum_j c_j^{-1/(a-1)} = 1 $. This is no longer the<br />
case once the procedure is restricted to a partial time window, say $[i_i,i_f]$. In this case, Eq.~(\ref{eq:cigen}) has to be modified<br />
with $E_{\rm tot} \rightarrow \sum_{j \in [i_i,i_f]} E_i$, and $\sum_{j=1}^N c_j^{-1/(a-1)} \rightarrow \sum_{j \in [i_i,i_f]} c_j^{-1/(a-1)}$.<br />
Additionally, it is not anymore the case that in that time window, $E_{\rm tot} = P_{\rm tot}$, thus we need to substitute<br />
$P_i \rightarrow P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}$, with $\sum_{i \in [i_i,i_f]} P_i = P_{\rm win}$,<br />
$\sum_{i \in [i_i,i_f]} E_i = E_{\rm win}$ and $N_{\rm win} = i_f-i_i$, the number of time slices in that window. <br />
We obtain that, for the partially flexible loads in class $(ii)$, the weights should be, instead of Eq.~(\ref{eq:ciideal}) <br />
\begin{equation}\label{eq:ci2}<br />
\tilde{c}_i= \left(\frac{E_{\rm tot}}{P_i - (P_{\rm win}-E_{\rm win})/N_{\rm win}} \frac{1}{\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}} \right)^{(a-1)} \, , \,\,\,\, i=i_i, i_i+1, ... i_f \, .<br />
\end{equation}<br />
It is easily checked that the so defined $\{ \tilde{c}_i \}$ satisfy $\sum_{j\in [i_i,i_f]} \tilde{c}_j^{-1/(a-1)}=1$, so that this term drops out of <br />
Eq.~(\ref{eq:ci2}).<br />
Obviously, the operation $c_i \rightarrow \tilde{c}_i$ can be performed locally and individually by each partially controllable load:<br />
provided they central controller sends them not only $\{ c_i \}$ but also the $\{ E_i^{(0)} \}$, they can reconstruct the set $\{ P_i\}$ and calculate<br />
$E_{\rm win}$ and $P_{\rm win}$. It seems promising to have the central controller<br />
send $\{ c_i \}$ as defined in Eq.~(\ref{eq:ciideal}) and the forecasted consumption $\{ E_i^{(0)}$ and let the local controller be programmed<br />
as fully flexible or partially flexible and treat the weights accordingly. <br />
<br />
We are left with discussing the second situation mentioned above, where we can forecast consumption for each class of loads.<br />
The strategy is then to start with $\{ P_i \}$, subtract the forecasted consumption of uncontrollable loads, $\{ E_i^{(ul)} \}$ to obtain<br />
<math> \{ \tilde{P}_i \} </math>, optimize the consumption curve of the partially flexible loads and subtract that curve from $\{ \tilde{P}_i \}$ to obtain <br />
$\{\overline{P}_i\}$, to finally<br />
optimize the fully flexible loads with respect to $\{\overline{P}_i\}$. As a matter of fact, the rule of thumb seems to be to<br />
optimize less flexible loads first and more flexible loads last (less/more flexible means "dispatchable inside a shorter/longer<br />
time window"). The question is whether such procedures, which require cross-talk between the loads (i.e. the more flexible loads<br />
need to know the reaction of the less flexible loads before they plan theirs), is compatible with the philosophy of agreflex. Even if it<br />
is, it may be taken into account at a later stage, once the first approach has been implemented and experience with it accumulated.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:18:41Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, <i> if the latter were not adapted </i>, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:17:53Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:16:03Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:C_generation.pdf|720px|C_generation]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:15:50Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:C_generation.pdf|720px|DCLF equations]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:15:00Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
[[File:DCLF_equations.png|720px|DCLF equations]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:13:05Z<p>Jaq: Replaced content with "{{private}}
{{TOC right}}"</p>
<hr />
<div>{{private}}<br />
{{TOC right}}</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/File:C_generation.pdfFile:C generation.pdf2014-04-02T12:12:43Z<p>Jaq: </p>
<hr />
<div></div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:05:27Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
= Introduction =<br />
<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, {\it if the latter were not adapted}, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.<br />
<br />
= Preliminary comments on the action of local controllers =<br />
<br />
Generally speaking, one may think of forwarding some time-dependent "pricing function" to the local controllers, which the latter<br />
then try and minimize by adapting their loads, in particular the time at which they will be turned on and off, given general<br />
constraints such as deadlines for tasks to be finished, temperature brackets within which a building, a fridge aso. should remain,<br />
and so forth. To do so, we first discretize time, (for instance in $N=96$ 15 mins. periods). The function to be minimized is expressed<br />
as $f(\{E_i\}) = \sum_{i=1}^{96} c_i E_i^a$, where $\{c_i\}$ is the set of "weight" and $\{ E_i\}$ gives the loads to be adapted.<br />
Given a general constraint that<br />
the total daily consumption is predetermined, $\sum_{i=1}^{96} E_i = E_{\rm tot}$, the method of Lagrange multipliers (see <br />
en.wikipedia.org/wiki/Lagrange$_-$multiplier) <br />
can be <br />
applied to give $E_i = E_{\rm tot}/\sum_j (c_i/c_j)^{1/(a-1)}$. <br />
<br />
Our first observation is that the method fails if $a \le 1$. For $a=1$, the<br />
minimization gives $E_j=E_{\rm tot}$ if $c_j = {\rm min}_i \{c_i\}$ and $E_i=0$ otherwise. For $a<1$, it is even more advantageous<br />
to put all <br />
possible loads on the spot $j$ with smallest $c_j$. This obviously does not reflect reality, as the electricity price depends on the<br />
consumption - piling up all loads on a single slot will result in a strong electricity price increase. Moreover, and perhaps more importantly<br />
for our purpose here, putting all loads on a single slot will not bring the consumption curve closer to the production curve. <br />
<br />
Additionally, for a given set $\{c_i\}$, the method is more sensitive (gives more contrasted $\{E_i\}$)<br />
for smaller values of $a$ (close to but above one) -- the tendency of the $E_i$'s to congregate persists. The optimal value of $a$ to be used<br />
remains to be determined, not however that<br />
different choices of $a$ by the local controller can be counterbalanced by a different choice $c_i \rightarrow c_i^{a-1}$<br />
from the central controller. The choice of the minimization function will be left<br />
to the local controllers -- for our purpose here, it is sufficient to note that, as just seen, the central controller can in principle adapt to any<br />
choice of the local controllers. From now on, we focus on the central controller, whose task will be to adapt its method for generating<br />
$\{c_i\}$ to the observed reaction of the local controllers, in particular the success (or lack thereof) of the resulting load shift.<br />
<br />
<br />
\section{Central controller and its action}</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Mathematical_aspects_of_optimizationMathematical aspects of optimization2014-04-02T12:04:01Z<p>Jaq: Created page with "{{private}} {{TOC right}} Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers. Nowadays, standard grid ..."</p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
Part of AGREFLEX is to try and implement a communication line between one central controller and a set of local controllers.<br />
Nowadays, standard grid operation relies on a central operator issuing informations/requests on next-day operation. Given weather forecast,<br />
historical records of production and consumption under similar circumstances (including weather forecast but also day of the week;<br />
time of the year; holidays; status of hydroelectric and other storage aso.), the grid operator gives predictions on consumption one day in advance and<br />
issues recommendation to producers. In this framework, there is no demand-side management. We want to incorporate load<br />
shifting into the game. <br />
<br />
In the scheme discussed here, a central controller processes relevant informations -- those mentioned above, augmented with a set of<br />
weights giving information on the expected discrepancy between production and demand, {\it if the latter were not adapted}, i.e. if it<br />
were acting independently of production. The hope is that this set of weights gives sufficient information <br />
to local load controllers so that the latter adapt the consumption profile to better suit the production curve. <br />
One goal is to figure out if providing minimal information to the local controllers is sufficient to have them react efficiently and<br />
adapt the loads without direct, centralized control. Below, we show mathematically that this is feasible. How well this will work in <br />
practice is still to be determined, however the results to be presented here are quite encouraging.</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Main_PageMain Page2014-04-02T12:02:34Z<p>Jaq: /* Technical Content */</p>
<hr />
<div>= Welcome to the Wiki of the Project Agreflex =<br />
{{TOC right}}<br />
[[File:hesso_logo.png|left|200px|HESSO Valais Wallis Logo|link=http://www.hevs.ch]] This is the knowledge database of the project Agreflex. <br />
<br />
Find more information about our technical and educational program in the [http://wiki.hevs.ch/uit UIT Wiki] or [http://wiki.hevs.ch/fsi FSI Wiki].<br />
<br />
<br />
[[File:Icontexto-inside-rss.png|link=Help:http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss|48px]] [http://wiki.hevs.ch/optigrid/index.php?title=Special:RecentChanges&feed=rss Get informed about all changes to this wiki by signing up to this RSS feed]<br />
<br />
= Administration =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex.pdf|Project proposal]]'''<br />
* '''[[Meetings]]'''<br />
<br />
= Preliminary Study =<br />
<br />
* '''[[media:D_2013_A_02_Agreflex_EtudePreliminaire_Gabioud.pdf|Report]]'''<br />
* '''[[media:AgreflexPreliminary1.0.pdf|Presentation]]'''<br />
<br />
= Introduction =<br />
<br />
== Contexte ==<br />
Aujourd’hui, les électriciens considèrent la consommation d’énergie électrique comme une grandeur non asservie, qu’il s’agit de prévoir de la manière la plus exacte possible, de manière à planifier au mieux la production.<br />
Le projet Agreflex part d’une autre hypothèse : la part de la consommation de courant électrique flexible doit être pilotée au même titre que sont pilotées aujourd’hui les centrales de production flexibles.<br />
<br />
== Survol des Work Packages ==<br />
Agreflex aborde cette problématique à plusieurs niveaux :<br />
* Dans le WP1, il s’agit de qualifier et de quantifier la contribution de la gestion des charges flexibles aux besoins de stockage induits par le remplacement de la production nucléaire en Suisse par des nouvelles énergies renouvelables.<br />
* Dans les WP2 un simulateur permettant de définir des systèmes avec des unités de production et de consommation de différents types (éventuellement flexibles et pilotables) et, de faire « tourner » ces systèmes pendant une certaine période d’analyse et d’évaluer les résultats.<br />
* Le WP3 a pour objectif de concevoir des algorithmes de contrôle des charges flexibles, algorithmes qui seront évalués avec le simulateur.<br />
* Le WP4 traite des aspects techniques, réglementaires et économiques relatifs au déploiement de systèmes de gestion de la charge.<br />
* Des mesures sont effectuées dans WP5, essentiellement pour caler les modèles du simulateur et/ou pour vérifier les performances des algorithmes de contrôle.<br />
Le présent document s’inscrit dans le cadre du WP2 et concerne le simulateur à développer. Il s’agit d’un document liminaire, sur lequel la spécification du simulateur devrait se baser.<br />
<br />
== Attentes des sponsors du projet ==<br />
Le projet est financé par la fondation EOS Holding, à travers un comité dans lequel sont représentés les principaux électriciens romands.<br />
Ces électriciens attendent les réponses suivantes :<br />
* Est-ce que la gestion de la charge a le potentiel d’apporter une contribution significative aux besoins de stockage induits par la transition énergétique ? Le WP1 devrait apporter une première réponse à cette question.<br />
* (On suppose une réponse positive à la première question). Comment exploiter le potentiel de la gestion de la charge ? Une réponse à cette question doit être apportée à deux niveaux :<br />
** Au niveau algorithmique, il s’agit d’élaborer quelques stratégies de gestion de la charge et de vérifier par simulation leur performance (WP2 et WP3, calage des modèles de simulation dans WP5).<br />
** Au niveau du déploiement, il s’agit de mettre en évidence les éléments réglementaires, techniques et économiques nécessaires (WP4).<br />
<br />
= Technical Content =<br />
* '''[[Switzerland: Nuclear power replaced by renewables]]''': Estimation of storage needs and possible contribution of Demand Side Management / Demand Response (''WP1: Jean-françois Affolter'')<br />
<br />
* '''[[Elements modelling]]''': Physical models for category of elements for the simulator (''WP2: Thierry Robert'')<br />
<br />
* '''[[Simulator design]]''': Design of a framework for the definition of the simulated system and of control strategies and for the execution of simulation scenarios (''WP3 Simulator Design: Dominique Gabioud'')<br />
** '''[[Power flow computation]]''': Power flow computation in an electric power network (theoretical basis for the simulator)<br />
<br />
* '''[[Optimisation strategies]]''': Design of distributed optimisation algorithms (''WP3 Algorithms: Guido Bologna & Paul Albuquerque'')<br />
<br />
* '''[[Mathematical aspects of optimization]]''': Communication line between central and local controllers (''WP3 Simulator Design: Philippe Jacquod & Dominique Gabioud'')<br />
<br />
* '''[[Simulated scenarios and their assessment]]''': Simulation scenarios results with performance assessment (''WP3'')<br />
<br />
* '''[[Considerations on deployment]]''': Regulatory, economical and technical considerations on the deployment of demand side management / demand response systems (''WP4: Patrick Favre-Perrod'')<br />
<br />
* '''[[Services for system operators and suppliers]]''': Elaboration of a "joystick" for system operators and / or suppliers (''WP4'')<br />
<br />
* '''[[On-site measurement]]''': Validation of key points through on-site measurement (''WP5'')<br />
<br />
= Getting started =<br />
Use the ''Navigation'' to the left to enter the different sections or follow any of the following links:<br />
* [[Help:Contents|Help]]<br />
* [//meta.wikimedia.org/wiki/Help:Contents Wikimedia's Help]<br />
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]<br />
* [[Sandbox|Sandbox for test purposes]]</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Optimisation_strategiesOptimisation strategies2014-03-18T12:21:01Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
<br />
= "Target" optimisation strategy =<br />
<br />
<br />
'''[[Target optimisation strategy]]'''</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Optimisation_strategiesOptimisation strategies2014-03-18T12:20:50Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
<br />
= "Target" optimisation strategy =<br />
<br />
<br />
'''[[Target optimisation strategy]]'''<br />
<br />
== bla ==</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Optimisation_strategiesOptimisation strategies2014-03-18T12:20:39Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
<br />
= "Target" optimisation strategy =<br />
<br />
<br />
'''[[Target optimisation strategy]]'''</div>Jaqhttps://wiki.hevs.ch/agreflex/index.php5/Optimisation_strategiesOptimisation strategies2014-03-18T12:20:31Z<p>Jaq: </p>
<hr />
<div>{{private}}<br />
{{TOC right}}<br />
<br />
= "Target" optimisation strategy =<br />
<br />
<br />
'''[[Target optimisation bla strategy]]'''</div>Jaq