drothcp.files.wordpress.com · web viewwith wind power having such a wide variety of uses and...
TRANSCRIPT
ME 3870
Measurement & Data Analysis
Open Project Lab Report
Lab 2 – Group 2
12/9/16
I. Executive Summary
The group’s objective for this project was to measure the wind speed by creating an
accurate anemometer. From its trials, the group found its anemometer could gather useful data at
lower speeds, but higher speeds would make the system unstable due to design limitations. The
sensor used in the measurement system was an optical sensor, primarily to collect rotational data.
The static calibration was done to develop a relationship between rpm and wind speed in mph.
The static sensitivity was 61.6560 rpm/mph. The total error was 0.5014 mph. The dynamic
calibration was done to further inspect the sensor in terms of how was the data collected, what
type of response was developed, and what factors were affecting its accuracy. It was determined
that the amount of light reflected into the sensor had a major influence in the voltage output, but
it did not affect the dynamic characteristics of the response. The variance in voltage due to
resistance, brightness, and time did not play a significant role in determining the rpm of the
pinwheel. Overall, the anemometer prototype was successful in proving that it is a viable design
to measure wind speed.
II. Introduction
With wind power having such a wide variety of uses and consequences, it is important to
be able to continually characterize its speed. Gathering data on how fast the average wind speed
is can help engineers to design better wind turbines in order to harness the energy, while
knowing when and how often speeds reach dangerously high levels could provide a useful
analysis on how sturdy local structures need to be. With today’s developing technology, wind
energy continues to have a vast amount of untapped potential. However, due to its inherently
random nature, it is difficult to constitute a “one size fits all” system. Knowing this, the group set
out to create a sensor which would aid engineers in their campaign to optimize wind technology.
This was the driving force behind the objective to perform a viable calibration for an optical
sensor when paired with a rotating pinwheel. In doing so, the result would be the ability to take
accurate wind speed measurements through the comparison between speed and rotation.
Throughout the developmental process, the idea behind the team’s trials was if it could discover
how the optical sensor measures data and use that knowledge to create a proper analysis
methodology for it.
Important Equations:
K theoretical=full scale output rangefull scale input range (1)
RPM= 60time difference betweentwo peaks (2)
m=n¿¿ (3)
b=¿¿ (4)
OS=y p 1− y⋈ 1
y⋈1=e
−π ζ 1
√1−ζ 12
(5)
ωd=2 π
2 (t b 1−t p1 ) (6)
ωn 1=ωd 1
√1−ζ 12 (7)
System= 1s2
ωn 12 +
2 ζ1 sωn 1
+1 (8)
Limitations:
Without greater funding and more accurate measuring equipment, there were several
major limitations to the prototype. The pinwheel was assumed to be gyrating in a perfectly
circular fashion, when in fact it would slightly vacillate. This was due to its flexible composition
and loose tolerance in its material. The group tried to limit this effect by adding multiple
cardboard to support it, but error was only lessened, not eliminated. Additionally, the optical
sensor takes 2 seconds to reach steady state, making the collection of useful data a challenge.
The static calibration was done according to the speed on the car dashboard. However, the speed
displayed was not accurate at low velocity. The actual speed could not be kept constant. For this
experiment, it was assumed whatever speed being displayed on the dashboard was the actual
speed.
III. Experimental Materials and Methods
The optical sensor was consisted of a LED and a transistor. The resistance used for LED
was 220 ohms and the resistance for the transistor was 68,000 ohms. Both elements were
provided with 5V through myDAQ, which was connected to the computer for data acquisition
and transmission.
The static calibration was done in car, which had a numerical speed display on the
dashboard to monitor the speed. This experiment was performed in an indoor garage, so that the
effect of wind was minimized. The pinwheel was first held still in the air to measure if there was
any interference in the surroundings that could cause the pinwheel to rotate. Next, the pinwheel
was held out of the window and fixed in one position relative to the car while the car was
moving forward at 2 mph. The data was collected in the Labview for 10 seconds after the car
passed over the initial accelerating stage and reached a steady speed. The data was then imported
into MATLAB for graphing and analyzing. The time difference between two consecutive peaks
was calculated. This value represented the time for the pinwheel to complete one revolution at 2
mph. Considering the uneven force distribution of wind exerted on the pinwheel blades may
cause the pinwheel to have different rotational speed over time, the average value of all time
differences within a range of continuous peaks was calculated. This procedure was repeated for
another 6 times, from 6 mph to 8 mph, in the increment of 1 mph each time.
The design stage uncertainty was assumed to be zero, this would be further explained in the
results and discussion section below. The linearity error was calculated after the relationship
between rpm and mph was approximated with linear least square regression line.
The dynamic calibration was done by sending in a step input to the sensor on two
different light source, a LED flashlight and reflective tape. The LED flashlight represented the
brightest light available, which served as a standard measurement to show the full voltage drop.
The reflective tape was tested in order to show how accurate the static calibration was in terms of
receiving signals. The data was analyzed in MATLAB.
IV. Results and Discussion
According to the static calibration, the static sensitivity was given by two methods. From
Table 1, the theoretical static sensitivity was 60.625 rpm/mph, obtained by Equation 1.
Symbol Description ValueFSO Full scale output range, rpm 0−485FSI Full scale input range, mph 0−8
K theoretical Theoretical sensitivity,rpmmph
60.625
K exp Experimental sensitivity, rpmmph
61.6560
Table 1: Static Calibration
The input range was 0 - 8 mph because that was how far the measurement was decided to
be calibrated. The static calibration at 8 mph was performed for multiple times, and the average
output was calculated to be 485 rpm. From Figure 1, the rpm and mph turned out to have linear
relationship and the function was “rpm = 61.6560 * mph – 25.1740”. The slope of the function
was also defined as the experimental static sensitivity. The two sensitivities were very close to
each other.
Figure 1: Static Calibration
eq Quantization error,mph 0.5em Linearity error,mph 0.0321eb Zero drift error,mph 0.0202uT Total uncertainty, mph 0.5014
Table 2: Error
The linearity error was 0.0321 mph, and zero drift error was 0.202 mph. The quantization
error due the car speed was 0.5 mph because the dashboard had the resolution of 1 mph. The
overall error was 0.5014 mph. The design stage error of the static calibration was assumed to be
zero. The resistor possessed a small amount of uncertainty, however, it could be ignored because
the rpm was calculated using the time difference instead of the actual voltage output. The
variance in voltage drop due resistor uncertainty might change the location of the peak, shifting it
left or right on the time scale a little bit depends on the slope of rising or falling, it was taken care
of by taking the average of all time differences. The time shift within one peak was compensated
by the time shift within the next peak. Further uncertainties regard the voltage will be discussed
below.
Figure 2: Static Calibration DataBased on the static calibration data from figure 2, the longer the sensor stayed on the
reflective tape, the greater but wider peaks were generated. In other words, at the lower speed,
the peaks occurred less frequently but had bigger voltage drop. At first, the voltage drop was
assumed to correlate with the amount of the light being reflected onto the optical sensor.
Therefore, square wave was assumed to be the output wave when the same light source passing
in front of the optical sensor. The peak should immediately drop from 5 volts to its steady-state
voltage, which was dependent on the amount of light reflected, and stayed at that level until the
light source was removed and it should go back to 5 volts theoretically, producing an ideal
square wave. However, as the speed was increasing, the sensor spent less and less time staying
on the reflective tape. The voltage drop was cut off in the middle before reaching its steady-state
value. The result turned out to be a sine wave in this experiment. The effect will be further
explained in the dynamic section below.
Inside the optical sensor, the receiver in the transistor converted the light into an
electrical signal. The brighter the light source was, the higher the collector current was, which
led to a bigger voltage drop according to Ohm’s Law. Since the light source was kept the same,
the error associated with light source mainly came from the unsteady reflection of the infrared
light due the vacillating of the reflective tape. The amount of light reflected back was different
for each rpm, which eventually caused the voltage drop to vary throughout ten seconds while
data was being collected.
Ohm’s law also showed that voltage could also be amplified using a bigger resistance,
given a constant current. At first, the voltage drop was nearly undetectable with 10k ohm through
the transistor. When resistance was increased, a larger voltage drop was observed. In this
experiment, the variance within the current was small enough to allow a bigger resistance
produced a larger voltage drop. As a result, 68k ohm’s was utilized for the transistor.
Figure 3: Dynamic Calibration for LED
Figure 4: Dynamic Calibration for Reflective Tape
Reflective tape and LED flashlight were used in the dynamic calibration. The response
for the optical sensor to detect the light source was illustrated. Based on Figure 3 and 4, the
responses turned out to be second order systems. The maximum overshoot was 0.0695. Damping
ratio was 0.6472, and the natural frequency was 7.6669 rad/s. Bode plots were generated to
compared the frequency response. From Figure 5, the system remained nearly the same towards
two different light sources. There was no difference between the light sources with respect to the
response time. The main difference was the steady-state voltage drop between two light sources
that was proven to be correlated with the amount of light being reflected based on the material.
In other words, the reflective tape used in this experiment would not possibly change the
frequency of the source
being reflected on
the sensor when it
passing through with
certain speed.
Dynamic
calibration showed that it
took sensor 2 seconds to
Static-State Voltage Drop
=2.5110 volts
reach steady state, which was equivalent to 7.5 rpm, given that reflective tape covered about a
quarter of the sensoring area. While the rpm was increasing, the sensor had less and less time
staying in the reflective range, which made the voltage dropped before it could rise to the steady
state. The average voltage drop turned out to be smaller and smaller as the rpm was increasing.
However, each peak was still distinguishable and relatively stable at low rpm, which
corresponded to the speed range from 2 mph to 5 mph. The maximum voltage drop was within
20% of the average drop. At high rpm, a portion of data showed steady voltage drop and the time
difference between two consecutive peaks could be obtained.
Figure 5: Bode plot of second order system
V. Conclusion
The static calibration showed the sensitivity of the measurement was 61.656 rpm/mph,
with total error being 0.5014 mph. The voltage drop was affected by three factors: the brightness
of the light source, the amount of time sensor stayed in the light source and the resistor used for
the transistor. Only the last one could be predefined manually. The error associated with all three
factors were all voltage related. Therefore, they did not play an important role in the time
differences. The dynamic calibration showed that damping ratio was 0.6472 and natural
frequency was 7.6669 rad/s. The amount of light will affect the voltage output, but it did not
change the dynamic characteristics of the sensor, which can pick up the light signal through
reflective tape as fast as it did with strong LED flashlight.
VI. Appendices
Group Members and Responsibilities:
David Roth - Introduction, Experimental Procedure
Yizhou Lu - Executive summary, Results and Discussion
Chien Liu - Results and Discussion, Appendices
Symbol Description Value
FSO Full scale output range,
rpm
0−485
FSI Full scale input range, mph 0−8
K theoretical Theoretical sensitivity,rpmmph
60.625
n Number of data points 8
P Confidential level 0.95
v Probability 0.975
f Degree of freedom 7
t Student t-distribution 1.9616
variable
m Slope, rpmmph
61.6560
b Y-intercept, rpm −25.1740
se Standard deviation of
output,rpm
17.7685
sm Standard deviation of
slope, rpmmph
2.5160
sb Standard deviation of y-
intercept, rpm
12.6739
K exp Experimental sensitivity,
rpmmph
61.6560
K theoretical=FSOFSI
=485 rpm8 mph
=60.625 rpmmph
v=0.5∗(1+P )=0.5∗(1+0.95 )=0.975
f =n−1=7
m=n¿¿
b=¿¿
se=√∑i=1
n
(m x i+b− y i)2
n−2 =17.7685rpm
sm=√ n se2
n¿¿¿
sb=√se2¿¿¿
K exp=m=61.6560 rpmmph
ri Input range,mph 8
eq Quantization error,mph 0.5
em Linearity error,mph 0.0321
eb Zero drift error,mph 0.0202
uT Total uncertainty, mph 0.5014
eq=ucar=0.5 mph
em=t sm r i
m √n=0.0321 mph
eb=t sb
m√n=0.0202mph
uT=√eq2+em
2 +eb2=0.5014 mph
Symbol Description Value
y⋈ 1 Amplitude at t⋈1, volt 4.693
y p1 1stPeak Amplitude at
t p 1=2.275 s, volt
5.019
yc 1 1stConcave Amplitude at
t b 1=2.8125 s, volt
4.613
OS Overshoot 0.0695
ωd1 Damped natural frequency,
rads
5.8448
ζ 1 Damping ratio 0.6472
ωn 1 Natural frequency,rad
s7.6669
OS=y p 1− y⋈1
y⋈1=0.0695
ωd 1=2 π
2(t b 1−t p 1)=5.8448 rad
s
OS=e−π ζ 1
√1−ζ 12
=0.0695⟹ ζ 1=0.6472 rads
ωn 1=ωd 1
√1−ζ 12=7.6669 rad
s
System= 1s2
ωn 12 +
2 ζ 1 sωn 1
+1
Symbol Description Value
y⋈ 2 Amplitude at t⋈1, volt 4.673
y p2 1stPeak Amplitude at
t p 1=4.638 s, volt
4.894
yc 2 1stConcave Amplitude at
t b 1=5.287 s, volt
4.543
OS Overshoot 0.0473
ωd 2 Damped natural frequency,
rads
4.8407
ζ 2 Damping ratio 0.6967
ωn 2 Natural frequency,rad
s6.7482
OS=y p 2− y⋈ 2
y⋈2=0.0473
ωd 2=2 π
2(t b 2−t p2)=4.8407 rad
s
OS=e−π ζ 2
√1−ζ 22
=0.0473⟹ ζ 2=0.6967 rads
ωn 2=ωd 2
√1−ζ 22=6.7482 rad
s
System= 1s2
ωn 22 +
2 ζ2 sωn 2
+1
Matlab Code: %% static calibrationclcclearclose speed=[0,2:1:8];for i=2:length(speed)-1 file=strcat(num2str(speed(i)),'.lvm'); Data(:,:,i-1)=load(file); figure (1) subplot(4,2,i-1) plot(Data(:,1,i-1),Data(:,2,i-1))endData8=load('8.lvm');figure (1)subplot(4,2,7)plot(Data8(:,1),Data8(:,2))suptitle('Static Calibration Data')avg(1)=0;time2=[0.5, 1.15, 1.85, 2.55, 3.225, 4, 4.925, 5.85, 6.65, 7.35, 8.025, 8.775, 9.75];for i=1:length(time2)-1 timed2(i)=time2(i+1)-time2(i);end avg(2)=sum(timed2)/(length(time2)-1);time3=[0.4, 0.8, 1.225, 1.6, 2.025, 2.425, 2.85, 3.275, 3.675, 4.025, 4.375, 4.8, 5.225, 5.675, 6.125, 6.525, 6.9, 7.325, 7.675, 8.05, 8.4, 8.775, 9.2, 9.6]; for i=1:length(time3)-1 timed3(i)=time3(i+1)-time3(i);endavg(3)=sum(timed3)/(length(time3)-1);time4=[0.1125, 0.4, 0.6625, 0.9, 1.163, 1.425, 1.675, 1.95, 2.212, 2.475, 2.737, 3, 3.275, 3.525, 3.737, 4.025, 4.275, 4.563, 4.838];for i=1:length(time4)-1 timed4(i)=time4(i+1)-time4(i);endavg(4)=sum(timed4)/(length(time4)-1);time5=[0.125, 0.4, 0.6375, 0.8875, 1.163, 1.425, 1.688, 1.962, 2.225, 2.513];for i=1:length(time5)-1 timed5(i)=time5(i+1)-time5(i);endavg(5)=sum(timed5)/(length(time5)-1);avg(5)=0.2222;time6=[2.375, 2.55, 2.712, 2.913, 3.087, 3.288, 3.462];for i=1:length(time6)-1 timed6(i)=time6(i+1)-time6(i);endavg(6)=sum(timed6)/(length(time6)-1);time7=[2.862, 3, 3.15, 3.3, 3.45, 3.587];for i=1:length(time7)-1 timed7(i)=time7(i+1)-time7(i);endavg(7)=sum(timed7)/(length(time7)-1);
time8=[1.581, 1.7, 1.844, 1.994, 2.119, 2.244, 2.525, 2.369, 2.525, 2.65, 2.794, 2.919, 3.065];for i=1:length(time8)-1 timed8(i)=time8(i+1)-time8(i);endavg(8)=sum(timed8)/(length(time8)-1);rpm(1)=0;for i=2:length(avg) rpm(i)=60/avg(i); endfigure (2)plot(speed,rpm)hold on[m, b, sdm, sdb, R2]=llsr(speed,rpm);for i=1:length(speed) y(i)=m*speed(i)+b;endplot(speed,y)hold offtitle('Static Calibration')legend('raw data','linear least square regression')xlabel('wind speed, mph')ylabel('rotational speed, rpm')P=0.95;v=0.5*(1+P);n=length(Data);f=n-1;t=tinv(v,f);ri=8;% linearity errore_m=t*sdm*ri/(m*sqrt(n));e_b=t*sdb/(m*sqrt(n));e_q=0.5;u=sqrt(e_q^2+e_m^2+e_b^2);% dynamic calibration syms xData=load('dynamic1.lvm');figure (1)plot(Data(:,1),Data(:,2))title('Dynamic Calibration for LED')xlabel('Time, s')ylabel('Voltage, volt')start_y=0.04164;start_t=1.5;ss=4.693;os_y=5.019;os_t=2.275;bs_y=4.613;bs_t=2.8125;os=(os_y-ss)/ssT=(bs_t-os_t)*2wd=2*pi/T%zeta=0.6471;y=solve(exp(-pi*x/sqrt(1-x^2))==os,x);zeta=double(subs(y(1)))wn=wd/sqrt(1-zeta^2)s=tf('s');
sys=1/(s^2/wn^2+2*zeta*s/wn+1); Data2=load('dynamic2.lvm');figure (2)plot(Data2(:,1),Data2(:,2))title('Dynamic Calibration for Reflective Tape')xlabel('Time, s')ylabel('Voltage, volt')start_y2=2.162;start_t2=3.862;ss2=4.673;os_y2=4.894;os_t2=4.638;bs_y2=4.543;bs_t2=5.287;os2=(os_y2-ss2)/ss2T2=(bs_t2-os_t2)*2wd2=2*pi/T2%zeta2=0.6967;y=solve(exp(-pi*x/sqrt(1-x^2))==os2,x);zeta2=double(subs(y(1)))wn2=wd2/sqrt(1-zeta2^2)s=tf('s')sys2=1/(s^2/wn2^2+2*zeta2*s/wn2+1); figure (3)bode(sys)hold onbode(sys2)legend('flashlight','reflective tape')