My problem concerns a mass balance reconciliation in an industrial system.
I have a node with several flows in-coming and one or several out-coming, what's incoming should equals what's out-coming (mass conservation, Lavoisier 1777). Of course, when you perform direct or indirect measurements in real life, it is rarely the case (measurments errors, aparatus precision, mistakes, sampling errors, ..). Fortunately, many methods to reconciliate the data exit. In our case, it is a problem of optimisation: minimising an objective function while respecting constraints.
Here is a presentation illustrating my words:
https://www.slideshare.net/AntoineCollet9/20190804massbalancereconciliationslideshare
And here some chunks of code both in R (Rmd) and python, linked with the presentation:
https://gitlab.com/antoinecollet5/datareconciliation
Now that you get the big picture, let me introduce the issue I am facing:
In the previous example, I am treating a case where all flows have been measured and then, the uncertainties are the same i.e. it is the aparatus/method precision.
Now, lets assume that all variables are in fact day-based time series. I will have to perform this reconciliation each day, which is very simple to do from the previous code (simply by adding a for loop).
In real life of course, some measures will be missing (problems with the aparatus, wrong reporting, etc.) or removed because considered as outliers. I then interpolate all missing data (linear, cubic splines, kalman,...). The big question now is how to calculate the uncertainties associated with these interpolated values ? I was not able to find papers/examples clearly talking about that... I guess that the further from measured data, the higher the uncertainty should be, but how to quantify it from the base uncertainty? Is there a rule of thumb ? I precise that I know it will depends from the interpolation methods and that some already include uncertainties calculation. I am looking for something more general...
Here is a graph to illustrate my words:
Thank you in advance for your help :)