# What happens when the frequencies of the signal does not lie within the reconstruction filter passband?

Assume we have an analog signal that has frequency components between 40Hz and 50Hz and 0 otherwise. If we sampled this signal with 100Hz sampling frequency then passed to DAC with the same sampling frequency and subsequently to an analog bandpass filter with with 100Hz to 200Hz passband. What do we get as output?

So the original signal has a spectrum looking like this:

So the 40Hz to 50Hz components are also shown at 50Hz to 60Hz.

Assuming that the DAC just outputs the raw data without any interpolation (so it's just a zero-order hold between data points), then the spectrum of that signal will look like this:

Note that all I've really done is sampled this at 10 $$\times$$ the original so it's really still discrete.

As you can see, there is a non-zero spectrum between 100Hz and 200Hz. So filtering using a bandpass filter yields a signal with the following spectrum.

And that is probably what you'll get at the output of your sequence of operations.

Python code for figures below

import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import butter, lfilter, freqz

freqs = [40.0,41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0]
N = 1000
fs = 100
t = np.arange(N)
x = np.zeros(N)
for freq in freqs:
x = x + np.sin(freq*2.0*np.pi*t/fs)
plt.figure(0)
plt.plot(t[1:100], x[1:100])
xx = np.repeat(x,10)
plt.figure(1)
plt.plot(xx[1:100])
order = 9
low = 100
high = 200
b, a = butter(order, [low, high], btype='band', fs=1000)
w, h = freqz(b,a)
plt.figure(3)
plt.plot(w/np.pi*500,np.abs(h))
xxx = lfilter(b, a, xx)
plt.figure(4)
plt.plot(xxx[1:100])
plt.figure(5)
f = np.linspace(0,1,len(xxx))
spectrum = np.abs(np.fft.fft(xxx))
plt.plot(f*1000, spectrum)
plt.figure(6)
plt.plot(f*1000, np.abs(np.fft.fft(xx)))
plt.figure(7)
ff = np.linspace(0,1,len(x))
plt.plot(ff*100, np.abs(np.fft.fft(x)))