1 / 219

COMPSCI 314 S2C Modern Data Communications

COMPSCI 314 S2C Modern Data Communications. Ulrich Speidel ulrich@cs.auckland.ac.nz. A bit about myself. I'm a physicst by training and didn't "become" a computer scientist until my PhD Have taught in this department since 2000

dara-lamb
Télécharger la présentation

COMPSCI 314 S2C Modern Data Communications

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. COMPSCI 314 S2C Modern Data Communications Ulrich Speidel ulrich@cs.auckland.ac.nz

  2. A bit about myself • I'm a physicst by training and didn't "become" a computer scientist until my PhD • Have taught in this department since 2000 • Have been involved in a wide variety of courses ranging from application development, data communication, Internet programming and introductory programming to computer architecture • I'm quite an approachable person & just because I happen to have my office at Tamaki doesn't mean I'm trying to hide from you  COMPSCI 314 S2C 2014 Ulrich Speidel 2

  3. Why I teach this course • My interest in electronic communication started as a teenager – somewhat unusually with an aeronautical radiotelephone operator's certificate at age 16 • I then became interested in amateur radio, obtained a license and was active in Germany, Australia, and later in New Zealand • Became involved quite heavily in packet radio (a kind of amateur radio predecessor of Wi-Fi) • Have since worked with all layers of the communication stack – from the physical layer (cable, radio, fibre…) to the applications (web) in both theory and practice COMPSCI 314 S2C 2014 Ulrich Speidel

  4. Course structure • Week 1-4: Technical foundations and limits of data communication: channels, signals, codesLecturer: Ulrich Speidel • Week 5-8: Nevil Brownlee • Week 9-12: Aniket Mahanti COMPSCI 314 S2C 2014 Ulrich Speidel

  5. Office hours • To be announced – venue will be 303S-390 (corridor to the left of the Computer Science reception) COMPSCI 314 S2C 2014 Ulrich Speidel

  6. Assignments and Test • I will set one assignment, due at 12:00 noon, Friday 15 August 2014 • Nevil and Aniket will also set one assignment each • The mid-semester test will be held during lecture time on September 19, 2014 COMPSCI 314 S2C 2014 Ulrich Speidel

  7. Communication with me • Don't be shy to approach me! Here's how to get a meaningful answer quickly… • Put "COMPSCI314" in the subject of your e-mail on a question that relates to COMPSCI314 – or risk being mistaken for a 280 student! • Try to be as concise as possible in your question. It doesn't need to be as short as a text message. It helps if you refer to slide numbers, assignment questions, etc. • I may anonymise your question and cc the rest of the class into my answer if I think it's of interest to others. Check and keep your class e-mail – it'll often already contain the answer you're looking for. • Note that around assignment due dates, tests and exams, I often get lots of questions by e-mail. Checking your past class e-mail is often a faster way to get an answer! • Get in early and don't wait to the last minute if you need help. COMPSCI 314 S2C 2014 Ulrich Speidel 7

  8. Other things • I expect you to read your Computer Science e-mail regularly (i.e., at least once a day) • Announcements made via e-mail are expected to be known to you 24 hours after they have been made • Please see our tutor first if you have questions COMPSCI 314 S2C 2014 Ulrich Speidel

  9. Our textbook • “Computer Networking: A Top-Down Approach”, 5th or 6th edition, by J.F. Kurose and K.W. Ross, Pearson Education • Won't use this textbook in my part, but you might want to get it now for Nevil's & Aniket's parts COMPSCI 314 S2C 2014 Ulrich Speidel

  10. What I'll cover – what you'll learn • Theme 1: Physical foundations of data communications • Data can travel across many media: cables, radio links – and each medium has its own special properties • You'll learn about signals and the way we can express them in the physical world: electrical, optical, radio, … • You'll develop an understanding of concepts such as latency, bandwidth, noise, bit rates, baud rates, and bit error rates, and how they relate to each other COMPSCI 314 S2C 2014 Ulrich Speidel

  11. What I'll cover – what you'll learn • Theme 2: Channels and codes • In this theme, we'll learn about the characteristics of different channels and how we can package data for transport, so it gets to the receiver with as few errors and as little resource use as possible • You'll develop an understanding of different channel types, where you'll likely to encounter them, and how information is coded and handled to deal with the requirements of each channel COMPSCI 314 S2C 2014 Ulrich Speidel

  12. Week 1 • Lecture 1: What's a signal? Electrical and optical signals • Lecture 2: Radio signals, signal propagation, decibels • Lecture 3: Satellite communication, communication channels and Fourier analysis, the concept of bandwidth COMPSCI 314 S2C 2014 Ulrich Speidel

  13. Lecture 1 • What is a signal? • Electrical signals • Optical signals COMPSCI 314 S2C 2014 Ulrich Speidel

  14. Signals - generally “Potential”: …could be the brightness of the light in an optical fibre …could be the voltage in an electric conductor …or, the level of water in a tank! COMPSCI 314 S2C 2014 Ulrich Speidel

  15. Potential difference in potential Can define this differenceas “positive”(left tank hashigher water level than right tank, i.e., water will flow to the right) COMPSCI 314 S2C 2014 Ulrich Speidel

  16. Potential difference in potential Difference now “negative(“right tank has higher water level than left tank, i.e., water will flow to the left) COMPSCI 314 S2C 2014 Ulrich Speidel

  17. Potential no difference in potential No difference (“equipotential state” or “equilibrium”) means no water will flow. Note that this state is possible for arbitrary fill levels COMPSCI 314 S2C 2014 Ulrich Speidel

  18. Potential and electrical signals • Think about electrical conductors as water tanks withwater in them, with the water molecules being electrons • Introducing signals means changing the water levelsin one or more of the tanks – pressure on valves or flowinto other tanks results • The water pressure (potential) is the voltage • The water flow (litres per second) is the current COMPSCI 314 S2C 2014 Ulrich Speidel

  19. Power • Water that flows through a device such as a turbine can do work for us, e.g., generate energy. In physics, (the ability to perform) work and energy are the same. • To perform work, we need both water pressure (voltage) and water flow (current). • Current across a load such as a turbine can only perform work if it is driven by pressure. • The amount of energy that can be created in a given amount of time is therefore proportional to the square of the water pressure (or square of the voltage) • The amount of energy that can be transferred between systems per second is known as power and is measured in watts. COMPSCI 314 S2C 2014 Ulrich Speidel

  20. Types of (electrical) signals Analog signals: potential changes continuously with time • In communication, we often use analog signals that are limited in amplitude (certain minimal and maximal voltagesand/or currents are not exceeded) and that alternate betweenpositive and negative voltages/currents • Such signals may be thought of as the superposition of aamplitudes, frequencies, and phases of sinusoidal signals (Fourier theorem) • we’ll come back to that in a moment! COMPSCI 314 S2C 2014 Ulrich Speidel

  21. Analog signal parameters Amplitude Phase DC Offset We’ll soon learn that sinusoidal signals can be used to compose any other signal! COMPSCI 314 S2C 2014 Ulrich Speidel

  22. Digital signals • Digital signals are a special case of analog signals • Ideally, they only have two discrete states, 0 and 1 • These may be expressed, e.g., as two different voltage levels or light intensities • Transitions between 0 and 1 and vice versa are in theory instantaneous. That is, a digital system should never be in an “inbetween” state • In practice, this is not possible. This fact causes a lot of problems! COMPSCI 314 S2C 2014 Ulrich Speidel

  23. Digital vs. analog signals • Both digital and analog signals can be used to convey information • Analog signals are used for: conventional telephone, some older mobile phones, conventional radio and TV, as auxiliary carriers for some digital communication • Digital signals are used for: data communication, including most mobile phones and digital radio/TV COMPSCI 314 S2C 2014 Ulrich Speidel

  24. Digital vs. analog signals (II) • Analog signal communication does not necessarily require a computer or digital logic! • Analog signal communication cannot separate signal from noise • Digital signal communication requires some sort of digital processor (more effort) • Digital signal communication can separate signal from noise COMPSCI 314 S2C 2014 Ulrich Speidel

  25. Transmission media Both analog and digital signals can be communicated via the following media • electrical conductors (coax, twinax, twisted pair, powerline, etc.) • optical fibre • air (i.e., radio, laser, smoke signals,…) Let’s look closer at these three categories COMPSCI 314 S2C 2014 Ulrich Speidel

  26. Electrical conductors (cable) • Generally made from copper • Traditional cable form for data communication is coaxial cable (coax) • Present-day standard for Ethernet is “twisted pair” • Other cable forms are used (powerline, parallel cable, RS-232 cable, etc.) COMPSCI 314 S2C 2014 Ulrich Speidel

  27. Coax cables • Inner conductor made of copper • Plastic or foam insulation between inner core and shield • Shield is copper mesh and/or tinfoil • Outside insulation COMPSCI 314 S2C 2014 Ulrich Speidel

  28. Coax cables (II) • Ratio of diameters is important (impedance) • Overall diameter is important: the larger, the lower the losses (signal degradation over distance) • Signal travels on inside conductor – outer conductor is grounded • Cable does not radiate because the shield shields the inner conductor. Similarly, coax cables don’t pick up interfering signals for that reason. COMPSCI 314 S2C 2014 Ulrich Speidel

  29. Twisted pair cables • Cable comes with one or more “pairs” of simple insulated copper wires • Each pair is “twisted” • Each wire in a pair carries complementary signal – radiates little as signals cancel each other • May be shielded (e.g., STP) or just insulated with plastic (e.g., UTP) • Immunity to external signals low, even lower with shield. COMPSCI 314 S2C 2014 Ulrich Speidel

  30. Optical fibre • Made from glass or plastic • Cheap • Can be run for several km without amplifiers • More difficult to connect than copper wiring • Still an emerging technology! COMPSCI 314 S2C 2014 Ulrich Speidel

  31. Optical fibre (II) Optical fibres have an inner core (white), an outer core(yellow) and insulation (black) The outer core has a lower refractive index (i.e., light moves faster there) than the inner core. This means thatlight in the inner core is “trapped” by reflection/refraction. Refraction is the means of transport when the inner/outer core are replaced by a “graded refractive index”, i.e., when the glass gets “faster” as the light moves away from the center. COMPSCI 314 S2C 2014 Ulrich Speidel

  32. Optical fibre (III) - multimode We can send more than one light ray down a fibre by choosing different angles of incidence at the start A fibre used in this way is called a “multimode fibre”. Multimode fibres are usually often for short distances only because it gets a bit difficult to keep the rays apart. Graded-index fibre is best for this job. Another way to put more information through a fibre is to send light in different colours (wavelength multiplexing). COMPSCI 314 S2C 2014 Ulrich Speidel

  33. Optical fibre (IV) • Used in most undersea cables and long distance overland cables because it’s so cheap • When cables are laid, they usually contain several pairs of fibres (fibres come in pairs – one fibre for each direction of communication) • Distances up to 40 km can be bridged without the need for repeaters • Fibre repeaters are very expensive • Fascinating read from Wired Magazine on submarine cables:http://www.wired.com/wired/archive/4.12/ffglass.html COMPSCI 314 S2C 2014 Ulrich Speidel

  34. Lecture 2 • Radio signals • Signal propagation • Decibels COMPSCI 314 S2C 2014 Ulrich Speidel

  35. Wireless (aka “radio”) • Big topic! • Traditionally used for overland phone circuits (analog) • Now increasingly used in digital low power/short range applications: cellphones, Bluetooth, 802.11 WiFi, WiMax, 3G/4G/LTE, etc. COMPSCI 314 S2C 2014 Ulrich Speidel

  36. Wireless (II) Signal propagatesspherically Obstacles causeextra signal loss Received signal powerdrops to a quarter whenthe distance doubles Received signal voltage(power is proportionalto square of the voltage)drops to half when thedistance doubles COMPSCI 314 S2C 2014 Ulrich Speidel

  37. Wireless (III) • Typical radio systems can live with a received signal power that is 1011times smaller than the transmitted signal’s power • Often this is not enough. Good antennas can help (e.g., dish for satellite communication) COMPSCI 314 S2C 2014 Ulrich Speidel

  38. Wireless (IV) – how does it work? • Think about an antenna as a conductor that has electrons pumpedinto and out of it at one end, with no connection at the other • This means the conductor gets charged and discharged in rapidcycles. Thus we have an electric field that gets built up and collapses in cycles all the time. • The electrons flowing in and out cause a magnetic field (electromagnet!). Thus we have a magnetic field that gets built up and collapses in cycles all the time. • The collapsing electric field away from the antenna causes a magnetic field there, and vice versa. COMPSCI 314 S2C 2014 Ulrich Speidel

  39. Wireless (V) - Propagation • Radio signals propagate with the speed of light c (approx. 300,000,000 m/s in free space) • If the cycle time is T, then a radio wave travels the distance λ = cT in the time that it completes one cycle. λ is called the “wavelength” of the wave • f = 1/ T is called the “frequency” of the signal COMPSCI 314 S2C 2014 Ulrich Speidel

  40. Decibels • Used to compare voltage and power ratios • Two formulas • For two voltages V1 and V2 :r (dB) = 20 log10(V1/V2) • For two powers P1 and P2 :r (dB) = 10 log10(P1/P2) • A voltage ratio of 2:1 is approx. 6 dB • A power ratio of 2:1 is approx. 3 dB • You add ratios in dB – simpler that multiplying! • Remember that signal power is proportional to the square of the voltages (hence the 20 and the 10 in the formulae above) COMPSCI 314 S2C 2014 Ulrich Speidel

  41. Decibels • Why decibels? They make large numbers (ratios) numbers that we can handle easily • Example: A transmitter sends a signal whose power is 10 watts. A distant receiver receives 1/1,000,000,000,000 of this power. • An amplifier in the receiver then amplifies the signal power by a factor of 100 • Is that 0.0000000001 watts or 0.0000000001 watts, or even 0.000000000001 watts, or just 0.0000001 watts? • If you’re hesitating, let’s use dB instead COMPSCI 314 S2C 2014 Ulrich Speidel

  42. Decibels (continued) • Ratio between received and transmitted power:1/1,000,000,000,000 • Log to base 10 of that: -12 • -12 times 10: -120 dB • Ratio between amplified and unamplified signal:100 • Log to base 10 of that: 2 • 2 times 10: 20 • Add the dB figures (=multiply the ratios): -120 + 20 = -100 • Convert back to a ratio: 10-100/10=10-10 • So, 10 watts * 10-10 = 10-9 watts = 0.000000001 watts COMPSCI 314 S2C 2014 Ulrich Speidel

  43. Lost? Hopelessly log-jammed? • Scared of logarithms? • Never seen them? • Mentioned at school but seemed too hard? Fear not – they’re actually quite easy once you’ve mastered a few very simple rules… COMPSCI 314 S2C 2014 Ulrich Speidel

  44. Logarithm rule number 1 • Logarithms are the inverse of exponentials • So, if x = yz, then logy x = z • y is called the “base” of the logarithm (or, of the exponential function yz, for that matter) • Examples: • x = 256, y=2, z=8 • x = 81, y = 3, z =4 COMPSCI 314 S2C 2014 Ulrich Speidel

  45. Logarithm rule number 2 • Got the wrong base? • E.g. you need log to base 10 but all your calculator can do is a log to base e (e= 2.7182818284590452353602874…). A log to base e is often also just written as “ln” • No problem. Just use the logarithm function you have and then divide by the logarithm of the base you want: • This works for any base, not just 10, and for any logarithm function you have at hand (as long as you use the same function for x and the base, of course) COMPSCI 314 S2C 2014 Ulrich Speidel

  46. Logarithm rule number 3 • Products turn into sums under logarithm functions • Remember that yayb = ya+b? • Write A=ya and B=yb. Then AB=yayb. • Then the following shouldn’t surprise you:logy(AB) = logyA + logyB • We use this rule a lot when working with decibels. It allows us to add rather than multiply. COMPSCI 314 S2C 2014 Ulrich Speidel

  47. Logarithm rule number 3b • Ratios (quotients) turn into differences under logarithm functions • This is natural extension of rule number 3 • So: logy(A/B) = logyA - logyB COMPSCI 314 S2C 2014 Ulrich Speidel

  48. Logarithm rule 3c • Powers (exponents) turn into factors under logarithm functions • This is also a logical consequence of rule 3 • So: logy(ab) = b logya • Note: This rule lets us switch between the “power” formula and the “voltage” formula for decibels. Remember that power is proportional to the square of the voltage, hence we get a factor of 2… This turns the 10 into a 20. • So: X decibels in power ratio are X decibels in voltage ratio. Always! But: The power ratio (when not quoted in dB) is always the square of its corresponding voltage ratio COMPSCI 314 S2C 2014 Ulrich Speidel

  49. Decibels: Examples • The signal from a radio transmitter in free space drops by ?? dB when the distance to the transmitter doubles • A signal amplifier with a gain of 40 dB produces a signal with an output amplitude that is ??? times higher than that of the input signal. COMPSCI 314 S2C 2014 Ulrich Speidel

  50. Decibels: Examples • The signal from a radio transmitter in free space drops by –6 dB when the distance to the transmitter doubles • A signal amplifier with a gain of 40 dB produces a signal with an output amplitude that is ??? times higher than that of the input signal. COMPSCI 314 S2C 2014 Ulrich Speidel

More Related