34
1 Wireless Sensor Networks Physical Layer Mario Čagalj [email protected] FESB University of Split 9/04/2010. on “Protocols and Architectures for Wireless Sensor Networks”, Holger Karl, 2005.

1 Wireless Sensor Networks Physical Layer Mario Čagalj [email protected] FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

Embed Size (px)

Citation preview

Page 1: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

1

Wireless Sensor Networks

Physical Layer

Mario Č[email protected]

FESB University of Split

9/04/2010.

Based on “Protocols and Architectures for Wireless Sensor Networks”, Holger Karl, 2005.

Page 2: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

2

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

Page 3: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

3

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

o VLF = Very Low Frequency UHF = Ultra High Frequencyo LF = Low Frequency SHF = Super High Frequencyo MF = Medium Frequency EHF = Extra High Frequencyo HF = High Frequency UV = Ultraviolet Lighto VHF = Very High Frequency

1 Mm300 Hz

10 km30 kHz

100 m3 MHz

1 m300 MHz

10 mm30 GHz

100 m3 THz

1 m300 THz

visible light

VLF LF MF HF VHF UHF SHF EHF infrared UV

optical transmissioncoax cabletwisted pair

Radio spectrum for communication

Page 4: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

4

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

Frequency allocation

Page 5: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

5http://www.ntia.doc.gov/osmhome/

allochrt.pdf

Electromagnetic Spectrum

Page 6: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

6

Transmitting data using radio waves

o Produced by a resonating circuit (e.g., LC) o Transmitted through and antennao 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!

Page 7: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

7

Time and Frequency Domains

• Different representations of the same signal.• Spectral representation obtained using FFT (Fast Fourier Transform)

frequency

am

plit

ude

A

f

A/3

3f frequency

am

plit

ude

A

f

A/3

3f

Page 8: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

8

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)

Page 9: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

9

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

Page 10: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

10

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

Page 11: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

11

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

I

01 11

00 10

Q

I

QAM-4 QAM-16

Q

I

0 1

Binary

Page 12: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

12

Signal Modulation (examples)

Carrier

Modulatingdata

Modulatingdata 1

11

00

100

101

110

011

000

Resultingsignal QPSK

Resultingsignal QAM-8

Page 13: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

13

Bit rate vs. Baud rate

o Bit rate = bits/secondo Baud (Symbol) rate = Symbols/secondo Binary PSK, 1 symbol encodes 1 bito QAM-4, 1 symbol encodes 2 bitso QAM-16, 1 symbol encodes 4 bits

Q

I

01 11

00 10

Q

QAM-4 QAM-16

Q

I

0 1

Binary

Page 14: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

14

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!

Page 15: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

15

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)

Gain: 10-55dB

Isotropic DirectionalOmnidirectional

Gain: 2dB

Page 16: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

16

dB, dBm, dBi, ...

dBm = dB value of Power / 1 mWatt Used to describe signal strength.dBW = dB value of Power / 1 Watt Used to describe signal strength.dBi = dB value of antenna gain relative to 0dBi is by default the gain of an the gain of an isotropic antenna 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

Page 17: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

17

Antenna (II): Gain vs. Beamwidth

©Constantine A. Balanis, Antenna Theory: Analysis and Design, 3rd Edition

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 BeamWidtho HPBW > Half-Power BeamWidth

> The power reduced by half or 3dB of its maximum -> 3dB beamwidth

Page 18: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

18

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.

source) isotropic the of intensity (radiation 4

PU

source) isotropic (losslessPU

4 power(accepted)input total

intensity radiation4Gain

input0

input

π

ππ

©D. Adamy, A First Course on Electronic Warfare

Page 19: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

19

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)

Page 20: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

20

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)

o In LOS (Line-of-Sight) diffracted and scattered signals not significant compared to the direct signal, but reflected signals can be (multipath effects)

o In NLOS, diffraction and scattering are primary means of reception

Reflection

Scattering

Diffraction

Page 21: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

21

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/wavelengtho Example: λ (2.4 GHz) = 3x108/2.4x109 = 0.125mo 120km/hr = 33.3 m/so Freq. diff = 33.3/.125 = 267 Hz

Page 22: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

22

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)

> 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)

R4GG

PP

rttx

rx

π

λ

R4GGdBPdBP

PP

PL(dB) rtrxtxrx

tx

π

λlog10)()(log10

Page 23: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

23

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

Page 24: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

24

Signal Propagation (Strength)

©D. Adamy, A First Course on Electronic Warfare

XMTR RCVR

Path through link

Sig

nal Str

ength

(dB

m)

Tra

nsm

itte

d

Pow

er

Ante

nna G

ain

Ante

nna G

ain

Rece

ived

Pow

er

LINK LOSSES

Spreading and Atmospheric

Loss

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).

Page 25: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

25

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.

Page 26: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

26

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

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

Line-of-sight path

Non-line-of-sight path

Signal at receiver

LOS pulsesMultipathpulses

© Jochen Schiller, FU Berlin

Page 27: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

27

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

Page 28: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

28

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

> Rewrite in logarithmic form (in dB):

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

α

RR

)(RP(R)P 00recvrecv

00 R

R)[dB]PL(RPL(R)[dB] logα10

[dB]XRR

)[dB]PL(RPL(R)[dB]0

0

logα10

(R0 is a referent distance)

Page 29: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

29

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)

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

K

i 1 i0

recv

IN

P10logSINR

R1

SINRNE

where ,e21

BER(SINR)0

bNE

0

b

Page 30: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

30

Examples for SINR to BER mappings

1e-07

1e-06

1e-05

0.0001

0.001

0.01

0.1

1

-10 -5 0 5 10 15

Coherently Detected BPSKCoherently Detected BFSK

BER

SINR

Page 31: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

31

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> α - path loss exponent> Shadowing variance 2 > Reference path

loss at 1 m

Average α

Page 32: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

32

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

Page 33: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

33

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.

Page 34: 1 Wireless Sensor Networks Physical Layer Mario Čagalj mario.cagalj@fesb.hr FESB University of Split 9/04/2010. Based on “Protocols and Architectures for

34

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