Beamforming Module#
The beamforming module provides amplitude tapering functions for sidelobe control, null steering for interference rejection, and multi-beam synthesis.
Amplitude Tapers (1D)#
- phased_array.taylor_taper_1d(n, sidelobe_dB=-30.0, nbar=4)[source]#
Generate 1D Taylor window for sidelobe control.
- phased_array.chebyshev_taper_1d(n, sidelobe_dB=-30.0)[source]#
Generate 1D Dolph-Chebyshev window for equi-ripple sidelobes.
Amplitude Tapers (2D)#
- phased_array.taylor_taper_2d(Nx, Ny, sidelobe_dB=-30.0, nbar=4)[source]#
Generate 2D Taylor window (separable product).
- Parameters:
- Returns:
taper – 2D amplitude taper (Nx, Ny), flattened row-major
- Return type:
ndarray
Examples
Apply Taylor taper for -30 dB sidelobes:
>>> import phased_array as pa >>> taper = pa.taylor_taper_2d(16, 16, sidelobe_dB=-30) >>> taper.shape (256,)
Combine with steering weights:
>>> geom = pa.create_rectangular_array(16, 16, dx=0.5, dy=0.5) >>> k = pa.wavelength_to_k(1.0) >>> weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=30, phi0_deg=0) >>> weights_tapered = weights * pa.taylor_taper_2d(16, 16, sidelobe_dB=-35)
Compare taper efficiency:
>>> taper = pa.taylor_taper_2d(16, 16, sidelobe_dB=-40) >>> efficiency = pa.compute_taper_efficiency(taper) >>> efficiency < 1.0 # Tapering reduces efficiency True
- phased_array.chebyshev_taper_2d(Nx, Ny, sidelobe_dB=-30.0)[source]#
Generate 2D Chebyshev window (separable product).
Taper Analysis#
- phased_array.compute_taper_efficiency(taper)[source]#
Compute aperture efficiency for a taper.
Efficiency = (sum of weights)^2 / (N * sum of weights^2) Uniform illumination gives 100% efficiency.
- Parameters:
taper (
ndarray) – Amplitude taper weights- Returns:
efficiency – Aperture efficiency (0 to 1)
- Return type:
- phased_array.compute_taper_directivity_loss(taper)[source]#
Compute directivity loss due to tapering in dB.
- Parameters:
taper (
ndarray) – Amplitude taper weights- Returns:
loss_dB – Directivity loss relative to uniform illumination (negative or zero)
- Return type:
- phased_array.apply_taper_to_geometry(geometry, taper_func='taylor', Nx=None, Ny=None, **taper_kwargs)[source]#
Apply an amplitude taper based on element positions.
For non-rectangular arrays, uses radial distance from center.
- Parameters:
geometry (
ArrayGeometry) – Array geometrytaper_func (
str) – ‘taylor’, ‘chebyshev’, ‘hamming’, ‘hanning’, ‘gaussian’, ‘cosine’Nx (
int, optional) – For rectangular arrays, specify dimensionsNy (
int, optional) – For rectangular arrays, specify dimensions**taper_kwargs – Additional arguments for the taper function
- Returns:
taper – Amplitude weights for each element
- Return type:
ndarray
Null Steering#
- phased_array.null_steering_projection(geometry, k, theta_main_deg, phi_main_deg, null_directions, initial_weights=None)[source]#
Compute weights with nulls using orthogonal projection.
Projects the desired weight vector onto the null-space of the steering vectors for the null directions.
- Parameters:
geometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumbertheta_main_deg (
float) – Main beam theta in degreesphi_main_deg (
float) – Main beam phi in degreesnull_directions (
listof(theta_deg,phi_deg) tuples) – Directions for placing nullsinitial_weights (
ndarray, optional) – Starting weights (default: uniform with steering)
- Returns:
weights – Complex weights with nulls placed
- Return type:
ndarray
Examples
Place nulls at specific interference directions:
>>> import numpy as np >>> import phased_array as pa >>> geom = pa.create_rectangular_array(16, 16, dx=0.5, dy=0.5) >>> k = pa.wavelength_to_k(1.0) >>> # Main beam at 30 deg, nulls at 45 and 60 degrees >>> null_dirs = [(45, 0), (60, 0)] >>> weights = pa.null_steering_projection( ... geom, k, theta_main_deg=30, phi_main_deg=0, ... null_directions=null_dirs ... ) >>> weights.shape (256,)
Verify null depth:
>>> null_depth = pa.compute_null_depth(geom, k, weights, null_dirs[0]) >>> null_depth < -30 # Deep null achieved True
- phased_array.null_steering_lcmv(geometry, k, constraints, noise_covariance=None)[source]#
LCMV (Linearly Constrained Minimum Variance) beamformer.
Minimizes output power subject to linear constraints on response in specified directions.
- Parameters:
geometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumberconstraints (
listof(theta_deg,phi_deg,response) tuples) – Each constraint specifies (direction, desired complex response) Use response=1+0j for unity gain, response=0 for nullnoise_covariance (
ndarray, optional) – N x N noise covariance matrix (default: identity)
- Returns:
weights – Complex LCMV weights
- Return type:
ndarray
Multi-Beam Synthesis#
- phased_array.multi_beam_weights_superposition(geometry, k, beam_directions, amplitudes=None, tapers=None)[source]#
Compute weights for multiple simultaneous beams via superposition.
The weights are a weighted sum of individual steering vectors. This creates multiple beams but with reduced gain per beam.
- Parameters:
geometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumberbeam_directions (
listof(theta_deg,phi_deg) tuples) – Directions for each beamamplitudes (
listoffloat, optional) – Relative amplitude for each beam (default: equal)tapers (
listofndarray, optional) – Amplitude taper for each beam (default: uniform)
- Returns:
weights – Combined complex weights
- Return type:
ndarray
- phased_array.multi_beam_weights_orthogonal(geometry, k, beam_directions)[source]#
Compute separate weight vectors for orthogonal digital beamforming.
Each beam has its own weight vector, allowing digital combination with no loss per beam (requires N receive channels).
- Parameters:
geometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumberbeam_directions (
listof(theta_deg,phi_deg) tuples) – Directions for each beam
- Returns:
weight_vectors – List of complex weight vectors, one per beam
- Return type:
listofndarray
- phased_array.compute_beam_isolation(weights_list, geometry, k, beam_directions)[source]#
Compute isolation between multiple beams.
- Parameters:
weights_list (
listofndarray) – Weight vector for each beamgeometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumberbeam_directions (
listof(theta_deg,phi_deg)) – Direction of each beam
- Returns:
isolation_matrix – N_beams x N_beams matrix of isolation in dB Diagonal is 0 dB, off-diagonal is negative (isolation)
- Return type:
ndarray
Special Patterns#
- phased_array.monopulse_weights(geometry, k, theta0_deg, phi0_deg, mode='sum')[source]#
Compute monopulse tracking weights.
- Parameters:
geometry (
ArrayGeometry) – Array geometryk (
float) – Wavenumbertheta0_deg (
float) – Nominal beam direction thetaphi0_deg (
float) – Nominal beam direction phimode (
str) – ‘sum’ - sum pattern (normal beam) ‘delta_az’ - azimuth difference pattern ‘delta_el’ - elevation difference pattern
- Returns:
weights – Complex weights for the specified mode
- Return type:
ndarray