pptx

advertisement
EECS 473
Advanced Embedded Systems
Lecture 14
Wireless in the real world
Team status updates
•
•
•
•
•
Team Alert (Home Alert)
Team Fitness (Fitness watch)
Team Glasses
Team Mouse (Control in hand)
Team WiFi (WiFi localization)
Guest talks
• One this Thursday 11/12
– Senior engineer who builds all kinds of things including power
supplies
• One on 11/24
– National Instruments, board-level issues
• One TBA, but more on software side.
• Recall part of homework score is attendance at guest talks.
– If you have a conflict, let me know and I’ll find makeup
something you can do
Last time
• Covered:
–Messages
• Source encoding (compression)
• Channel encoding (error correction)
• Modulation
–Medium
• A bit on the FCC
Today
• Review last time
• Wireless range
– Antennas
– Broadcast and receive power
• FCC (again)
• Bandwidth and Shannon’s limit
• A quick overview of 802.14.5 packets and
bandwidth
Review: Communication theory
• What are each of these boxes?
Source
Encoder
Channel
Encoder
Modulator
Channel
Source
Decoder
Channel
Decoder
Demodulator
Review:
Channel encoding/decoding
• What is a block code?
– What is a Hamming(7,4) code?
• How does this figure relate?
• What is a convolutional code?
– What makes it different than a block code?
• Channel encoding (error correction) involves
sending a lot of extra bits along with the
“useful data” (maybe 2x or 3x total!).
– Why is this helpful when trying to send a lot of data
quickly?
Review: Modulation
Review: Modulation
• Draw the message “0110” using the following
constellations:
So, who cares?
Noise immunity
• Looking at signalto-noise ratio
needed to maintain
a low bit error rate.
– Notice BPSK and
QPSK are least
noise-sensitive.
– And as “M” goes
up, we get more
noise sensitive.
• Easier to confuse
symbols!
On to…
Antennas and transmission power
• Antennas receive power
differently depending on
where the power is
coming from.
– An isotropic antenna is one
that receives power
equally well from all
directions.
• These don’t exist.
• Real antennas focus their
“effort” more in some
directions than others.
– A narrow antenna, like a
dish, will be focused in a
very narrow range
(radiation angle)
– Others, like a traditional
dipole (the most common
antenna) tend to have less
narrow of a range.
Antennas
• Nothing is free here.
– If you have a narrow
beam, you get some
great gain in that beam
but get loss in the other
directions.
Toroidal radiation pattern
• This can be good.
• Think about body-area
networks or Bluetooth
headphones
Figures from antenna-theory.com (if you couldn’t tell…)
Dish antenna radiation pattern
Radio power
• Radio signals are generally
measured in Watts
– However embedded systems
generally measure power in
mW
• Typically 30-100mW for WiFi
– It is often easiest to deal with
power on a log scale.
• So we use “dBm” where
Basically just dB but scaled to mW.
Much of this (including graphics) from http://www.adm21.fr/images/files/Industrial_Wireless_Guidebook.pdf
Aside: dB, dBm, dBi
• dB itself is a unit-less
value
– Generally a ratio between
two thing
– On a log scale.
• dBm a single value where
the “ratio” is to 1mW.
– So 20dB means a 100 to 1
ratio
– 20dBm means 100mW
(100 times 1mW)
• We’ll also see dBi when
looking at antennas.
– That’s the power ratio of
an antenna to an isotropic
antenna (that completely
non-directional antenna)
– You might see dBd, which
is compared to a lossless
dipole antenna. It’s 2.15dB
lower than dBi.
• Vendors generally use dBi
(‘cause it’s bigger) and thus
so will we.
Power received vs. power sent.
• The Friis Transmission Formula
tells us how much power we’ll
receive. It is:
• However, many of those terms
aren’t easily available from
real spec. sheets.
• Instead we do some algebra
and get the following equation
for range in km:
Where:
– Pt is the radiated power
– Pr is the received power
– Gt is the gain of the
transmitting antenna
– Gr is the gain of the receiving
antenna
– λ is the wavelength
– R is the distance between
antennas
• Where f is the frequency in
MHz, pt and pr are in dBm and
gt and gr are in dBi.
Example
• You are running an IEEE
802.11b network and you
are currently using
wireless devices with the
following specifications:
– Tx power: 18 dBm @ 11
Mbps
– Rx sensitivity: -81dBm @
11 Mbps
– Antenna gain: 2 dBi (both)
– 802.11b is at 2.4GHz.
• Notes:
– We are looking at 63mW of
broadcast power.
– If we had dish antennas
pointed at each other with
a gain of 25dBi, we’d have
(18+50+81)/20=275km!
– Note that this assumes an
unobstructed line-of-sight
signal with no significant
interference.
• Sometimes realistic, often
not.
Looking at a real antenna
(ANT-WSB-ANF-09)
• 9dBi
– Gets there by radiating
in a toroid
• Spread evenly along the
ground (half power
bandwidth is 360)
• Doesn’t go up or down at
all.
– Half power BW is at 10
Image taken from: en.wikipedia.org/wiki/File:United_States_Frequency_Allocations_Chart_2003_-_The_Radio_Spectrum.jpg
United States Partial Frequency Spectrum
Image taken from: en.wikipedia.org/wiki/File:United_States_Frequency_Allocations_Chart_2003_-_The_Radio_Spectrum.jpg
OK, so all 2.4 GHz things have on
50MHz of bandwidth
• What does that mean?
– It limits how much data we can send.
• To really understand that in a meaningful way,
let’s look at the theoretic limitations.
– Shannon’s limit.
Shannon’s limit
• First question about the medium:
– How fast can we hope to send data?
• Answered by Claude Shannon (given some
reasonable assumptions)
– Assuming we have only Gaussian noise, provides a
bound on the rate of information that can be
reliably moved over a channel.
• That includes error correction and whatever other
games you care to play.
Taken from a slide by Dr. Stark
Shannon–Hartley theorem
• We’ll use a different version of this called the
Shannon-Hartley theorem.
• C is the channel capacity in bits per second;
• B is the bandwidth of the channel in hertz
• S is the total received signal power measured in
Watts or Volts2
• N is the total noise, measured in Watts or Volts2
Adapted from Wikipedia.
Comments (1/2)
• This is a limit. It says that you can, in theory,
communicate that much data with an arbitrarily tight
bound on error.
– Not that you won’t get errors at that data rate. Rather
that it’s possible you can find an error correction scheme
that can fix things up.
• Such schemes may require really really long block sizes and so may
be computationally intractable.
• There are a number of proofs.
– IEEE reprinted the original paper in 1998
• http://www.stanford.edu/class/ee104/shannonpaper.pdf
– More than we are going to do.
• Let’s just be sure we can A) understand it and B) use it.
Comments (2/2)
• What are the assumptions made in the proof?
– All noise is Gaussian in distribution.
• This not only makes the math easier, it means that because the
addition of Gaussians is a Gaussian, all noise sources can be
modeled as a single source.
• Also note, this includes our inability to distinguish different
voltages.
– Effectively quantization noise and also treated as a Gaussian (though
it ain’t)
• Can people actually do this?
– They can get really close.
• Turbo codes,
• Low density parity check codes.
Examples (1/2)
• C is the channel capacity
in bits per second;
• B is the bandwidth of the
channel in Hertz
• S is the total received
signal power measured in
Watts or Volts2
• N is the total noise,
measured in Watts or
Volts2
Adapted from Wikipedia.
• If the SNR is 20 dB, and
the bandwidth available is
4 kHz what is the channel
capacity?
– Part 1: convert dB to a
ratio (it’s power so it’s base
10)
– Part 2: Plug and chug.
Examples (2/2)
• C is the channel capacity
in bits per second;
• B is the bandwidth of the
channel in Hertz
• S is the total received
signal power measured in
Watts or Volts2
• N is the total noise,
measured in Watts or
Volts2
Adapted from Wikipedia.
• If you wish to transmit at
50,000 bits/s, and a
bandwidth of 1 MHz is
available, what S/R ration
can you accept?
Summary of Shannon’s limit
• Provides an upper-bound on information over
a channel
– Makes assumptions about the nature of the noise.
• To approach this bound, need to use channel
encoding and modulation.
– Some schemes (Turbo codes, Low density parity
check codes) can get very close.
802.15.4
• IEEE 802.15.4 is a
standard which
specifies the physical
layer and media access
control for low-rate
wireless personal area
networks (LR-WPANs).
– Many embedded
wireless protocols are
built on top of this
(including Zigbee)
•
•
The Synchronization header (SHR) contains a preamble sequence (32 bits, or 4
octets) to allow the receiver to acquire and synchronize to the incoming signal and
a start of frame delimiter that signals the end of the preamble.
The PHY header (PHR) carries the frame length byte, which indicates the length of
the PHY Service Data Unit (PSDU).
– The SHR, PHR and PSDU make up the PHY Protocol Data Unit (PPDU).
•
•
•
The PSDU contains the MAC Header (MHR), which has two frame control octets, a
single octet Data Sequence Number, good for reassembling packets received out of
sequence, and 4 to 20 octets of address data.
The MAC Service Data Unit (MSDU) carries the frame’s payload and has a
maximum capacity of 104 octets of data.
Finally, the MPDU ends with the MAC Footer (MFR), which contains a 16-bit Frame
Check Sequence.
From: An Introduction to IEEE STD 802.15.4 by Jon T. Adams
Putting it all together
Acknowledgments and sources
• A 9 hour talk by David Tse has been extremely useful and is a basis for
me actually understanding anything (though I’m by no means through
it all)
• A talk given by Mike Denko, Alex Motalleb, and Tony Qian two years
ago for this class proved useful and I took a number of slides from
their talk.
• An hour long talk with Prabal Dutta formed the basis for the coverage
of this talk.
• Some other sources:
– http://www.cs.cmu.edu/~prs/wirelessS12/Midterm12-solutions.pdf -- A
nice set of questions that get at some useful calculations.
– http://people.seas.harvard.edu/~jones/es151/prop_models/propagation
.html all the path loss/propagation models in one place
– http://people.seas.harvard.edu/~jones/cscie129/papers/modulation_1.p
df very nice modulation overview.
– http://www.adm21.fr/images/files/Industrial_Wireless_Guidebook.pdf
A very nice overview of everything wireless for the applied engineer.
Wish I’d found it sooner!
• I’m grateful for the above sources. All mistakes are my own.
Additional sources/references
General
• http://www.cs.cmu.edu/~prs/wirelessS12/Midterm12-solutions.pdf
Modulation
• https://fetweb.ju.edu.jo/staff/ee/mhawa/421/Digital%20Modulation.pdf
• http://www.ece.umd.edu/class/enee623.S2006/ch2-5_feb06.pdf
• https://www.nhk.or.jp/strl/publica/bt/en/le0014.pdf
• http://engineering.mq.edu.au/~cl/files_pdf/elec321/lect_mask.pdf (ASK)
• http://www.eecs.yorku.ca/course_archive/201011/F/3213/CSE3213_07_ShiftKeying_F2010.pdf
Other:
• An Introduction to IEEE STD 802.15.4 by Jon T. Adams
Download