<< Chapter < Page | Chapter >> Page > |
%% Symbols to Words (RECEIVER)
% ------------------------------------------------------------------------% Description: Converts the received symbols from the OFDM symbol spectrum
% into binary words. It does this by correlating the received% symbol with the entire symbol map through a minimization of
% the absolute value of the difference with each. Note that% if one uses multiple constellation points in the same
% quandrant of the complex plane, it may be necessary to add% additional logic here, or ensure the channel effect is
% removed by equalization.%
% Inputs: symbols - Symbols extracted from the OFDM symbol% word_to_symbol_map - The complex symbols indexed by the binary
% word they represent.% Outputs: words - Closest matched binary words after comparisonfunction words = sym2w(symbols, word_to_symbol_map)
%%num_subcarriers = size(symbols,2); % Implicit number of sub-carriers
bits_per_symbol = log2(size(word_to_symbol_map,2));% Implicit number of bits per symbol to represent each word
words = zeros(num_subcarriers, bits_per_symbol); % Initialized arrayfor n=1:num_subcarriers
[v i]= min(abs(word_to_symbol_map-symbols(n)));
% Subtract each symbol with every symbol in the map, and find the% minimum absolute value. This is a great estimate for finding the
% received word.word = dec2bin(i-1,bits_per_symbol); % Convert index to binary string
for m=1:bits_per_symbolwords(n,m) = str2num(word(m)); % Convert string to number
endend
end
Notification Switch
Would you like to follow the 'Fully configurable ofdm sdr transceiver in labview' conversation and receive update notifications?