- Added possibility for a constant power region, set fslipconstmax=fslipmax if you don't want it!
- Using DMA for serial communication if possible (all boards but Rev1)
- Calculation of ilrms is now being done by averaging with previous RMS values
- Do not swallow the new line in echo
- FP multiplication fixed under LimitCurrent() method. Also, max current is calculated by SVM approach.
- Fix infinite speed when fmax<20
- Fmax minimum set to 21
- brkmax now negative (to be consistent with brknompedal)
Otherwise, here is how it works:
Say you set fweak=100 and fslipmax=3. Then as you reach 100Hz torque will start declining with the square of frequency and thus power will decline linear with frequency. With this version you can counter that decline by allowing slip to become higher than fslipmax.
The parameter fconst now sets the frequency to which a constant power region stretches. The parameter fslipconstmax sets the maximum allowed slip at the frequency.
So now, when fweak is hit (at full throttle) the controller will start to increase slip linearly with every Hz above fweak until it reaches fconst and fslipconstmax.
In my conversion I set fweak=100, fslipmax=3.5, fconst=160 and fslipconstmax=5 and enjoy less drop in power at higher speeds