Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Experiment No: 02

Experiment Name: Understand Nyquist Sampling Rate Theorem and optimum sampling.
Objective:
1. To understand the concept of the Nyquist frequency and its relationship to the sampling
rate.
2. To explore the concept of optimum sampling and its implications for accurate signal
reconstruction.

Theory:
The Nyquist Theorem states that in order to adequately reproduce a signal it should be periodically
sampled at a rate that is 2X the highest frequency of the signal.

A High Sampling Rate = much greater than 2X the highest frequency. This is 'Oversampling' that,
while not "bad" will take time and create a large digital file.
Nyquist Sampling Rate = The minimum sample rate that
captures the "essence" of the analog information. Note that
while Nyquist is appropriate for sampling, it may not capture
nuances in information. But, of course, those nuances are higher
frequency, and thus would require a higher Nyquist sample rate.
Undersampled: low sampling rate produces results that report false information about the analog data;
which does not represent the original. This phenomenon is called aliasing.

Aliasing: Aliasing does not occur if 2f < 1/T; that is, the sampling rate is greater than twice the frequency of
a desired information.
Example -1:
Sampling the Sinusoidal Signal: x(t)=5 sin(2π53t)
Code:
clc; close all; clear all;
t=0:0.0005:.2; xa=5*sin(2*pi*53*t);
subplot(3,3,1), plot(t,xa);
title('Analog Signal');
F=[10 20 33 60 100 150 400 700];
for i=1:8
Fs=F(i); j=1;
for p=1:round((length(t)-1)/((max(t)-min(t))*Fs)):length(xa) xs(j)=xa(p);
Ts(j)=t(p);
j=j+1;
end
subplot(3,3,i+1), stem(Ts,xs);
title (['Sampled Frequency: ', num2str(F(i)),'Hz']);
end
Output:
Example – 2:
Sampling and Reconstructing the Signal: x(t)=sin(2π10t)+ sin(2π50t)+ sin(2π100t)

Code:
clc; close all; clear all;
t=0:.001:.1;
y=sin(2*pi*10*t)+sin(2*pi*50*t)+sin(2*pi*100*t);
subplot (3,3,1), plot (t,y)
title('Analog Signal')
F=[100 200 350 400 550 700 780 950];
for z=1:8
Fs=F(z); i=1;
for j=1:round((length(t)-1)/((max(t)-min(t))*Fs)):length(t) ts(i)=t(j);
ys(i)=y(j);
i=i+1;
end
for j=1:length(t)
yr(j)=interp1(ts,ys,t(j));
end
subplot (3,3,z+1), stem(t,yr)
title (['Sampled Frequency: ',num2str(F(z)),'Hz']);
end
Output:

Conclusion:
In conclusion, the Nyquist Sampling Rate Theorem states that in order to accurately represent a
signal, the sampling rate should be at least twice the highest frequency component of the signal.
Optimum sampling occurs when the sampling rate is precisely twice the highest frequency,
ensuring faithful reproduction of the original signal without introducing distortion or aliasing
artifacts.

You might also like