## Dynamic Estimation Statistics

## Main.ParameterStatistics History

Hide minor edits - Show changes to output

Added lines 9-12:

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/Y-5R6t8d64g" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/Y-5R6t8d64g" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Added lines 53-56:

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/6Hrt7vL3ynU" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Changed lines 39-40 from:

-> Attach:f-test_equation.~~gif~~

to:

-> Attach:f-test_equation.png

Changed line 94 from:

-> Attach:f-test_equation.~~gif~~

to:

-> Attach:f-test_equation.png

Deleted lines 78-81:

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/2q4vSKwaBtw?rel=0" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Changed lines 29-30 from:

!!!! Nonlinear Confidence Interval

to:

!!!! Nonlinear Confidence Interval for Dye Fading Kinetics

Changed lines 90-91 from:

!!!! Nonlinear Confidence ~~Intervals~~

to:

!!!! Nonlinear Confidence Interval for Ethyl Acetate Kinetics

Deleted lines 94-97:

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/rL7Mvl2-XIM" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Changed lines 23-24 from:

to:

Attach:download.png [[Attach:dye_fading_experiment.zip | Dye Fading Experiment Files in MATLAB and Python (zip)]]

Changed lines 29-34 from:

*

to:

!!!! Nonlinear Confidence Interval

Attach:download.png [[Attach:dye_fading_conf_int.zip | Nonlinear Confidence Intervals in Excel, MATLAB, and Python (zip)]]

Attach:download.png [[Attach:dye_fading_conf_int.zip | Nonlinear Confidence Intervals in Excel, MATLAB, and Python (zip)]]

Changed lines 46-49 from:

(:keywords nonlinear, optimization, engineering optimization, dynamic estimation, interior point, active set, differential, algebraic, modeling language, university course, Ethyl Acetate:)

(:description Case study on dynamic reconciliation for kinetic modeling using optimization techniques in engineering for Ethyl Acetate kinetics:)

to:

----

Changed lines 72-73 from:

Attach:download.~~jpg~~ [[Attach:ethyl_acetate.zip | Download APM Python and MATLAB Files]]

to:

Attach:download.png [[Attach:ethyl_acetate.zip | Download APM Python and MATLAB Files]]

Deleted lines 89-90:

Changed line 92 from:

to:

Attach:download.png [[Attach:ethyl_acetate_conf_int.zip | Nonlinear Confidence Intervals in MATLAB]]

Changed lines 7-8 from:

!!!! Case Study ~~on Dynamic Parameter Estimation~~

to:

!!!! Case Study 1: Reversible Reaction

Added lines 47-118:

(:title Estimate Ethyl Acetate Kinetic Parameters from Dynamic Data:)

(:keywords nonlinear, optimization, engineering optimization, dynamic estimation, interior point, active set, differential, algebraic, modeling language, university course, Ethyl Acetate:)

(:description Case study on dynamic reconciliation for kinetic modeling using optimization techniques in engineering for Ethyl Acetate kinetics:)

!!!! Case Study 2: Ethyl Acetate Kinetics

This assignment contains a kinetic analysis of several experiments using the reaction of Ethyl Acetate with Sodium Hydroxide to produce Ethanol and Sodium Acetate.

-> CH'_2_'COOCH'_2_'CH'_3_' + NaOH → CH'_2_'COO'^-^' Na'^+^' + CH'_3_'CH'_2_'OH

Determine the kinetic parameters for the Ethyl-Acetate/Sodium Hydroxide reaction including the frequency factor (''A''), reaction orders (''α'' and ''β''), and activation energy (''E'_a_''') for the reaction.

-> r = k C'_OH_''^α^' C'_Et-Ac_''^β^'

-> k = A exp(-E'_a_'/RT)

This reaction has been studied previously and literature values provide starting values for the parameter estimation'^1^'.

-> Attach:ethyl_acetate_lit_values.png

The data is obtained by operating a glass reaction vessel with the following supplies:

* Fisher Scientific accumet XL60 pH meter and probe

* Benchtop heat exchanger

* 95.5 wt.% Ethyl Acetate

* Sodium Hydroxide solution

The measured amount of Ethyl Acetate is added to the Sodium Hydroxide solution. The temperature and pH are measured over the course of an hour to record the data for analysis. Download the sample scripts and model files below for a starting point for the dynamic simulation and parameter estimation.

Attach:download.jpg [[Attach:ethyl_acetate.zip | Download APM Python and MATLAB Files]]

-> Attach:ethyl_acetate_results.png

Once the pH is measured, it must be translated into a hydroxide concentration for use in these calculations. The concentration of hydroxide ion is related to the pH as measured by the probe and pKw which is temperature dependent.

-> -log'_10_'(C'_OH'^-^'_')= pKw - pH

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/2q4vSKwaBtw?rel=0" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

More information is contained in the experimental data when the temperature is varied throughout the one hour run. The variable temperature also causes the pKw to change. The self ionization of water as indicated by pKw is dependent on the temperature'^2,3^'

-> pKw = 4470.99 / T(K) - 6.0875 + 0.01706 T(K)

-> Attach:pKw_temperature_dependence.png

----

!!!! Nonlinear Confidence Intervals

* [[Attach:ethyl_acetate_conf_int.zip | Nonlinear Confidence Intervals in MATLAB]]

The above script produces 1-dimensional confidence intervals for all of the reaction parameters. In this example, the reversibility of the reaction is tested by including the reverse reaction rate in the data fit. The optimizer decides whether to assign a sufficiently large reverse reaction rate to optimally fit the model to the dynamic data.

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/rL7Mvl2-XIM" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Nonlinear confidence intervals can also be visualized as a function of 2 parameters. In this case, both parameters are simultaneously varied to find the confidence region. The confidence interval is determined with an F-test that specifies an upper limit to the deviation from the optimal solution

-> Attach:f-test_equation.gif

with p=2 (number of parameters), n=number of measurements, theta=[parameter 1, parameter 2] (parameters), theta'^*^' as the optimal parameters, SSE as the sum of squared errors, and the F statistic that has 3 arguments (alpha=confidence level, degrees of freedom 1, and degrees of freedom 2). For many problems, this creates a multi-dimensional nonlinear confidence region. In the case of 2 parameters, the nonlinear confidence region is a 2-dimensional space.

----

References

# Laidler, K. J. and Chen, D. (1957). The influence of pressure on the kinetics of the alkaline hydrolysis of esters and amides. Trans. Faraday Soc., 1958,54, 1026-1033, DOI: 10.1039/TF9585401026 [[https://pubs.rsc.org/en/content/articlelanding/1958/TF/tf9585401026 | View Article]]

# Whitfield, M. (1975). Chemical Oceanography. In J. P. Riley, & E. Skirrows, Vol. 2 2nd Ed. (pp. 44-171). Academic, New York.

#Wikipedia, [[https://en.wikipedia.org/wiki/Self-ionization_of_water|Self-ionization of water]], URL: https://en.wikipedia.org/wiki/Self-ionization_of_water.

Changed lines 5-46 from:

to:

Sensitivity and statistical analysis are important methods to understand the behavior of dynamic estimators such as Moving Horizon Estimation (MHE).

!!!! Case Study on Dynamic Parameter Estimation

The reaction of phenolphthalein with a base solution follows the 2 reaction sequence given below.

* Reaction 1:

** Irreversible reaction, fast reaction dynamics

** Ph + 2 OH- => Ph(2-) + 2 H2O

* Reaction 2:

** Reversible, slow reaction dynamics

** Ph(2-) + OH- <=> PhOH(3-)

Reaction 1 is very fast and can be assumed to be instantaneous when the phenolphthalein (Ph) is added to a hydroxide solution. We are considering using phenolphthalein as an indicator to determine the residence time of several large CSTR reactors in a pilot plant. Please determine the kinetic parameters for reaction 2 with respect to phenolphthalein associated with the fading of phenolphthalein in sodium hydroxide solutions (reaction orders, A1, A2, Ea1, and Ea2).

An engineer collected time-varying data for a non-isothermal run and needs you to estimate the kinetic parameters. The temperature ranged from about 60 - 140 degF. In order to appropriately size the reactor vessel, engineers need the kinetic parameters with the associated 95% confidence intervals.

* [[Attach:dye_fading_experiment.pdf | Dye Fading Experiment Information (pdf)]]

* [[Attach:dye_fading_experiment.zip | Dye Fading Experiment Files in MATLAB and Python (zip)]]

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/WIXeySSa1fk" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

----

!!!! Nonlinear Confidence Intervals

