diff --git a/Naman_LQR_Working.m b/Naman_LQR_Working.m index e5c9e61..f3f6e5b 100644 --- a/Naman_LQR_Working.m +++ b/Naman_LQR_Working.m @@ -78,26 +78,26 @@ impulse(discrete, 0:T_s:1); %% Define goals %Goal 1: settle at 1m height <2s x_0_up = [0, 0, -1, ... - 0, 0, 0, ... - 0, 0, 0, ... - 0, 0, 0]'; %Redefine origin! + 0, 0, 0, ... + 0, 0, 0, ... + 0, 0, 0]'; %Redefine origin! %Goal 2: Stabilize from a 10-degree roll and pitch with <3deg overshoot x_0_pitch = [0, 0, 0, ... - 0, 0, 0, ... - 10, 0, 0, ... - 0, 0, 0]'; %Pitch of 10 degrees + 0, 0, 0, ... + 10, 0, 0, ... + 0, 0, 0]'; %Pitch of 10 degrees x_0_roll = [0, 0, 0, ... - 0, 0, 0, ... - 0, 10, 0, ... - 0, 0, 0]'; %Roll of 10 degrees + 0, 0, 0, ... + 0, 10, 0, ... + 0, 0, 0]'; %Roll of 10 degrees %Goal 3: Move from position (0,0,0) to within 5 cm of (1,1,1) within 5 seconds. x_0_trans = [-1, -1, -1, ... - 0, 0, 0, ... - 0, 0, 0, ... - 0, 0, 0]'; %Redefine origin! + 0, 0, 0, ... + 0, 0, 0, ... + 0, 0, 0]'; %Redefine origin! %Define Q and R for the cost function. Begin with nominal ones for all. Q = diag([1000, 1000, 1000, ... % x, y, z