8/24/2019 Ltspice Vs Pspice
LTspice is (for me) much more straightforward to use. And it runs faster. The only feature I wanted that PSpice supported that LTspice didn't is Monte Carlo analysis. I'm not familiar with HPspice. Don't underrate the free feature of LTspice, even if your company pays for PSpice. Ngspice is SPICE compatible. You may apply PSPICE or LTSPICE device model parameters and netlists for simulating discrete circuits. Ngspice will also read HSPICE device libraries from semiconductor foundry PDKs for simulating integrated circuits. Ngspice builds on many operating systems.
$begingroup$
I am designing a buck-boost regulator for a course at school and I would like to use the OnSemi ntk3139p PMOS transistor. OnSemi provides a few spice models for this part and I am getting stuck converting the Pspice file so that it is usable in LTspice. I realize I could pick something else, but I wanted to take this opportunity to dive into some of the nitty gritty in spice.
Some of the references I have been following for spice are:
The Pspice file in question is listed bellow:
My crack at converting it is:
I have rearranged some of the lines so that they resemble some of the other subcircuit LTspice files that I have been looking at with the netlist first and the model definitions second and I have added the parenthesis to the parameters of the model directives. Most of the subcircuit file makes sense to me but a few of the devices I am not sure about such as
FI2 . I think this is a current dependent current source but it may not be used properly here. I am not sure where I am going wrong here as the error I am getting in LTspice is
The way I implement my NTK3139P.sub is:
Any help debugging this and/or explanations of where I went wrong or a friendly point to some more general spice literature would be appreciated!
Jesse
JesseJesse
$endgroup$
1 Answer$begingroup$
If I simply save that PSpice file to a
ntk3139p.lib file and import it in LTspice, it all works fine:
The Rds(on) looks in line with the datasheet for that part.
What you need to keep in mind is to change the PMOS statement line to X (because it's a subcircuit) and match the name to the subckt name declared in that lib. Ctrl-click to access the advanced properties page for the FET:
This is actually explained in detail at http://www.linear.com/solutions/1083
And if you actually want to import that model into LTspice so that you don't have to use an
.include statement, what you need to do is
Now you can add the new component, but since we're using X as type it automatically get labelled as an IC (
U ) rather than MOSFET as before. But we don't need an .inc line anymore for the simulation to work:
Honestly this procedure is usually not worth the hassle for me... and if you reinstall LTspice or load your schematic on a different machine, you have to do it all over again, never mind that it becomes less clear in the schematic what components you need[ed] extra libraries for. Furthermore, you can no longer change the MOSFET by right-clicking on it an picking a new model. If you try that with your custom
asy file, you get:
Which for me is the most annoying part. So I don't recommend doing this import procedure for MOSFETS; I think it's only worth the hassle for ICs.
I honestly don't know exactly what the FizzFizz
.sub files are restricted to contain in LTspice, but the ones that come with the program are all binary files containing LT's proprietary models, some of which also make use of LT's extensions like steady and so forth. I don't think the .sub binary format that LTspice uses is publicly documented anywhere.
12.5k11 gold badge2929 silver badges7676 bronze badges
$endgroup$
Not the answer you're looking for? Browse other questions tagged mosfetltspiceconversionmodelpspice or ask your own question.$begingroup$
I've recently realized that I can't do everything easily in ngspice, mainly because analysis has to be performed through the interpreter. I'm considering switching to a new SPICE simulator.
I'd like a list the advantages and disadvantages of the following SPICE simulators as well as experiences with the various simulators:
I'm well aware HSPICE is an expensive proprietary simulator, but I am able to get access to it, problem is I'd have to access it on a sever via SSH.
LTspice is already free, but not installed on my Windows 7 machine.
Already using ngspice in Fedora Linux.
PSpice available to me on my university's computers. I refuse to install it on my own computer, because it messes with the registry a bit too much.
sj755sj755
40433 gold badges88 silver badges1818 bronze badges
$endgroup$
6 Answers$begingroup$
I would say that depends heavily on what you need it for. Often the expensive spices are part of some e.g PCB design tool. I'm just trying out MultiSIm from NI (expensive orcad type tool), and it has lots of pretty virtual instruments (e.g scope, distortion analyser, etc) and monte carlo analysis (which LTspice does not have a 'convenient' version of - it does have some functions you can use though as Vlad points out, here is a link on using them) but to be honest I find that 99% of things I could do on LTspice.
I find the LTspice setup is by far the quickest out of any spice I have tried, once you get used to the key commands. R for resistor, D for diode, is much easier than clicking the picture (or even selecting from a pop up box in MultiSims case, arghh) and dragging to the right place every time. You can have a circuit done in seconds this way.
The manual is not as pretty either, but all the info you need is there regarding how to use, eg. the .param, .step and .measure commands for doing things like running an analysis many times and varying parameters. I just tried to run a transfer function analysis in MultiSim in this manner (i.e. run may times and vary a parameter then plot results) but despite reading/wrestling for hours with it, I couldn't manage it, but a quick addition of .step V2 -15 15 1 to the sheet made it possible in LTspice. Oli GlaserOli Glaser
I'm sure some of the above is simply as I'm new to MultiSim, and no doubt I am missing something (as the above example simply must be possible in a tool like that) and no I don't work for LT :-) but it has been the only spice that I have used regularly for the last few years. The main point is that it will do all the normal stuff as good (and probably faster) than the expensive tools, but if you need the extras (e.g. monte carle, PCB level anaysis based on actual routing/IBIS models - Altium does this excellently) and all wrapped up in one design tool then you may need more than if can offer. In my view it can't hurt much to have around even if you do need a more powerful tool anyway.
51.3k22 gold badges6363 silver badges130130 bronze badges
$endgroup$$begingroup$
My short answer is to just go with LTSpice, it is one of the best simulators on the market and it is free. You can't really beat that. But if you would like a breakdown feel free to read my personal opinions.
HSPICE:
![]()
LTSpice:
ngspice:
PSPICE:
13.6k22 gold badges2626 silver badges6969 bronze badges
Michael LeonardMichael Leonard
$endgroup$$begingroup$
I don't have experience with HSPICE, but use LTspice and NGSPICE very frequently. In my field (power electronics), I have observed fellow engineers actively refuse to work with the company-supplied Pspice after being exposed to LTspice.
Unfortunately, LTspice is closed source, has no scripting possibility, and you can't add (your own) code models to it. When you need these more advanced options (not many people do or care) NGSPICE is the way to go. It's open source, incorporates XSPICE, KLU, open-mp and CUA, and has a C-shell type interpreter with very advanced possibilities (but IMHO a horrible user interface). It does not have schematic entry but there are solutions for that (e.g. LTspice). NGSPICE can be used with gnuplot for very nice, programmable, graphical output.
Community♦
Marcel HendrixMarcel Hendrix
$endgroup$$begingroup$
I recently fought with the same battle as you trying to get a decent spice package and being on a Linux machine definitely does not help matters.
I used NI Multisim in school and its a fantastic interactive SPICE package. I love the fact you can watch a virtual scope and turn pot's to see real responses. The downside with it is I found it to be less than accurate when dealing with small signals and waveform performance in general. I still use it when coming up with circuit ideas until I have a pretty good idea of the design then I move to a better package for fine tuning things.
The best package I have used for hardcore SPICE has been SIMetrix. They have a free version that works on Linux too. Its the most accurate package I have used so far and has all the complicated options that require reading the manual quite a few times over to understand.
Here are examples of how I use both packages. In Multisim, I was making a transistor tester and needed to create a square wave with 0deg, 120deg, 240deg output via a schmitt hex buffer. Multisim did a swell job and visually lit up LED's like it would in real life when a transistor was put in the circuit. I used SIMetrix when I was making an amp for sound system that required a noise floor of >100dB.
Kevin Vermeer
17.7k77 gold badges4949 silver badges9797 bronze badges
uMindeduMinded
$endgroup$$begingroup$
![]()
As an addition to the previous answers, LTspice is a great freeware with limited possibilities on the digital parts: ibis models are not considered at the exception if you own/develop/find a software.
ngspice handles ibis file as well as mixed mode simulation (Verilog-AMS + Spice) if you install ADMSXml components. Unfortunately, this extension is tough to install and use (create a component/compile it/refresh/use it).
Pspice as a daughter of Cadence is very powerful and well known. Nevertheless, the free version allows a limited number of component, and quite slow in everyday use.
XSpice is ngspice like with multi threaded and shared processes possibilities to speed up simulations.
Then you can also use TINA from Texas Instrument which is free and allows as LTspice a bit of extra digital and ibis model. As a designer you should oftenly pay attention to the noise of your circuit and sadly only commercial one support well the noise consideration (Cadence, HSpice, UltraSim, ... and Xspice).
Ludwig CRONLudwig CRON
$endgroup$$begingroup$
Ngspice is not limited to the command line. One may include a scripting block in the netlist which is quite powerful.
ClydeClyde
$endgroup$
Not the answer you're looking for? Browse other questions tagged linuxspicewindowssimulation or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |