How To Find The Right ANALYSIS OF SAMPLING THEOREM & ALIASING EFFECT For Your Specific

In This Blog, I'll Talk About The Sampling Theorem And Also Show You How To Use Several Matlab Programmes And Questions...

ANALYSIS OF SAMPLING THEOREM & ALIASING EFFECT


Objectives:

·         Simulate and plot two CT signals of 10 Hz and 110 Hz for 0 < t < 0.2 seconds.

·         Sample at Fs = 100 Hz and plot them in discrete form.

·         Observe and note the aliasing effects

Apparatus:

·         Hardware Requirement

·         Personal computer.

·         Software Requirement

·         MATLAB.

Background:

Sampling

Sampling is a technique to convert Continuous Time or Analogue signal into Discrete Time or Digital signal. Sampling Frequency (Fs) should be greater than or twice the Sampled signal (Fmax).Fs ≥ 2Fmax




Figure 1. Sampled frquency

Aliasing

Aliasing refers to the effect produced when a signal is imperfectly reconstructed from the original signal. Aliasing occurs when a signal is not sampled at a high enough frequency to create an accurate representation. This effect is shown in the following example of a sinusoidal function



Figure 2. Reconstruction of signal

In this example, the dots represent the sampled data and the curve represents the original signal. Because there are too few sampled data points, the resulting pattern produced by the sampled data is a poor representation of the original. Aliasing is relevant in fields associated with signal processing, such as digital audio, digital photography, and computer graphics.

 

Quantization

 

The process of digitizing the time domain is called sampling and the process of digitizing the range (i.e. amplitude) is called quantization.






Figure 3. Quantization of signal

 

Plot: PLOT(X, Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever lines up. If X is a scalar and Y is a vector, length(Y) disconnected points are plotted. Various line types, plot symbols, and colors may be obtained with PLOT(X,Y, S) where S is a character string made from one element from any or all of the following 3 columns:





Figure 4. Descriotion of MATLAB graph attributes

For example, PLOT(X, Y, 'c+:') plots a cyan dotted line with a plus at each data point.

Here This Question And Also Attach Final output 

Q1 Edit the above given task and observe the sampled plots for a) Fs=4 and b) Fs=30

 

clear all;

close all;

clc;

F1 = 1;

Fs = 4/30;

t = [0 : 0.0005 : 3];

x1t = cos(2*pi*F1*t);

plot(t,x1t, 'LineWidth',2);

grid on;

title('CT sinusoid plotted');

Ts = 1/Fs;

nTs = [0 : Ts : 3];

x1n = cos(2*pi*F1*nTs);

figure

stem(nTs,x1n,'LineWidth',2);

grid on;

title('Sampled signal');

 

For Fs=4

 


 



 

 

For Fs=30


 


 

Q2  Consider the following CT signals:

x1(t) = sin (2 pi F1 t) and

x2(t) = sin (2 pi F2 t)

 

 

clear all;

close all;

clc;

F1 = 2;

F2 = 6;

Fs = 5;

t = [0 : 0.0005 : 1];

x1t = sin (2*pi*F1*t);

x2t = sin (2*pi*F2*t);

figure,

plot(t,x1t,t,x2t, 'LineWidth',2);

xlabel('cont time (sec)');

ylabel('Amp');

xlim([0 1]);

grid on;

legend('2Hz','6Hz');

title('Two CT sinusoids plotted');



 

Q2 Plot the above signals for F1 =30 Hz, F2=120 Hz. Also plot the sampled signals in discrete form for Fs=60 and 160 Hz respectively for 0 < t < 0.3 seconds. Sampling interval Ts=1/Fs.

 

 

clear all;

close all;

clc;

F1 = 30;

F2 = 120;

Fs = 60/160;

t = [0 : 0.3];

x1t = cos(2*pi*F1*t);

x2t = cos(2*pi*F2*t);

Ts = 1/Fs;

nTs = [0 : Ts : 1];

x1n = cos(2*pi*F1*nTs);

x2n = cos(2*pi*F2*nTs);

plot(t,x1t, 'LineWidth',2);

hold on

stem(nTs,x1n,'LineWidth',2);

legend('original','sampled');

grid on;

title('2Hz original and sampled');

xlabel('discrete time (sec)');

ylabel('Amp');

xlim([0 1]);

figure

plot(t,x2t, 'LineWidth',2);

hold on

stem(nTs,x2n,'LineWidth',2);

legend('original','sampled');

grid on;

title('6Hz sampled original and sampled')

xlabel('discrete time (sec)');

ylabel('Amp');

xlim([0 1]);

 

For 60Hz

 

    


 


For 160



 



 All Output Are Here Check It With Different Sampling Frequency That Are Effected For You And Also I Hope You Clear All Question Regarding Digital  Signal Sampling (DSP) 

Thank You!!

Post a Comment

0 Comments