Topics relate to HFSS, Maxwell, SIwave, Icepak, Electronics Enterprise and more

VBS Polyline Scripting –> Grabbing Variables in Design Dataset, MATLAB Geometry

    • Connor Pope


      I have created a MATLAB program that outputs the coordinates of a complex geometry that I want to implement in HFSS via scripting instead of manually. The structure is a microstrip-to-slotline balun transition {~50 ohm to ~110 ohm} with a via'd ground strip that is designed using conformal mapping to achieve a Klopfenstein impedance taper across the transition. I can implement this structure manually and already have to great success, including comparison to measurement which matched super closely to simulation, however it is a very time consuming process to implement the tapered ground structure manually. I would like to automate this to save time for future designs and to learn more about HFSS scripting as well.

      I cannot use a function defined surface or line for the Klopfenstein tapered ground geometry because of the complexity of the function defining it. My MATLAB code outputs a 2000-pt array (10-um steps) with the specific X & Y-coordinate dimensions of the polyline that would create this tapered ground structure after being cover-lined and thickened. I have been manually selecting the most important points to recreate this curve, so to script this would make it more accurate as well, although minimally.

      Here is what I have done so far:
      1. I have imported the X & Y-coordinate dimensions of my polyline into the Design Datasets of my HFSSDesign1 in Project1. The name of the imported Design Dataset is "GNDTopXY". It is in um, both columns.
      2. I have written a basic script to create a polyline using the Design Dataset for each point/segment. 

      My problem --> How do I grab the data from the Design Dataset so I can place them in the segment() and points() arrays in my script for the CreatePolyline function?

      I've put placeholders as "xDim = x.GNDTopXY(n) & unit" for where the problem is. I'm definitely not calling the Design Dataset correctly. Perhaps that's not what I'm supposed to be using to fill in this spline. Would appreciate advice from anyone on how to move forward and/or if there is an easier way to do this.

      Connor Pope

      P.S. Script Code shown below.

    • Faezeh Ladani
      Ansys Employee

      Hi Connor, 

      You can record script in HFSS for any operations that you do. Then you can study the code and modify it accordingly to use it for your specific purpose. From menu bar go to Tools>Record Script to File.... Do whatever operations you want to do for example. Then stop recording through Tools. Then open the .py file and see what operations you can code and what are the commands. Then you may modify it for your Matlab script accordingly.




Viewing 1 reply thread
  • You must be logged in to reply to this topic.