Marine systems simulation

Ramp signal.

+ Collaboration diagram for Ramp:

This is a ramp signal. The user specifies start parameters (time/value) and stop parameters (time/value). A line segment between these two points results in a linearly increasing or decreasing function, between the initial and final point in time.

An illustrative example of a ramp function.
Author
Karl-Johan Reite
Vegar Johansen
Date
16.04.2007 KJR: Initial version.
09.07.2007 VJ: Added functionality for vectors and ensured that output ports are set initially
17.02.2011 KJR: Rewritten and ported.
19.07.2011 KGA: Added documentation

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Src/Ramp"
Name = "ramp"
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 ramp output signal
OutDot <PortWidth> The derivative of the ramp output signal

Configuration parameters

Name Width Description
PortWidth 1 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 referring 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 referring 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 referring 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 referring 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/Ramp"
Name="A"
StopValue="10"
StartTime="0"
StopTime ="10"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 0:0.1:10, 100"
LogStates ="1"
stepsize ="0"
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 Src/Ramp