Class StatePredictorWithControl

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

    public class StatePredictorWithControl
    extends TypedAtomicActor
    Implementation of StatePredictor witch uses control input.

    StatePredictor runs on a state space model given by

     X_{t+1} = f(X_t, U_t)
     
    where X is the state vector, U is the input vector. This actor reads a single record(x, y) from the port "current_state" and an array of vector(vx, vy) from the port "control_inputs". Output is an array of state(x, y) whose length is "prediction horizon". If the length of control_inputs is shorter than prediction horizon, the last value of cotrol_inputs is used until the step of prediction horizon.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Shuhei Emoto
    Pt.AcceptedRating:
    Red (shuhei)
    Pt.ProposedRating:
    Red (shuhei)
    • Field Detail

      • timeHorizon

        public Parameter timeHorizon
        The time-horizon which defines the number of steps of prediction.
      • controlInput

        public TypedIOPort controlInput
        control input for a robot.
      • currentState

        public TypedIOPort currentState
        current state of a robot.
      • predictedStates

        public TypedIOPort predictedStates
        predicted states of a robot.
      • jacobianOfStates

        public TypedIOPort jacobianOfStates
        jacobian of predicted states (dX/dU). this port output array of matrix {dX1/dU, dX2/dU, ..., dXn/dU} where Xn means predicted states of n-Step later and U means control input (matrix [U1, U2, ..., Un]).
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Description copied from class: NamedObj
        React to a change in an attribute. This method is called by a contained attribute when its value changes. In this base class, the method does nothing. In derived classes, this method may throw an exception, indicating that the new attribute value is invalid. It is up to the caller to restore the attribute to a valid value if an exception is thrown.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the change is not acceptable to this container (not thrown in this base class).