ECE 484/584 Ansoft HFSS Software Demonstration Example: Microstrip Transmission Line Prof. R. W. Ziolkowski James Cheng 03/23/03 Rev. 2 This exercise will act as an introduction to Ansoft HFSS. It is a short exercise to give you a general idea of the major steps involved in an HFSS simulation. In this exercise, you will model a microstrip transmission line driven with a 10 GHz source. The impedance of the transmission line should match 50 Ω. The model is shown in Figure 1. Fig. 1 1. Microstrip Transmission Line Start a new project in Ansoft HFSS Start Maxwell by typing /opt/ansoft8/maxwell on the command line. The Maxwell toolbar will come up (Figure 2). 1 Fig. 2 Maxwell Toolbar On this toolbar, click on Projects. The Project Manager window will appear (Figure 3). Fig. 3 The Maxwell Project Manager Click on New to create a new project under the default directory. You will be prompted to give the new project a name. Type transline and make sure the program selection type is Ansoft High Frequency Structure Simulator 8.5. Click OK. After creating a new project, the Executive window will appear by default (Figure 4). 2 The buttons on the left indicate the main steps in the simulation: drawing the model, assigning material properties to the objects in your model, setting up boundary conditions and sources, setup solver frequency and accuracy parameters, solve and post process. Fig. 4 2. Ansoft HFSS Executive Commands window or Main Menu Draw the geometry of the model In the Executive window, choose Draw. This brings up the 3D Modeler (Fig. 5). There are 4 windows representing the xy, yz, zx, and 3D views of the objects drawn. The modeler then prompts you for units. Select mm as the units for modeling and click OK. 3 Advanced Topic (Refer to Appendix) • If you would like to vary the geometric parameters of your objects, you can simplify your future sessions by recording the first drawing session. Later you can edit this macro and edit the parameters. Do not record your session into a macro until you have experimented some with the drawing package and understand how to draw the geometry of the model of interest. • Choose File/Macro/Start Recording. A file browser appears prompting you for the name of the macro file to which your session will be recorded. Notice that the default directory in which the file is saved is called mod3, and the default file name is mod3.mac. Do not change the defaults. HFSS searches this directory for the geometry macro file. Choose OK to start recording. All subsequent actions will be recorded to mod3.mac. You are now ready to start the drawing process. Fig. 5 The 3D modeler Step 1: At the top menu of the 3D Modeler window, select Lines / Rectangle to start the Rectangle command. 4 Step 2: On the left, type the (X,Y,Z) coordinates of the starting point, (0, 0, 0), in the coordinate spaces in the upper left part of the window. Once you have typed these coordinates into the boxes, click Enter in the left part of the window for the base vertex. Step 3: You are now prompted for the Rectangle size, name and color under the coordinate panel. Type (X, Y) = (28, 12). Type ground in the space for the name. Select blue as the color of the box by clicking on the gray color button and then selecting the yellow color. When you have done all this, click Enter. Notes: The box may be small or not fit right in the windows. In order to see it better, do one of the following. Press the hot key “f” on the keyboard to fit every view in all four windows. Or, to fit all in a single window, first click once in a window to make it active. Then, in the menu on the top, go to View Fit All. Alternatively, you can click on the following toolbar icon Now that the ground has been drawn, continue to repeat the step 1 to 3 to draw the diagram as indicated in the following table. Object name Object type Starting x,y,z Size ground substrate air transline port1 port2 lines / rectangle solid, box solid, box lines / rectangle lines / rectangle lines / rectangle 0, 0, 0 0, 0, 0 0, 0, 0 18.79, 0, 0.7874 7.5, 0, 0 7.5, 12, 0 (x,y) 40, 12 40, 12, 0.7874 40, 12, 15 (x,y) 2.42, 12 (x,z) 25, 8 (x,z) 25, 8 Notes: • Important is that the absorbing boundary or radiation boundary that you will place on the outer surface of the air box not be too close to any radiating objects. The rule of thumb is that that boundary needs to be a quarter wavelength away if you want to obtain an accurate antenna pattern. • How large should this port be? Keep in mind that HFSS thinks in terms of fields. The port should be large enough to accommodate the field pattern of the TEM microstrip mode. Ansoft recommends that the port be 10 times as wide as the width of the trace and 10 times as high as the thickness of the dielectric. At this point, we’re done with the drawing. • If you have been recording the drawing session, please stop it by choosing File/Macro/Stop Recording. Go to File Exit in the top menu. You will be prompted to save changes. Select “Yes.” 5 3. Setup Materials Choose Setup Materials. The Material Setup window appears (Figure 6): Select the substrate object by either clicking on it in the picture or by clicking on it in the object list on the left. Notice that the object changes color to indicate selection. Assign the objects indicated as the following: Object name Material air substrate vacuum duroid (µ=1; ε=2.2) Fig. 6 Material Setup Window In the list of materials on the left, select “duroid.” The properties of duroid show up in the lower right part of the window. Once duroid is highlighted and with the substrate still selected, click on Assign just above the materials list. The substrate is now assigned the material properties of duroid as indicated in the object list. Continue to assign the material value for the air. 6 Click on Exit in the lower left part of the window. You will be prompted to save changes and accept with “Yes.” Back in the Executive window, you should see check marks at both Draw and Setup Materials, indicating that a drawing exists and that all 3D objects in that drawing have received a material assignment. 4. Setup Boundaries / Sources In the Executive window, choose Setup Boundaries / Sources. This brings up the 3D Boundary / Source Manager (Figure 7). Since you have not yet assigned any boundaries and sources, the left bottom square is blank. We want to make the following assignments: Object name Select Type Material Type ground transline air port1/port2 object object face face prefect E prefect E radiation port In the Setup Boundaries / Sources, the following 5-step approach should keep assigning boundary conditions straightforward and simple. You may skip this 5-step approach summary and directly follow the detail instructions provided after the summary. Fig. 7 3D Boundary/Source Manager 7 Notes: Five Steps to set up boundaries / Sources • First, ensure that nothing is currently selected. You want to make sure you are starting fresh. To do this, press the deselect button in the tool bar if it’s not grayed out. You can also achieve this by going to the Edit menu and selecting “deselect all”. • Second, choose the type. Click on the button for either a source or a boundary. Then, choose the specific type of source or boundary by clicking on the button to the right that is labeled either PORT or BOUNDARY TYPE. Ports are the sources; everything else needs to be considered for a type of boundary condition assignment. • Third, select the faces or object surface on which you wish to assign this source or boundary. For graphical selection, we can choose an object, face or boundary, in the left-hand panel under graphical pick. If you choose face, you will be able to select a particular face or multiple faces with the mouse. If you choose an object, upon clicking on that object with the mouse, all its faces will be selected. To select by name, go to Edit / Select / By Name, or use the hot key “s” for selection. A new window listing the object names appears for selection. Fourth, type a name for the boundary. Note that the name of the object you selected will not be its name for the source or the boundary unless you assign it to be that name. The default names are portj or boundj, j=1, 2, 3, .... • • Fifth, click “Assign”. First assign perfect conductivity to the two two-dimensional metal objects in our model that did not yet receive a material parameter assignment. Choose Edit / Select / By Name. In the little window that appears, make sure the Object button is selected. Note that we will want to select the 2D objects, not just the faces, that have created: the ground and the transline. Select the ground. Note that it changes color in the picture. Below the picture, give the new boundary condition the name ground and make sure that boundary rather than source is checked. The type of boundary is Perfect E. This means this object will be treated as a perfectly conductor. Click the Assign button. Repeat the same procedure to assign the boundary for the transmission line and give it a name such as strip. Then assign a radiation boundary to the surfaces through which the energy radiated by the antenna will propagate. Choose Edit/ Select/ By Name. In the little window that comes up, make sure Face is checked. Select the air object in the objects list and select the five faces of that air box that do not coincide with the ground, i.e., the bottom face (Figure 8). Click Done. Give the new boundary condition the name radiation. Select Boundary / Radiation. Then click the Assign button. 8 Fig.8 Assign boundary condition for radiation surfaces 4.1 Port Definition Choose Edit / Select / By Name. In the little window that appears, make sure that the Face button is selected. Select the object port1. Click Done. Below the picture, make sure that Source rather than Boundary is checked. The source type is port. Don’t click the Assign button yet. Let’s define an impedance line. An impedance line is used by HFSS to compute a voltage in the port, which is needed in two of the three impedance definitions. Impedance can be calculated from voltage and current, from voltage and power, and from power and current. Without an impedance line, only power and current are available. Check the box Use Impedance Line. In the upper-left part of the window, below the coordinates, change the snap-to mode to other only (not vertex and not grid) and pick edge center from the options that pop up. Click on the OK button to confirm. Go back to the impedance line box and click the Edit Line / Set button. We want a line along the zaxis from the edge center of the transmission line to the bottom edge center of the port. (Fig. 9) Try to snap to the center edge of the transmission line in port1. You do this by putting the arrow cursor on that edge near its middle and clicking the left mouse button. Then click the Enter button below the Set Impedance Start button. Then place the cursor arrow on the opposite edge (bottom edge of port1) and left click. You should then 9 see the correct vector appear going from the middle of the edge of the transmission line to the middle of the bottom edge of port1. Click the Enter button under the Vector Length button. You have now defined an impedance line. Fig.9 Assign port impedance and calibration line Next, we must define the corresponding calibration line. A calibration lines removes a potential 180-degree phase ambiguity in the impedance calculation by telling the software in which direction the E field is pointed at phase zero. Check the box in front of Use Calibration Line. Choose Edit Line / Copy Impedance. The calibration line arrow and the Impedance arrows will now be coincident. Click Assign. An “overlapping” boundary message will then appear. In our case, the overlapping area results from our assignment of a port within a face that has already been assigned as a radiation boundary. The port assignment will take precedence as the solver proceeds. Therefore, ignore the warning by clicking the OK button. Continue to assign a source for Port 2 in the same manner. 4.2 Display Boundary To check the ports and boundaries, go to Model Boundary Display. HFSS now makes the initial mesh and comes up with the Boundary Display window. In this window, select each boundary and source individually from the list on the left and click Toggle Display 10 to graphically display the boundary. Once you have checked all the boundaries and ports, click on Close in the lower-left part of the window. This returns you to the 3D Boundary / Source Manager. In that window, select File Exit from the menu at the top. You will be prompted to save changes. Click “Yes.” After this, you’re back in the Executive window. 5. Setup Solution In the Executive window, skip the button “Setup Executive Parameters.” Choose Setup Solution. The “Solution Setup” window will appear (Figure 10). Fig. 10 Setup Solution Window In the top dialog box of that window, make sure “Single Frequency” and “Adaptive” are checked. Specify the Single Frequency at 12 GHz and Requested Passes 20 with a Max Delta S of 0.02. The number of requested adaptive passes and the convergence criterion Max Delta S complement one another. If the convergence criterion Max Delta S is met before all the adaptive passes have been performed, convergence has been reached and HFSS will stop and not perform any more passes. Otherwise HFSS will perform all the requested adaptive passes. Max Delta S is the maximum magnitude of the complex difference between S-parameters of the current pass and the corresponding ones from the previous pass. This is a measure of solution convergence. After two passes, if Max Delta S is still larger than 0.02, the 11 mesh is refined again and the fields are recomputed with the denser mesh. The adaptive mesher refines regions in the volume where the solution has its largest variations. In the middle dialog box of the window, do not check Sweep at this time. Accept the other defaults in the lower third panel and click “OK.” This will bring you back to the Executive window. 6a. Solve at One Frequency In the Executive window, click on the Solve button. A status bar in the lower window informs you on the progress of various processes. Click on Profile in the upper right of the Executive window. Here we can obtain some statistics of the processes. The first process is the lambda refinement. Next the 2D port solution is computed to obtain the modes of this transmission line. After that, HFSS solves for 3D fields. A small description of the upper buttons of the Executive window follows: “Model”, view the model. “Matrix”, inspect the S parameters, port impedance, and propagation constants. “Convergence”, view the solution convergence and the growth of the mesh. “Profile”, view the statistics of the solving project. Listed are all the processes involved in the solution, the real time and CPU time, memory, and triangles or tetrahedrons. 6b. Solve with Frequency Sweep Once the solver has completed all passes or has reached the requested Max Delta S, return to the Setup Solution window. Deselect the adaptive solve button at the top left. In the middle dialog box of the window, check the Sweep. Specify the Start Frequency at 5 GHz, Stop Frequency at 15 GHz, and Number of Steps at 1000. Select Fast for fast sweep. Accept the other defaults in the lower third panel and click “OK.” This will bring you back to the Executive window. In the Executive window, click again on the Solve button. 12 7. Post Process 1. Post Process/Fields While in the Executive window, click on Post Process Fields. This brings up the Post Processor, which allows you to inspect the fields. Make a shaded plot and an animated plot of the electric fields in all of the simulation volume. Click on Plot Field in the menu near the top. The “Create New Plot” window appears. Select Mag E in the first column, Volume all in the second, and All in the third. Click OK. Accept the defaults in the next little window. A shaded plot shows up displaying the magnitude of the electric fields in the volume. Now let’s make an animated plot. First make the current plot invisible. Go to Plot Visibility in the top menu. In the “Plot Visibility” window that comes up, click on Plot1. Notice that the visibility turns to “No.” Click OK. Now go to Plot Field in the top menu again. Select Mag E, Volume all, and All. This time, check the “Phase Animation” box as well. Click OK. The next window that comes up will prompt you for the range of the phase and step. Accept the defaults and click OK. The next window will prompt you for the scale. Accept the defaults and click OK. You now get a movie of the electric fields propagating from port1 to port2. To terminate the animation, click Stop and Done on the left. To leave the Post Processor, choose File Exit in the top menu. This brings you back to the Executive window. 2. Post Process/Matrix Data Click on Post Process / Matrix Data, make sure Port Zo is selected under “View” in the right-hand part of the window. Make a note of the input impedance Z of this transmission line (close to 50 Ohm). Select File / Exit to leave the Matrix Data Post Processor. 3. Post Process/Matrix Plot Click on the Post Process / Matrix Plot button. The Matrix Plot window will appear. In that window, select Plot / New Plot in the menu at the top. Plot the S11 and S21 values in dB’s as a function of the frequency values. Change the scales and the divisions if you like by double-clicking anywhere in the graph and making changes in the little menu that pops up. 13 8. Re-iterate Once you have the Fast Sweep for the large range of frequencies, you may want to zoom in on certain frequency ranges that exhibit interesting behaviors. Use the + magifying glass in the Post Process/Matrix Plot plot of the S-parameters to zoom in on a particular frequency regime of interest. Note the values of the frequency interval of interest. Return to the Setup Solution window, enter the new sweep start and stop frequencies, exit and hit the Solve button again. Iterate until you have all of the information you need. 9. Print and Exit To print the plot. Use HFSS Tool Manager 1) Click "Print" in Maxwell Tool Bar 2) Select output type: PostScript Destination: Printer Leave the rest setting and Click Print. Select the window to print use left bottom of the mouse. Select window to be printed. A "+" cursor shows up. Use left bottom of the mouse to select left top corner of the window. Then use right bottom of the mouse to select the right bottom corner of the window. To exit HFSS, click on “Exit” in the lower left part of the Executive window, and click “Yes” to confirm. This brings you back to the Project Manager. To exit from there, click “Exit” in the lower-left part of the window. This brings you back to the Toolbar. To exit from there, click “Exit” and click “Yes” to confirm. 14 8. Model of a patch antenna Simulation and Layout Requirement: • • • • • • Use mm in the designed structure. Use 35mm x 35mm as the ground plane. Layout patch antenna as indicated in Fig. 12. Set 15 GHz as single frequency. Set ∆S = 0.05. The width of the gap should be greater than 0.5mm. Notes: The number of the tetrahedras typically is around 15000. The total simulation time is around 30 minutes. An example model of a rectangle patch antenna should look like the following: Fig 11. Model of a rectangle patch antenna 15 35mm 17.5mm 35mm Fig.12 Layout of the patch antenna 8.1 Plot Antenna Patterns Choose Post Process Fields from the Main Menu. The Post Processor 3D window will appear. Choose Radiation / Compute Far Field. The next window that appears will ask you to specify angles over which you want the radiation pattern. Take a moment to understand the angles. HFSS works with angles theta and phi in spherical coordinates. Theta, θ, is the angle from the z-axis and phi, φ, is the angle from the x-axis. Hence, an antenna pattern in the x,z plane will have φ = 0 and an antenna pattern in the y,z plane will have φ = 90 degrees. In the boxes for phi, φ, enter start=0, stop=90, steps=1. Both antenna patterns will have θ going “full circle”. In the boxes for θ, enter start=0, stop=360, steps=72. Click OK. Use the next window that appears to plot the antenna directivity pattern for φ = 0 and φ = 90. The patterns are proportional to the radiated power (square of the fields), and are relative to the power that would be radiated from an isotropic radiator, i.e. a source that radiates power equally in all directions. An example of antenna directivity pattern is shown in Figure 13. (Note that the following antenna pattern does not have the same structure as in Fig. 11. Therefore, you need to understand your own antenna structure and then generate a right pattern for it and explain the meaning of the pattern in the report.) 16 Fig. 13 Antenna directivity patterns example, phi=0 (x,z plane) and phi=90 (y,z plane) To produce an antenna gain pattern, choose Plot Far Field, and make the appropriate selections. Explore some menu selections like Window Tile, Window Cascade, Plot Modify, Plot Delete and Window Close. 9. Create and Submit a DXF file for the Mask 1. Copy your project to another name. Select the Model Only button. 2. Open up your new project and enter the 3D Drawing Routine (Select Draw Button) 3. You should see your original project drawing. Make sure the unit is in mm. If not, go to Solid/Unit to display the drawing as mm. You need to move the coordinate origin so that the x-y plane coincides with the plane of the drawing that your patch is in. Change the origin to the layer where the patch antenna is located. For example, move the origin from (0,0,0) to (0,0,0.7874) if the height of the substrate is 0.7874mm. You can use the mouse to do this – simply move the arrow to one of the 3D drawing windows 17 (Figure 15) and select the window by clicking the left mouse button. Then move the arrow to the point in that window where you want the origin and click the left mouse button again. Then Choose Coordinates / Set Current CS / Move Origin. The coordinate axis should now appear with the x-y plane being the plane containing the patch antenna. 4. Save 2D Modeler file Fig.15 3D Modeler Window Go to File/Export/2D Modeler File. This brings up a window as shown in Figure 16. Give a name for the file and click OK to save the file. Remember the folder to which you have written the file. 18 Fig. 16 Pop up window to save the 2D modeler file 5. Translate file Go to Maxwell Tool Bar. Click Translators. This brings up the translators windows (Figure 17). Choose Maxwell 2D Ver.6 in the Source box, and AutoCAD DXF in the Destination box. In the Source file, find and select the 2D modeler file you just saved and choose the destination directory you would like to save DXF file. The default unit for translator is set to mm. Click Start. Fig. 17 Translators Windows 19 6. Send your project to Dr.Z. Send the resulting DXF file, which will be used to generate a mask, to Dr. Z at ziolkowski@ece.arizona.edu. Name your file according to the last name of your “computer account” team member. We will correlate all of the files and layout the masks to minimize the number of actual masks that are created. Your final masks will be cut out from one of these monster masks and will be provided to you by the scheduled clean room times. ☺ 10. Reference 1. HFSS Help 2. More examples can be found under Ansoft Online technical support: http://www.ansoft.com/support.cfm Note: There is a memory limitation (500Mb) associated with your Unix account. A typical HFSS simulation requires 100Mb to 300Mb of disk space. You will not be able to have many cases saved in your account. Please always print out your simulation results and delete the old cases to free up disk space. (You can check your disk space by typing ecequota at the unix command prompt.) HAVE FUN AND GOOD LUCK !!!! 20 Appendix. ADVANCED TOPIC: Example of Editing a Macro To edit the recorded session, choose File/Macro/Edit Macro to access the recorded macro. Click Yes in the little window that will appear. This brings up the Macro Editor (Figure 1). On the left side of the Macro Editor, these are all of the commands that have been recorded while you were drawing the model. Fig.1 Macro Editor In the transmission line example, you may want to vary the width of the transmission line to move the port impendence closer to 50 Ω. You can assign the width of the transmission line as a parameter so that you may adjust it easily. Click the command line corresponded to the correct object you wish to edit. In our case, click New Object (0.492815 0 0.031) 2 0.09547 0.44488 “transline” 1. Once you click it, the detail information shows up at the right side of the macro editor (Figure 2). 21 Fig.2 Macro Editor for editing transline Fig. 3 Assign parameters for transline 22 Replace the start point (0.492815,0,0.031) with (trline_x, 0, 0.031) and Size (0.09547,0.44488) with (w, 0.44488) (Figure 3). Click Accept. The following message appears (Figure 4). Click Yes to add variables. Fig. 4 Add parameters Click Rectangle (0,0,0) 2 1.0811 0.44488 “ground” 1 Replace Size (1.0811, 0.44488) with (x, 0.44488). Repeat this procedure if you feel that you will want to change the shapes or sizes of the ground and substrate. Choose Edit/All Parameters to edit parameters in the macro. This brings up the parameters editor. (Figure 5) Fig. 5 Parameters Editor 23 Select trline x and type the equation (x-w)/2 at the right box of the equal sign. Click Update and Done. Choose File/Apply Changes. Exit the Macro Editor. If you have simulated one case and would like to vary some of the parameters for the next series of runs, it is now very easy to accomplish. Under Maxwell Project Manager, click: Copy, select the project you wish to copy, and give a name for the new project. Make sure the Model Only is checked. Click OK. Open the new project, go to Draw and choose File/Macro/Edit Macro. You should select the macro that you had in the previous project. It will have the same parameters that you input for the previous case. Choose Edit/ All parameters. Change the value of any of the parameters. Then select Apply the changes. You are now able to adjust the width of the transmission line easily by changing the value of x in the Parameters Editor. 24