On-board controller - Thrust and Torque #513
Replies: 2 comments 8 replies
-
I am not 100% sure - but in the Mellinger controller a PID (https://github.com/bitcraze/crazyflie-firmware/blob/2022.12/src/modules/src/controller_mellinger.c#L287) with P values >50000 is used, so I strongly doubt the final values should be so small. You could always log them to make sure. So maybe there is a scaling issue in your gain matrix? |
Beta Was this translation helpful? Give feedback.
-
Hi Folks, Please, For the Mellinger controller, it is used the parameter mass_thrust = 132,000. Where does this number come from ? About the Mellinger paper:Studying the Mellinger Paper, In the equation (2) we have the matrix The inverse of this matrix is,
Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
Dear Group,
Please, Id like to ask for some guidance.
I am working on developing an on-board LQR. I looked at controller_mellinger.c as reference.
In simulation, the CF2 works fine, but in practice, my CF2 takes off and flips over.
It seems that I am missing some parameter related to the torque (Mx, My, Mz).
Let me explain what I have done so far:
The controller is a full-state controller with the state defined as follows,
And the input :
The linearization of the quadrotor dynamics over the equilibrium point X0=[x, y, z, 0, 0, 0, 0, 0, 0, 0, 0, 0] and u0=[mg, 0, 0, 0] is :
The gain K is given by K = ARE(A,B,Q,R).
Simulating the CF2 in python, the system converges to the hover condition. The figure below shows the value of [u1, u2, u3, u4] in simulation.
The absolute values of Mx, My, Mz are smaller than 1.0.
I used the matrix K to implement the on-board controller in CF2.
In my C file, I added:
But my CF2 takes off and flips over.
Please,
Could you help me on this situation?
What could be wrong with my implementation?
I realized that the values of torque (Mx, My, Mz) are very low. Maybe I should multiply them with some parameter.
Thanks for all help.
Jose
Beta Was this translation helpful? Give feedback.
All reactions