argmin function for communication system

I can use assistance implementing a minimum distance decoder with Matlab to estimate the transmitted symbol as from the computed received signal which is y = h * x + w. The decoder estimates the transmitted symbol as . So, this is where the function attains its minimal value, which in this case is the minimum distance of the transmitted symbol. I am not certain how to implement this into Matlab. I included my current Matlab code shown below which creates 1e4 independent realizations each of h, x, and w for the input-output model y = h · x + w, and so what I need assistance with is the Matlab code for the 1e4 realizations of the decoder. I did find an argmin function from the Mathworks forum which I included at the very bottom of my Matlab code and ran it and I get a result but I am not certain if this is correct. Any assistance is greatly appreciated. Thank you in advance!
% random transmitted symbol x generations
N = 1e4;
c_vals = [-2-2*1i, -2+2*1i, 2-2*1i,2+2*1i];
idx = randi(4,N,1);
x = c_vals(idx)'
% channel h generations
N = 1e4
h = 1/sqrt(2) * (randn(N,1) + 1i*randn(N,1))
mean(h)
var(h)
% noise generations
numRealizations = 1e4; % number of independent realizations
sigma2_w = 0.1; % noise variance
w = sqrt(sigma2_w/2)*(randn(numRealizations, 1) + 1j*randn(numRealizations, 1))
y = h.*x + w
X = argmin(abs(y-h.*x).^2)
function [I,M]=argmin(varargin)
[M,I] = min(varargin{:});
end

4 个评论

xhat is a single complex value ?
Torsten,
The problem is dealing with a flat fading channel using 4-QAM modulation for the input-output model y = h*x + w. So the 4-QAM has 4 points and I produced 1e4 independent realizations of the 4 points shown below so there are real and imaginary components for each realization of x. I am assuming if x had real and imaginary components, the xhat formula which takes the absolute value and squares it only accounts for the real part. When I ran the code, the argmin function produced a number of X = 7819 but at the momemnt I am reasearching what this value really means.
I am assuming if x had real and imaginary components, the xhat formula which takes the absolute value and squares it only accounts for the real part.
No. It's the norm squared of a complex vector, namely y = h*x + w. The norm is defined as ||y||^2 = y'*y where y' is the conjugate transpose of y.
My guess is that your problem is solved by x = h\(y-w).
At least for all variables being real,
xhat = A\b
minimizes ||A*x-b|| in the 2-norm.
Thanks. I will try your method.

请先登录,再进行评论。

回答(0 个)

产品

版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by