Exercise 04 – Design Analysis Tool

The objective of this exercise was to get acquainted with the MATLAB design analysis tool by uploading Arduino data, conducting performance analysis, and exporting the plots of data.

Progress Report Questions/Deliverables:

Power(Watts) vs. Time(Seconds)

Power(Watts) vs. Distance(Meters)

Explanation of graphs: During the first three seconds, the vehicle accelerates from start to 25% in 3 seconds. During seconds 3-4 the motors run at 25%. Then the motor speed is decrease to 20% and told to run from 4 seconds to 6 seconds. The motors are reversed (where we see the spike) and the motor speed becomes 25% again, and runs from 6 to 8 seconds. Lastly, all of the motors brake at 8 seconds.

Code:

void myCode()

{

 // Program between here——————————————————————-

 celerate(4,0,25,3);   // Accelerate all motors from start to 25% in 3 seconds

goFor(1);             // Run all motors at 25% for 1 second

motorSpeed(4,20);     // Run all motors at 20% power

goFor(2);             // Go for 2 seconds

reverse(4);           // Reverse all motors

motorSpeed(4,25);     // Run all motors at 25% power

goFor(2);             // Go for 2 seconds

brake(4);             // Brake all motors

// And here——————————————————————————–

 

}