Skip to content

Unable to get Hovering with LQR in Simulation  #70

Description

@OmarShadeed

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions