🔬

Resonant 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

Resonant Filter

This is a classical IIR filter that operates with the following difference equation
y[n]= y[n−N]+x[n]y\lbrack n\rbrack = \ y\lbrack n - N\rbrack + x\lbrack n\rbrack
Which describes a feedforward of the input with a delayed version of the output. Intuitively, for periodic signals, this implies that the filter will, when supplied a signal with fundamental period N will have reinforcing effect, whereby each of the previous peaks of a signal will be summed with the current peak of the signal to provide large gain at this specific frequency. This behavior is known as resonance, and is commonly used to design many kinds of filters. Mapping this to the z-domain provides the following equation:
Y(z)=z−NY(z)+X(z)Y(z) = z^{- N}Y(z) + X(z)
Which after some algebra, provides the transfer function of:
Y(z)X(z)=H(z)=11−z−N=zNzN−1\frac{Y(z)}{X(z)} = H(z) = \frac{1}{1 - z^{- N}} = \frac{z^{N}}{z^{N} - 1}
MATLAB Analysis
1. In the provided matlab script, vary the feedback delay (value of N) for the resonant filter and comment on as to how the:
a. Impulse response changes
The impulse response will exhibit resonance at the frequency determined by the feedback delay.
b. Frequency response changes
The frequency response will show a peak at the resonant frequency and roll-off in neighboring frequencies.
c. Pole zero plot changes
The pole-zero plot will show a single pole at z=1/N.

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 resonant filter to accommodate this maximal number of taps yields the following transfer function
H(z)=11−z−5=11+0×(z−1+z−2+z−3+z−4)+z−5H(z) = \frac{1}{1 - z^{- 5}} = \frac{1}{1 + 0 \times \left( z^{- 1} + z^{- 2} + z^{- 3} + z^{- 4} \right) + z^{- 5}}
This shows that  b0b_0=1,  bkb_k=0 ∀ k∈{[1,5]∩  Z\mathbb{Z}}, and that  a0,aN=1a_0,a_N=1 and  aka_k=0 ∀ k∈{[1,5]∩ Z\mathbb{Z}}.
  1. Plot the frequency response of this filter when entered into the red pitaya LTI workbench.
notion image
notion image
  1. Show to resulting filtered waveforms/spectra to a:
    1. a. Square wave within the filter resonance. Step Response of the filter outside of the resonance
      notion image
      b. Step Response of the filter outside of the resonance
      notion image

Filter Cascade

As mentioned previously, cascading two filters is described simply by multiplying their transfer functions.
Hnew(z)=H1(z)H2(z)H_{new}(z) = H_{1}(z)H_{2}(z)
Perform analysis on the resulting cascaded filter  Hnew(z)H_{new}(z) where H1(z),H2(z)H_1(z),H_2(z) are the running sum filter with 6 taps (M=6), and the resonant filter with order 6 (N=5).

MATLAB Analysis

Using the previous two filter transfer function in MATLAB, calculate the result of cascading the filters.
  1. Calculate the result of cascading the filters.
  1. Write out the resulting transfer function
  1. Plot and comment on the:
    1. Impulse response shape w.r.t either of the before filters
    2. Frequency response w.r.t either of the before filters
    3. Pole zero plot w.r.t either of the before filters

Red Pitaya

Enter the previously calculated transfer function into the Red Pitaya.
  1. Plot the frequency response of this filter
notion image
notion image
  1. Show to resulting filtered waveforms/spectra to a square wave at:
    1. Square wave within the filter bandwidth
notion image
b. Square wave outside of the filter bandwidth
notion image