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;
               

Wednesday 26 March 2014

Simulation of Line coding schemes in Matlab


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 

To generate unipolar Non-return-to-zero (NRZ) signal.
To generate unipolar signal with two different polarities 0v and 1v.
To generate Bipolar Alternate Mark Inversion (AMI) signal.
To plot pseudoternary signal.

Software:

Matlab (any suitable version)

Introduction:

Line Coding:

Binary data can be transmitted using a number of different types of pulses. The choice of a particular pair of pulses to represent the symbols 1 and 0 is called Line Coding.
Types of Line Coding:

Unipolar Signal:

            Unipolar signal (also called on-off keying, OOK) is the type of line coding in which one binary symbol (representing a 0 for example) is represented by the absence of a pulse (i.e. a SPACE) and the other binary symbol (denoting a 1) is represented by the presence of a pulse (i.e. a MARK).
            There are two common variations of unipolar signal: Non-Return to Zero (NRZ) and Return to Zero (RZ).

Non-return to zero (NRZ):

             In unipolar NRZ the duration of the MARK pulse (Ƭ) is equal to the duration (To) of the symbol slot shown in the figure. It Provide simplicity in implementation, also it does not require a lot of bandwidth for transmission.

          1         0          1           0        1          1          1           1             1       0
      

Return to Zero (RZ):

            In unipolar RZ the duration of the MARK pulse (Ƭ) is less than the duration (To) of the symbol slot as shown in figure. Typically RZ pulses fill only the first half of the time slot, returning to zero for the second half. It provide Presence of a spectral line at symbol rate which can be used as symbol timing clock signal.
  (To)
                     1           0         1           0        1          1          1         0       0        0
   (T)                          1     0         1     0         1       1        0     0    0         0

Polar signal:

           In polar signal a binary 1 is represented by a pulse g1 (t) and a binary 0 by the opposite (or antipodal) pulse g0 (t) = -g1 (t). Polar signal also has NRZ and RZ forms. 


    1            0          1            0            1           1            1          1          1           0

                                    1       0         1        0     1            1             1              1    0

  
                   

                    Polar NRZ and RZ have almost identical spectra to the Unipolar NRZ and RZ.

Bipolar signal:

Bipolar Signalling is also called “alternate mark inversion” (AMI) uses three          voltage levels (+V, 0, -V) to represent two binary symbols. Zeros, as in unipolar, are
Represented by the absence of a pulse and ones (or marks) are represented by
Alternating voltage levels of +V and –V. Like the Unipolar and Polar cases, Bipolar also has NRZ and RZ variations.

  1           0           1         0             1            1           1           1           1       0
                                  1        0        1      0          1        1        1       1        1      0

Pseudoternary signal:

         A pseudoternary signal which is derived from the binary digit signal without change of the line digit rate
NOTE- An alternate mark inversion signal is an example of a pseudoternary signal.


Unipolar NRZ:

Clc
Clear all;
Data=[0 1 1 0 1 0 1];
I=1:7;
J=1.99:7.99;
Time=[ ];
For (k=1:7)
Time=[time i(k) j(k)];
End
a=1;
signal=[ ];
for (t=1:7)
if (data (t)==0)
signal (a:a+1)=0;
else
signal (a:aa+1)=1;

End
a=a+2;
end
figure (1);
plot(time, signal' line width' 2);
title ('digital signal ')
xlable (''time(t) ')
ylabe ('Amplitude (A)')
axis ( [1 8 -0.5 5])



Task 01:
Write Matlab code that generates unipolar signal with following polarities.
0V for binary – 0
-1V for binary -1


NRZ –L
Data=[1 0 0 0  1 1 0 1];
I= 1; length (data);
J=1.99: length (data) + 0.99;
Time= 
% generating signal
Signal= [ ];
N= length (data);
a= 1;
for (t= 1:N);
if data (t)== 1);
signal (a:a+1)=1;
else
signal (a:a+1)=-1;
end
a= a+2;
end
plot;(time, signal 'linewidth'.2);
title('NRZ-L');
Xlable('time');
Ylable('Voltage level');

Task 02:

            Plot NRZ-I signal for the following message
            M= [0 1 0 1 1 1 0 1];
            Bipolar-AMI (Alternate Mark Inversion).
            % generating signal
            Signal= [ ];
            N= length (data);
            a= 1;
            pre-bit= 1;
           for (t= 1:N)
           if (data(t)==1 and pre-bit==1)
           signal (a; a+1) =1;
           pre-bit= -1;
           else
           signal (a:a+1)= -1;
           pre-bit= 1;
           end
           a= a+2;
           end.

          Task 03:

          Data= [0 1 1 1 0]; j = 1.99 : 11 + 0.
 time = [ ]
for (k = 1 : length(message
          Write Matlab Program to plot psuedoternary signal
  Psuedo Ternary Encoding
clcmessage = [0 1 1 0 1 1 1 0 0 0 1]   
data = zeros(1,2*length(message)-1          
data (1 : 2 : end) = message
i = (1 : 11)

time =time i(k), j(k)])]   
end
% Generating Signal
signal = [ ]            
n = length(data)
prebit = 1
for t = 1 : 2 : n                  
if (data(t) == 0
signal(t : t+1) = 0
else
if (data(t) == 1 &prebit == 1
signal (t : t+1) = 1

prebit = -1


Sunday 23 March 2014

data sharing between two computers or between two different machine

we can connect two computer and share data between them trough simple cable name Straight-through or  cross-over Cable as shown in the figure , i  connect my own laptop with my friend computer and copy some songs and videos through it , without any USB or some memory card etc this method is a safe method through which i can not only copy data but can also read/write data in the the other machine(laptop) .

BY read i mean i can copy only and not cut it or delete it, by write i mean i can not only copy the data in the guest computer but can also make changes in them, e-g, i can edit ,cut ,copy,delete, etc in them , that is , i can control other computer from the remote , and this is a good way for a hacker to access other computer.

sufyan and hashim laptops connection through cable 


Objectives:

Build a category 6 (cat 6) straight-through cables.
Build a category 6 (cat 6) cross-over cables.
Test both cables.

Tool Required:

Cate-6 network cable
RJ-45 connectors
Cable cutter
Crimping tool
Cable tester

Theory:

        The cables that need to be arranged for networking, two things must be keep in mind whether the systems (machine) are same or not, for such systems combination; following technique are valid to be use and implemented before going for a networking.

Straight-through Cable:

                          Straight through cable is a cable used for networking between any two systems in a condition if both the systems/machines are of the different origin i.e. networking between any computer (MDI) and a hub (MDIX). The cable is centered in between two RJ-45 connectors.  The color chart and technique for the arrangement of the cable is given below.


Cross-over Cable:

                          Cross-over cable is a cable used for networking between two systems in a condition if both the systems/machines are of the same origin i.e. networking between computers (MDI) with another computer (MDI). The cable is centered in between two RJ-45 connectors.  The color chart and technique for the arrangement of the cable is given below.


  

Construction/Procedure:

            Construction of straight-over and cross-over cable can be made through the cable cutter and crimping tool, with the help of rules given below.
First of all remove the insulation from the cable up to 2 inches at both of the end.
Align the cables according to the color chart respectively.
Level up the cable and adjust then inside the RJ-45 connector.
Use the crimping tool accordingly to tighten the cable under the jaws of the connector.
'The above color charts are aimed to assist in the construction of straight-over and cross-over cable respectively'.

Testing:

   Test the cable to ensure that it will function in the field. Miss-wired and incomplete network cables could lead to physical damage of computers system equipment, in order to confirm whether the cable is functioning well or not a simple cable tester can quickly verify that information. A sample of cable tester is shown below:

 
                                 Fig: A simple cable tester.


Creating a Network:

      Creating a network between two computers can enable individuals share different files and a folder which is an easiest and a secured way of transmitting files from one system to another. In order to make a network connection between two different computers the following steps were carried out on the host as well as on the guest computer.
Plug in the cable on both the computers.
Open networking and sharing center>Change Adopter settings>right click on LAN select properties, assign IP. Address to both the computers.
Go to advanced sharing settings, Turn on first three options in HOME and PUBLIC networking.
Remove the user name, Turn off the antivirus software and its firewall.
Ping the laptop using ping IP. Address.
To share a folder in a drive, go to 'share with' option on the task bar at the top, select ' with every one', and enjoy sharing the different files and folders.
Physical Implementation:

Host computer: 

Host Name: sufyan 
IP Address: 192.168.1.101

 


Guest computer:

Guest Name: hashim
IP Addresss: 192.168.1.102
r
assign the value of IP and GATEWAY of both laptops in such away that the IP of one is the GATEWAY of another and GATEWAY of one laptop become the the IP of another.

 




 







Friday 21 March 2014

Australia released satellite images of destroyed Malaysian Air Line objects in Indian Ocean

indian ocean 
indian ocean 

  1. Australia take the image of MH370 from satellite and release it , pieces of destroyed MH370 has been found in indian ocean and send four army jet to view the destroyed pieces  it is found that one pieces is 24 meter and other is 15 meter , for further detail

  2. visithttp://www.dailymotion.com/video/x1ijjl9_australia-releases-satellite-images-of-malaysian-air-line-objects-in-indian-ocean_news

Help me in finding Malaysian Airline Flight MH370 (participate in the Public discussion and share your thoughts and view about it)


dear friends u may hear about missing airline of malaysia MH370 , billion of peoples talking about this all over the world, but i have to inform you that not only this airline but also six other air line disappear in this area , the question  is where the airline disappear , even the fastest technologies is unable to find out this airline, some people says it catch fire and destroy , some says its was hijack and steal, some say it is disappear in the barmoda triangle , and some says at drone in the sea , now a days it is thought that UFO taken it , we are working on this whole tregedy and not only on this air line but six other air line which disappear in 1985, 2009, 1995.  if any one has some ideas about MH370 , share with us so that we get more knowledge and drive a conclusion,
we are waiting for your comments and thoughts,  
for more detail visit these links and share your view with us australia-releases-satellite-images-of-malays-in-indian-ocean_news


Saturday 15 March 2014

Designing of touch switches

hai there , this projects is performed by electrical engineering student in UET peshawar pakistan, at the end of semester , i have a copy of it and this is in png format to study it download each image and study it .














Thursday 13 March 2014

Method of calculating Non-polarized capacitors value

when you are using ceramic non polarize and you do not know its value here is the simplest method of finding out capacitors values in Farad from its number written on each capacitors.
lets explain it in an example
if u have a non polarize capacitor and its marking value written on it is 104 as shown in the figure,

its means that its value of capacitance in Farad(unit) is 
104= 10+4 zeros =10,0000 
that is 104 means that a 10 and four more zeros with it 
so it become 10,0000 which must be in pico farad so 104=100000pF.