3.1.6.3. Trig TimeSeries
This command is used to construct a TimeSeries object in which the load factor is a sine function of the time in the domain, between a start and an end time:
Fig. 3.1.6.3 Trigonometric Time Series
- timeSeries Trig $tag $tStart $tEnd $period <-factor $cFactor> <-shift $shift> <-zeroShift $zeroShift>
ops.timeSeries('Trig', tag, tStart, tEnd, period, '-factor', cFactor, '-shift', shift, '-zeroShift', zeroShift)
Argument |
Type |
Description |
|---|---|---|
$tag |
integer |
unique tag among TimeSeries objects |
$tStart |
float |
start time of the non-zero load factor |
$tEnd |
float |
end time of the non-zero load factor |
$period |
float |
period of the sine wave |
$cFactor |
float |
amplitude of the sine wave (optional: default = 1.0) |
$shift |
float |
phase shift in radians (optional: default = 0.0) |
$zeroShift |
float |
constant added to the load factor between tStart and tEnd (optional: default = 0.0) |
Note
The type can also be given as Sine.
Unlike the Triangle TimeSeries and Pulse TimeSeries series, where the phase shift is a time, the phase shift here is an angle in radians.
Outside the interval tStart to tEnd the load factor is 0.0. If tEnd - tStart is not a whole number of periods, the load factor jumps to 0.0 at tEnd.
Example:
The following example creates a sine time series with tag 1, a start time of 0.0, an end time of 10.0, a period of 1.0 and an amplitude of 2.0.
timeSeries Trig 1 0.0 10.0 1.0 -factor 2.0
ops.timeSeries('Trig', 1, 0.0, 10.0, 1.0, '-factor', 2.0)
Code Developed by: fmk