Currently I am building a tricopter which runs on nodejs and uses pi-blaster(https://github.com/sarfata/pi-blaster) I've got everything working nicely except my custom PID can't stop small oscillations. By watching and listening (to RPM difference), I came to the conclusion that the RPM of the engines only change when the values for example go from 0.128 to 0.129; when the PID gives 0.12812 for example, nothing seem to change. And this is most likely the main reason it can't get accurate stabilisation.
So I went on to investigate it more and discovered that indeed the (pi-blaster) resolution is currently limited to 3 decimals (0.000)..
This is the relevant config:
PWM frequency: 100 Hz
PWM steps: 1000
Maximum period (100 %): 10000us
Minimum period (0.100%): 10us
If I can get a resolution (or steps) of 4 decimals (0.0000) I would probably get very nice results, a resolution of 5 would be even nicer, but I am not sure if the is possible performance-wise.
I can play around with the values but I don't really understand the underlying logic and what I am doing..
Can anyone assist me on getting the desired resolution?
Some more info:
- the tricopter uses 3 ESC's with 3 engines
- the gyro update loop runs at 50 times per second (20ms per update)
- running on raspberry pi3
If you need more info please let me know.