com.yobotics.simulationconstructionset.util.math.filter
Class AlphaBetaFilteredYoVariable

java.lang.Object
  extended by com.yobotics.simulationconstructionset.YoVariable
      extended by com.yobotics.simulationconstructionset.DoubleYoVariable
          extended by com.yobotics.simulationconstructionset.util.math.filter.AlphaBetaFilteredYoVariable
All Implemented Interfaces:
java.io.Serializable

public class AlphaBetaFilteredYoVariable
extends DoubleYoVariable

Author:
thutcheson

An AlphaBetaFilteredYoVariable is a filtered version of an input YoVar. Either a YoVariable holding the unfiltered val is passed in to the constructor and update() is called every tick, or update(double) is called every tick. The AlphaBetaFilteredYoVariable updates it's val with the current filtered velocity using xp = x + (dt) v // angular position prediction x+ = xp + alpha (xmeas - xp) // adjusted angular position estimate v+ = v + beta (xmeas - xp) // adjusted velocity estimate


         For complete reference see:
                http://www.mstarlabs.com/control/engspeed.html#Ref2

         
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.yobotics.simulationconstructionset.YoVariable
MAX_LENGTH_SHORT_NAME
 
Constructor Summary
AlphaBetaFilteredYoVariable(java.lang.String name, YoVariableRegistry registry, double alpha, double beta, DoubleYoVariable positionVariable, DoubleYoVariable xMeasuredVariable, double DT)
           
AlphaBetaFilteredYoVariable(java.lang.String name, YoVariableRegistry registry, DoubleYoVariable alphaVariable, DoubleYoVariable betaVariable, DoubleYoVariable positionVariable, DoubleYoVariable xMeasuredVariable, double DT)
           
 
Method Summary
 DoubleYoVariable getPositionEstimation()
           
 DoubleYoVariable getVelocityEstimation()
           
 void reset()
           
 void update()
           
 void update(double position)
           
 
Methods inherited from class com.yobotics.simulationconstructionset.DoubleYoVariable
add, add, getDoubleValue, getValueAsDouble, getValueString, getValueStringFromDouble, getYoVariableType, isNaN, mul, mul, set, setValueFromDouble, sub, sub, toString, valueEquals
 
Methods inherited from class com.yobotics.simulationconstructionset.YoVariable
addVariableChangedListener, fullNameEndsWithCaseInsensitive, getDescription, getFullNameWithNameSpace, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValueString, getNameAndValueStringFromDouble, getNameSpace, getNumericValueAsAString, getShortName, getVariableChangedListeners, getYoVariableRegistry, hasSameFullName, notifyVariableChangedListeners, removeAllVariableChangedListeners, removeVariableChangedListener, setManualScalingMinMax
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlphaBetaFilteredYoVariable

public AlphaBetaFilteredYoVariable(java.lang.String name,
                                   YoVariableRegistry registry,
                                   double alpha,
                                   double beta,
                                   DoubleYoVariable positionVariable,
                                   DoubleYoVariable xMeasuredVariable,
                                   double DT)

AlphaBetaFilteredYoVariable

public AlphaBetaFilteredYoVariable(java.lang.String name,
                                   YoVariableRegistry registry,
                                   DoubleYoVariable alphaVariable,
                                   DoubleYoVariable betaVariable,
                                   DoubleYoVariable positionVariable,
                                   DoubleYoVariable xMeasuredVariable,
                                   double DT)
Method Detail

reset

public void reset()

getPositionEstimation

public DoubleYoVariable getPositionEstimation()

getVelocityEstimation

public DoubleYoVariable getVelocityEstimation()

update

public void update()

update

public void update(double position)