Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. % This file sets all the parameters.
  2. % DO NOT ADD NEW VARIABLES HERE.
  3. % AS WE WILL REPLACE THIS FILE WITH OUR OWN PARAMETERS TO TEST YOUR CODE!
  4.  
  5. %% Clear The Environment.
  6. clc;
  7. clearvars;
  8. close all;
  9.  
  10. %% Simulation Parameters
  11. % amount of time we will simulate for - subject to change
  12. tend = 1000;
  13.  
  14. %% Plant parameters
  15. g = 9.8;
  16. Vmax = 1000;
  17.  
  18. %% Scenario Parameters (Things you can/should change to test your code!)
  19.  
  20. q_0 = 0; % initial position of car
  21. qdot_0 = 0; % initial velocity of car.
  22.  
  23. % disturbance due to road's incline - numerical value will change
  24. theta = deg2rad(10);
  25. dbar = 0*g*sin(theta); % depends on plant parameters - see project description
  26.  
  27. % desired velocity when no one in front
  28. qdot_ref = 100;
  29.  
  30. % desired inter-vehicle distance
  31. r = 10;
  32.  
  33. % Leader Vehicle Parameters
  34. % velocity of car ahead (leader) = vL  + a*cos(omega * t).
  35. vL = 101;
  36. a = 0;
  37. omega = 10;
  38.  
  39. % initial position of car ahead (leader)
  40. ql_0 = 100;
  41.  
  42. %% Leader Vehicle Parameters for Cutoff Manoeuvre
  43. % Time for cutoff.
  44. t_cutoff = 30;
  45.  
  46. % Distance at which Leader cuts off follower by.
  47. initial_cutoff_distance = 5;
  48.  
  49. % What a initial "far away" distance is .
  50. distance_far_away = 3000;
  51.  
  52. % Whether to enable the cutoff mode!
  53. is_cutoff_manoeuvre = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement