Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
#68
PID Tuning
Whilst I’ve been doing a more in depth review of Harmony I have switched between different hubs. Each hub has a different amount of slack, shift range and multipliers used. This got me thinking about the values used in the PID of the cadence correction or in my case just the P and I. Maybe it was time I learnt more about PID tuning so I can get it the work as smoothly with the newer N360 as the worn N380.
The basics of PID tuning are to increase P until oscillations occur, half it, then add in as much I and or D without making things become unstable again.  I set off on a ride and had a go at improving the values used with the N380. Here are some screenshots I captured during the process.

Red – cadence, Green – cadence setting, Blue – speed, Orange – battery % (affected by current), Light blue – P + I, Grey  - P and Black – I.
Just P but to much
[Image: GMww6R.png]
Too much I
[Image: Q5fihT.png] 
Too much of both
[Image: Ef2bf3.png]
Just about right
[Image: MubIaq.png] 
The result was that I ended up with the same values as I started with.

Loop speed
Ever since early on in the project I have used half a second for the loop delay and never tried increasing it. After some experimenting it turns out it really doesn’t make any noticeable difference increasing it. The accuracy of the shifting is mostly limited by the servos speed and ability to shift under load. The natural oscillation of my legs and the auto shifter due to too much gain remained similar, 3 seconds +- ½ a sec. So at the end of this turns out things were about optimum but have learnt a lot about setting it up for different hubs.
- Oran
Répondre


Messages dans ce sujet
RE: Attempt at cheap homemade version of Harmony - par Oran - 2018-06-02, 17:53

Atteindre :


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