.ModelicaDEVS.SourceBlocks.Sine

Information

The Sine Block

Parameters:
a amplitude
f frequency
phi phase
k number of outputs during the rise of the ramp (only for QSS1)
start start time of the output series


Description:

The well known first three parameters describe the customary properties of a sine signal. The last two parameters are used to generate the output: since the signal has to be understandable by DEVS blocks, the originally continuous sine signal has to be broken down into events.
Parameter k declares how many outputs per period are desired (duration of a period = 1/f). These outputs can be seen as samples of a normal sine signal.
Parameter start indicates when the output series starts. This enables a sampling of the sine signal not only at time instants t= 0+i*(1/(f*k)), i=non-negative integers, but also at time instants t=start+i*(1/(f*k)) where start is the sampling start time and acts as an offset to the multiples of 1/(f*k).

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


Generated Events (QSS1/QSS2/QSS3 mode):

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


yVal[1] yVal[2] yVal[3]
t=start+i*(1/f*k) a*sin(t*w+phi) a*w*cos(t*w+phi) -a*w*w*sin(t*w+phi)/2
i={0,1,2,...,k}
w=2*f*Modelica.Constants.pi




Parameter setting: a=1
f=1
phi=0
k=20
start=0

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos