com.yobotics.simulationconstructionset.util.math.filter
Class ButterworthFusedYoVariable
java.lang.Object
com.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.DoubleYoVariable
com.yobotics.simulationconstructionset.util.math.filter.ButterworthFusedYoVariable
- All Implemented Interfaces:
- java.io.Serializable
public class ButterworthFusedYoVariable
- extends DoubleYoVariable
A YoButterworthFusedVariable takes two inputs measuring the same signal and
filters them together. One of the signals is considered accurate
at low frequencies and the other accurate at high frequencies. The
user also supplies an alpha which relates the relative confidence
frequencies. Either the underlying inputs must be passed in to a
constructor as YoVariables and update() called every tick or
update(double, double) must be called every tick with the variables.
The YoAlphaFilteredVariable updates it's val with the current filtered
version using a low pass and a high pass Butterworth Filter
steady_state_offset_{n} = steady_state_offset_{n-1} + alpha * (fused_{n-1} - slow_signal_{n})
fused_{n} = fast_signal_{n} - steady_state_offset_{n}
A lower alpha means that the relative confidence frequency of the
slowSignal is lower.
- See Also:
- Serialized Form
Constructor Summary |
ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha)
|
ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha,
DoubleYoVariable slowSignal,
DoubleYoVariable fastSignal)
|
ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
DoubleYoVariable alphaVariable,
DoubleYoVariable slowSignal,
DoubleYoVariable fastSignal)
|
Method Summary |
void |
reset()
|
void |
update()
|
void |
update(double slowSignalVal,
double fastSignalVal)
|
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 |
ButterworthFusedYoVariable
public ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha)
ButterworthFusedYoVariable
public ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
double alpha,
DoubleYoVariable slowSignal,
DoubleYoVariable fastSignal)
ButterworthFusedYoVariable
public ButterworthFusedYoVariable(java.lang.String name,
YoVariableRegistry yoVariableRegistry,
DoubleYoVariable alphaVariable,
DoubleYoVariable slowSignal,
DoubleYoVariable fastSignal)
reset
public void reset()
update
public void update()
update
public void update(double slowSignalVal,
double fastSignalVal)