mirror of
https://github.com/ROB-535-F21-Team-3/Control-Project.git
synced 2025-08-19 09:12:45 +00:00
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:
@@ -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)];
|
Reference in New Issue
Block a user