Calculation

The calculation procedure includes, if possible, data reconciliation, computation of unknown quantities and calculation of uncertainties using error propagation. At the beginning the plausibility of the system is checked and in the end statistical tests are performed to evaluate whether the performed data reconciliation is tolerable or not .

Here you find information about the following topics:

Select Layers for Calculation

Select which of the defined layers shall be considered for calculation.

  1. On the Edit menu, select Layers and Periods.
  2. On the Layers tab, in column Calculation select which layer shall be considered for calculation.  
  3. Click OK.

Select Periods for Calculation

Select which of the defined periods shall be considered for calculation.

  1. On the Edit menu, select Layers and Periods.
  2. On the Periods tab select the first and the last period of the interval to be considered for calculation.  
  3. Click OK.

Exclude Processes from Balancing (on Layer of Goods)

If only those input and output flows of process are modeled that contain a certain substance the balancing on the layer of goods (law of material conservation, transfer coefficient equations) does not make any sense. Those processes have to be marked.

  1. Select a process.
  2. On the Properties window, select the Process tab.
  3. Remove the tick in front of Balancing.

Note:

Enter Additional Linear Relations

Additional linear relation between similar data types (e.g. two flows) can be added.

  1. On the Edit menu, select Edit Relations.
  2. Click on [Enter new relation] and afterwards the  button.
  3. Choose the Value Type (e.g. Masses, Volumes, Concentrations, Transfer coefficients), Layer, Period and Source of the variables A and B.
  4. Define the proportion factor and confirm with OK.

Note:

Perform Calculation

  1. For a quick start of the calculation click in the Data Input toolbar or press F5.

or

  1. To set additional calculation options (calculation method, trace level) choose Calculation Dialogue from Edit menu or press ALT + F5:
  2. Choose the calculation method (Cencic 2012 or IAL-IMPL2013)
  3. Optional: Settings to change parameters of the calculation methods. For options refer to Options Calculation Module Cencic 2012 and IAL-IMPL2013
  4. Optional: Choose the trace level (none < errors < warning < information < details) of logging.
  5. Click Start.
  6. After the calculation click Close to display the results in the system diagram.

Note:

Change Options of Calculation Module Cencic 2012

This module was developed by Oliver Cencic. It offers the following calculation options:

  1. Convergence tolerance: If the 2-norm of the changes in the variable vector is less than this tolerance the iterative calculation will be stopped. Default = 1E-10.
  2. Zero values tolerance: All absolute values less than this tolerance will be considered zero during update of vectors and matrices.
  3. Observability tolerance: Matrix entries (absolute) smaller than this tolerance will be considered zero during variable classification according to Madron. Default = 1E-10.

Note:

Change Options of Calculation Module IAL-IMPL2013

This module was developed by Jeffrey Dean Kelly from Industrial Algorithms. It offers the following calculation options:

  1. Maximum number of non-zeros in any working matrix.
  2. Multiplier needed for sparse matrix operations.
  3. Scaling factor
  4. Scaling type: 0 (none), 1 (rows only), 2 (rows and columns = default), 3 (columns only).
  5. Gamma: A regularization parameter for B'*B to increase the numerical stability of the iterative solution especially when solving ill-conditioned systems => B'*B + gamma*Iy. Default = 1E-12.
  6. Epsilon: A regularization parameter for A'*Q*A + lambda*B*B' to increase the numerical stability if a row is vacuous => A'*Q*A + lambda*B*B' + epsilon*Ig. Default = 1E-12.
  7. Lambda: Estimated variance of the unmeasured variables used as a regularization parameter in A*Q*A' + lambda*B*B'. Default = 1E6. Will be used if no values for Lambda1 and Lambda2 are given.
  8. Lambda1 and Lambda2: for improved calculation of estimated raw variance of the unmeasured variables => w(i) = Lambda1 * (abs(y(i)) + Lambda2)^2. If Lambda1 or Lambda2 is less or equal 0 Lambda will be used instead. default = 100.
  9. Convergence tolerance: Convergence tolerance for constraint closure. If the constraint or function residuals have a 2-norm less than this tolerance then the iterative calculation is stopped.
  10. Zero values tolerance: All absolute values less than this tolerance will be considered zero during update of vectors and matrices.
  11. Observability tolerance: All entries in o.dat with an absolute value less than this tolerance will be considered zero (= observable).
  12. Method 1: Sparse matrix factorization technique or method used in the reconciliation solver. Valid values: 1,2,3,4
  13. Method 2: Sparse matrix factorization technique or method used in the post-reconciliation sensitivity solver to compute the observability and redundancy metrics. Valid values: 1,2.

Note:

Toggle Scaling

Goal of the automatic scaling procedure is to reduce the condition number of the equation system (matrices) thus reducing the influence of disturbed input data (e.g. due to rounding errors) on the results. if scaling is not desirable or possible (e.g. use of subgood layers => scaling is switched off automatically) it can be switched off manually.

  1. On the Extras menu, select Options and then tab Calculation.
  2. Set/Delete the tick under Enable Scaling.

Change Initial Value of Unknown Variables

To iteratively solve non-linear equation systems it is necessary to assign initial values to unknown variables. In STAN this procedure is performed automatically with the assistance of a random number generator. In some problems the choice of random numbers influences the results what is not desirable. Because of that STAN offers the possibility to change the start value of the random numbers generator, thus generating a different set of random numbers. If the calculation with different start values delivers the same results the problem can be considered stable.

  1. On the Extras menu, select Options and then tab Calculation.
  2. Enter a value between 0 and 999 as start value for generation of random numbers.

Define Scale Basis

  1. On the Model-Explorer window, click the name of the system.
  2. On the Properties window, enter scale unit (e.g. capita) and scale factor (e.g. 100.000, meaning the entered data refer to 100.000 inhabitants).

Note:

Scale Data

  1. On the Extras menu, select Options and click the Number Formats tab.
  2. On the Scale pane, select the reference entity (scale basis, sum of imports, sum of exports).

Note:

Install New Calculation Modules

  1. On the Extras menu, click Calculation Modules.
  2. Click Install New Modules.
  3. Select the new module and click Open.
  4. Close the window.

Note: