Lab 4

  1. Graphical Representations
Power vs. Time
Power vs. Distance

2. Program Code for this lab can be found under CSS1 in the Code section.

3. Explanation of Code/Graphs

From 0 seconds to 3.11 seconds on the time graph, the power of the AEV is steadily increasing, which represents the celerate(4, 0, 50, 3) function. During this time, the AEV doesn’t move very much until it hits 11.33 watts. After that, it moves forward about 0.67 meters before its power drops, indicating the command motorSpeed(4,20); goFor(3); which commands both motors to provide thrust at 20% power for 3 seconds. Next, both motors reverse and apply 35% power in the opposite direction, shown by the spike of 13.22 watts after 7.78 seconds  before dropping to around 9.44 watts for 2 seconds, then dropping all the way to 0 watts, representing the brake(4); command. This represents the last 3 functions in the above code.