**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:

$H(z) = \frac{b_{0} + b_{1}z^{- 1} + b_{2}z^{- 2} + \ldots + b_{k}z^{- k}}{a_{0} + a_{1}z^{- 1} + a_{2}z^{- 2} + \ldots + a_{m}z^{- m}}\ where\ k,m\mathbb{\in N}$Where the coefficients of each expression can be viewed as the coefficients in the difference equation:

$y[n](a_0 + a_1\delta[n-1] + a_2\delta[n-2] + \cdots + a_m\delta[n-m]) = x[n](b_0 + b_1\delta[n-1] + b_2\delta[n-2] + \cdots + b_k\delta[n-k])$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

*can be computed as:*

**n**where * x[n]* represents the input signal at time index

*, and*

**n***$b_M$ are the filter coefficients.*

**b0,b1,…,****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

*is given by the sum of the*

**n***previous input samples:*

**M**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 * *$b_k$ values as

*, 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*

**1/M***samples. The moving average filter can be represented by the following transfer function:*

**M**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:

$H(z) = \frac{1}{{1 - z^{-N}}}$Where * N* represents the feedback delay or the order of the filter. This transfer function implies that the output

*at time index*

**y[n]***can be computed as:*

**n**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.