Download presentation
Presentation is loading. Please wait.
1
Newton-Gauss Algorithm iii) Calculation the shift parameters vector R (p 0 )dR(p 0 )/dR(p 1 )dR(p 0 )/dR(p 2 )=- - p1p1 p2p2 - … - The Jacobian Matrix p1p1 =- - p2p2 - … -
2
Newton-Gauss Algorithm iii) Calculation the shift parameters vector The Jacobian Matrix p1p1 =- p2p2 r(p 0 ) J pp r(p 0 ) = - J p p = - (J T J )-1 J T r(p 0 ) p = - J + r(p 0 )
3
Newton-Gauss Algorithm iii) Calculation the shift parameters vector The Jacobian Matrix R(k 1,k 2 ) J(k 1 ) r(k 1,k 2 ) J(k 2 ) Vectorised J(k 1 ) Vectorised J(k 2 )
4
Newton-Gauss Algorithm iii) Calculation the shift parameters vector p = p 0 + p = -J(0.3) k 1 - J(0.15) k 2 r(0.3,0.15) = - k 1 - k2k2 p = - J + r(0.3, 0.15) p = [0.0572 0.0695] p = [0.3 0.15] + [0.0572 0.0695] = [0.3572 0.2195] ssq_old = 1.6644ssq = 0.03346
5
Newton-Gauss Algorithm iv) Iteration until convergence Convergence Criterion Depending on the data, ssq can be very small or very large. Therefore, a convergence criterion analyzing the relative change in ssq has to be applied. The iterations are stopped once the absolute change is less than a preset value, , typically =10 -4 ssq old - ssq Abs ( ) ≤ ssq old
6
Newton-Gauss Algorithm guess parameters, p=p start Calculate residuals, r(p) and sum of squares, ssq ssq const.? Calculate Jacobian, J Calculate shift vector p, and p = p + p End, display results yes no
7
Error Estimation The availability of estimates for the standard deviations of the fitted parameters is a crucial advantage of the Newton- Gauss algorithm. Hess matrix H = J T J The inverted Hessian matrix H -1, is the variance- covariance matrix of the fitted parameters. The diagonal elements contain information on the parameter variances and the off-diagonal elements the covariances. i = A (d i,i ) 0.5 A = ( ) 0.5 nt × n – (np + nc × n ) ssq
8
ng function Using Newton-Gauss algorithm for multivariate fitting
9
r_cons function Introducing the model for consecutive kinetics to ng function
10
kinfit5 Executing the ng function Initial estimates
17
? Exactly read the ng.m, r_cons.m and kinfit5.m files and explain them
18
Rank deficiency and fitting Second order kinetics A + B C k [A] + [C] = [A] 0 [B] + [C] = [B] 0 [B] 0 = [A] 0 [B] + [C] = [A] + [C] [A] - [B] + ( [C] = 0 Rank deficiency in concentration profiles Linear dependency
19
A = C E + R [A] 0 = 1[B] 0 = 1.5k = 0.3 E = C \ A
20
Calculated pure spectra according to E = C \ A
21
Reconstructed dataMeasured data Residuals
24
? Use ng function for determination of pK a of weak acid HA
25
The Marquardt modification Generally, The Newton-Gauss method converges rapidly, quadratically near the minimum. However, if the initial estimates are poor, the functional approximation by the Taylor series expansion and the linearization of the problem becomes invalid. This can lead to divergence of the ssq and failure of the algorithm. H = J T J p = - (H + mp × I) -1 J T r(p 0 ) The Marquardt parameter (mp) is initially set to zero. If divergence of the ssq occurs, then the mp is introduce (given a value of 1) and increased (multiplication by 10 per iteration) until the ssq begins to converge. Increasing the mp shortens the shift vector and direct it to the direction of steepest descent. Once the ssq convergences the magnitude of the mp is reduced (division by 3 per iteration) and eventually set to zero when the break criterion is reached.
26
Newton-Gauss method and poor estimates of parameters Original parameters: k 1 =0.4 k 2 =0.2 Estimated parameters: k 1 =4 k 2 =2 Measured data Considered model: Consecutive kinetic
27
Kinfit5.m
36
Newton-Gauss-Levenberg-Marquardt Algorithm guess parameters, p=p start initial value for mp Calculate residuals, r(p) and sum of squares, ssq ssq old ssq Calculate Jacobian, J Calculate shift vector p, and p = p + p End, display results = > mp=0 < mp ×10mp / 3 yes no
37
Newton-Gauss-Levenberg-Marquardt Algorithm for non-linear curve fitting nglm.m
38
kinfit6.m
55
? Use nglm function for determination of rate constant of a second order kinetics
56
? Are the calculated error of parameters dependent to initial estimates?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.