EEE-752 Emerging Wireless Networks MIMO Simulation Riaz Hussain FA08-PCE-003 Ph.D. Student Department of Electrical Engineering COMSATS Institute of Information Technology Islamabad, Pakistan Riaz
MIMO Simulation Matlab Comparison with theoretical values BER Vs SNR (dB) 64 QAM OFDM Simulink Understanding Riaz
MIMO Simulation Input Parameters N = No of bits for simulation M = ? In MPSK 2, 4, 8, 16, 32, and 64 Output Graph BER Vs SNR (dB) Riaz
Model Alamouti OSTBC Time Slot :1 Time Slot :2 Ant: 1S1-S2* Ant: 2S2S1* Riaz
Model Channel Response (h) h = [h1h2]for time slots Signals(s) |------| | s1 -s2* | s = | | for two time slots | s2 s1* | |------| Noise (n) n = [n1n2]for two time slots Riaz
Received Signal r = h * s + n |------| | s1 -s2* | r = [h1h2] * | | + [n1n2] | s2 s1* | |------| r = [h1s1+h2s2h2S1* - h1s2*] + [n1 n2] Riaz
Decode Signal Riaz y_hat = | | | h1*r1 h2*r1 | | | | h2r2* -h1r2* | | |
Implementation (1) Generating Bit Stream Uniformly distributed random variable ip = rand(1,N) > 0.5; Equal probability for 0s and 1s Map bits to symbols BPSK sym_map=2*ip - 1; 0 -> -1 and 1 -> 1 Riaz
Implementation (2) Map symbols to s matrix Change the dimensions from 1 X N to 2 X N/2 A = reshape(sym_map, 2, N/2); Repeat s1 and s2 for two time slots sym_code = kron(A,ones(1,2)); Take conjugate, inverse-conjugate and rearrange accordingly sym_code(1,[2:2:end]) = -conj( sym_code(2,[1:2:end]) ); sym_code(2,[2:2:end]) = conj(sym_code(1,[1:2:end])); Keeping signal energy unchanged sym_code = (1/sqrt(2))*sym_code; s1 -s2* s2s1* Riaz
Implementation (3) Create Rayleigh Channel h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; Normally distributed Generate normally distributed random noise n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; White Gausian Nois e Repeating same channel for two symbols A = reshape(h,2,N/2); hMod = kron(A,ones(1,2)); Add Channel and Noise y = sum(hMod.*sym_code,1) + 10^(-Eb_No_dB(ii)/10)*n; Element by element multiplication and adding each column ii ranges from 0 to 30 Riaz
Implementation (4) Decoding the received signals Map y, the received signal array y_mod = kron(reshape(y,2,N/2),ones(1,2)); y_mod(2,[1:1:end]) = conj(y_mod(2,[1:1:end])); Modify h to map to required condition h_mod = kron(A,ones(1,2)); h_mod(1,[1:2:end]) = conj(h_mod(1,[1:2:end])); h_mod(1,[2:2:end]) = conj(h_mod(2,[2:2:end])); h_mod(2,[2:2:end]) = -conj(h_mod(1,[1:2:end])); Obtain y_hat y_hat = sum(h_mod.*y_mod,1); Equalize hEqPower = sum(h.*conj(h),1); y_hat = y_hat./hEqPower; Riaz y_hat = | | | h1*r1 h2*r1 | | | h2r2* -h1r2* | |------|
Implementation (5) Extracting the bits Using hard decision decoding ipHat = real(y_hat) > 0 Counting the errors nErr(ii) = size(find([ip - ipHat]),2); Simulating for SNR (dB); ii ranges from 0 to 30 Finding BER simBer = nErr/N; Plot the graph Riaz
Simulation BPSK N = 10^6 Riaz