Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012
Outline Admin and recap Frequency domain examples Basic concepts of modulation Amplitude modulation Amplitude demodulation frequency shifting 2
Admin First assignment to be posted by this weekend Any feedback on pace and coverage 3
Recap: Fourier Series of Periodic Function A periodic function g(t) with period T on [a, a+t] can be decomposed as: g(t) = k= G[k] = 1 T G[k]e j2π k T t a a+t g(t)e j2π k T t dt For periodic function with period 1 on [0, 1] g(t) = G[k] = G[k]e j2πk t k= 1 0 g(t)e j2πk t dt 4
Fourier Transform For those who are curious, we do not need it formally Problem: Fourier series for periodic function g(t), what if g(t) is not periodical? Approach: Truncate g(t) beyond [-L/2, L/2] (i.e., set = 0) and then repeat to define g L (t) g L (t) = k= G L [k]e j2π k L t G L [k] = 1 L L/2 L/2 g L (t)e j2π k L t dt 5
Fourier Transform G L [k] = 1 L L/2 L/2 g L (t)e j2π k L t dt Define f k = k L Δf = 1 L Ĝ( f k ) = g L (t)e j2π f k t dt G L [k] = 1 L L/2 g L (t)e j2π k L t dt G L [k] = Δf Ĝ( f ) k L/2 g L (t) = k= Ĝ( f k )e j2π f k t Δf Ĝ( f )e j2π ft df Let L grow to infinity, we derive Fourier Transform: g(t) = Ĝ( f )e j2π ft df Ĝ( f ) = g(t)e j2π f t dt 6
Fourier Series vs Fourier Transform Fourier series For periodical functions, e.g., [0, 1] Fourier transform For non periodical functions g(t) = G[k]e j2πk t k= g(t) = Ĝ( f )e j2π ft df G[k] = 1 g(t)e j2πk t dt Ĝ( f ) = g(t)e j2π f t dt 0 http://www.differencebetween.com/difference-between-fourier-series-and-vs-fourier-transform/ 7
Recap: Discrete Domain Analysis FFT: Transforming a sequence of numbers x 0, x 1,, x N-1 to another sequence of numbers X 0, X 1,, X N-1 Note G[k] = 1 N 1 g(t)e j2πkt dt g( N n )e j2πk N n 0 n=0 1 N 8
Recap: Discrete Domain Analysis FFT: Transforming a sequence of numbers x 0, x 1,, x N-1 to another sequence of numbers X 0, X 1,, X N-1 Interpretation: consider x 0, x 1,, x N-1 as sampled values of a periodical function defined on [0, 1] X k is the coefficient (scaled by N) for k Hz harmonics if the FFT N samples span one sec 9
FFT Analysis vs Sample Rate X 1 X 2 X Nfft/2 Nfft=Nsample 1Hz 2Hz Nfft/2 Hz N sample N fft 2N sample N fft N sample 2 The freq. analysis resolution: N sample N fft 10
Frequency Domain Analysis Examples Using GNURadio spectrum_2sin_plus Audio FFT Sink Scope Sink Noise 11
Frequency Domain Analysis Examples Using GNURadio spectrum_1sin_rawfft Raw FFT 12
Frequency Domain Analysis Examples Using GNURadio spectrum_2sin_multiply_complex Multiplication of a sine first by a real sine and then by a complex sine to observe spectrum 13
Takeaway from the Example Advantages of I/Q representation 14
I/Q Multiplication Also Called Quadrature Mixing spectrum of complex signal x(t) spectrum of complex signal x(t)e j2f0t spectrum of complex signal x(t)e -j2f0t 15
Basic Question: Why Not Send Digital Signal in Wireless Communications? Signals at undesirable frequencies suppose digital frame repeat every T seconds, then according to Fourier series decomposition, signal decomposes into frequencies at 1/T, 2/T, 3/T, let T = 1 ms, generates radio waves at frequencies of 1 KHz, 2 KHz, 3 KHz, digital signal 1 0 t 16
Frequencies are Assigned and Regulated Europe USA Japan Cellular Phones Cordless Phones Wireless LANs Others GSM 450-457, 479-486/460-467,489-496, 890-915/935-960, 1710-1785/1805-1880 UMTS (FDD) 1920-1980, 2110-2190 UMTS (TDD) 1900-1920, 2020-2025 CT1+ 885-887, 930-932 CT2 864-868 DECT 1880-1900 IEEE 802.11 2400-2483 HIPERLAN 2 5150-5350, 5470-5725 RF - Control 27, 128, 418, 433, 868 AMPS, TDMA, CDMA 824-849, 869-894 TDMA, CDMA, GSM 1850-1910, 1930-1990 PACS 1850-1910, 1930-1990 PACS - UB 1910-1930 902-928 I EEE 802.11 2400-2483 5150-5350, 5725-5825 RF - Control 315, 915 PDC 810-826, 940-956, 1429-1465, 1477-1513 PHS 1895-1918 JCT 254-380 IEEE 802.11 2471-2497 5150-5250 RF - Control 426, 868 US operator: http://wireless.fcc.gov/uls 17
Spectrum and Bandwidth: Shannon Channel Capacity The maximum number of bits that can be transmitted per second by a physical channel is: W log (1 + 2 S N ) where W is the frequency range of the channel, and S/N is the signal noise ratio, assuming Gaussian noise 18
Frequencies for Communications twisted pair coax cable optical transmission 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 VLF LF MF HF VHF UHF SHF EHF infrared visible light UV VLF = Very Low Frequency UHF = Ultra High Frequency LF = Low Frequency SHF = Super High Frequency MF = Medium Frequency HF = High Frequency VHF = Very High Frequency EHF = Extra High Frequency UV = Ultraviolet Light Frequency and wave length: λ = c/f wave length λ, speed of light c 3x10 8 m/s, frequency f 19
Why Not Send Digital Signal in Wireless Communications? voice Transmitter 20-20KHz Antenna: size ~ wavelength At 3 KHz, λ = c f = 3 108 3 10 3 =100km Antenna too large! Use modulation to transfer to higher frequency 20
Outline Recap Frequency domain examples Basic concepts of modulation 21
Basic Concepts of Modulation The information source Typically a low frequency signal Referred to to as as the baseband baseba signal x(t) X(f) q Carrier q q er A higher frequency sinusoid Example cos(2π10000t) t baseband carrier Modulator f Modulated signal q Modulated signal q Some parameter of the carrier (amplitude, frequency, phase) is varied in accordance with the baseband signal 22
Types of Modulation Analog modulation Amplitude modulation (AM) Frequency modulation (FM) Double and signal sideband: DSB, SSB Digital modulation Amplitude shift keying (ASK) Frequency shift keying: FSK Phase shift keying: BPSK, QPSK, MSK Quadrature amplitude modulation (QAM) 23
Outline Recap Frequency domain examples Basic concepts of modulation Amplitude modulation 24
Example: Amplitude Modulation (AM) Block diagram x(t) m x + x AM (t)=a c [1+mx(t)]cos c t Time domain me Domain A c cos c t Frequency Domain domain X(f) X AM (f) sideba -f m f m f -f c f c f 25
Example: am_modulation Example Setting Audio source (sample 32K) Signal source (300K, sample 800K) Multiply Two Scopes FFT Sink 26
Example AM Frequency Domain Note: There is always the negative freq. in the freq. domain. 27
Problem: How to Demodulate AM Signal? X(f) X AM (f) sideba -f m f m f -f c f c f 28
Outline Admin and recap Frequency domain examples Basic concepts of modulation Amplitude modulation Amplitude demodulation frequency shifting 29
Design Option 1 Step 1: Multiply signal by e -j2πfct Implication: Need to do complex multiple multiplication 30
Design Option 1 (After Step 1) -2f c 31
Design Option 1 (Step 2) Apply a Low Pass Filter to remove the extra frequencies at -2f c -2f c 32
Design Option 1 (Step 1 Analysis) How many complex multiplications do we need for Step 1 (Multiply by e -j2πfct )? 33
Design Option 2: Quadrature Sampling 34
Quadrature Sampling: Upper Path (cos) 35
Quadrature Sampling: Upper Path (cos) 36
Quadrature Sampling: Upper Path (cos) 37
Quadrature Sampling: Lower Path (sin) 38
Quadrature Sampling: Lower Path (sin) 39
Quadrature Sampling: Lower Path (sin) 40
Quarature Sampling: Putting Together 41
Exercise: SpyWork Setting: a scanner scans 128KHz blocks of AM radio and saves each block to a file. SpyWork: Scan the block in a saved file to find radio stations and tune to each station (each AM station has 10 KHz) 42