Table of Contents
Fetching ...

Software Implementation of Digital Filtering via Tustin's Bilinear Transform

Connor W. Herron

TL;DR

This work addresses the challenge of realizing continuous-time, causal filters in real-time digital control loops by mapping $H(s)$ to a discrete $H[z]$ via the Tustin bilinear transform and precomputing stable, implementable coefficient vectors $\hat{\mathbf{a}}$ and $\hat{\mathbf{b}}$ at initialization. It presents two complementary methods—General Method and Horner's Method—for deriving these coefficients, illustrated with first- and second-order examples (unity-gain LPF and Butterworth) and verified across several practical filters. The paper demonstrates a practical workflow, including chirp-based validation and hardware/software integration (IHMC ORS and SCS2), and provides explicit coefficient sets for a range of filters (LPFs, Notch, complex multi-order, PID, and Lead-Lag) along with a startup heuristic to mitigate initialization transients. The contributions enable robust, efficient precomputation of digital filter parameters, facilitating predictable, fixed-frequency control loops in robotics and related applications.

Abstract

The purpose of this work is to provide some notes on a software implementation for digital filtering via Tustins Bilinear Transform. The first section discusses how to solve for the input and output coefficients by hand using a generalized approach called Horners method. The second section presents some results of this generalized digital filtering approach using the IHMC Open Robotics Software stack and Simulation Construction Set 2. This generalized approach can solve for the digital coefficients for any causal transfer function.

Software Implementation of Digital Filtering via Tustin's Bilinear Transform

TL;DR

This work addresses the challenge of realizing continuous-time, causal filters in real-time digital control loops by mapping to a discrete via the Tustin bilinear transform and precomputing stable, implementable coefficient vectors and at initialization. It presents two complementary methods—General Method and Horner's Method—for deriving these coefficients, illustrated with first- and second-order examples (unity-gain LPF and Butterworth) and verified across several practical filters. The paper demonstrates a practical workflow, including chirp-based validation and hardware/software integration (IHMC ORS and SCS2), and provides explicit coefficient sets for a range of filters (LPFs, Notch, complex multi-order, PID, and Lead-Lag) along with a startup heuristic to mitigate initialization transients. The contributions enable robust, efficient precomputation of digital filter parameters, facilitating predictable, fixed-frequency control loops in robotics and related applications.

Abstract

The purpose of this work is to provide some notes on a software implementation for digital filtering via Tustins Bilinear Transform. The first section discusses how to solve for the input and output coefficients by hand using a generalized approach called Horners method. The second section presents some results of this generalized digital filtering approach using the IHMC Open Robotics Software stack and Simulation Construction Set 2. This generalized approach can solve for the digital coefficients for any causal transfer function.
Paper Structure (18 sections, 55 equations, 14 figures, 1 algorithm)

This paper contains 18 sections, 55 equations, 14 figures, 1 algorithm.

Figures (14)

  • Figure 1: Linear and Exponential Chirp Waveforms from 0.01 to 2.5 Hz with amplitude of 1
  • Figure 2: Input-Output plot of the 1st Order LP Filter with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz
  • Figure 3: Bode Plot of filter with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz
  • Figure 4: Input-Output plot of 2nd order LP Butterworth filter with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz
  • Figure 5: Bode Plot of filter with an exponential chirp input of 1 amplitude from 0.1 to 100 Hz
  • ...and 9 more figures