Bayesian forecasting of individual consumption and balancing of an electrical network

The Bayesian prediction method addresses the challenge of short consumption histories by using a priori laws and linear regression to forecast energy flows, ensuring network balance and preventing outages.

FR3131988B1Active Publication Date: 2024-08-16ELECTRICITE DE FRANCE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2022000456
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2024-08-16
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

Existing methods for predicting electrical installation consumption over a few days are unsatisfactory when the consumption history is significantly less than one year, failing to account for seasonal fluctuations and leading to network imbalances that can cause power outages.

Method used

A Bayesian prediction method using a priori laws and hyperparameters, combined with linear regression models, to estimate energy injections and withdrawals based on short consumption histories, allowing for improved balancing by making available energy means to compensate for imbalances.

Benefits of technology

The method enables precise consumption forecasting even with short histories, effectively balancing energy flows and preventing power outages by anticipating energy needs, thus optimizing network management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000025_0000
    Figure 00000025_0000
  • Figure 00000025_0001
    Figure 00000025_0001
  • Figure 00000026_0000
    Figure 00000026_0000
Patent Text Reader

Abstract

The invention relates to a method for balancing the total energy injected and the total energy withdrawn at a local level in an electrical network. The invention also relates to a corresponding computer program and recording medium. The balancing is implemented through the advance provision of a means for injecting and / or withdrawing energy. This advance provision is based on a forecast of consumption or proconsumption for at least one electrical installation of interest for which a short-term consumption or proconsumption history is available. To this end, an individual Bayesian analysis of a representative dataset of interest from the short-term history is implemented, with a prior distribution comprising a linear relationship representative of the longer-term histories of electrical installations assumed to have a similar consumption or proconsumption profile. Abstract: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

Description Title of the invention: Bayesian forecasting of indi- monitoring and balancing of an electrical network Technical field

[0001] The present disclosure relates to the field of electrical network management.

[0002] The present disclosure relates in particular to a method of balancing between in- ejections and withdrawals in an electrical network, a computer program and a corresponding recording media. Prior art

[0003] — Predict, or estimate, the consumption of an electrical installation over several days advance is an essential and recurring issue for an electricity supplier, in order to respond to various issues.

[0004] — For example, the installation of photovoltaic panels in individual houses allows an individual to produce electricity. This production is partly used in situ to meet the consumption needs of the individual. The surplus production is discharged into the local network. When the original energy production photovoltaic greatly exceeds consumption needs, injections may become, temporarily, too important in relation to the withdrawals. This can unbalance the network and increase the risk of power outages. A solution for To overcome this imbalance, it is necessary to provide, in installations equipped with photo- tovoltaic, a battery to store the energy thus produced. Optimized control of the battery level must allow both to maximize self-consumption and contribute to balancing over time, at the local network level, the injections and the rackings. To do this, it is advisable to have, several days in advance, the best possible estimate of the consumption of each installation connected to the local network.

[0005] — According to another example, a current trend, which is expected to continue over the next coming years and decades, is the development of electric vehicles. If a individual acquires an electric vehicle, then, always to maintain the balance of the local network to which his home is connected, it is desirable to predict the ranges times during which the vehicle battery will be placed on charge.

