You are on page 1of 49

Reporters: Badilla, Harriet G. Salva, Karen Frances Remey A.

Spatial profile (Temp. vs. Time) Time history (Voltage vs. Time) Cause-and-effect (Force as a Function of Displacement) System output as a function of input (Yield of a chemical reaction as a function of temperature)

To determine the equation of a curve that represents the aggregate of the data

The overall strategy in fitting the curve to a set of data points is to determine an appropriate set of value for the coefficients in the equation of the chosen curve.

Determine the value of the coefficients a and b in the straight-line equation y= ax + b so that the line will pass through n data points.

Open a new worksheet and enter the x-data (independent variable) in the leftmost column Enter the y-data (dependent variable) in the next column Plot the data as an x-y graph (i.e., an XY chart) with arithmetic coordinate. Do not interconnect the individual data points Click on one of the plotted data points

Choose Add Trendline from the Chart menu. Then specify the type of curve and request any pertinent options when the resulting dialog box appears. Press the OK button. The curve fitting will then be carried out and the results displayed automatically

An engineer has measured the force exerted by a spring as a function of its displacement from its equilibrium position. The ff. data have been obtained:
Data Point No. 2 3 4 5 Distance (cm) 2 4 7 11 17 Force (N) 2.0 3.5 4.5 8.0 9.5

Force Exerted By A Spring


12.0 10.0 8.0 6.0 4.0 2.0 0.0 0.0 5.0 10.0

y = 0.514x + 1.279 R = 0.957

15.0

20.0

Determine the values of a and b in the equation y=ax + b in such manner that the sum of the squares of the errors will be minimized Wrote each error term as ei= yi f(xi) ei= yi (axi + b) Z = sum of the squares of the errors (SSE) z= ei2 + e22 + e32 + . . .

A. Exponential functions y = aebx ln y = ln a + bx Let u= ln y and c= ln a u = bx + c

The transient behavior of a capacitor has been studied by measuring the voltage drop across the device as a function of time. The ff. data obtained:
Time, sec 0 1 2 3 4 5 Voltage 10 6.1 3.7 2.2 1.4 0.8 Time, sec 6 7 8 9 10 12 Voltage 0.5 0.3 0.2 0.1 0.07 0.03

Capacitor Discharge Rate


12 10 8 6 4 2 0 0 2 4 6 8

y = 9.7534e-0.4923x R = 0.9988

10

12

14

B. Logarithmic Functions y = a ln x + b C. Power Functions y = axb ln y = ln a + b ln x let u= ln x, v= ln y and c= ln a v = bu + c

A chemical engineer is studying at a rate at which a reactant is consumed in a chemical reaction involving the manufacture a polymer. The ff. data have been obtained, showing the reaction rate (mol/sec) as function of the concentration of the reactant (mol/cu.ft.)

Concentration, mol/cu.ft. 100 80 60 40 20 10 5 1

Reaction Rate, mol/sec. 2.85 2.00 1.25 0.67 0.22 0.072 0.024 0.0018

Reaction Rate vs Concentration


3.5 3 2.5 2 1.5 1 0.5 0 0 20 40 0 80

y = 0.0018x1.599 R = 1

100

120

D. Polynomials y = c1 + c2x + c3x2 + . . . + ck+1xk

The ff. table presents the time for a highperformance sports car to reach the various speeds. The times are given in seconds and the speeds in miles per hour. Fit an equation to the data, thus obtaining an accurate mathematical relationship bet. Acceleration time and top speed.

Top speed, mph 30 40 50 60 70 80 90 100 110 120 130 140 150

Time, sec. 1.9 2.8 3.8 5.2 6.5 8.3 10.4 12.7 15.6 19.0 23.2 31.2 45.1

Acceleration Time vs Top Speed


50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 0 20 40 60 80 100 120 140 160 y = 0.0000x5 - 0.0000x4 + 0.0008x3 - 0.0525x2 + 1.7770x - 20.9580 R = 0.9998

Some guideline that may prove helpful, as outlined below:


1.

Try to plot the data as a straight line. If this is successful, it will indicate the function that should be used to represent the data. It a straight-line relationship can t be obtained, try fitting different types of curves to the data.

2.

3.

If a satisfactory curve fit can t be obtained using the first two guidelines, try plotting the data differently. In some cases, a better fit may be obtained by scaling the data so that the magnitude of the x-values is more-or-less the same as the y-values.

4.

A. Plotting the Data as a Straight Line


Equation Type Exponential Logarithmic Power Equation y = aebx y = a ln x + b y = axb Coordinate System log y versus x (semi-log) y versus log x (semi-log) log y versus x (log-log)

A. Plotting the Data as a Straight Line


 Thus, if the data appear as a straight line when

plotted in one of these coordinate systems, we will have a clear indication of what type of trendline to fit the data.

In example 5.7, a power function was used to represent a set of data. The selection of the power function was based upon previous familiarity with the process from which the data had been obtained. Verify the desirability of the power function by plotting the data on arithmetic coordinates, semi-log coordinates (both log y versus x and x versus log y), and loglog coordinates. Seek a coordinate system that will result in a straight-line relationship.

Concentration, mol/cu.ft. 100 80 60 40 20 10 5 1

Reaction Rate, mol/sec. 2.85 2.00 1.25 0.67 0.22 0.072 0.024 0.0018

Rxn Rate vs Conc


Conc. 100 80 60 40 20 10 5 1 Rxn Rate 2.85 2 1.25 0.67 0.22 0.072 0.024 0.0018
3.50 3.00

y = 0.028x - 0.228 R = 0.970

2.50

2.00

1.50

