Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Avg #3

Open
Malapha opened this issue Jul 19, 2017 · 5 comments
Open

Moving Avg #3

Malapha opened this issue Jul 19, 2017 · 5 comments

Comments

@Malapha
Copy link

Malapha commented Jul 19, 2017

I tried to implement a moving avg. But I don't know c++ so I ran from error to error - damn oldschool basic...

Idea would be to calculate a moving avg for the Hashrate without the Need to store values:

Loop (
k++
avg_hashrate=avg_hashrate+ (new_hashrate - avg_hashrate)/k
)

this would enter a state of near Equilibrium over time without the need to store values. One could have a check like
?mod(k)=20 or 50;k=0;k

or just let k constant at 20 to have some tiny but noticable changes (i like this one most)

What do u think?

@orkblutt
Copy link
Owner

Yes it could be nice to have that average...
Can you explain me in details how you compute the k value ?

@Malapha
Copy link
Author

Malapha commented Jul 20, 2017

The goal would be to have a stable and relyable average for the hashrate, but also to be able to account for recent changes due to overclocking.

pls forget the Approach from above with the k.

The goal could be reached by a simple algo:

avg = avg * 19/20 + recent_hr*1/20

This will result in a stable Output - changes will be reflected after a few hr changes. Maybe have the "20" as a configurable var ("Avg Adaptation Factor"); the lower the faster/unstable; the higher the slower/stable

@Malapha
Copy link
Author

Malapha commented Jul 21, 2017

maybe like this, will probably not work due to string / double:

QString hrValue = hrValue*19/20 + hashrate.mid(0, hashrate.indexOf("MH/s"))*1/20;

The LCD Display sometimes shows ":" before the HR.
Edit: ":" not shown with Ethminer 0.12dev

@orkblutt
Copy link
Owner

orkblutt commented Aug 2, 2017

I'm a lazzy dude... I'll do it in the next release :)

@soerenwa
Copy link

soerenwa commented Aug 5, 2017

Can we get a watchdog feature on avg. hash? For hanging GPUs etc,.. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants