Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Calculation of LLR values with variable noise variance 1.0

Date Added: May 19, 2013  |  Visits: 384

LLR_DEMOD LLR Demodulator H = LLR_DEMOD_MEX(CONSTELLATION, MAPPING, METHOD) constructs a LLR demodulator object H for a given constellation, mapping and noise variance. The vectors CONSTELLATION and MAPPING are usually generated by using MATLAB Modem Modulation Modem. and contain the complex or real constellations points and the bit mapping, but in generall any signal constellation and any bit-mapping can be used. METHOD determines whether the exact LLR values or the approximations are calculated. (for more information: http://www.mathworks.com/help/toolbox/comm/ug/bqwswmc-1.html) A LLR demodulator object is equipped with one function: - CALC_LLR (type "help llr_demod/calc_llr" for detailed help) Input: CONSTELLATION [1xM] MAPPING [1xM] Method ['exact', 'approx']Output: H [1x1]Important: Before you can start you have to compile the mex-file mex_calc_llr.cpp by executing compile_mex_calc_llr.m. There is a test file and a small example of a simulation framework which will be extended in future updates. The old files can be found in the subdirectory OLD.#######################################These are the basic commands lines:llr_demod_obj = mex_llr_demod(Constellation,Mapping,Methode); generate objectllr = calc_llr(llr_demod_obj,r,noise_var); % calculate llr values New: Noise_var don't have to be a scalar value, but may be a vector of the same length as vector r.########################################Small example of a simulation framework:EbN0 = 5; %dBM = 16; % 2, 4, 16, 64 .... - QAMfading = 1; % fading on/off get M-QAM constellation and mappingh_mw = modem.qammod('M',M,'InputType', 'Bit','SymbolOrder','Gray');constellation = h_mw.Constellation;mapping = h_mw.SymbolMapping; get variance of signal constellation (needed for the calculation of the noise variance)sigma_a2 = sum(abs((constellation - mean(constellation))).^2/length(constellation)); calculation of the noise varianceEsN0 = 10*log10(10.^(EbN0/10) * log2(M));sigma_n2 = sigma_a2./(10.^(EsN0./10));llr_demod_obj = mex_llr_demod(constellation,mapping,'exact'); generate objectfor i = 1:100 % demodulate 100 frames of 1000 M-QAM Symbols generate bitstream u = randi([0 1],1000*log2(M),1); do modulation with matlab object x = modulate(h_mw,u); generate fading factors if fading H = 1/sqrt(2)*randn(size(x)) + 1i * 1/sqrt(2) * randn(size(x)); else H = 1; end calculate received signal r = x.*H + sqrt(0.5*sigma_n2)*randn(size(x)) + 1j * sqrt(0.5*sigma_n2)*randn(size(x)); do Zero Forcing Equalization r_hat = r./H; do demodulation (with variable NOISE_VAR sigma_n2./abs(H).^2) llr = calc_llr(llr_demod_obj, r_hat, sigma_n2./abs(H).^2); end

 Requirements: No special requirements Platforms: Matlab Keyword: Basic,  Bit Symbolorder Gray Constellation,  Calculation,  Commands,  Fading,  Frameworkebn,  Length,  Mappingh,  Modemqammod Inputtype,  Mwconstellationmapping,  Mwsymbolmapping,  Needed,  Oldthese,  Onoff,  Qamfading,  Rsmall,  Scalar,  Subdirectory,  Vector Users rating: 0/10