User`s guide

Sine Wave
5-400
Discrete
In discrete mode, the block’s discrete-time output can be generated by
directly evaluating the trigonometric function, by table look-up, or by a
differential method. The three options are explained below.
Discrete Computational Methods
When Discrete is selected from the Sample mode parameter, the secondary
Computation method parameter provides three options for generating the
discrete sinusoid:
Trigonometric Fcn
Table Lookup
Differential
Trigonometric Fcn. The trigonometric function method computes the sinusoid in
the ith channel, y
i
, by sampling the continuous function
or
with a period of T
s
, where T
s
is specified by the Sample time parameter. This
mode of operation shares the same benefits and liabilities as the
Continuous
sample mode described above.
If the period of every sinusoid in the output is evenly divisible by the sample
period, meaning that 1/(f
i
T
s
)=k
i
is an integer for every output y
i
, then the
sinusoidal output in the ith channel is a repeating sequence with a period of
k
i
samples. At each sample time, the block evaluates the sine function at the
appropriate time value within the first cycle of the sinusoid. By constraining
trigonometric evaluations to the first cycle of each sinusoid, the block avoids
the imprecision of computing the sine of very large numbers, and eliminates
the possibility of discontinuity during extended operations (when an absolute
time variable might overflow). This method therefore avoids the memory
demands of the table look-up method at the expense of many more
floating-point operations.
y
i
A
i
2πf
i
t φ
i
+()sin=
real()
y
i
A
i
e
j 2πf
i
t φ
i
+()
=
complex()