微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > Importing multiple S2PMDIF files into ADS

Importing multiple S2PMDIF files into ADS

时间:03-25 整理:3721RD 点击:
Hi,

I want to import multiple S2PMDIF files into ADS but can?t find any other way than doing them except one by one, which is not practical as I have hundreds of
them.

I?ve tried using the ds_import command line tool but it only works for Citi, Touchstone and mdif files.

What I have tried is renaming the S2PMDIF file with a mdf extension on the end, but no avail. As well tried it as a touchstone, but still nothing.

I've been poking around the ADS directories, and I found the .aft file which makes up the import tool in ADS; it's called dftool. From reading, the .atf file
is the compiled counterpart of the AEL file, which controls all the data imports and exports, I think, in ADS. So if there's a way to get to the dft ael file
might help automate the conversion process.

Or there's some other way out there, if anyone on the forums can point me to?

Thanks,

Hakim

What are you trying to do, and why do you want to "import" the data?

If you want to look at (or optimize with) a large amount of data files, you can use a swept variable as an index into a namelist.mdf file that holds all the filenames. Use a DAC element to read the filename(s) from that namelist.mdf file into a variable, and use that variable as the filename in your S2PMDIF element.

If your filenames have a simple structure, you can also use the sprintf function in variable defintions, to dynamically build filenames from a swept variable.

Hi Volker,

Okay, I am trying to import a lot of pulsed Sparameter S2PMDIF files so I can make various data displays. From the ADS program I would
normally use the data file import tool that's provided, but this will take forever.

Can you elaborate what you meant about using a swept variable as an index? I kind of get what you mean, but I am a real newbie with ADS,
so if you can simplify the steps it would be great.

Thanks

Ok, I really think you should create a schematic to automatically process all your files. Importing them manually will results in many *.ds files, so you end up with many single files again. By reading them into a schematic, you can create larger resulting datasets that combine multiple files, and access that through an index.

In the ADS examples, there is an example workspace DataAccess_wrk which show various methods of using the data access component. That's what got me started with this type of work. In my case, it was optimization of a parameterized equivalent circuit model to fit hundreds of S2P files (each s2p file for a different parameter combination).

Below is what I had used. Be careful with defining the DAC parameters, it is easy to make mistakes there.

Hi Volker,

I am giving that a try at the moment. To be honest, I don't mind having many single files, as I have a few Perl scripts
that generates equations and graphs for me in the data display's, as the .dds data display files can be manipulated.

Thanks,

Hakim

Hi Volker,

I've attempted your method. Now I can get the files reading in, what I don't get now is how to differentiate between which
file I am using? I've attached my ADS schematic, filenames file and datafile to help illustrate what I've done.

Thanks,

Hakim

Hi. I've got it working and have attached my schematic and data files. The schematic is based of IVCAD's ADS template for pulsed S_params measurements.

I needed to format the original data files from the IVCAD measurements to match the sample layout, then create a file with a list of files to be read in, as Volker suggested. I needed to read in two different files, so have used 2 DAC's to access the filelists and one to access the data.

DAC1 gets the filename from DAC2, where DAC1's iVar (INDEX) sweeps the pulsed bias points, while DAC2's iVar (FILE_INDEX) sweeps the files. DAC3 is similar, where its iVar is the FILE_INDEX and its filename is passed to the 2-port simulator.

Needed 2-parameter sweeps. One to iterate the files (outer loop), and the second for iterating through the s-params (inner loop).

Hope this helps.

Hakim

Attachment 108469Attachment 108470Attachment 108471

Thanks for posting your solution Hakim. I am doing something similar in that I have two bias variables and one S2P file per unique bias point. The step size between bias points can be uneven and not all data rows are the same length, so I am still working on the best way to format this data to import it into ADS for data display, simulations, and parameter extractions/optimizations.

I could reformat the data to store all of the S2P files in one S2PMDIF file but I think I will still need a MDF table file or two in a DAC to control a parameter sweep over uneven bias points and uneven row/column sizes. I put together a simple test case using a parameter sweep to iterate over evenly spaced bias points in a S2PMDIF file.

I was hoping to download your attachments to view them as an example, but I get a message from Edaboard that it is an invalid attachment, I wonder if you could re-upload them, or if you would be willing to email them to me?

Have you looked at the solution in my post #4 above?
Your requirements seem to be the same as described there.

Yes, your solution is basically what I'm looking for, so I have implemented a simple case which can import using this method.

Now what I am working on is two additions - creating a two-dimensional parameter sweep over my two bias variables, and also handling irregularly sized parameter sweeps.

I'm using irregular array sizes because of power dissipation limitations so I collect the data with a power compliance and high power dissipation points are skipped. It seems that ADS has some challenges in plotting with irregularly sized multidimensional arrays so I'm wondering if it's possible to have a "NaN" s-parameter file: in Matlab/Python I import the skipped sweep points as "not a number" so that plots and data fits just ignore the missing points. The data can't just be zeros because then ADS would plot it.

Understood, but I think your 2D sweep is the wrong way to go with irregularly sized parameter sweeps.

My proposal is to sweep an index variable instead (1-D sweep), where the two bias variable values are read from the the *.mdf file together with the corresponding s2p file. One line in the *.mdf per bias condition. In my example above, it was 3 parameters plus the s2p name.

Implemented this way, you have only valid data points and all the ADS data management is straighforward.

This would indeed make the data pre-formatting and simulation control much simpler. However if I did this then would it be possible to do things like take a derivate with the diff() function using one of the two bias variables as the independent variable?

I got a test case working to do a 2D parameter sweep using some dummy data files. DAC1 and sweep1 read a file which contain all of the V1 bias points. Each row in the DAC1 file points to another file which contains the V2 sweep for that V1. DAC2 reads in the file with the V2 sweep, and each V2 sweep file can contain different numbers of points. The full bias data is read in by DAC2 and this bias data is used to access a S2PMDIF file with all of the s-parameter data, though the DAC2 file could also point to an individual S2P file. Attached diagrams show the control files and ADS schematic.

Nice ... I agree that this will allow easy & straightforward plotting/postprocessing in the data display. That wasn't a requirement in my application, where the data was only use for fitting a lumped model.



One more comment: If your S2P filenames can be derived from the bias variables, you could use that to access the individual S2P files directly, instead of combining them into an MDF file. In ADS schematic, we can use the sprintf() function to create/calculate strings from variables.

If your filename structure is like this: "myfile_vd3.0_id10.0.s2p" for vd=3V and id=10mA, and your variables are vd=3 and id=10, the sprintf statement to derived the filename from the variables would be

Code:
filename=sprintf("myfile_vd%0.1f_id%0.1f.s2p, vd, id)
sprintf() formatting is the same as in many other programming languages (C, Perl, Matlab, ...)

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top