This configuration will require an additional piece of equipment, a second red pitaya. One red pitaya will be used as in the oscilloscope/signal generator or the spectrum analyzer modes, while the other will be used in the LTI DSP workbench. Connect the red pitayas such that the IN1 of the LTI DSP device is connected to OUT1 of the generator. You can also use a T-joint to connect the OUT1 of the generator board to IN1 of itself to see the response of the circuits more clearly and to measure the Frequency response with the Bode analyzer.

**Running Sum Filter**

This is a classical FIR filter that operates with the following difference equation

$y\lbrack n\rbrack = \sum_{k = 0}^{M - 1}{x\lbrack n - k\rbrack}$This has the z domain transfer function of simply the sum each delay element multiplied by unity.

$H(z) = \sum_{k = 0}^{M - 1}z^{- k} = \frac{z^{M} - 1}{z^{M - 1}(z - 1)}$Where the final transfer function expression is simply the expansion of the M-th partial sum of a geometric series for * |z|<1*.

**MATLAB Analysis**

- In the provided matlab script, vary the number of taps (value of
) for the running sum filter and comment on as to how the:**M** - Impulse response changes
- If we assign all $b_k=\frac{1}{M}$, this is the moving average filter from the previous lab, how does this valuing of the values change:
- Impulse response

*As the number of taps increases, the impulse response becomes longer, capturing a larger portion of the input history. *

b. Frequency response changes

*Increasing the number of taps allows for sharper frequency cutoffs and improved stopband attenuation.*

c. Pole zero plot behaves

*The pole-zero plot will show M zeros at the origin.*

*The impulse response will have a flat top and a gradual decay.*

b. Frequency response

*The frequency response will have a flat magnitude response in the passband and roll-off in the stopband.*

c. Pole zero plot

*The pole-zero plot will show M zeros at the origin.*

**Red Pitaya**

In the red pitaya’s LTI workbench, we can construct arbitrary transfer functions using the coefficients $a_k, b_k$ where k∈[0,5] with the caveat that $a_0$=1. Expanding the transfer function of the running sum filter to accommodate this maximal number of taps yields the following transfer function

$H(z) = \sum_{k = 0}^{5}z^{- k} = 1 + z^{- 1} + z^{- 2} + z^{- 3} + z^{- 4} + z^{- 5}$This shows that all $b_k$ values are 1, and that $a_0$=1.

- Plot the frequency response of this filter when entered into the red pitaya LTI workbench.
- Show to resulting filtered waveforms/spectra to a:
- Square wave within the filter bandwidth

b. Square wave outside of the filter bandwidth