KumarRobotics / kr_mav_control

Code for quadrotor control
BSD 3-Clause "New" or "Revised" License
106 stars 42 forks source link

How to tune the so3_control gains? #157

Closed mzahana closed 8 months ago

mzahana commented 1 year ago

Hi.

I would like to know if there is a systematic method of tuning the so3_control gains, especially for actual drones.

How to choose an initial set of values, and how to tune them?

Thank you.

fcladera commented 8 months ago

Tuning closed loop control systems is a topic in itself :D

Penn has a class on aerial robotics where these topics are addressed.

As a general rule, once you get your mass and prop coefficients right, you send step inputs and evaluate the response of the system. This wikipedia article has some figures showing the effects of each parameter.

mzahana commented 8 months ago

@fcladera Thanks for your reply. I agree it is a topic by itself with many research work, but mostly for linear controllers e.g. PID. In fact, I have some research work related to optimal control tuning (https://doi.org/10.3390/s22239240). However, it is designed for linear controllers. Whereas, the so3 is a nonlinear one.

jakewelde commented 8 months ago

Usually, we tune these controllers by tuning the linearization, and then just use those gains for the full nonlinear controller. Practically speaking, this looks like tuning the gains for small initial errors. This is quite effective in practice. See the "Controller Gains" section of this paper for a discussion of a similar approach for a slightly different controller.