Module voltage "bounce" - sample averaging

SLP ?

user SLP above! :slight_smile:

Probably, the error of different parts of the board is more than 0.004v. I think it is not worth. Over 4v, 0.004 is 0,1% of error. I think we can live with that, can’t we? (it is only my opinion).

I’m not worried about accuracy… It’s more of continuity in the graphs.
It’s easier to see rising or falling trends if it’s averaged out.
For me it’s a nice to have… It sound like @SLP needs it more than me.

@jbuszkie
If you type an ‘at’ sign @, you’ll get a list of users, and the one(s) you choose will be notified that they have been mentioned.

There was confusion last time when I just typed SLP… So I put in the @ to let people know I’m talking about a user…

There are just too many TLAs.

 

 

Three Letter Acronyms :grin:

1 Like

I’m not sure how it’s done in the current version of Grafana, as I run an older version.
You should be able to add the moving average function to your field selector in your query.
(you add it after last or max)

image
Click on the + symbol, select Transformations then select moving_average
You’ll see moving_average(10) after your field selector. If you click on the value, you can select from
a dropdown list, or enter a value of your choice.

Graph with no moving average set:

Same graph with moving average set to 10:

Same graph with moving average set to 30:

1 Like

ooh… That’s much nicer!!! Thanks!

thumbsup
beer_cheer

Ok… My modified code works like I hoped it would. It still should work for user @SLP. and it smoothed out my bumps to .001mV. Not necessarily accurate, but precise… :slight_smile:
Here is what one cell looks like…


With the moving average in Grafana it looks like this:

So here’s what all the cells look like with moving average on top and no moving average on the bottom. Everything right of the purple line is the my altered averaging code.

@stuart, any interest in incorporating this change? It’s pretty benign…
Thanks for putting in the start of the avg code!

Yes sure, are you able to put together a GitHub pull request?

Does it add much to the duration taken by each module?

Does it still quickly respond to voltage changes?

Yeah… I think so… I have to check my stuff in first.

It shouldn’t add any more than your first average code… I just moved the divide to the voltage calculation subroutine… So however extra the float divide takes compared to the integer one you had should be the only extra time…

I have not measured it… but I see no difference in response time… The web update is still probably much slower than any extra time taken by the averaging routine.

Done, I believe

Here my results.
Upload these picture that speaks by itself.
I will continue monitoring, but for me looks perfect! :star_struck:
Thank you.

On normal load (aprox. 500W) the major bounce are reduced as following:
High internal resistance cells: 48mv → 20mv
Low internal resistance cells: 9mv → 8mV
On high load (aprox. 2500W):
High internal resistance cells: 192mv → 43mv
Low internal resistance cells: 71mv → 13mV

Results measured between highest consecutive data points.

@stuart how complicated would it be to get this for v. 4.0 boards ? I would really like this for my solution.

Easy, I’ll make it the default for all boards based on the examples shown above. Give me a day or two.

2 Likes

Thank you :wink:

@stuart another thing i forgot to ask, does the “smoothing” of the voltage reading impact the rules e.g does the rules use the smoothed values ?