Author Topic: Calculate Total Over Tme  (Read 1039 times)

0 Members and 1 Guest are viewing this topic.

Offline john21443Topic starter

  • Contributor
  • Posts: 20
  • Country: us
Calculate Total Over Tme
« on: August 02, 2015, 10:22:51 pm »
This is a math question and not specific to electronics design.  Any assistance (even high level) would be appreciated.

I have a series of data points that represent point in time and current drawn at that point.  Data may have gaps in it.  For example, the typical data point will be every 30 seconds but arbitrary points might not exist.  Also, I may want total current over last 8 hours but there is only 6 hours worth of data.

How do I calculate total current draw over a time period?

I could probably average the current values and use total time difference but am not grasping the method used to utilize the full resolution of the data.

Thanks,

John
 

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: Calculate Total Over Tme
« Reply #1 on: August 02, 2015, 10:56:54 pm »
You need to use calculus, essentially interpolation between the points, summing the "area under the curve". There are many ways of doing this, with various tradeoffs/complexities/error.

See:

https://en.wikipedia.org/wiki/Numerical_integration
https://en.wikipedia.org/wiki/Rectangle_method
https://en.wikipedia.org/wiki/Trapezoidal_rule
https://en.wikipedia.org/wiki/Simpson%27s_rule
 

Offline john21443Topic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: Calculate Total Over Tme
« Reply #2 on: August 02, 2015, 11:03:44 pm »
Perfect...thanks!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf