Ansys HFSS Project: Dipole Antenna

 
This project will go through the process for building and simulating a simple dipole antenna in Ansys HFSS.

If you are a UNCC student, and this is your first time using HFSS, please see Initializing HFSS.

Design of a Dipole Antenna

Dipole.png
The length of a dipole antenna is approximately equal to one half of the wavelength at the design frequency (the frequency at which the antenna is intended to operate).
**NOTE: I say here that the length is approximately equal to half the design frequency wavelength because it is not exactly equal to half the design frequency wavelength.  Because of fringing that occurs at the ends of the dipole, the wire will "appear" longer than it actually is.  Therefore, to achieve operation at a specific frequency, the antenna length will need to be slightly shorter than half the wavelength at that frequency.  However, as a first step in the design, you should simulate the antenna with the full half wavelength, and see where it resonates (it will be slightly below your target).  Then you can trim the length of the antenna to shift the operation up to the desired frequency.

So, supposing we want our antenna to operate at 5 GHz, the initial design should have a length of 30mm.

HFSS_dipole/Dipole_lengthequation.png

Now we are ready to build our model in HFSS.

Creating the Geometry

For the purposes of this tutorial, we will feed the antenna model with a lumped port

The geometry of this model will consist of four objects.
  1. A cylinder for the upper half of the antenna.
  2. A cylinder for the lower half of the antenna.
  3. A cylinder to contain the antenna and field solutions (an air box).
  4. A sheet on which we can define a "lumped port" with which to drive the antenna.
We will initialize our dipole antenna design using a dipole length of exactly half a wavelength at the design frequency (as noted above, we expect that this will actually result in resonance slightly below the design frequency). 

Let's begin by drawing the upper cylinder.  To do this, click the "Draw cylinder" option at the top of the page.

drawcylinder.png

