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.

convert an S2p file to spice output file (lib )using Python

Status
Not open for further replies.

ftn

Newbie level 1
Joined
Nov 24, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
can someone help me and tell how to convert an S2p file (network analyzer) to an spice file (LIB file)
using python

thank you View attachment Datei.rar
 


They are fundamentally different things. More likely you would
pick a SPICE primitive that functionally matches the device,
and then -fit- the model parameters to get the right S param
behavior.

The VNA knows nothing about topology and Python would
have to take a guess or be educated, neither of these a
small matter.
 

I do have a vague recollection of seeing a couple of s-param
behavioral blocks down in one of the Cadence standard libs,
back when I was using that tool set. In this case you might
be able to just push the VNA values into their appropriate
form-fields. But this is not SPICE, it's part of schematic entry
libraries and probably ends up at a veriloga module of some sort
I expect. Which Spectre is fine with, but some SPICE dialects
may not be.
 

You probably didn't notice, but ftn appended an example lib component comprised of behavioral controlled sources, defined in frequency domain by a FREQ statement.

They are essentially one-to-one conversions of the s2p file and in so far don't involve complicated operations.

But the usability of frequency domain models with only a few data points is very limited and even with a reasonable data point density, you shouldn't overestimate their performance. In time domain anylysis, the models are evaluated by a fourier transform which doesn't work well over a large frequency respectively time scale. So yes, frequency domain models have a purpose for devices that can't be easily represented by functional models, lossy cables are e.g. an example where I have already used it. But in most cases, parameter extraction for functional models is preferable.
 
You probably didn't notice, but ftn appended an example lib component comprised of behavioral controlled sources, defined in frequency domain by a FREQ statement.

Thanks, indeed I missed that.

My experience with that simplistic approach: it just doesn't work well. Even if you have many data points, and even if you go low enough in frequency to have something like a "DC" behaviour included, results for transient analysis are poor. And from what I remember, it really slows down the analysis.
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top