Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012.

Similar presentations


Presentation on theme: "Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012."— Presentation transcript:

1 Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012

2 2 Outline r Admin and recap r Frequency domain examples r Basic concepts of modulation r Amplitude modulation r Amplitude demodulation r Digital modulation

3 3 Admin r First assignment to be posted by this weekend

4 4 Recap: Fourier Series on a General Interval r A periodic function g(t) on [a, a+T] can be decomposed as:

5 5 Frequency Domain Analysis Examples Using GNURadio r spectrum_2sin_plus m Audio m FFT Sink m Scope Sink m Noise

6 6 Frequency Domain Analysis Examples Using GNURadio r spectrum_1sin_rawfft m Raw FFT

7 7 Frequency Domain Analysis Examples Using GNURadio r spectrum_2sin_multiply_complex m Multiplication of a sine first by a real sine and then by a complex sine to observe spectrum

8 8 Takeaway from the Example r Advantages of I/Q representation

9 9 Quadrature Mixing spectrum of complex signal x(t) spectrum of complex signal x(t)e j2f0t spectrum of complex signal x(t)e -j2f0t

10 10 Basic Question: Why Not Send Digital Signal in Wireless Communications? r Signals at undesirable frequencies m suppose digital frame length T, then signal decomposes into frequencies at 1/T, 2/T, 3/T, … m let T = 1 ms, generates radio waves at frequencies of 1 KHz, 2 KHz, 3 KHz, … 1 0 digital signal t

11 11 Frequencies are Assigned and Regulated

12 12 Spectrum and Bandwidth: Shannon Channel Capacity r The maximum number of bits that can be transmitted per second by a physical channel is: where W is the frequency range of the channel, and S/N is the signal noise ratio, assuming Gaussian noise

13 13 Frequencies for Communications VLF = Very Low FrequencyUHF = Ultra High Frequency LF = Low Frequency SHF = Super High Frequency MF = Medium Frequency EHF = Extra High Frequency HF = High Frequency UV = Ultraviolet Light VHF = Very High Frequency Frequency and wave length:  = c/f wave length, speed of light c  3x10 8 m/s, frequency f 1 Mm 300 Hz 10 km 30 kHz 100 m 3 MHz 1 m 300 MHz 10 mm 30 GHz 100  m 3 THz 1  m 300 THz visible light VLFLFMFHFVHFUHFSHFEHFinfraredUV optical transmission coax cabletwisted pair

14 14 Why Not Send Digital Signal in Wireless Communications? voice Transmitter 20-20KHz Antenna: size ~ wavelength At 3 KHz, Antenna too large! Use modulation to transfer to higher frequency

15 15 Outline r Recap r Frequency domain examples r Basic concepts of modulation

16 16 r The information source m Typically a low frequency signal m Referred to as baseband signal  Carrier  A higher frequency sinusoid  Example cos(2π10000t)  Modulated signal  Some parameter of the carrier (amplitude, frequency, phase) is varied in accordance with the baseband signal Basic Concepts of Modulation

17 17 Types of Modulation r Analog modulation m Amplitude modulation (AM) m Frequency modulation (FM) m Double and signal sideband: DSB, SSB r Digital modulation m Amplitude shift keying (ASK) m Frequency shift keying: FSK m Phase shift keying: BPSK, QPSK, MSK m Quadrature amplitude modulation (QAM)

18 18 Outline r Recap r Frequency domain examples r Basic concepts of modulation r Amplitude modulation

19 19 Example: Amplitude Modulation (AM) r Block diagram r Time domain r Frequency domain

20 20 Example: am_modulation Example r Setting m Audio source (sample 32K) m Signal source (300K, sample 800K) m Multiply r Two Scopes r FFT Sink

21 21 Example AM Frequency Domain Note: There is always the negative freq. in the freq. domain.

22 22 Problem: How to Demodulate AM Signal?

23 23 Outline r Recap r Frequency domain examples r Basic concepts of modulation r Amplitude modulation r Amplitude demodulation

24 24 Design Option 1 r Step 1: Multiply signal by e -jfct m Implication: Need to do complex multiple multiplication

25 25 Design Option 1 (After Step 1) -2f c

26 26 Design Option 1 (Step 2) r Apply a Low Pass Filter to remove the extra frequencies at -2f c -2f c

27 27 Design Option 1 (Step 1 Analysis) r How many complex multiplications do we need for Step 1 (Multiply by e -jfct )?

28 28 Design Option 2: Quadrature Sampling

29 29 Quadrature Sampling: Upper Path (cos)

30 30 Quadrature Sampling: Upper Path (cos)

31 31 Quadrature Sampling: Upper Path (cos)

32 32 Quadrature Sampling: Lower Path (sin)

33 33 Quadrature Sampling: Lower Path (sin)

34 34 Quadrature Sampling: Lower Path (sin)

35 35 Quarature Sampling: Putting Together

36 36 Exercise: SpyWork r Setting: a scanner scans 128KHz blocks of AM radio and save each block to a file (see am_rcv.py). r SpyWork: Scan the block in a saved file to find radio stations and tune to each station (each AM station has 10 KHz)

37 37 Remaining Hole: Designing LPF r Frequency domain view freq B-B freq B-B

38 38 Design Option 1 freq B-B freq B-B compute freq zeroing out not want freq compute time signal Problem of Design Option 1?

39 39 Impulse Response Filters r GNU software radio implements filtering using m Finite Impulse Response (FIR) filters m Infinite Impulse Response (IIR) Filters r FIR filters are more commonly used r Filtering is common in networks/communications (and AI and …)

40 40 FIR Filter r An N-th order FIR filter h is defined by an array of N+1 numbers: r Assume input sequence x0, x1, …,

41 41 Implementing a 3-rd Order FIR Filter r An array of size N+1 for h xnxn x n-1 x n-2 x n-3 h0h0 h1h1 h2h2 h3h3 **** x n+1 compute y[n]

42 42 Implementing a 3-rd Order FIR Filter r An array of size N+1 for h xnxn x n-1 x n-2 x n-3 h0h0 h1h1 h2h2 h3h3 **** x n+1 compute y[n+1]

43 43 FIR Filter is also called convolution between x (as a vector) and h (as a vector), denoted as Key Question: How to Determine h?

44 g*h in the Continuous Time Domain 44 r Remember that we consider x as samples of time domain function g(t) on [0, 1] and (repeat in other intervals) r We also consider h as samples of time domain function h(t) on [0, 1] (and repeat in other intervals) for (i = 0; i< N; i++) y[t] += h[i] * g[t-i];

45 Visualizing g*h 45 g(t) h(t) time

46 Visualizing g*h 46 g(t) h(t) time t

47 Fourier Series of y=g*h 47

48 Fubini’s Theorem r In English, you can integrate m first along y and then along x m first along x and then along y m at (x, y) grid They give the same result 48 See http://en.wikipedia.org/wiki/Fubini's_theorem

49 Fourier Series of y=g*h 49

50 Summary of Progress So Far 50 y = g * h => Y[k] = G[k] H[k] is called the Convolution Theorem, an important theorem.

51 Applying Convolution Theorem to Design LPF 51 r Choose h() so that m H() is close to a rectangle shape m h() has a low order (why?)

52 Applying Convolution Theorem to Design LPF 52 r Choose h() so that m H() is close to a rectangle shape m h() has a low order (why?)

53 Sinc Function 53 r The h() is often related with the sinc(t)=sin(t)/t function f 1/2-1/2 1

54 FIR Design in Practice 54 r Compute h m MATLAB or other design software m GNU Software radio: optfir (optimal filter design) m GNU Software radio: firdes (using a method called windowing method) r Implement filter with given h m freq_xlating_fir_filter_ccf or m fir_filter_ccf

55 LPF Design Example 55 r Design a LPF to pass signal at 1 KHz and block at 2 KHz

56 LPF Design Example 56 #create the channel filter # coefficients chan_taps = optfir.low_pass( 1.0, #Filter gain 48000, #Sample Rate 1500, #one sided mod BW (passband edge) 1800, #one sided channel BW (stopband edge) 0.1, #Passband ripple 60) #Stopband Attenuation in dB print "Channel filter taps:", len(chan_taps) #creates the channel filter with the coef found chan = gr.freq_xlating_fir_filter_ccf( 1, # Decimation rate chan_taps, #coefficients 0, #Offset frequency - could be used to shift 48e3) #incoming sample rate

57 57 Outline r Recap r Frequency domain examples r Basic concepts of modulation r Amplitude modulation r Amplitude demodulation r Digital modulation

58 58 r Modulation of digital signals also known as Shift Keying r Amplitude Shift Keying (ASK): m vary carrier amp. according to bit value r Frequency Shift Keying (FSK) o pick carrier freq according to bit value r Phase Shift Keying (PSK): 101 t 101 t 101 t Modulation

59 59 r BPSK (Binary Phase Shift Keying): m bit value 0: sine wave m bit value 1: inverted sine wave m very simple PSK r Properties m robust, used e.g. in satellite systems Q I 01 Phase Shift Keying: BPSK

60 60 Phase Shift Keying: QPSK 111000 0101 Q I 11 01 10 00 A t r QPSK (Quadrature Phase Shift Keying): m 2 bits coded as one symbol m symbol determines shift of sine wave m often also transmission of relative, not absolute phase shift: DQPSK - Differential QPSK

61 61 r Quadrature Amplitude Modulation (QAM): combines amplitude and phase modulation r It is possible to code n bits using one symbol m 2 n discrete levels 0000 0001 0011 1000 Q I 0010 φ a Quadrature Amplitude Modulation r Example: 16-QAM (4 bits = 1 symbol) r Symbols 0011 and 0001 have the same phase φ, but different amplitude a. 0000 and 1000 have same amplitude but different phase

62 Exercise r Suppose fc = 1 GHz (fc1 = 1 GHz, fc0 = 900 GHz for FSK) r Bit rate is 1 Mbps r Encode one bit at a time r Bit seq: 1 0 0 1 0 1 r Q: How does the wave look like for? 62 111000 0101 Q I 11 01 10 00 A t

63 Generic Representation of Digital Keying (Modulation) r Sender sends symbols one-by-one r Each symbol has a corresponding signaling function g 1 (t), g 2 (t), …, g M (t), each has a duration of symbol time T r Exercise: m What is the setting for BPSK? for QPSK? 63

64 Checking Relationship Among g i () 64 r BPSK m 1: g 1 (t) = -sin(2πf c t) t in [0, T] m 0: g 0 (t) = sin(2πf c t) t in [0, T] r Are the two signaling functions independent? m Hint: think of the samples forming a vector, if it helps, in linear algebra m Ans: No. g 1 (t) = -g 0 (t)

65 Checking Relationship Among g i () 65 r QPSK m 11: sin(2πf c t + π/4) t in [0, T] m 10: sin(2πf c t + 3π/4) t in [0, T] m 00: sin(2πf c t - 3π/4) t in [0, T] m 01: sin(2πf c t - π/4) t in [0, T] r Are the four signaling functions independent? m Ans: No. They are all linear combinations of sin(2πf c t) and cos(2πf c t). m We call sin(2πf c t) and cos(2πf c t) the bases. m They are orthogonal because the integral of their product is 0.

66 Discussion: How does the Receiver Detect Which g i () is Sent? 66 r Assume synchronized (i.e., the receiver knows the symbol boundary). m This is also called coherent detection

67 Example: Matched Filter Detection 67 r Basic idea m consider each g m [0,T] as a point (with coordinates) in a space m compute the coordinate of the received signal s[0,T] m check the distance between g m [0,T] and the received signal s[0,T] m pick m* that gives the lowest distance value

68 Computing Coordinates 68 r Pick orthogonal bases {f 1 (t), f 2 (t), …, f N (t)} for {g 1 (t), g 2 (t), …, g M (t)} r Compute the coordinate of g m [0,T] as c m = [c m1, c m2, …, c mN ], where r Compute the coordinate of the received signal r[0,T] as r = [r 1, r 2, …, r N ] r Compute the distance between r and c m every cm and pick m* that gives the lowest distance value

69 Example: Matched Filter => Correlation Detector 69 received signal

70 70 Spectral Density of BPSK b R b =B b = 1/T b b f c : freq. of carrier fcfc Spectral Density = bit rate ------------------- width of spectrum used

71 71 Phase Shift Keying: Comparison BPSK QPSK f c : carrier freq. R b : freq. of data 10dB = 10; 20dB =100 111000 01 A t

72 Question 72 r Why would any one use BPSK, given higher QAM?


Download ppt "Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012."

Similar presentations


Ads by Google