Hi all,

I am really looking for a solution, but I can really use a nudge in the right direction.

See my nice drawing below....

The curve with a blue / light green area below it represents a costumers electricity supplied by the gird and the green / light green represents a solar costumerstotalsolar generation. The problem is the meter does not record negative values, so we can only guess what portion of the total generation went back to the grid when the demand hits zero. When demand from the grid is greater than zero their total demand is just the sum of the two numbers, but when the demand hits zero this becomes an over estimate, since a portion of that total generation is negative.

I need to estimate the dotted curve below zero when a costumers solar generation exceeds their demand. With that information I can then estimate what their demand would have been without solar.

Let X represent energy from the gird

Let S represent total solar generation

I have the total energy consumption from the grid when X > 0 and total solar generation. My though it is to interpolate the two points using a polynomial in a way that maintains the area of the total generation.

Are there methods for a "constrained" interpolation or are there better methods?

I was also thinking I might need to look at this as a system of equations rather than connecting two points. I kind of see it as a predator prey relationship, but I doubt that model applies.