4 ms·
We actually ended up using this when writing a controller for a quadcopter[1]. Essentially, we have one PID controller operate on the absolute angle (error = de
by darshanrai 9y ago
We actually ended up using this when writing a controller for a quadcopter[1]. Essentially, we have one PID controller operate on the absolute angle (error = desired angle - actual angle). The output of this controller is fed into the second controller as the desired rate of rotation (RoR) (error = desired RoR - actual RoR). The output of the second controller is finally fed to the motors.
Apart from being easier to tune, I just found a good article[2] for why this approach works better for problems such as this. For quadcopters, of course, this allows one to easily switch between rate/acro mode and angle mode.
[1] https://github.com/ThePinkScareCrow/TheScareCrow/blob/master/controls.cpp#L284-L285 https://github.com/ThePinkScareCrow/TheScareCrow/blob/master...
[2] https://www.controleng.com/single-article/fundamentals-of-cascade-control/bcedad6518aec409f583ba6bc9b72854.html https://www.controleng.com/single-article/fundamentals-of-ca...
- fest 9y agoThis is also the approach PX4/Ardupilot folks use. It's actually even more elaborate in their case: position loop -> velocity loop -> acceleration/angle loop -> angular rate loop -> motor outputs.
- gugagore 9y agoI think it's worth noting that cascaded PIDs are no more expressive than having a state-space controller. But probably it is easier to tune, as you say. Each integrator is one dimension of state.