To: Professor Jolanta Janiszewska
From: Nick Kanel, Matt Musso, Marcus Pereira
Date: February 24, 2016
Subject: Lab 6 → System Analysis 2 – Performance Data Analysis
Introduction
In this lab, data was gathered using the Arduino Automatic Control System (ACS) concerning the output requirements of power and current to the AEV system. In doing so, the performance of the AEV can be improved upon and tracked by quantifiable means from this baseline, thereby allowing for development in specific areas that are less effective such as aerodynamics or weight and balance. This exercise also allows for the construction of familiarity with the systems responsible for obtain data regarding the efficiency of the AEV, and allows for analytical methods that will be used in the future to be exercised.
Contained herein is the data gathered from the completion of Lab 6: System Analysis 2, as well as commentary thereupon concerning the significance of the data, and areas in which improvements can be made. Also contained is a copy of the code that was run during testing, along with sample calculations to determine time, distance, position, current, voltage, supplied power, and incremental energy of the AEV at different points. A response to the question of how the data is relevant is also given.
Results
The table produced from data gathered by the ACS gives quantified data for different phases of the run. This allows for the development of a code that accounts for changes in track landscape and payload on the AEV. For example, on an incline more current is required for the AEV to maintain a certain velocity, but on a decline, the same power is not required. Therefore, the current being supplied to the motors can be dramatically decreased over the course of that decline, and for a period of time thereafter, while the AEV decelerates to its intended velocity. This reduction in current would subsequently result in an increase in the overall efficiency of the Vehicle. The same holds true for an increase in payload, but to a different degree as the gross weight that the motors are attempting to move is increased.
Error in this lab consisted of the AEV continuing to drive for longer than it should have. This was resolved by figuring out that there was no break() call to the Arduino, so the motors kept running. After a break() call was added, the AEV ran without error.
Figure 1: This image displays the Power versus Time graph of the AEV before the phase breakdown
Figure 2: This image displays the Power versus Time graph with the phase breakdown included
| Phase | Arduino Code | Distance (meters) | Time (seconds) | Total Energy (joules) used in phase |
| 1 | celerate(4,0,20,0.5) | 0.0124 | 0.54 | 3.16 |
| 2 | motorSpeed(4,20) | 1.376 | 5.041 | 22.43 |
| 3 | motorSpeed(4,20) | 2.1576 | 6.421 | 7.22 |
| 4 | motorSpeed(4,20) | 6.2744 | 13.021 | 32.59 |
| Total Energy Used | 65.67 Joules |
Table 1: The table contains a Summation of the data from the matFile
Conclusions
This lab was accomplished to obtain a baseline efficiency for the AEV, and to gain experience with the analytical means necessary to acquire the aforementioned insights. In doing so, valuable insights concerning AEV efficiency in regards to specific portions of the trial run were gained. From this point, further changes can be made to develop the AEV in a more energy efficient manner. Ideally, more runs would have been completed so as to gather a greater number of data points, thus absolving some possible error such as the reflectance sensors not working properly, however the completed exercise is sufficient as a baseline test.
Individual Discussions
Nick
%Extract the time and convert it to seconds
time = 1021 / 1000;
%Extract the current and convert it to Amps
current = (46./ 1024) * 2.46 * (1/0.185);
%Extract voltage and convert it to Volts
voltage = (555) * (15/1024);
%Convert total distance to inches.
totalDistance = 0.0124 * 3;
%Convert current distance to meters.
position = 0.0124 * 1;
%Calculate power in Watts
power = voltage * current;
%Calculate incremental energy
energy = ((pow(num) + pow(num+1))/2) * (time(num+1) – time(num));
Output:
time = 1.021 s
current = 0.5973 A
voltage = 8.13v
totalDistance = 0.0372 m
currentDistance = 0.0124 m
power = 4.856 W
energy = 0.311 Joules
Marcus Pereira
Individual equations
The point of the code selected for sample equations was the following:
| Time (ms) | Current (counts) | Voltage (counts) | Marks (cumulative Wheel counts) | Marks (position wheel counts) |
| 5101 | 51 | 555 | 114 | 112 |
Table 1: The chosen point of the code, A94 of the excel file
Time equation → te/1000
Time= (5101 ms/1000) = 5.101 seconds
Distance equation → d=0.0124 *marks (wheel counts)
Distance= 0.0124 * 114 marks = 1.41 meters
Position equation → s (meters from starting point) =0.0124 * position from starting points
Position = 0.0124 * 112 marks = 1.39 meters
Current equation → I=(Ie/1024)*Vr*(1Amp/0.185Volts)
Current=(51 Amps/1024)*2.46 volts*(1 Amp/0.185 Volts) = 0.66 Amps
Voltage equation → (15*Ve)/1024
Voltage = (15*555 volts) / 1024 = 8.1 Volts
Power Supplied → Voltage * Current
Power Supplied = 8.1 Volts * 0.66 amps = 5.3 Watts
Incremental Energy → Ej = (Pj+Pj+1)/2 * (tj+1-tj)
Vj+1= ((15*555)/1024) =8.13 Volts
IJ+1=(49 Amps / 1024) * 2.46 Volts * (1 Amp/0.185Volts) = 0.636 Amps
PJ+1=8.13 Volts * 0.636 Amps = 5.17 Watts (Every time interval is 60 ms)
Ej=(5.3 Watts+5.17Watts)/2*(60ms/1000) = 0.314 Joules
Calculations – Matt Musso
t=tE*10-3
Equation 1. Equation converting time in milliseconds to seconds.
t=1021*10-3=1.021 sec
Equation 2. Equation 1 solved for a data point (tE=1021 msec) in phase one of the trial run.
I=VR (IE/1024)(1 A/ 0.185 V)
Equation 3. A translation of the current recorded by the Arduino in binary, to a standard reading in amps.
I=2.46 V (46/1024)(1 A/ 0.185V)=0.675 A
Equation 4. Equation 3 solved for the same data point as was solved for in Equation 2 during phase one of the trial run.
V=15*VE/1024
Equation 5. Equation solving for the voltage of the AEV using the binary value given by the ACS.
V=(15)555 V/1024=8.12 V
Equation 6. Equation 5 solved for the same data point as in Equations 2 and 4 during phase one of the trial run.
d = 0.0124*marks
Equation 7. Equation which converts marks counted by the reflectance sensors to the distance traveled by the AEV. The same formula is used to determine the position of the AEV but using the relative counts to calculate the position.
d=0.0124*3=0.0372 m
Equation 8. Equation 7 solved for the data point as was solved for in Equations 2, 4, and 6 during phase one of the trial run.
d=0.0124*1=0.0124 m
Equation 9. Equation 7 solved for the data point as was solved for in Equations 2, 4, and 6 during phase one of the trial run using the displacement count.
P=VI
Equation 10. Equation solving for supplied power using current and voltage.
P=(8.12 V)0.675 A=5.49 W
Equation 11. Equation 10 solved for the data point as was solved for in Equations 2, 4, 6, 8, and 9 during phase one of the trial run.
EJ=((PJ+PJ+1)/2)(tJ+1-tJ)
Equation 12. Equation which gives incremental energy over a given time.
EJ=((5.48 W+5.07 W)/2)(1.081-1.021)=0.317 J
Equation 13. Equation 10 solved for incremental energy using the data point used for previous calculations, and the data point directly following it.
Appendix
MatLab
%Main function
function [] = arduinostuff()
clc; clear;
%Read in the data as an excel document
data = xlsread(‘data.xlsx’);
%Extract the time and convert it to seconds
time = data(:,1) ./ 1000;
%Exract the current and convert it to Amps
current = (data(:,2) ./ 1024) .* 2.46 .* (1/0.185);
%Extract voltage and convert it to Volts
voltage = (data(:,3)) .* (15/1024);
%Get the total distance in clicks
totalMarks = data(:,4);
%Convert total distance to inches.
totalDistance = 0.0124 .* totalMarks;
%Get current distance in ticks
currentMark = data(:,5);
%Convert current distance to meters.
position = 0.0124 .* currentMark;
%Calculate power in Watts
power = voltage .* current;
%Plot the power vs. time graph
plot(time, power);
%Calculate total energy. Energy is 0 at t = 0
energy = 0;
%Loop over every slice of the graph (every 60ms).
for n = 1:length(time) – 1
%Add the slice’s energy to the total energy.
energy = energy + energyCalc(n, power, time);
end
%Print the energy.
fprintf(‘Total energy: %.2f J\n’,energy);
end
%Function for determining energy in a certain section.
function [energy] = energyCalc(num, pow, time)
%Use the equation from AEV Lab Manual
energy = ((pow(num) + pow(num+1))/2) * (time(num+1) – time(num));
end
Arduino
void myCode() {
celerate(4,0,20,0.5);
motorSpeed(4,20);
goToRelativePosition(505);
brake(4);
}

