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)
This commit is contained in:
Sravan Balaji
2021-12-09 14:18:53 -05:00
parent 28ad7d9d21
commit 3e873fc597

View File

@@ -1,4 +1,13 @@
%% Close Figures, Clear Workspace, and Clear Terminal
close all;
clear;
clc;
%% System Parameters %% System Parameters
% Track Information & Reference Trajectory
load("TestTrack.mat");
load('ROB535_ControlProject_part1_Team3.mat');
% Vehicle Parameters (Table 1) % Vehicle Parameters (Table 1)
global Nw f Iz a b By Cy Dy Ey Shy Svy m g global Nw f Iz a b By Cy Dy Ey Shy Svy m g
Nw = 2; Nw = 2;
@@ -30,8 +39,9 @@ state_init = [ ...
0; ... % r [rad/s] 0; ... % r [rad/s]
]; ];
%% Load Files % Simulation Parameters
load("TestTrack.mat"); T_s = 0.01; % Step Size [s]
T_p = 0.5; % Prediction Horizon [s]
%% Setup %% Setup
curr_pos = [state_init(1);state_init(3)]; curr_pos = [state_init(1);state_init(3)];