Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

BeamForge πŸ›°οΈπŸ“‘

Professional Phased Array Beamforming & LEO Satellite Routing Simulator

Python 3.11+ License: MIT Code style: black

Built to demonstrate deep understanding of antenna theory, digital beamforming, and LEO constellation networking for aerospace/telecom engineering roles.


GUI

BeamForge GUI


Overview

BeamForge is a professional-grade simulation tool for phased array antenna beamforming and LEO satellite constellation routing. It combines rigorous mathematical modeling with intuitive visualization, making it ideal for:

  • 5G mmWave base station beamforming design
  • Aircraft radar pattern analysis
  • LEO satellite network planning (Starlink, OneWeb)
  • Academic teaching of antenna theory and orbital mechanics

Features

Phased Array Beamforming

  • ULA/UPA array factor computation with NumPy vectorization
  • 6 windowing functions: Rectangular, Hamming, Hanning, Blackman, Chebyshev, Taylor
  • Real-time 3D radiation pattern visualization (2D polar cut toggle)
  • Beam steering (-90Β° to +90Β° ΞΈ, 0Β° to 360Β° Ο†)
  • Phase quantization effects (ideal, 3-bit, 4-bit, 5-bit)
  • Grating lobe detection and warning (d/Ξ» > 0.5)
  • Side lobe level (SLL) computation
  • Export high-resolution screenshots (300 DPI) and GIF animations

LEO Satellite Routing

  • Walker Delta constellation generation (T/P/F)
  • Keplerian orbital propagation (circular & elliptical)
  • Inter-Satellite Link (ISL) topology visualization
  • Dijkstra routing (minimize hop count)
  • A* routing (minimize latency)
  • Handover simulation with hysteresis margin
  • Link budget analysis (Friis equation, FSPL, SNR, margin)
  • Animated timeline with play/pause/stop and speed control

Demo

5G Beam Steering Sweep

Beam Steering

Windowing Comparison

Windowing

3D Radiation Pattern (UPA)

3D Pattern

LEO Constellation

Constellation

Routing Comparison

Routing

Quick Start

Installation

# Clone the repository
git clone https://github.com/Gillika0/beamforge.git
cd beamforge

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

# Install in development mode
pip install -e .

Running the Application

# Launch GUI
python -m beamforge.main

# Run demos
python -m beamforge.examples.5g_base_station
python -m beamforge.examples.radar_aircraft
python -m beamforge.examples.starlink_routing

# Run tests
pytest beamforge/tests/ -v

Architecture

beamforge/
β”œβ”€β”€ core/                    # Pure Python math modules
β”‚   β”œβ”€β”€ array_theory.py      # Array factor, steering vectors
β”‚   β”œβ”€β”€ beamformer.py        # Windowing, phase quantization
β”‚   β”œβ”€β”€ orbit_mechanics.py   # Keplerian propagation, Walker constellation
β”‚   β”œβ”€β”€ routing.py           # Dijkstra, A* algorithms
β”‚   └── link_budget.py       # Friis equation, link margin
β”œβ”€β”€ visualization/           # Matplotlib plotting
β”‚   β”œβ”€β”€ antenna_plotter.py   # 3D/2D radiation patterns
β”‚   β”œβ”€β”€ constellation_viz.py # Earth + satellites
β”‚   └── ui_theme.py          # Professional dark theme
β”œβ”€β”€ gui/                     # PyQt6 application
β”‚   β”œβ”€β”€ main_window.py       # Main window
β”‚   β”œβ”€β”€ control_panel.py     # Parameter controls
β”‚   β”œβ”€β”€ viewport_3d.py       # Matplotlib canvas
β”‚   └── timeline.py          # Animation controls
β”œβ”€β”€ tests/                   # Unit tests (pytest)
β”œβ”€β”€ examples/                # Pre-configured demos
└── docs/                    # Theory documentation

Design Patterns

  • Observer Pattern: UI updates when simulation state changes
  • Strategy Pattern: Swappable routing algorithms and windowing functions
  • Factory Pattern: Antenna array creation (ULA, UPA)
  • MVC Separation: Core math decoupled from visualization

Theory

See THEORY.md for full mathematical derivations including:

  • Array factor equations for ULA and UPA
  • Steering vector derivation
  • Dolph-Chebyshev polynomial method
  • Friis transmission equation
  • Keplerian orbital mechanics
  • Dijkstra and A* algorithm complexity analysis

Technical Details

Dependencies

Package Version Purpose
NumPy β‰₯1.24 Vectorized array math
SciPy β‰₯1.10 Window functions
Matplotlib β‰₯3.7 3D visualization
PyQt6 β‰₯6.5 GUI framework
PyYAML β‰₯6.0 Configuration files

Performance

  • Array factor computation: NumPy vectorized (no Python loops)
  • 3D rendering: Matplotlib 3D with dark theme
  • Animation: 20 FPS smooth real-time updates (configurable speed)

Examples

5G Base Station (28 GHz, 8Γ—8 UPA)

from beamforge.core.array_theory import ArrayConfig, ArrayType, UniformPlanarArray

config = ArrayConfig(
    array_type=ArrayType.UPA,
    frequency_hz=28e9,
    nx=8, ny=8,
    spacing_lambda=0.5,
)

upa = UniformPlanarArray(config)
result = upa.compute()

print(f"Directivity: {result.directivity_dbi:.1f} dBi")
print(f"HPBW: {result.hpbw_theta_deg:.1f}Β°")
print(f"Peak SLL: {result.peak_sll_db:.1f} dB")

Starlink Routing

from beamforge.core.orbit_mechanics import WalkerConfig, WalkerConstellation, GroundStation
from beamforge.core.routing import RoutingEngine, Algorithm

config = WalkerConfig(planes=6, sats_per_plane=12, altitude_km=550.0)
constellation = WalkerConstellation(config)

turin = GroundStation(name="Turin", lat_deg=45.07, lon_deg=7.69)
paris = GroundStation(name="Paris", lat_deg=48.86, lon_deg=2.35)

engine = RoutingEngine(constellation, algorithm=Algorithm.ASTAR)
path = engine.route(turin, paris)

print(f"Latency: {path.total_latency_ms:.1f} ms")
print(f"Hops: {path.hop_count}")

Use Cases

Application Configuration
5G mmWave base station 28 GHz, 8Γ—8 UPA, d=Ξ»/2
Aircraft X-band radar 10 GHz, 32-element ULA
Starlink LEO routing 550 km, 6 planes Γ— 12 sats
OneWeb constellation 1200 km, 12 planes Γ— 49 sats

License

MIT License - see LICENSE for details.

Acknowledgments

  • Balanis, Antenna Theory: Analysis and Design
  • Mailloux, Phased Array Antenna Handbook
  • Vallado, Fundamentals of Astrodynamics and Applications

About

Phased Array Beamforming & LEO Satellite Routing Simulator (PyQt6 + NumPy + Matplotlib)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages