From 3e873fc597e704679d80414a20fe7cb72ae556dd Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Thu, 9 Dec 2021 14:18:53 -0500 Subject: [PATCH] Simulation Parameters & File Loading - Rename `xenia_sravan_nonlinearopt.m` to `part2_MPC_controller.m` - Add commands to close figures, clear workspace, and clear terminal - Load track information & reference trajectory - Add simulation parameters (step size & prediction horizon) --- ...ravan_nonlinearopt.m => part2_MPC_controller.m} | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) rename Experimentation/{xenia_sravan_nonlinearopt.m => part2_MPC_controller.m} (97%) diff --git a/Experimentation/xenia_sravan_nonlinearopt.m b/Experimentation/part2_MPC_controller.m similarity index 97% rename from Experimentation/xenia_sravan_nonlinearopt.m rename to Experimentation/part2_MPC_controller.m index 46989c0..8d70b2a 100644 --- a/Experimentation/xenia_sravan_nonlinearopt.m +++ b/Experimentation/part2_MPC_controller.m @@ -1,4 +1,13 @@ +%% Close Figures, Clear Workspace, and Clear Terminal +close all; +clear; +clc; + %% System Parameters +% Track Information & Reference Trajectory +load("TestTrack.mat"); +load('ROB535_ControlProject_part1_Team3.mat'); + % Vehicle Parameters (Table 1) global Nw f Iz a b By Cy Dy Ey Shy Svy m g Nw = 2; @@ -30,8 +39,9 @@ state_init = [ ... 0; ... % r [rad/s] ]; -%% Load Files -load("TestTrack.mat"); +% Simulation Parameters +T_s = 0.01; % Step Size [s] +T_p = 0.5; % Prediction Horizon [s] %% Setup curr_pos = [state_init(1);state_init(3)];