[0006] According to yet another example, the consumption needs on the scale of a neighborhoods can change radically, especially when new housing is built. Anticipate a future increase in consumption needs on a scale of a neighborhood can trigger network sizing work electric which serves this district. Generally speaking, different approaches have been tested with the same goal of predicting the consumption of an electrical installation. Some approaches rely on the electrical consumption history of installations to extrapolate future consumption. Such predictions have only proven satisfactory in practice on the condition that the history can be considered representative of the usual seasonal fluctuations in consumption of the corresponding installation. For this, it is necessary that the history covers a time period of at least one year and that no abrupt changes in terms of usage are observed within the history. There is therefore a need for improved prediction of the consumption of an electrical installation over a horizon of a few days. In particular, it is desirable that such a prediction be satisfactory even if the consumption history of this installation covers a time period significantly less than one year, that is to say a time period insufficient to account for all seasonal fluctuations in consumption. Summary This disclosure improves the situation. A method is proposed for balancing between a total energy injected and a total energy withdrawn at a local level in an electrical network, the method comprising: - obtain a set of data of interest indicative of a temporal evolution of consumption or prosumption of an electrical installation of interest connected to the electricity network over a past period greater than or equal to one week and less than one year, - by an individual Bayesian analysis of the dataset of interest, the individual Bayesian analysis using an a priori law defining a hyperparameter of the dataset of interest, establishing a marginal a posteriori law of the hyperparameter, the a priori law comprising at least one affine relationship, established according to a linear regression model, between a set of explained variables xi and an explanatory variable y, an explained variable being determined from a reference data set indicative of a temporal evolution of consumption or prosumption of an electrical installation over a past period greater than or equal to one year, - predict a quantity of energy injected into the network or withdrawn from the network by the installation of interest, at a future date, on the basis of the marginal law a posteriori, - depending on the predicted quantity of energy, provide in advance a means of injecting and / or withdrawing energy capable of contributing to balancing the total energy injected and the total energy withdrawn, at the future date and at the said local level, in the electricity network, and - at the future date, balance the total energy injected and the total energy withdrawn at said local level in the electricity network using, at least, the means previously made available. According to another aspect, there is provided a computer program comprising program code instructions for executing the proposed method, when said program is executed on a data processing circuit. According to another aspect, there is provided a non-transitory, processor-readable recording medium having recorded thereon the code instructions of the proposed computer program. The method, the computer program and the recording medium proposed implement an improved prediction method, capable of estimating the consumption or prosumption of an electrical installation of interest at any future date, as soon as the consumption history of this electrical installation of interest exceeds one week. That is to say that the consumption or prosumption profile of the electrical installation of interest is compared with neighboring profiles, which makes it possible to predict in a very satisfactory manner, at any future date, a withdrawal planned by the electrical installation of interest, or an injection planned by the electrical installation of interest. This therefore makes it possible to anticipate injections and withdrawals to be planned at a local level in all seasons. By making available in advance a means of injecting and / or extracting energy at the local level, it is then possible to balance injections and extractions as well as possible in the future and to protect against the risk of a future power cut due to an imbalance. The following optional features may be implemented, alone or in combination with the features already mentioned. The dataset of interest may be derived from a short time series associated with the electrical installation of interest, the short time series comprising a plurality of data pairs indicative of an electrical consumption of the associated installation during a succession of past elementary time intervals. A short time series refers, for example, to a load curve formed by daily consumption readings over a period of one week to one year. The dataset of interest is derived from a dimension reduction of the short time series in order to obtain more efficiency in terms of results and analysis time. The method may include: - obtain a set of reference data sets, - partitioning the set of reference datasets on the basis of a similarity criterion so as to form a plurality of groups of datasets of reference, and the affine relationship can be established according to a linear regression model applied to one of the reference dataset groups. Partitioning based on a similarity criterion refers to dividing the reference dataset into homogeneous "packets" with common characteristics. For example, considering that the reference datasets are reduced-dimensional load curves, those corresponding to homes with electric heating have a completely different consumption profile in winter from those corresponding to homes without. Two distinct groups of reference datasets can be formed based on this distinction alone. Other distinctions can be made depending on the type of electrical installation (residential, commercial, industrial, service) or the presence of other electricity-consuming equipment (such as an air conditioner or an electric vehicle charging socket) or electricity-producing equipment (such as a photovoltaic panel). It has been found that the usual consumption or prosumption reflected by a given group of reference data sets, representative of a given type of electrical installation, can be satisfactorily modelled using a linear regression model. The method may include: - assign the dataset of interest to one of the formed reference dataset groups, and the affine relationship can be established according to a linear regression model applied to the group of reference datasets to which the dataset of interest is assigned. In this example, the expected consumption or prosumption profile of the electrical installation of interest is assimilated to that of the reference dataset group to which the dataset of interest is assigned. The method may include: - assign the dataset of interest to several groups of formed reference datasets, and the prior distribution may comprise a weighted sum, or equivalently a weighted average, of a plurality of affine relationships, an affine relationship being established according to a linear regression model applied to a group of reference data sets to which the data set of interest is assigned. In this example, the electrical installation of interest is considered to have a hybrid consumption profile between those of the most similar reference electrical installation groups. The method may include: - segment the data sets temporally, a segment of a data set being indicative of the temporal evolution of the consumption or prosumption of the corresponding electrical installation over a portion of the past period, - associate each segment with an identifier of the corresponding portion of said past period, - train artificial intelligence based on reference dataset segments associated with portion IDs, and assigning the dataset of interest to at least one of the formed reference dataset groups may include: - provide, as input to the previously trained artificial intelligence, a segment of the dataset of interest and the associated portion identifier, and - obtain, as output, an assignment of the dataset of interest to at least one of the groups of reference datasets formed. This temporal segmentation allows for a more relevant allocation of the dataset of interest to a group of reference datasets. Indeed, many electrical installations have a very variable consumption / prosumption profile over the course of the year. It is therefore more relevant to carry out the allocation based on a comparison between the monthly consumption of the installation of interest in January and the monthly consumption of reference installations between December and February, for example, rather than between May and September. The linear regression model can be a hierarchical Bayesian model. Inventors have achieved good results with such a model, but any other alternative linear regression method, for example the lasso, is applicable. Predicting a quantity of energy injected into the network or withdrawn from the network by the installation of interest, at a future date, on the basis of the marginal a posteriori law can include: - construct, on the basis of said marginal law a posteriori, a predictive law of said quantity of energy as a function of a forecast value of an external temperature, - obtain a forecast value of the outside temperature at the installation of interest at the future date, and - predicting said quantity of energy from said predictive law and said forecast value. This example focuses on the outside temperature as a variable closely linked to the electricity consumption of the installation of interest, which is verified in practice for homes, since electrical heating and air conditioning equipment has high consumption. Obviously, it cannot be excluded that other variables, for which a forecast value is also assumed to be available, may also have a determining influence on the consumption or prosumption of an installation of interest and of a group of reference installations to which it is assigned. For example, a sunshine forecast is directly linked to a forecast of electricity production by an installation equipped with photovoltaic production means. Brief description of the drawings Other characteristics, details and advantages will appear on reading the detailed description below, and on analyzing the attached drawings, in which: Fig.1 [Fig.1] describes the operation of an auto-encoder and its use for the dimension reduction of load curves, according to an example of implementation. Fig.2 [Fig.2] represents a plurality of groups of reference data sets in a reduced-dimensional space, according to an exemplary embodiment. Fig. 3 [Fig.3] represents a model for assigning a dataset of interest to one or more groups of reference datasets, according to an exemplary embodiment where this model is a double-input neural network. Fig. 4 [Fig.4] is a diagram of a hierarchical Bayesian model applicable, in an exemplary embodiment, to the determination of an informative posterior distribution, relative to a group of reference data sets with a set of explanatory variables, such a posterior distribution being suitable for constructing an a priori distribution of a hierarchical Bayesian model applied to the data set of interest with the same explanatory variables. Fig.5 [Fig. 5] represents, in the form of a flowchart, a general algorithm of a computer program suitable, according to an exemplary embodiment, for predicting consumption, for a future date, of an installation of interest connected to an electrical network for the purpose of balancing the electrical network at the local level at the future date. Fig. 6 [Fig.6] is an example of the consumption history of an installation of interest, in the form of a load curve at daily intervals over a period of 37 days. Fig. 7 [Fig.7] represents the daily consumption forecasts up to 22 days of the installation of interest mentioned in the example of [Fig.6], according to an exemplary embodiment of the invention. Fig. 8 [Fig.8] represents the daily consumption forecasts up to 22 days for the installation of interest mentioned in the example of [Fig.6], according to a known method, called “frequentist”. Fig. 9 [Fig.9] represents an example of a data processing device suitable for implementing the method according to the invention. Description of the embodiments The general principle of the invention is based on the deduction of statistical laws from long consumption histories. These statistical laws are then used to analyze short consumption histories, similar to these long consumption histories. This results in an improved ability compared to known approaches to predict the future consumption of a facility of interest even when the latter's consumption history is short. This prediction is then used to anticipate the balancing to be implemented, in the future, between injections and withdrawals at the level of a local network encompassing the installation of interest. An example of implementation is now described in detail, considering as a starting point the obtaining of individual load curves for a set of electrical installations. It is understood that the electrical installations to which these individual load curves refer may be distributed indifferently over one or more territories, connected or not to the same electrical network. A load curve of an installation defines the evolution over time of the energy consumption of the installation for a given period. It is a reading of the electrical consumption of the installation at regular intervals, or measurement steps. Thus, an individual load curve is a time series of length "N" and step "p", where "N" denotes the total number of values ​​in the series, and "p" denotes the time interval, considered constant, between two successive values ​​in the series. A load curve with a daily step covering a time period of one year has a step p = | day and a length N = 365. In this example, it is considered that the individual load curves thus collected are all at daily intervals. Of course, the professional will understand: - that a homogeneous format of input data such as load curves indi- viduelles is required for the purposes of subsequent computer processing described in the remainder of this document, - that this homogeneous format can be easily obtained from an initially heterogeneous format (for example the step of a load curve can be modified by means of an interpolation of the original values), - that if the specific choice of a daily step is justified by a daily recurrence of numerous electricity-consuming uses, it is not excluded that the step is other than daily, for example hourly or weekly. One objective is to classify individual load curves into a limited number of groups, each group representing a set of specific consumption habits. For example, the presence or absence of an electric heating system, or an air conditioning system, induces different consumption habits. Furthermore, the load curves of a studio, a three-room apartment, a factory, a hospital, a school, or a swimming pool also correspond to as many different consumption habits. For the purposes of such a classification, we restrict ourselves to considering, among the individual load curves thus collected, only those having a length N greater than or equal to 365. In conjunction with a daily step, this means that the individual load curves considered each cover a time interval greater than or equal to one year. As such, each of the individual load curves considered is a priori representative of seasonal fluctuations in consumption at the level of the installation to which it corresponds. For this reason, each of the load curves thus considered is a so-called reference load curve, corresponding to a so-called reference installation, as opposed to load curves covering a time interval of less than one year which cannot represent seasonal fluctuations in consumption as completely. Various known methods, supervised or not, allow such classification to be carried out. As an example, it is proposed to perform a dimension reduction of the load curves considered using an auto-encoder, then to construct homogeneous groups from the reduced dimension curves using a k-medoids algorithm. An autoencoder (1) is a deep neural network with a "diabolo" structure, it is composed of two blocks, encoding (2) and decoding (3). It is a model allowing both data dimension reduction and reconstruction in their initial dimension. [Fig.1] describes its operation when it takes as input an individual load curve (4), noted X. After encoding, the curve is said to be "in reduced dimension" (5), it constitutes a data set learning curve whose number of variables is reduced compared to the load curve provided as input. Decoding the curve in reduced dimension makes it possible to reconstruct the one provided as input, in a denoised form -6), due to the loss of information deemed to be of little use occurring during encoding. Dimension reduction is a prerequisite for any computer pattern recognition process from raw data. In this case, dimension reduction allows the extraction of discriminating characteristics from the individual load curves considered. Of course, any other known data reduction method, for example principal component analysis, is applicable instead of using an autoencoder. The k-medoids algorithm is chosen in this example as the clustering method because of its robustness with respect to atypical low-dimensional curves. This algorithm clusters low-dimensional curves into a pre-specified number of groups. Alternatively, any other known clustering algorithm is applicable, such as k-means partitioning or hierarchical ascending classification. A known way to determine the optimal number of groups is to implement the chosen algorithm several times by defining a different number of groups each time, then use an elbow method, or determine a silhouette coefficient, or generate a dendrogram when the chosen clustering algorithm is a hierarchical ascending classification. [Fig.2] shows, as an illustrative example, three groups (7, 8, 9) of individual curves in reduced dimension, constructed using a k-medoid algorithm. Two dimensions are shown here to facilitate the visualization of the groups but, in general, the dimension of the reduced space of curves is greater than 2. It has thus been described how: - carry out a reduction in the dimension of load curves of length deemed sufficient to account for all seasonal fluctuations in consumption, and - partition the load curves into reduced dimensions based on a similarity criterion, - thus leading to a classification of the electrical installations to which these reduced-size load curves correspond. The remaining electrical installations should also be included in the result of this classification: those corresponding to a load curve whose length is deemed insufficient. We assume that we have a given load curve, corresponding to an installation of interest, and covering a time interval between one week and one year. It is known that an electrical installation, for example corresponding to a dwelling, presents fluctuations in consumption (or prosumption) according to a combination of periodic patterns. Typically, load curves include three main periodic patterns, with a period of one day, one week and one year respectively. Periodic patterns with a period of one day and one week allow us to report on the consumption habits of people using the electrical installation, in recurring time slots, according to a daily and weekly schedule. In this case, it is necessary that the given load curve covers a time interval of at least one week, and ideally several weeks, in order to allow the detection, within the given load curve, of periodic patterns having a period of one day and one week, respectively. It is proposed to define a series of time intervals and segment this given load curve into portions, each portion covering a predefined time interval. For example, each time interval can correspond to a week or a month of the year. Thus, the given load curve, covering for example a time interval from January 4 to March 17, can be segmented into three portions corresponding respectively to the consumption data for January, February and March. A portion is represented by a pair of vectors denoted Xcoube € Ximois With respect to the month of January for example, Xcoute Terepresents the consumption data for 28 days (from January 4 to 31 inclusive) and Xrois VAUt 1, i.e. the number of the month of January. Once the given load curve has been segmented, it is possible to construct an assignment model which takes as input the pairs of vectors Xcoube € Xmois €t Classifies as output the portions of the given load curve into the groups resulting from the classification of load curves of length deemed sufficient. To achieve this, individual load curves covering a period of at least one year can also be segmented, for example, into twelve portions corresponding to the most recent monthly consumption data. The twelve portions of the same individual load curve are represented by twelve pairs of vectors that can be provided as input to the assignment model for learning. At the end of the learning, the assignment model can receive a pair of vectors Xcoube Et Xmois and determine degrees of resemblance between this pair of vectors, on the one hand, and those previously provided during the learning, on the other hand. Depending on these degrees of similarity, the assignment model can classify, as output, the portions of the given load curve into the groups resulting from the classification of load curves covering a period of at least one year. For example, the assignment model may classify, as output, the given load curve into the group for which the average degree of similarity between the portions of the given load curve with the corresponding month identifier, on the one hand, and the portions of the group's load curves with the corresponding month identifier, on the other hand, is the highest. Alternatively, the assignment model may assign the given load curve to a plurality of groups by determining a set of similarity parameters. A similarity parameter indicates a degree of similarity between the portions of the given load curve with the corresponding month identifier, on the one hand, and the portions of the load curves of a given group with the corresponding month identifier, on the other hand. The set of resemblance parameters can be normalized between 0 and 1, thus representing, for each group, the probability that the given load curve has a maximum degree of resemblance with said group rather than with any other group. More precisely, the assignment model can be a dual-input neural network as schematized in [Fig.3]. The neural network represented comprises two branches, forming a convolutional block (10) and a dense block (14). The convolutional block comprises a plurality of ID convolutional layers (12). These 1D convolutional layers are specific to time series and similar, for example, to that of an autoencoder, they are capable of receiving as input a portion of X,oube curve (11) and of providing as output, for example, a portion of denoised curve (13). The dense block comprises a plurality of dense layers (16) capable of receiving as input a time interval identifier, for example a month identifier (15), and of carrying out any computer formatting adapted for the needs of a downstream classifier. The output (17) of the dense block (14) is concatenated to the output (13) of the convolutional block (10). The assignment model training can be performed from individual load curve segments covering a period of at least one year, associated with the corresponding time interval identifiers. The outputs of the assignment model during training are reference datasets, which can be provided as input to a classifier using an algorithm of grouping as described previously. The classifier is thus able to constitute groups of reference data sets, or equivalently groups of electrical installations, the electrical installations of the same group having in common the fact of having similar load curves during a time interval corresponding to the same period of the year. Thus, at the end of the training, the assignment model is able to receive as input a portion of a given curve covering an interval between one week and one year, accompanied by a time interval identifier, and provide as output a dataset of interest which can be compared with the groups of reference datasets formed during the training. In a simple approach, the classifier can associate the dataset of interest output from the assignment model with a single group of reference datasets based on a similarity criterion. This means that the electrical installation of interest can be considered as assigned to a single group of reference electrical installations: the one whose electricity consumption is most similar at the same time of year. In a more complex approach, the classifier can associate the dataset of interest output from the assignment model with several groups of reference datasets. More precisely, the classifier can determine a set of coefficients indicating, for each group of reference datasets, the probability that the dataset is assigned to it, based on a similarity criterion. This indicates that the electrical installation of interest can be considered as assigned, to varying degrees, to several groups of reference electrical installations: the one whose electricity consumption is most similar at the same time of year having the highest coefficient. It has thus been described how to assign an installation of interest to one or more of the previously formed groups, based on a consumption history of the installation of interest which is not more than one year, but rather of the order of a few weeks or months. The widespread implementation of this allocation method makes it possible, downstream, to predict the future consumption of the vast majority of installations in an electricity network, including those for which only a consumption history limited to a few weeks or months is available. We now describe a method for predicting the future consumption of an installation of interest by considering a fixed group (or cluster) to which the installation is assigned. The method presented naturally extends to all groups or clusters constructed. This method is based on statistical models based on the Bayesian approach. The particularity of the Bayesian approach lies in the fact that the parameters of the statistical model (for example, the coefficients of a linear regression) are assumed to be random, just like the variables. Therefore, before the inference of the model, it is possible to predict probability distributions that represent a priori the behavior of the parameter(s). These distributions are called "prior distributions" and make it possible to model the a priori information available on the parameters before observing the data. A prior distribution (for example: "the parameter has a mean of ...", or "the parameter is positive") is constructed using expert knowledge on the problem considered. The estimation of the parameters is then not based solely on the data. A prior distribution can be more or less informative. A so-called weakly informative prior distribution is relatively imprecise.For example, this is a beta law parameterized by two shape parameters, typically noted " and fB, both less than or equal to 2. In practice, it can be difficult to integrate a priori information in a relevant way. Concretely, if we consider a parametric model where the parameter of interest is noted 6 and follows a prior distribution noted (0), the goal of the Bayesian approach is to determine the "posterior distribution" (0 | X): this is the distribution of © given the data, noted X. If the two distributions (6) and (0 | X) are close, this means that the prior information has been well defined. If the two distributions are far apart and we have a sufficient volume of data, the posterior distribution converges towards the "true" value of the parameter of interest, despite the fact that the prior information is false. If we have little or no information on the parameter of interest, we can consider a weakly informative approach, or even non-informative. Asymptotically, the influence of the prior distribution decreases. Posterior distributions are essential, particularly when we want to predict a new observation or construct intervals. The problem that arises is the following: if we have little data and we want to take advantage of the Bayesian approach, it is necessary to have strong a priori information to integrate into the model. In this case, the lack of data does not allow a posteriori convergence towards the correct value of the parameter. This problem appears concretely when we are interested in the forecasting of individual consumption of electrical installations of interest for which the consumption history or prosumption is less than one year. Indeed, even without having complete information on the consumption habits at the level of these electrical installations, we want to be able to predict their future consumption sufficiently precisely. Adopting a weakly informative approach directly on these electrical installations of interest would not be appropriate.Therefore, it is proposed to construct informative a priori laws for these electrical installations of interest by taking advantage of the available knowledge relating to other electrical installations. comparable for which, conversely, a history of more than one year is available. Reference is now made to [Fig.4], which summarizes an example of implementation of the proposed method for predicting future consumption of a facility of interest. We have a database relating to a group of electrical installations with a long history. This database is denoted D'=(X,,V;) (20). i is a natural integer between | and I, where I denotes the number of installations in the group. X; denotes the load curve of a given installation expressed in reduced dimension. V; denotes a set of additional data relating to the given installation considered individually. Such additional data may include, for example, a time series of outdoor temperature values ​​at the same time as the load curve, an indication of possession of an electric heating system or an indication of possession of an electric water heater. Generally speaking, the additional data are supposedly correlated, directly or indirectly, with the electrical consumption or prosumption of the given installation, the extent of this correlation not always being formally known. It is proposed to determine an a posteriori distribution for this group of long-history electrical installations using a weakly informative approach. This a posteriori distribution defines how individual electrical consumption at a given time is correlated with various explanatory variables assumed to be known at the given time. To determine this posterior distribution, a hierarchical Bayesian regression model is applied to the database D!. The dependent variables of the model are the loading curves X;. The explanatory variables of the model are the additional data V.. [Fig.5] represents the general principle of an acyclic directed diagram suitable for this hierarchical Bayesian regression model. Each electrical installation in the group of long-history electrical installations is associated with an individual parameter denoted 6; (19), which can follow a prior distribution denoted (6:10) depending on a parameter of interest © (18) common to all the installations in the group, also called a hyperparameter. This hyperparameter 6 follows a weakly informative prior distribution (21) denoted 1,(6). The marginal posterior distribution of © after inference (22) is denoted :1,(0ID'). This is an affine relationship between the dependent variables X; (i.e. the individual load curves) and one of the explanatory variables V (e.g. the outside temperature). This affine relationship can be denoted X; = 0; V; + a, where a is a constant. Alternatively, it is also possible to determine the marginal posterior distribution of © after inference x,(0ID!) by following a non-informative approach, i.e. without having provided any a priori distribution. Indeed, the group of electrical installations at A long history can be formed, for example, by tens or hundreds of thousands of electrical installations. Such a volume of data makes it optional to define any a priori law in order to be able to determine the a posteriori law. In parallel, there is a database (25) relating to an electrical installation of interest with a short history, assigned to the group. This database is noted D*. It contains a load curve of the electrical installation of interest, which as specified covers a time period greater than one week, but less than one year. The database D* also contains additional data of the same nature as those present in the database D!. To estimate the consumption of the installation of interest from the same explanatory variables as for the previous model, a hierarchical Bayesian regression model is applied to the database D*. An informative approach, based on the marginal a posteriori distribution x,(6 / D"), is adopted. More precisely, one or more pieces of information, called "moments" (23), are extracted from the posterior distribution m(0ID'). The moments of the posterior distribution denote, for example, the mean and / or the variance of the parameters 6,. Alternatively, the quantiles of the posterior distribution, for example, the median and / or the 1* and 9*w deciles, can be extracted. In addition, a set of parameters K (24) can be obtained. This set of parameters models the similarity, in terms of consumption profile, between the installation of interest and those represented by the initial base D'. The more similar the bases D! and D* are, the closer these parameters k are to 1. The moment(s) of the a posteriori law, combined with the set of parameters k, are then used to construct the a priori law (26), noted: 1.(0,k), of a parameter of interest, noted 0, of the installation of interest. In a simple example, the parameters k are set equal to 1. The prior law (0,k) After inference of the hierarchical Bayesian model applied to the database D* and using the prior distribution (0,k), a posterior distribution (27) of © given the data D*, noted 7t,(0,kID*), is obtained. Thus, the a posteriori law 7,(0,kID*) takes into account both: - the way in which the past consumption or prosumption of the installation of interest, based on a short history, has been affected by different variables, and - the way in which past consumption or prosumption of similar installations, based on long histories, is usually affected by these same variables. This a posteriori law x(0,kID*) can be used to construct a prediction law (28) of the future consumption (or prosumption) of the installation of interest, that is to say a formula allowing this future consumption or prosumption to be calculated from a set of explanatory variables. To do this, it is necessary to collect the forecast values ​​(29) of all or part of the explanatory variables, noted Vt*n, for a forecast horizon. This could be, for example, daily forecasts of outside temperature over the next few days. Applying the law a posteriori taking into account these forecast values ​​makes it possible to predict future consumption (or prosumption) values ​​(30). This could be, for example, daily consumption forecasts, noted Xt*, for the forecast horizon. The consumption forecasts thus determined offer numerous applications, in particular with regard to the management of electricity distribution networks at a local level. A constant challenge for an electricity distributor is to balance the total energy injected and the total energy withdrawn at all times. Too great an imbalance risks causing a power outage. To prevent this, it is possible to act at different levels. For example, it is possible to limit the total energy injected when withdrawals are at a low level, or conversely to increase the total energy injected when withdrawals increase. Withdrawals can also be controlled to adapt to injections. For example, batteries connected to the grid can be used as temporary storage for excess energy. Planning the withdrawals from a given electrical installation, or from a group of given electrical installations connected to the electricity network in the same locality, makes it possible to anticipate the needs in terms of injections at the local level. Planning both injections from an electrical installation equipped with photovoltaic panels and withdrawals from neighboring electrical installations also makes it possible to anticipate needs in terms of additional injections or additional withdrawals at the local level. An example of a possible action is, for example, to control the charge level of batteries connected to the network, by charging these batteries several hours or days in advance in anticipation of an expected peak in withdrawals. This makes it possible, for example, to prioritize the self-consumption of an electrical installation equipped with production means. Another example of possible action is, for example, to interrupt the operation of an electricity production facility connected to the network when the expected withdrawals from a set of electrical installations, over a period of several days, remain permanently below a predefined level. Generalize the prediction method to all electrical installations in a given territory allows, for example, to predict the end of a peak in consumption on a territorial scale, and to anticipate the shutdown of a means of electricity production specifically designed to cope with this peak in consumption. This helps to ensure continuity of service while promoting the use of renewable energies, or nuclear energy, rather than fossil fuels, currently reserved to cope with such occasional peaks in consumption. Generally speaking, the proposed prediction method allows, at a given date, to predict the consumption or prosumption of one or more given electrical installations at a future date. This forecast can then be used to detect a potential significant disparity between the injections and withdrawals planned at a local level, such a disparity cannot be compensated by the balancing means already present at the local level. To prevent this in advance, it is possible to make available locally, before the future date, additional means of balancing between the total energy injected and the total energy withdrawn. Such balancing means, making it possible to act on the injections and / or on the withdrawals, are known to the person skilled in the art and are not detailed here. Thus, at the future date, the additional balancing means, previously made available, can be used to successfully balance the injections and withdrawals. The proposed method also helps guide choices made when sizing a transmission, distribution, or industrial electrical network. For example, during the construction of a new residential building, the first electricity consumption readings, for example in July, allow the corresponding installations to be assigned to groups of installations with a similar consumption profile. The proposed method then makes it possible to predict, with greater accuracy than known methods, the electricity consumption of these installations over the following months. The distribution electrical network can then be specifically sized based on the maximum annual withdrawal value thus predicted. As an illustration of the presented prediction method, a practical example is now described. For an installation of interest, we have a consumption history, at daily intervals, covering a period of 37 days. This consumption history (i.e. all 37 discrete values) is represented graphically in [Fig.6] and corresponds to D*. The installation of interest is further assigned to a group of installations D' having similar characteristics, for example in terms of: - average and / or maximum daily consumption, and / or - the presence or absence of high-power consuming equipment such as electric heating or an electric water heater, and / or - presence or absence of generating equipment such as photovoltaic panels or a storage battery that can be used as a source of electricity. Such presences or absences can be inferred, for example, by various known methods or directly reported by a user of the electrical installation. For each facility in group D' to which the facility of interest has been assigned, 365 days or more of consumption history is available. A first Bayesian model is learned on group D}, and the resulting marginal posterior distribution :1,(0ID') is recovered. We then learn a second Bayesian model, individual, for the installation of interest. This second model is based on the moments of the posterior distribution x,(0ID') previously recovered as a priori information. Optionally, the installation of interest has been previously assigned not only to group D' but to several groups of reference installations, and a set of coefficients k materializes the respective degrees to which the installation of interest is assigned to each of these groups. In such a case, the first Bayesian model is successively learned on each of the reference dataset groups, and the resulting marginal posterior distributions are recovered. We then learn the second Bayesian model, individual, for the installation of interest. This second model is based on an average, weighted by the set of coefficients k, of the moments of each of the previously recovered posterior distributions, as a priori information. The posterior distribution (0 ID*) of the second model learned on the 37 days of consumption history is recovered. An objective may be to forecast, for the installation of interest, the daily consumption levels for the following 22 days. The forecast horizon is then h = 22 days and the objective, on day 37, is to forecast the consumption for each of days 38 to 59. To do this, from the posterior distribution of the second model, the predictive distribution of daily consumption is determined. This distribution is used to predict, on the basis of temperature forecasts up to 14 days and then on the basis of the normal seasonal temperature beyond, the daily consumption for each of the desired days. The daily consumption values ​​(32) thus predicted are represented in [Fig.7], with the limits (33) of an associated confidence interval. For comparison, forecast values ​​(35) of daily consumption from a classical linear model are shown in [Fig.8]. An example of a classical model links daily consumption to daily temperature by means of an equation, for example linear or polynomial, whose coefficients are fixed on the basis of indicators of the presence or absence of different equipment, such as electric heating and a domestic hot water tank. Figures 7 and 8 also show the actual values ​​(34), obtained a posteriori, of the daily consumption of the installation of interest over the period corresponding to the forecast horizon. We note that the Bayesian forecast, even if it does not capture all the consumption peaks, follows the trajectory of the real curve better than the classic “frequentist” forecast. To formally assess the quality of a forecast, it is generally possible to use the criterion known as the mean absolute percentage error (MAPE). The table below compares the quality of Bayesian forecasting and classical forecasting from the point of view of the mean absolute percentage error criterion. (25% [50% [Average [75% |Max 3.86 8.89 10.94 [16.75 34.39 Quantiles |Min of MAPE (%) Forecast |0.51 Bayesian [p.41 12.00 [1.76 [5.71 [pat 1200 |1680 |36.63 Forecast | classic According to this criterion, the proposed Bayesian prediction model outperforms a conventional linear regression model. In particular, the median of the point error is 8.89% for the Bayesian model compared to 9.41% for the conventional linear regression model. In this particular example, for the estimation of each of the models (Bayesian and individual) as well as for the prediction of new observations, the R software and the Stan and Rstan libraries dedicated to the implementation of the Bayesian approach were used. Reference is now made to [Fig.9] which represents an example of a processing circuit for implementing the above method. Such a processing circuit CT (100) comprises at least one CPU processor (101) connected to a support non-transitory recording medium MEM (102) on which is recorded a program comprising instructions for implementing the above method. The processing circuit may further comprise a COM communication interface (103) with at least one third-party device. The COM communication interface (103) may, for example, be controlled to receive electrical consumption readings in order to generate load curves, or to transmit consumption predictions to an electrical network manager so that these predictions serve as a basis for providing means for balancing the electrical network by injection and / or withdrawal.

