Download Lab Challenge 3: Measuring Force with Strain Gauges

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Nonlinear dimensionality reduction wikipedia , lookup

Transcript
ME EN 363-Elementary Instrumentation
Lab Challenge 3: Measuring Force with Strain Gauges
Goals:
1) Determine the dynamic force of a falling object
Challenge:
Using a bread board, configure your beam’s strain gauges in a Wheatstone bridge configuration. Also,
create a LabVIEW VI that accepts a voltage input. Calibrate your Wheatstone bridge using the provided
weights. Measure the dynamic force of a falling weight.
Import your data into Matlab and do a Fourier analysis to determine the natural frequency of your beam
from your collected data. Anchor a weight to the end of your beam and apply an impulse again. Record
this data and import it into Matlab as well. Note how the natural frequency changes.
Write-up:
The write-up will be a full report completed by each group (One report per group) and will follow the
format of the formal report described in the BYU Undergraduate Guide. The report will be due during
your group’s next lab time. Refer to the report grading rubric for grading requirements.
Labview Help:
You’ll want to set up your Labview VI similar to your
thermometer lab, with a DAQ, chart (or graph) and a
Wrist to Measurement File module. You’ll also want
to add a multiplier and adder in the data stream so
that your program can output calibrated data.
These can be found under the numeric toolbox. A
sample VI is provided in the figure to the right for
your convenience and to show these functions. You
may want to put your program in a loop via
continuous sampling. Check the sampling frequency
to make sure it is adequate, but not too high.
Matlab Help:
First create a new m-file by clicking on the blank document in the upper left of the Matlab screen.
To load your data into Matlab use either the load or importdata commands. The syntax here is
(variable_name)=importdata(‘file_name’) or load(‘file_name’) (for load the variable name is the same as
the file name). For syntax help in general you can simply type “help command_name” in the Matlab
consol. To successfully load your data you’ll also want to make sure your working directory in Matlab is
the same as the file location where your data is stored.
The data in your data files is arraigned in two columns: a time column and a values column. To use this
data effectively you’ll need to break it up. Extract a column of data in Matlab by typing
array=matrix(:,n) where n is the column number. Use this command to extract the time and
data columns as separate variables.
In performing the Fourier transform we’ll need to know how many data points we have. This can be
found using the length() command. You’ll also need to know the frequency the data was sampled at.
This can be found by subtracting the value of the second data point from the first in the time array to
find the size of the sampling increments. The frequency is the inverse of this number. Values of an
array can be accessed with parenthesis. For example, in the array numbers=[5 4 7 3] in Matlab,
numbers(3)=7.
In a discrete Fourier transform (which is what you’re doing) the x-axis values start at zero and increment
by (sampling frequency)/N, where N is the number of data points. Calculate the increment size along
the x-axis and store it as a variable. To generate an array of values to be your x-axis use the syntax
array=(starting values):(increment):(ending value). For example, x=0:0.5:2 would generate the
array x=[0 0.5 1 1.5 2].
To perform the Fourier transform use Matlab’s fft function. It saves a lot of hassle. The syntax is
transform=fft(data). The variable transform is returned as an array of complex number the
length of the data set.
We’ll need to adjust the amplitude of the Fourier transform or our answer will be off by a large
magnitude. To do this multiply your array for the constant 2/N, where N is the number of data points in
your sample.
To find the magnitude of the complex number in Matlab we can use the abs(number) command,
which returns the absolute value of number, but also returns the magnitude of a complex number. In
Matlab number can also be an array. Create a new array comprised of the magnitudes of the Fourier
transform.
Finally, go ahead and plot your Fourier transform of the data. When creating more than one figure in
Matlab you’ll want to declare each one. Do so by typing figure(figure number) into the line of
code before your plot command. After this type stem(xvalues, yvalues) in the next line to
create a stem plot. The plot() and stem() commands share the same syntax, but stem plots
represent a Fourier transform more accurately.
If you haven’t already, run your code to make sure it works. You’ll notice that your Fourier transform
produces a graph symmetric about the y-axis. This is due to a phenomenon called aliasing.
To fix this go back in to your code and adjust it to plot only half the data. The easiest way to do this is by
simply restricting which data gets plotted. This is done by restricting the lengths of xvalues and
yvalues. For example, xvalues(1:n) will return only up to the nth data point of xvalues. Add these
restrictions to your plot and try again. Graphs can also be modified by clicking on the white mouse
button above the figure on the toolbar, then double clicking on the graph. Options will appear around
the graph to adjust the range and display.