FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Integrator

Integrates signal.

+ Collaboration diagram for Integrator:

The integrator performs the mathematical operation known as integration on the input signal.

Author
Karl-Johan Reite
Benjamin Scholz
Date
13.08.2007 KJR: Initial version.
20.07.2011 KGA: Ported to FhSim 2.0.
25.07.2011 KGA: Added documentation.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Math/Integrator"
Name = "A"
PortWidth = "2"
/>
...
<Connection
A.In = "1,2.1"
/>

Input Ports

Name Width Description
In <PortWidth> The input signal.
IC <PortWidth> The initial condition of State. Only registered when ICFromPort is true.

Output Ports

Name Width Description
Out <PortWidth> The integral of the input.

Configuration parameters

Name Width Description
PortWidth 1

The number of elements in the input and output ports

ICFromPort 1 When true (Default: false) the object registers the IC input port and takes the initial condition of State from that port when State is not given in the model.

Initial conditions

Name Width Description
State <PortWidth> The integrator state. Default: all zeros when ICFromPort is false. When ICFromPort is true there is no default; the value is taken from the IC input port unless it is given here.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Math/Integrator"
Name="A"
/>
<Lib
LibName="base"
SimObject="Src/Clock"
Name="S"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In="S.SimTime"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<SIMULATION>
<Timing TStart="0" TEnd="30"/>
<Integrator Method="RK45_i" NumCores="1" LogStates="1" UseRSSNorm="0">
<StepControl StepMax="0.002" StepMin="0.00000001" AbsTol="1e-3" RelTol="1e-3"/>
</Integrator>
</SIMULATION>
<OBSERVERS>
<FileOutput TOutput="0, 0:1:5, 30" Select="object.A:port.Out"/>
</OBSERVERS>
</Contents>

This SimObject is referred to as Math/Integrator