Hi everyone,
I was trying to implement a LQR controller. I linearized the system using linearizeDrone_motorcmdTostate.slx model then I ran the LQR.m script to obtain the K matrix but then when I implement this in the simulation I get the following error:
Error in 'sim_quadrotor/Drone_Dynamics/Dynamics (Robotics Toolbox Peter Corke)' while executing MATLAB S-function 'quadrotor_dynamics', flag = 1 (derivatives), at time 1.1500000000000001.
|roll| greater than pi/2!
I still have no idea why the roll angle always diverges like this.
Thanks,
Hi everyone,
I was trying to implement a LQR controller. I linearized the system using linearizeDrone_motorcmdTostate.slx model then I ran the LQR.m script to obtain the K matrix but then when I implement this in the simulation I get the following error:
Error in 'sim_quadrotor/Drone_Dynamics/Dynamics (Robotics Toolbox Peter Corke)' while executing MATLAB S-function 'quadrotor_dynamics', flag = 1 (derivatives), at time 1.1500000000000001.
|roll| greater than pi/2!
I still have no idea why the roll angle always diverges like this.
Thanks,