fmincon error for DOA estimation antenna array uncertainties

4 ビュー (過去 30 日間)
Murdifi Bin Muhammad
Murdifi Bin Muhammad 2019 年 12 月 31 日
So I've been trying to modify MATLAB's example which you may refer to the following link:
You may also refer to the code that I tried to modified here:
Auto calibration of linear array antenna position for DOA estimation
close all
clc
format short
fc = 5.5e9;
c = physconst('Lightspeed');
lambda = c/fc;
M = 4;
array = phased.ULA(M,lambda/2);
perfect array
designed_pos = getElementPosition(array);
%designed_pos = [zeros(1,M);-(M-1)/2:(M-1)/2;zeros(1,M)]*0.5
imperfect array
rng default
pos_std = 0.02;
perturbed_pos = designed_pos + pos_std*[randn(2,M);zeros(1,M)];
%assume reference sensor has no uncertainties
perturbed_pos(:,1) = designed_pos(:,1);
%x axis is fixed down by assuming the x-location of another sensor is known
perturbed_pos(1,2) = designed_pos(1,2) ;
visualising the array imperfections
helperCompareArrayProperties2('Position',perturbed_pos,designed_pos,...
{'Perturbed Array','Deployed Array'})
view(90,90)
degradation of DOA Estimation
%generate 100K samples with 30db SNR
ncov = db2pow(-30);
K = 1e5;
incoming_az = [-20,40];
N = length(incoming_az);
[x_pert,~,Rxx] = sensorsig(perturbed_pos,K,incoming_az,ncov)
%estimate the directions of the sources
spatialspectrum = phased.BeamscanEstimator('SensorArray',array,...
"DOAOutputPort",true,'NumSignals',N)
[y,estimated_az] = spatialspectrum(x_pert);
incoming_az
estimated_az %estimated DOA based on perturbed system
self calibration
%create a function handle
fun = @(x_in)helperMUSICIteration(x_in,Rxx,designed_pos)
nvars = 2*M - 3 + N; %assume 2D uncertainties
%initial value
x0 = [0.1*randn(1,nvars - N),estimated_az]
%location tolerance
locTol = 0.1
%angle tolerance
angTol = 20
%lower bound
lb = [-locTol*ones(nvars-N,1);estimated_az.'-angTol]
%upper bound
ub = [locTol*ones(nvars-N,1);estimated_az.'+angTol]
options = optimoptions('fmincon','TolCon',1e-6,'DerivativeCheck','on',...
'Display','off')
[x,fval,exitflag] = fmincon(fun,x0,[],[],[],lb,ub,[],options)
%parse the final result
[~,perturbed_pos_est,postcal_estimated_az] = helperMUSICIteration(...
x,Rxx,designed_pos)
The error I've got was:
Error using fmincon (line 301)
Row dimension of Aeq is inconsistent with length of beq.
I've been trying to troubleshoot and look for the problem in detail but i still cannot find it. I would appreciate all the help I could get.
Thanks in advance!
Murdifi

採用された回答

Mary Fenelon
Mary Fenelon 2020 年 1 月 2 日
You are missing a placeholder empty arragy argument for beq in your call to fmincon.
  1 件のコメント
Murdifi Bin Muhammad
Murdifi Bin Muhammad 2020 年 1 月 3 日
Oh yes. I wonder how did I missed the placeholder! It works now. Thank you!
M

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDirection of Arrival Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by