for Amaeur Radio Virginia Polyechnic Insiue & Sae Universiy March 19, 2013
# include <liquid / liquid.h> //... in main() { floa kf = 0.1f; // modulaion facor liquid_freqdem_ype ype = LIQUID_FREQDEM_DELAYCONJ; // creae modulaor/demodulaor objecs freqmod fmod = freqmod_creae(kf); freqdem fdem = freqdem_creae(kf, ype); floa m; floa complex s; floa y; // inpu message // modulaed signal // oupu/demodulaed message // repea as necessary { // modulae signal freqmod_modulae(fmod, m, &s); } // demodulae signal freqdem_demodulae(fdem, s, &y); } // clean up objecs freqmod_desroy(fmod); freqdem_desroy(fdem);
inroducion abou your presener wha we all should ge from his presenaion brief inroducion o analog communicaions (AM/FM) brief inroducion o digial communicaions sofware-defined radio why I joined in amaeur radio
fourier ransform definiion X (f ) = x()e j2πf d Time domain x() Frequency domain X (f ) x() = X (f )e j2πf df We can hink of he Fourier Transform and he Inverse Fourier Transform as he means for moving beween he ime and frequency domains Noe ha no informaion is los in he ransformaion Boh are equivalen represenaions of a signal
fourier ransform example: cos(2πf 0) g() G(f ) 1 2 δ(f + f 0) 1 2 δ(f + f 0 ) f g() = cos(2πf 0 ) G(f ) = 1 2 δ(f + f 0) + 1 2 δ(f f 0) Noes: g() has even symmery G(f ) is purely real.
analog communicaions inro o modulaion In general ime-varying modulaion of a sinusoid can be wrien as ( ) s() = A() cos 2πf c + θ() fc is he nominal carrier frequency A() is he ime-varying ampliude θ() is he ime-varying phase s(), unmodulaed carrier
ampliude modulaion specrum of double side-band ransmied carrier AM m() M(f ) f
ampliude modulaion specrum of double side-band ransmied carrier AM m() M(f ) 1 + k am() δ(f ) + k am(f ) f f
ampliude modulaion specrum of double side-band ransmied carrier AM m() M(f ) 1 + k am() δ(f ) + k am(f ) f s() = [1 + k am()] cos(2πf c ) f S(f ) f c f c f
ampliude modulaion double side-band ransmied carrier AM m(), message signal s() = A c [1 + k am()] cos(2πf c ) S(f ) f c f c f
ampliude modulaion double side-band suppressed carrier AM m(), message signal s() = A c m() cos(2πf c ) S(f ) = Ac 2 Ac M(f + fc ) + M(f fc ) 2 f c f c f
ampliude modulaion single side-band AM M(f ), message signal f BPF S(f ), modulaed message f c f c f S(f ), single side-band f c f c f
frequency modulaion inroducion We can ransmi informaion m() by varying he angle θ i () of a carrier Phase Modulaion (PM) The phase of he carrier is varied linearly wih m() θ i () = 2πf c + k pm() s() = A c cos(2πf c + k pm()) Frequency Modulaion (FM) The frequency of he carrier is varied linearly wih m() f i () = f c + k f m() θ i () = 2πf c + 2πk f 0 m(τ)dτ s() = A c cos 2πf c + 2πk f 0 m(τ)dτ
frequency modulaion ampliude vs. frequency modulaion m(), message signal s(), DSB AM s(), FM
band-pass digial binary band-pass modulaion Three forms of signaling... Inpu Daa 0 0 1 1 0 1 1 0 0 1 Ampliudeshif keying Phase-shif keying Frequencyshif keying
band-pass digial M = 4 (2-bi) band-pass modulaion Exend binary o include more daa... Inpu Daa 00 01 11 10 01 01 11 10 00 11 Ampliudeshif keying Phase-shif keying Frequencyshif keying
M-ary level modulaion M-ary ampliude-shif keying (ASK) Inpu Daa 00 01 11 10 01 01 11 10 00 11 Ampliudeshif keying 0 symbol 00 0.4 A c sin (2πf c) symbol 01 s() = 0.8 A c sin (2πf c) symbol 10 1.2 A c sin (2πf c) symbol 11 Similar o on-off keying Specrum conains a line componen a f = f c Does no need coheren deecor
M-ary level modulaion 2-level ampliude-shif keying (2-ASK)
M-ary level modulaion 4-level ampliude-shif keying (4-ASK)
M-ary level modulaion M-ary phase-shif keying (PSK) Inpu Daa 00 01 11 10 01 01 11 10 00 11 Phase-shif keying +A c sin (2πf c) symbol 00 +A c cos (2πf c) symbol 01 s() = A c sin (2πf c) symbol 10 A c cos (2πf c) symbol 11 Similar o analog QAM Specrum conains no line componens Does need coheren deecor
M-ary level modulaion M-ary phase-shif keying (PSK) In general, M-ary PSK signals can be wrien as 2 s() = cos(2πf c + θ m) T s where θ m = 2π (m 1) m = 0, 1, 2,, M 1 M imag imag 10 imag 010 101 100 1 M = 2 0 real 01 M = 4 00 real 001 M = 8 000 real 11 110 111 011
M-ary level modulaion 2-level phase-shif keying (2-PSK)
M-ary level modulaion 4-level phase-shif keying (4-PSK)
M-ary level modulaion M-ary quadraure ampliude modulaion (M-QAM) In general we may arbirarily modulae boh ampliude and phase: s() = a m 2 T s cos(2πf c) + b m 2 T s sin(2πf c) 0 < T s 0010 0110 Q 16-QAM 1110 1010 Q 64-QAM 0011 0111 1111 1011 0001 0101 1101 1001 I I 0000 0100 1100 1000
M-ary level modulaion 64 quadraure ampliude modulaion (64-QAM) Q 64-QAM 000111 001111 010111 011111 110111 101111 110111 111111 000110 001110 010110 011110 110110 101110 110110 111110 000101 001101 010101 011101 110101 101101 110101 111101 000110 001110 010110 011110 110110 101110 110110 111110 I 000011 001011 010011 011011 110011 101011 110011 111011 000010 001010 010010 011010 110010 101010 110010 111010 000001 001001 010001 011001 110001 101001 110001 111001
Digial Communicaions 16-QAM, High SNR 16-QAM Quadraure In-phase (cosine), quadraure (sine) Each of 16 symbols represens 4 unique bi sequences (16 = 2 4 ) High raio of signal energy o noise energy (SNR) Low probabiliy of error (good!) In-phase
Digial Communicaions 16-QAM, Low SNR 16-QAM Quadraure SNR degrades Received sample poins no confined o wihin heir bins Probabiliy of error increases (bad!) In-phase
Digial Communicaions QPSK, Low SNR Quadraure QPSK In-phase Fall back o lower modulaion scheme Each of 4 symbols represens only 2 unique bi sequences (4 = 2 2 ) Probabiliy of error again reduced...bu a he expense of lower daa rae
M-ary level modulaion M-ary frequency-shif keying (FSK) Inpu Daa 00 01 11 10 01 01 11 10 00 11 Frequencyshif keying A c cos (2πf 0) symbol 00 A c cos (2πf 1) symbol 01 s() = A c cos (2πf 2) symbol 10 A c cos (2πf 3) symbol 11 Similar o analog FM Specrum conains line componens a f = f 0, f 1, f 2, f 3 Unlike ASK and PSK, FSK increases bandwidh
M-ary level modulaion 2-level frequency-shif keying (2-FSK)
M-ary level modulaion 4-level frequency-shif keying (4-FSK)
sofware-defined radios wha is SDR? radiional radio design sofware radio design floa mod_index = 0.1f; // modulaion index in sc = 1; // suppress carrier? liquid_modem_amype ype = LIQUID_MODEM_AM_DSB; // creae/iniialize auomaic gain conrol agc_rrrf agc = agc_rrrf_creae(); // creae AM demodulaor objec ampmodem demod = ampmodem_creae(mod_index,ype,sc); // run demodulaor while (devices.rf.daa_availble()) { // pull inpu sample and apply gain conrol agc_rrrf_execue(agc, devices.rf.daa(), &y); // demodulae signal floa y; ampmodem_demodulae(demod, x, &y); } // push demodulaed oupu o sound ou device devices.sound.push(y); // desroy objecs agc_crcf_desroy(agc); ampmodem_desroy(demod);
sofware-defined radios arbirary linear consellaions 1.5 1.5 2 1 0010 0110 1110 1 000100 001100 011100 010100 110100 111100 101100 100100 1.5 000101 001101 011101 010101 110101 111101 101101 100101 1 0011 1010 Q 0.5 0 0001 0101 0111 1111 1011 Q 0.5 0 000111 001111 011111 010111 110111 111111 101111 100111 000110 001110 011110 010110 110110 111110 101110 100110 000010 001010 011010 010010 110010 111010 101010 100010 Q 0.5 0 0 1 2 3 13 14 15 16 17 18 19 20 21 22 23 24 25 4 12 63 26 5 11 27 62 6 10 50494847 46 31 30 29 28 7 9 61 8 51 45 32 60 52 44 33-0.5 0000 1101 1001-0.5 000011 001011 011011 010011 110011 111011 101011 100011-0.5 59 53 43 58 54 42 57 55 41 34 35 36 000001 001001 011001 010001 110001 111001 101001 100001-1 56 40 39 38 37-1 0100 1100 1000-1 000000 001000 011000 010000 110000 111000 101000 100000-1.5-1.5-1.5-1 -0.5 0 0.5 1 1.5 I 1.5-1.5-1.5-1 -0.5 0 0.5 1 1.5 I 1.5-2 -2-1.5-1 -0.5 0 0.5 1 1.5 2 I 1.5 00110 11010 10110 1111 1 00010 10010 1 1 0111 01010 0000 0.5 00011 01110 00111 01011 11110 10111 10011 0.5 0.5 1110 0110 0010 0011 0001 Q 0 01111 01101 11011 11001 11111 11101 Q 0 Q 0 0101 1000 00101 01001 10101 1010-0.5 00001 01100 11100 10001-0.5-0.5 1011 01000 1001 0100-1 00000 00100 11000 10100 10000-1 -1 1100 1101-1.5-1.5-1 -0.5 0 0.5 1 1.5 I -1.5-1.5-1 -0.5 0 0.5 1 1.5 I -1.5-1.5-1 -0.5 0 0.5 1 1.5 I
numerically-conrolled oscillaor phase-locked loop real 1 0-1 0 50 100 150 200 250 300 350 400 Sample Index inpu nco # include <liquid / liquid.h> //... in main() { // creae x/rx nco objecs nco_crcf nco_x = nco_crcf_creae(liquid_vco); nco_crcf nco_rx = nco_crcf_creae(liquid_vco); //... iniialize objecs... imag 1 0-1 3 2 0 50 100 150 200 250 300 350 400 Sample Index inpu nco floa complex * x; unsigned in i; // loop as necessary { // generae complex sinusoid nco_crcf_cexpf(nco_x, &x[i]); // compue phase error floa dphi = nco_crcf_ge_phase(nco_x) - nco_crcf_ge_phase(nco_rx); phase error [radians] 1 0-1 } // updae pll and nco objecs nco_crcf_pll_sep(nco_rx, dphi); nco_crcf_sep(nco_x); nco_crcf_sep(nco_rx); -2-3 0 50 100 150 200 250 300 350 400 Sample Index } // desry nco objec nco_crcf_desroy(nco_x); nco_crcf_desroy(nco_rx);
arbirary filer design recursive/non-recursive 20 20 0 0 0.2 0 Power Specral Densiy [db] -20-40 -60 Power Specral Densiy [db] -20-40 -60-80 G(ω) H(ω) -0.2-0.4 0 0.0625 0.125-80 -100-100 -0.4-0.2 0 0.2 0.4 Normalized Frequency -120 0 0.1 0.2 0.3 0.4 0.5 Normalized Frequency, ω/2π Power Specral Densiy [db] 0-10 -20-30 -40-50 -60-70 -80 0 0.1 0.2 0.3 0.4 0.5 Normalized Frequency arbirary non-recursive filer design (Parks-McClellan) improved square-roo Nyquis filers recursive filer design: Buerworh, Chebyshev-I/II, ellipic, Bessel
high-level communicaions srucures mulicarrier: OFDM (ofdmflexframe) header payload S0 S0... S1 H0 H1... P0 P1... P(n-1) ime guard band specral null pilo subcarrier Fs 0 Fs frequency fully configurable (like wih flexframe srucure) addiionally configurable subcarrier allocaion capable of noching specrum
high-level communicaions srucures mulicarrier: OFDM (ofdmflexframe), acual ransmission
high-level communicaions srucures mulicarrier: OFDM (ofdmflexframe), acual recepion
Resources email: jgaedder@v.edu websie: hp://ganymede.ece.v.edu projec: hp://gihub.com/jgaedder/liquid-dsp