Analyzing Data

 


In this experiment, we were introduced to the design analysis tool in MatLab.  This will be very beneficial to the team in the coming weeks and when we run further testing.  The team ran a code that is located below.  The data that the Arduino collected during the test run was used in creating the graphs that are also located on the page.  We could easily extract the data that was collected during the run and upload it all into MatLab so that we could crunch numbers and produce graphs in excel.

Power vs. Time

For the first 3 seconds, the power increased as it accelerated.  The power remains constant while the motor runs at a constant power for 1 second.  The power decreases for 2 seconds while the motors run at a reduced speed for 2 seconds.  Then the power spikes because the motor is being reversed and then set to a new speed.  Then it remains constant for 2 seconds.  Then it drops to zero because the motors are shut off.

                                                                            Power vs Distance

First, the power increases while the distance remains zero.  This happens for a very short time because the motor is speeding up.  It takes time before the AEV can actually begin to move.  The power drops because the code sets the motors at a different speed but the distance continues to increase.  It actually increases more during this part of the run because the AEV is not accelerating.  Then when the motors are reversed, the same thing happens but in the opposite direction.  Even though the motor speed is higher than the previous part, it does not travel as far because the AEV is accelerating in the new direction.  Then when the motors are cut off, the AEV continues to travel down the wire because there is no braking device on the AEV, so it coasts to a stop.


Code Used: 

Refer here for information on command functions.

Code Explanation
celerate(4,0,25,3); Accelerates motors from rest to 25% over 3 seconds
goFor(1); Runs the motor at 25% for 1 second
motorSpeed(4,20); Sets all motors to 20% power
goFor(2); Runs previous function for 2 seconds
reverse(4);  Reverses all motors
motorSpeed(4,25); Sets all motor speed to 25% power
goFor(2); Runs previous function for 2 seconds
brake(4); Brakes all motors

Takeaways: 

This program will be very beneficial to us in the future.  The more data that we can get the better that we will be able to make our AEV.  Feedback is always good to have in large projects like this and with this program, we will have exactly what we need.  We can closely monitor our changes and how our changes impact different aspects of the AEV.  For example, if we were to add a piece to the AEV to make it more stable it would increase the weight and we could use this feature in MatLab to see how our power output changed with the added weight.  This will help us to decide if changes that are made to the AEV are actually improving or hindering our progress.