Code covered by the BSD License  

Highlights from
MB OFDM Transmission

image thumbnail

MB OFDM Transmission

by

 

Matlab code which implements MB-OFDM transmission block as per ECMA 368 standard.

cyclicIntrlv(inputBits,shift,bitsPerSymbol)
function [interleavedBits] = cyclicIntrlv(inputBits,shift,bitsPerSymbol)
% Does intra-symbol cyclic shifts 
%   interleavedBits = cyclicIntrlv(shift,bitsPerSymbol)
%   
%   'interleavedBits'   - Bits which are shifted for each block of
%                     'bitsPerSymbol'.
%   'inputBits'         - Bits which are coded and tone interleaved.
%`  'shift'             - N(cyc) shift value to be used for cyclic shift.
%   'bitsPerSymbol'     - Number of bits per OFDM symbol.

% Check 'shift' value
if (shift ~= 33) && (shift ~= 66)
    error('Invalid shift value for cyclic interleaving');
end

% Check 'bitsPerSymbol' value
if (bitsPerSymbol ~= 100) && (bitsPerSymbol ~= 200)
    error('Invalid number of bits per OFDM symbol');
end

% Check size of 'inputsBits' for a multiple of 'bitsPerSymbol'
if (mod(size(inputBits),bitsPerSymbol) ~= 0)
    error('Incompatible size of coded bits vector');
end

% Create permute matrix for symbol interleaving
permuteMatrix  = zeros(1,(6*bitsPerSymbol));
for i=0:(length(permuteMatrix)-1)
    m = floor(i/bitsPerSymbol);
    permuteMatrix(i+1) = ((m)*bitsPerSymbol +  mod(i + m * shift,bitsPerSymbol)) + 1;
end

interleavedBits = zeros(size(inputBits));

% Do cyclic block by block over the input bits
for i=1:(length(inputBits)/length(permuteMatrix))
    offset = (i-1)*length(permuteMatrix);
    interleavedBits(offset + 1 : offset + length(permuteMatrix)) =  intrlv(inputBits(offset + 1 : offset + length(permuteMatrix)),permuteMatrix);
end

    
    

Contact us