Automated Antenna Calculation, Design and Tuning Tool for HFSS

Lauren Linkous, Erwin Karincic, Jonathan Lundquist, and Erdem Topsakal Electrical and Computer Engineering

Virginia Commonwealth University

Richmond, VA, USA [email protected]

Abstract—In this paper, we present an open-source graphical tool for automating the calculation, design, simulation, and tuning of several common antenna types in Ansys HFSS. This tool is designed to increase the user-friendliness of scripting in Ansys HFSS for the batch creation of multiple projects and automatic optimization and design tuning via rules-based and machine learning techniques. Features and initial results for tuning are discussed.

Keywords— antenna design; machine learning; optimization; rules engine; Ansys HFSS

  1. INTRODUCTION

    For many researchers, hobbyists, and antenna experts, the difficulty of antenna creation is not the theoretical calculations, but the CAD modeling and the recurrent manual editing needed to fine tune or optimize designs. To automate specific tasks, Ansys, one of the most used simulation softwares, allows for scripting in three major languages: VBScript, JavaScript, and IronPython. However, the process of creating scripts can be as tedious as tuning HFSS designs manually, or outright inaccessible for many. The aforementioned languages also do not integrate with several common, open-source machine learning libraries. The presented Antenna Calculation and Autotuning Tool (AntennaCAT) is a GUI-based tool that reduces the complexity of scripting in Ansys HFSS by generating scripts for several common antenna designs based on user input that can then either be imported into HFSS manually or automatically executed in HFSS via AntennaCAT for simulation and design optimization.

  2. Software Design and Functionality

    AntennaCAT is built on Python 3.9 and uses no HFSS specific integration libraries or APIs [1]. The GUI is created in wxPython (4.2.0), and all plots or 3D previews are visualized using Matplotlib (3.5.3). Automatic tuning uses either a custom rules engine or machine learning techniques supported by Keras (2.10.0). Current versions of AntennaCAT are available as open-source software from [2]. To increase the accessibility of this tool, AntennaCAT is developed using Ansys Electronic Desktop Student on a laptop with 32Gb RAM running Windows 10, and then exported for further testing on a desktop with commercial Ansys software. Navigation of the GUI is controlled by buttons on the sidebar.

    1. Calculations

      Calculations of the initial antenna dimensions in AntennaCAT use the Antenna Calculator project from [3]

      imported as a package. The calculator currently supports quarter wave monopoles, half wave dipoles, and a rectangular patch with options for microstrip-fed or probe-fed designs and is actively in development..

      Figure 1. The initial AntennaCAT design screen for a rectangular patch

    2. Antenna Design

      The Design page, pictured in Fig. 1, takes user input for the type of antenna, and then prompts for further related information. In the case of a rectangular patch antenna, the user inputs the desired frequency, the substrate relative permittivity and height, and the feed method. The Antenna Calculator in [3] will return values for width, length, Y0, X0, and the width of the strip if the design is strip-fed. A 3D representation of the antenna is generated in the bottom panel for preview. If using AntennaCAT for HFSS simulation, the conductor material and substrate material are selected from the Ansys materials library. The relative permittivity will also be updated based on substrate selection if the values vary.

    3. Simulation

      The Simulation page, Fig 2., has configuration options for HFSS Sweep simulations, and report generation selections. Fields are automatically populated based on the input antenna design from the Design page, or an earlier antenna design can be loaded, in order to generate the IronPython script run by HFSS. A previously generated simulation file can be loaded into the ‘Load Custom Simulation’ tab. In the bottom panels, the user selects reports to be run during the simulation. This page has two options for simulation: running the HFSS

      ISBN: 978-1-946815-18-7

      229

      2023 USNC-URSI NRSM

      simulation and leaving the window open or running the simulation and closing it when the simulation is complete. The antenna simulation script generated by this window includes both the 3D CAD model of the antenna and code to generate any selected reports.

      Figure 2. Page for simulation settings and running the HFSS simulation

    4. Automated Tuning

      Scripts generated by AntennaCAT include parameterized values that can be programmatically controlled. The user has the option to select which values will be considered by the rules engine or used as inputs for any machine learning. Detected parameters can be set as constants, ranges, or lists of materials. To tune based on simulation results, the initial antenna design is simulated in HFSS, and then the report for the resonant frequency (Terminal Solution, Rectangular Plot) is compared to the target frequency. The rules-based engine will make adjustments and run several simulations to gather data for Support Vector Machine (SVM) tuning to be applied. Current metrics for design optimization, as pictured in Fig. 3, include frequency, return loss, and similarity to the ideal Q-factor.

    5. Batch Script and Project Creation

      Similar to Tuning, the Batch page detects controllable parameters. The user selects desired combinations and AntennaCAT will either export IronPython scripts for later use or run scripts in a new HFSS project.

    6. Reports

      Reports properly generated by HFSS during Tuning are imported into dynamically created Matplotlib graphs for comparison purposes. These graphs can be saved as PNG files.

    7. Exports

      The Antenna Calculator package [3] has the capability to export designs as .dxf, .PNG, and as Gerber files. AntennaCAT uses this functionality to export designs using simulated or tuned values. AntennaCAT can also export any generated scripts created by the program and export the report data into

      .csv files from any reports created in HFSS.

      Figure 3. Page for tuning settings and running the HFSS simulation

    8. Loading or Customizing Scripts

    Due to the variability of antenna design and simulation, AntennaCAT is designed with the ability to import antenna design and simulation files written in IronPython. Parameterized values can be detected and modified programmatically even if they were not created in AntennaCAT

    originally.

    Figure 4. S11 for calculated and tuned rectangular patch antenna

  3. TUNING RESULTS

Figure 4 shows a comparison between a 2.4GHz stripline- fed rectangular patch antenna as it was initially simulated and after 14 iterations using only a target of 2.4GHz resonance for tuning. The initial antenna design achieved -17.29dB at 2.33GHz, while the tuned antenna reached -31.68dB at

2.33GHz and -22.98dB at 2.4GHz. We will present updated results for SVM based tuning and other tool improvements.

References

  1. H. Wang, Q. Wu, C. Fan and X. Shi, "A Framework for Automated Filter Design Software," 2018 International Conference on Microwave and Millimeter Wave Technology (ICMMT), 2018, pp. 1-3, doi: 10.1109/ICMMT.2018.8563652.

  2. L. Linkous, (LC-Linkous) (2022) AntennaCAT (Version 2.0) [Source code] https://github.com/LC-Linkous/AntennaCalculationAutotuningTool

  3. E. Karincic, (Dollarhyde) (2022) Antenna Calculator (Version 2.0) [source code]. https://github.com/Dollarhyde/AntennaCalculator