Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
#67
Turns out there was a problem with the calculations. Very useful to be able to transmit values to my phone via Bluetooth for live monitoring will riding. This equation for the multiplier ((sin(((Power+powerPrev)/2)/-560))*7)+17 wasn’t working correctly without being fed a float. The change in cadence was due to cadence correction as only the cadence setting equation was working.
With that fixed I then had to fine tune the cadence correction equation to work more smoothly with the ever changing cadence setting. This is where my experiments with PID came in useful. By reducing the amount of proportional and adding the right amount of integral I got rid if the oscillations. These graphs below show the difference between having cadence correction and not.

[Image: bunyA6.jpg] [Image: bwj0bO.jpg]
 
Example of some data recorded, the blue and purple stay pretty close together which makes for an amazing ride experience. Because I’ve become very sensitive to my cadence I can actually estimate my power out by the rpm of my legs.
[Image: yoajca.jpg] [Image: FoHx5N.jpg]
 
I’ve also used what I’ve learnt from this to improve the cadence correction for the constant cadence, no power meter, mode. Always had problems with oscillations at high cadences and sometimes if I changed the cadence setting. Also because the relationship between cadence and multiplier isn’t linear it made sence to have the proportional part of the PID change depending on the multiplier. The result is much smoother operation and no more oscillations. How much better can I make the code. Of course if I get a new hub I’ll probably have to reconfigure everything.
- Oran
Répondre


Messages dans ce sujet
RE: Attempt at cheap homemade version of Harmony - par Oran - 2018-01-28, 16:13

Atteindre :


Utilisateur(s) parcourant ce sujet : 3 visiteur(s)