# Synthesizing an Array from a Specified Pattern: An Optimization Workflow

By Honglei Chen and Rick Gentile, MathWorks

In applications that use sensor arrays, such as WLAN, LTE, and 5G wireless communications systems, phased array radars, and acoustic beamforming systems, the design starting point is often an array pattern that satisfies certain performance criteria. These criteria can include parameters such as the mainlobe directivity and width, the null locations, and sidelobe levels.

Because arrays often comprise hundreds or even thousands of elements, it can take many iterations to converge on an architecture that produces the desired pattern. The iterations take time, and they are difficult to complete thoroughly when multiple parameters need to be considered.

Optimization techniques can greatly increase the efficiency of the array synthesis process. You can evaluate a pattern over a range of weights and element positions, and each iteration of the automated process can be used to evaluate how a generated pattern compares to the desired pattern.

This article describes a workflow that uses Phased Array System Toolbox™ and optimization techniques from Optimization Toolbox™ and Global Optimization Toolbox™ to converge on a solution. The workflow can then be adapted to your own application.

The code used in this example is available for download.

## Design Options and Constraints

To ensure that the solution meets the design goals, it’s important to understand your design options and to know which constraints need to be taken into account in the optimization process.

The parameters that most influence the array pattern include the number of elements in the array, the lattice structure of those elements, and the array geometry. Within the array, the parameters associated with each element also determine the beam pattern characteristics, including the weights applied to each element (amplitude or phase) and the element’s location within the array. These parameters serve effectively as "knobs" that you can turn to meet your performance goals.

For multi-element arrays, the degrees of freedom in the design will vary based on the cost and complexity constraints of the end application. For example, in the most basic systems, amplitude-only weights are available. However, many architectures support complex weighting for elements or subarrays, providing both amplitude and phase control. With this type of architecture, the beam can be steered and shaped electronically (Figure 1).

The array geometry in a design is usually driven by the constraints of the end-system form factor, but the spacing between individual elements may be flexible. Usually, however, this flexibility is constrained by what can actually be manufactured. For example, the elements can't be too close together or they will not be realizable when you go to build them.

To show how these options and constraints are incorporated into the optimization workflow, we’ll describe two examples. In the first, we use an 8-element linear array with uniform spacing to generate a set of element weights, focusing on matching a known pattern. In the second, we build a planar array where the element weights and element positions will converge to achieve a set of array performance objectives. That is, we expand beyond weights to element positions, showing how, by putting constraints into the optimization problem, you can shape the pattern to meet requirements.

## Example 1: Optimizing Weights Only

In this example we’ll complete the following steps (Figure 2):

- Identify the desired pattern
- Develop a cost function to minimize the distance between the starting pattern and the desired pattern
- Run the optimization
- View the pattern with generated weights and compare it to the desired pattern

We start with a desired 2D pattern, Beam_d, which is specific to a set of azimuth and elevation angles. We then build a cost function to minimize the distance between the desired pattern, Beam_d, and the pattern generated from the weighting vector, weights_o. Our initial conditions for the optimization are based on uniform weighting. This pattern is included in the objective function shown in the code below.

