Recently, I have found a paper which applies different linear and nonlinear controllers on quadrotor. So, I have started to read and apply it.
- I created Matlab simulation for my quadrotor
- I have read and applied LQR controller to the quadrotor
I have been successful in applying both of the aforementioned steps. I can say that based on the plots of mine in Matlab and the plots of the paper. I understood the derivation of the dynamics of the quadrotor, its linearization and construction of the LQR controller. However, one thing I didn't understand is while I can control my quadrotor perfectly along x, y, z translational directions and yaw (z) rotational direction, I cannot control it around x and y (roll and pitch) directions. The quadrotor becomes unstable and does stupid things. I referred the plots of the paper, but interestingly the author of the paper mentioned the plot of only yaw, but not roll and pitch. I checked the controllability of the system by using A and B matrices I got from linearization of the dynamics and the controllability matrix is full matrix. So, the system is controllable and I should be able to control it in every direction. In conclusion, I would like to learn what I am missing and I need your help for that. Thank you very much :)
(I added some related equations in any case)
When a system is (locally) controllable does not mean that you can hold that system at a constant state. Instead, controllability only requires that one can bring a system to any state for only one instance. For example a double integrator, $\ddot{x} = u$, can be held a constant position $x$ with $\dot{x}=0$, but when trying to hold it at a constant velocity then the position will change linearly with time. However, it is possible to bring the double integrator to any position and velocity simultaneously, but only at one moment in time.
Similarly, when you try to hold a quadrotor at a non-zero pitch or roll then the thrust vector is pointing partially horizontal and would indefinitely accelerate the quadrotor sideways (or eventually at a constant velocity if you also include drag from air). But it is possible to drive a quadrotor to a certain orientation and position simultaneously, as is demonstrated in this video.