Calibration & Curve Fitting

Slides:



Advertisements
Similar presentations
Things to do in Lecture 1 Outline basic concepts of causality
Advertisements

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Chapter 10 Curve Fitting and Regression Analysis
Ch11 Curve Fitting Dr. Deshi Ye
Objectives (BPS chapter 24)
P M V Subbarao Professor Mechanical Engineering Department
Regression Analysis Using Excel. Econometrics Econometrics is simply the statistical analysis of economic phenomena Here, we just summarize some of the.
Lecture (14,15) More than one Variable, Curve Fitting, and Method of Least Squares.
Nonlinear and multiple regression analysis Just a straightforward extension of linear regression analysis.
Curve Fitting and Interpolation: Lecture (IV)
Least Square Regression
Curve-Fitting Regression
Least Square Regression
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 17 Least Square Regression.
EGR 105 Foundations of Engineering I Fall 2007 – week 7 Excel part 3 - regression.
SIMPLE LINEAR REGRESSION
Development of Empirical Models From Process Data
Engineering Computation Curve Fitting 1 Curve Fitting By Least-Squares Regression and Spline Interpolation Part 7.
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 CURVE.
SIMPLE LINEAR REGRESSION
Chi Square Distribution (c2) and Least Squares Fitting
Generation & Propagation of Uncertainty Analysis P M V Subbarao Professor Mechanical Engineering Department A Measure of Confidence Level in compound Experiments…..
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Correlation and Regression Analysis
Classification and Prediction: Regression Analysis
Objectives of Multiple Regression
SIMPLE LINEAR REGRESSION
Least-Squares Regression
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
Physics 114: Lecture 15 Probability Tests & Linear Fitting Dale E. Gary NJIT Physics Department.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Simple Linear Regression
Introduction to Error Analysis
Development of An ERROR ESTIMATE P M V Subbarao Professor Mechanical Engineering Department A Tolerance to Error Generates New Information….
CPE 619 Simple Linear Regression Models Aleksandar Milenković The LaCASA Laboratory Electrical and Computer Engineering Department The University of Alabama.
Simple Linear Regression Models
CORRELATION & REGRESSION
Unit 4: Modeling Topic 6: Least Squares Method April 1, 2003.
3/2003 Rev 1 I – slide 1 of 33 Session I Part I Review of Fundamentals Module 2Basic Physics and Mathematics Used in Radiation Protection.
Bivariate Data When two variables are measured on a single experimental unit, the resulting data are called bivariate data. You can describe each variable.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Curve Fitting.
Applications The General Linear Model. Transformations.
Quality of Curve Fitting P M V Subbarao Professor Mechanical Engineering Department Suitability of A Model to a Data Set…..
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Chapter 8 Curve Fitting.
Curve-Fitting Regression
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
CHAPTER 3 Model Fitting. Introduction Possible tasks when analyzing a collection of data points: Fitting a selected model type or types to the data Choosing.
Regression Regression relationship = trend + scatter
10B11PD311 Economics REGRESSION ANALYSIS. 10B11PD311 Economics Regression Techniques and Demand Estimation Some important questions before a firm are.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Lecture I Sensors.
LECTURE 3: ANALYSIS OF EXPERIMENTAL DATA
Curve Fitting Pertemuan 10 Matakuliah: S0262-Analisis Numerik Tahun: 2010.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression.
OLS Regression What is it? Closely allied with correlation – interested in the strength of the linear relationship between two variables One variable is.
Richard Kass/F02P416 Lecture 6 1 Lecture 6 Chi Square Distribution (  2 ) and Least Squares Fitting Chi Square Distribution (  2 ) (See Taylor Ch 8,
CORRELATION-REGULATION ANALYSIS Томский политехнический университет.
The simple linear regression model and parameter estimation
Chapter 7. Classification and Prediction
Part 5 - Chapter
Part 5 - Chapter 17.
CSE 4705 Artificial Intelligence
Chapter 12 Curve Fitting : Fitting a Straight Line Gab-Byung Chae
Part 5 - Chapter 17.
Linear regression Fitting a straight line to observations.
Discrete Least Squares Approximation
Least Square Regression
SIMPLE LINEAR REGRESSION
Presentation transcript:

Calibration & Curve Fitting P M V Subbarao Professor Mechanical Engineering Department How to obtain y=f(x) ???????

We have developed confirmed methods to measure xi & ui What are the units of xi & ui? How to convert a Measured variable into Physical (Derived) Variable?

Instrument & calibration An instrument is a device that transforms a physical variable of interest (the measurand) into a form that is suitable for recording (the measurement). Simple Instrument Model

Advanced Instrument Model

Sensors Sensors convert physical variables to signal variables. Sensors are often transducers : They are devices that convert input energy of one form into output energy of another form. Sensors can be categorized into two broad classes depending on how they interact with the environment they are measuring. Passive sensors: do not add energy as part of the measurement process but may remove energy in their operation. Active sensors : add energy to the measurement environment as part of the measurement process.

Interpolation Vs Curve Fitting

Calibration The process of development of a relationship between the physical measurement variable input and the signal variable (output) for a specific sensor is known as the calibration of the sensor. Typically, a sensor (or an entire instrument system) is calibrated by providing a known physical input to the system and recording the output. The data are plotted on a calibration curve.

Sensitivity of A Sensor Saturation Point Sensitivity of Thermistor Linear range

Curve Fitting Techniques Where does this given function Measured Variable = f (Physical Variable) come from in the first place? Analytical models of phenomena (e.g. equations from physics) Create an equation from observed data Curve fitting - capturing the trend in the data by assigning a single function across the entire range. A straight line is described generically by The goal is to identify the coefficients ‘a’ and ‘b’ such that f(x) ‘fits’ the data well

Linear curve fitting (linear regression) Given the general form of a straight line How can we pick the coefficients that best fits the line to the data? What makes a particular straight line a ‘good’ fit?

y x

Quantifying error in a curve fit Assumptions: positive or negative error have the same value (data point is above or below the line) Weight greater errors more heavily Denote data values as (x, y) Name points on the fitted line as (x, f(x)). The error is available at the four data points.

Hunting for A Shape & Geometry of A Data Set

Our fit is a straight line, so now substitute The ‘best’ line has minimum error between line and data points This is called the least squares approach, since square of the error is minimized.

Solve for the a and b so that the previous two equations both = 0 Take the derivative of the error with respect to a and b, set each to zero Solve for the a and b so that the previous two equations both = 0

put these into matrix form

Is a straight line suitable for each of these cases ?

The Least-Squares mth Degree Polynomials When using an mth degree polynomial to approximate the given set of data, (x1,y1), (x2,y2)…… (xn,yn), where n ≥ m, the best fitting curve has the least square error, i.e.,

To obtain the least square error, the unknown coefficients a0, a1, … To obtain the least square error, the unknown coefficients a0, a1, …. and am     must yield zero first derivatives.

Expanding the previous equations, we have The unknown coefficients can hence be obtained by solving the above linear equations.

No matter what the order j, we always get equations LINEAR with respect to the coefficients. This means we can use the following solution method

Selection of Order of Fit 2nd and 6th order look similar, but 6th has a ‘squiggle to it. Is it Required or not?

Under Fit or Over Fit: Picking An appropriate Order Underfit - If the order is too low to capture obvious trends in the data Overfit - over-doing the requirement for the fit to ‘match’ the data trend (order too high) Polynomials become more ‘squiggly’ as their order increases. A ‘squiggly’ appearance comes from inflections in function General rule: pick a polynomial form at least several orders lower than the number of data points. Start with linear and add order until trends are matched.

Linear Regression Analysis Linear curve fitting Polynomial curve fitting Power Law curve fitting: y=axb ln(y) = ln(a)+bln(x) Exponential curve fitting: y=aebx ln(y)=ln(a)+bx

Goodness of fit and the correlation coefficient A measure of how good the regression line as a representation of the data. It is possible to fit two lines to data by (a) treating x as the independent variable : y=ax+b, y as the dependent variable or by (b) treating y as the independent variable and x as the dependent variable. This is described by a relation of the form x= a'y +b'. The procedure followed earlier can be followed again.

put these into matrix form

Recast the second fit line as: is the slope of this second line, which not same as the first line

The ratio of the slopes of the two lines is a measure of how good the form of the fit is to the data. In view of this the correlation coefficient ρ defined through the relation

Correlation Coefficient The sign of the correlation coefficient is determined by the sign of the covariance. If the regression line has a negative slope the correlation coefficient is negative while it is positive if the regression line has a positive slope. The correlation is said to be perfect if ρ = ± 1. The correlation is poor if ρ ≈ 0. Absolute value of the correlation coefficient should be greater than 0.5 to indicate that y and x are related! In the case of a non-linear fit a quantity known as the index of correlation is defined to determine the goodness of the fit. The fit is termed good if the variance of the deviates is much less than the variance of the y’s. It is required that the index of correlation defined below to be close to ±1 for the fit to be considered good.

r2=1.000 r2=0.991 r2=0.904 r2=0.821 r2=0.493 r2=0.0526

Multi-Variable Regression Analysis Cases considered so far, involved one independent variable and one dependent variable. Sometimes the dependent variable may be a function of more than one variable. For example, the relation of the form is a common type of relationship for flow through an Orifice or Venturi. mass flow rate is a dependent variable and others are independent variables.

Set up a mathematical model as: Taking logarithm both sides Simply: where y is the dependent variable, l, m, n, o and p are independent variables and a, b, c, d, e are the fit parameters.

The least square method may be used to determine the fit parameters. Let the data be available for set of N values of y, l, m, n, o, p values. The quantity to be minimized is given by What is the permissible value of N ?

The normal linear equations are obtained by the usual process of setting the first partial derivatives with respect to the fit parameters to zero.

These equations are solved simultaneously to get the six fit parameters. We may also calculate the index of correlation as an indicator of the quality of the fit. This calculation is left to you!