You are here

Lower complexity/lower risk duty cycle controller

1 post / 0 new
jschall
Offline
Last seen: 10 months 2 weeks ago
Joined: 2023-07-13 20:36
Posts: 5
Lower complexity/lower risk duty cycle controller

I found the "downramp controller" code to be overly complex, asymmetrical (which is bad for drone controls) and to cause overcurrent faults sometimes.

I've replaced it with this: https://github.com/jschall/bldc/commit/2f979c45fbec9f660a1b5677d52b6ef1e...

It is intended to emulate the "natural" behavior of a DC motor, with an adjustable gain that lets you tone it down if it is unstable due to too little rotor inertia. (The gain is nominally 1)

I don't know how to add config parameters, so I repurposed foc_duty_dowmramp_kp

If there are any ideas for how to improve this, open to suggestions!