Chronology feed calculations

Hi All,

I have a question regarding calculating the powerusage in a household. I currently have 4 feeds that I use for calculating the power usage from. 2 of those feeds are from the PV systems, and the other 2 are current power import and export. My calculation is as follows:

pv_1 + pv_2 + power_in - power_out = power_usage

What does happen with this setup, is that the usage jumps all over the place on a day with clouds and sun. It seems that the feed updates do not happen all at the same time, so the pv_1 and pv_2 feed can be of an extreme higher value that when the last update of one of the other feeds did happen. I have all the feeds updating every 10 seconds. 

Example of the calculation outcome, where power_usage should be a value of around 260 but now is not.

PV_1 PV_2 POWER_IN POWER_OUT POWER_USAGE
56 58 150 0 264
420 438 150 0 1008
265 230 0 744 -249
112 150 0 0 262
496 480 0 0 976
487 480 0 716 260
112 120 100 0 332
450 450 100 0 1000
486 478 0 740

224

 

 

 

 

 

 

 

 

 

What happens here is that the feed values are not updating all at the same time, so the outcome is not as expected. Is there a trick to make the calculation more robust?

 

 

 

 

 

 

 

 

 

jonrescca's picture

Re: Chronology feed calculations

No one around with similar issues?

TrystanLea's picture

Re: Chronology feed calculations

jonrescca, are all the readings coming from the same emontx?

JetJackson's picture

Re: Chronology feed calculations

This had crossed my mind too... (but not seen it)

jonrescca's picture

Re: Chronology feed calculations

No, the feeds have indeed a different origin, I understood that this is the origin of the problem.

I have 3 different sources supplying inputs. Those sources have a update frequenty of 10 seconds. Now that I think about it I need to rewrite my shellscripts that get the data from the sources into 1 script that updates emoncms to provide data using bulk mode. That should solve the sync issue.

pb66's picture

Re: Chronology feed calculations

Bulk upload isn't essential and can actually pass different times for each array ( if set as such) it maybe beneficial to combine your scripts and use 1 node id ,  you could send one array every 10 secs,  this ensures all the values will have the same time stamp and the emoncms input processing will also be uniform as the one node updates.

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.