Skip to main content

Phased Array Antenna Modeling

CI PyPI version PyPI downloads Python 3.9+ License: MIT Open In Colab Streamlit App Documentation

A comprehensive Python library for computing and visualizing phased array antenna radiation patterns. Features vectorized computations (50-100x faster than naive loops), multiple array geometries, advanced beamforming, and interactive 3D visualization.

Full walkthrough of the physics and API: Modeling phased arrays in Python, from physics to trade study. What's new in v1.4.0: polarized patterns for phased arrays.

Features

  • High Performance: Vectorized array factor computation (50-100x faster than naive loops)
  • Multiple Geometries: Rectangular, triangular, circular, cylindrical, spherical, sparse/thinned arrays
  • Beamforming: Amplitude tapering (Taylor, Chebyshev, etc.), null steering, multi-beam
  • Realistic Impairments: Mutual coupling, phase quantization, element failures, scan blindness
  • Polarized Patterns: Vector (E-theta, E-phi) patterns with dipole/patch/CP element models, co/cross-pol cuts, axial ratio and XPD maps, measured element pattern import
  • Visualization: 2D matplotlib, interactive 3D Plotly, UV-space representation
  • Subarray Support: Subarray-level beamforming with quantized phase shifters
  • Data Export: CSV, JSON, and NumPy formats for patterns, weights, and geometry

Try it Online

Launch Interactive Web App - No installation required!

The Streamlit app provides an interactive interface for:

  • Designing array geometries (rectangular, triangular, circular, concentric rings, elliptical)
  • Beam steering with real-time pattern visualization
  • Amplitude tapering with sidelobe comparison
  • Impairment simulation (phase quantization, element failures, mutual coupling)
  • UV-space pattern analysis
  • Export data to CSV for further analysis

Installation

pip install phased-array-modeling

With optional dependencies

# Include Plotly for 3D visualization
pip install "phased-array-modeling[plotting]"

# Include all optional dependencies
pip install "phased-array-modeling[full]"

For development

git clone https://github.com/jman4162/Phased-Array-Antenna-Model.git
cd Phased-Array-Antenna-Model
pip install -e ".[dev]"

Quick Start

import phased_array as pa
import numpy as np

# Create a 16x16 rectangular array with half-wavelength spacing
geom = pa.create_rectangular_array(16, 16, dx=0.5, dy=0.5)

# Wavenumber for normalized wavelength
k = pa.wavelength_to_k(1.0)

# Steering weights for 30 degree scan with Taylor taper
weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=30, phi0_deg=0)
weights *= pa.taylor_taper_2d(16, 16, sidelobe_dB=-30)

# Compute full 2D pattern
theta, phi, pattern_dB = pa.compute_full_pattern(geom.x, geom.y, weights, k)

# Plot
pa.plot_pattern_contour(np.rad2deg(theta), np.rad2deg(phi), pattern_dB,
                        title="16x16 Array - 30deg Scan with Taylor Taper")

Examples

Beam Steering

# Steer beam to theta=25 deg, phi=45 deg
weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=25, phi0_deg=45)

# Compute E-plane and H-plane cuts
angles, E_plane, H_plane = pa.compute_pattern_cuts(
    geom.x, geom.y, weights, k,
    theta0_deg=25, phi0_deg=45
)

Null Steering

# Place nulls at specific directions to reject interference
null_directions = [(20, 0), (-20, 0)]  # (theta, phi) in degrees

weights = pa.null_steering_projection(
    geom, k,
    theta_main_deg=0, phi_main_deg=0,
    null_directions=null_directions
)

Multiple Simultaneous Beams

# Create 3 simultaneous beams
beam_directions = [(0, 0), (25, 0), (25, 180)]

weights = pa.multi_beam_weights_superposition(
    geom, k, beam_directions,
    amplitudes=[1.0, 0.7, 0.7]
)

Circular/Conformal Arrays

# Cylindrical array
geom_cyl = pa.create_cylindrical_array(
    n_azimuth=16, n_vertical=8,
    radius=2.0, height=4.0
)

# Compute pattern accounting for element orientations
AF = pa.array_factor_conformal(theta, phi, geom_cyl, weights, k)

Phase Quantization Analysis

# Simulate 4-bit phase shifters
weights_quantized = pa.quantize_phase(weights, n_bits=4)

