Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

...

  • Parameters

    • v: (float) final velocity of the car to accelerate to, (m/s)

    • vwind: (float) velocity of the wind relative to the car, (m/s)

    • v_old: (float) initial velocity of the car, (m/s)

    • theta: (float) angle that must be climbed (radians) personally don’t understand why “climb” matters and not just angle of elevation

    • timestep: (float) Time between measurements, (s)

      • usually calculated dist / ((v + old_v)/2), dist being the distance between two points in elevation profile, e_profile.

  • Returns

    • Fmotor: (float) Force of motors required to accelerate to a certain velocity in a certain time (N)

  • Note

    • If v or v_old greater than maximum speed or less than minimum speed, it is caught in the function and whatever is out of bounds is set to maximum speed or minimum speed

    • Ffric, Fdrag , Fg , Fa, and ultimately Fmotor to be all calculated inside the function, using parameters and constants

...

  • Parameters

    • v_profile: (float list) A list of the same dimensions length as the e_profile with each element representing the average velocity (m/s) required for the car to move at each point on the e_profile

    • e_profile: (Numbers) velocity of the wind relative to the car, (m/s, 2D float list)

      • Each row represents a section of a course

      • column 0: the pitch/slope/steepness of the section (rad)

      • column 1: the length/distance of the section (m)

    • distance: (Numbersfloat) initial velocity of the car, distance of each section (m/s)

      • we never use this, as we have length of each sections already stored in e_profile. Useless parameter?

  • Returns

    • Fmotorenergy: (Numbers) Force of motors required to accelerate to a certain velocity in a certain time (Nfloat) Total energy used if the entire v_profile was to be followed (J)

  • Note

    • If v or v_old greater than maximum speed or less than minimum speed, it is caught in the function and whatever is out of bounds is set to maximum speed or minimum speedFfric, Fdrag , Fg , Fa, and ultimately Fmotor to be all calculated inside the function, using parameters and constants .

    • Error if the length of v_profile and e_profile do not match

    • In the objective function (shown below) that we are trying to minimize, it basically returns the value of energy_used()function. Thus in Optimizer we are trying to minimize the return value of energy_used()

...