Claims

Claims

1. Method of balancing between a total injected energy and an energy total withdrawn at a local level in an electrical network, the process including: - obtain a data set of interest indicative of an evolution temporal consumption or prosumption of an installation electrical energy of interest connected to the electricity network over a period past greater than or equal to one week and less than one year, - by an individual Bayesian analysis of the dataset of interest, individual Bayesian analysis using a priori distribution defining a hyperparameter of the dataset of interest, establish a marginal law a posteriori of the hyperparameter, the a priori law comprising at least one affine relation, established according to a linear regression model, between a set of explained variables x, and an explanatory variable y, an explained variable being determined from a reference data set indicative of an evolution temporal consumption or prosumption of an installation electrical over a past period greater than or equal to one year, - predict the amount of energy injected into the network or withdrawn from the network by the installation of interest, at a future date, on the basis of the law marginal a posteriori, - according to the predicted amount of energy, make available in advance a means of injecting and / or extracting energy capable of contributing to balance the total energy injected and the total energy withdrawn, on the date future and local audit, in the electricity network, and - at the future date, balance the total energy injected and the total energy drawn from the said local level in the electricity network using, at less, the means previously made available.

2. A method according to claim !, wherein the dataset of interest is derived from a short time series associated with the installation electrical of interest, the short time series comprising a plurality of pairs of data indicative of an electrical consumption of the installation associated with a succession of time intervals past elementary.

