540 likes | 697 Views
ME 392 Chapter 6 Data Processing March 12, 2012 week 9. Joseph Vignola. Experimental Error. There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error. Experimental Error.
E N D
ME 392Chapter 6Data Processing March 12, 2012week 9 Joseph Vignola
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity)
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) For now we can use the voltage to represent what ever physical quantity we might be interested in.
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) For now we can use the voltage to represent what ever physical quantity we might be interested in. We use a sensitivity to relate the voltage to the thing we want
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) For now we can use the voltage to represent what ever physical quantity we might be interested in. We use a sensitivity to relate the voltage to the thing we want for the accelerates
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) For now we can use the voltage to represent what ever physical quantity we might be interested in. We use a sensitivity to relate the voltage to the thing we want for the accelerates for the speaker
Experimental Error There is always an assumption that what you measure is the sum, or some combination of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) For now we can use the voltage to represent what ever physical quantity we might be interested in. We use a sensitivity to relate the voltage to the thing we want for the accelerates for the speaker
Experimental Error The error can be broke down into two categories
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise)
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) Systematic error is error that occurs the say way every time an experiment is run.
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) Systematic error is error that occurs the say way every time an experiment is run. Examples of systematic error
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Systematic error is error that occurs the say way every time an experiment is run. • Examples of systematic error • Bad calibration
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Systematic error is error that occurs the say way every time an experiment is run. • Examples of systematic error • Bad calibration • Non-linearity
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Systematic error is error that occurs the say way every time an experiment is run. • Examples of systematic error • Bad calibration • Non-linearity • Digitizer noise (bit noise)
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Systematic error is error that occurs the say way every time an experiment is run. • Examples of systematic error • Bad calibration • Non-linearity • Digitizer noise (bit noise) • Saturating the digitizer • (hitting the rail)
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise)
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) Random error is error that is different every time you run your experiment.
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) Random error is error that is different every time you run your experiment. Examples of random error
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Random error is error that is different every time you run your experiment. • Examples of random error • Electronic noise
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Random error is error that is different every time you run your experiment. • Examples of random error • Electronic noise • You lab partner
Experimental Error • The error can be broke down into two categories • Systematic error (a.k.a. bias) • Random error (a.k.a. noise) • Random error is error that is different every time you run your experiment. • Examples of random error • Electronic noise • You lab partner • Environmental effect • (room temperature, humidity…)
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity)
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) And we make the measurement many times
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error Typically we measure a voltage that represents a physical quantity like temperature or velocity and then multiply or divide by some constant (the sensitivity) And we make the measurement many times
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error For this plot we can think of this as finding the “best” horizontal line that represents the data
Aggregate Comparisons There is always an assumption that what you measure is the sum of the real phenomena plus some error For this plot we can think of this as finding the “best” horizontal line that represents the data But what if we don’t expect the data to remain the same with each measurement and we want to know something about the trend?
Curve Fitting If we have reason to expect that the data will follow some functional form But what if we don’t expect the data to remain the same with each measurement and we want to know something about the trend?
Curve Fitting If we have reason to expect that the data will follow some functional form But what if we don’t expect the data to remain the same with each measurement and we want to know something about the trend?
Curve Fitting If we have reason to expect that the data will follow some functional form But what if we don’t expect the data to remain the same with each measurement and we want to know something about the trend?
Curve Fitting We use the polyfit command in Matlab to find the closest polynomial to a set of data The polynomial might be a Horizontal line (average)
Curve Fitting We use the polyfit command in Matlab to find the closest polynomial to a set of data The polynomial might be a Sloping line (linear fit)
Curve Fitting We use the polyfit command in Matlab to find the closest polynomial to a set of data The polynomial might be a
Curve Fitting We use the polyfit command in Matlab to find the closest polynomial to a set of data The polynomial might be a Any polynomial (linear fit)
Curve Fitting We use the polyfit command in Matlab to find the closest polynomial to a set of data The polynomial might be a Maybe a parabola
Ultimately we would like to make a plot where we can compare data to some predictive model
Using “polyfit.m” for Curve Fitting So in Matlab we can make these fits by first reading in the data infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t);
Using “polyfit.m” for Curve Fitting … using “polyfit.m” infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,1); % p is a vector of the coefficients of the polynomial The first two inputs are your x – y data pair The third input is the order of the fit, 1 for a straight line
Using “polyfit.m” for Curve Fitting … using “polyfit.m” infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,2); % p is a vector of the coefficients of the polynomial The first two inputs are your x – y data pair The third input is the order of the fit, 2 for a parabola
Using “polyfit.m” for Curve Fitting … using “polyfit.m” infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,6); % p is a vector of the coefficients of the polynomial The first two inputs are your x – y data pair The third input is the order of the fit, 6 for a …
Using “polyfit.m” for Curve Fitting ..and then evaluate the polynomial using “polyval.m” infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,2); % p is a vector of the coefficients of the polynomial [y_fit] = polyval(p,t); % polyval evaluates the polynomial
Using “polyfit.m” for Curve Fitting …and plotting as we have earlier. infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,2); % p is a vector of the coefficients of the polynomial [y_fit] = polyval(p,t); % polyval evaluates the polynomial zf(5) = figure(5);clf za(1) = axes; zp = plot(t,height,'o’,t,y_fit);grid xlabel('time (months)’) ylabel('childs height (in)’) ss0 = ['data']; ss1 = ['fit = ' num2str(p2(1)) 'x^2 + ' num2str(p2(2)) 'x +' num2str(p2(3))]; zl = legend(ss0,ss1);
Using “polyfit.m” for Curve Fitting infile = 'height_data.mat'; load(infile) % this file has a pair of vector t & height (same length) N = length(t); p = polyfit(t,height,2); % p is a vector of the coefficients of the polynomial [y_fit] = polyval(p,t); % polyval evaluates the polynomial zf(5) = figure(5);clf za(1) = axes; zp = plot(t,height,'o’,t,y_fit);grid xlabel('time (months)’) ylabel('childs height (in)’) ss0 = ['data']; ss1 = ['fit = ' num2str(p2(1)) 'x^2 + ' num2str(p2(2)) 'x +' num2str(p2(3))]; zl = legend(ss0,ss1);
Today’s Assignment There are notes on the web page for fitting to a function of your choosing
Today's Assignment The current assignment is to put an accelerometer on the tip of the shaker and shake it
Today's Assignment The current assignment is to put an accelerometer on the tip of the shaker and shake it At something like 10 amplitudes
Today's Assignment The current assignment is to put an accelerometer on the tip of the shaker and shake it At something like 10 amplitudes And something like 3 frequencies maybe 10Hz, 100Hz, 1kHz
Today's Assignment Then for each frequencies