Generate CleanCurve = sum of three exponential curves and NoisyCurve=CleanCurve with 5% proportional Gaussian noise. Fit, the sum of three exponentials with amplitudes and decay rates found by optimization, attempts to fit the NoisyCurve. Parameters and confidence limts are compared with MonteCarlo estimates.
Model number: 0348
|Run JSim model Java Applet:||JSim Tutorial|
Three exponential curves are summed to form CleanCurve. CleanCurve is modified to include 5% proportional Gaussian noise producing NoisyCurve. Step 01: From the Project GUI, delete FivePercent (data set). Step 02: From the RunTime GUI, Run the model. Step 03: From Plot pages (3) select CreateNoisyandClean. Step 04: [Plot page GUI->File->Store Project Data Set] store data set under name FivePercent. Step 05: [Plot page Select DataAndFit]. Step 06: For Curve 1, use [???] to select FivePercent, plotting the NoisyCurve. The solid black line represents the fit to the Noisy Curve and the dashed lines represent the three exponentials that are summed to produce Fit. Step 07: Go to the optimizer GUI. [Run Time GUI->Optimizer GUI]. Step 08: Inspect the Optimizer Gui. It has been preset for you to optimize the six parameters controlling the Fit. Step 09: Under [Data Set][???] Select FivePercent. Step 10: The OK boxes allow the parameters to be fit. Experiment with fitting with 1, 2, or 3 exponentials. Step 11: To reset the parameters [Optimizer GUI->Config->ParSet-> Load Project Parameter Set] Select Start. Step 12: Run the optimizer twice. The first time you run it with this data set and initial value of parameters, you will get the Error message: "aborted: java.lang.RuntimeException: Matrix is singular." Run the optimizer again. Step 13: [Optimizer GUI->Report GUI] You will see that the Standard Deviation on some of the parameters is extremely large. The condition number of the correlation matrix indicates that the matrix is nearly singular. The correlation matrix gives the correlation between Af1 and kf1 as 1 and between Af3 and kf3 as 0.9988. This indicates that two of the four parameters are redundant. Remove kf1 and kf3 from the optimization [uncheck their OK boxes by switching back to the Config GUI.] Run the Optimizer again. Step 14: Recheck the values from the Report GUI. The problem with fitting 3 exponentials is that there are close to being a set of linearly dependent functions. Step 15: When optimizing, if the point weight (Pwgt) is set to 1/Fit^(1.5), the tail of the fit is dramatically improved. If the point weight is 1, the optimizer gets stuck in local minima. Where the optimization starts from turns out to be important. With perfect data and a perfect fit, the correlation between parameters cannot be computed. Fitting 3 exponentials when the data are sparse or noisy is mathematically challenging. Test the capability to identify the decay rates when they differ by a factor of 3 instead of 5. What happens when the magnitudes of the components are disparate? When do two exponentials fit the curve as well as a 3-exp curve? Consider Akaike information criteria re choosing how many exponentials to use in fitting. Consider how these functions behave in the frequncy domain or LaPlace transforms. See Gardner . In each case, examine the correlation matrix and the parameter confidence ranges after each optimization. Look for correlations amongst parameters Run Monte Carlo Analysis to determine error bounds on the estimation of amplitudes and time constants. Compare these with the confidence ranges estimated from the covariance Matrix: correlation matrix = covariance matrix divided by the variance.