+ Post New Thread
Results 1 to 10 of 10
-
12th February 2019, 03:52 #1
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
Run ADS simulation from Matlab?
I know some posts have mentioned about cosimulation between Matlab and ADS Plotemy, but what I need is to run a basic ADS simulation (HB simulation for example) from matlab, so that I can control the optimization from matlab, I guess.
I've also read this thread: https://community.keysight.com/thread/25723 . I tried the command "hypeesofsim netlist.log" in matlab in the same folder of the netlist.log file, but Matlab couldn't compile the command. This is the error: Undefined function or variable 'hypeesofsim'.
Any advices are highly appreciated. Thank you for your time.
-
Advertisment
-
12th February 2019, 04:50 #2
- Join Date
- Oct 2006
- Location
- Real Homeless
- Posts
- 2,222
- Helped
- 606 / 606
- Points
- 14,695
- Level
- 29
Re: Run ADS simulation from Matlab?
You can run ADSsim from command Line.
So use system() function in MATLAB.
-
12th February 2019, 06:20 #3
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
Re: Run ADS simulation from Matlab?
Dear pancho_hideboo,
Thank you very much for your advice. I've tried the following commands in a Matlab script:
Code:command = 'hypeesofsim netlist.log'; status = system(command);
'hypeesofsim' is not recognized as an internal or external command, operable program or batch file.
-
Advertisment
-
12th February 2019, 06:23 #4
- Join Date
- Oct 2006
- Location
- Real Homeless
- Posts
- 2,222
- Helped
- 606 / 606
- Points
- 14,695
- Level
- 29
Re: Run ADS simulation from Matlab?
Simply you don’t include ADS directory in command search path.
What operating system do you use ?
You have to set environment variable.
-
Advertisment
-
12th February 2019, 10:55 #5
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
-
12th February 2019, 12:35 #6
- Join Date
- Oct 2006
- Location
- Real Homeless
- Posts
- 2,222
- Helped
- 606 / 606
- Points
- 14,695
- Level
- 29
Re: Run ADS simulation from Matlab?
See windows10 beginners book.
Instead of setting environment variable in operating system, you might add ADS directory in Matlab search path, although I don’t prefer this.
1 members found this post helpful.
-
12th February 2019, 15:10 #7
- Join Date
- Apr 2014
- Posts
- 1,892
- Helped
- 758 / 758
- Points
- 12,125
- Level
- 26
-
Advertisment
-
13th February 2019, 09:18 #8
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
Re: Run ADS simulation from Matlab?
Dear pancho and volker,
Thank you very much for your valuable time and advices. I'm following this link to creat a bat file to set the environment variable and run the netlist.log.
Here is my bat file
Code:set HPEESOF_DIR=C:/Program Files/Keysight/ADS2015_01 set COMPL_DIR=%HPEESOF_DIR% set SIMARCH=win32_64 set SVECLIENT_DIR=%HPEESOF_DIR%/SystemVue/2014.10/%SIMARCH% path %HPEESOF_DIR%\bin;%HPEESOF_DIR%\lib\%SIMARCH%;%HPEESOF_DIR%\circuit\lib.%SIMARCH%;%HPEESOF_DIR%\adsptolemy\lib.%SIMARCH%;%PATH%;. path %SVECLIENT_DIR%/bin/MATLABScript/runtime/win64;%SVECLIENT_DIR%/sveclient;%PATH% hpeesofsim netlist.log dds Half_wave_Rect.ds pause
The remaining problem is that I couldn't open the Data Display to execute the equations so that I can export the results to external files using write_var() function. I supposed the command "dds Half_wave_Rect.ds" would do this, but nothing happened. Is there any suggestions?
- - - Updated - - -
I made a mistake. The simulation was not successful as I thought previously. I checked by outputting a parameter by using the MeasEqn block and nothing was outputted after the .bat file was run. Here is the report in the command window. Can anyone tell me what I did wrong?
Code:hpeesofsim (*) 430.shp Dec 7 2014 (64-bit windows built: 12/07/14 09:11:55) Copyright Keysight Technologies, 1989-2015. Parsing the netlist... Flattening the netlist... HB HB2[1] <netlist.log> Pin=(-20->20) Warning detected by hpeesofsim during DC analysis `HB2'. Capacitor `C4' C=0.001 is unusually large. ................................................................................................................................................................................................................................................................................................................................................................................................................. HB HB3[1] <netlist.log> F0=915e+06 Port 1 has power at 9.15e+08 Hz Port 2 has power at 9.15e+08 Hz Driving port 1. . Driving port 2. . Evaluating unattached measurement equations ... Flushing unattached measurement equation results ... Checking for unresolved variables ... Flushing data (please wait) ... Flushing unattached measurement equation results ... ... data flush done. Resource usage: Total stopwatch time = 3.44 seconds. G:\ADS_Simulation\Rectifier_Topo_wrk>dds Half_wave_Rect.ds G:\ADS_Simulation\Rectifier_Topo_wrk>pause Press any key to continue . . .
-
13th February 2019, 13:01 #9
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
Re: Run ADS simulation from Matlab?
I'm terribly sorry to bother you this much. I've just found out the parameter was outputted in the same folder of the schematic. So that's mean my bat file did work. However it seemed that the dataset was not generated, and I could not open/display the dataset file (.ds) using the command line. Any help is highly appreciated.
-
14th February 2019, 09:06 #10
- Join Date
- Oct 2017
- Posts
- 27
- Helped
- 0 / 0
- Points
- 387
- Level
- 4
Re: Run ADS simulation from Matlab?
Finally I found a way to input variables and results to matlab by using the Matlab Output block in the schematic. I don't need the dataset, although I still do not know how to display or read the dataset. My problem has been temporarily solved. Thank you very much for all of your usefull hints.
+ Post New Thread
Please login