All problems
LLR for AWGN
Problem
Return the log-likelihood ratio of a BPSK observation y over an AWGN channel with noise variance noise_var. With equally likely symbols transmitted as +1 and -1,
LLR = 2 * y / noise_var
Hint
The LLR is linear in the observation and inversely proportional to the noise power.
Test cases
case 1
in: [0.5,1]
expected: 1
case 2
in: [1,2]
expected: 1
case 3
in: [-0.25,0.5]
expected: -1
case 4
in: [2,1]
expected: 4
Starter codePython
def llr_awgn(y, noise_var):
# Your code here
pass4 test cases · run your code against them in the editor