Sigurnost bezicnih racunalnih mreza

advertisement
Wireless Sensor Networks
Physical Layer
Mario Čagalj
mario.cagalj@fesb.hr
FESB
University of Split
9/04/2010.
Based on “Protocols and Architectures for Wireless Sensor Networks”, Holger Karl, 2005.
1
Goal of this lecture
o Get an understanding of the peculiarities of wireless
communication
> “Wireless channel” as abstraction of these properties – e.g.,
bit error patterns
> Focus is on radio communication
o Impact of different factors on communication
performance
> Frequency band, transmission power, modulation scheme, etc.
> Transciever design
o Understanding of energy consumption for radio
communication
2
Radio spectrum for communication
o Which part of the electromagnetic spectrum is used for
communication
> Not all frequencies are equally suitable for all tasks – e.g., wall
penetration, different atmospheric attenuation
twisted
pair
1 Mm
300
Hz
10 km
30 kHz
VLF
o
o
o
o
o
coax cable
LF
optical transmission
100 m
3 MHz
MF
HF
VLF = Very Low Frequency
LF = Low Frequency
MF = Medium Frequency
HF = High Frequency
VHF = Very High Frequency
1m
300 MHz
VHF
UHF
10 mm
30 GHz
SHF
EHF
100 m
3 THz
infrared
1 m
300 THz
visible
light
UV
UHF = Ultra High Frequency
SHF = Super High Frequency
EHF = Extra High Frequency
UV = Ultraviolet Light
3
Frequency allocation
o Some frequencies are
allocated to specific uses
> Cellular phones, analog
television/radio
broadcasting, DVB-T, radar,
emergency services, radio
astronomy, …
o Particularly interesting:
ISM bands (“Industrial,
scientific, medicine”) –
license-free operation
Some typical ISM bands
Frequency
Comment
13,553-13,567 MHz
26,957 – 27,283 MHz
40,66 – 40,70 MHz
433 – 464 MHz
Europe
900 – 928 MHz
Americas
2,4 – 2,5 GHz
WLAN/WPAN
5,725 – 5,875 GHz
WLAN
24 – 24,25 GHz
4
Electromagnetic Spectrum
http://www.ntia.doc.gov/osmhome/allochrt.pdf
5
Transmitting data using radio waves
o Produced by a resonating circuit (e.g., LC)
o Transmitted through and antenna
o Basics: Transmiter can send a radio wave, receiver can
detect whether such a wave is present and also its
parameters
o Parameters of a wave (e.g, a sine function)
s(t)=A(t) sin( 2πf(t)t + (t) )
>
Parameters: amplitude A(t), frequency f(t), phase (t)
o Manipulating these three parameters allows the sender to
express data; receiver reconstructs data from signal
o Simplification: Receiver “sees” the same signal that the
sender generated – not true, see later!
6
Time and Frequency Domains
Different representations of the same signal.
Spectral representation obtained using FFT (Fast Fourier Transform)
amplitude
A
amplitude
•
•
f
A
A/3
3f
A/3
frequency
f
3f
frequency
7
Signal Modulation (I)
o How to manipulate a given signal parameter?
> Set the parameter to an arbitrary value: analog modulation
> Choose parameter values from a finite set of legal values:
digital keying
o Modulation?
> Data to be transmitted is used to select transmission
parameters as a function of time
> These parameters modify a basic sine wave, which serves as a
starting point for modulating the signal onto it
> This basic sine wave has a center frequency fc
> The resulting signal requires a certain bandwidth to be
transmitted (centered around center frequency)
8
Signal Modulation (II)
o Use data to modify the
amplitude of a carrier
frequency - Amplitude Shift
Keying (ASK)
o Use data to modify the
frequency of a carrier
frequency - Frequency Shift
Keying (FSK)
o Use data to modify the phase
of a carrier frequency - Phase
Shift Keying (PSK)
© Tanenbaum, Computer Networks
9
Signal Modulation (III)
o Quadrature PSK (QPSK): Two bits
> 00 ≈ A sin(2πft + 7π/4)
> 01 ≈ A sin(2πft + 5π/4)
> 10 ≈ A sin(2πft + 3π/4)
> 11 ≈ A sin(2πft + π/4)
o Quadrature Amplitude and Phase Modulation (QAM)
QAM-4, QAM-16, QAM-64, QAM-256
> s(t) = I(t) cos( 2πfct) - Q(t) sin( 2πfct)
I(t) and Q(t) are the modulating signals (analog modulation)
> I(t) > “in-phase” componenet, Q(t) > “quadrature” component
> s(t) is a linear combination of two orthogonal signal waveforms
> Received signal (ideal case) I(t) component is demodulated as
r(t) = s(t) cos( 2πfct) = ½ I(t) + ½ [I(t) cos( 4πfct) + Q(t) sin( 4πfct)]
> By filtering a low-pass filter we can recover the I(t) and the Q(t) terms
10
Signal Modulation (IV)
o Quadrature PSK (QPSK): Two bits
>
>
>
>
00 ≈ A sin(2πft + 7π/4)
01 ≈ A sin(2πft + 5π/4)
10 ≈ A sin(2πft + 3π/4)
11 ≈ A sin(2πft + π/4)
o Quadrature Amplitude and Phase Modulation (QAM)
QAM-4, QAM-16, QAM-64, QAM-256
Q
0
01
Q
Q
11
1
I
Binary
00
10
QAM-4
I
I
QAM-16
11
Signal Modulation (examples)
Carrier
Modulating
data
11
10
01
00
110
011
000
Resulting
signal QPSK
Modulating
data
101
Resulting
signal
QAM-8
12
Bit rate vs. Baud rate
o
o
o
o
o
Bit rate = bits/second
Baud (Symbol) rate = Symbols/second
Binary PSK, 1 symbol encodes 1 bit
QAM-4, 1 symbol encodes 2 bits
QAM-16, 1 symbol encodes 4 bits
Q
0
Q
Q
01
11
00
10
1
I
Binary
QAM-4
I
QAM-16
13
Receiver: Demodulation
o The receiver looks at the received wave form and matches it
with the data bit that caused the transmitter to generate
this wave form
> Necessary: one-to-one mapping between data and wave form
> Because of channel imperfections, this is at best possible for digital
signals, but not for analog signals
o Problems caused by
> Carrier synchronization: frequency can vary between sender and
receiver (drift, temperature changes, aging, …)
> Bit synchronization (actually: symbol synchronization): When does
symbol representing a certain bit start/end?
> Frame synchronization: When does a packet start/end?
> Biggest problem: Received signal is not the transmitted signal!
14
Antenna (I)
o A resonating circuit (e.g., LC) connected to an antenna causes an
antenna to emit EM (electromagnetic) waves
o A receiving antenna converts the EM waves into electrical current
o Many types of antennas with different gains (G)
Isotropic
Omnidirectional
Gain: 2dB
Directional
Gain: 10-55dB
15
dB, dBm, dBi, ...
dBm = dB value of Power / 1 mWatt
dBW = dB value of Power / 1 Watt
dBi = dB value of antenna gain relative to
the gain of an isotropic antenna
Used to describe signal strength.
Used to describe signal strength.
0dBi is by default the gain of an
isotropic antenna
A linear number is converted into dB, using the following formula:
X(dB) = 10log10(X)
X(dBm) = 10log10(X/1mW)
E.g. 1W = 0dBW = +30dBm
16
Antenna (II): Gain vs. Beamwidth
o Antenna radiation pattern
>
Beamwidth of a pattern is the angular separation between two identical points on
opposite side of the pattern maximum
o FNBW > First Null BeamWidth
o HPBW > Half-Power BeamWidth
>
The power reduced by half or 3dB of its maximum -> 3dB beamwidth
©Constantine A. Balanis, Antenna Theory: Analysis and Design, 3rd Edition
17
Antenna (III): Gain vs. Beamwidth
o Gain of an antenna:
>
The ratio of the intensity, in a given direction, to the radiation intensity that
would be obtained if the power accepted by antenna were radiated isotropically.
Gain  4π
U0 
Pinput
4π
radiation intensity
U
 4π
