Class Derivative

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, SequenceActor, TimedActor, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class Derivative
    extends DETransformer
    Output the discrete derivative of the input, y[n] = (x[n] - x[n-1])/dt, where dt is the time gap between input events. Output is not generated until two inputs have been consumed.

    The output of this actor is constrained to be a double, and input must be castable to a double. If the input signal is not left-continuous, the derivative will be either infinite or undefined and an exception is thrown.

    In postfire(), if an event is present on the reset port, this actor resets to its initial state, and will not output until two subsequent inputs have been consumed. This is useful if the input signal is switched on and off, in which case the time gap between events becomes large and would otherwise effect the value of the derivative for one sample.

    Since:
    Ptolemy II 8.0
    Version:
    $Id: Derivative.java$
    Author:
    Jeff C. Jensen
    See Also:
    Differential