Sampling is the process of converting continuous-time signals into discrete-time signals, possibly allowing for the reconstruction of the original continuous-time signal. The sampling period is Ts and the samples are x(kTs).
Intuition says that reconstruction from discrete samples is always ambiguous: infinitely many different curves pass through the same samples (the notes sketch the original signal and a different wiggly curve through the same points). The theory below shows why, under suitable assumptions, this is not true.
Flat-top sampling
The sampled signal is the product (a "mixer" ⊗ simply represents a product)
xp(t)=x(t)p(t),p(t)=n=−∞∑+∞rect(2T1t−nTs),
with period Ts>0 and rectangle width 2T1. If p(t) is a train of squares like that, then xp(t) is "flat-top sampled": during each rectangle the output follows x(t) (sketch: bits of x(t) cut by the pulses, zero in between).
Product in time is convolution in frequency:
xp(t)=x(t)p(t)FXp(jω)=2π1X∗P(jω).
Restriction: we enforce the condition that X(jω) has limited support (we will see why); sketch of ∣X(jω)∣: a triangle-like bump supported in [−ωM,ωM].
Spectrum of the pulse train
To get P(jω): compute the Fourier series of p(t), then derive the (generalized) Fourier transform.
The Fourier coefficients of p(t)=repTs[rect(2T1t)] (the notes take Ts=1) are
an=⎩⎨⎧2T1,πnsin(nωsT1),n=0n=0
and lie on the envelope of a sinc-like curve (the notes sketch the coefficients an at the points nωs, with ωs=2π). Then
Observation. The result is a sum of replicas of the original Fourier transform X(jω), shifted by nωs and scaled by the coefficients an (the envelope of the an shapes their heights). For n=0 the replica yields P(ωs,0)X(jω).
Consider now an (ideal) low-pass filter with gain P(ωs,0)1: we get back X(jω), if X(jω) has finite support. We need the replicas not to overlap. With X supported in [−ωM,ωM], the first replica on the right occupies [ωs−ωM,ωs+ωM], and no overlap requires
Flat-top sampling with T1→0. Motivation: in practical applications we want to store samples. T1 does not entail the kind of overlap above: it only affects the magnitude of the Fourier coefficients P(ωs,n).
As T1→0 the train of rectangles converges in distribution to the pulse train
p(t)=n=−∞∑+∞δ(t−nTs).
Recall that its Fourier coefficients are P(ωs,n)=Ts1=2πωs for all n∈Z, so the Fourier series is p(t)=Ts1∑nejωsnt and
Thus the Fourier transform of the impulsive-sampled signal is (obtained again as 2π1X∗P)
Xp(jω)=Ts1n=−∞∑+∞X(j(ω−nωs)).
The situation is now even simpler: a triangle of height A at the origin becomes a train of identical triangles of height TsA centred at nωs. Through an ideal low-pass filter with gain Ts we recover the original signal x(t), provided that ωc is chosen properly.
Perfect reconstruction chain
x(t)→⊗(p(t)=n∑δ(t−nTs))→xp(t)→ILPF, gain Ts→xr(t),xr(t)=x(t)∀t∈R.
Assumptions: impulsive sampling (ωs=Ts2π); there exists ωM<+∞ with ωs>2ωM; use of an ideal LP filter with gain Ts. Theoretically perfect reconstruction is possible; in practice it is still impossible because we cannot implement an ideal low-pass filter.
Which cut-off ωc? It must satisfy
ωc>ωM, so as not to lose information about x(t);
ωc<ωs−ωM, to avoid the replicas of X(jω);
that is, ωM<ωc<ωs−ωM.
The Sampling Theorem
Theorem (Sampling theorem, Claude Shannon, 1949). Let x(t)∈R and let x(t) be band-limited (BL). Then x(t) is uniquely determined by its discrete-time samples
Furthermore, x(t) can be recovered exactly from the samples xd(k) using an ideal low-pass filter with gain Ts and cut-off angular frequency ωc such that ωM<ωc<ωs−ωM; e.g. taking ωc=2ωM+(ωs−ωM)=2ωs=2Ts2π=Tsπ.
Comments on the assumptions: "x(t) real" is a mild assumption: it imposes symmetry in the information content, so that X(jω) is Hermitian and negative frequencies do not provide additional information with respect to ω≥0. "Band-limited" is a strong assumption; it means (approximately) that there exists ωM with X(jω)=0 for all ∣ω∣>ωM.
Band, bandwidth, Nyquist frequency
Band of a signal. For x:R→R, the band is the support on R+ of the Fourier transform of x(t):
Bx:={ω∈R+ω≤ωM:=Ω:∣X(jΩ)∣>0supΩ}.
Bandwidth. The length of the band, Bx:=∣Bx∣; for the band defined above Bx=ωM. With fM=2πωM.
Band-limited.x is band-limited if Bx is bounded, namely if ωM=supΩ is finite.
Nyquist frequency.fNya:=2fM=22πωM=πωM. The condition ωs>2ωM is the one on the (angular) Nyquist frequency: the sampling angular frequency must exceed twice the maximum angular frequency.
Reconstruction filter and Shannon interpolation formula
The ideal low-pass reconstruction filter has frequency response H(jω)=Tsrect(2ωcω). Its impulse response: recall that sinc(t)Frect(2πω) and x(at)F∣a∣1X(jaω) for a=0, so that ∣a∣x(at)FX(jaω). With a=πωc,
The sinc functions in the formula behave like infinite-dimensional basis functions.
Remark. Although several unrealistic assumptions were made, the Shannon interpolation formula works correctly if ωs>2ωM, i.e. Ts2π>2Bx, i.e. Ts<Bxπ. Namely, if 0<Ts<Bxπ with Bx<+∞, then xr(t)=x(t) for all t∈R. (The notes add that the exact computation of the infinite sum is another matter.)
Analytic interpretation
Each term of the sum is a sinc centred at nTs and scaled by the sample x(nTs). The peak of the second replica (shifted by Ts) coincides with the zero of the first one, and so on: at each sampling instant kTs only one sinc is non-zero, so xr(kTs)=x(kTs), and between the samples the sum of all the scaled and shifted sincs interpolates the signal (sketch: first replica scaled by x(0), second by x(Ts), third by x(2Ts); the sum is the curve xr(t)=x(t)).
Proof of the sampling theorem in the frequency domain
Plan: (1) obtain the Fourier series of Xp(jω); (2) find x(t) using the inverse Fourier transform x(t)=2π1∫−∞+∞X(jω)ejωtdω.
Notice that Xp(jω)=Ts1X(jω) for all ω∈[−ωM,ωM].
Step 1.Xp(jω) is ωs-periodic with ωs=Ts2π (ω∈R). Its Fourier coefficient μn is
No overlap of replicas iff ωs>2ωM. Then an ideal LP with gain Ts and ωM<ωc<ωs−ωM (e.g. ωc=2ωs=Tsπ) gives xr=x.
Shannon theorem (1949): x real and band-limited (X=0 for ∣ω∣>ωM) is uniquely determined by x(kTs) if ωs>2ωM, i.e. 0<Ts<Bxπ. Band Bx, bandwidth Bx=ωM, fM=2πωM, Nyquist fNya=2fM=πωM.
Shannon interpolation: xr(t)=∑nx(nTs)sinc(Tst−nTs), sinc(t)=πtsinπt. Each sinc peaks at its own sample and is zero at all the other sampling instants.
Proof: Xp is ωs-periodic; its Fourier coefficients are μn=x(−nTs); then invert with the IFT on [−2ωs,2ωs], integral =2t−nTssin(2ωs(t−nTs)).
Orthogonality: ⟨sinc(Tst−nTs),sinc(Tst−mTs)⟩=Ts if n=m, 0 otherwise (via Parseval and F[sinc(Tt−nT)]=Te−jnTωrect(2πωT)).
Typical mistakes: strict inequality ωs>2ωM (equality is not enough in general); forgetting the gain Ts of the reconstruction filter; confusing ωs (rad/s) with the sampling frequency in Hz; assuming real signals are band-limited.