🔬

Running Sum Filter

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.
notion image

Running Sum Filter

This is a classical FIR filter that operates with the following difference equation
y[n]=∑k=0M−1x[n−k]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)=∑k=0M−1z−k=zM−1zM−1(z−1)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

  1. In the provided matlab script, vary the number of taps (value of M) for the running sum filter and comment on as to how the:
    1. Impulse response changes
    2. 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.
  1. If we assign all  bk=1Mb_k=\frac{1}{M}, this is the moving average filter from the previous lab, how does this valuing of the  values change:
    1. Impulse response
    2. 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 ak,bka_k, b_k where k∈[0,5] with the caveat that  a0a_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)=∑k=05z−k=1+z−1+z−2+z−3+z−4+z−5H(z) = \sum_{k = 0}^{5}z^{- k} = 1 + z^{- 1} + z^{- 2} + z^{- 3} + z^{- 4} + z^{- 5}
This shows that all bkb_k  values are 1, and that  a0a_0=1.
  1. Plot the frequency response of this filter when entered into the red pitaya LTI workbench.
    1. notion image
      notion image
  1. Show to resulting filtered waveforms/spectra to a:
    1. Square wave within the filter bandwidth
    2. notion image
      b. Square wave outside of the filter bandwidth
      notion image
Â