3. A method according to claim 1 or 2, comprising: - obtain a set of reference data sets, - partition the set of reference datasets based on of a similarity criterion so as to form a plurality of groups of reference datasets, and in which the affine relationship is established according to a regression model linear applied to one of the groups of reference data sets.

4. A method according to claim 3, comprising: - assign the dataset of interest to one of the dataset groups trained reference data, and in which the affine relationship is established according to a regression model linear applied to the reference dataset group to which the dataset of interest is affected.

5. A method according to claim 3, comprising: - assign the dataset of interest to multiple dataset groups trained reference data, and in which the prior law comprises a weighted sum of a plurality of affine relations, an affine relation being established according to a model of linear regression applied to a group of benchmark datasets to which the dataset of interest is assigned.

6. A method according to claim 4 or 5, comprising: - temporally segment the data sets, a segment of a data set data being indicative of the temporal evolution of consumption or prosumption of the corresponding electrical installation on a portion of the past period, - associate each segment with an identifier of the corresponding portion of the said past period, - train artificial intelligence based on game segments reference data associated with portion identifiers, and in which to assign the dataset of interest to at least one of the trained reference dataset groups include: - provide, as input to the previously trained artificial intelligence, a segment of the dataset of interest and the portion identifier partner, and - obtain, as output, an assignment of the dataset of interest to at at least one of the groups of reference data sets formed.

