- #1
Joel Graff
- 4
- 0
Hello,
I'm playing around with simulating drones (quadcopters) in Gazebo (an open source robotics simulator).
The control system is made up of six PIDs (one for each degree of freedom) and I'm encountering trouble tuning the pids for pitch / roll control.
In this case, the linear x / y and roll / pitch control are managed by two cascaded pairs of PIDs. That is, the X velocity is passed into the outer pid of one pair, which then supplies an angle of rotation to the inner pid. The inner pid then calculates the angular acceleration for a direct calculation of the resulting torque.
The physics works fine, but the problem is overcoming the angular momentum. In this case, if I fix the drone in free space and just command a constant 0.392 radian rotation (about 45 degrees), the drone will oscillate between 0 and 45 degrees. The reason, of course, is because as the PID scales it's output w.r.t the limit, it can't take into account the angular momentum that will continue to carry the rotation. Thus, the overcorrection that returns the drone to horizontal.
Not being a big physics guy (or drone guy), I'm at a bit of a loss as to how to address the issue...
Any tips? (Or pointers to forums that are more suited to the problem?) :)
I'm playing around with simulating drones (quadcopters) in Gazebo (an open source robotics simulator).
The control system is made up of six PIDs (one for each degree of freedom) and I'm encountering trouble tuning the pids for pitch / roll control.
In this case, the linear x / y and roll / pitch control are managed by two cascaded pairs of PIDs. That is, the X velocity is passed into the outer pid of one pair, which then supplies an angle of rotation to the inner pid. The inner pid then calculates the angular acceleration for a direct calculation of the resulting torque.
The physics works fine, but the problem is overcoming the angular momentum. In this case, if I fix the drone in free space and just command a constant 0.392 radian rotation (about 45 degrees), the drone will oscillate between 0 and 45 degrees. The reason, of course, is because as the PID scales it's output w.r.t the limit, it can't take into account the angular momentum that will continue to carry the rotation. Thus, the overcorrection that returns the drone to horizontal.
Not being a big physics guy (or drone guy), I'm at a bit of a loss as to how to address the issue...
Any tips? (Or pointers to forums that are more suited to the problem?) :)