0% found this document useful (0 votes)
50 views

Experiment 4 Sampling and Reconstruction of Continuous Time Signals Interpolation and Decimation

The document describes experiments on sampling and reconstructing continuous-time signals. It discusses sampling theory, the effects of sampling including aliasing, and explores various methods for sampling and reconstruction including using sample and hold circuits, pulse generators, and interpolation/decimation. The experiments analyze how changing the sampling rate and method affects the frequency spectrum and reconstruction of the original signal. Plots and simulations are presented to illustrate the concepts and compare different sampling and reconstruction configurations.

Uploaded by

Gp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Experiment 4 Sampling and Reconstruction of Continuous Time Signals Interpolation and Decimation

The document describes experiments on sampling and reconstructing continuous-time signals. It discusses sampling theory, the effects of sampling including aliasing, and explores various methods for sampling and reconstruction including using sample and hold circuits, pulse generators, and interpolation/decimation. The experiments analyze how changing the sampling rate and method affects the frequency spectrum and reconstruction of the original signal. Plots and simulations are presented to illustrate the concepts and compare different sampling and reconstruction configurations.

Uploaded by

Gp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Experiment 4 - Sampling and Reconstruction of

Continuous-Time Signals, Interpolation and


Decimation
Puvvala Geethika - 20EE10056
October 2022

1
1 Introduction
It is often desired to analyze and process continuous-time signals using a com-
puter. However, in order to process a continuous-time signal, it must first be
digitized. This means that the continuous-time signal must be sampled and
quantized, forming a digital signal that can be stored in a computer. Analog
systems can be converted to their discrete-time counterparts, and these digi-
tal systems then process discrete-time signals to produce discrete-time outputs.
The digital output can then be converted back to an analog signal, or recon-
structed, through a digital-to-analog converter. Figure 1 illustrates an example,
containing the three general components described above: a sampling system,
a digital signal processor, and a reconstruction system.When designing such
a system, it is essential to understand the effects of the sampling and recon-
struction processes. Sampling and reconstruction may lead to different types of
distortion, including low-pass filtering, aliasing, and quantization. The system
designer must insure that these distortions are below acceptable levels, or are
compensated through additional processing.

2 Overview of Sampling
2.1 Theory :
Sampling is simply the process of measuring the value of a continuous-time signal
at certain instants of time. Typically, these measurements are uniformly sep-
arated by the sampling period, Ts. . If x(t) is the input signal, then the sampled
signal, y[n] is as follows: y[n] = x(t) at t = nTs

What sampling period, Ts , is required to accurately represent the signal x(t)?


To answer this question, we need to look at the frequency domain represen-
tations of y[n] and x(t). Since y[n] is a discrete-time signal, we represent its
frequency content with the discrete-time Fourier transform (DTFT), Y( ej w
). However, x(t) is a continuous-time signal, requiring the use of the continuous-
time Fourier transform (CTFT), denoted as X(f).
If X(f ) has frequency components that are above 1⁄2Ts , the rep-
etition in frequency will cause these components to overlap with (i.e.
add to) the components below 1⁄2Ts . This causes an unrecoverable

2
distortion, known as aliasing, that will prevent a perfect reconstruc-
tion of X(f ). The 1⁄2Ts “cutoff frequency” is known as the Nyquist
frequency.
To prevent aliasing, most sampling systems first low pass filter the incoming
signal to ensure that its frequency content is below the Nyquist frequency.

3 Sampling and Reconstruction using Sample


and Hold
3.1 Theory :
The combined effect of sampling and D/A conversion may be thought of as a sin-
gle sample-and-hold device. The sample-and-hold process distorts the frequency
spectrum of the reconstructed signal.
Figure 2 illustrates a system with a low-pass input filter, a sample-and-hold
device, and a low-pass output filter. If there were no sampling, this system
would simply be two analog filters in cascade. We know the frequency response
for this simpler system. Any differences between this and the frequency response
for the entire system is a result of the sampling and reconstruction.

The magnitude of the frequency response of the N-th order Butterworth fil-
ter is given by
—Hb(f)— = 1/(1+(f/fc)N )
T hecompletemagnituderesponseof thesample−and−holdsystembycombiningtheef f ectsof Butterworthf ilter
|H(f )| = (1/(1 + (f /f c)N ))|sinc(f /f s)|

