Full Library / Source / Clock / PoissonClock
Block Name: PoissonClock
Code File Location: VisualSim/actor/lib/PoissonClock
o It produces a signal that is piecewise constant, with transitions between levels taken at times given by a Poisson process.
This actor produces a signal that is piecewise constant, with transitions between levels taken at times given by a Poisson process. It has various uses. Its simplest use in the Digital domain is to generate a sequence of events at intervals that are spaced randomly, according to an exponential distribution. In Continuous, it can be used to generate a piecewise constant waveform with randomly spaced transition times. In both simulators, the output value can cycle through a set of values.
The mean time between events is given by the meanTime parameter. An event is defined to be the transition to a new output value. The default mean time is 1.0.
The values parameter must contain an ArrayToken, or an exception will be thrown when it is set. By default the elements of the array are IntTokens with values 1 and 0, Thus, the default output value is always 1 or 0.
The first execution of this block is always at the start time and it will execute at any time in response to a trigger input. On the trigger inputs, it simply repeats the most recent output (or generate a new output if the time is suitable.) Thus, the trigger, in effect, asks the block what its current output value is. Some simulators, such as those in CT, may also fire the actor at other times, without requiring a trigger input. Again, the block simply repeats the previous output. Thus, the output can be viewed as samples of the piecewise constant waveform, where the time of each sample is the time of the firing that produced it.
The type of the output can be any token type. This type is inferred from the element type of the values parameter.
Refer PoissonClock Demo Model.
Parameter |
Explanation |
Type |
Example |
fireAtStart |
If true, then this actor will request a firing at the start time. Otherwise, the first firing will be requested at the first random time. |
Boolean |
true |
meanTime |
The mean time between events, where the output value transitions. The period of the output waveform. |
Double |
2.0 |
values |
The values that will be produced at the specified offsets. |
Array |
{1, 0} |
stopTime |
The stop time of the model. |
Double |
1.0 |
Port |
Explanation |
Type |
Output |
At every Poisson edge a value is output on this port |
Integer |
trigger |
This input port is used to start the generation of events from this block. This is an optional port and the block can be used without the input trigger. |
Any value |
Created with the Personal Edition of HelpNDoc: Easy EPub and documentation editor