# Analyze effect on pattern
results = pa.analyze_quantization_effect(weights, geom, k, n_bits=4)
print(f"RMS phase error: {results['rms_error_deg']:.1f} degrees")

3D Interactive Visualization

# Create interactive 3D pattern plot
fig = pa.plot_pattern_3d_plotly(theta, phi, pattern_dB,
                                 title="3D Radiation Pattern")
fig.show()

Documentation

Full Documentation on ReadTheDocs includes:

  • Getting Started: Installation, quickstart guide, core concepts
  • User Guides: Detailed tutorials for geometry, beamforming, impairments, wideband, and visualization
  • API Reference: Complete reference for all functions with examples
  • Cookbook: Practical recipes for hardware engineers, systems engineers, and researchers
  • Theory Background: Mathematical foundations for array analysis

For hands-on learning, see the demo notebook which covers:

  1. Basic array factor computation
  2. Beam steering
  3. Performance benchmarking
  4. Amplitude tapering comparison
  5. Array geometries (rectangular, triangular, circular, etc.)
  6. Null steering
  7. Multiple simultaneous beams
  8. Phase quantization effects
  9. Element failure analysis
  10. UV-space visualization
  11. 3D Plotly visualization
  12. Conformal array patterns
  13. Mutual coupling effects
  14. Subarray beamforming

Package Structure

phased_array/
├── core.py          # Vectorized AF, FFT, steering, element patterns
├── geometry.py      # Array geometries and subarray architectures
├── beamforming.py   # Tapering, null steering, multi-beam, adaptive
├── impairments.py   # Coupling, quantization, failures, scan blindness
├── wideband.py      # True-time-delay steering, beam squint, bandwidth
├── polarization.py  # Jones/Stokes, axial ratio, XPD, Ludwig-3
├── vector_patterns.py # Polarized elements, vector AF, co/cross patterns
├── coordinates.py   # Antenna/radar/cone frames, pattern rotation
├── export.py        # CSV/JSON/NPZ export, summary reports
├── visualization.py # 2D, 3D Plotly, UV-space plotting
└── utils.py         # Coordinate transforms, helpers

Requirements

  • Python 3.9+
  • NumPy >= 1.20.0
  • Matplotlib >= 3.5.0
  • SciPy >= 1.7.0
  • Plotly >= 5.0.0 (optional, for 3D visualization)

Running Tests

pytest tests/ -v

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use this library in your research, please cite:

@software{phased_array,
  author = {Hodge, John},
  title = {Phased Array Antenna Modeling},
  url = {https://github.com/jman4162/Phased-Array-Antenna-Model},
  year = {2026}
}

Contact

John Hodge - jah70@vt.edu

Project Link: https://github.com/jman4162/Phased-Array-Antenna-Model

Metadata

Release files for phased-array-modeling 1.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phased-array-modeling 1.6.0
File Size Uploaded Provenance Actions
phased_array_modeling-1.6.0.tar.gz 115.1 kB With provenance Details for phased_array_modeling-1.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phased-array-modeling 1.6.0
File Interpreter ABI Platform Actions
phased_array_modeling-1.6.0-py3-none-any.whl Python 3 none any Details for phased_array_modeling-1.6.0-py3-none-any.whl

Total release size: 198.4 kB

Release files / phased_array_modeling-1.6.0.tar.gz

Download URL phased_array_modeling-1.6.0.tar.gz
Size 115.1 kB
Tags Source
SHA-256 checksum
How to use checksums
070a92294a9f5fe519e62eee1e387ec628c32d9d71c4191cedddac195bfe2810
BLAKE2b-256 checksum
How to use checksums
2f1b6705fc0dea64fe2800f17fe4e50b7e8a86242347e84dbf785a5361015b7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / phased_array_modeling-1.6.0-py3-none-any.whl

Download URL phased_array_modeling-1.6.0-py3-none-any.whl
Size 83.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9cba309aaeb1a7dc54025adfdf11bf0be95388e657fd264e8ca143e9737237c
BLAKE2b-256 checksum
How to use checksums
9add7a20b81d1165a48f4830ef2e132a0d2c1f946b5059a1da07154decfeb0cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for phased-array-modeling 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for phased_array_modeling-1.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page