DF22 Example
Overview
This example demonstrates the use of the Digital Control Library (DCL) Direct Form 2 (DF22) second-order compensator, also known as a biquad filter. The DF22 filter is a fundamental building block in digital signal processing and control systems, commonly used for:
Digital filtering applications
Frequency response shaping
Control system compensation
Audio signal processing
What the Example Does
The example:
Initializes a DF22 controller with predefined filter coefficients
Processes input samples through the DF22 filter
Compares the computed output against expected reference values
Measures and reports execution performance in CPU cycles
Validates correctness by comparing results with an error tolerance
Usage Notes
Customization
You can modify the example by:
Changing filter coefficients in dcl_df22_example.h to implement different frequency responses
Adjusting
NUM_ELEMENTSto process more or fewer samplesReplacing input data files in the
data/directoryUsing
DCL_runDF22Clamp()instead ofDCL_runDF22()for output limiting
External Connections
None required. This is a software-only computational example.