total input (accepted) power
Pinput (lossless isotropic source)
(radiation intensity of the isotropic source)
©D. Adamy, A First Course on Electronic Warfare
18
Transmitted signal <> received signal!
o Wireless transmission distorts any transmitted signal
> Received <> transmitted signal; results in uncertainty at receiver
about which bit sequence originally caused the transmitted signal
> Abstraction: Wireless channel describes these distortion effects
o Sources of distortion
> Attenuation – energy is distributed to larger areas with increasing
distance
> Reflection/refraction – bounce of a surface; enter material
> Diffraction – start “new wave” from a sharp edge
> Scattering – multiple reflections at rough surfaces
> Doppler fading – shift in frequencies (loss of center)
19
Signal Propagation: Diffraction, Reflection,
Scattering
o Reflection: When the surface is large relative to the wavelength of signal (λ =
c/f), c = speed of light
>
May cause phase shift from original / cancel out original or increase it
o Diffraction: When the signal hits the edge of an impenetrable body that is
large relative to the wavelength λ
>
Enables the reception of the signal even if Non-Line-of-Sight (NLOS)
o Scattering: obstacle size is in the order of λ. (e.g., a lamp post)
Scattering
Diffraction
Reflection
o In LOS (Line-of-Sight) diffracted and scattered signals not significant
compared to the direct signal, but reflected signals can be (multipath effects)
20
o In NLOS, diffraction and scattering are primary means of reception
Doppler shift
o If the transmitter and/or receiver are mobile, the frequency of
the received signal changes
> When they are moving closer, the frequency increases
> When they are moving away, the frequency decreases
Frequency difference = velocity/wavelength
o Example: λ (2.4 GHz) = 3x108/2.4x109 = 0.125m
o 120km/hr = 33.3 m/s
o Freq. diff = 33.3/.125 = 267 Hz
21
Signal Propagation (attenuation and path loss)
o Effect of attenuation: received signal strength is a function
of the distance R between sender and receiver
o Captured by Friis equation (a simplified form)

