Basic HTML Version View Full Version
Page 42 - Continuous Process Modeling Quick Start Guide
P. 42

``````38
Continuous Process Quick Start Guide
Integration
Feedback
The practice of connecting an output of
a model back to an input is called feed-
back; it is the main factor that causes
complex behavior in continuous mod-
els. A model with feedback will cause
the result of a calculation to be fed back
to one of the original variables in the
calculation, influencing its own rate of
change. Thus feedback causes iterative
changes to model variables as the simu-
lation runs. The initial output variable ripples through the calculations such that the effect loops back and re-affects the initial variable.
Delays in feedback loops
ExtendSim is designed to facilitate feedback in models, but using feedback correctly entails some additional modeling techniques. Since continuous models are recalculated at every time step, there will be a delay between when the initial variable first affects the model and when the chain of calculations ultimately and indirectly affects the initial variable. The introduction of a delay can cause the behavior of a model to change significantly, because there is a differ- ence between the effect that instantaneous access can cause and the response that would hap- pen if access is not instantaneous.
When you run a model that uses feedback, the feedback is delayed by one simulation time step. This happens because the output feedback signal has to be calculated before it can be used on the next simulation step, effectively delaying it for one time step. When feedback is delayed too much, it can have a deleterious effect as it arrives too late, causing the system to over- or under-compensate. Reducing the time step or delta time of the model will reduce feedback delay and result in a model with more accurate results. See “Determining which dt to use” on page 36 for more information.
Integration
Integration is a method of estimating the present value by estimating the past and/or future val- ues of the inputs, calculations, and outputs in a model. It is another way of summing or accu- mulating values when the input is a rate (expressed as units per time). The advantage of integration over just summing values is that integration will accumulate correctly when delta time is not exactly 1.0, making it especially useful in feedback models that need a smaller delta time to work well. A simple form of integration (Euler) just multiplies the input rates by delta time and accumulates the result.
The Holding Tank and Integrate blocks in the Value library have integration capabilities.
• TheHoldingTankblockaccumulatesand,ifwanted,releasesvalues.Asdiscussedbelow,its dialog gives the option to either sum or integrate the inputs.
• The Integrate block is used to perform the mathematical function of integration in models.
You can also use ModL functions to add integration to blocks you create.
☞ There is no feedback in the My Reservoir model you built in the tutorial and it uses a delta time of 1. For that model, the Holding Tank could be set to either sum its inputs or integrate them (but the end time would need to be adjusted). The Reservoir 3 model, located at ExtendSim/

`````` 40   41   42   43   44 