Skip to content

Patch Antenna module focuses on simplifying the automation of the design and optimization of PCB microstrip patch antennas. It handles the automation of calculations, openEMS simulation, and the subsequent optimization.

License

Notifications You must be signed in to change notification settings

LinuxMainframe/patchantenna

Repository files navigation

Rectangular Microstrip Patch Antenna Design Calculator

Overview

This project provides tools for designing rectangular microstrip patch antennas, focusing on frequencies above 1 GHz for PCB applications. It uses analytical calculations based on transmission line and cavity models to determine antenna dimensions and parameters. The goal is to streamline the design process, enabling users to generate designs suitable for manufacturing and to batch-create multiple variants.

Currently, the project includes core calculations for patch dimensions and a test harness. Future development will add simulation setup using openEMS for validation and optimization.

Features

  • Calculation of patch width, length, effective permittivity, fringing effects, conductance, susceptance, impedance, and feedline parameters.
  • Support for inset-fed designs with multiple feedline width calculation methods.
  • Input validation and error handling for design parameters.
  • Comprehensive unit tests using pytest.

Requirements

  • Python 3.8 or higher
  • Dependencies: numpy, scipy, matplotlib, pandas, openEMS (for physical constants)

Install dependencies with:

pip install numpy scipy matplotlib pandas

Note: openEMS must be installed separately, with Python connectors enabled.

Usage

  1. Import the module:

    from core.patch_antenna_design import InputParameters, CalculatedParameters
  2. Define input parameters:

    params = InputParameters(
        freq=2.4e9,  # Hz
        eps_r=4.4,   # Relative permittivity (e.g., FR4)
        tan_d=0.02,  # Loss tangent
        thickness=1.6e-3,  # Substrate thickness in meters
        z_in=50      # Target impedance in Ohms
    )
  3. Initialize calculated parameters:

    calc = CalculatedParameters()
    calc.ledger = {}
  4. Run calculations in sequence (e.g., width, effective permittivity, etc.). Refer to the module docstring for the full workflow.

Testing

Run tests with pytest:

pytest ptest_patch_antenna_design.py

Tests cover input validation, individual calculations, integration, and parametric cases.

Future Work

  • Integration with openEMS for simulation setup and analysis.
  • Batch processing for multiple designs.
  • Export tools for manufacturing files (e.g., Gerber, DXF).

Author

Aidan A. Bradley

Date: January 2026

About

Patch Antenna module focuses on simplifying the automation of the design and optimization of PCB microstrip patch antennas. It handles the automation of calculations, openEMS simulation, and the subsequent optimization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages