image thumbnail

WiMAX 802.16e PHY and MAC (beta)

by

 

11 Aug 2008 (Updated )

WiMAX Physical and MAC Layer

Data.m
clear;
clc;
%--------------------------------------------------------------------------------------------------------
% Part 1
% Test Data for the WiMAX PHY Layer from Document 'ETSI TS 102 177 V1.3.2(2006-03)'
%--------------------------------------------------------------------------------------------------------
input_data = sscanf(['45 29 C4 79 AD 0F 55 28 AD 87 B5 76 1A 9C 80 50 45 1B 9F D9 2A '...
                     '88 95 EB AE B5 2E 03 4F 09 14 69 58 0A 5D'], '%x');
randomized_data = sscanf(['D4 BA A1 12 F2 74 96 30 27 D4 88 9C 96 E3 A9 52 B3 15 AB FD 92 '...
                          '53 07 32 C0 62 48 F0 19 22 E0 91 62 1A C1'],'%x');
rs_encoded_data = sscanf(['49 31 40 BF D4 BA A1 12 F2 74 96 30 27 D4 88 9C 96 E3 A9 52 B3 '...
                          '15 AB FD 92 53 07 32 C0 62 48 F0 19 22 E0 91 62 1A C1 00'],'%x');
conv_encoded_data = sscanf(['3A 5E E7 AE 49 9E 6F 1C 6F C1 28 BC BD AB 57 CD BC CD E3 A7 92 '...
                            'CA 92 C2 4D BC 8D 78 32 FB BF DF 23 ED 8A 94 16 27 A5 65 CF 7D '...
                            '16 7A 45 B8 09 CC'],'%x');
interleaved_data = sscanf(['77 FA 4F 17 4E 3E E6 70 E8 CD 3F 76 90 C4 2C DB F9 B7 FB 43 6C '...
                           'F1 9A BD ED 0A 1C D8 1B EC 9B 30 15 BA DA 31 F5 50 49 7D 56 ED '...
                           'B4 88 CC 72 FC 5C'],'%x');
%--------------------------------------------------------------------------------------------------------
% Part 2
% Forward Error Correction (FEC):
% Generator and Primitive Polynomials
% Generator Polynomial is a Galois Field Array [1 59  13 104 189 68 209 30 8 163 65 41 229 98 50 36 59]
% Primitive Polynomial is [1 0 0 0 1 1 1 0 1]
%--------------------------------------------------------------------------------------------------------
Gen_Poly = [1 gf(2,8)^0];
for Index = 1 : 15
    Gen_Poly = conv(Gen_Poly, [1 gf(2,8)^Index]);
end

Prim_Poly = [1 0 0 0 1 1 1 0 1];
%--------------------------
% Interleaver
% Ncbps 384, 768, 1152 for QPSK, 16-QAM, 64-QAM Respectively
% Ncpc 2, 4, 6 for QPSK, 16-QAM, 64-QAM  

Ncbps = 384;
Ncpc = 2;
k = 0 : Ncbps - 1;
mk = (Ncbps/12) * mod(k,12) + floor(k/12);

s = ceil(Ncpc/2);
jk = s * floor(mk/s) + mod(s, mk + Ncbps - floor(12 * mk/Ncbps));

[s,int_idx]=sort(jk);

%End Part 2
%-------------------------------------------------------------------------
%QPSK Modulator
Ry = ones(2,1)*[+1 -1];
Iy = [+1 -1]'*ones(1,2);
qamconst = Ry + j * Iy;
qamconst = qamconst(:)/sqrt(2);

Contact us