
LevelCrossingDetector |
ptolemy.domains.ct.lib.LevelCrossingDetector |
An event detector that converts continuous signals to discrete events when
the continuous signal crosses a level threshold.
The direction parameter
can constrain the actor to detect only rising or falling transitions.
It has three possible values, "rising", "falling", and "both", where
"both" is the default.
When the trigger equals the level threshold (within the specified
errorTolerance), this actor outputs a discrete event with value
defaultEventValue if useEventValue is selected. Otherwise, the
actor outputs a discrete event with the value as the level threshold.
This actor controls the step size such that level crossings never
occur during an integration. So, this actor is only used in Continuous-Time
domain.
Author(s): Jie Liu, Haiyang Zheng
Version:$Id: LevelCrossingDetector.java,v 1.68 2006/03/28 23:59:53 cxh Exp $
Pt.Proposed Rating:Yellow (hyzheng)
Pt.Accepted Rating:Red (hyzheng)
output
The output port. The type is at least the type of the
defaultEventValue parameter.
trigger
The trigger port. Single port with type double.
defaultEventValue
A parameter that specifies the value of output events
if the useEventValue parameter is checked. By default,
it contains a DoubleToken of 0.0.
direction
A parameter that can be used to limit the detected level crossings
to rising or falling. There are three choices: "falling", "rising", and
"both". The default value is "both".
errorTolerance
The parameter of error tolerance of type double. By default,
it contains a DoubleToken of 1e-4.
level
The parameter that specifies the level threshold. By default, it
contains a DoubleToken of value 0.0. Note, a change of this
parameter at run time will not be applied until the next
iteration.
useDefaultEventValue
The parameter that indicates whether to use the default event
value.