Skip to content

devincody/GRASPoptimization

Repository files navigation

GRASPoptimization

Purpose

GRASPoptimization is a collection of code written in python that is designed to automate optimization of antennas. Specifically, the code is targeted at automating the design->simulate->analyze->re-design circular process when working with TICRA GRASP. The code is primarily designed to use the GRASP Method of Moments (MoM) solver but has also been extended to work well with the physical optics solver.

File synopses

AntennaClasses.py

The AntennaClasses.py file is a document which outlines the design of each antenna and how they inherit from eachother. This defines abstract base class (aptly named "antenna") from which all other classes are derived. The antenna class defines several methods which do things like edit GRASP .tor files, make folders for results, and execute GRASP.

class antenna(object):
	def __init__(self,
				 model_name = "",			 
				 parameter_names = ["z_dist"],
				 parameters = {"z_dist":16.7},
				 bounds = {"z_dist":[15.5,17.5]},
				 grasp_version = 10.3
				 ):
		self.model_name = model_name
		self.model_abbreviation = "abstract"
		
		self.parameter_names = parameter_names
		self.parameters = parameters
		self.bounds = bounds
		self.grasp_version = grasp_version
		.....


class gaussian_ideal(antenna):
	def __init__(self, start_f = 60.0, end_f = 80.0, n_f = 5, taper = -10, angle = 64,
				bnd_start_f = [0,1000], bnd_end_f = [0,1000], bnd_n_f =[1,1000], bnd_taper = [-14,-8], bnd_angle = [50, 80],
				grasp_version = 10.3):
		
		antenna.__init__(self, parameters = {"z_dist":16.1}, bounds = {"z_dist":[16,17.0]}, grasp_version = grasp_version)
		self.model_name = "40mIDEALPO"
		self.model_abbreviation = "gaussPO"

		self.parameter_names += ["start_f", "end_f", "n_f", "taper", "angle"]
		self.parameters.update({"start_f":start_f, "end_f":end_f, "n_f":n_f, "taper":taper, "angle":angle})
		self.bounds.update({"start_f":bnd_start_f, "end_f":bnd_end_f,"n_f":bnd_n_f, "taper":bnd_taper, "angle":bnd_angle})
		
	def __str__(self):
		return "Ideal Gaussian Pattern without struts"

OptimizeUsingClasses.py

This file defines several platform specific variables, such as location of GRASP executable and various directories. This file is also used to instantiate a given antenna and then simulate that antenna using one (or more) optimization/simulation functions. These functions include simulated annealing, grid searches, Nelder-Mead solvers, as well as a few other functions.

process_grasp.py

Process_grasp.py is the "analyze" step in the antenna design process. This file reads the results files that are generated by GRASP, calculates various figures of merit, and saves various figures to disk. These parameters include aperture and mismatch efficiency, SEFD, and dish patterns and feed patterns.

radiation pattern example plot

plot_metadata.py

When doing global optimization routines, data about the feeds is stored to a log file. Data from this log file can then be used to explore the antenna parameter space. When log files are placed in the correct "../metadata" folder and plot_metadata.py is executed, plots of "efficiency" or "Loss" as a function of each parameter are produced.

metadata example plot

plot_triangle.py

plot_triangle.py is very similar to plot_metadata.py except instead of generate plots of the 1D "phase-space", this file produces plots of the two-dimensional phase-space. The plots are aranged in a triangle configuration which looks similar to the covariance plots typically used in statistical analyses.

triangle example plot

plot_po.py

Because far-field patterns are exported by CST at each frequency, and each pattern must be analyzed at several focal distances, there are often many files produced during optimization of physical optics simulations. This script takes those results and combines them into one set of files.

update_tor.py

... is deprecated and should be remove if it hasn't been already.

About

Antenna design optimizer for TICRA's GRASP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages