blockSquare

Generates a square signal.

Extends from ModelicaDEVS.Templates.DSource (DEVS source block).

Information

The Square Block

Parameters:
offset amplitude offset
a amplitude
f frequency
d duty cycle (percentage)


Description:

This block generates a simple step signal.

The duty cycle indicates the percentage of the period in which the signal is positive, i.e. when the output event takes a value of y=offset+a.

Assigning a negative value to the amplitude results in a mirroring of the signal at the straight line y=offset.


Generated Events (QSS1/QSS2/QSS3 mode):


yVal[1] yVal[2] yVal[3]
t=i*1/f offset-a 0 0
t=i*1/f+1/(f*(100-d)) offset+a 0 0
i=natural numbers

In words: events are generated at the beginning of a every period and at the beginning of the duty cycle.



Parameter setting: offset=0
a=1
f=1
d=75

Parameters

TypeNameDefaultDescription
Integermethod (from DSource)world.qssUse QSS1, QSS2 or QSS3
Realoffset0.0Aplitude offset
Reala1.0Amplitude
Realf1.0Frequency
Reald50The percentage of the cycle during which the system adopts the value of the positive amplitude

Connectors

TypeNameDefaultDescription
ModelicaDEVS.Templates.DiscreteOutPortoutPort (from DSource)

Components

TypeNameDefaultDescription
ModelicaDEVS.Miscellaneous.worldModelworld (from DSource)