Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
CHEMICAL ENGINEERS
(EXCEL SECTION)
Instructors:
Prof. V.E Efeovbokhan and Engr. D. E. Babatunde
Curve Fitting with Excel
• Engineers often collect paired data in order to
understand the characteristics or the behaviour of a
system.
• Relationships between the paired data are often
developed graphically.
• Mathematical expressions that capture the
relationships shown in the data can then be developed.
• Our goal is to determine the equation of a curve that
represents the trend reflected by the entire data set.
• To do so, we will make use of the method of least
squares, which is commonly used for fitting straight line
or a curve to a set of data.
The method
The methodof
of least squares
least squares
Cluster of measured data during an
experimental session in the lab.
The method of least squares
• The method of least squares is based on
minimizing the sum of the deviations or errors
of each of the data points from the values on
the line of best fit. For example, the figure that
follows shows how much data point number 8
is deviated from the line of best fit. If each
error is calculated this way and then summed
together. The least squares method is a way of
minimizing the sum of all these errors (Read up
on this from your engineering mathematics or
statistics textbook if you have forgotten).
The method
The methodof
of least squares
least squares
Fitting a straight line to a set of data
• To fit a straight line to a set of data means we wish to
determine the values of the coefficients a and b in the
straight-line equation y = ax + b so that the line will pass
through n data points. The coefficients are obtained by
satisfying the least squares criteria. In particular, the
coefficients are determined by solving the following two
simultaneous equations (You can find out how this is
derived from books on curve fittings). .
Fitting a straight line to a set of data
Class Example:
An engineer has measured the force exerted by
a spring as a function of its displacement from
its equilibrium position. The following data
have been obtained:
Fitting a straight line to a set of data
Solution
Fitting a straight line to a set of data
41a + 5b = 27.5
479a + 41b = 299
The next figure shows a plot of the given data and the
line of best fit.
Fitting a straight line to a set of data
14
12
10
Force, N
0
0 5 10 15 20 25
Displacement from Equilibrium Position, cm
Accessing a curve fit
b. INTERCEPT(known_y's,known-x's)
c. RSQ (known_y's,known-x's)
If one is dealing with a set of points (x,y) for a
straight line, the slope, the intercept and R2can be
found without plotting by using the functions:
SLOPE,
Practice Questions
Q1
y: 0.038; 0.080; 0.174; 0.448; 1.43; 5.13; 9.47;
x: 0.2 0.4 0.8 2.0 6.0 20.0 35.0
Find the best values of the constants bo and b1 that best describe the
data by the equation: Y = b0Xb1
Q2. Develop a polynomial equation from the data on the heat capacity
of benzene vapour as a function of temperature.
Cp cal/K gmol: 19.65; 26.74; 32.80; 37.74; 41.75; 45.06; 47.83; 50.16;
TK 300; 400; 500; 600; 700; 800; 900; 1000.
Q3
V mm/s: 11.71; 13.63; 17.25; 18.92;
P bar : 50.6; 75.3; 116.3; 138.8.
Based on theoretical and empirical knowledge the relationship between
burning rate and pressure had the form: V=bPn
Determine the coefficients b and n
Q4
The relation between the heat capacity of liquid sulfuric acid in Cal/g C
and temperature in C is as follows:
Cal/g C: 0.377; 0.389; 0.396; 0.405; 0.466; 0.458
T C: 50; 100; 150; 200; 250; 300
Determine regression coefficients in the linear regression:
Cp = bo + b1T