Digital Signal Processing Reference
In-Depth Information
Const_Table = [(-.7071 - .7071*j) (-.7071 + .7071*j)
(.7071 - .7071*j) (.7071 + .7071*j)];
elseif ( CONST == 3)
Const_Table = [(1 + 0j) (.7071 + .7071i) (-.7071 + .7071i)
(0 + i) (-1 + 0i) (-.7071 - .7071i) ...
(.7071 - .7071i) (0 - 1i)];
elseif(CONST == 4)
% 16 QAM constellation table
Const_Table = [(1 + j) (3 + j) (1 + 3j) (3 + 3j) (1 - j)
(1 - 3j) (3 - j) (3 - 3j) ...
(-1 + j) (-1 + 3j) (-3 + j) (-3 + 3j)
(-1 -j) (-3 - j) (-1 - 3j) (-3 - 3j)];
end
% Generating training from [12] %
% Training data is modulated using BPSK
if L==2
C=[11-11111-111-11-1-1-11];
elseif L == 4
C=[11-11111-1];
elseif L == 8
C = [1 1 -1 1];
elseif L == 16
C=[11];
end
if L==2
Sign_Pattern = [1 1];
elseif L == 4
Sign_Pattern = [-1 1 -1 -1];
elseif L == 8
Sign_Pattern = [1 1 -1 -1 1 -1 -1 -1];
elseif L == 16
Sign_Pattern = [1 -1 -1 111-1-11-111-11-1-1];
end
Training = [];
for i=1:L
Training = [Training Sign_Pattern(i)*C];
end
Length_Training = length(Training);
Length_Frame = Length_Training + DATA_SIZE;
% Modulated frame generation %
Frame_Blocks = [];
Data_Blocks = [];
for n = 1:NO_OF_FRAMES
Data = (randn(1,DATA_SIZE*CONST)>0);
% Bits to symbols
DataSymbols = reshape(Data,CONST,length(Data)/CONST);
% Symbols to constellation table indices
Table_Indices = 2.^(CONST-1:-1:0) * DataSymbols + 1;
Search WWH ::




Custom Search