If you do not get a pop-up dialog box, hit F4 on your keyboard (Note: if F4 doesn't work, look here for more help). In the dialog box that comes up, enter a variable-defined radius of `dipolerad', and hit "Enter" on your keyboard.  In the "Add Variable" dialog box that comes up, enter a value for "dipolerad" of  0.5mm, and click "OK.". 

HFSS_dipole/dipolerad.png
In the "Center Position" field, enter the comma-separated ordered triplet "0, 0, gap/2".  Hit enter. In the "Add Variable" dialog box that pops up, enter a value of "1mm" for the gap, and click "OK."

HFSS_dipole/gap.png

In the "Height" field, enter "(L-gap)/2", and hit enter.  In the "Add Variable" dialog box that pops up, enter a value for L of "lambda/2", and click "OK."
HFSS_dipole/L.png

In the next "Add Variable" popup, enter a value for "lambda" of (3*10^8)/fr, and change the "Unit" to "meter".  Click "OK."

HFSS_dipole/lambda.png

In the next "Add Variable" popup, enter a value for "fr" of 5*10^9, change the "Unit Type" to "Frequency", and change the "Unit" to "Hz". Click "OK."

HFSS_dipole/fr.png

Your CreateCylinder dialog box should now look like this:
HFSS_dipole/CreateCylinder.png

Click "OK".  Click the "Fit All" button at the top of the screen to make the entire model fit in the viewing window.

HFSS_dipole/Fitall.png


In the project tree, right click 'Cylinder1', then click  -> Edit -> Copy

HFSS_dipole/copypaste.png

On your keyboard, simultaneously hit the 'Ctrl' and the 'v' keys to paste the clipboard contents (Note: this assumes that you are running HFSS on Mosaic Linux).  This should create a second cylinder, which you will see in the project tree as "Cylinder2".

HFSS_dipole/cyl2.png


Double click the "CreateCylinder" link under "Cylinder2" in the project tree (as shown above). In the "Properties" dialog box that opens, change the "Center Position" field to the comma-separated ordered triplet "0, 0, -gap/2", and change the "Height" field to -(L-gap)/2. 

HFSS_dipole/Properties.png

Click 'OK.", then click the "Fit all" icon at the top of the screen.  Now we have both the top and bottom sections of the dipole antenna. 

The third geometric element of this design is the air box, inside which HFSS will solve for the fields produced by the antenna.  In order for the far field solution data to be accurate, this box must be at least a quarter wavelength from the surface of the antenna.  Since this particular antenna design is perfectly cylindrical, we can achieve this using a cylindrical box.  Our design frequency is 5 GHz, but since we know the antenna will resonate at a lower frequency than the design frequency, we will chose to target having accurate fields from 4 GHz to 5 GHz.  For the far fields to be accurate over this range, the air box must be a quarter wavelength away from the surface of the antenna at 4 GHz.  To create this element, click the "Create Cylinder" icon, and enter the following data in the property fields:

'Center Position' : 0, 0, -L/2-lambda_4GHz/4
'Radius' : dipolerad+lambda_4GHz/4
'Height' : lambda_4GHz/2 + L

When you are prompted to enter a value for lambda_4GHz, enter '(3*10^8)/(4*10^9)'.

Note that this assumes that we will will be plotting the far fields only at and above 4 GHz.  If you wished to plot the fields below 4 GHz, you would need to replace 'lambda_4GHz' in the equations above with the wavelength value corresponding to the minimum frequency of interest.
At this point, you will not be able to see the dipole antenna, because of the opacity of the air box.  To make the airbox transparent, click "Cylinder3" in the Project Tree, and in the Properties window, change the value in the "Transparent" field from 0 to 1, as shown below.  Click "OK."

HFSS_dipole/Transparency.png

The fourth and final geometric element of this design is the sheet on which we will be defining the lumped port.  This should be located in the gap between the two halves of the dipole, and should reach from one conductor to the other.  To create this sheet, click the "Draw Rectangle" icon at the top of the screen (to the right of the "Draw Cylinder" icon), and in the "CreateRectangle"
popup window, edit the following fields:

Position: 0, -dipolerad, -gap/2
Axis: X
Width: dipolerad*2
Length: gap

Click 'OK." 
At this point you have all the geometric elements needed to simulate this antenna.

Assigning Materials and Boundaries

By default, HFSS assumes that all the space internal to your model (in this case, everything inside Cylinder3) is vacuum, and everything external to your model (in this case, everything outside Cylinder3) is PEC, or perfect electric conductor.  In other words, your model, as it currently stands, consists of a cavity inside an infinite conductor.  To convert it into a dipole antenna, we will need to make some material and boundary assignments.

To begin, select Cylinder1 in the Project Tree.  While holding the 'Ctrl' key on your keyboard, click Cylinder2 as well, so that they are both selected.  Right-click in the project viewing window, and click 'Assign Material'

HFSS_dipole/AssMaterial.png


In the dialog box that opens, type "pec" in the "Search by Name" field. 

HFSS_dipole/selectmaterial.png

With "pec" selected in the list, click "OK."  What we have just done is assigned the material of the dipole body to be perfect electric conductor.  When actually building a dipole, the body of the antenna will need to be composed of a more realistic material, like copper.  However, copper has a high enough conductivity that, for the purposes of this tutorial, the results will not be much affected, and the use of PEC rather than copper can help to streamline the simulation.

Now our model consists of a conducting antenna body suspended inside a cavity in an infinite conductor.  The next thing we need to do is assign the external boundary of Cylinder3 so that HFSS knows we expect the space outside that cylinder to be filled with free space, rather than PEC.  To do this, we need to select all three faces of Cylinder3 (the top face, the bottom face, and the curved side face).  The easiest way to do this is to right-click Cylinder3 in the Project Tree, then click "Select" -> "All Faces"

HFSS_dipole/allfaces.png

With all faces of the cylinder selected, right-click in the project viewing window and click 'Assign Boundary' -> 'Radiation'

HFSS_dipole/radbound.png

In the window that pops up, click 'OK'.  To check that the boundary was properly assigned, go to the Project Manager window (expand it,  if necessary), expand the "Boundaries" list, and click on your new radiation boundary, Rad1.  You should be able to tell in the project viewing window that all three faces of the cylinder are now assigned to the radiation boundary.  You can rotate the model, if you like, to make sure.
HFSS_dipole/radbound2.png
In order for the far-field solution data to be accurate, we need to do one more thing to the surface of the air box (in this case, Cylinder3).  We must assign a mesh operation of at most one-sixth of a wavelength on the surface of the box.
To do this, once again select all three faces of Cylinder3.  Right-click in the project viewing window, then click "Assign Mesh Operation" -> "On Selection" -> "Length Based".

HFSS_dipole/meshoperation.png


Under 'Restrict the length of elements', check the 'Set maximum element length' box, and in the data field enter a value of lambda/6.  Note that this is lambda/6 at fr, the target resonance frequency. Make sure the "Enable" box is checked, then click "OK."

HFSS_dipole/mesh2.png

Note that this assumes that we will will be plotting the far fields only at and below the design frequency.  If you wish to plot the fields above the design frequency, you will need to replace 'lambda' in the equations above with the wavelength value corresponding to the maximum frequency of interest.
At this point all your materials are set, and your boundaries are properly assigned.

Assigning Excitations

The last element of our simulated structure we need to define is the excitation.  This is the source of the energy that will be driven onto the antenna body.  For this simulation, we will choose to use a lumped port.  A lumped port is an idealized voltage source - it cannot be physically realized, and it has an impedance which is hard-coded in (in other words, which does not necessarily correspond to anything about the geometry of the feed structure).  It is less accurate than a waveport, but it allows for internal-to-the-model excitation, which a waveport does not, and it can allow inspection of a single system element (in this case, an antenna) without complicating the analysis through addition of the transmission line feed structure that would be required by a waveport (such as a coaxial cable or microstrip transmisson line).

In the Project Tree, under "Sheets", find and select Rectangle1, then click the "Fit Selected" icon at the top of the screen.

HFSS_dipole/fitselected.png

Right-click in the project viewing window, then click "Assign Excitation" -> "Lumped Port"

HFSS_dipole/AssignExcitation.png

In the dialog box that pops up, leave the default value of 50 ohms.  Note that this fixes the characteristic impedance of the ideal feed line that is being represented by the lumped port.  Click "Next".  On the next page, click the field marked "None" under "Integration Line", and click "New Line".  Hover your cursor over the exact center of the bottom edge of the sheet, until the marker on the model turns into a triangle (indicating the exact center), then click.  Next, hover your cursor over the exact center of the top edge of the sheet, until the marker on the model turns into a triangle, then click again.

HFSS_dipole/integrationline.png

This defines the excitation integration line, which must point from one conductor to the other, along the direction of the voltage gradient. It does not matter whether it points from the top to the bottom or from the bottom to the top - since our input signal will be sinusoidal, the difference between the two orientations is only a 180 degree phase shift.  Back in the dialog box, check that under "Integration Line" the field now shows "Defined" (if it does not, click it again, select "New Line," and repeat the previous steps), then click "Next."  On the next page, leave all values as default and click "Finish."

Your model is now complete.  It should look like this:

Project_dipole_completemodel.png



EXTREMELY IMPORTANT:  If you have entered everything exactly as stated above, the variable values and units in your "Properties" window will exactly match those shown here:

Project_dipole_variables.png

This must match exactly, including the blank fields.  If any do not match, modify them by clicking the field and typing in the correct value, or by choosing the correct unit from the drop-down menu.
Note: the unit "m" in HFSS stands for "milli", not "meters".  If you use the unit "m", intending to specify "meters", your dimension will be one thousandth what you expect it to be.  You could type in "meters", but the default length unit is meters, so a blank "units" field is assumed to be meters.

Analysis

To perform the simulation, we need to set up the analysis options.  Do the following steps:
1. Right click on Analysis in the Project Manager, and select "Add Solution Setup"

HFSS_dipole/AddSolutionSetup.png

2. Under the General tab:
    (a) Set the solution frequency to 6 GHz,  This is the frequency at which HFSS will refine the field solution. For a simulation that is expected to be resonant, it should be set to the resonant frequency if the resonance frequency is known.  Since in this case we do not yet know the resonance frequency, we will use an initial solution frequency of 6 GHz (if not equal to the resonant frequency, the solution frequency must be as high or higher than the highest frequency of the planned frequency sweep).
    (b) Set the maximum number of passes to 30
    (c) Set maximum Delta S to 0.01 (this sets an upper limit on the uncertainty of our solution).
3. Under the Options tab:   
    (a) Set the Maximum Refinement per pass to 20 %
    (b) Set the Order of Basis Functions to Second Order
4. Under the Advanced tab:
    (a) uncheck the "Save Fields" box.
Click `OK'.

Perform the following steps to set up the frequency sweep:
1. Under the Analysis item in the Project Tree (expand it, if necessary), right-click on Setup1.
2. Select Add Frequency Sweep.

HFSS_dipole/adfreq.png

3. In the dialog box that pops up, set "Sweep Type" to Discrete.
4. Set "Distribution" to Linear Step.
5. Set start frequency to 4 GHz.
6. Set end frequency to 6 GHz (note: the upper limit of the sweep should never be higher than the solution frequency, unless the solution frequency is exactly the same as the resonant frequency.).
7. Set the step size to 0.02 GHz.
HFSS_dipole/FreqSweep.png

8. Click "OK."

Now, if we run the simulation at this point we will be able to see the input impedance of the antenna at all frequencies in the sweep (from 4 to 6 GHz, in steps of 0.02 GHz).  Note that, because of how we defined our air box and our mesh operation, the far field solutions will be accurate from 4GHz to 5GHz.  However, we have not saved the fields at any frequency, so we will not yet be able to see the radiation pattern.

Final Checks and Running the Simulation for Input Impedance and S-parameters

Save the project by clicking on the save icon at the top of the screen.

Select HFSS => Validation Check... to ensure the project is prepared for simulation (click close).  If you have performed all the above steps accurately, you should see a list of green checkmarks.  If you instead see any red 'X's, you will need to address those before moving on (double check that you performed all steps correctly and in order).

HFSS_dipole/ValidationCheck.png

Right-click Setup1 under Analysis in the project tree and select Analyze to begin the simulation. At this point the progress window should show the progress of the simulation, beginning with the mesh generation.  Expect this step to take a while to complete.  While you wait, you can set up your input-impedance and S-parameter result graphs, which will populate as the simulation progresses...

View the Simulation Results

To view the input impedance of the antenna, perform the following steps:
1. Right click on the results item in the Project Tree
2. Click Create Modal Solution Data Report => Rectangular Plot
3. Under the trace tab, select the Z-parameter -> Z(1,1)->'re' and click New Report
4. Select the Z-parameter -> Z(1,1)->'im' and click Add Trace
5. Click Close.
Zparam.png

This antenna is resonating at the point where the imaginary part of the input impedance Im{Z(1,1)} equals zero.  Right-click on the graph and click Marker-> Add Marker, then place a marker on the exact point where the trace of Im{Z(1,1)}crosses zero.  Make a note of this resonant frequency for your report. Add a second marker on the trace of Re{Z(1,1)} at the resonant frequency, and note the value of the real part of the input impedance at resonance Re{Z(1,1)} for your report.


To view the S-parameters of the antenna, perform the following steps:
1. Under the trace tab, select the S-parameter -> S(1,1) -> dB and click New Report
2. Click Close.

S11.png

Note that this plot of S(1,1) assumes a feed impedance of 50 ohms, because that is what we coded into the lumped port definition.  Add a marker at the resonant frequency, and make a note of the S(1,1) value at this frequency for your report.

The antenna's maximal performance (in terms of return loss) is at the frequency where S(1,1) is at a minimum.  This may or may not exactly match the resonant frequency, since it is a function of matching between the feed impedance and the input impedance of the antenna, which includes both Im{Z(1,1)} and Re{Z(1,1)}.  Make a note of this frequency of maximal performance for your report.  Also note the minimum value (in dB) of S(1,1), which is observed at that point.

Looking back at the previous plot (of Z(1,1)), make a note of the impedance: Z(1,1) = Re{Z(1,1)}+j Im{Z(1,1)} at the maximal performance frequency for your report.

Check for Proper Simulation Resolution

Once the simulation completes, there are a few things you should check to make sure that the returned results are reasonably accurate.  
1. Check that the final message in the Message Manager says "Normal completion of simulation on server:...."

HFSS_dipole/MessageManager.png

2. In the Project Manager, under "Analysis", right click on "Setup1" and click "Convergence".  In the pop up window, change the view from "Table" to "Plot"

HFSS_dipole/convergence.png


3. Check that the simulation is marked as "CONVERGED"
4. Check that the plot ends with a downward trend (as shown above).  It may be jagged in the beginning (on the left), but if it is jagged at the end (jumps suddenly from a high value to a low value), this may indicate a false convergence.  If this happens to your simulation, you will need to modify your simulation as follows:
5. Re-analyze the simulation, and repeat the checks above.


Running the Simulation for Radiation Pattern:

In order to see the radiation pattern, we need to add another frequency sweep, and save the far fields at a single frequency where we would like to see the radiation.  To do this, complete the following steps:
1. Right-click on Setup again, and click "Add Frequency Sweep".
2. In the dialog box that pops up, set "Sweep Type" to Single Frequency.  (Note: if Single Frequency is not available, you can achieve the same thing by setting the "Sweep Type" to Discrete, then setting both the start and the end frequencies to the same value.)
3. Set start frequency to the frequency at which you observed the lowest S(1,1) value..
4. Check the "Save Fields (all frequencies)" box.
5. Check the "Save radiated fields only" box.
6. Click "OK."
7. In the Project Manager, under "Setup1", you should now see a second sweep, by default named "Sweep1".  Right-click on this sweep, and click "Analyze"
8.  Once the simulation completes, you are ready to view the radiation plots.

To view the radiated fields of the antenna:
To see the far field radiation plots at the selected frequency, we first need to define a surface over which HFSS can calculate the far fields. 
NOTE: HFSS only truly calculates the near field solutions, but if we have properly defined the air box and mesh operation, it will be able to accurately project the near field results into the far field (though a near-field-to-far-field transformation). 
Project/GainPlot.png
This is an example of a gain plot at Theta = 90 degrees, with Phi swept from 0 to 360 degrees, at an example solution frequency of 5 GHz.
Note that these axis labels WOULD NOT be considered acceptable for your report (the fonts are too small).


Some of the other plots of interest might include:
GainPhi: This is the gain of only the portion of the radiated wave that is polarized in the phi direction.
GainTheta: This is the gain of only the portion of the radiated wave that is polarized in the theta direction.

For your report, create a 3D polar plot.  To do this, right-click on "Results" in the Project Manager, then click "Create Far Fields Report" -> "3D Polar Plot"
In the popup window, under the "Trace" tab, choose "RealizedGain" -> "GainTotal" ->"dB", and click "New Report". 
Note the name of this 3D plot in your Results list.  For instance, here it is "Gain Plot 4"

Project/GainPlot4.png

Once the gain plot populates, click on your HFSS design in the project tree so that you can see your antenna. 

HFSSDesign

Right-click on your model, and click "Plot Fields" -> "Radiation Field..."
In the pop-up window that appears, check the "Visible" box next to the name of the 3D gain plot.

Project/checkVisibility.png

Click "Apply", then "Close".
Save a screenshot for your report.
 

Note: Before using a plot in a report, ensure that:


Minimum Data for Report (included in both video and pdf):

Tablular Data:
  1. Observed resonant frequency (where Im{Z(1,1)} = 0), in GHz:
  2. Observed input impedance at the resonant frequency, Z(1,1) = ???, in ohms:
  3. Calculated S(1,1) at the resonant frequency, in dB. (remember, for a single-port system, like an antenna, S(1,1) = Gamma in dB, where Z0 = 50 ohms and ZL = Z(1,1))
  4. Observed S(1,1) at the resonant frequency, in dB.
  5. Calculated length of a half-wavelength at observed resonant frequency, in mm: (this is the "apparent" length of the antenna, due to fringing).
  6. Difference between actual antenna length and "apparent" antenna length, in mm:
  7. Apparent change in length of antenna due to fringing, as a percentage - calculate 100% times (apparent length - actual length)/(actual length)
  8. Observed frequency of maximal performance, in GHz
  9. Observed input impedance at the frequency of maximal performance, Z(1,1) = ???, in ohms
  10. Calculated S(1,1) at the frequency of maximal performance, in dB.
  11. Observed S(1,1) at the frequency of maximal performance, in dB.
  12. Maximum observed gain from your 2D gain plots, in dB.
Formulas:
  1. Equation for S(1,1) in dB at the resonant frequency, calculated from the observed input impedance.
  2. Equation for S(1,1) in dB at the frequency of maximum performance, calculated from the observed input impedance.
Figures:
  1. Plot of input impedance (real and imaginary) over frequency (make sure that the axis fonts are sized appropriately to match the other text in the report)
  2. Plot of S(1,1) over frequency (make sure that the axis fonts are sized appropriately to match the other text in the report)
  3. Screenshot of antenna with overlaid gain plot.
Short Answer:





Copyright 2021, Kathryn Leigh Smith.  All rights reserved.
Copyright/Disclaimer Notice