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

Generate square waves pulses at regular intervals.

+ Collaboration diagram for Pulse:

Generates a square wave pulse at regular intervals. It can be configured with amplitude, period, pulse width, phase delay.

An example of a square wave pulse.
Author
Benjamin Scholz
Date
06.09.2007 BSC: Initial version.
19.07.2011 KGA: Updated to FhSim 2.0 and documented

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Src/Pulse"
Name = "pulse"
PortWidth = "1"
Amplitude = "1"
Bias = "0.4"
Delay = "2"
RiseTime = "0.4"
Width = "1"
Period = "3"
/>

Input Ports

This function has no inputs.

Output Ports

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

Configuration parameters

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

The amplitude of each pulse.

Period <PortWidth>

The pulse period (time between pulse centers).

Width <PortWidth>

The width of the nonzero portion of the pulse [sec]

RiseTime <PortWidth>

The time from pulse start to final value, and from final value to 0. Must smaller than Width/2

Delay <PortWidth>

The delay of the pulse train, relative to the first pulse center (starts at T=T_start).

Bias <PortWidth>

The bias of the pulse signal.

Initial conditions

There are no initial conditions for this function.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Src/Pulse"
Name="A"
/>
</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, 100" Select="objects:all"/>
</OBSERVERS>
</Contents>

This SimObject is referred to as Src/Pulse