CT5 Regress
-
Upload
harmanpreet-singh-randhawa -
Category
Documents
-
view
226 -
download
0
Transcript of CT5 Regress
-
7/27/2019 CT5 Regress
1/19
Computational TechniquesComputational TechniquesM d lM d l R r i n nd In r l i nR r i n nd In r l i n
Dr. Niket Kaisare
Indian Institute of Technology - Madras
-
7/27/2019 CT5 Regress
2/19
Given the following data:
x 0.8 1.4 2.7 3.8 4.8 4.9
Regression:
tain a straig t ine
that best fits the data
-
7/27/2019 CT5 Regress
3/19
Given the following data:
x 0.8 1.4 2.7 3.8 4.8 4.9
Interpolation:
oin t e ots an
find a curve passing
through the data.
-
7/27/2019 CT5 Regress
4/19
..
x 0.8 1.4 2.7 3.8 4.8 4.9
y 0.69 1.00 2.02 2.39 2.34 2.83
,
chosen function to data
=
In inter olation iven finite amount of data we
. .
are interested in obtaining new data-points
within this range.
Atx = 2.0,y = 1.87
-
7/27/2019 CT5 Regress
5/19
Example: Kinetic Rate ConstantsExample: Kinetic Rate Constants
egress onegress on Experiments with conversion measured at
various temperatures
6
acekrRT)(
0
2
4
)
)ln(
1
)ln()ln( 0 ac
E
kr
-2
0log(
Slope = E/R
-3.5 -3 -2.5 -2 -1.5
x 10-3
-4
-1/T
Intercept = ln(k0)
-
7/27/2019 CT5 Regress
6/19
-
7/27/2019 CT5 Regress
7/19
Letx be an independent variable
andy be a dependent variable
Given the data:
NN yxyxyx ,,,,,, 2211
Find parameters to get a bestfit curve
;x
-
7/27/2019 CT5 Regress
8/19
..
Choose a function Various standard
For a given , obtain
The interpolatingthe values from
the model
function passes
through all the points
iy
The best minimizes
the error
Can be used to fill-
in the data at newyy
points
-
7/27/2019 CT5 Regress
9/19
..
Curve Fittin oinin the dots
Obtain a functional
form to fit the data
Obtain the value ofy
at intermediate oint
-
7/27/2019 CT5 Regress
10/19
-
7/27/2019 CT5 Regress
11/19
Model: ;xfy
Actual Data: NN yxyxyx ,,,,,, 2211 re iction:
Errors:
;ii xy
iii yye
iii exfy
;
Mean / Variance:
yi
Nxx i )1( Nxxs
ix
xs
-
7/27/2019 CT5 Regress
12/19
--
Letx1,x2, ,xn be n variables.
Let there be N data points for each:
xxx
n yxxx ,;,,, 222212
NnNNN yxxx ;,,, 21
Obtain for
x;fy
-
7/27/2019 CT5 Regress
13/19
-
7/27/2019 CT5 Regress
14/19
yawux 101111
yawux 212221
NNNNyawux
31
Least Squares
TT 1
-
7/27/2019 CT5 Regress
15/19
Exam le: S ecific heat as a function of T
Methane: cp = 85.8 + 1.126e-2 T 2.1141e-6 T2
Example: Antoines vapor pressure relationship
cTapsat
ln
-
7/27/2019 CT5 Regress
16/19
21
2111 xxx
32Model:
3
2
2
221 xxxX
321 NNN xxx
x
xx
xx
1
11
1
ln1
ln11
xaa
xaay 32
10 )ln(
o e :
X
2
x xN
-
7/27/2019 CT5 Regress
17/19
-
7/27/2019 CT5 Regress
18/19
Niiixxxxxxxxxx
P...... 1121
j
Niiiiiii
xx
xxxxxxxxxx ...... 1121
ij ji xx
The interpolating
polynomial becomes
NNPyPyPyxf ...)( 2211
-
7/27/2019 CT5 Regress
19/19
yy
iiiiyiiy
xx
1
],1[]1,2[
,
ii
iiiyiiiyiiii
xx
2
],1,2[]1,2,3[123
,,
ii xx 3
...,1,2,3,4,1,2,3,1,2, 32110 ycycycyc
...))(()()( 212110 xxxxcxxccxf