Minimize norm of the complex number array with subtraction of a variable

5 views (last 30 days)
data_info_bit = randi([0,1],N_bits_perfram,1); %Random Bit Generation
data_temp = bi2de(reshape(data_info_bit,N_syms_perfram,M_bits)); %Data
x = qammod(data_temp,M_mod,'gray'); %Symbols
x = reshape(x,N,M);
s = OTFS_modulation(N,M,x); %Time Signal
s_sub = mat2cell(s.', 1, (M*ones(1,N)));
for ii = 1:N
.....
s(ii*M-M+1:M*ii) = s(ii*M-M+1:M*ii) - rdc;
x_ccdf_rdc(1,:) = s'*sqN; % #Nblc Signal
CFx_rdc(ii,ifram)=PAPR(x_ccdf_rdc(1,:)); %Crest Factors
ik = ik + 1;
end
I am dividing the time signal into sub-blocks, trying to find the optimum complex number (rdc) that minimizes the norm of the sub-blocks. This rdc needs to be extracted from each sub-block element. I was using CVX optimization as below in dotted line but I am iterating more than 1e4 and this is taking a lot of time. Is there any function in optimization toolbox which can i use ?
cvx_begin;
variable rdc complex;
minimize(max(abs(s_sub{ii} - rdc)));
cvx_end;

Accepted Answer

Torsten
Torsten on 21 Jan 2022
for ii = 1:N
rng default
rdc0 = 1+1i; % You add one complex value to try to minimize the resulting sum of squares
fun = @(rdc_1)abs(rdc_1 - s(ii*M-M+1:M*ii)); % x expands to the size of M
[rdc_1,res] = fminimax(fun,rdc0);
rdc_1s = [rdc_1s rdc_1];
s_1(ii*M-M+1:M*ii) = s(ii*M-M+1:M*ii) - rdc_1;
end
  5 Comments
Torsten
Torsten on 22 Jan 2022
I just observed that you will have to replace the line
fun = @(rdc_1_r,rdc_1_i) (rdc_1_r-real(s(ii*M-M+1:M*ii))).^2+(rdc_1_i-imag(s(ii*M-M+1:M*ii))).^2;
by
fun = @(rdc_1_r,rdc_1_i) sqrt((rdc_1_r-real(s(ii*M-M+1:M*ii))).^2+(rdc_1_i-imag(s(ii*M-M+1:M*ii))).^2);
If not, you find rc that minimizes max((abs(rc-s))^2), not max(abs(rc-s)).
Ahmet Sacid Sümer
Ahmet Sacid Sümer on 23 Jan 2022
Thank you. My goal is minimize the power so, i need to minimize max((abs(rc-s))^2) but is it make a difference ? if i find rc that minimizes the max(abs(rc-s)) that is mean also i find that minimize the max((abs(rc-s))^2) ?
My question is why do i use rng default. Is it not necessary right ?
Because when I used this I got the same symbols even though I wanted full randomness.
data_info_bit = randi([0,1],N_bits_perfram,1); %Random Bit Generation
from this line i think. But when i removed i, got fluctuating BER-SNR graph interestingly

Sign in to comment.

More Answers (1)

Alan Weiss
Alan Weiss on 21 Jan 2022
I am not sure that I understand exactly what you are doing, but if you are willing to accept a least squares solution (rather than minimum absolute value) then you can probably use lsqnonlin to minimize the complex norm. See Complex Numbers in Optimization Toolbox Solvers.
Alan Weiss
MATLAB mathematical toolbox documentation
  3 Comments
Alan Weiss
Alan Weiss on 21 Jan 2022
Try this:
rng default
M = 100*randn(10,1) + 100*randn(10,1)*1i; % 10 random complex points
x0 = 1+i; % You add one complex value to try to minimize the resulting sum of squares
fun = @(x)(x-M); % x expands to the size of M
[x,res] = lsqnonlin(fun,x0)
Local minimum possible. lsqnonlin stopped because the size of the current step is less than the value of the step size tolerance.
x = 62.4282 + 70.4894i
res = 4.1568e+05
Alan Weiss
MATLAB mathematical toolbox documentation
Ahmet Sacid Sümer
Ahmet Sacid Sümer on 21 Jan 2022
N = 4;
M = 16;
M_mod = 4;
M_bits = log2(M_mod);
N_syms_perfram = N*M;
N_bits_perfram = N*M*M_bits;
data_info_bit = randi([0,1],N_bits_perfram,1); %Random Bit Generation
data_temp = bi2de(reshape(data_info_bit,N_syms_perfram,M_bits)); %Data
x = qammod(data_temp,M_mod,'gray'); %Symbols
x = reshape(x,N,M);
s = OTFS_modulation(N,M,x); %Time Signal
rdc_1s = [];
rdc_2s = [];
for ii = 1:N
rng default
rdc0 = 1+1i; % You add one complex value to try to minimize the resulting sum of squares
fun = @(rdc_1)(rdc_1 - s(ii*M-M+1:M*ii)); % x expands to the size of M
[rdc_1,res] = lsqnonlin(fun,rdc0);
rdc_1s = [rdc_1s rdc_1];
s_1(ii*M-M+1:M*ii) = s(ii*M-M+1:M*ii) - rdc_1;
end
% CVX Optimization
for ii = 1:N
cvx_begin;
variable rdc_2 complex;
minimize(max(abs(s(ii*M-M+1:M*ii) - rdc_2)));
cvx_end;
rdc_2s = [rdc_2s rdc_2];
s_2(ii*M-M+1:M*ii) = s(ii*M-M+1:M*ii) - rdc_2;
end
It did not work. Convex work properly. s_1 should be almost equal to s_2. Also i get this
Local minimum found.
Optimization completed because the size of the gradient is less than
the value of the optimality tolerance.
<stopping criteria details>

Sign in to comment.

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!