blockTriangular

Generates a triangular signal.

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

Information

The Triangular Block

Parameters:
a amplitude
f frequency
k number of outputs per slope (only for QSS1)


Description:

This block generates a triangular 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).

Assigning a negative value to the amplitude yields a mirroring of the signal at the x-axis.


Generated Events (QSS1 mode):


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


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



Parameter setting: a=1
f=1
k=20



Generated Events (QSS2/QSS3 mode):


yVal[1] yVal[2] yVal[3]
t=i*1/f -a 4*a/f 0
t=1/(2*f)+i*1/f a -4*a/f 0
i=non-negative integers





Parameter setting: a=1
f=1

Parameters

TypeNameDefaultDescription
Integermethod (from DSource)world.qssUse QSS1, QSS2 or QSS3
Reala1.0Amplitude
Realf1Frequency
Realk10Number of outputs per slope (only for QSS1)

Connectors

TypeNameDefaultDescription
ModelicaDEVS.Templates.DiscreteOutPortoutPort (from DSource)

Components

TypeNameDefaultDescription
ModelicaDEVS.Miscellaneous.worldModelworld (from DSource)