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
which is a linear combination of bandlimited signals, and hence a bandlimited signal.
Checkpoint: Show that the space of bandlimited signals is a vector space. Then, guess its basis functions.
Let's simulate the bandlimited signal and 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)

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.
Checkpoint:
Is bandlimited? If yes, what is its bandwidth?
Is bandlimited?
With this, comment why the FFT approximation to the Fourier transform is correct in the case above when the signals are sinusoidal.
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 Hz.
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)

Notice that the signal sampled atHz has the identical non-zero spectral coefficients as the original signal, however, the signal sampled atHz does not resemble the spectrum of the original signal. Hence the signal sampled atHz can be perfectly recovered using an ideal lowpass filter.
Last updated
Was this helpful?