Marine systems simulation
Low-pass filter

Simple low-pass filter.

+ Collaboration diagram for Low-pass filter:

A filter that filters out high frequencies and keep the lower frequencies. \( \dot y = \frac{1}{\tau}(u(t) - y(t)) \).

Author
Karl-Johan Reite

Example configuration excerpt

<Lib
LibName="fhsim_base"
SimObject="Math/LowPass"
Name="F"
ConvergenceRatio="0.0185"
PortWidth="1"
/>
...
<Connection
F.In="A.Sine" <!-- From somewhere else -->
/>

Input Ports

Name Width Description
In <PortWidth> The input port, \(u\)

Output Ports

Name Width Description
Out <PortWidth> The value of the low pass filtered input ("In"), \(y\)

Configuration parameters

Name Width Description
PortWidth 1 The number of elements in the signal.
ConvergenceRatio 1 or <PortWidth> The convergence ratio \( r = \frac{1}{\tau}\). If the parameter size is 1, the same ratio is used for all elements.

Initial conditions

This SimObject contains no initial conditions.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Math/LowPass"
Name="F"
ConvergenceRatio="0.0185"
PortWidth="1"
/>
<Lib
LibName="base"
SimObject="Src/Sine"
Name="A"
FHz="4000"
PhaseRad ="0"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
F.In="A.Out"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 0:00001:0.01, 0.02"
LogStates ="1"
stepsize ="0.00001"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>

This SimObject is referred to as Math/LowPass