Connexions

Site Feedback

Signal Sampling

By Stephen Kruzick, Justin Romberg

Introduction

Digital computers can process discrete time signals using extremely flexible and powerful algorithms. However, most signals of interest are continuous time signals, which is how data almost always appears in nature. This module introduces the concepts behind converting continuous time signals into discrete time signals through a process called sampling.

Sampling

Sampling a continuous time signal produces a discrete time signal by selecting the values of the continuous time signal at evenly spaced points in time. Thus, sampling a continuous time signal xx with sampling period TsTs gives the discrete time signal xsxs defined by xs(n)=x(nTs).xs(n)=x(nTs). The sampling angular frequency is then given by ωs=2π/Tsωs=2π/Ts.

It should be intuitively clear that multiple continuous time signals sampled at the same rate can produce the same discrete time signal since uncountably many continuous time functions could be constructed that connect the points on the graph of any discrete time function. Thus, sampling at a given rate does not result in an injective relationship. Hence, sampling is, in general, not invertible.

Example 1

For instance, consider the signals x,yx,y defined by

x ( t ) = sin ( t ) t x ( t ) = sin ( t ) t
1
y ( t ) = sin ( 5 t ) t y ( t ) = sin ( 5 t ) t
2

and their sampled versions xS,ysxS,ys with sampling period Ts=π/2Ts=π/2

x s ( n ) = sin ( n π / 2 ) n π / 2 x s ( n ) = sin ( n π / 2 ) n π / 2
3
y s ( n ) = sin ( n 5 π / 2 ) n π / 2 . y s ( n ) = sin ( n 5 π / 2 ) n π / 2 .
4

Notice that since

sin ( n 5 π / 2 ) = sin ( n 2 π + n π / 2 ) = sin ( n π / 2 ) sin ( n 5 π / 2 ) = sin ( n 2 π + n π / 2 ) = sin ( n π / 2 )
5

it follows that

y s ( n ) = sin ( n π / 2 ) n π / 2 = x s ( n ) . y s ( n ) = sin ( n π / 2 ) n π / 2 = x s ( n ) .
6

Hence, xx and yy provide an example of distinct functions with the same sampled versions at a specific sampling rate.

It is also useful to consider the relationship between the frequency domain representations of the continuous time function and its sampled versions. Consider a signal xx sampled with sampling period TsTs to produce the discrete time signal xs(n)=x(nTs)xs(n)=x(nTs). The spectrum Xs(ω)Xs(ω) for ω[-π,π)ω[-π,π) of xsxs is given by

X s ( ω ) = n = - x ( n T s ) e - j ω n . X s ( ω ) = n = - x ( n T s ) e - j ω n .
7

Using the continuous time Fourier transform, x(tTs)x(tTs) can be represented as

x ( t T s ) = 1 2 π T s - X ω 1 T s e j ω 1 t d ω 1 . x ( t T s ) = 1 2 π T s - X ω 1 T s e j ω 1 t d ω 1 .
8

Thus, the unit sampling period version of x(tTs)x(tTs), which is x(nTs)x(nTs) can be represented as

x ( n T s ) = 1 2 π T s - X ω 1 T s e j ω 1 n d ω 1 . x ( n T s ) = 1 2 π T s - X ω 1 T s e j ω 1 n d ω 1 .
9

This is algebraically equivalent to the representation

x ( n T s ) = 1 T s k = - 1 2 π - π π X ω 1 - 2 π k T s e j ( ω 1 - 2 π k ) n d ω 1 , x ( n T s ) = 1 T s k = - 1 2 π - π π X ω 1 - 2 π k T s e j ( ω 1 - 2 π k ) n d ω 1 ,
10

which reduces by periodicity of complex exponentials to

x ( n T s ) = 1 T s k = - 1 2 π - π π X ω 1 - 2 π k T s e j ω 1 n d ω 1 . x ( n T s ) = 1 T s k = - 1 2 π - π π X ω 1 - 2 π k T s e j ω 1 n d ω 1 .
11

Hence, it follows that

X s ( ω ) = 1 T s k = - n = - - π π X ω 1 - 2 π k T s e j ω 1 n d ω 1 e - j ω n . X s ( ω ) = 1 T s k = - n = - - π π X ω 1 - 2 π k T s e j ω 1 n d ω 1 e - j ω n .
12

Noting that the above expression contains a Fourier series and inverse Fourier series pair, it follows that

X s ( ω ) = 1 T s k = - X ω - 2 π k T s . X s ( ω ) = 1 T s k = - X ω - 2 π k T s .
13

Hence, the spectrum of the sampled signal is, intuitively, the scaled sum of an infinite number of shifted and time scaled copies of original signal spectrum. Aliasing, which will be discussed in depth in later modules, occurs when these shifted spectrum copies overlap and sum together. Note that when the original signal xx is bandlimited to (-π/Ts,π/Ts)(-π/Ts,π/Ts) no overlap occurs, so each period of the sampled signal spectrum has the same form as the orignal signal spectrum. This suggest that if we sample a bandlimited signal at a sufficiently high sampling rate, we can recover it from its samples as will be further described in the modules on the Nyquist-Shannon sampling theorem and on perfect reconstruction.

Sampling Summary

Sampling a continuous time signal produces a discrete time signal by selecting the values of the continuous time signal at equally spaced points in time. However, we have shown that this relationship is not injective as multiple continuous time signals can be sampled at the same rate to produce the same discrete time signal. This is related to a phenomenon called aliasing which will be discussed in later modules. Consequently, the sampling process is not, in general, invertible. Nevertheless, as will be shown in the module concerning reconstruction, the continuous time signal can be recovered from its sampled version if some additional assumptions hold.