Minimize sidelobe level of an array with arbitrary 2-D geometry
ARRAY_GEOMETRY = '2D_RANDOM';
HAS_NULLS = 0;
lambda = 1;
theta_tar = 60;
half_beamwidth = 10;
if HAS_NULLS
theta_nulls = [95 110 120 140 225];
end
if strcmp( ARRAY_GEOMETRY, '2D_RANDOM' )
rand('state',0);
n = 40;
L = 5;
loc = L*rand(n,2);
angleRange = 360;
elseif strcmp( ARRAY_GEOMETRY, '1D_UNIFORM_LINE' )
n = 30;
d = 0.45*lambda;
loc = [d*[0:n-1]' zeros(n,1)];
angleRange = 180;
elseif strcmp( ARRAY_GEOMETRY, '2D_UNIFORM_LATTICE' )
m = 6; n = m^2;
d = 0.45*lambda;
loc = zeros(n,2);
for x = 0:m-1
for y = 0:m-1
loc(m*y+x+1,:) = [x y];
end
end
loc = loc*d;
angleRange = 360;
else
error('Undefined array geometry')
end
theta = [1:angleRange]';
A = kron(cos(pi*theta/180), loc(:,1)') + kron(sin(pi*theta/180), loc(:,2)');
A = exp(2*pi*i/lambda*A);
[diff_closest, ind_closest] = min( abs(theta - theta_tar) );
Atar = A(ind_closest,:);
if HAS_NULLS
Anull = []; ind_nulls = [];
for k = 1:length(theta_nulls)
[diff_closest, ind_closest] = min( abs(theta - theta_nulls(k)) );
Anull = [Anull; A(ind_closest,:)];
ind_nulls = [ind_nulls ind_closest];
end
end
ind = find(theta <= (theta_tar-half_beamwidth) | ...
theta >= (theta_tar+half_beamwidth) );
if HAS_NULLS, ind = setdiff(ind,ind_nulls); end;
As = A(ind,:);
cvx_begin
variable w(n) complex
minimize( max( abs(As*w) ) )
subject to
Atar*w == 1;
if HAS_NULLS
Anull*w == 0;
end
cvx_end
disp(['Problem is ' cvx_status])
if ~strfind(cvx_status,'Solved')
return
end
min_sidelobe_level = 20*log10( max(abs(As*w)) );
fprintf(1,'The minimum sidelobe level is %3.2f dB.\n\n',...
min_sidelobe_level );
figure(1), clf
plot(loc(:,1),loc(:,2),'o')
title('Antenna locations')
if angleRange == 180,
theta = [1:360]';
A = [ A; -A ];
end
y = A*w;
figure(2), clf
ymin = floor(0.1*min_sidelobe_level)*10-10; ymax = 0;
plot([1:360], 20*log10(abs(y)), ...
[theta_tar theta_tar],[ymin ymax],'r--',...
[theta_tar+half_beamwidth theta_tar+half_beamwidth],[ymin ymax],'g--',...
[theta_tar-half_beamwidth theta_tar-half_beamwidth],[ymin ymax],'g--');
if HAS_NULLS
hold on;
for k = 1:length(theta_nulls)
plot([theta_nulls(k) theta_nulls(k)],[ymin ymax],'m--');
end
hold off;
end
xlabel('look angle'), ylabel('mag y(theta) in dB');
axis([0 360 ymin ymax]);
figure(3), clf
zerodB = -ymin;
dBY = 20*log10(abs(y)) + zerodB;
ind = find( dBY <= 0 ); dBY(ind) = 0;
plot(dBY.*cos(pi*theta/180), dBY.*sin(pi*theta/180), '-');
axis([-zerodB zerodB -zerodB zerodB]), axis('off'), axis('square')
hold on
plot(zerodB*cos(pi*theta/180),zerodB*sin(pi*theta/180),'k:')
plot( (min_sidelobe_level + zerodB)*cos(pi*theta/180), ...
(min_sidelobe_level + zerodB)*sin(pi*theta/180),'k:')
text(-zerodB,0,'0 dB')
tt = text(-(min_sidelobe_level + zerodB),0,sprintf('%0.1f dB',min_sidelobe_level));
set(tt,'HorizontalAlignment','right');
theta_1 = theta_tar+half_beamwidth;
theta_2 = theta_tar-half_beamwidth;
plot([0 55*cos(theta_tar*pi/180)], [0 55*sin(theta_tar*pi/180)], 'k:')
plot([0 55*cos(theta_1*pi/180)], [0 55*sin(theta_1*pi/180)], 'k:')
plot([0 55*cos(theta_2*pi/180)], [0 55*sin(theta_2*pi/180)], 'k:')
if HAS_NULLS
for k = 1:length(theta_nulls)
plot([0 55*cos(theta_nulls(k)*pi/180)], ...
[0 55*sin(theta_nulls(k)*pi/180)], 'k:')
end
end
hold off
Calling SDPT3: 1025 variables, 81 equality constraints
For improved efficiency, SDPT3 is solving the dual problem.
------------------------------------------------------------
num. of constraints = 81
dim. of socp var = 1023, num. of socp blk = 341
dim. of free var = 2 *** convert ublk to lblk
*******************************************************************
SDPT3: Infeasible path-following algorithms
*******************************************************************
version predcorr gam expon scale_data
NT 1 0.000 1 0
it pstep dstep pinfeas dinfeas gap mean(obj) cputime
-------------------------------------------------------------------
0|0.000|0.000|2.9e+02|1.5e+02|1.2e+04|-1.373142e-10| 0:0:00| chol 1 1
1|0.990|0.990|3.0e+00|1.6e+00|1.4e+02|-9.597558e+00| 0:0:00| chol 1 1
2|1.000|1.000|1.3e-06|1.0e-02|1.4e+01|-7.117487e+00| 0:0:00| chol 1 1
3|1.000|0.975|2.0e-06|1.2e-03|3.6e-01|-1.804629e-01| 0:0:01| chol 1 1
4|1.000|0.391|7.2e-06|7.9e-04|2.4e-01|-1.246850e-01| 0:0:01| chol 2 2
5|1.000|0.266|9.0e-06|5.8e-04|1.8e-01|-1.029434e-01| 0:0:01| chol 2 2
6|1.000|0.346|2.7e-06|3.8e-04|1.2e-01|-8.539203e-02| 0:0:01| chol 2 2
7|1.000|0.365|7.5e-07|2.4e-04|7.1e-02|-8.043076e-02| 0:0:01| chol 2 3
8|1.000|0.444|3.7e-07|1.4e-04|3.4e-02|-7.711619e-02| 0:0:02| chol 2 2
9|0.980|0.819|5.3e-08|2.8e-05|6.8e-03|-6.968323e-02| 0:0:02| chol 2 2
10|0.732|0.773|2.1e-08|6.2e-06|2.4e-03|-6.978234e-02| 0:0:02| chol 2 2
11|0.675|0.835|1.2e-08|1.3e-06|8.5e-04|-7.001296e-02| 0:0:02| chol 2 2
12|0.761|0.859|4.0e-09|3.7e-07|2.3e-04|-7.021114e-02| 0:0:02| chol 2 2
13|0.956|0.894|4.2e-10|9.6e-08|2.3e-05|-7.029424e-02| 0:0:03| chol 3 3
14|0.927|0.906|3.2e-10|9.4e-09|3.1e-06|-7.030099e-02| 0:0:03| chol 3 4
15|0.933|0.883|1.6e-08|1.3e-09|3.9e-07|-7.030362e-02| 0:0:03| chol 5 4
16|0.571|0.944|2.0e-08|2.0e-10|1.8e-07|-7.030405e-02| 0:0:03| chol 5 6
17|0.546|0.943|2.2e-08|1.7e-10|9.6e-08|-7.030432e-02| 0:0:03| chol 7 8
18|0.537|0.943|2.5e-08|2.3e-10|5.3e-08|-7.030434e-02| 0:0:03| chol
warning: symqmr failed: 0.3
switch to LU factor. lu 4 3
19|0.540|0.943|3.0e-08|3.4e-10|2.9e-08|-7.030402e-02| 0:0:04| lu 2 2
20|0.542|0.943|2.4e-08|5.1e-10|1.6e-08|-7.030377e-02| 0:0:04| lu 3 10
21|0.545|0.943|2.4e-08|7.7e-10|8.8e-09|-7.030341e-02| 0:0:04| lu 4 3
22|0.546|0.943|1.7e-08|1.1e-09|4.9e-09|-7.030308e-02| 0:0:04| lu 2 4
23|0.551|0.934|1.3e-08|9.3e-10|2.7e-09|-7.030266e-02| 0:0:04|
stop: max(relative gap, infeasibilities) < 1.49e-08
-------------------------------------------------------------------
number of iterations = 23
primal objective value = -7.03032224e-02
dual objective value = -7.03020901e-02
gap := trace(XZ) = 2.70e-09
relative gap = 2.37e-09
actual relative gap = -9.93e-07
rel. primal infeas = 1.27e-08
rel. dual infeas = 9.30e-10
norm(X), norm(y), norm(Z) = 4.6e-01, 1.1e+02, 1.6e+00
norm(A), norm(b), norm(C) = 1.7e+02, 2.0e+00, 2.4e+00
Total CPU time (secs) = 4.5
CPU time per iteration = 0.2
termination code = 0
DIMACS: 1.3e-08 0.0e+00 1.1e-09 0.0e+00 -9.9e-07 2.4e-09
-------------------------------------------------------------------
------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +0.0703021
Problem is Solved
The minimum sidelobe level is -23.06 dB.