Indy Tools
IndySDK includes a variety of tools designed for users to easily configure their own low-level robot controller. These tools includes filters and filtered derivatives, which can be accessed by including the Util/Filter.h libraries included in the NRMKFoundation namespace.
1. Filters
IndySDK offers a comprehensive set of filtering tools designed to refine and process signals for low-level robot controller configurations. All different types of filters in Filter class can be precisely adjusted through parameters like cutoff frequencies and specific polynomial coeffiecinet, allowing for exact signal manipulation. The provided APIs facilitate a broad range of signla processing tasks essential for robotic control systems, highlighing flexibility and precision in managing signal dynamics.
1.1. Filter Class
The Filter class serves as the base for multiple specific filter implementations including LowPassFilter, FilteredDerivative, FilterLeadLag, and FilterMovingAverage. It provides foundational methods for filtering signals and setting filter characteristics.
NRMKFoundation::Filter::filter
Refines input signals through filtering.
- Parameters
Type const &raw
: The input signal to be filtered.Type &filtered
: The output filtered signal.
NRMKFoundation::Filter::setTransferFunction
Configures the filter by specifying its transfer function.
- Parameters
CoeffVec const &den
: Denominator polynomial coefficients.CoeffVec const &num
: Numerator polynomial coefficients.
1.2. LowPassFilter
Implements a lowpass filter with a specific cutoff frequency.
NRMKFoundation::LowpassFilter::setParam
Sets parameters for the lowpass filter.
- Parameters
double sampFreq
: Control system's sampling frequency.double cutOffFreq
: Lowpass filter's cutoff frequency.
1.3. FilteredDerivative
Provides a derivative filter with filtering capabilities to smooth out the differentiation process and reduce noise.
NRMKFoundation::FilteredDerivative::setParam
Sets parameters for the derivative filter.
- Parameters
double sampFreq
: Control system's sampling frequency.double cutOffFreq
: Filter's cutoff frequency.
1.4. FilterLeadLag
A lead-lag filter is implemented to adjust the phase characterisitcs of a control system to improve the systems's transient response.
NRMKFoundation::FilterLeadLag::setParam
Configures the lead-lag filter with specific frequencies.
- Parameters
double sampFreq
: Sampling frequency of the control system.double f1, f2, f3
: Frequencies defining the filter's characteristics.
1.5. FilterMovingAverage
A moving average filter is used to smooth out signal noise across a defined window size.
NRMKFoundation::FilterMovingAverage::FilterMovingAverage
Initializes the moving average filter with predefined coefficients.
FilterMovingAverage()
{
_b[0] = 1.0/_SIZE;
for (int i = 1; i <= _SIZE; i++)
{
_a[i] = 0;
_b[i] = _b[0];
}
}
- Parameters
int _SIZE
: Window size for the moving average._a, _b
: Arrays for denominator and numerator coefficients, respectively.