1 / 20

Programming Assignment presentation

Programming Assignment presentation. By AbdulRahman AlKhayyat Muhammad Felimban. Encoding Techniques. NRZL NRZL AMI PSEUDO MANCH DIFMANCH. NRZL - NRZI. NRZL : 0  ‘+’ pulse 1  ‘-’ pulse NRZI : 0  same pulse 1  change pulse. AMI - PSEUDO. AMI : 0  0 pulse 1  alternate ‘+’ & ‘-’

media
Télécharger la présentation

Programming Assignment presentation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming Assignment presentation ByAbdulRahman AlKhayyatMuhammad Felimban

  2. Encoding Techniques • NRZL • NRZL • AMI • PSEUDO • MANCH • DIFMANCH

  3. NRZL - NRZI • NRZL :0  ‘+’ pulse1  ‘-’ pulse • NRZI :0  same pulse1  change pulse

  4. AMI - PSEUDO • AMI :0  0 pulse1  alternate ‘+’ & ‘-’ • PSEUDO :0  alternate ‘+’ & ‘-’ • 1  0 pulse

  5. MANCH - DIFMANCH • MANCH :0  ‘+’ to ‘-’1  ‘-’ to ‘+’ • DIFMANCH :0  ‘+’ to ‘-’ with last pulse ‘-’1  ‘-’ to ‘+’ with last pulse ‘-’ • 0  ‘-’ to ‘+’ with last pulse ‘+’ 1  ‘+’ to ‘-’ with last pulse ‘+’

  6. Programming Tool MATLAB for 1st time :- Matrix Laboratory- Powerful with matrixoperations- Ability of graphical representation

  7. MATLAB Interface

  8. MATLAB tools Code Editor

  9. MATLAB tools • Algorithm and development • Math and computation • Data acquisition • Modeling and simulating • Data analysis • Scientific and engineering graphics • Application development Library contains :

  10. program codes

  11. program codes • Get the binary bits from a file • Encode by proper encoding scheme • NRZL,NRZI, AMI and PSEUDO :straight forward representing of 0 or pulse, with a consideration of last pulse

  12. program codes • For MANCH and DIFMANCH, more techniques are used • Saving every bit as a 2-bits (01 or 10) in a new file, depending on the last pulse • Then read from the new file, and simply represent the data as before in previous schemes

  13. program codes • Before drawing the bits, we need to divide the Tb by 2 to make every 2-bits represent one bit in our graphNeed more explain ?

  14. More explain

  15. Graphing concepts • We are making 2 arrays, one for the time and one for the value representing the bit • Then by making a loop to take the values of every bit and storing it in the values array, and so on with the time array

  16. Generating the graphs For NRZL :clear all load here.txt x = here; InputSize = length(x);

  17. Generating the graphs % Generating the NRZL : t=[];u=[]; periode= 1; for i = 1 : InputSize tt = (i-1)*periode:1: (i)*periode; if x(i) == 1 uu= zeros(size(tt)); else uu = ones(size(tt)); end t=[t tt]; u=[u uu]; end plot(t,u), axis([0 length(x) -2 2]) grid xlabel('t(s)') ylabel('u(t)') title('NRZL')

  18. MANCH GRAPH For MANCH : clear all load here.txt x = here; InputSize = length(x);

  19. MANCH GRAPH % Generating the MANCH : counter = 1; for i = 1 : InputSize if x(i) == 1 y(counter) = '1'; fid = fopen('MANCH.txt','w'); fprintf(fid,'%c \n',y); fclose(fid) y(counter+1) = '0'; fid = fopen('MANCH.txt','w'); fprintf(fid,'%c \n',y); counter = counter + 2; else y(counter) = '0'; fid = fopen('MANCH.txt','w'); fprintf(fid,'%c \n',y); fclose(fid) y(counter+1) = '1'; fid = fopen('MANCH.txt','w'); fprintf(fid,'%c \n',y); counter = counter + 2; end fclose(fid) end clear all load MANCH.txt x = MANCH; InputSize = length(x); t=[];u=[]; periode= 1; for i = 1 : InputSize tt = (i-1)*periode:1: (i)*periode; if x(i) == 1 uu = zeros(size(tt)); else uu = ones(size(tt)); end t=[t tt]; u=[u uu]; end plot(t/2,u), axis([0 length(x)/2 -2 2]) grid xlabel('t(s)') ylabel('u(t)') title('MANCH')

  20. Hope you enjoy our programming AlKhyyat & Filemban

More Related