Skip to content

Mohamed0Ehab/beamforming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Beamforming Simulator Demo

🎯 Task 04: Universal Beamforming Simulator

Systems and Biomedical Engineering (SBEG205) - Spring 2026 - Team 12

A comprehensive, multi-tab web application demonstrating the core physics of Phased Arrays and their real-world applications in 5G, Medical Ultrasound, and Radar systems.


Phased Array5G TowersUltrasoundRadar




🔬 Executive Summary

Beamforming is a revolutionary signal processing technique used across both electromagnetic (RF) and acoustic domains. By controlling the phase (time delay) of individual elements in a transducer or antenna array, a wavefront can be steered and focused electronically without any physical movement.

This project provides four completely interactive, specialized simulation environments in a single platform, bridging the gap between theoretical wave mechanics and real-world engineering applications.


📡 The Four Simulation Modules

1️⃣ Fundamental Beamforming (The Physics Engine)

This module acts as the core sandbox for understanding wave interference. It visualizes how spherical wavelets from multiple elements combine using the Huygens-Fresnel principle to form a steered and focused main beam, alongside unwanted side lobes.

  • Features:
    • Interference Heatmap: Real-time 2D visualization of constructive and destructive interference.
    • Beam Profile: Polar radiation plot showing the main lobe, side lobes, and beam direction.
    • Array Geometry: Visualizes the physical placement of the $N$ antenna elements.
    • Debug / Insight: Live mathematical breakdown of wave physics (wavelength, wavenumber) and the calculated phase shift per element.
    • Playground Presets: Quick-load scenarios like Broadside, Steered, Narrow Beam, and Noisy Environment.

🎛️ Key Parameters & Their Effects:

  • Operating Frequency ($f$):
    • What it is: The frequency of the emitted wave.
    • Effect: Higher frequencies yield shorter wavelengths, creating a narrower, more precise main beam, but increasing attenuation (signal loss over distance).
  • Number of Elements ($N$):
    • What it is: The size of the antenna/transducer array.
    • Effect: More elements dramatically sharpen the main lobe and suppress side lobes, but require exponentially more computation.
  • Steering Angle ($\theta$):
    • What it is: The desired direction of the beam.
    • Effect: Applies a linear time-delay profile across the array to tilt the wavefront electronically.
  • Focal Depth:
    • What it is: The target distance to concentrate energy.
    • Effect: Applies a parabolic (quadratic) time-delay profile so all wavelets arrive at a specific spatial coordinate simultaneously, maximizing intensity at that spot.

Full Fundamental Beamforming dashboard showing the Heatmap, Beam Profile, Array Geometry, and Debug Insights.


2️⃣ 5G Towers Simulation (MU-MIMO)

This module applies beamforming to modern cellular networks (Massive MIMO). 5G towers use phased arrays to track individual mobile users, directing concentrated beams of data precisely at their devices rather than broadcasting energy in all directions, utilizing Zero-Forcing (ZF) precoding.

  • Features: Multi-tower tracking, live user movement, dynamic beam steering via DOA (Direction of Arrival), and real-time throughput calculation.

🎛️ Key Parameters & Their Effects:

  • Subcarrier Spacing (SCS):
    • What it is: The frequency spacing between orthogonal subcarriers (e.g., 15, 30, 60, 120 kHz).
    • Effect: Higher spacing reduces latency and combats phase noise at higher frequencies, directly impacting the number of Physical Resource Blocks (PRBs).
  • MIMO Layers:
    • What it is: The number of independent data streams sent simultaneously.
    • Effect: Increases data throughput proportionally via spatial multiplexing.
  • Array Elements ($N$):
    • What it is: The number of antennas in the tower's array.
    • Effect: More elements create tighter beams (higher array gain), which is mathematically crucial for ZF precoding to successfully nullify interference between multiple closely-spaced users.
  • Tx Power (dBm):
    • What it is: The transmission power of the tower.
    • Effect: Higher power offsets path loss, directly increasing the Signal-to-Interference-plus-Noise Ratio (SINR) and triggering higher Modulation and Coding Schemes (MCS).
  • Apodization Window:
    • What it is: A tapering function (Rect, Hanning, Hamming, Blackman) applied across the array.
    • Effect: Shapes the beam to lower unwanted side lobes (reducing interference to other cells) at the minor cost of widening the main lobe and slightly reducing peak gain.
  • DL Slots:
    • What it is: Downlink slots allocated for data transmission over a timeframe.
    • Effect: Linearly scales the final calculated network throughput.

Full 5G MU-MIMO coverage map dashboard, tracking users with Auto-steering beams and calculating real-time throughput.


3️⃣ Medical Ultrasound

