Introduction
Digital signal processing relies on filters to manipulate signals by selectively modifying their frequency content. FIR and IIR filters are two major classes used in this domain. FIR filters have a finite impulse response, while IIR filters have an impulse response that extends indefinitely. In this discussion, we explore the characteristics and behaviors of FIR and IIR filters implemented using the Red Pitaya platform. By analyzing their impulse response, frequency response, and pole-zero plots, we gain insights into their strengths and applications. Practical examples, such as the running sum filter and the resonant filter, showcase their effects on different input signals. Understanding these filters enhances our ability to process and enhance signals in various applications.
LTI systems in the Y-domain
Reminder all discrete time LTI systems can be represented in a canonical form of:
Where the coefficients of each expression can be viewed as the coefficients in the difference equation:
Depending on the configurations of the transfer function, the filter can show various behaviors. This lab will demonstrate the differences between two large classes of filters, Finite Impulse Response (FIR), and Infinite Impulse Response (IIR).
Finite Impulse Response (FIR) Filters:
FIR filters are a class of digital filters that possess a finite impulse response. The impulse response of an FIR filter is finite in length and decays to zero after a certain number of samples. This property makes FIR filters inherently stable and easy to implement. FIR filters operate by convolving the input signal with a set of coefficients, also known as the filter kernel or tap weights. The output of an FIR filter y[n] at time index n can be computed as:
where x[n] represents the input signal at time index n, and b0,b1,…, are the filter coefficients.
Running Sum Filter:
The running sum filter is a classic example of an FIR filter. It calculates the sum of the previous M samples of the input signal. In the z-domain, the transfer function of the running sum filter can be expressed as:
This transfer function implies that the output y[n] at time index n is given by the sum of the M previous input samples:
Varying the number of taps (M) in the running sum filter alters the length of the impulse response. With more taps, the impulse response becomes longer, capturing a larger portion of the input history. Consequently, the frequency response of the filter also changes. Increasing the number of taps allows for sharper frequency cutoffs and improved stopband attenuation.
Additionally, by assigning all values as 1/M, the running sum filter becomes a moving average filter. In this case, each tap weight is equal, and the filter performs a simple averaging of the previous M samples. The moving average filter can be represented by the following transfer function:
This filter is commonly used for smoothing or denoising applications, as it attenuates high-frequency components and preserves the low-frequency components of the input signal.
Infinite Impulse Response (IIR) Filters:
IIR filters are a class of digital filters that possess an infinite impulse response. Unlike FIR filters, the impulse response of an IIR filter extends indefinitely. IIR filters are designed by utilizing feedback, where a portion of the output signal is fed back into the filter’s input. This feedback mechanism allows IIR filters to achieve complex frequency response characteristics and resonant behavior.
Resonant Filter:
The resonant filter is a classic example of an IIR filter that exhibits resonance at a specific frequency. It introduces feedback by feeding a delayed version of the output signal back into the filter’s input. The transfer function of a resonant filter shows a peak in the frequency response at the resonant frequency. The resonant filter can be represented by the following transfer function:
Where N represents the feedback delay or the order of the filter. This transfer function implies that the output y[n] at time index n can be computed as:
The resonant filter amplifies the input signal at the resonant frequency, leading to resonance. This behavior is commonly used in audio and music applications to emphasize specific frequencies or create resonant effects.
Conclusion
In conclusion, the study of Linear Time-Invariant (LTI) systems and digital filters provides valuable insights into signal processing and control systems. We explored the properties of LTI systems, including linearity and time-invariance, and discussed Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters. Through examples such as the running sum filter and the resonant filter, we observed how different filter characteristics impact the impulse response, frequency response, and pole-zero plot. Additionally, we examined the concept of cascading filters. Understanding these concepts empowers engineers and researchers to design effective filters for various applications, optimizing signal processing and system performance.