Prx
 λ 
 GtGr 

Ptx
4
π
R


> Gr and Gt are antenna gains for the receiver and transmiter
> λ is the wavelength and α is a path-loss exponent (2 - 5)
> Attenuation depends on frequencies, for free-space α=2
o Path loss (PL)

Ptx
 λ 
PL(dB)  10 log
 Ptx (dB )  Prx (dB )  10 log G t G r 

Prx
 4πR 
22
Suitability of different frequencies – Attenuation
o Attenuation depends on the used frequency
o Can result in a frequency-selective channel
> If bandwidth spans frequency ranges with different attenuation
properties
© http://141.84.50.121/iggf/Multimedia/Klimatologie/physik_arbeit.htm
23
XMTR
LINK LOSSES
Received
Power
Spreading and
Atmospheric
Loss
Antenna Gain
Antenna Gain
Transmitted
Power
Signal Strength (dBm)
Signal Propagation (Strength)
RCVR
Path through link
To calculate the received signal level (in dBm), add the transmitting antenna
gain (in dB), subtract the link losses (in dB), and add the receiving antenna
gain (dB) to the transmitter power (in dBm).
©D. Adamy, A First Course on Electronic Warfare
24
Receiver sensitivity
o The smallest signal (the lowest signal strength) that a receiver can
receive and still provide the proper specified output.
o Example:
>
>
>
>
>
Transmitter Power (1W) = +30dBm
Transmitting Antenna Gain = +10dB
Spreading Loss = 100dB
Atmospheric Loss = 2dB
Receiving Antenna Gain = +3dB
Receiver Power (dBm) = +30dBm + 10dB – 100dB – 2dB + 3dB = -59dBm
Receiver 1 sensitivity is -62dBm and the receiver 2 is -65dBm > receiver 1 and 2 will
receive the signal as if there is still 3dBm and 6dBm of margin on the link,
respectively.
Recv 2 is 3dB (a factor of two) better than recv 1; recv 2 can hear signals that are
half the strength of those heard by recv1.
25
Distortion effects: Non-line-of-sight paths
o Because of reflection, scattering, …, radio communication is
not limited to direct line of sight communication
> Effects depend strongly on frequency, thus different behavior at
higher frequencies
LOS pulses
Multipath
pulses
Non-line-of-sight path
Line-ofsight path
Signal at receiver
© Jochen Schiller, FU Berlin
o Different paths have different lengths = propagation time
> Results in delay spread of the wireless channel
> Closely related to frequency-selective fading properties of the
channel
> With movement: fast fading
26
Wireless signal strength in a multi-path
environment
o Brighter color = stronger signal
o Obviously, simple (quadratic)
free space attenuation formula
is not sufficient to capture
these effects
© Jochen Schiller, FU Berlin
27
Generalizing the attenuation formula
o To take into account stronger attenuation than only caused by
distance (e.g., walls, …), use a larger path-loss exponent α > 2
R 
Precv (R)  Precv (R 0 )   0 
R 
>
α
(R0 is a referent distance)
Rewrite in logarithmic form (in dB):
R
PL(R)[dB]  PL(R 0 )[dB]  10α log  
 R0 
