0% found this document useful (0 votes)
8 views6 pages

Experiment-10: Sampling: Signals and Systems Lab (EC2P002)

Uploaded by

23cs01063
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

Experiment-10: Sampling: Signals and Systems Lab (EC2P002)

Uploaded by

23cs01063
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Experiment–10: Sampling

Signals and Systems Lab (EC2P002)


School of Electrical and Computer Sciences
IIT Bhubaneswar
Autumn Semester 2024

Signals and Systems Lab (EC2P002) School of Electrical Sciences, IIT Bhubaneswar 1/6
Agenda of the Experiment

In this session, we will learn about:

1. Sampling and reconstruction

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 )

where ωm ≤ ωc ≤ ωs − ωm . Recall that this corresponds to passing an impulse train


scaled by samples of x(t) through an ideal LPF with cutoff ωc .

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.

[Note: Everything in this experiment can be performed using discrete-time


computations; that is, no need to use symbolic calculations.]

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.

3. Use the reconstruct() function to obtain xr (t) for t = −6 : 0.001 : 6. Use


ωc = ωs /2.

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

1. Keeping everything else the same as in the previous experiment, increase ωs to


6π and 8π and compare x(t) and xr (t).

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).

4. Notice that we are sampling a signal x(t) having frequency ωm = 2π at sampling


frequency ωs = 3π < 2ωm . Thus, aliasing has occurred and xr (t) is no longer a
correct replica of x(t). Using theory discussed in class, compute the frequency of
the aliased component that you would expect to see at the output of the ideal LPF.
Is your result consistent with the frequency ω ′ computed in the previous step?

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.

2. What is the Nyquist rate for x(t)? Justify your answer.

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

You might also like