3
3.2 Results:
PART 1 - A

3.2.1 Plot1:

3.2.2 Code1:

4
PART 1 - B

3.2.3 Plot2:

3.2.4 Code2:

5
3.3 Discussion:
In Part1 - B it just seems like fundamental component of square wave whereas
in the Part1-A it seems like a square wave . As the no.of samples increases then
it becomes more like a square wave and the aliasing might increase then it will
be hard to reconstruct the analog signal .
The magnitude response of the complete system has its peak at its origin
and gradually reduces to zero after a distance of 0.6 units from origin.
In the case of high-quality CD Player , we can assume that the sample and
hold system circuit takes sample of its input signal and it will hold these samples
in its output for some period of time.The samples are taken at a uniform time
intervals that means the sampling rate of the circuit can be determined . To
make it precise and high quality , we can increase the sampling rate fs, to prevent
loss of the signal or aliasing effect occuring due to incorrect set of sampling rate
. If the sampling rate is too low, the Nyquist-Shannon sampling theorem is not
observed and thus the measurement signal is not acuquired correctly.

6
4 Sampling and Reconstruction with an Impulse
Generator
4.1 Theory :
In this section, we will experiment with the sampling and reconstruction of
signals using a pulse generator. This pulse generator is the combination of an
ideal impulse generator and a perfect zero-order-hold device

4.2 Simulink Diagram:

4.2.1 Results:
Pulse Width = 0.3 Input/Output Plots :

The parts which are circled are aliased parts

7
Plot of Output Signal and its frequency spectrum :

The circled part is aliased part


Pulse Width = 0.1
Output frequency Spectrum Plot :

Output and Input Signals :

8
Discussion:
In the case of Pulse width = 0.3 it’s closer in some sense to zero order hold
as most of the energy is where it should be that is at 0.1Hz . But, when we
reduce the pulse width to 0.1 we are basically making the sinc function wider
which is causing more aliasing . So, these aliased components carry more energy
now.The total energy is same.

9
Plot of Output Signal and its frequency Spectrum :

Discussion:
The fundamental component of frequency is at 0.1Hz . It is sampled below the
Nyquist frequency . The no.of samples are less and the aliased component has
as much energy as fundamental and all sense of the original signal is lost .The
aliased has more energy .

10
Simulink diagram :

Plot of Input and Output Signals :

11
Plot of Output Signal and its frequency Spectrum :

Discussion :
As Butterworth filter is a Band limited filter . So it filters out the path perfectly
without aliasing . So,we get perfect sine wave

12
4.3 Sampling and Reconstruction with Sample and Hold
4.3.1 Theory :
In this section, we will sample a continuous-time signal using a sample-and-hold
and then reconstruct it. We already know that a sample-and-hold followed by
a low-pass filter does not result in perfect reconstruction. This is because a
sample-and-hold acts like a pulse generator with a pulse duration of one sam-
pling period. This “pulse shape” of the sample-and-hold is what distorts the
frequency spectrum

4.4 Simulink Diagram :

13
4.5 Results :
Plots :
PART 1 :
Plot of Magnitude Response,Phase Response and Impulse Response
:

14
4.6 Simulink diagram :

4.7 Results :
Plots :
Plot of Magnitude Response,Phase Response and Impulse Response :

15
4.8 Discrete Time Interpolation :
4.8.1 Simulink diagram :

4.8.2 Results :
Plots :
PART 1 :

The circled part is aliased part

16
Scope Plot :

PART 2 :

The circled part is aliased part

17
Scope :

5 Discrete Time Decimation


5.1 Theory :
In the previous section, we used interpolation to increase the sampling rate of a
discretetime signal. However, we often have the opposite problem in which the
desired sampling rate is lower than the sampling rate of the available data. In
this case, we must use a process called decimation to reduce the sampling rate
of the signal.

18
5.2 MATLAB CODE:

5.3 Discussion :
We compared the magnitude response of the system with and without of the
sample and hold circuit . Then, we reconstructed the signal with the help
of impulse generator , then by using sample and hold and finally with the
interpolation method.Finally, we observe the change in the sampling rate of the
signal and its impact on the system.

19

You might also like