argmin function for communication system

8 visualizzazioni (ultimi 30 giorni)
Jose Iglesias
Jose Iglesias il 6 Apr 2023
Modificato: Torsten il 6 Apr 2023
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 Commenti
Torsten
Torsten il 6 Apr 2023
Modificato: Torsten il 6 Apr 2023
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.
Jose Iglesias
Jose Iglesias il 6 Apr 2023
Thanks. I will try your method.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Test and Measurement in Help Center e File Exchange

Prodotti


Release

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by