Experiment-10: Sampling: Signals and Systems Lab (EC2P002)
Experiment-10: Sampling: Signals and Systems Lab (EC2P002)
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 1/6
Agenda of the Experiment
2. Aliasing
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 2/6
Impulse Train Sampling and Reconstruction via Ideal Low-Pass Filtering
Consider a bandlimited signal x(t) with maximum frequency content ωm , and its
sampled values x(nT ), −∞ ≤ n ≤ ∞, where ωs = 2π/T is the sampling frequency. In
class we learnt that if ωs > 2ωm , then x(t) can be accurately reconstructed from its
samples via
∞
X ωc T sin(ωc (t − nT ))
xr (t) = x(nT )
n=−∞
π ωc (t − nT )
1. Write a function reconstruct() that takes the following inputs: the samples of x(t),
the sampling interval T , the LPF cutoff ωc , a vector containing the values of n for
which the x(nT ) are obtained, and a vector t. For each element in t, the function
should output xr (t) using the reconstruction formula given above.
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 3/6
Sampling and Reconstructing a Sinusoidal Signal
1. Write a function sampled cosine(), whose input is a vector containing the values of
n and the sampling interval T . The output is the sequence of samples x(nT ),
where x(t) = cos(2πt).
2. Use this function to obtain samples of x(t) over the range −6s ≤ t ≤ 6s with a
sampling frequency ωs = 5π. Thus, the sampling interval is T = 2π/ωs = 0.4s.
4. Plot x(t) and xr (t) against t on the same graph. Do they match? If so, your
reconstruction is working. (I.e., despite having samples only at intervals of 0.4s,
we are able to correctly determine the value of x(t) for a set of t values that are
much more closely spaced.)
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 4/6
Aliasing
2. Now decrease ωs to 3π and compare x(t) and xr (t). Are they the same?
3. With ωs = 3π, the signal xr (t) should also be a sinusoid, but of a different
frequency than x(t). From the graph, determine the angular frequency ω ′ of xr (t).
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 5/6
Sampling a Non-Bandlimited Signals
1. Write a function sampled rect(), whose input is a vector containing the values of n
and the sampling interval T . The output is the sequence of samples x(nT ), where
(
1, 1 ≤ t ≤ 2
x(t) =
0, otherwise.
3. Using the same procedure as outlined in the previous exercises, sample x(t) over
the range 0 ≤ t ≤ 3 with sampling frequencies ωs = 2π/T for T = 0.03, T = 0.01,
and T = 0.005.
4. In each case, compare x(t) and xr (t) by plotting them against t, where
t = 0 : 0.001 : 3.
Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 6/6