You are on page 1of 52

1

Welcome to the
2002 Ansoft HFSS/Ensemble
Users Workshop
2
An Introduction To HFSS Optimetrics
TM
Optimetrics
TM
can take
control of your model to
achieve performance
improvements over initial
designs
Lawrence Unterberger
Matt Commens
HF Applications Engineers
Ansoft Corporation
3
Agenda
w HFSS Overview
w What is Optimetrics
TM
w Optimetrics Flow
w Example Results
w Optimization of a Patch Antenna
w Conclusion
4
What Is HFSS
w HFSS (High Frequency Structure Simulator) is a high-performance full-wave electromagnetic (EM)
field simulator for arbitrary 3D volumetric passive device modeling. It integrates simulation,
visualization, solid modeling, and automation in an easy-to-use environment where solutions to
your 3D EM problems are quickly and accurately obtained. HFSS employs the Finite Element
Method (FEM), adaptive meshing, and brilliant graphics to give you unparalleled performance and
insight to all of your 3D EM problems. Ansoft HFSS can be used to calculate parameters such as
S-Parameters, Resonant Frequency, and Fields.
Leadframe
Uniform
Transmission
lines
Via hole
With Solder
Microstrip
Meander line
5
w Package Modeling BGA, QFP, Flip-Chip
w PCB Board Modeling Power/Ground planes, Mesh Grid Grounds, Backplanes
w Silicon/GaSa - Spiral Inductors, Transformers
w EMC/EMI Shield Enclosures, Coupling, Near- or Far-Field Radiation
w Antennas/Mobile Communications Patches, Dipoles, Horns, Conformal Cell Phone Antennas,
Quadrafilar Helix, Specific Absorption Rate (SAR), Infinite Arrays, Radar Cross Section (RCS),
Frequency Selective Surfaces (FSS)
w Connectors Coax, Transitions
w Waveguide Filters, Resonators, Transitions, Couplers
w Filters Cavity Filters, Microstrip, Dielectric
Coax bend
Horn Antenna
Wire Bonding
3D Antenna Pattern
Typical Modeled Devices
6
What HFSS Gives You
w Rapid Virtual Prototyping
w Arbitrary 3D Structures
w Multiple Ports/Multiple Modes
w All microwave materials supported
w Calculates
w S, Y, Z parameters
w SPICE Sub-Circuits
w Modes-to-Nodes
w Differential Pairs
w EigenModes
w Electromagnetic fields
7
Distributed
Model
RLCG Matrix
TPA
PCB/MCM
SpiceLink
Lumped
Model
S-Parameters
& Fields
AnsoftLinks
SPICE Sub-Circuit
PSpice
Physical
Model
Serenade
HFSS Ensemble
Full-Wave
Spice
Circuit/System
Optimetrics
TM
optional
Quasi-St at ic
Full-Wave
HSpice Maxwell Spice PN Spice
APD
Allegro
Encore
Zuken
Series IV
Design Lab
Analog Artist
EDIF
Integration
How Optimetrics
TM
Falls Into The Ansoft Solution Flow
IGES, STEP, GDSII,
ACIS, DXF
8
What Is Optimetrics
TM
Optimization is a process of finding a better or more suitable
design instance among the possible design variations
w Optimetrics includes a Parametric and Optimization Analysis Module
w Compatible with all Ansoft 3D products
w Allows full Parametric and Optimization Analysis of models using multiple variables
w Think of it as being able to solve many model iterations at once rather than having to
press the solve button many times
Optimetrics provides an intuitive interface on top of the advanced macro language
built into HFSS that lets you:
w Define model parameters which will vary
w Setup a data table to specifically control iterations and/or
w Identify performance specs to optimize
w Optimetrics also allows advanced users to tap directly into the powerful macro
language for even greater customization
9
What Can Optimetrics
TM
Do For Me
Optimetrics functions as a design manager for HFSS...
w Parameterize at all modeling stages
w Geometry (size, shape, orientation, quantity)
w Materials (lossless, complex, anisotropic)
w Boundaries (impedance/conductance boundaries, linked boundary scan angles,
symmetry or mode cases)
w Solution Setup
w Optimization can be performed toward an extensive array of cost functions and goals
w Circuit Parameters
w Antenna Patterns
w Emissions
w Derived Field Quantities
w ...if you can post-process it, it can be used as a cost function!!
that allows for centralized control of design iterations in one common interface.
10
Ansoft Optimetrics
TM
: Executive Commands Interface
Setup HFSS Project
(geometry, materials, boundaries)
HFSS Project Solution Setup
Identify Output Results of Interest
(S-parameters, field calculations, etc.)
Edit/Create Optimization Variables
(e.g. create Cost functions from Output Results)
Setup Parametric/Optimization/Sensitivity Analysis
Run Parametrics/Optimetrics
Review/Plot Optimization Results
11
Ansoft Optimetrics
TM
: Nominal Project
w Takes you directly to HFSS
w Create a model as you normally would
or input existing model
w All actions are automatically recorded
w Appropriate options for Driven and
Eigenmode Solution
w Material or boundary values to be
varied entered via HFSS Function
interface
w On-board editor for geometric variable
creation
w Regardless of the number of variables to be
parameterized, you only have to create the
input model ONCE.
12
Ansoft Optimetrics
TM
: Setup Solution Options
w Links directly to nominal problems
solution setup
w Defines how the Solution Setup for
each models iteration during the
parametric or optimization analysis
process shall be solved
13
Ansoft Optimetrics
TM
: Setup Output Parameters
w Links to nominal projects HFSS post-
processors
w Use to define the output results from
each model setup you are interested in
comparing
w Circuit parameters directly
obtainable
w Field parameters obtained by
recording your post-processing
steps as a macro
w Existing macros can simply be
copied for frequently-used
criteria
14
Filter Cost Function: Norm Types Filter Cost Function: Norm Types
w In case if one selects L1 Norm, is readily providing the value associated with this sub-goal.
w For Euclidean Norm Squared is assigned to the sub-goal.
w And finally, if Maximum Norm is selected, the associated value is simply defined by .

high
low
f
f
f err ) (

high
low
f
f
f err ) (
2
{ } ) (
,
max f err
hig
f
low
f f
1
]
1

'
<

otherwise
r q f q f r
f err
0
) ( ) (
) (
Above
Close
Below
) ( ) ( ) ( f r f q f err

'
>

otherwise
r q f r f q
f err
0
) ( ) (
) (
Definition for err(f) Relation
w The relation between the quantity and the reference curve defines a frequency dependent error
function err(f).
15
Ansoft Optimetrics
TM
: Edit Functions
w Automatically includes all
variables/functions defined during
nominal project setup and output
parameters setup.
w Use to define functional
relationships between input model
variables
w e.g. aspect ratios
w Use to define additional functions
(including cost functions) related to
output parameters
w e.g. transmitted or reflected power
w.r.t. S-parameter results
16
Ansoft Optimetrics
TM
: Setup Analysis
w Access either parametric analysis or
optimization analysis dialogs
17
Ansoft Optimetrics
TM
: Parametric Setup
w Identify parametric setups
w Add variables (defined during
nominal setup) to table
w Setup variable sweep ranges
and number of steps
w Create table of parametric
combinations
18
Ansoft Optimetrics
TM
: Optimization Setup
w Identify optimization parameters and
ranges
w Select variables from those
created in nominal problem
and function lists
w Define range and step size of
allowable values for each
variable
w If desired, apply constraints
between related variables.
w Define cost function and
acceptable cost as optimization
goal
w Define allowable number of
Iterations
19
Optimizers: Quasi Newton & Pattern Search Optimizers: Quasi Newton & Pattern Search
w Quasi Newton
w The Quasi-Newton search is a downhill search, just like the steepest descent method. The difference
between the steepest descent method and this algorithm is that Quasi Newton utilizes some approximate
second order derivatives when finding promising search directions. This is done in order to avoid the slow
convergence rate of the steepest descent search due to zigzag search path. It initiates the search from a
point in the design space, and iteratively tries to find better design points.
w Pattern Search
w This pattern is defined on a grid, and the grid is refined or coarsened according to the success rate of the
search. Like the quasi-Newton algorithm, this search is also iterative. First the pattern is evaluated
(meaning that the cost function is calculated for each pattern point). Then decision is made about the next
move. In case there is a better solution in the pattern, this is set to be the next iterate. If no better solution
is found, then the grid is refined, and the algorithm starts over, hoping that ultimately there will be a better
point found next time.
20
Minimum Step & Maximum Step Variable Control Minimum Step & Maximum Step Variable Control
w Maximum Step settings for Quasi Newton:
w This parameter limits the radius of the line search. One should define Maximum Step for all the optimization
variables. These parameters define an ellipsoid around the origin of coordi nate system of the design space.
Accordingly, a search step along the search direction is greater than the maximum in that direction if, the
step-vectors end point is outside the ellipsoid. In case the line search predicts a step greater than the
maximum allowed step in the search direction, the step is truncated, and the line search exited whatever is
appropriate.
w Minimum Step settings for Quasi Newton:
w This set of optimization parameters defines an ellipsoid similar to the above described one. When the step in
the search gets less than the minimum required in the given search direction, the search algorithm is
stopped. So, this is really a stopping criteria for the search.
w Maximum Step settings for Pattern search
w In a previous section we have discussed the Pattern search algorithm. As described, the algorithm uses a
regular grid. The initial spacing of the grid is defined by Maximum Step parameters for each optimization
variable.
w Minimum Step settings for Pattern search
w As in the case of the quasi-Newton search, this parameter triggers stopping of the search. The Pattern
search algorithm naturally refines the grid as the iterate closes to the optimum. When the grid gets refined so
that the grid spacing becomes smaller than the Minimum Step settings, the algorithm stops searching any
further.
21
Ansoft Optimetrics
TM
: Add/Remove Output Columns
w Add columns for any entry in the
function List
w Tabular contents are updated
automatically as each setup is
completed
w Table columns can be edited
before or after solutions are
complete
22
Ansoft Optimetrics
TM
: RunAnalysis
w Run begins solution
w Parametrics... runs only parametric setups in table
w No optimization variables need be defined
w Optimization... runs parametric steps (if present)
and optimization engine
w Parametric setups aid in slope definition for
optimization steps
w Recompute Output Parameters will re-derive
outputs if requested parameters change after setups
are run
23
Air-filled Box
Substrate
Microstrip
Filter
Symmetry
Plane
Port 1
Port 2
Example 1: Parametric Study
Microstrip lowpass filter
S21 data automatically
extracted to study how
changes in permittivity
affect filter response
24
w Design variables
w Radius d1 of Via 1
w Radius d2 of Via 2
w Length l1 of Resonator 1
w Length l2 of Resonator 2
Example 2: Optimetrics
TM
Microstrip bandpass filter
l1 l1 l2
d
1
d
1
d2 d2
w
25
Example 3: Optimetrics
TM
PIFA: Capacitive load width (W
cap
) vs. plate separation (d
cap
)
h
pifa
x
l
cf
l
pifa
d
cf
W
cap
d
cap
Design Curve IV
W
cap
= 0.3mm
d
cap
= 3.0mm
Increasing Load
Capacitance
26
Example 4: Optimetrics
TM
Master/Slave scan angle control
Port1
Master
Slave
Port1
Port2
Port3
Port4
27
Example 5: Optimetrics
TM
Sensitivity analysis
Goals
w Characterize Design Point: Slope, Curvature
w Interpolate Response for Specific Tolerance Value
tol tol tol tol
Worst
Case
Best
Case
Design 1 Design 2
Design Variable
C
o
s
t
Design Variable
C
o
s
t
28
Optimetrics Example Optimetrics Example
29
CP Patch Antenna CP Patch Antenna - - Optimetrics Optimetrics
Patch Antenna
This patch antenna example is intended to show, using Ansofts Optimetrics with HFSS, how to create,
simulate, and optimize the right-hand circular polarization (RHCP) response of a patch antenna in the
2.4 GHz ISM band (Bluetooth, 802.11b, etc.).
30
Patch Antenna: Getting Started Patch Antenna: Getting Started
w Ansoft Design Environment
w The following features of the Ansoft Optimetrics Design Environment are used to create this passive device model
w Analysis: Optimization
w Parametric geometry
w User defined project variables
w Database export
w The following features of the Ansoft HFSS Design Environment are used to create this passive device model
w 3D Solid Modeling
w Primitives: box, rectangle, cylinder, circle
w Boolean: subtract, duplicate around axis
w Materials
w Create user defined material
w Boundary/Sources
w Ports: Lumped gap port
w Fields Post-Processing
w Compute radiated far-fields
31
Select the menu item Lines/Rectangle
First point: X= -45.0, Y= -45.0
Size: X= 90.0, Y= 90.0
Name: groundplane
Select the menu item View/Fit All/All Views
Launching Ansoft Optimetrics
Start the Maxwell Control Panel
Click Project.
Create and open a New Ansoft Optimetrics 2 Project named: opt_patch_antenna
Creating the Nominal Project
From the Optimetrics Executive Commands, click the Nominal Project button and select Create.
The nominal project dialog will appear.
Enter the Nominal Project Name: nom_patch_antenna
Select Product: Ansoft High Frequency Structure Simulator 8
Click OK.
Click the Draw button and the 3D Solid Modeler window will appear. If prompted to set the units, choose: mm or
Select the menu item: Options/Units
Select the Units of: mm
Select the menu item Solids/Box
Box base vertex: X= -22.5, Y= -22.5, Z= 0.0
Size: X= 45.0, Y= 45.0, Z= 5.0
Name: substrate
Patch Antenna: Getting Started
32
Select the menu item Lines/Rectangle
First point: X = -16.0, Y = -16.0, Z = 5.0
Size: X = 32.0, Y= 32.0
Name: patch
Patch Antenna: Solid Model Construction
Select the menu item Solids/Cylinder
Base center: X= 0.0, Y= 8.0, Z= 0.0
Cylinder axis: z
R: 0.5, H: 5.0
Num segments: 12
Name: feed
Select the menu item Solids/Box
Box base vertex: X= -80.0, Y= -80.0, Z= -35.0
Size: X= 160.0, Y= 160.0, Z= 75
Name: air
Select the menu item View/Fit All/All Views
The basic geometry is now complete. But we have a few
more things to do in the Draw module.
33
Create a hole in the groundplane for the port.
Edit/Select: select the object port
Edit/Copy then Edit/Paste
Solids/Subtract
Select groundplane. Click OK
Select port1. Click OK
Patch Antenna: Solid Model Construction Patch Antenna: Solid Model Construction
Create a hole in the port to accommodate the feed.
Edit/Select: select the object feed
Edit/Copy then Edit/Paste
Solids/Subtract
Select port. Click OK
Select feed1. Click OK
Select the menu item Lines/Circle
Circle center: X = 0.0, Y = 8.0, Z = 0.0
Circle axis: z
R: 1.5
Num segments: 12
Name: port
Next create the port. This will be a 1mm wide annular ring around the base of the feed. Later this will be
defined as a 50 ohm, lumped gap port. Consider it a virtual, 50 ohm coax feed.
34
Patch Antenna: Solid Model Construction Patch Antenna: Solid Model Construction
For a RHCP response, chamfer opposing corners of
the patch. This is done by creating triangles of the
appropriate size and location and subtracting them
from the patch.
Select the menu item Lines/Polyline.
Edit/create: chamCut1
First point: X = 0.0, Y = 0.0, Z= 0.0
Second point: X = 6.0, Y = 0.0, Z= 0.0
Third point: X = 0.0, Y = 6.0, Z= 0.0
Click Close. Click Done.
Move the object chamCut1 to the corner of patch.
Edit/Select: select object chamCut1. Click OK.
Arrange/Move
Enter vector: X = -16.0, Y = -16.0, Z = 5.0
Click Enter.
Copy chamCut1 into the opposing corner.
Edit/Select: select object chamCut1. Click OK
Edit/Duplicate/Around Axis
Axis: z
Angle: 180
Total number: 2
Click Enter.
Subtract chamCut1 and chamCut2 from patch
Solids/Subtract
Select patch. Click OK.
Multiple select chamCut1 and chamCut2.
Click OK.
35
Patch Antenna: Editing Macro Patch Antenna: Editing Macro
Now edit the command history. This is an automatically recorded modeler macro that has the
same name as the HFSS project, nom_patch_antenna.mac, and is the macro that Optimetrics
will use. Here variables will be assigned to parameters of the 3D model.
Select the menu item Edit/Command History.
Shown in the Ansoft Macro Editor
is the process of assigning
variables to the parameters for the
rectangle groundplane. The
following variables will be assigned:
Independent variables for
Optimetrics: PatchSize,
ChamSize
Other independent
variables: SubHeight,
GplaneSize, SubSize,
FeedLocation
Dependent variable:
gplaneStart, patchStart,
subStart.
36
Patch Antenna: Editing Macro, Variable Patch Antenna: Editing Macro, Variable
Assignment Assignment
groundplane: Highlight the line: Rectangle [-45, -45, 0] 2 90 90 "groundplane" 1. Enter the following variable
names in the right-hand fields:
Starting point: X = gplaneStart, Y = gplaneStart, Z = 0.0
Size: X = GplaneSize, Y = GplaneSize
Click Accept.
Click Yes twice when prompted.
(*Note that the lines have been re-numbered)
substrate: Highlight the line: Box [-22.5, -22.5, 0] 45 45 5 "substrate". Enter the following variable names in the
right-hand fields:
Base vertex: X = subStart, Y = subStart, Z = 0.0
Size: X = SubSize, Y = SubSize, Z = SubHeight
Click Accept.
Click Yes thrice when prompted.
patch: Highlight the line: Rectangle [-16, -16, 5] 2 32 32 "patch" 1. Enter the following variable names in the right-
hand fields:
Starting point: X = patchStart, Y = patchStart, Z = SubHeight
Size: X = PatchSize, Y = PatchSize
Click Accept.
Click Yes twice when prompted.
*Note: The lines are re-numbered whenever a new variable or function is defined. These lines are added at the beginning of the macro
and are not visible in the Assign parameter mode. To view the additional lines, select the menu item View/Edit mode. Select menu items
View/Assign parameter mode to leave this view. See appendix for a copy of the full Command History macro with variable assignments.
37
Patch Antenna: Editing Macro, Variable Patch Antenna: Editing Macro, Variable
Assignment, cont. Assignment, cont.
feed: Highlight the line: Cyl [0, 8, 0] 2 0.5 5 "feed" 12 [0.5, 8, 5]. Enter the following variable names in the right-
hand fields:
Center point of cylinder base: X = 0.0, Y = FeedLocation, Z = 0.0
Height: SubHeight
Click Accept.
Click Yes when prompted.
port: Highlight the line: Circle [0, 8, 0] 2 1.5 "port" 1 12 [1.5, 8, 0]. Enter the following variable names in the
right-hand fields:
Center point: X = 0, Y = FeedLocation, Z = 0.0
Click Accept.
chamCut1: Highlight the line: AddVert [6, 0, 0]. Enter the following variable names in the right-hand fields:
Vertex: X = ChamSize, Y = 0.0, Z = 0.0
Click Accept.
Click Yes when prompted.
chamCut1: Highlight the line: AddVert [0, 6, 0]. Enter the following variable names in the right-hand fields:
Vertex: X = 0.0, Y = ChamSize, Z = 0.0
Click Accept.
Move chamCut1: Highlight the line: Move <-16, -16, 5>. Enter the following variable names in the right-hand
fields:
Vector: X = patchStart, Y = patchStart, Z = SubHeight
Click Accept.
38
Patch Antenna: Editing Macro, Edit Parameters Patch Antenna: Editing Macro, Edit Parameters
From the Ansoft Macro Editor go to Edit/All Parameters.
Here we assign the relationship between the
independent and dependent variables.
Change the expressions for the three dependent
variables, gplaneStart, patchStart, subStart. This is
done by highlighting the variable and then entering the
appropriate expression in the Expression field. Click
Update after entering the expression.
Note that the independent variables start with upper
case letters and the dependent with lower case.
Following this convention will make the independent
variables show up at the top of this list.
The other independent variables are there in case we
want to make additional variation to the model. e.g. How
does the peak gain change as a function of the
substrate height (SubHeight).
Click Done. In the Macro Editor select the menu item
File/Apply changes. Exit the Macro Editor and then exit
the Draw module. Click Yes when prompted to save
changes.
39
Patch Antenna: Material Manager
Assigning Material Properties
From the Executive Commands, click the Setup Materials
button and the Material Manager window will appear.
Assign the materials as shown.
Note we have created a local material definition, Rogers4003
To assign a local material, under the Material pull down
select, Add.
Type Rogers4003 in the name window.
Assign the Rel. Permittivity and Elec. Loss Tan as
shown.
Click Enter.
Click Exit. Click Yes when prompted to save.
40
Patch Antenna: Boundary/Sources Patch Antenna: Boundary/Sources
Creating Boundaries/Sources
From the Executive Commands, click the Setup Boundary/Sources button and the Boundary/Source Manager
window will appear.
Boundaries
Verify that there are no face/boundary selections
Select the menu item Edit/Deselect All if it is not grayed out.
Select the menu item Edit/Select/By Name.
Selection Type: Face
Faces: Using the control key, multiple select the faces of groundplane (Face27) and patch (Face29).
Click Done.
Choose Boundary.
Select Finite conductivity.
Accept default value for conductivity.
Name: conductors
Click Assign.
Select the menu item Edit/Select/By Name
Selection Type: Face
Faces: Select all the faces of air (Face21-26).
Click Done.
Choose Boundary.
Select Radiation.
Name: radBoundary
Click Assign.
41
Patch Antenna: Boundary/Sources, cont. Patch Antenna: Boundary/Sources, cont.
Source
Select the menu item Edit/Select/By Name
Selection Type: Face
Objects: port
Faces: Select the face of the port (Face28)
Click Done.
Choose Source.
Select Port.
Name: port1
Type: Lumped Gap Port
Resistance: 50 ohms
Reactance: 0 ohms
Check the Use Impedance Line and Use
Calibration Line boxes.
Under the impedance line Edit Line pull down
select Set.
Impedance Start: X = 0.0, Y= 9.5, Z = 0.0
Vector: X = 0, Y = -1.0, Z = 0
Under the calibration line Edit Line pull down
select Copy Impedance.
Select View Modes.
Number of Modes: 1
Click Assign.
Select the menu item File/Exit and click Yes when
prompted to save.
42
Patch Antenna: Setup Solution Patch Antenna: Setup Solution
Setting Up the Solution
From the Executive Commands window,
click the Setup Solution button and the
Setup Solution dialog will appear.
Check both Single Frequency and
Adaptive.
Single Frequency : 2.45 GHz
Requested Passes : 10
Tet. Refinement : 20
Max Delta S : 0.001
From the Starting Mesh list
Select Initial .
For Solve
Choose All, for a full 3D solution.
Click OK to accept the changes to the
HFSS Solution Setup.
Performing the Solution
From the Executive Commands window,
click Solve.
43
Patch Antenna: 3D Post Patch Antenna: 3D Post- -Process and Macro Process and Macro
Creation Creation
Fields Post-Process and Macro Creation
From the Executive Commands, click the Post Process button and select Fields.
Select the menu item File/Macro/Start Recording.
From the Input Macro Name file browser, select the default (postfld3.mac) by clicking the OK button.
Select the menu item Radiation/Compute/Far Field.
In the Compute Far Field window accept the defaults and click OK.
In the Plot Far Field window accept the defaults and click OK.
Select the menu item File/Macro/Stop Recording. Click OK.
Select the menu item File/Macro/Edit Macro.
Select the menu item View/Edit Mode.
Delete the last 13 lines of the macro (every line after ComputeFarField)
Select the menu item Edit/Database Export Macro/Add.
In database cell (1,1) type AxialRatio.
Click the . . . button next to database cell (1,2).
Select Value of field at the specific location. Click OK
Click the Far Field button. Select Axial Ratio under the Quantity pulldown. Click OK.
Click OK.
In the Ansoft Macro Editor Select the menu item File/Save. Exit the Macro Editor.
In the 3D Post-Processor select the menu items File/Macro Execute. Select the postfld3.mac macro. Click
OK.
Exit the 3D Post-Processor.
44
Patch Antenna: Wait! What just happened! Patch Antenna: Wait! What just happened!
Creation of the 3D Post-Processor Macro.
Since our ultimate goal is to optimize the RHCP of the patch antenna we had to somehow send this
information to Optimetrics. To let Optimetrics know how good the RHCP was, we elected to calculate the
axial ratio of the radiation pattern directly above the patch antenna, phi = 0, theta = 0. The axial ratio
represents how circular the polarization is with the ideal value being 1.
To calculate the axial ratio we needed the far field data. Thus the first step was to record a macro, called
postfld3.mac, that executed the steps to calculate the far field data at the point of interest, phi = 0, theta =
0.
That macro included steps that we do not need. Mainly the commands associated with creating the 2D far
field plots. Thus the last 13 lines in the macro were deleted.
Now that we had the far field data, we added a Database Export Macro that wrote the value of the axial
ratio out to a file called postfld3.udb. Later on we will tell Optimetrics to look into this file to extract the
value of the axial ratio for the patch antenna.
Note: It was not necessary to known the Ansoft Macro Language. The steps associated with writing the
macro commands were automated. Of coarse it will not always be the case that every macro you wish to
write can be written via automation. In these cases refer to the manual Introduction to the Ansoft Macro
Language.
See the appendix for a copy of the Fields Post-Processor macro just created.
Now lets go back to the HFSS project.
45
Patch Antenna: Patch Antenna:
Exit HFSS
From the Executive Commands window, click Setup Solutions.
In the HFSS Setup Solution panel enter 10 into requested adaptive passes and select initial for the starting
mesh. Click OK.
From the Executive Commands window, click Exit to return to Optimetrics.
Setting Up the Output Parameter
From the Optimetrics Executive Commands
window, click Setup Output Parameters and select
Create Standard Outputs
Solution Type: Single Frequency
Data Type: S Matrix
Type S11mag in the Parameter Name field.
Click Add Circuit Parameter. Click OK.
This parameter assignment will let us
monitor S11 at the solution frequency,
2.45 GHz.
From the Executive Commands window, click
Setup Output Parameters and select Select
Macros.
Select 3D Fields Post Processor from the
Module pulldown. Highlight postfld3d.mac
under Available Macros. Click Add->. Click
OK.
46
Patch Antenna: Edit Functions Patch Antenna: Edit Functions
Edit Functions
From the Executive Commands window, click Edit Functions.
Using the Project Parameters dialog:
Add a new variable: cost
Value: 10*log(AxialRatio). Click Add
Note: Defining the cost function in dBs means our cost function value will be zero (10*log(1)) at optimum.
Click Done to return to the Executive Commands window.
47
Patch Antenna: Setup Analysis, Parametrics Patch Antenna: Setup Analysis, Parametrics
Setting Up the Parametric Sweep
From the Executive Commands window, click Setup
Analysis and select Parametrics.
In the Setup Variables opt_patch_antenna window
Select menu item : Variables/Add.
Using the control key, multiple select the
variables ChamSize and PatchSize. Click
OK.
Select the menu item Data/Sweep.
Highlight the variable ChamSize.
t_start: 5
t_end: 7
#samples: 3
Click Accept.
Highlight the variable PatchSize.
t_start: 31
t_end: 33
#samples: 3
Click Accept. Click OK.
Select the menu item File/Exit. Click Yes when
prompted to save changes.
48
Patch Antenna: Setup Analysis, Optimetrics Patch Antenna: Setup Analysis, Optimetrics
Setting Up the Optimetrics Analysis
From the Executive Commands window, click
Setup Analysis and select Optimization.
Using the Setup Optimization dialog
Optimizer : Pattern Search Optimizer
Cost Function : cost
Click the Design Variables: Add button
Select Variable: ChamSize
Minimum: 4
Maximum: 8
Min. Step: 0
Max. Step: 1
Click OK
Click the Design Variables: Add button
Select Variable: PatchSize
Minimum: 30
Maximum: 35
Min. Step: 0
Max. Step: 1
Click OK
Acceptable Cost: 0
Max Iterations: 100
Save Fields: No
Click OK.
49
Patch Antenna: Add Output Columns Patch Antenna: Add Output Columns
Add/Remove Output Columns
From the Executive Commands window, click Add/Remove Output Columns.
Using the Add/Remove Output Columns dialog:
Using the control key, multiple select all of the Available Entries, AxialRatio, S11mag, cost.
Click Add-> to move the Available Entries to the Table Entries.
Click OK.
50
Patch Antenna: Run Patch Antenna: Run
Performing the Solution
In the Executive Commands window, under the Run pulldown, select Optimization Analysis to start the solution.
Monitoring the Solution
The first nine runs will consist of the parametric setup from earlier. This will give Optimetrics a global view of the cost
function. After the parametric sweep is finished, Optimetrics begins to vary the design variables, ChamSize and
PatchSize to reduce the cost function.
51
Patch Antenna: Run Patch Antenna: Run
Monitoring the Solution, cont.
After 46 Setups, Optimetrics finds values for ChamSize (5.32617) and PatchSize (30.375) that achieve a cost
function value of 0.00397905 corresponding to an axial ratio of 1.00095. The run was aborted after 48 runs.
52
ANSOFT CORPORATION
Corporate Headquarters
Four Station Square
Pittsburgh, PA 15219-1119
Tel: 412-261-3200
Fax: 412-471-9427
Internet: info@ansoft.com
www.ansoft.com
Lawrence Unterberger
(lunterberger@ansoft.com)
805.581.0823
Matt Commens
(mcommens@ansoft.com)
847.925.9066

You might also like