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

Step signal.

+ Collaboration diagram for Step:

This is a combined step and pulse signal SimObject. It has no input port, and has one output port with a scalar or std::vector signal.

An example of a step function.
Author
Karl-Johan Reite
Date
16.02.2011 KJR: Initial version.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Src/Step"
Name = "step"
PortWidth = "1"
StartValue = "0"
StartTime = "1"
StopValue = "1"
StopTime = "2"
/>

Input Ports

This function has no inputs.

Output Ports

Name Width Description
Out <PortWidth> The step output signal
OutDot <PortWidth> The derivative of the step output signal

Configuration parameters

Name Width Description
PortWidth The number of elements in the signal.
StartValue <PortWidth>

The start value of the output port. This may either be a scalar, or a comma separated list refering to the different elements of the signal.

StopValue <PortWidth>

The stop value of the output port. This may either be a scalar, or a comma separated list refering to the different elements of the signal.

StartTime <PortWidth>

The time to start the step. This may either be a scalar, or a comma separated list referrint to the different elements of the signal.

StopTime <PortWidth>

The time to stop the step. This may either be a scalar, or a comma separated list referrint to the different elements of the signal. If this is negative, this is a true step function with unlimited duration. If it is larger than zero, it is a pulse function, which goes back to the StartValue after the StopTime.

Initial conditions

There are no initial conditions for this function.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Src/Step"
Name="A"
StopValue="10"
StopTime="-1"
StartTime="5"
StartValue ="0"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<SIMULATION>
<Timing TStart="0" TEnd="11.0"/>
<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:0.5:10, 1000" Select="objects:all"/>
</OBSERVERS>
</Contents>

This SimObject is referred to as Src/Step