344 views

Uploaded by b3442094

- Capacito Easy
- 2 5 Linear Least Squares Regression
- am002044 (1).pdf
- JMP_LinReg
- Problem Set 03
- cu stat3008 Assignment 1
- Cattle 94-1 Marshall
- AdesinaIJNS2012(1)
- rerwe
- Topic 7 IntegrationRevised
- 240 Transformations
- SIMULTANEOUS TRAVEL MODEL ESTIMATION FROM SURVEY DATA AND TRAFFIC COUNTS.pdf
- Lecture 5
- Traverse Adjustment using Excel
- 10.1.1.153
- Amath 351 Final
- DiffEqnWeek1
- Mathemagics
- Characterization of Rubber Isolat Or
- Random Vibrations of Elastic Plates

You are on page 1of 5

C HAP. 5

C URVE F ITTING

Data Linearization Method for y = C e Ax

Suppose that we are given the points (x1 , y1 ), (x2 , y2 ), . . . , (x N , y N ) and want to t an exponential curve of the form (1) y = Ce Ax .

The rst step is to take the logarithm of both sides: (2) ln(y) = Ax + ln(C).

This results in a linear relation between the new variables X and Y : (4) Y = AX + B.

The original points (xk , yk ) in the x y-plane are transformed into the points (X k , Yk ) = (xk , ln(yk )) in the X Y -plane. This process is called data linearization. Then the leastsquares line (4) is t to the points {(X k , Yk )}. The normal equations for nding A and B are

N 2 Xk N N

A+

k=1

Xk

B=

k=1 N

X k Yk , Yk .

k=1

(5)

k=1 N

Xk

k=1

A+

NB

After A and B have been found, the parameter C in equation (1) is computed: (6) C = eB.

Example 5.4. Use the data linearization method and nd the exponential t y = Ce Ax for the ve data points (0, 1.5), (1, 2.5), (2, 3.5), (3, 5.0), and (4, 7.5). Apply the transformation (3) to the original points and obtain (7) {(X k , Yk )} = {(0, ln(1.5), (1, ln(2.5)), (2, ln(3.5)), (3, ln(5.0)), (4, ln(7.5))} = {(0, 0.40547), (1, 0.91629), (2, 1.25276), (3, 1.60944), (4, 2.01490)}.

These transformed points are shown in Figure 5.4 and exhibit a linearized form. The equation of the least-squares line Y = AX + B for the points (7) in Figure 5.4 is (8) Y = 0.391202X + 0.457367.

S EC . 5.2

Y 2.0 1.5 1.0 0.5

263

Y = AX + B

X 0 1 2 3 4

Table 5.4 Obtaining Coefcients of the Normal Equations for the Transformed Data Points {(X k , Yk )}

xk 0.0 1.0 2.0 3.0 4.0 yk 1.5 2.5 3.5 5.0 7.5 Xk 0.0 1.0 2.0 3.0 4.0 10.0 = Xk Yk = ln(yk ) 0.405465 0.916291 1.252763 1.609438 2.014903 6.198860 = Yk =

2 Xk

Calculation of the coefcients for the normal equations in (5) is shown in Table 5.4. The resulting linear system (5) for determining A and B is (9) 30A + 10B = 16.309742 10A + 5B = 6.198860.

The solution is A = 0.3912023 and B = 0.457367. Then C is obtained with the calculation C = e0.457367 = 1.579910, and these values for A and C are substituted into equation (1) to obtain the exponential t (see Figure 5.5): (10) y = 1.579910e0.3912023x (t by data linearization).

264

y 8 6 4 2

C HAP. 5

C URVE F ITTING

y = Ce Ax

x 0 1 2 3 4

Figure 5.5 The exponential t y = 1.579910e0.3912023x obtained by using the data linearization method.

Suppose that we are given the points (x1 , y1 ), (x2 , y2 ), . . . , (x N , y N ) and want to t an exponential curve: (11) y = Ce Ax .

N

(12)

E(A, C) =

k=1

(Ce Axk yk )2 .

The partial derivatives of E(A, C) with respect to A and C are (13) and (14) E =2 C

N

E =2 A

k=1

k=1

When the partial derivatives in (13) and (14) are set equal to zero and then simplied, the resulting normal equations are

N N

C (15)

k=1

xk e

2Axk

xk yk e Axk = 0,

k=1 N

C

k=1

e Axk

k=1

yk e Axk = 0.

S EC . 5.2

265

The equations in (15) are nonlinear in the unknowns A and C and can be solved using Newtons method. This is a time-consuming computation and the iteration involved requires good starting values for A and C. Many software packages have a built-in minimization subroutine for functions of several variables that can be used to minimize E(A, C) directly, For example, the Nelder-Mead simplex algorithm can be used to minimize (12) directly and bypass the need for equations (13) through (15).

Example 5.5. Use the least-squares method and determine the exponential t y = Ce Ax for the ve data points (0, 1.5), (1, 2.5), (2, 3.5), (3, 5.0), and (4, 7.5). For this solution we must minimize the quantity E(A, C), which is (16) E(A, C) = (C 1.5)2 + (Ce A 2.5)2 + (Ce2A 3.5)2 + (Ce3A 5.0)2 + (Ce4A 7.5)2 .

We use the fmins command in MATLAB to approximate the values of A and C that minimize E(A, C). First we dene E(A, C) as an M-le in MATLAB. function z=E(u) A=u(1); C=u(2); z=(C-1.5).^2+(C.*exp(A)-2.5).^2+(C.*exp(2*A)-3.5).^2+... (C.*exp(3*A)-5.0).^2+(C.*exp(4*A)-7.5).^2; Using the fmins command in the MATLAB Command Window and the initial values A = 1.0 and C = 1.0, we nd >>fmins(E,[1 1]) ans = 0.38357046980073 1.61089952247928 Thus the exponential t to the ve data points is (17) y = 1.6108995e0.3835705 (t by nonlinear least squares).

A comparison of the solutions using data linearization and nonlinear least squares is given in Table 5.5. There is a slight difference in the coefcients. For the purpose of interpolation it can be seen that the approximations differ by no more than 2% over the interval [0, 4] (see Table 5.5 and Figure 5.6). If there is a normal distribution of the errors in the data, (17) is usually the preferred choice. When extrapolation is made beyond the range of the data, the two solutions will diverge and the discrepancy increases to about 6% when x = 10.

Numerical Methods Using Matlab, 4th Edition, 2004 John H. Mathews and Kurtis K. Fink ISBN: 0-13-065248-2 Prentice-Hall Inc. Upper Saddle River, New Jersey, USA http://vig.prenhall.com/

- Capacito EasyUploaded byHidayatullah Rizqi
- 2 5 Linear Least Squares RegressionUploaded bygt
- am002044 (1).pdfUploaded byLuis Valenzuela Ramos
- JMP_LinRegUploaded byyuanstark
- Problem Set 03Uploaded byJenosan Annamalai
- cu stat3008 Assignment 1Uploaded byJim Hack
- Cattle 94-1 MarshallUploaded bybernabeth
- AdesinaIJNS2012(1)Uploaded byJishan Ahmed
- rerweUploaded byMaiah Dinglasan
- Topic 7 IntegrationRevisedUploaded byAmimul Ihsan
- 240 TransformationsUploaded byAyman Alhalfawy
- SIMULTANEOUS TRAVEL MODEL ESTIMATION FROM SURVEY DATA AND TRAFFIC COUNTS.pdfUploaded byRadulescu Adrian
- Lecture 5Uploaded byAdityan Ilmawan Putra
- Traverse Adjustment using ExcelUploaded byGiora Rozmarin
- 10.1.1.153Uploaded bypks1969
- Amath 351 FinalUploaded byRon Nair
- DiffEqnWeek1Uploaded byEren Baharözü
- MathemagicsUploaded by胡亦行
- Characterization of Rubber Isolat OrUploaded byLạc Dương
- Random Vibrations of Elastic PlatesUploaded byMohammad Ahmad Gharaibeh
- Automatic Interpretation of Schlumberger Sounding CurvesUploaded bySanjay Muthekar
- Mg t 303 Lecture Notes 3Uploaded byqwang1993
- Base ExcitationUploaded byBenjamin Vazquez
- Mathematical TechniquesUploaded byyehiaelshazly
- MAPLE Quick Reference CardUploaded byProfDan-i-El
- 10.4 Exponential Equations.pdfUploaded byPatzAlzateParaguya
- Ppr0585Uploaded bySaurabh Borkar
- 000 Imp FVM-Cond ConvUploaded byPratik Makwana
- Lecture 4Uploaded bywittigenstein
- Souza e Junqueira 2005.pdfUploaded byEduardo Castro

- Three Equations Method for Normal Concrete Mix DesignUploaded bySEP-Publisher
- Estimating Irregular Wave RunupUploaded bywanjailani
- Ch. 2 Review SolutionsUploaded byJorge Con
- WSS Cleaning Technical Manual.pdfUploaded bySatyabrat Gaan
- Carta Gantt Sains F4 2016Uploaded bykriiz
- ASHRAE Journal - Optimizing Chilled Water Plant ControlsUploaded byManoj Gewali
- MREC MR13 BTech EEE Syllabus BookUploaded byRohan Sonal
- Geometrization of Quantum Mechanics - KibbleUploaded byWendy Baldwin
- Effect of Lathe Waste Review 1Uploaded bydreamboy87
- Ge Hid LampsUploaded byamam
- ji ji mugeUploaded byAnonymous xU5JHJe5
- Switchboard - LV Emergency Generator Paralleling.docUploaded byGilberto Mejia
- PLT SyllabusUploaded bynamanbansal
- Lecture 6 LandauUploaded byYossi Cordova
- final paperUploaded byapi-320699152
- An Introduction to Mathematical Optimal Control TheoryUploaded bysncv256
- ATPDraw ManualUploaded byMarcelo2010
- C11 Redox ReactionsUploaded byKris Dookharan
- MODFLO-2D GDSUploaded byAugusto Andres Apolinario Tenicela
- FrontUploaded bydadasa
- ArticuloUploaded byluz
- HVDC CablesUploaded byahdabmk
- Pipe Denting Thesis 20140922 CompressedUploaded bytt3340
- ZEOLITA Vs CARBON ACTIVADO.pdfUploaded byJose Marval Rodriguez
- Colpitt Oscillator PDFUploaded byScott
- 34 Absorption SpectroscopyUploaded bykorna2
- Edit GambarUploaded bygempurmalaya
- Design and Construction of a Remote Piloted Flying WingUploaded bylufabao
- Dynamic Design for Anchors.pdfUploaded byJeferson Quispe
- 130150119001_2151903.pptUploaded byHitesh Gahlawat