Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to control HFSS v11 from Matlab?

Status
Not open for further replies.

svia

Member level 3
Member level 3
Joined
Feb 7, 2008
Messages
61
Helped
10
Reputation
20
Reaction score
9
Trophy points
1,288
Activity points
1,774
Hello

I’m interested in all the information about how to control HFSS v11 from Matlab.
The idea is introducing some parameters of design into HFSS from Matlab. Use HFSS for the simulation. Exporting the results from HFSS using Matlab, computing and optimizing, an going back to enter the variables into HFSS, etc

I have searched in the Internet, but I didn’t find anything very clear and not for HFSS version 11.

The same methods that are used for version 9 can be used in version 11?

Any help?

Thanks
 

matlab hfss

I searched the webb and found the following link:

**broken link removed**

It is a number of free toolboxes where you can control HFSS by using Matlab. I haven't used any of them by my self but it could be a good start for you!

:arrow:
Dont forget press "helped me"
:arrow:
 
hfss matlab api

Thanks for your help, but in fact, I had already seen this page: I am looking for more information, specially about version 11 and something I have read about a COM interface.

I let here all the information I have been able to gather myself, but I need more help!!
Please!





**broken link removed**

Thanks
 
  • Like
Reactions: zwy7

    zwy7

    Points: 2
    Helpful Answer Positive Rating
hfss api

What exactly do you want to control from Matlab and why?

Please be more specific!



Personally, I do not think it is worth the effort.

:D
 

hfssapi

I want to control HFSS via Matlab for the following purpose:

I want to simulate a geometric structure with HFSS. This device has some component that can be moved in the geometry, and the result will change.

The aim is to introduce three position vectors (x,y,z), move the geometry of that pieces, do the simulation, import the results to Matlab, treat the results, obtain the results which are interesting for us, optimize this results with an optimizer made by us in Matlab, and input again new position vectors in HFSS.

As I have said, we are using HFSSv11.

Any help?
 

matlab 和 hfss

In the document from ANSOFT : External Control of Ansoft HFSS v9:

For HFSS version 11, this example it has to be modified. The visual basic script, I mean.
line 11: Hfss has to be changed by HFSS
line 24:Geometry3DCmdTab --> LocalVariableTab
line 48: change wg_y='2in' by: "wg_y=" & Chr(39) & "2in" & Chr(39) & ""

About the matlab script, there are two functions I can't find in my Matlab version:
Do you have these functions?
Strip
file2str

any help?
 

hfss-matlab-api

I have not tried to use the COM interface for passing information from MATLAB to HFSS, but I can vouch for the HFSS API linked earlier. I used it to do exactly what you're trying. I implemented an optimization routine in MATLAB that varied parameters of the geometry. Once the parameters were set, my code used the functions in the API to create a VBScript that HFSS could read and executed HFSS with the script. This script generated the geometry, activated the simulation, and exported the results to a text file. Once the script finished, HFSS exited, and MATLAB read the result file to determine the next step in optimization. I believe that the examples directory in the API has a dipole optimization that could show you the basic structure of the routine.

The API was written for v9, but I've not had any problems running it under v10. I think it should work with v11 as well. If it won't, you just need to look at the VBScript specs, and modify the MATLAB functions. You can also use the API as a guide to implement more HFSS functions like discrete and fast sweeps.

I think the API is probably a simpler and clearer method than the COM implementation, but I don't know.

As for the "Strip" and "file2str" functions, I don't believe they are built-in MATLAB commands. I have no idea what "Strip" might do, but "file2str" probably reads an entire file into a single character vector. Googling "MATLAB function file2str" turns up a few implementations.
 
  • Like
Reactions: massinissa

    svia

    Points: 2
    Helpful Answer Positive Rating

    massinissa

    Points: 2
    Helpful Answer Positive Rating
hfss 和 matlab

I have used the Matlab-HFSS API for a while, I found it provides a very good way to control HFSS.
I think the value of this API is it tells us how to control HFSS in matlab, although not all the functions implemented and some functions has some errors. But I can write my own APIs according to thess APIs.
here is some problems I met when using it.
1, the API may be not stable, for some times, it will pop-up error message and can't work. I don't know why. sometimes this problem can be solved by close the matlab and run it again, but sometimes it doesn't work anyway. I don't know why.

2, for the HFSS11, the vb scripts change a little, the most important change I think is the Output Variables script, I can't use the old API now, that makes many inconvinience, but I don't know how to modify the API, because Ansoft doesn't update their help document to HFSS11.



2,
 

    svia

    Points: 2
    Helpful Answer Positive Rating
hfss matlab ink

I attach here the modifications I have done to both, the visual script and de matlab script for HFSS version 11. I think it works.
 
ahfss matlab

tyenergy,

I had some problems when running very long (several days) optimizations with the API because Windows Power Management would try to put the computer in standby. Windows thought it was idle because there was no user input, so the license server would shut down, causing HFSS to not be able to open at the next iteration. When I disabled power management, the routines ran for much longer with no issues. Maybe that's part of your issue #1?
 

matlab to hfss

it is a very useful topic.
 

hfss api matlab

where is the location of this api?
i am interested in this...
 

scripting.pdf hfss

I'm interested in this api as well. Anybody can upload it here or give some pointers about where to download it?
 

hfss scripting manual

svia said:
I attach here the modifications I have done to both, the visual script and de matlab script for HFSS version 11. I think it works.

thanx
 

matlab hfss script

Would it be easier to use optimisation / parametrisation features in HFSS?

:cry:
 

hfss matlab scripting api

i think it is useful to control HFSS, because we can make the simulation as programming.

can anyone upload the HFSS11's tutorial file "scripting.pdf".
 

hfss å’Œmatlab

Thanks for the script file that is uploadad. I am working on the same procedure, desgining a patch antenna in hfss and optimizing it with matlab. This topic will be very useful.
 

eigenmode matlab hfss api

Hi tyenery,

I read that you already used the HFSS_API. Do you know where I can download it? The Kansas state link seems not to work. Do you still need the scripting manual with HFSS 11?
Thanks
 
hfss matlab

can anyone share matlab calculator for the antennas ; cus i need to put matlab codes in my thesis
 

matlab + hfss

In my work with antenna ,I find this is a great help to my work .Thank you very much for sharing it !
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top