Minimize norm of the complex number array with subtraction of a variable
조회 수: 5 (최근 30일)
이전 댓글 표시
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;
댓글 수: 0
채택된 답변
Torsten
2022년 1월 21일
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
Torsten
2022년 1월 22일
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)).
추가 답변 (1개)
Alan Weiss
2022년 1월 21일
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
Alan Weiss
2022년 1월 21일
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)
Alan Weiss
MATLAB mathematical toolbox documentation
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!