Compare the Performance of Deployed IIR Filters
Discretized analog filters can be deployed onto microcontrollers to filter signals in real time. In this example, IIR filters are deployed to an Adafruit Metro 328 and the real-time response of the filters is compared.
The complete list of IIR filters in the Wolfram Language.
Their third-order transfer functions with a cutoff frequency of 2 Hz.
The discrete-time models of the filters with a sampling period of 0.2 seconds.
Create a connections model with a single input and outputs that are the filtered signals.
The microcontroller specification.
Embed the code.
The deployed code size for the six filters and serial communication is well within the capacity of an Adafruit Metro.
The noisy input signal.
Open a connection to the device.
Submit a scheduled task to send and receive data.
Remove the task and close the device after some time.
Plot the noisy input signal and the filtered outputs.