com.yobotics.simulationconstructionset.util.math.filter
Class AlphaFilteredYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.DoubleYoVariable
com.yobotics.simulationconstructionset.util.math.filter.AlphaFilteredYoVariable
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- RampedAlphaFilteredYoVariable
public class AlphaFilteredYoVariable
- extends DoubleYoVariable
- 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,
DoubleYoVariable positionVariable)
|
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
DoubleYoVariable alphaVariable)
|
AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
DoubleYoVariable alphaVariable,
DoubleYoVariable positionVariable)
|
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 |
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
DoubleYoVariable alphaVariable)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
double alpha,
DoubleYoVariable positionVariable)
AlphaFilteredYoVariable
public AlphaFilteredYoVariable(java.lang.String name,
YoVariableRegistry registry,
DoubleYoVariable alphaVariable,
DoubleYoVariable 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 breakFrequencyInHertz,
double dt)
computeAlphaGivenBreakFrequencyProperly
public static double computeAlphaGivenBreakFrequencyProperly(double breakFrequencyInHertz,
double dt)
computeBreakFrequencyGivenAlpha
public static double computeBreakFrequencyGivenAlpha(double alpha,
double dt)
main
public static void main(java.lang.String[] args)