1.00 0.50 0.00 0.00 -0.50 20.00 40.00 60.00 80.00 100.00 120.00

RR vs Conc (semi-log plot on the y-axis)


10.00

y = 0.019e0.059x RR vs Conc y = 0.533ln(x) - 0.691 R = 0.763 (semi-log plot on the x-axis)


3.50 3.00

1.00 0.00 20.00 40.00 60.00 80.00 100.00

2.50 120.00 2.00 1.50

0.10 1.00 0.50 0.01 0.00 1.00 -0.50 -1.00 0.00 10.00 100.00

RR vs Conc (log-log plot)


10.00

y = 0.001x1.599 R = 1

1.00 1.00 10.00 100.00

0.10

0.01

0.00

B. Fitting Multiple Functions to a Given Data Set


 We may find that several different functions will

represent the data reasonably well. If several different functions appear to fit the data (using visual inspection) more or less equally well, the sum of the squares of the errors (SSE) and the r2 may be helpful in deciding which function fits best.

In example 5.8, we represented some performance data for several popular sports cars with a fifth-degree polynomial. Expand this study by fitting several other commonly used functions to the data. Determine which function best fits the data by comparing their respective SSE and r2 values.

Linear (Straight Line)


50.0 40.0

R = 0.8384

2nd-Deg Polynomial
50.0 45.0 40.0 35.0

R = 0.9657

30.0

30.0 25.0

20.0

20.0 15.0

10.0

10.0 5.0

0.0 0 -10.0 20 40 60 80 100 120 140 160

0.0 0 20 40 60 80 100 120 140 160

Power
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 0 20 40 60 80

R = 0.9715
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 100 120 140 160

3rd-Deg Polynomial

R = 0.9909

20

40

60

80

100

120

140

160

Exponential
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 0 20 40 60 80 100

R = 0.9922
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 120 140 160

4th-Deg Polynomial

R = 0.9981

20

40

60

80

100

120

140

160

5th-Deg Polynomial
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0 0 20 40 60 80 100

R = 0.9998

6th-Deg Polynomial
50.0 45.0 40.0 35.0 30.0 25.0 20.0 15.0 10.0 5.0 0.0

R = 0.9999

120

140

160

20

40

60

80

100

120

140

160

Function Straight Line 2nd-Degree Polynomial Power 3rd-Degree Polynomial Exponential 4th-Degree Polynomial 5th-Degree Polynomial 6th-Degree Polynomial

Visual Assessment Poor Poor Poor Fair Good Good Excellent Excellent

r2 0.8384 0.965 0.9715 0.9909 0.9922 0.9981 0.9998 0.9999

SSE 312.0 66.237 55.03 17.57 15.06 3.669 0.3862 0.1931

C. Substituting Other Variables for y and x


 It may be helpful to substitute 1/y for y 1/x for x x1/2 for x y1/2 for y

The following data represent the rate at which an oxygenation reaction occurs within a water purification chamber as a function of temperature. The data were obtained by a civil engineer, who must now plot the data and fit an appropriate equation through the data.

Temperature, K 253 258 263 268 273 278 283 288 293 298 303 308

Reaction Rate, moles/sec 0.12 0.17 0.24 0.34 0.48 0.66 0.91 1.22 1.64 2.17 2.84 3.70

Temp 253 258 263 268 273 278 283 288 293 298 303 308

Rxn Rate 0.12 0.17 0.24 0.34 0.48 0.66 0.91 1.22 1.64 2.17 2.84 3.70

Reacti
4.00 3.50 3.00 2.50 2.00 1.50 1.00 0.50 0.00 250

Rate vs Temperat re

y = 2E-05x3 - 0.017x2 + 4.414x - 381.8 R = 0.999

260

270

280

290

300

310

320

Reaction Rate vs Inverse Temp 1/Temp 0.00395 0.00388 0.00380 0.00373 0.00366 0.00360 0.00353 0.00347 0.00341 0.00336 0.00330 0.00325
10.00

y = 28,666,742.1324e-4,887.2323x R = 0.9999

Rxn Rate 0.12 0.17 0.24 0.34 0.48 0.66 0.91 1.22 1.64 2.17 2.84 3.70

1.00 0.00300 0.00320 0.00340 0.00360 0.00380 0.00400 0.00420

0.10

D. Scaling the Data


 When fitting a curve to a data, it is sometimes

helpful to scale the data so that the magnitudes of the y-values do not differ significantly from the magnitudes of the x-values.  It is recommended to redefine one of the values of the variables so hat it is expressed in terms of some multiple of the original unit of measurement.

A group of environmental engineers and scientists have made a prediction of the damage to the ozone layer in the northern hemisphere as a function of time, based upon present trends related to the use of fluorocarbon compounds. The ff. scenario has been suggested. (the thickness of the ozone layer is expressed in terms of arbitrary scale ranging from 0-1). Fit an equation to the data, expressing the ozone layer value as a function of time.

Year 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2006 2007

Ozone Layer 1.00 0.97 0.88 0.76 0.63 0.50 0.39 0.30 0.22 0.17 0.11 0.10

Change in the Ozone Layer


1.20

y = 8E-06x5 - 0.084x4 + 336.5x3 - 67460x2 + 7E+08x - 3E+11 R = 1

1.00

0.80

0.60

0.40

0.20

0.00 1994 1996 1998 2000 2002 2004 2006 2008

Change in the Ozone Layer


1.20

y = 8E-06x5 - 0.000x4 + 0.006x3 - 0.047x2 + 0.011x + 1 R = 1

1.00

0.80

0.60

0.40

0.20

0.00 0 2 4 6 8 10 12 14

You might also like