« Prev Home Next »

Tutorial 2: Sampling a Waveform in the Time Domain


In the top panel, you can see a sine wave with frequency 440 Hz. Like in the previous tutorial, you can hear the sound by clicking on "play original" at the bottom of the page.

As seen in the slides for class 1, the input signal would be some kind of continuous signal, whether analogue or acoustic and would be captured either directly or by a microphone. In this case it is a sinusoidal waveform. Before the continuous signal can be converted into a set of 0's and 1's, it must be sampled. A simple one-dimensional sampling system would be represented with equation: y[n] = x(nTs)

The middle panel represents said sampling signal (impulse train) that will poll the input x at time [n].

The bottom panel shows the resulting samples with amplitudes corresponding to the polled input signal.

Let's get to know the panels, bring the zoom to 300% and start to reduce the sample rate to its minimum. What changes in panels 2 and 3?
Now type into the input signal frequency 150 Hz, press update and resize the zoom until you see at least one full cycle of the input signal. How many samples do you get in each period? Now double the input signal frequency. How many samples do you get per period?
Keep the sampling rate at 3 kHz (Nyquist Rate) and set the input signal frequency to 1.5 kHz at the Nyquist Frequency. How many samples per period do you see and where are they? What would the resulting sound look like? By moving the phase slider, what happens to the samples? What would the resulting sound look like?
Now, bypass the Nyquist Frequency to 2700 Hz whilst keeping the sampling rate at 3000 Hz, what do you notice? Can you tell what the resulting frequency would be?
Now set the input signal frequency to 750 and the number of harmonics to two. With the sampling rate at 3000 Hz, do you notice something in how the input signal is being sampled?

These were the core concepts on how a signal is sampled.