# Conversion of HSpice/LTSpice-model to PSPICE

#### aar0n

Joined Jun 28, 2021
5
Hi everyone,

I'm new to this forum. I'm writing on my master thesis about a ISFET-curcuit-design. I found a good model for the ISFET from HSpice ("pH-ISFET-CodeNachMartinoia(1999).txt"), but I need it in PSpice. The reason is, that the company I work with, they use PSpice for every of there projects. So it's a "compatibility thing". Is there anyone who could help me with this? I'm a beginner with Spice-simulation. I already found a conversion to LTSpice ("ph-ISFET-StackFERTIG.txt"). Maybe this can help. I will also attach it.

Thank you!
Regards
Aaron

#### Attachments

• 7.4 KB Views: 16
• 4.6 KB Views: 13
• 5.7 KB Views: 13
Last edited by a moderator:

#### Papabravo

Joined Feb 24, 2006
17,545
Do you know for a fact that the models won't work as they are? In most cases a PSpice model works in LTspice right out of the box. The only things that will cause problems are the use of implementation specific features, or a requirement that such features be used. You are going to have to suss out those details on your own. It will cost you very little to run a simple experiment. The next level experiment would be to try to get ANY model you have to produce results in its native environment. This will establish a baseline for developing or adapting one or more models to run in your PSpice environment. If you can establish that the results are identical between different models and environments you will have a pretty high level of confidence in those results.

IMHO it would be a grave mistake to focus only on the PSpice model and environment. Every time you import a model there will always be questions and concerns about the provenance and the suitability of such a model. There is absolutely NO authority you can go to that will provide "model" verification and/or accuracy. It's the wild west out there and everybody is on their own. There are a handful of individuals that I might ask for their opinion if that ever became a necessity.

#### eetech00

Joined Jun 8, 2013
2,789
Hi everyone,

I'm new to this forum. I'm writing on my master thesis about a ISFET-curcuit-design. I found a good model for the ISFET from HSpice ("pH-ISFET-CodeNachMartinoia(1999).txt"), but I need it in PSpice. The reason is, that the company I work with, they use PSpice for every of there projects. So it's a "compatibility thing". Is there anyone who could help me with this? I'm a beginner with Spice-simulation. I already found a conversion to LTSpice ("ph-ISFET-StackFERTIG.txt"). Maybe this can help. I will also attach it.

Thank you!
Regards
Aaron
I've converted the LTspice file back to PSpice format.
File Attached.

The file will load and run in PSpice. However, it has convergence issue related to the Eph device equation.
I'll leave that for you to troubleshoot.

#### Attachments

• 4.3 KB Views: 17

#### aar0n

Joined Jun 28, 2021
5
@Papabravo I trust in this model. It is from a scientific publication and a lot of people use it succesfully in other publications. I cant find any information about how to import an .asc-file (LTSpice) to PSpice. If you have any tips, please let me know.

@eetech00 Thank you very much for the conversion! I was able to get the schematic symbol with the code, but as you mentioned there a convergence errors. Unfortunately Im a bloody beginner to PSpice. I tryed to fix it with the two options "Autoconverge" and "Advanced Converge Algorithms". What I got then seems a little better, but there is still a "convergence problem in DC sweep":

I found good tips at the PSpice-page, but I dont understand all of them.
https://www.pspice.com/how-resolve-convergence-error
Would you have any idea of solving this?

#### eetech00

Joined Jun 8, 2013
2,789
@Papabravo I trust in this model. It is from a scientific publication and a lot of people use it succesfully in other publications. I cant find any information about how to import an .asc-file (LTSpice) to PSpice. If you have any tips, please let me know.

@eetech00 Thank you very much for the conversion! I was able to get the schematic symbol with the code, but as you mentioned there a convergence errors. Unfortunately Im a bloody beginner to PSpice. I tryed to fix it with the two options "Autoconverge" and "Advanced Converge Algorithms". What I got then seems a little better, but there is still a "convergence problem in DC sweep":
View attachment 242500

I found good tips at the PSpice-page, but I dont understand all of them.
https://www.pspice.com/how-resolve-convergence-error
Would you have any idea of solving this?
I think the issue is the value of Eph. I believe it is at some "unkown or NAN" value during simulation and causes a timestep error. If you can determine what the min/max value of Eph should be, then you could use LIMIT to keep the value always between the limits.

#### aar0n

Joined Jun 28, 2021
5
@eetech00
Thanks for your advice. Since there are no well described details about Eph in the paper (the source of the HSpice-Code), I want to try it in the practical way. I created a schematic with ISFET an put voltage sources next to the pins as it is done in the paper. I created a simulation profile and added the .lib file of the ISFET in the simulation settings. Now I get Netlist-Errors for all of the 5 pins of the ISFET:

(The strange numeration of the pins was declared in the HSpice Code. For the moment I didn't change it.)

I tryed to find the source of the problem without success. Do you have any idea, what is going wrong? I attached the project folder. Thanks for your help!

#### Attachments

• 205.4 KB Views: 8

#### aar0n

Joined Jun 28, 2021
5
...maybe there went something wrong with the connection of the grafical part (.olb) and the code part (.lib). I created the olb-file with the "generate part" wizard (under "tools"). As I mentioned, the pins are numbered with 6,1,3,4,101 in the code, but the olb-symbol was generated with the numbers 1,2,3,4,5. Since there are these netlist errors, I changed the numbers manually in the symbol, but maybe this isn't sufficient?

#### Emeoc

Joined Dec 6, 2021
1
Your LTspice model is probably saving me a ton of time, thank you so much for sharing, @aar0n !

One question: I see that you removed RP1 and RP2 from the subcircuit definition. Is there a reason for that?

Also, for those wondering which paper was referenced in the code:
https://doi.org/10.1016/S0925-4005(99)00377-9
The original source code for the spice model is printed in the paper itself.