com.yobotics.simulationconstructionset.util.math.filter
Class AlphaFilteredYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.util.math.filter.AlphaFilteredYoVariable
- All Implemented Interfaces:
- Observable, java.io.Serializable
- Direct Known Subclasses:
- RampedAlphaFilteredYoVariable
public class AlphaFilteredYoVariable
- extends YoVariable
- Author:
- jrebula
LittleDogVersion06:
us.ihmc.LearningLocomotion.Version06.util.YoAlphaFilteredVariable,
9:34:00 AM, Aug 29, 2006
A YoAlphaFilteredVariable 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 YoAlphaFilteredVariable updates it's val
with the current filtered version using
filtered_{n} = alpha * filtered_{n-1} + (1 - alpha) * raw_{n}
For alpha=0 -> no filtered
For alpha=1 -> 100% filtered, no use of raw signal
- See Also:
- Serialized Form
|
Constructor Summary |
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha)
|
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha,
YoVariable positionVariable)
|
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
YoVariable alphaVariable)
|
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
YoVariable alphaVariable,
YoVariable positionVariable)
|
| Methods inherited from class com.yobotics.simulationconstructionset.YoVariable |
addObserver, fullNameEndsWith, getBooleanValue, getDescription, getDoubleValue, getEnumValue, getFullNameWithNameSpace, getIntegerValue, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValue, getShortName, getValue, getYoVariableRegistry, getYoVariableType, hasSameFullName, notifyObservers, removeAllObservers, removeObserver, set, set, set, setManualScalingMinMax, toString, valueEquals, valueEquals, valueEquals, valueEquals |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
YoVariable alphaVariable)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha,
YoVariable positionVariable)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
YoVariable alphaVariable,
YoVariable positionVariable)
reset
public void reset()
update
public void update()
update
public void update(double currentPosition)
setAlpha
public void setAlpha(double alpha)
computeAlphaGivenBreakFrequency
public static double computeAlphaGivenBreakFrequency(double breakFrequencyInHetrz,
double dt)
set
public void set(double value)
- Description copied from class:
YoVariable
- Set the value of this YoVariable. All four types are represented via the same interal double. If
of integer type this value is cast as an int whenever accessed. It represents the ordinal if of enum type.
Boolean values are triggered around the 0.5 threshold with < 0.5 being false and greater or equal being true.
- Overrides:
set in class YoVariable
- Parameters:
value - double value to store