%% Set up optimization objfun = @(w)norm(w'*stvmat-Beam_d); % Define objective function used in fmincon % Goal is to minimize the norms between % the desired pattern and % resulting pattern weights_i = ones(N,1); % Initial setting for array amplitudes % Serves as starting point to % optimization weights_o = fmincon(objfun,weights_i,[],[],[],[],zeros(N,1),ones(N,1)); % fmincon takes in the objfun, % the initial weights, and % upper and lower bounds of the weights % In this example, % 0 <= weights_o <= 1 % weights_o holds the weights % which can be used to create % a beam that matches our % desired pattern

Because we are trying to determine the element weights, which minimize the distance between the two beam patterns, we will use the Optimization Toolbox `fmincon`

function, which takes in the objective function, the initial values of the weights, and the constraints. The initial weighting values are set to 1. The constraints are the minimum and maximum values for the fractional weighting values, which we have defined to be between 0 and 1.

When we call `fmincon`

, we provide the handle to our objective function, which takes the difference between the pattern we started with and the pattern we generate as we iteratively refine the weights. At the end of the optimization, we have a set of weights that, when applied to the array elements, yield a match to the desired pattern. The plot in Figure 3 shows the magnitude of both the desired and synthesized patterns over azimuth angles.

## Example 2: Optimizing Both Weights and Element Position

In this example, the steps are as follows (Figure 4):

- Identify pattern attributes
- Define constraints to ensure the system can be realized
- Develop an objective (cost) function to drive pattern attributes in the desired “direction”
- Run the optimization
- Compare the optimized pattern with the desired pattern

Note that unlike example 1, where we only controlled the amplitude weights for the elements, this is a more complex design with more array elements. We now will control amplitude, phase, and the 2D position of each element. Our goal for this optimization is to reduce the maximum sidelobe level of the pattern.

Because** **this example has many locally optimal solutions and the objective is nonsmooth, we will use the Global Optimization Toolbox `patternsearch`

solver. When the objective is smooth, `globalsearch`

might be a better choice.

As with the previous example, we need to ensure that the element locations computed by the optimization process are not spaced too closely together. We will set the same minimum and maximum ranges for amplitude and phase.

We have 100 degrees of freedom for this example: 50 y-z positions to describe 25 element locations, in addition to 25 amplitude and 25 phase values (one per element). The values for the lower bounds (lb) and upper bounds (ub) for each parameter are included in a 100-element MATLAB^{® }vector where vector elements 1 to 25 represent the initial *y* position (of a y-z array), and vector elements 26 to 50 represent the initial *z* position.

The array on the left side of Figure 5 shows the initial positions of the elements, which are uniformly spaced. For the lower and upper bounds for the y-z plane element positions, we set up a grid using (+/- 0.24 * lambda) spacing from a uniform rectangular array starting point (Figure 5, right).

Vector elements 51 to 75 represent the initial amplitude values, and vector elements 76 to 100 represent the initial phase values. Each section of this vector includes 25 parameters to correspond to the 5x5 array size.

We first use Phased Array System Toolbox to set up a 5x5 array, starting with uniformly spaced elements. We then use the `ConformalArray`

construct to change the position of each element. We can update our model as positions change throughout the optimization.

Note that we are using an ideal cosine antenna element in this array model. We could also use a pattern from Antenna Toolbox™ or one measured externally.

function [Val] = Position_Objective_optim_cost(Position_Taper) % Define constants lmbda = physconst('lightspeed')/1.1e9; azimuth = -180:2:180; elevation = -90:2:90; % Creating a cosine Antenna Element handle_Ant =phased.CosineAntennaElement('FrequencyRange',[1.0e9 1.2e9],... 'CosinePower',[1.5 2.5]); % Extracting taper avalues from the input vector Taper_value = Position_Taper(51:75) + 1i.*Position_Taper(76:100); % Creating a Conformal Array with cosine elements. % Conformal array will be limited to a single plane handle_Conf_Array = phased.ConformalArray('Element',handle_Ant,... 'ElementPosition',[zeros(1,25);Position_Taper(1,1:25);Position_Taper(1,26:50)],... 'Taper',Taper_value);

Once the array is set up, we can determine the beam patterns across both the azimuth and elevation angles. We can then use this data to extract the key metrics associated with the pattern. We will focus on the sidelobes, but many other parameters could be considered, such as the main lobe gain or the 3dB beamwidth.

% Extracting Azimuth and Elevation Patterns [fieldval_az] = patternAzimuth(handle_Conf_Array,1.1e9,0,'Azimuth',azimuth,'Type','Power'); [fieldval_el] = patternElevation(handle_Conf_Array,1.1e9,0,'Elevation'>,elevation,'Type'>,'Power'); % Replacing any inf and zeros with a very low value fieldval_az(isinf(fieldval_az)) = -400; fieldval_az((fieldval_az == 0)) = -400; % Genarating a polar plot with the extracted data % the polar plot method "FindLobes" is used to fetch the required % information about the beam. handle_polar_az = polarpattern(azimuth,mag2db(fieldval_az)); lobe_info = findLobes(handle_polar_az); % Fetching the Sidelobe Magnitude % Magnitude of the azimuth beam pattern SL_Mag_az = lobe_info.sideLobes.magnitude;

## Setting Up the Objective Function

We set up the optimization to achieve performance across both azimuth and elevation for a 5x5 planar array. Our pattern will be constructed to reduce the magnitude of the sidelobe levels. Similar examples could involve increasing the magnitude of the main lobe or reducing the 3dB bandwidth.

In the code that follows, we use the sum of the azimuth and elevation sidelobe levels. We also add a term for the absolute difference between the azimuth and elevation sidelobe levels to ensure that they are close in their peak values. Because the optimization engine works to minimize the objective function, each time we iterate through this function, `Val`

will be driven to a minimum. These parameters can be tailored to your specific requirements.

% Extracting Azimuth and Elevation Patterns [fieldval_az] = patternAzimuth(handle_Conf_Array,1.1e9,0,'Azimuth',azimuth,'Type','Power'); [fieldval_el] = patternElevation(handle_Conf_Array,1.1e9,0,'Elevation'>,elevation,'Type'>,'Power'); % Replacing any inf and zeros with a very low value fieldval_az(isinf(fieldval_az)) = -400; fieldval_az((fieldval_az == 0)) = -400; % Genarating a polar plot with the extracted data % the polar plot method "FindLobes" is used to fetch the required % information about the beam. handle_polar_az = polarpattern(azimuth,mag2db(fieldval_az)); lobe_info = findLobes(handle_polar_az); % Fetching the Sidelobe Magnitude % Magnitude of the azimuth beam pattern SL_Mag_az = lobe_info.sideLobes.magnitude; %% % Summing the azimuth and elevation values % Adding term to minimize the difference between the Az and El patterns SL_Mag = SL_Mag_az + SL_Mag_el + abs(SL_Mag_az-SL_Mag_el); % Computing the function value from the SL_Mag Val = SL_Mag;

Figure 6 shows the resulting polar pattern in the azimuth plane.

Figure 7 shows the corresponding views for the elevation plane.

The new patterns are generated using the weights and element positions returned from many iterations through the optimization function. Figure 8 shows the resulting array element positons and beam pattern.

## Extending the Examples

In these examples, all the analysis was done at a single frequency value. In reality, systems have to work across a range of frequencies.

The same optimization techniques can be applied to operations across frequencies. For example, for a wideband application, we look at multiple frequencies equally spaced across the band. The decision then becomes, which aspect of the application is most important. For example, it may be best to optimize for a specific combination and select the positioning based on this combination. All other scenarios could do a "best effort" using just the weighting.

If having a set performance requirement for all combinations of frequencies is more important, then the optimization can be adjusted accordingly. The optimization could also be extended to help drive an optimal subarray architecture across a set of steering vectors.

In addition to expanding the optimization to cover wider frequency ranges, phased shift quantization effects can be added to the Phased Array System Toolbox model to ensure that the end system will behave as the simulation indicates. This is important to help ensure the results that come out of the optimization can be built.

Conformal arrays built on multiple planes can be designed in a similar way by using optimization techniques to achieve a desired beam performance.

## Acknowledgement

The authors would like to acknowledge the contributions of Jegan Mani to this article. In addition, we would like to acknowledge Derya Ozyurt for his support.

Published 2017 - 93102v00