Rules | Recent posts | topic RSS | Search | Register  | Log in

MATLAB-HFSSv11

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Electromagnetic Design and Simulation
Author Message
svia



Joined: 07 Feb 2008
Posts: 7
Location: Barcelona, Espaņa


Post13 Feb 2008 17:00   MATLAB-HFSSv11

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


Last edited by svia on 21 Feb 2008 8:58; edited 1 time in total
Back to top
nicklas_a74



Joined: 04 Oct 2002
Posts: 35
Helped: 18


Post13 Feb 2008 20:39   Re: MATLAB-HFSS

I searched the webb and found the following link:

https://www.cresis.ku.edu/~rvc/projects/hfssapi/doc/hfss-matlab-api.html#download

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
Back to top
svia



Joined: 07 Feb 2008
Posts: 7
Location: Barcelona, Espaņa


Post15 Feb 2008 14:57   Re: MATLAB-HFSS

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!

http://www.edaboard.com/ftopic295234.html

http://www.edaboard.com/viewtopic.php?t=62329&highlight=matlab+hfss

http://www.ansoft.com/converge/waveguide_components.pdf

Thanks


Last edited by svia on 18 Feb 2008 8:55; edited 1 time in total
Back to top
fantomf4



Joined: 01 Aug 2002
Posts: 117
Helped: 5


Post17 Feb 2008 15:04   Re: MATLAB-HFSS

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.

Very Happy
Back to top
svia



Joined: 07 Feb 2008
Posts: 7
Location: Barcelona, Espaņa


Post18 Feb 2008 8:54   Re: MATLAB-HFSS

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?
Back to top
svia



Joined: 07 Feb 2008
Posts: 7
Location: Barcelona, Espaņa


Post20 Feb 2008 11:46   Re: 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?


Last edited by svia on 21 Feb 2008 8:57; edited 1 time in total
Back to top
hunerdspoke



Joined: 14 Sep 2007
Posts: 11
Helped: 4


Post20 Feb 2008 19:05   Re: MATLAB-HFSS

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.
Back to top
tyenergy



Joined: 27 Mar 2006
Posts: 13
Helped: 1


Post21 Feb 2008 7:32   MATLAB-HFSS

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,
Back to top
svia



Joined: 07 Feb 2008
Posts: 7
Location: Barcelona, Espaņa


Post21 Feb 2008 8:55   Re: MATLAB-HFSS

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.


Sorry, but you need login in to view this attachment

Back to top
hunerdspoke



Joined: 14 Sep 2007
Posts: 11
Helped: 4


Post21 Feb 2008 17:19   Re: MATLAB-HFSSv11

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?
Back to top
ansonjimli



Joined: 29 Apr 2006
Posts: 16


Post22 Feb 2008 12:55   MATLAB-HFSSv11

it is a very useful topic.
Back to top
peleda



Joined: 10 Jan 2006
Posts: 140
Helped: 30
Location: Monte Carlo


Post17 Mar 2008 6:53   Re: MATLAB-HFSSv11

where is the location of this api?
i am interested in this...
Back to top
turbojet



Joined: 04 Apr 2006
Posts: 2


Post17 Apr 2008 10:15   MATLAB-HFSSv11

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



Joined: 10 Nov 2007
Posts: 33
Helped: 2


Post17 Apr 2008 10:45   Re: MATLAB-HFSS

svia wrote:
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
Back to top
fantomf4



Joined: 01 Aug 2002
Posts: 117
Helped: 5


Post17 Apr 2008 15:21   Re: MATLAB-HFSSv11

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

Crying or Very sad
Back to top
tyenergy



Joined: 27 Mar 2006
Posts: 13
Helped: 1


Post22 Apr 2008 10:03   MATLAB-HFSSv11

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".
Back to top
isilb



Joined: 13 Mar 2008
Posts: 5


Post29 Apr 2008 9:09   Re: MATLAB-HFSSv11

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.
Back to top
couless



Joined: 06 Jun 2007
Posts: 12
Helped: 2


Post15 May 2008 19:55   Re: MATLAB-HFSSv11

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



Sorry, but you need login in to view this attachment

Back to top
cisconur



Joined: 14 Nov 2007
Posts: 32


Post20 May 2008 8:38   Re: MATLAB-HFSSv11

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



Joined: 20 May 2008
Posts: 3


Post20 May 2008 14:42   MATLAB-HFSSv11

In my work with antenna ,I find this is a great help to my work .Thank you very much for sharing it !
Back to top
akedar



Joined: 27 Jul 2004
Posts: 263
Helped: 15


Post21 May 2008 7:10   MATLAB-HFSSv11

has anybody got working examples on antenna in HFSS11 not earlier versions
Back to top
couless



Joined: 06 Jun 2007
Posts: 12
Helped: 2


Post13 Jun 2008 5:27   MATLAB-HFSSv11 (API)

Hi,
This is the famous HFSS-API. It works well with HFSS9x. You could just follow these examples, and adapt them to HFSS11.

Have fun!



Sorry, but you need login in to view this attachment

Back to top
applo



Joined: 25 Jan 2008
Posts: 19
Helped: 1


Post16 Jun 2008 11:43   MATLAB-HFSSv11

very useful!!!
Back to top
tyenergy



Joined: 27 Mar 2006
Posts: 13
Helped: 1


Post26 Sep 2008 6:12   MATLAB-HFSSv11

hi couless
thanks for your kindness,
but i found that the script.pdf file you uploaded is the same as my own.
ansoft didn't update their this file correctly.

the outputvariable script has been deprecated as indicated in HFSS, although it still works.

i try to implement an API to export the network parameters, such as S,Y,Z,Gamma,Zo, just like the built-in script "oModule.ExportNetworkData"

but I can only export the results of the first frequency point, the later ones are all outflow, i don't know why
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Electromagnetic Design and Simulation
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap