I: Integrator Block
In default mode (0) this provides a normal integration process (using the simple Euler method).
At each time step, integrator blocks, like other memory based blocks,
are activated after all the algebraic blocks have been processed.
This allows for simulator behaviour that follows the proper rules for numerical integration,
in which all derviatives are calculated before any integrators are updated.
However, allowing integrators in McSimAPN to use the outputs
of other integrators directly does break those strict rules unless
all derivatives are calculated in the algebraic blocks and no (J-block) inductors are used.
To provide for cyclic processes like positions of rotating shafts, or compass bearings and headings,
or for repetitive function generators, there is an option to make the integration cyclic.
In this mode (1) the integration will simply add or subtract the cycle range
as necesary to bring the output back into range.
Since some physical implementations of integrators are constrained so that their outputs will saturate,
the third mode (2) simply does that, symmetrically about zero.
Saturation, cyclic operations and extraction of contents by A, B and D blocks all use the same value, bb. See below
Variables in use
The derivative is calculated as (Va+aa-Vb+Pa+pp)*(Vc+cc), where Va is the value of the output of the block at An, etc. The value from the output of the Pn block functions like an additional input connection just like the An connection.
Thus the device can perform a subtraction between its inputs and
since it can define its own output as an input connection, Bn,
it can become a first order lag with no extra components.
The value of 'bb' is not included in calculating the input value,
as it is really redundant and is used instead to define the bound value for modes 1 and 2.
Also the type A, B and D blocks (discrete event Petri_Net components) can use it as a nominal batch size for taking or putting contents.
If you want the integrator to be able to exceed nominal batch size, then use mode 0.
The integrators will add in, as part of the input, the fluxes placed in 'pp'
by F-Flux or by J-inductor blocks. This allows heat transfer (and similar) models to have many connections to other blocks. Each of these blocks adds its contribution in. After the integration step addition is done, the pp value is then set back to zero for the next integration step. However, since the Pa value comes from some other block it is not changed by the Integrator.
When using the flux blocks to control flow in and out of integrators,
the multiplicative value Cv = Vc+cc can be seen as a reciprocal capacity measure.
In the other modes:
1: The output stays within the bound 0 to bb by adding or subtrating abs(bb) as needed. Note that bb is forced to be positive.
2: The output saturates at +/-bb and moves back in range as soon as an input of appropriate sign appears. This may be left in place to prevent massive excursions when starting to work with a model, in case of some mistake.
I Block Code
Procedure ActivateI(ii:integer); //INTEGRATOR: computes scaled net input,
//adds in extra flux pp and increments over time Delt.
//bb value acts as nominal "full load" when fed or emptied by BELT, or A or D type blocks
//may operate cyclic mode (as rotating device) then bb is the upper bound (e.g 360deg)
//D is always initial condition, set by Initialization routines.
//pp is added to by any Flux device putting flux in so it is cleared after use.
var deriv, Av, Bv, Cv, Pv :real;
begin with B[ii] do begin
if OnOff=0 then EXIT;
Av:=B[An].Vn + aa; Bv:=B[Bn].Vn; Cv:=B[Cn].Vn+cc; Pv:=B[Pn].Vn+pp;
Deriv:=(Av-Bv + Pv)*Cv; pp:=0.0;
Vn:=Delt*Deriv + Vn;
case State of
1: begin //allow for rotation above bb or below zero
bb:=abs(bb);
if Vn>bb then Vn:=Vn-bb;
if Vn<0 then Vn:=Vn+bb end;
2: begin //put limits on excursions by trapping output at +/- bb.
bb:=abs(bb);
Vn:=max(-bb,min(Vn,bb));
end
end{cases};
END {with B[ii]};
END {proc};
|
MJMcCann-Consulting
Help Index:
Index/Search
Background
Simulation Concepts
Continuous Systems
Discrete Systems
McSimAPN Structure
McSimAPN Operation
Using McSimAPN
Start McSimAPN
Save Model,data
Create Blocks
Run-Hold-Reset
Link Excel+VBA
PetriNet Block Types
A activity/action
B belt conveyor
C container/constant
D diverter(random)
Analogue Block Types
E exponents
F flux/flow
G function Generator
H hysteresis
I integrator
J inductor
K logic element
L logarithms
M memory
N note/label
O oscilloscope/graph
p not assigned
Q quantizer/rounding
R relay on/off
S sin/asin/atan
T timer/clock
U user link Excel
V visual voltmeter
W sWitch selector/MUX
X multiply
y not assigned
Z random (fuZZ)
& signed summation
% division/difference
@ access/move values
|
Invitation. McCann can help if you have a
design or operational problem that needs some technical support that is outside your
team's experience, some quantitative assessment of what is really the cause of the
difficulties, some design alternatives or just a fresh look by an intelligent
interrogator.
If you have a problem with the behaviour of a market sector, plant, process or item of
equipment and would like to get a quantitative handle on it to improve yield or optimise
performance, then contact us. We are always ready to give a little time
to discuss a new puzzle, in confidence,
of course. We'll only worry about fees
when we have some defined work. We can be flexible
about how we work with you. Top
|
MJMcCann-Consulting,
POB 902,
Chadds Ford PA
19317 USA.
T: 1 302 654-2953
F: 1 302 429 9458
E: mjmccann@iee.org
|