The Sine Block

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


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

Parameter setting: a=1

Generated at 2020-08-11T01:53:57Z by OpenModelicaOpenModelica 1.16.0~dev-583-g9d71067 using GenerateDoc.mos