Main
~~-> ~~Attach:vle_2d_confidence_region.png

%width=500px%Attach:vle_2d_confidence_region.png

!!!! Nonlinear Confidence Interval

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in Python (zip)]]

(:html:)

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

(:htmlend:)

Nonlinear confidence intervals can 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.png

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:vle_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.

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

and density ''rho'' or molar volume ''v'' is also a function of temperature according to

Attach:thermo_density.png

## Estimate Thermodynamic Parameters from Data

## Main.VLEWilson History

Show minor edits - Show changes to output

Changed line 42 from:

Attach:download.jpg [[Attach:~~txy~~_~~ebulliometer~~_~~files~~.zip | Download APM Python~~ and MATLAB~~ Files]]

to:

Attach:download.jpg [[Attach:vle_conf_int.zip | Download APM Python Files]]

Changed line 58 from:

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in ~~Excel~~ (zip)]]

to:

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in Python (zip)]]

Changed line 58 from:

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in ~~Python~~ (zip)]]

to:

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in Excel (zip)]]

Changed line 70 from:

%width=~~500px~~%Attach:vle_2d_confidence_region.png

to:

%width=550px%Attach:vle_2d_confidence_region.png

Changed lines 69-70 from:

to:

%width=500px%Attach:vle_2d_confidence_region.png

Added lines 55-71:

!!!! Nonlinear Confidence Interval

* [[Attach:vle_conf_int.zip | Nonlinear Confidence Interval in Python (zip)]]

(:html:)

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

(:htmlend:)

Nonlinear confidence intervals can 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.png

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:vle_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.

Changed lines 5-9 from:

!!!! ~~Case Study on Thermodynamic Parameter Estimation~~

to:

!!!! Thermodynamic Parameter Estimation

(:html:)

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

(:htmlend:)

(:html:)

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

(:htmlend:)

Added lines 37-38:

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

Changed line 38 from:

-> Attach:~~txy~~_results.png

to:

-> Attach:ebulliometer_results.png

Added lines 46-64:

(:htmlend:)

----

(:html:)

<div id="disqus_thread"></div>

<script type="text/javascript">

/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */

var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

/* * * DON'T EDIT BELOW THIS LINE * * */

(function() {

var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;

dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';

(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);

})();

</script>

<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

----

(:html:)

<div id="disqus_thread"></div>

<script type="text/javascript">

/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */

var disqus_shortname = 'apmonitor'; // required: replace example with your forum shortname

/* * * DON'T EDIT BELOW THIS LINE * * */

(function() {

var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;

dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';

(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);

})();

</script>

<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

Changed line 7 from:

Using data from an ~~ebulliometer,~~ determine parameters for the Wilson activity coefficient model using the measured data for an ethanol-cyclohexane mixture at ambient pressure. Use the results to determine whether there is:

to:

Using data from an [[http://en.wikipedia.org/wiki/Ebulliometer | ebulliometer]], determine parameters for the Wilson activity coefficient model using the measured data for an ethanol-cyclohexane mixture at ambient pressure. Use the results to determine whether there is:

Changed lines 22-24 from:

Attach:thermo_wilson1.png

Attach:thermo_wilson2.png

Attach:thermo_wilson2.png

to:

Attach:thermo_wilson1.png Attach:thermo_wilson2.png

Changed lines 18-19 from:

where ''y'_1_'''is the vapor mole fraction, ''P'' is the pressure, ''x'_1_''' is the liquid mole fraction, ''gamma'_1_''' is the activity coefficient that is different than 1.0 for non-ideal mixtures, and ''P'~~^sat^''~~_1_''' is the pure component vapor pressure. The same equation also applies to component 2 in the mixture with the corresponding equation with subscript 2.

to:

where ''y'_1_'''is the vapor mole fraction, ''P'' is the pressure, ''x'_1_''' is the liquid mole fraction, ''gamma'_1_''' is the activity coefficient that is different than 1.0 for non-ideal mixtures, and ''P'_1_''^sat^''' is the pure component vapor pressure. The same equation also applies to component 2 in the mixture with the corresponding equation with subscript 2.

Changed lines 26-27 from:

There are correlations for ''P'^sat^''_1_''' ~~for many common pure components from BYU~~'~~s DIPPR database. In this case ~~''P'~~^sat^''~~_1_''' is a function of temperature according to

to:

There are correlations for ''P'^sat^''_1_''' and density (''rho'') for many common pure components from BYU's DIPPR database. In this case ''P'_1_''^sat^''' is a function of temperature according to

Added lines 29-32:

and density ''rho'' or molar volume ''v'' is also a function of temperature according to

Attach:thermo_density.png

Added lines 1-40:

(:title Estimate Thermodynamic Parameters from Data:)

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

(:description Case study on data reconciliation for thermodynamic properties using optimization techniques in engineering:)

!!!! Case Study on Thermodynamic Parameter Estimation

Using data from an ebulliometer, determine parameters for the Wilson activity coefficient model using the measured data for an ethanol-cyclohexane mixture at ambient pressure. Use the results to determine whether there is:

* An [[http://en.wikipedia.org/wiki/Azeotrope | azeotrope]] in the system and, if so, at what composition

* The values of the [[http://en.wikipedia.org/wiki/Activity_coefficient | activity coefficients]] at the infinitely dilute compositions

** gamma'_1_' at x'_1_'=0

** gamma'_2_' at x'_1_'=1

The liquid and vapor compositions of this binary mixture are related by the following thermodynamic relationships

Attach:thermo_teenage_law.png

where ''y'_1_'''is the vapor mole fraction, ''P'' is the pressure, ''x'_1_''' is the liquid mole fraction, ''gamma'_1_''' is the activity coefficient that is different than 1.0 for non-ideal mixtures, and ''P'^sat^''_1_''' is the pure component vapor pressure. The same equation also applies to component 2 in the mixture with the corresponding equation with subscript 2.

The Wilson equation is used to predict the activity coefficients ''gamma'_2_''' and ''gamma'_2_''' over the range of liquid compositions.

Attach:thermo_wilson1.png

Attach:thermo_wilson2.png

There are correlations for ''P'^sat^''_1_''' for many common pure components from BYU's DIPPR database. In this case ''P'^sat^''_1_''' is a function of temperature according to

Attach:thermo_vapor_pressure.png

The number of degrees of freedom in a multi-component and multi-phase system is given by DOF = 2 + #Components - #Phases. In this case, there are two phases (liquid and vapor) and two components (ethanol and cyclohexane). This leads to two degrees of freedom that must be specified. In this case, we can chose to fix two of the four measured values for this system with either ''x'_1_''', ''y'_1_''', ''P'', or ''T''. It is recommended to fix the values of ''x'_1_''' and ''P'' as shown in the tutorial below.

!!!! Background on Parameter Estimation

A common application of optimization is to estimate parameters from experimental data. One of the most common forms of parameter estimation is the least squares objective with (model-measurement)^2 summed over all of the data points. The optimization problem is subject to the model equations that relate the model parameters or exogenous inputs to the predicted measurements. The model predictions are connected by common parameters that are adjusted to minimize the sum of squared errors.

!!!! Tutorial on Parameter Estimation

(:html:)

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

(:htmlend:)

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

(:description Case study on data reconciliation for thermodynamic properties using optimization techniques in engineering:)

!!!! Case Study on Thermodynamic Parameter Estimation

Using data from an ebulliometer, determine parameters for the Wilson activity coefficient model using the measured data for an ethanol-cyclohexane mixture at ambient pressure. Use the results to determine whether there is:

* An [[http://en.wikipedia.org/wiki/Azeotrope | azeotrope]] in the system and, if so, at what composition

* The values of the [[http://en.wikipedia.org/wiki/Activity_coefficient | activity coefficients]] at the infinitely dilute compositions

** gamma'_1_' at x'_1_'=0

** gamma'_2_' at x'_1_'=1

The liquid and vapor compositions of this binary mixture are related by the following thermodynamic relationships

Attach:thermo_teenage_law.png

where ''y'_1_'''is the vapor mole fraction, ''P'' is the pressure, ''x'_1_''' is the liquid mole fraction, ''gamma'_1_''' is the activity coefficient that is different than 1.0 for non-ideal mixtures, and ''P'^sat^''_1_''' is the pure component vapor pressure. The same equation also applies to component 2 in the mixture with the corresponding equation with subscript 2.

The Wilson equation is used to predict the activity coefficients ''gamma'_2_''' and ''gamma'_2_''' over the range of liquid compositions.

Attach:thermo_wilson1.png

Attach:thermo_wilson2.png

There are correlations for ''P'^sat^''_1_''' for many common pure components from BYU's DIPPR database. In this case ''P'^sat^''_1_''' is a function of temperature according to

Attach:thermo_vapor_pressure.png

The number of degrees of freedom in a multi-component and multi-phase system is given by DOF = 2 + #Components - #Phases. In this case, there are two phases (liquid and vapor) and two components (ethanol and cyclohexane). This leads to two degrees of freedom that must be specified. In this case, we can chose to fix two of the four measured values for this system with either ''x'_1_''', ''y'_1_''', ''P'', or ''T''. It is recommended to fix the values of ''x'_1_''' and ''P'' as shown in the tutorial below.

!!!! Background on Parameter Estimation

A common application of optimization is to estimate parameters from experimental data. One of the most common forms of parameter estimation is the least squares objective with (model-measurement)^2 summed over all of the data points. The optimization problem is subject to the model equations that relate the model parameters or exogenous inputs to the predicted measurements. The model predictions are connected by common parameters that are adjusted to minimize the sum of squared errors.

!!!! Tutorial on Parameter Estimation

(:html:)

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

(:htmlend:)