1 / 8

Introduction

Introduction. Today we are looking at how to interpret experimental data Normally, data is acquired with random errors How do we take the data and determine a model tha t explains the experiment?. Warm-Up Problem. How far is th e point from the line in the y-direction?.

howell
Download Presentation

Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction • Today we are looking at how to interpret experimental data • Normally, data is acquired with random errors • How do we take the data and determine a model that explains the experiment?

  2. Warm-Up Problem How far is the point from the line in the y-direction?

  3. Curve Fitting (regression) • Engineers often have to fit imperfect data to models of how a system behaves • Material tests • Circuit output • Wind tunnel tests • There are always errors in experimental data • Imperfect models • Imperfect sensors • We need to find the “best fit” of the model to the data • Minimize the cumulative error in the measurements

  4. Curve Fitting (regression) • MATLAB has tools to fit lines and curves to data • In Class example: • Download “Curve Fitting Data” from the course webpage • In MATLAB, load curve_fit • plot(x,y) • We need to fit a curve to this data • In the figure window, go to the “tools” menu and select “Basic Fitting” • Select “linear” • This line is chosen to fit the data in a way that minimizes the difference between the measurements and the curve • Check the “show equations” box • Check the “plot residuals” box • Check the “show norms of residuals” box • Now select higher order curves to fit to the data • Are these solutions better? Why?

  5. Curve Fitting (regression) • We can also use the MATLAB command “polyfit” to do the same job in the command window • The result is the polynomial vector • Try polyfit(x,y,2) to give a quadratic curve fit

  6. Concept Questions • What are 2 sources of errors in experimental data? • In what sense is a curve the “best fit” of the data? • If you want to fit a line to a set of 2 data points, what will the resulting error between the model and the data points be?

  7. Group Problem • You are a part of a firm designing nanoscale speedometers to measure speeds of asmall moving creatures like centipedes. To test your sensor, you gather a centipede and you measure the follwing data, in MATLAB notation: • T = [0 20 40 60 80 100 120]; %time (sec) • S = [0 105 197 310 390 502 599]; %position (mm) • Use the data to create a graph and a mathematical model • Use polyfit to fit a line to the data • Use polyval to calculate points on the line over a range of T = 0 to 120 • Plot the line fit as a line and the data as indivdual points on the same plot • Add appropriate labels and a title to the plot • Add a legend to the plot

  8. For Next Time • Read Chapter 11 in the Gilat book (prepare for a quiz on the reading)

More Related