Experiment 04 Communication
Experiment 04 Communication
1. fs < 2fm:
Condition: When the sampling frequency fs is less than twice the maximum frequency
component fm in the signal, i.e., fs < 2fm
Implications:
→Aliasing: This condition leads to aliasing, a phenomenon where higher frequency
components "fold" into lower frequency regions, making it impossible to accurately
reconstruct the original signal. Aliasing distorts the signal and introduces errors during
reconstruction.
→Under sampling: This situation is referred to as under sampling, and it violates the
Nyquist theorem. It is crucial to avoid this condition when sampling signals to ensure
accurate reconstruction.
2. fs = 2fm
Condition: When the sampling frequency fs is exactly equal to twice the maximum
frequency component fm in the signal, i.e., fs = 2fm.
Implications:
→Nyquist Rate: This represents the Nyquist rate, the minimum sampling rate required to
theoretically reconstruct the signal without aliasing or loss of information.
→Ideal Sampling: At this rate, the signal can be perfectly sampled without any loss of
information, assuming the signal is band-limited and the ideal reconstruction method is
used.
3. fs > 2fm
Condition: When the sampling frequency fs exceeds twice the maximum frequency
component fm in the signal, i.e., fs > 2fm
Implications:
→Over-Sampling: This condition represents over-sampling, where the sampling rate is
higher than necessary to satisfy the Nyquist criterion.
→Redundant Information: While over-sampling doesn't harm the reconstruction process,
it results in redundant information, potentially increasing computational load and data
storage requirements.
Algorithm:
1. Initialize variables: Define the frequencies f1 and f2, the time vector t, and the
original signal x as a sum of two cosine signals.
2. Plot the original signal: Create Figure 1 and plot the original signal x against time t.
3. Case 1: (fs < 2fm)
o Define the sampling frequency fs1 and calculate the sampling period ts1.
o Generate the sampled signal xs1 by sampling the original signal using fs1.
o Create Figure 2, stem plot xs1 against the sampled time vector n1, and overlay it
with the original signal.
o Add a legend indicating "fs<2fm."
4. Case 2: (fs = 2fm)
o Repeat steps similar to Case 1, but for a sampling frequency fs2 equal to 2*f2.
o Create Figure 3, stem plot xs2 against the sampled time vector n2, and overlay it
with the original signal.
o Add a legend indicating "fs=2fm."
5. Case 3: (fs > 2fm)
o Repeat steps similar to Case 1, but for a higher sampling frequency fs3 equal to
7*f2.
o Create Figure 4, stem plot xs3 against the sampled time vector n3, and overlay it
with the original signal.
o Add a legend indicating "fs>2fm."
6. Display all plots: All three cases of sampled signals are now displayed alongside the
original signal for visual comparison.
MATLAB Code:
%% SAMPLING
clc;
clear all;
close all;
f1 = 3;
f2 = 23;
t = -0.4:0.0001:0.4;
x = cos(2*pi*f1*t) + cos(2*pi*f2*t);
figure(1);
plot(t,x,'-.r');
xlabel('Time----->');
ylabel('Amplitude');
title('Original Signal');
Result: Thus we have studied the Verification of the Sampling Theorem and also observe its
waveforms for the three conditions i.e. fs < 2fm, fs = 2fm and fs > 2fm.