* [[Attach:dye_fading_conf_int.zip | Nonlinear Confidence Intervals in Excel, MATLAB, and Python (zip)]]

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/rL7Mvl2-XIM" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Nonlinear confidence intervals can also be visualized as a function of 2 parameters. In this case, both parameters are simultaneously varied to find the confidence region. The confidence interval is determined with an F-test that specifies an upper limit to the deviation from the optimal solution

-> Attach:f-test_equation.gif

with p=2 (number of parameters), n=number of measurements, theta=[parameter 1, parameter 2] (parameters), theta'^*^' as the optimal parameters, SSE as the sum of squared errors, and the F statistic that has 3 arguments (alpha=confidence level, degrees of freedom 1, and degrees of freedom 2). For many problems, this creates a multi-dimensional nonlinear confidence region. In the case of 2 parameters, the nonlinear confidence region is a 2-dimensional space. Below is an example that shows the confidence region for the dye fading experiment confidence region for forward and reverse activation energies.

-> Attach:dye_2d_confidence_region.png

The optimal parameter values are in the 95% confidence region. This plot demonstrates that the 2D confidence region is not necessarily symmetric.

!!!! Case Study on Dynamic Parameter Estimation

The reaction of phenolphthalein with a base solution follows the 2 reaction sequence given below.

* Reaction 1:

** Irreversible reaction, fast reaction dynamics

** Ph + 2 OH- => Ph(2-) + 2 H2O

* Reaction 2:

** Reversible, slow reaction dynamics

** Ph(2-) + OH- <=> PhOH(3-)

Reaction 1 is very fast and can be assumed to be instantaneous when the phenolphthalein (Ph) is added to a hydroxide solution. We are considering using phenolphthalein as an indicator to determine the residence time of several large CSTR reactors in a pilot plant. Please determine the kinetic parameters for reaction 2 with respect to phenolphthalein associated with the fading of phenolphthalein in sodium hydroxide solutions (reaction orders, A1, A2, Ea1, and Ea2).

An engineer collected time-varying data for a non-isothermal run and needs you to estimate the kinetic parameters. The temperature ranged from about 60 - 140 degF. In order to appropriately size the reactor vessel, engineers need the kinetic parameters with the associated 95% confidence intervals.

* [[Attach:dye_fading_experiment.pdf | Dye Fading Experiment Information (pdf)]]

* [[Attach:dye_fading_experiment.zip | Dye Fading Experiment Files in MATLAB and Python (zip)]]

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/WIXeySSa1fk" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

----

!!!! Nonlinear Confidence Intervals

* [[Attach:dye_fading_conf_int.zip | Nonlinear Confidence Intervals in Excel, MATLAB, and Python (zip)]]

(:html:)

<iframe width="560" height="315" src="https://www.youtube.com/embed/rL7Mvl2-XIM" frameborder="0" allowfullscreen></iframe>

(:htmlend:)

Nonlinear confidence intervals can also be visualized as a function of 2 parameters. In this case, both parameters are simultaneously varied to find the confidence region. The confidence interval is determined with an F-test that specifies an upper limit to the deviation from the optimal solution

-> Attach:f-test_equation.gif

with p=2 (number of parameters), n=number of measurements, theta=[parameter 1, parameter 2] (parameters), theta'^*^' as the optimal parameters, SSE as the sum of squared errors, and the F statistic that has 3 arguments (alpha=confidence level, degrees of freedom 1, and degrees of freedom 2). For many problems, this creates a multi-dimensional nonlinear confidence region. In the case of 2 parameters, the nonlinear confidence region is a 2-dimensional space. Below is an example that shows the confidence region for the dye fading experiment confidence region for forward and reverse activation energies.

-> Attach:dye_2d_confidence_region.png

The optimal parameter values are in the 95% confidence region. This plot demonstrates that the 2D confidence region is not necessarily symmetric.

Added lines 1-5:

(:title Dynamic Estimation Statistics:)

(:keywords nonlinear statistics, confidence region, interval, moving horizon, time window, dynamic data, validation, estimation:)

(:description Statistical analysis and confidence region determination for dynamic parameter and state estimation:)

Sensitivity and statistical analysis are important methods to understand the behavior of dynamic estimators such as Moving Horizon Estimation (MHE).

(:keywords nonlinear statistics, confidence region, interval, moving horizon, time window, dynamic data, validation, estimation:)

(:description Statistical analysis and confidence region determination for dynamic parameter and state estimation:)

Sensitivity and statistical analysis are important methods to understand the behavior of dynamic estimators such as Moving Horizon Estimation (MHE).