o Take obstacles into account by a random variation
>
>
Add a Gaussian random variable with 0 mean, variance 2 to dB representation
Equivalent to multiplying with a lognormal distributed random variable in metric
units > lognormal fading
R
PL(R)[dB]  PL(R 0 )[dB]  10α log    X [dB]

 R0 
28
From waves to bits: symbols and bit errors
o Extracting symbols out of a distorted/corrupted wave form
is filled with errors
> Depends essentially on strength of the received signal compared to
the corruption
> Captured by signal to noise and interference ratio (SINR)


Precv


SINR  10log
K
N 

I

0
i
i 1


o SINR allows to compute bit error rate (BER) for a given
modulation
> Also depends on data rate R (# bits/symbol) of modulation
> E.g., for simple DPSK
BER(SINR) 
1
e
2

Eb
N0
, where
Eb
1
 SINR 
N0
R
29
Examples for SINR to BER mappings
1
Coherently Detected BPSK
Coherently Detected BFSK
0.1
0.01
BER
0.001
0.0001
1e-05
1e-06
1e-07
-10
-5
0
5
10
SINR
15
30
WSN-specific channel models
o Typical WSN properties
> Small transmission range
> Implies small delay spread (nanoseconds, compared to
micro/milliseconds for symbol duration)
> Frequency-non-selective fading, low to negligible inter-symbol
interference
o Some example
measurements
Average
α
> α - path loss exponent
> Shadowing variance 2
> Reference path
loss at 1 m
31
Transceiver design
o Strive for good power efficiency at low transmission power
> Some amplifiers are optimized for efficiency at high output
power
> To radiate 1 mW, typical designs need 30-100 mW to operate
the transmitter
• WSN nodes: 20 mW (mica motes)
> Receiver can use as much or more power as transmitter at
these power levels
• Sleep state is important
o Startup energy/time penalty can be high
> Examples take 0.5 ms and ¼ 60 mW to wake up
o Exploit communication/computation tradeoffs
> Might payoff to invest in rather complicated
coding/compression schemes
32
Transceiver design
o One exemplary design point: which modulation to use?
> Consider: required data rate, available symbol rate, implementation
complexity, required BER, channel characteristics, …
> Tradeoffs: the faster one sends, the longer one can sleep
• Power consumption can depend on modulation scheme
> Tradeoffs: symbol rate (high?) versus data rate (low)
• Use m-ary transmission to get a transmission over with ASAP
• But: startup costs can easily void any time saving effects
o Adapt modulation choice to operation conditions
> Similar to dynamic voltage scaling (DVS) introduced in the last lecture,
introduce Dynamic Modulation Scaling
> When there are no packets present, a small value for m (bits per
symbol) can be used, having low energy consumption. As backlog
increases, m is increased as well to reduce the backlog quickly and
switch back to lower values of m.
33
Summary
o Wireless radio communication introduces many
uncertainties into a communication system
o Handling the unavoidable errors will be a major
challenge for the communication protocols
o Dealing with limited bandwidth in an energy-efficient
manner is the main challenge
34
Download