This highly detailed acoustic module simulates ultrasound diagnostics using a configurable tissue phantom.

  • A-Mode (Amplitude): A 1D pulse-echo trace measuring precise depths of tissue boundaries based on the time-of-flight of echoes.
  • B-Mode (Brightness): A 2D sector scan created by electronically sweeping the beam. Echo amplitudes are mapped to grayscale pixels to reveal anatomical structures (cysts, boundaries).
  • Color Doppler: Detects the frequency shift of echoes reflecting off moving targets (simulating blood flow) and overlays velocities in color (red/blue).

🎛️ Key Parameters & Their Effects:

  • Tissue Properties (Impedance, Attenuation, Speed of Sound):
    • What it is: The acoustic characteristics of the simulated phantom.
    • Effect: Mismatches in acoustic impedance dictate the strength of the echoes (reflection coefficient). Attenuation dictates how quickly the signal fades.
  • Number of Scan Lines (B-Mode):
    • What it is: How many individual beams are fired to build the 2D image.
    • Effect: More lines increase lateral image resolution but reduce the frame rate.
  • Dynamic Range (B-Mode):
    • What it is: The ratio of the highest to lowest echo amplitudes displayed.
    • Effect: Adjusts the image contrast. Low dynamic range = high contrast (black/white); High dynamic range = smooth grayscales.
  • Pulse Repetition Frequency & Doppler Angle:
    • What it is: The rate of pulses and the angle relative to the blood flow.
    • Effect: Governs velocity detection limits (Nyquist limit) and accuracy.

Full Ultrasound (Sonar) dashboard featuring Phantom, B-Mode, Doppler, and Echo Trace.


4️⃣ Radar System

This module models a 360-degree sweeping radar powered by a live WebSocket connection to the backend engine.

  • Features:
    • Interactive Scene Map: Drag and drop bodies/targets to instantly update their position.
    • Polar Display (PPI): A classic Plan Position Indicator showing the sweeping beam and plotting detections in a 360° circular view.
    • Signal Analysis: Live 1D signal amplitude plotting across 360 degrees with real-time detection thresholding.
    • Ground Truth Comparison: A live table to evaluate the accuracy of the radar's target size and distance estimations against the exact scene values.

🎛️ Key Parameters & Their Effects:

  • Scan Mode (Broad vs. Narrow):
    • What it is: Toggles between a wide beam for fast sweeping and a narrow beam for high-resolution target tracking.
    • Effect: Broad mode detects presence quickly but with poor size accuracy; Narrow mode provides precise angular resolution.
  • Array Elements (M):
    • What it is: The number of active antennas in the radar array.
    • Effect: Higher M narrows the beam width naturally, improving the accuracy of the estimated target size in the detection results.
  • Scan Speed (°/pulse):
    • What it is: How quickly the radar beam rotates per simulation step.
    • Effect: Faster sweeps update target positions more frequently but may reduce signal integration time, potentially skipping over small targets.
  • Noise Floor & Detection Threshold:
    • What it is: Simulated environmental interference and the horizontal cutoff line for valid targets.
    • Effect: Raising the threshold prevents false positives from noise peaks, but setting it too high will cause the system to miss smaller/stealthy targets.

Live Radar interface with Polar Display (top) and Signal Analysis (bottom).

⚙️ Technical Architecture

This application utilizes a modern, decoupled architecture to ensure both numerical accuracy and rendering efficiency across all four modules.

  • Frontend Engine (Angular): Manages state, provides the modern UI/UX, and handles intensive rendering via HTML5 Canvas. It utilizes reactive streams (RxJS) to throttle inputs and delegate heavy math.
  • Backend Computational Core (Python/Django): Houses the OOP-based Simulation Engines (Beamforming, Ultrasound, and Radar). The backend caches static variables (like mesh grids) to drastically reduce latency.
  • Data Flow: Uses RESTful APIs for the Beamforming and Ultrasound tabs (transmitting arrays for heatmaps and signals), and WebSockets for the Radar tab to stream continuous 360° scan data.

🚀 Getting Started

Follow these steps to run the simulation locally on your machine.

Prerequisites

  • Python 3.8+
  • Node.js 16+ & npm

1. Start the Backend (Computational Engine)

# Navigate to the backend directory
cd backend

# Install the necessary Python packages
pip install -r requirements.txt

# Start the Django development server (supports REST and WebSockets)
python manage.py runserver

The API will be available at http://127.0.0.1:8000/

2. Start the Frontend (User Interface)

Open a new terminal window:

# Navigate to the frontend directory
cd frontend

# Install Angular dependencies
npm install

# Boot up the Angular application
ng serve

3. Launch the Simulator

Open your web browser and navigate to: http://localhost:4200/


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors