moveit2 The MoveIt Motion Planning Framework for ROS 2.
online_signal_smoothing::ButterworthFilter Class Reference

`#include <butterworth_filter.h>`

## Public Member Functions

ButterworthFilter (double low_pass_filter_coeff)

ButterworthFilter ()=delete

double filter (double new_measurement)

void reset (const double data)

## Detailed Description

Class ButterworthFilter - Implementation of a signal filter to soften jerks. This is a first-order Butterworth low-pass filter. First-order was chosen for 2 reasons:

• It doesn't overshoot
• Computational efficiency This filter has been parameterized so there is only one parameter to tune. See "Digital Implementation of Butterworth Firstâ€“Order Filter Type IIR" by Horvath, Cervenanska, and Kotianova, 2019 and Mienkina, M., Filter-Based Algorithm for Metering Applications, https://www.nxp.com/docs/en/application-note/AN4265.pdf, 2016 It comes from finding the bilinear transform equivalent of the analog transfer function and further applying the inverse z-transform. The parameter "low_pass_filter_coeff" equals (2*pi / tan(omega_d * T)) where omega_d is the cutoff frequency and T is the samping period in sec.

Definition at line 65 of file butterworth_filter.h.

## ◆ ButterworthFilter() [1/2]

 online_signal_smoothing::ButterworthFilter::ButterworthFilter ( double low_pass_filter_coeff )

Constructor.

Parameters
 low_pass_filter_coeff Larger filter_coeff-> more smoothing of commands, but more lag. low_pass_filter_coeff = (2*pi / tan(omega_d * T)) where omega_d is the cutoff frequency and T is the samping period in sec.

Definition at line 53 of file butterworth_filter.cpp.

## ◆ ButterworthFilter() [2/2]

 online_signal_smoothing::ButterworthFilter::ButterworthFilter ( )
delete

## ◆ filter()

 double online_signal_smoothing::ButterworthFilter::filter ( double new_measurement )

Definition at line 82 of file butterworth_filter.cpp.

Here is the caller graph for this function:

## ◆ reset()

 void online_signal_smoothing::ButterworthFilter::reset ( const double data )

Definition at line 94 of file butterworth_filter.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: