Showing posts with label channel impairments on signal. signal disturb. Show all posts
Showing posts with label channel impairments on signal. signal disturb. Show all posts

Thursday 27 March 2014

Effect of Channel impairments on a signal

hi friend my this article is all about Matlab ,which was originally a task given by our teacher in data communication lab and we perform as a team member in class room , at university of engineering a technology, i am sharing with you this task , and will share all other task as soon as we perform it.

Objectives:

How to generate a simple signal in Matlab
Effect of thermal noise on the generate signal
Effect of delay distortion on a signal
Effect of attenuation on a signal

Apparatus:

        Matlab (preferably any version)

Procedure:

       To implement the given objectives on Matlab, by simply type the specific codes in the command window of the Matlab as directed and plot them. Following are the codes and Simulation obtained via Matlab.

To generate a simple signal in a Matlab

Code:

For Cos
clc
clear
t=0:pi/12:6*pi;
x=cos(t);

Simulation:









For Sine
Code:

t=0:pi/12:6*pi;
x=sin(t);
plot(t,x)

Simulation:


For Square
Code:
t=0:.0001:.0625;
x=square(2*pi*30*t);
plot(t,x)

Simulation:

Effect of thermal noise on the generated signal
Code:

              t = 0:.1:10;
              x = sawtooth(t);
              y = awgn(x,10,'measured');
              plot(t,x,t,y);
              legend('Original signal','Signal with AWGN');

              Simulation:

      For square

      Code:

        t=0:.0001:.0625;
        x=square(2*pi*30*t);
        y=awgn(x,10);
        xlabel('time(sec)');
        ylabel('amplitude(a)');
        Legend ('original signal');
        Plot(t,y)
       Simulation:
   

Effect of delay distortion on a signal


Code:
For sine

t=0:0.01:1;
f1=1;
f2=2;
x1=sin(2*pi*f*t);
x2=sin((2*pi*f*t)+40);
x3=x1+x2;
plot(t,x3,t,x1,t,x2);

Simulation:


     

For Cos
Code:

t=0:0.01:1;
f1=1;
f2=2;
x1=cos(2*pi*f*t);
x2=cos((2*pi*f*t)+40);
x3=x1+x2;
plot(t,x3,t,x1,t,x2)

Simulation:
 


Effect of attenuation on a signal

Code:
t=0:pi/12:6*pi;
x1=sin(t);
E1=cos(x1.*conj(x1));
pin=E1/length(t);
x2=0.3*cos(t);
E2=cos(x2.*conj(x2));
plot=E2/length(t);
L=plot/pin;

             For square:
               Code:

              t=0:pi/12:6*pi;
              x1=square(t);
              E1=square(x1.*conj(x1));
              pin=E1/length(t);
              x2=0.3*square(t); 
              E2=square(x2.*conj(x2));
              plot=E2/length(t);
              L=plot/pin;