# Low pass filtering effect on accuracy of power measurement

I'm planning on measuring consumed power (for an e-bike) by sampling current and voltage with an ADC and digitally approximating the power based on the obtained values.

I need to pick a sampling rate for the ADC to measure the current.

Based on on the current waveform that I've measure with an oscilloscope I think 1 Msps should be enough but maybe I can get away with a lower sampling rate low pass filtering the current sense voltage before the ADC.

How will the low pass filtering down to 50 kHz and sampling at 100 kHz affect the measurement accuracy of the energy consumed over time if my target is accurate within +/-5%? (I'm not worried about instantaneous power.)

(The below was measured between the battery and controller across a wire shunt amplified with an op-amp from 0 to full throttle with no load. I am not sure if the measurement setup is correct.)

• You'd want to low pass filter beneath the nyquist frequency to prevent aliasing. – Unimportant Jan 7 '19 at 19:41
• Sorry, I got the 2 numbers the wrong way around, the sampling should 2x the highest frequency of-course, corrected. – axk Jan 7 '19 at 19:44
• What errors can you tolerate due to battery loss in voltage when only current is measured? Can you give a spec for desired Power Accuracy and max time interval needed? These answers define the optimal solution – Tony Stewart Sunnyskyguy EE75 Jan 7 '19 at 21:20
• @sunnyskyguy-ee75, battery voltage loss is significant (13s Li-Ion battery, from 54.6V to 39V) so I'll need to measure the voltage as well, but it won't change anywhere as fast as the current, so I'm not worried about that. The time interval would be several hours (e.g. 2 hours) and I would consider 5% a good accuracy. – axk Jan 7 '19 at 21:26
• I've not actually measured the voltage with a scope but I assume the battery being a low resistance source the fluctuations in current shouldn't affect the voltage significantly, but I can sample the voltage at the same rate as the current with a second ADC if needed. – axk Jan 7 '19 at 21:30