Sampling
Sampling
APPARATUS:
Sampling and reconstruction kit
Patch chords
Cathode ray oscilloscope
MATLAB
OBJECTIVES:
To demonstrate the time domain sampling of band limited signal.
To demonstrate the signal reconstruction.
To demonstrate the sampling in frequency domain.
THEORY:
SAMPLING:
The sampling process is a process of converting a continuous time signal to an equivalent
discrete time signal. An analog continuous time signal g(t) is applied at the input of
multiplier. The other input of multiplier is train of pulses. This signal is called as Sampling
Function and denoted by s(t).The output of multiplier is Sampled Signal.
Figure 6.1
RECONSTRUCTION:
A continuous time signal can be processed by processing its samples through a discrete time
system. But we have to reconstruct original signal from discrete signal. This process is known
as reconstruction. For reconstruction process, we use a filter. When sampled signal is passed
through the filter, input signal should be sampled at a sufficient rate that is determined by
sampling theorem.
UNDERSAMPLING
PROCEDURE:
Figure 6.2
Figure 6.3
OBSERVATIONS:
Sampling rate must be greater than twice of the bandwidth of signal g(t) for proper
reconstruction of input signal without any error.
By the process of sampling, continuous time signal is converted into a discrete time domain
signal. And by the process of reconstruction, it is reconstructed back into continuous time
domain signal.
PRECAUTIONS:
Make all the connection properly.
Take CRO observation carefully.
MATLAB Code:
clc;
clear all;
t = 0:0.001:1;
fm = input('Enter the modulating signal frequency = ');
x = sawtooth(2*pi*fm*t);
subplot(4,2,1);
plot(t,x,'black');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Message Signal');
fs1 = input('Enter Sampling Frequency < Modulating Signal Frequency = ');
fs2 = input('Enter Sampling Frequency = Modulating Signal Frequency = ');
fs3 = input('Enter Sampling Frequency > Modulating Signal Frequency = ');
%Sampling at fs<<2fm
n = 0:1/fs1:1;
x1 = sawtooth(2*pi*fm*n);
subplot(4,2,2);
stem(n,x1,'green');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Undersampledfs<<2fm Signal');
subplot(4,2,3);
plot(n,x1,'green');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Reconstructed Undersampledfs<<2fm Signal');
%Sampling at fs=2fm
n = 0:1/fs2:1;
x2 = sawtooth(2*pi*fm*n);
subplot(4,2,4);
stem(n,x2,'red');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Sampled at Nyquist Rate fs=2fm Signal');
subplot(4,2,5);
plot(n,x2,'red');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Reconstructed Nyquist Rate fs=2fm Signal');
%Sampling at fs>>2fm
n = 0:1/fs3:1;
x3 = sawtooth(2*pi*fm*n);
subplot(4,2,6);
stem(n,x3,'blue');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Oversampled fs>>2fm Signal');
subplot(4,2,7);
plot(n,x3,'black');
xlabel('Time ----->');
ylabel('Amplitude ----->');
title('Reconstructed Oversampled fs>>2fm Signal');
Output:
Enter the modulating signal frequency = 15 kHz
Enter Sampling Frequency < Modulating Signal Frequency = 10 kHz
Enter Sampling Frequency = Modulating Signal Frequency = 30 kHz
Enter Sampling Frequency > Modulating Signal Frequency = 500 kHz
Output Waveforms:
Figure 6.4
RESULT:
Sampling and reconstruction of signal has been verified