7. Method according to one of claims 3 to 6, wherein the model of Linear regression is a hierarchical Bayesian model.

8. Method according to one of claims 1 to 7, in which predicting a quantity of energy injected into the network or withdrawn from the network by the installation of interest, at a future date, on the basis of the marginal law has posteriori includes: - construct, on the basis of said marginal law a posteriori, a law predictive of said quantity of energy based on a forecast value sional of an outside temperature, - obtain a forecast value of the outside temperature at level of the facility of interest at the future date, and - predict said quantity of energy from said predictive law and said forecast value.

9. Computer program comprising code instructions program for executing the method according to one of the claims 1 to 8, when said program is executed on a processing circuit of data.

10. A non-transitory, processor-readable recording medium on in which the program code instructions are recorded computer according to claim 9.

11. — Data processing circuit comprising a processor connected to a non-transitory recording medium, the processing circuit of data being configured for: - obtain a data set of interest indicative of an evolution temporal consumption or prosumption of an installation electrical energy of interest connected to the electricity network over a period past greater than or equal to one week and less than one year, - by an individual Bayesian analysis of the dataset of interest, individual Bayesian analysis using a priori distribution defining a hyperparameter of the dataset of interest, establish a marginal law a posteriori of the hyperparameter, the a priori law comprising at least one affine relation, established according to a linear regression model, between a set of explained variables x; and an explanatory variable y, an explained variable being determined from a reference data set indicative of an evolution temporal consumption or prosumption of an installation electrical over a past period greater than or equal to one year, - predict the amount of energy injected into the network or withdrawn from the network by the installation of interest, at a future date, on the basis of the law marginal a posteriori, - according to the predicted amount of energy, make available in advance a means of injecting and / or extracting energy capable of contributing to balance the total energy injected and the total energy withdrawn, on the date future and at said local level, in the electricity network, and - at the future date, balance the total energy injected and the total energy withdrawn at said local level in the electricity network using, at least, the means previously made available.