blockTrapezoid

Generates a trapezoid signal.

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

Information

The Trapezoid Block

Parameters:
offset signal ground value
a amplitude
tr rise time (how long does it take to reach the upper value)
tf fall time (how long does it take to reach the lower value)
tu time up (how long does the signal stay on the upper value)
td time down (how long does the signal stay on the lower value)
k number of outputs during the rise of the slopes (only for QSS1)


Description:

This block generates a trapezoidal signal.

Again, QSS1 needs the signal to be described in terms of a piecewise constant stair function (see the description of the Ramp block for more details).

Note that it is possible to assign a negative value to the amplitude, such that the trapezoidal signal is mirrored at the straight line y=offset.


Generated Events (QSS1 mode):


Note: the following table descibes only one period of the signal.


yVal[1] yVal[2] yVal[3]
t=i*tr/k i*a/k 0 0
t=(tr+tu)+i*tf/k i*a/k 0 0
i={0,1,2,...,k}



Parameter setting: offset=0
a=1
tr=2
tf=0.5
tu=0.5
td=1
k=10



Generated Events (QSS2/QSS3 mode):


yVal[1] yVal[2] yVal[3]
t=i*(tr+tu+tf+td) offset a/tr 0
t=tr+i*(tr+tu+tf+td) a 0 0
t=tr+tu+i*(tr+tu+tf+td) a -a/tf 0
t=tr+tu+tf+i*(tr+tu+tf+td) offset 0 0
i=natural numbers



Parameter setting: offset=0
a=1
tr=2
tf=0.5
tu=0.5
td=1

Parameters

TypeNameDefaultDescription
Integermethod (from DSource)world.qssUse QSS1, QSS2 or QSS3
Realoffset0Ground value
Reala1.0Amplitude
Realtr1.0Time the signal needs to rise
Realtf1.0Time the signal needs to fall
Realtu1.0Time the signal stays up
Realtd1.0Time the signal stays down
Realk10Number of outputs per slope (only for QSS1)

Connectors

TypeNameDefaultDescription
ModelicaDEVS.Templates.DiscreteOutPortoutPort (from DSource)

Components

TypeNameDefaultDescription
ModelicaDEVS.Miscellaneous.worldModelworld (from DSource)