def receiver_with_blr(y, H, cons): beta = int(log2(len(cons))) # creation de w reel = [pow(2, i) for i in range(beta // 2 - 1, -1, -1)] im = [1j * pow(2, i) for i in range(beta // 2 - 1, -1, -1)] w = concatenate((reel, im), axis=None) A = bit_lvl_repr(H, w) mes = array(mimo_ml(y, A, [-1, 1])) mes[mes == -1] = 0 return mes
def receiver_with_blr(y, H, cons, noise_var): # Create w beta = int(log2(len(cons))) reel = [pow(2, i) for i in range(beta // 2 - 1, -1, -1)] im = [1j * pow(2, i) for i in range(beta // 2 - 1, -1, -1)] w = concatenate((reel, im), axis=None) # Compute bit level representation A = bit_lvl_repr(H, w) mes = array(mimo_ml(y, A, [-1, 1])) mes[mes == -1] = 0 return mes
def receiver_without_blr(y, H, cons, noise_var): return qam.demodulate(mimo_ml(y, H, cons), 'hard')