Antenna array design¶
A linear antenna array is a row of small antennas (elements) fed with the same signal. Their waves add up strongly in one direction, the main beam, and partly cancel elsewhere. The weaker leftovers in other directions, the side lobes, pick up interference and clutter, so a radar or radio telescope wants them low. With every element on at full power, the highest side lobe is only 13.26 dB below the main beam.
One cheap way to lower it is thinning: switch some elements off. All elements stay identical and fed with the same amplitude, which keeps the hardware simple. The question is which ones to switch off.
This example uses a common test case, a thinned array of 100 elements (Haupt 1994 started this line of work with a genetic algorithm):
- 100 places, half a wavelength apart, each element on or off,
- the array is symmetric about its center, so 50 choices decide it,
- the two edge elements stay on, so the array keeps its length and its narrow main beam.
That leaves 49 free choices, about 5.6 × 10^14 designs. The best published peak side lobe level for a symmetric 100-element array is -21.33 dB, found by biogeography-based optimization (Goudos and Sahalos 2016, the best of 50 runs). The paper does not say whether its edge elements stay on. If they do not, its problem is a little easier, so -21.33 dB is a fair target here. Earlier methods reported -20.56 dB with a genetic algorithm and -20.52 dB with ant colony optimization (Mahanti et al. 2007, Quevedo-Teruel and Rajo-Iglesias 2006, as listed by Wang and Wang 2018).
The model¶
The variable is one Binary vector of 49 values: which elements of one half are on, from the center outward. The edge element is added as always on, and the other half mirrors this one.
The objective computes the array factor, the pattern of the array, at 2001 directions. With u = sin(angle from broadside), each symmetric pair of elements n = 1, 2, ... adds 2 cos(π (n - 0.5) u). The main beam is at u = 0 and ends at the first null of the pattern. The objective returns the highest point beyond it, in dB relative to the main beam. It is vectorized: one matrix product gives the patterns of a whole batch of designs.
A Binary vector leaves the number of elements on free, so the search also finds the best fill. BinarySelection would fix it, which helps only when the number of elements is given.
import numpy as np
import ypea
half = 50 # elements on each side of the center
u = np.linspace(0, 1, 2001) # u = sin(angle from broadside), one half of the symmetric pattern
# pair n (n = 1 at the center) adds 2 cos(pi (n - 0.5) u) to the pattern
pair_pattern = 2 * np.cos(np.pi * np.outer(u, np.arange(half) + 0.5))
def peak_side_lobe(sol):
edge = np.ones((len(sol.on), 1))
on = np.hstack([sol.on, edge]) # the edge element is always on
af = np.abs(on @ pair_pattern.T) # the pattern of each design
# the main beam ends at the first null, where the pattern starts to rise again
first_null = np.argmax(af[:, 1:] > af[:, :-1], axis=1)
outside = np.arange(len(u))[None, :] > first_null[:, None]
side_lobes = np.where(outside, af, 0).max(axis=1)
return 20 * np.log10(side_lobes / af[:, 0])
problem = ypea.Problem(
ypea.Binary("on", shape=half - 1),
peak_side_lobe,
vectorized=True,
name="thinned array",
)
result = ypea.ILS(max_nfe=50_000).solve(problem, seed=1)
print(result.summary())
print("elements on:", 2 * (result.best.solution.on.sum() + 1), "of", 2 * half)
ILS on thinned array
best objective value: -20.9795
feasible: True (violation 0)
evaluations: 50000, iterations: 355, time: 2.13 s, stopped by: max_nfe
elements on: 78 of 100
Differs from Python: MATLAB draws its own random numbers, so the results differ from Python's.
half = 50; % elements on each side of the center
u = linspace(0, 1, 2001); % u = sin(angle from broadside), one half of the symmetric pattern
% pair n (n = 1 at the center) adds 2 cos(pi (n - 0.5) u) to the pattern
pair_pattern = 2 * cos(pi * u' * ((1:half) - 0.5)); % one row per angle, one column per pair
problem = ypea.Problem( ...
vars=ypea.Binary("on", shape=half - 1), ...
objective=@(sol) peak_side_lobe(sol, pair_pattern), ...
vectorized=true, ...
name="thinned array");
result = ypea.ILS(max_nfe=50000).solve(problem, seed=1);
disp(result.summary())
fprintf("elements on: %d of %d\n", 2 * (sum(result.best.solution.on) + 1), 2 * half)
function level = peak_side_lobe(sol, pair_pattern)
edge = ones(size(sol.on, 1), 1);
on = [sol.on, edge]; % the edge element is always on
af = abs(on * pair_pattern'); % the pattern of each design, one row per design
% the main beam ends at the first null, where the pattern starts to rise again
rising = af(:, 2:end) > af(:, 1:end - 1);
[~, first_null] = max(rising, [], 2);
outside = (1:size(af, 2)) > first_null;
side_lobes = max(af .* outside, [], 2);
level = 20 * log10(side_lobes ./ af(:, 1));
end
ILS on thinned array
best objective value: -20.8604
feasible: true (violation 0)
evaluations: 50000, iterations: 339, time: 11.7 s, stopped by: max_nfe
elements on: 78 of 100
Iterated local search gets to -20.98 dB in about two seconds, 0.35 dB from the best published value, with 78 of the 100 elements on. More evaluations close most of the rest (see the results below). The full script, examples/applications/antenna_array.py, also draws the pattern.
Why not a classical method¶
The objective is a maximum over many directions of a sum of on or off elements, so it has no useful gradient. We tried our own simple versions of the classical alternatives on the same model:
- greedy descent, switching one element at a time, from many random starts: -20.54 dB with 50 000 evaluations, where ILS reaches -21.13 dB with the same budget (best of 5 runs each),
- an iterative Fourier method with gradual thinning (after Wang, Jiao and Tan 2012): -20.96 dB after 15 000 trials,
- a mixed integer linear program: it needs the number of elements on fixed and the edge of the main beam guessed. Even with both taken from the ILS solutions, 12 runs of a minute each reached -21.04 dB and proved no useful bound,
- cyclic difference sets of nearby lengths, cut to 100 elements: about -16 dB.
ILS beats all of them with no special setup: by 0.09 to 0.59 dB with 50 000 evaluations, and by 0.26 dB or more with the 200 000 of the results below. The margin is small in dB, but at this level every tenth of a dB is hard to win.
Results¶
Four algorithms with 10 seeded runs each, 200 000 evaluations per run. GA uses the native binary operators (space="native"). The gap is the distance of the best run from the best published -21.33 dB.
| Algorithm | Best | Mean | Worst | Gap of best |
|---|---|---|---|---|
| GA | -20.76 dB | -20.45 dB | -20.10 dB | 0.57 dB |
| TS | -21.30 dB | -21.04 dB | -20.80 dB | 0.03 dB |
| VNS | -21.09 dB | -20.95 dB | -20.69 dB | 0.24 dB |
| ILS | -21.30 dB | -21.10 dB | -20.97 dB | 0.03 dB |
Tabu search and iterated local search both reach -21.30 dB, 0.03 dB (0.14 percent) from the best published value, and ILS has the best average. The small gap comes from sampling. The two 300-element designs printed in that paper give exactly their published -24.67 and -24.70 dB when the pattern is sampled every 0.1 degree, and -24.53 and -24.64 dB on a fine grid, which catches the peaks between the samples. This model uses 2001 steps of u, close to the fine grid. Sampled every 0.1 degree, the -21.30 dB design of the figure below reads -21.33 dB, equal to the best published value.
The local search methods win here because one element switched on or off changes the pattern only a little. GA recombines two designs, which changes many elements at once.
Try it on your own array¶
Change half for a longer or shorter array. For another spacing, replace np.pi by 2π times the spacing in wavelengths (at a spacing of one wavelength or more, grating lobes as high as the main beam appear). Some other goals fit the same model:
- a fixed number of elements on (for a given number of transmit modules): use
BinarySelection("on", n=49, k=...)with k + 1 elements on in each half, - a beam steered away from broadside: one bit per element without the symmetry, the phase of each element in the pattern, and the side lobe region on both sides of the beam,
- low side lobes only in some directions (where the interference comes from): take the maximum over those directions only,
- a planar array: the same model with a two dimensional pattern, only larger.