Lab 4

Power vs Time Graph

For the first two seconds plot, the AEV is accelerating from rest.  Then, it stays at a constant power for 5 seconds, moving forward.  The motor brakes and the power drops to zero as the AEV slows down for about a second.  Then, it accelerates from rest again to a constant power which it holds for two seconds before spiking up to a high power for the last two seconds of the run.

Power vs Distance Graph

First, the power of the AEV is held constant and it travels about 2.5 meters.  Then, the power drops as the AEV coasts about another meter.  The power then picks up, or accelerates as the AEV continues to travel for another .5 meter.

Code:

celerate(4,0,25,3); // acc all motors to 25% in 3 seconds
motorSpeed(4,25); // all motors to 25%
goFor(1); // go for 1 seconds
motorSpeed(4,20); // all motors to 20%
goFor(2); // go for 2 seconds
reverse(4); // all motors reverse
celerate(4,0,25,2); // acc to 25% for 2 seconds
brake(4); // brake all