Examples of Waveform Sampling

July 8, 2019

Typically, sampling involves taking measurements of a waveform at regular intervals and structuring these measurements as a sequence of values. The length of this interval is called the period and is often represented as 𝑇 or 𝜏 with the unit seconds. The rate 1/𝜏 is called the sample rate and is often denoted π–₯s with the unit Hertz. Here is an example of sampling a cosine:

Example 1: Sampling a Cosine

Suppose we have a waveform, w(t), that is a 100 Hz cosine such that w(t) = cos(2πœ‹100t).

Sampling at π–₯s = 4 x fh = 400 Hz (Figure 1.3) yields the sample sequence:

(1)   \begin{equation*} y(n)=(\!(… , -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, …)\!) \end{equation*}

Similarly, sampling at π–₯s = 6 x fhΒ = 600 Hz (Figure 1.3)Β  yields the following sequence:

(2)   \begin{equation*} y(n)=(\!(… , -1, -\frac{1}{2} , \frac{1}{2} , 1, \frac{1}{2} , -\frac{1}{2} , -1, -\frac{1}{2} , \frac{1}{2} , 1, …)\!) \end{equation*}

Figure 1.3. Sampling a cosine.

Even though these two sequences are quite different, either can be used to perfectly reconstruct the original waveform w(t).

If a sampled signal is to be processed and eventually reconstructed, retaining the knowledge of the sample rate is extremely important. The concept of duration in time is lost without the knowledge of π–₯s during sampling, even though the time-ordering of the samples is preserved (e.g. y(1) occurred earlier in time than y(2)). Our second example further illustrates this point.

Example 2: Sampling a Cosine without the Sample Rate

Suppose we have a waveform w1(t) that is a 1 Hz cosine such that w1(t) β‰œ cos(2πœ‹t). Sampling at 4 Hz (Figure 1.4) yields the sequence:

(3)   \begin{equation*} y_{1}(n)=(\!(..., -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1,...)\!) \end{equation*}

Similarly, a waveform w2(t) that is a 100 Hz cosine such that w2(t) β‰œ cos(2πœ‹100t) sampled at 400 Hz (Figure 1.4) yields the sequence:

(4)   \begin{equation*} y_{2}(n)=(\!(..., -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1,...)\!) \end{equation*}

The two sequences are identical (y1(n) = y2(n)) despite the fact that in real-time w1(t) is oscillating 100 times faster than w2(t).Β  Thus, we must know the value of π–₯sΒ to properly reconstruct the waveform in the real world.

Figure 1.4. Sampling a 1 Hz cosine at 4 Hz and a 100 Hz cosine at 400 Hz.