0.2 Sampling Bandlimited Signals

We can verify Shannon's sampling theorem. We can create bandlimited signals using sinusoidal signals and their linear combinations. Let's consider the signal

y(t)=cos(2π5t)+0.5cos(2π6t)+0.25cos(2π10t), y(t) = \cos(2\pi 5t) + 0.5\cos(2\pi 6t) + 0.25\cos(2\pi 10t),

which is a linear combination of bandlimited signals, and hence a bandlimited signal.

Let's simulate the bandlimited signal y yand verify by plotting the spectrum.

t_continuous = np.linspace(0,1,1000)
cosine = lambda A, f, t: A*np.cos(2*np.pi*f*t)

signal = cosine(1.0, 5, t_continuous) + cosine(.5, 6, t_continuous) \
            + cosine(.25, 10, t_continuous)
A bandlimited signal -- linear combination of sinusoidal signals.
Spectrum of the bandlimited signal composed using cosines.

The spectrum is non-zero at frequencies corresponding to the frequencies contained in the signal at 5 Hz, 6 Hz and 10 Hz. But let's analyse this a little more.

Since the signal is known in closed-form, we can get exact samples by defining the sampled signal. We can then plot the spectrum and observe the effects. We know, using Shannon's sampling theorem, the signal is represented exactly when the sampling frequency is greater than 20 20Hz.

Fs = 30
t_discrete = np.arange(1,Fs+1)
sampled_signal = cosine(1.0, 5/Fs, t_discrete)\
            + cosine(.5, 6/Fs, t_discrete) \
            + cosine(.25, 10/Fs, t_discrete)
DFT of the signal with 30 samples per second.
DFT of the signal with 14 samples per second.

Notice that the signal sampled at30 30Hz has the identical non-zero spectral coefficients as the original signal, however, the signal sampled at14 14Hz does not resemble the spectrum of the original signal. Hence the signal sampled at30 30Hz can be perfectly recovered using an ideal lowpass filter.

Last updated

Was this helpful?