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:

  1. Initializes a DF22 controller with predefined filter coefficients

  2. Processes input samples through the DF22 filter

  3. Compares the computed output against expected reference values

  4. Measures and reports execution performance in CPU cycles

  5. 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_ELEMENTS to process more or fewer samples

  • Replacing input data files in the data/ directory

  • Using DCL_runDF22Clamp() instead of DCL_runDF22() for output limiting

External Connections

None required. This is a software-only computational example.