This is probably an elementary question, but I wanted to be sure.
I have a system that reads instantaneous watts values, and stores them as "events", with a power value and a time value.
According to the answer here (Should I multiply by time to determine Watt-hours?) it's simply an "take an average of the power readings, then multiply by time" to get it. That's the crude version, then calculus is mentioned.
Unfortunately, most of my calc has left me behind, and I'm not sure what type of integration to do over a set of points that doesn't really have any rhyme or reason (ie, f(x) is not just x^2, it's kind of all over the place).
Is the integration version that much more accurate? If I were trying to calculate the kWh over time for my house, and match it as close as possible to what the power company bills me for at the end of the month, what would be best? Is the average * time good enough?
FWIW, I'm in python, and looking at http://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html . I'm assuming (again, calc was quite a while ago) that I'd use the
trapz version, since the others appear to need a function, and
simps?) appear to work on sample-style data.
Thanks very much for any help!