Energy vs. Time plot
For the first 4 seconds of the graph, the AEV is accelerating and the power exerted by the motor is increasing. For the next second, the motors run at a constant speed, so the power produced is constant. Next, the motor speed decreases, so the power exerted by the motor decreases, but remains constant for the next 2 seconds. The motors reverse, which causes the spike in power exerted because the engines must stop. Finally, the motors run for two more seconds at the at a speed that is 5% greater. Then, they brake.
Energy vs. Distance plot
For the first four seconds, the motors accelerate, but are not moving fast enough to move the AEV very far. This is why the power is increasing, at the beginning, but the distance is not increasing. The AEV creeps along for the first few centimeters once the power meets the threshold. Then, the graphs spikes when the motors reverse. Finally, the AEV continues to move as the motors run for 2 seconds at 25% power in the reverse. It is apparent from the graph that the motors must produce a minimum of about 5 watts in order to get the AEV to move.
Code for Lab 4:
//Accelerate all motors from start to 25 percent in three seconds
celerate(4,0,25,3);
//Set all motors to 25 percent
motorSpeed(4,25);
//Go for one second
goFor(1);
//Set all motors to 20 percent
motorSpeed(4,20);
//Go for two seconds
goFor(2);
//Reverse all motors
reverse(4);
//Set all motors to 25 percent
motorSpeed(4,25);
//Go for two seconds
goFor(2);
//Brake all motors
brake(4);