Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in the def "write_spice_subcircuit_s(self, z0, file: str) -> None: " #1056

Open
yifan0407 opened this issue Apr 29, 2024 · 4 comments
Open
Labels
Is it a bug? To be confirmed if it is a bug or not VectorFitting

Comments

@yifan0407
Copy link

yifan0407 commented Apr 29, 2024

1111.txt

After performed the function of write_spice_subcircuit_s(z0, spice_filename), I get the .sp file(as shown in 1111.txt) and import it into ADS, but I have no idea to choose which netlist dialect.
I chose PSPICE and imported the file, but there is some warnings that remind me WARNING: Referenced circuit "1" not found. WARNING: Referenced circuit ""-1"" not found.
when I simulated circuit, there is an error "syntax error" in this line:
X1 nt11 0 rcl_vccs_admittance res=2.061 cap=347.907a ind=369.601a gm=970.280m mult=1
when I check the corresponding line in the impoerted circuit file (.net), I found that:
1:x1 nt11 0 rcl_vccs_admittance res "=" "X2.061" cap "=" "X347.907a" ind "=" "X369.601a"
gm "=" "X970.280m" mult "="

do you have some ideas about the error? can you please give me some instructions?

@FranzForstmayr
Copy link
Collaborator

I don't know which dialects are available, but I can open the files in ltspice and ngspice

@yifan0407
Copy link
Author

yes I found the file can be recognised by ITSPICE software, have you used Keysight ADS?

@yifan0407 yifan0407 reopened this Apr 29, 2024
@FranzForstmayr
Copy link
Collaborator

No I haven't, sorry

@jhillairet jhillairet added the Is it a bug? To be confirmed if it is a bug or not label May 10, 2024
@Vinc0110
Copy link
Collaborator

It seems like ADS does not fully support regular SPICE netlists. See this example of a simple diode model:
https://www.edaboard.com/threads/how-to-use-a-spice-model-lib-file-in-keysight-ads-alternatives-helpful-too.376041/

The forums of Texas Instruments are also full of questions on how to include the SPICE netlists for the TI device models into ADS.

I don't currently have access to ADS anymore, but I remember they run their own vector-fitting routines when you include S-parameter blocks into a simulation. Of course, that only works if you can provide your network as a SnP file.

To summarize, I don't think this is an issue with the SPICE netlists exported with VectorFitting.write_spice_subcircuit_s(), but rather an ADS issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Is it a bug? To be confirmed if it is a bug or not VectorFitting
Projects
None yet
Development

No branches or pull requests

4 participants