Knowledge Base /
White Papers
Developing Medium Fidelity Dynamic Simulations
By Martin Berutti
Product: Mimic Simulation

This white paper provides guidelines to developing dynamic medium fidelity simulations in Mimic.

The application note starts with a description of the characteristics of different fidelity levels and differences between static and dynamic simulation, then provides guidance on developing medium fidelity models for various categories of process models.

Definitions and Background

Low, medium, and high fidelity

A dynamic process simulation consists of a set of interconnected models working together to provide the appearance of operating a real manufacturing unit. Simulation fidelity is characterized by how closely it can reproduce real manufacturing unit conditions at steady state and dynamically in response to independent changes from the control system, changes introduced at the unit boundary, and from internal upsets. A simple classification of simulation fidelity would be to identify simulations as either low, medium, or high fidelity.

The intended purpose of a simulation, constrained by cost, determines the required fidelity level. In the refining and chemical industry dynamic simulations can be used for control system checkout prior to startup, for operator training, for testing new control strategies, and often for a combination of these.

In addition to simulation fidelity, a simulation consists of models each of which may be considered low, medium or high fidelity. This is because not all models in a simulation contribute equally to its overall fidelity. Some models in a simulation may be more critical to its purpose than others. So a medium fidelity simulation for example may contain a mixture of model fidelities in order to serve its purpose.

A medium fidelity simulation is sometimes considered a compromise between high fidelity and low fidelity, so it helps to describe these first.

A high fidelity simulation is marked by rigorous solution of the various material and energy balances both at steady state and dynamically. Very few if any empirical relationships are used. The complexity and cost of such a simulation can be very high.

A low fidelity simulation is often sufficient for control system checkout since the purpose is to just verify instrument connections and ensure control strategies respond at least directionally to changes in valve positions. A water batch for example would need to show vessel levels rising and falling with changes in inlet and outlet valve positions, and temperatures responding at least directionally to heating and cooling. Precise material and energy balances are not necessary. Tieback strategies can accomplish this with simple tuning capability to give reasonable response.

Operator training and thorough testing of new control strategies can be achieved with a compromise between low and high fidelity - a medium fidelity simulation. This typically will consist of one or more critical models that have been upgraded to near high fidelity, with less critical models remaining at or near low fidelity. In this type of simulation some of the contained models, if starting with a low fidelity simulation, are replaced with more rigorous material and energy balances or empirical relationships. The models in the simulation are systematically reviewed to determine which would have the most impact on simulation behavior and whether there is sufficient information for upgrading model fidelity. An example would be a process with a reactor and solvent recovery, where most of the vested technology resides in the reaction unit. Attention could be given to applying realistic reaction kinetics and heat removal as part of the reactor material and energy balance. The solvent recovery unit may represent static technology and practically run itself, so most of its models could remain near low fidelity without sacrificing the value of the overall simulation.

Static model starting point

Typically in a static or flowsheet simulation inlet material and heat duty flows are fixed, while downstream information is determined by material and energy balances, physical properties, and sometimes empirical data. A dynamic simulation can be initiated with a static simulation, but two additional variable types need to be addressed – accumulation and time.

Not present in a static simulation, all material and energy balances in a dynamic simulation have an accumulation term resulting in material inventories (tank levels and pressures) and energy “inventories” (temperatures).

Material and energy flows need to be developed. These flows are not fixed in a dynamic model, but will vary in response to a driving force and a resistance (or conductance), as described later. These simulation variables fixed in a static simulation will vary with time in a dynamic simulation, and equations will need to be developed to represent this relationship.

Low fidelity dynamic model starting point

A low fidelity dynamic model such as a flow loop tieback has no material or energy balance, but is already in a crude driving force / conductance form a valve position and a linear process gain. A loop tieback consists of an output from a control system, such as a valve position, tied back to represent the related measurement. The tieback consists of a gain to adjust the steady state relationship between the valve and the measurement, and a filter to represent the dynamics of this relationship.

Loop Tieback Model in Mimic Simulation Studio

The model can be left in this form if not a critical part of the simulation. The valve gain can be adjusted to match steady state conditions using historical data, and the tieback filter can be adjusted to roughly match the dynamics of the process.

Mimic has an import utility that can create a low fidelity dynamic model from the database export of a control system. This consists of loop tiebacks, described above, and discrete device tiebacks. Discrete device tiebacks function similar to loop tiebacks by tying the discrete device (motors, block valves) command state back to its status. The models derived from the export utility can be run with little or no modification as a low fidelity simulation or serve as the starting point for a medium fidelity simulation.

Dynamic model formulation as driving force versus resistance

A key difference between static models and dynamic models is that material and energy flows are not fixed but are instead dependent on a driving force and a resistance (or conductance) and vary with time. For example, material flows are dependent on a pressure drop driving force and a valve position or piping resistance. Energy flows are dependent on temperature difference and thermal conductivity or a heat transfer coefficient and the heat transfer area. Component transfer across an interface is dependent on the concentration difference and interface area.

A key difference between a medium and a high fidelity model is in the formulation of mass and energy transfer equations. A high fidelity model will typically include rigorous differential or difference equations, while a medium fidelity model will attempt to combine and approximate the rigorous equations into a single or small set of simplified driving force / resistance equations.

A medium fidelity simulation will consist then of a set of material and energy inventories (levels, pressures, temperatures) connected by mass and energy transfer equations in the form of driving force versus resistance. Additionally, material inventories may be divided into component inventories where tracking components adds value to the simulation, for determining stream properties as functions of composition or to simulate online analyzers.

Care needs to taken with a driving force versus resistance model to not underestimate the resistance of the model. This can result in instability by allowing material and energy transfer to take place too quickly for the scan time of the model. The model scan time needs to be much faster than the dynamics of the model.

Flow Models

Using a tieback model for flow control loops

Material flow is among the simplest to effectively model dynamically. Since static models typically fix inlet flows the first consideration is to convert these to some form of driving force versus resistance model such as a loop tieback, as described above. If starting with a low fidelity simulation flow control loops may already be in the form of a loop tieback.

Loop tiebacks will have a default process gain and filter. These defaults (typically gain = 1.5 and filter = 3 seconds) are good starting points for a low fidelity model.

One way to enhance the fidelity of a loop tieback flow model is to validate the process gain and filter using historical data. During normal operation a snapshot or short term average is recorded for the process measurement and the valve position. The process gain is then the ratio of these. The default filter time will often suffice, but can be more accurately estimated from a short term plot of process measurement change after a step change in valve position. The filter time will be the time to reach just over 60% of the full response. This filter represents the combined lags in the flow control loop – valve lags, process lag, and measurement lags. Since the total lag in flow loops is usually small, combining these lags into a single filter is a good assumption for medium fidelity.

Simulating a flow control loop as a simple loop tieback will usually not detract from the overall fidelity of a simulation designed to be medium or even higher, particularly if the loop tieback has been validated with historical data. The primary reason for this is that flow control loops tend to have very localized impact, since disturbances and setpoint changes tend to self resolve in a few seconds regardless of the fidelity applied. With the exception of very short term dynamics and the valve position required for a given flow there is no impact outside the flow measurement.

Tracking components

A medium fidelity simulation will frequently need to track component flows in order to properly model components as part of its material balance. Component material balances will be covered in the sections under level and pressure models. Component flows are best modeled by determining the total flow in the form of pressure drop versus resistance, then calculating the component flows for upstream and downstream material balances based on the upstream composition and the total flow.

If the form of total flow model requires composition dependent properties, these will need to be calculated based on the upstream composition. Usually this is not necessary unless the upstream composition varies significantly and the properties of the components needed also differ significantly.

Path determination

A simple but important enhancement to flow models in a medium fidelity simulation involves determining whether there is a path for flow. This can be used to enable the loop tieback block if used in the flow model, or as a multiplier in the calculation of flow if modeled otherwise.

The flow path consists of upstream and downstream valves, a pump or compressor status if needed for flow, and source material (liquid level or gas pressure).

Parallel paths might require special handling if more than one of the paths is used simultaneously. Parallel paths can either divide and optionally upward bias total flow, or a more rigorous pressure drop versus resistance model (flow network) can be developed that would more realistically allocated flow to the open paths.

Incorporating pressure drop and valve characteristics

A loop tieback assumes the driving force, pressure drop, is constant. The validity of using a simple loop tieback to model flow is diminished if the pressure drop across the control valve varies significantly or if the upstream specific gravity varies significantly. If the varying parameter is modeled in the simulation, it can be used to more accurately model liquid and vapor flow. Mimic has liquid and vapor flow modeling blocks specifically designed to include the pressure drop and specific gravity.

Liquid Flow Calculations Using Liquid Flow Modeling Block

For medium fidelity simulations it is usually sufficient to consider the valve resistance to be linear with valve position. If higher fidelity is desired, the Mimic liquid flow block has the capability to include polynomial correlation coefficients for specific valve types.

In some cases there may be flow measurements without a control valve. In this case the resistance is from piping, which can be estimated from design data or by validation with historical data.

Valve model application to other control loop types

The concept of using valve position as the resistance part of a driving force versus resistance model applies to all models with a control valve, not just flow control loops. Regardless of the variable measured, utilizing a loop tieback model represents a good first step in developing a medium fidelity simulation. Since individual flow control loops are normally not the main focus of a simulation, leaving the flow model at this level of fidelity is usually sufficient.

The fidelity of other control loop types – temperature, pressure, level, etc, are more likely to have a significant impact on the overall simulation fidelity, so are good candidates to consider for enhancements such as the effect of varying pressure drop across the valve, specific gravity, and valve characteristics. This is in addition to considering enhancement of the model for the measurement of these process types, which will be considered later.

Finally, modeling valve characteristics such as hysteresis, stick-slip, linkage deadtime, etc., may add to the realistic behavior of a control loop, but in most cases will not add to the overall fidelity of the simulation. This is due to the self regulating behavior of control loops in automatic control (the valve position will adjust to achieve a given setpoint) and the transient nature of these types of valve characteristics (they can change after performing maintenance on the valve). Also, the effort required to obtain these valve characteristics for each valve can be significant.

Level Models

Using a tieback model for level control loops

In a low fidelity simulation such as one used for instrument checkout, a loop tieback may be sufficient for modeling level. Of primary concern is that when the control valve is opened the level responds in the proper direction (up if on the inlet, down if on the outlet). How an unregulated flow affects the level may not be of concern. A loop tieback model will behave as if the control valve affects the overall liquid balance in the vessel.

The primary difference between using a loop tieback model for level versus flow is in setting the gain and filter. Where flows respond quickly to changes in control valve position, levels respond much more slowly. For levels this can be effectively modeled by setting the filter time to be much higher depending on the valve capacity relative to vessel capacity. A good default or starting point for filter time would be 30 – 60 seconds. The gain should be set to 1 or less, so that the vessel will not empty or overfill. Additionally some initialization or base loading may be necessary, for example with a surge tank, to set the initial level to correspond appropriately with the initial control valve position.

Developing a material balance model

If the material flows into and out of a vessel have been modeled then developing a material balance for liquid level is straightforward. If individual components are not being tracked then the material balance can be either mass or volume. If each of the flow measurements and the level measurement for the control system are in volumetric units then the material balance can also be volumetric. Otherwise some unit conversion using specific gravity will be needed. For other unit conversions the integrator in Mimic performs internal unit conversion for a material balance with different mass, volume, and time units (lbs & kg, bbl & m3, secs & hrs, etc.), so that the integration is on a consistent basis.

Tracking components

Component balances are very common in medium fidelity simulations. Often one or more components are measured by analyzers or are needed to model instrument measurements affected by composition, such as density. There will often be some measurement of reaction products or separation unit compositions that need to be modeled.

In order to accomplish this even in a medium fidelity simulation, the components must be tracked through most of the simulation. Each material flow and balance is replaced by a component mass flow and balance. Where an overall material or volumetric flow or a stream property is required, such as for determining flow through a valve, the value will need to be calculated dynamically by summing the component flows.

A liquid component balance for a vessel then involves creating separate mass integrators for each component. Total mass is the sum of these and the liquid volume is calculated from a mixing rule using each component’s mass and specific gravity.

Level measurement

A medium fidelity simulation can accurately represent the measurements of different types of level sensors if the vessel dimensions and sensor locations are known. The vessel liquid balance will need to be converted to volume if in mass units and the actual liquid height calculated. The state of high or low level detectors is determined by comparison. For bubbler type level sensors the pressure at each tap is calculated from the static head at the tap height. If the liquid’s specific gravity varies then it is calculated from composition by a mixing rule in order to accurately represent the liquid head. The same approach will also determine the density correction measurement for level, if an extra bubbler is used for that purpose.

If the level model is based on a material balance, then other models in the simulation can use the raw level or material inventories directly without a filter, but the measurement of level is not instantaneous so the level instrument represented by an AI block should include a filter appropriate for the type of sensor used.

Pressure Models

Using a tieback model for pressure control loops

A low fidelity simulation such as one used for instrument checkout may have a simple loop tieback model for pressure control, similar to using a tieback model for level control or flow control. The speed of response of the pressure control loop can approach or exceed that of a flow control loop, particularly for liquid pressure control such as controlling pump pressure with a recycle control valve. For these a filter time of 1 – 2 seconds should be a good starting point. A good filter time for gas pressure control will depend on valve capacity relative to gas holdup, typically anywhere from 2 to 20 seconds.

Determining an appropriate gain setting for the loop tieback may not be as obvious due to nonlinearities and how well the control valve capacity matches the pressure transmitter range. Pressure measurements at two valve settings from historical data may be helpful, and some initialization may be necessary as with level tieback models.

Developing a material balance model from ideal gas law

A medium fidelity simulation will often require a more rigorous approach to modeling pressure than using a tieback. Developing a pressure model from a material balance follows the approach used in developing a level model, except the integrator needs to be in molar units. Flows in and out of the vessel or pipeline will need conversion from volumetric or mass flow. Pressure is then modeled with the ideal gas law, P = nRT/V, where V is the volume available to the gas. Mimic has a pressure block that performs this calculation.

Pressure Model Using Ideal Gas Law Block

As an alternative, it may be simpler to have the integrator perform a mass balance if the flows in and out are already in mass units, then convert to moles for input to the pressure block.

The available gas volume may vary and need to be calculated first, if in contact with a varying liquid inventory, as the difference between total vessel volume and that occupied by the liquid.

Tracking components

Components are tracked in a gas material balance for pressure modeling for the same reason components may be tracked in a liquid material balance. A similar approach applies here, with an integrator and flows for each component’s mole balance or mass balance. The moles are summed for each component for input to the pressure block for the ideal gas law calculation. Properties of the gas may need to be calculated based on its composition, for use in downstream flow calculations for example. The composition of the gas is also used to determine component flow composition out of the gas volume and for material balances downstream.

Pressure measurement

If the pressure model is based on a material balance, then other models in the simulation can use the raw pressure or material inventories directly without a filter, but as with level measurement a small filter should be applied to the pressure measurement AI block to represent the measurement lag. If the pressure model is for a gas header, some process filtering to represent a process lag may also be appropriate.

Split range control

In pressure control two control valves may be utilized, where one pressurizes and the other vents the vessel. If a material balance model is used and each of the flows has been included, then nothing additional is required. The split range is just a part of the control system.

Split range control presents a challenge for a loop tieback model, as only one control valve is provided in the tieback. A solution is to “map” each of the valves into an implied valve position, which is used as input to the loop tieback. This mapping needs to account for how each valve directionally affects pressure, and can optionally account for overlapping (region with both valves open) or gap (both valves closed within a deadband).

Temperature Models

Using a tieback model for temperature control loops

As with flow, level, and pressure control loop simulation, a low fidelity simulation such as is used for instrument checkout can utilize simple loop tiebacks to model temperature. Temperature processes have significant lag, both a process lag and a measurement lag, so the loop tieback filter needs to be set to approximate this, on the order of 30 – 90 seconds. The loop tieback gain needs to be set to one or less for stability, or can be approximated from historical data using two data points.

Developing an energy balance model

A full energy balance is a signature feature of a medium fidelity simulation. A balance is performed as would be done for a static model, taking into account anything that would have a significant impact on the balance. Beyond the typical heat transfer, sensible heat, vaporization, and condensation, the model may need to include heats of reaction, ambient heat transfer, and compressor or pump energy transfer. In applying this static balance in a dynamic sense, some of the components may need to have a filter applied, such as to represent the thermal lag in heat transfer.


A temperature model for mixing can be utilized when two or more streams of different temperatures are combined in a pipeline using an inline mixer, or as a shortcut energy balance in a vessel if only sensible heat applies and differences in heat capacity can be ignored. A material balance is calculated, then a second integration is performed on the product of each flow and temperature, with this integral divided by the total mass to give the combined temperature.

Temperature measurement

Temperature calculated from an energy balance or mixing model needs to have a measurement lag applied to represent the significant lag typical in temperature sensors such as thermocouples and RTDs. Any part of the simulation requiring the temperature, such as an outlet stream property or a downstream vessel, should use the raw process temperature. The measurement lag is applied only to determine what the control system “sees”.

Split range control

In temperature control two control valves may be utilized, where one is to increase temperature and the other is needed to decrease the temperature of the process. One may be steam and the other cooling water in an exchanger. Similar to modeling for a split range control strategy for pressure control, if an energy balance has been developed taking into account both control valves, then nothing additional is required.

To model split range control using a loop tieback model, each of the valves will need to be mapped into an implied valve position, which is used as input to the loop tieback.

Mass Separation (Vapor/Liquid) Models

V/L mass transfer as driving force versus resistance

Distillation and other vapor liquid separations present a real challenge to medium fidelity simulations. A good approach is to divide the unit into a separate reboiler, condenser, and one or more internal separation sections, with mass transfer within each modeled as driving force versus resistance. Side draws and pumparounds add complexity, but can be modeled by separate sections combining the appropriate features of these model types.

A static or flowsheet simulation assumes liquids and vapors in contact are at equilibrium. In a dynamic simulation this represents just a singular case. In a medium fidelity dynamic simulation, material flow between phases must be represented using driving force versus resistance models.

In a single component system the driving force for material flow between the liquid and vapor phase is the difference between the liquid vapor pressure and the total pressure. As this difference approaches zero the flow between phases approaches zero – equilibrium. The resistance can be considered the contact or surface area between the two phases. The model would then consist of the driving force divided by the resistance, with a gain multiplier or tuning value.

A good approach is to consider the driving force on a fractional or percentage basis – the difference between total pressure and vapor pressure divided by the total pressure. The gain and resistance can be combined and the value adjusted to affect how quickly conditions return to steady state after an upset, or the value can be estimated from historical data at typical conditions.

Tracking components

To track component transfer between phases involves replacing an overall mass transfer model with individual component mass transfer models. The resistance could be considered the same for each of these, but the driving force for each component would now be the difference between the product of the liquid mole fraction and its vapor pressure and the product of the vapor mole fraction and total pressure. As with the single component case, the gain / resistance term can be adjusted to affect how quickly equilibrium is achieved after an upset.

Impact of heat/cooling source

For a medium fidelity model the presence of a heating or cooling source can be incorporated with the driving force of the model indirectly, by raising or lowering the temperature of the material. Depending on the model tuning, this may result in temporary subcooling or superheating of a liquid, or in temporary under saturation or super saturation of a gas. The impact on the mass transfer driving force will result in the proper mass transfer over time to bring the material back to equilibrium.

This approach is effective for modeling mass transfer in reboilers, condensers, and other exchangers where there is phase change on one or both sides. For medium fidelity it is often assumed that phase transfer can only take place in one direction, for example vaporization on the process side of a reboiler. This ignores the possibility that in the case of little or no heat input there could be condensation of process vapor, if there is ambient heat loss or a change in inlet composition. This phase transfer in the opposite direction would be a feature typically reserved for high fidelity.

Impact on energy balance

In the absence of a heat or cooling source, medium fidelity would ignore net temperature change as components change phase. An example would be in simulating the component separation in the middle section of a distillation column. A linear temperature profile or one from design or historical data would be assumed. A tray to tray integrated heat and material balance would be reserved for a high fidelity simulation.

Flash separation

For flash tanks and feeds to distillation columns it is necessary to approximate the liquid and vapor split as well as the compositions. In distillation this sets up the vapor feed to the top section of the column and the liquid feed to the bottom section. A full multicomponent flash would be reserved for a high fidelity simulation.

In medium fidelity a good approach would be to determine the two key components being split and approach as a two component system. Since pressure and temperature are modeled separately these are sufficient to determine the split. Bubble point and dew point calculations for the two components are used to determine if there are two phases. Then the split is determined by solving the two component material balance and equilibrium equations. The higher volatile components are included in the vapor and the lower volatile components are included in the liquid.

This approach is very effective if the volatilities of the non-key components are significantly different from those of the key components. If this is not the case, then an alternate approach would be to split the other components between vapor and liquid according to their relative volatilities.

Analyzer Models

Incorporating sample time

Online analyzers such as gas chromatographs may function on a cycle instead of continuously. The sample system itself may have considerable lag, then the sample requires time to complete the analysis before being reported to the control system. Most of this cycle time is deadtime, or sample and hold.

To model this behavior, the sample system can be modeled using a filter while the actual analysis is modeled as a periodic snapshot of the filter output.

Analyzer status

In addition to the analysis, the online analyzer sends status information to the control system. A “good” status or a watchdog timer may be needed to be simulated by the analyzer model. Otherwise the control system may not use the analyzer values calculated.

Reaction Models

Arrhenius equation

Adding a reaction kinetic model to a simulation can add significant value and is very much a signature of medium fidelity. The model equation can be in a simplified form even if the actual reaction kinetics are more complex - in this case the simplified kinetic model is tuned to perform realistically over the normal operating region.

The Arrhenius equation for reaction kinetics requires setting just two values that can be obtained from historical data.

r = k0e-E/RT

The activation energy term, E/R, is calculated from the ratio of reaction rates, or conversions, at two separate temperatures while other conditions are constant. The rate constant, k0, is then calculated from the conversion and reactant concentration at one of these temperatures. See forum article in the Mimic 3.X Users Forum for more detail on how to develop a medium fidelity reaction kinetics model.

Impact on material and energy balances

The reaction rate, whether in terms of mass or mole conversion, can be incorporated into the material balance for reactants and products. At the same time the heat of reaction is included in the energy balance for the reactor.

Reactants consumed and products formed are connected to component integrators. The change in composition is considered instantaneous, so no filtering is applied. Measurement lags, such as with online analyzers, are discussed in a separate section.

The heat of reaction is often just one of several energy flows in an model energy balance, so its input to the energy balance needs to be before compensation for thermal lag and temperature measurement lag in the calculation order.

Miscellaneous Modeling Considerations

Tracking properties of mixtures

Properties of mixtures can be modeled using a mixing model similar to modeling the temperature in a vessel from the temperatures of all the vessel feeds. This works effectively for any property that varies linearly or near linearly with composition, such as determining the specific gravity of a mixture.

pH Models

Simulation of pH is often overlooked in all but high fidelity models. Since pH is highly nonlinear the use of a simple loop tieback does not reveal anything about the possible difficulties controlling pH. One approach for a medium fidelity model would be to break the loop tieback and place an estimated titration curve between the valve position and measurement in the tieback.

As an alternative, a hydrogen ion balance can be calculated for the stream or vessel with pH measurement. Hydrogen ion inflow and outflow would be tracked as with any component balance, with the measured pH calculated from the ion concentration. Buffering could be added as an enhancement. This approach essentially linearizes pH.

For realistic dynamics, filtering should be added for the pH measurement, as well as deadtime for any pH source material transportation lag to reach the pH probe.

Modeling for cascade control

Cascade control from the simulation frame of reference involves modeling two process measurements from a single valve position. Examples are analyzer to temperature cascades, temperature to flow cascades, and level to flow cascades.

If the simulation includes heat and material balances as described above, there should be nothing special required – the same principles apply. If loop tiebacks are used for both the master and slave of the cascade, a simple approach is to use the slave loop output as the tieback for both. Since the dynamics of the master loop are slower than for the slave loop, set the master loop tieback filter to be slower than that for the slave loop tieback by about the same degree.