I am trying to simulate a load in SPICE(PSICE). This load is modeled by a resistance that can go from a high value(thereby sinking low current) to a very low resistance that can draw a large amount. How can I model such a variable resistor (w.r.t time) in SPICE ?
Asked
Active
Viewed 3,086 times
1
-
Do you really need the time aspect? If not parameter sweep will work. If you really need a precise curve over time... I don't know! – Fizz Oct 13 '15 at 13:42
-
A parameter sweep would do just fine. – Board-Man Oct 13 '15 at 13:42
-
http://moodle.cecs.pdx.edu/pluginfile.php/709/mod_resource/content/0/Project/LTSpice_Parameter_Sweep_Tutorial_V02.pdf – Fizz Oct 13 '15 at 13:43
-
it asks for a user name and passworsd :( – Board-Man Oct 13 '15 at 13:43
-
I don't know about your specific spice incarnation, but with ltspice it can be done this way: http://electronics.stackexchange.com/questions/3623 – PlasmaHH Oct 13 '15 at 13:43
-
I am using PSICE and WINSPICE(code version). So, it would be helpful if I get the coding version of it. – Board-Man Oct 13 '15 at 13:44
-
@VinodKaruvat: That's pretty strange. I'm not at pdx.edu and the link works for me. The keyword is ".step param" in LTspice. If you google this you'll find other tutorials on-line. – Fizz Oct 13 '15 at 13:59
-
As far as I can tell it's [the same in PSpice](https://books.google.com/books?id=RO7KBQAAQBAJ&pg=PA147) so probably works in most implementations. – Fizz Oct 13 '15 at 14:03
-
So, using step command, I can vary the resistance value. So, it would be something like this - .STEP Res RMOD init value final value step-value ? The above is what I got from your link. Assuming Res is the part number, RMOD is what ? – Board-Man Oct 13 '15 at 14:09
-
Yes. By the way the solution suggested by @PlasmaHH is different and rather cumbersome (you need a separate component for the variable resistor). With ".step param" you can vary almost anything. – Fizz Oct 13 '15 at 14:11
-
Never mind, he was probably talking about his solution http://electronics.stackexchange.com/a/151183/54580 (using behavioral resistor). Never tried that one. – Fizz Oct 13 '15 at 14:13
-
I just modeled thhis as u said, but got an error- V1 1 0 5; R1 1 2 0.015; X1 1 2 3 OPAMP1; X2 2 3 4 DMG2301U ; R2 4 0 10K; .step r2 100 10k 100; .PROBE – Board-Man Oct 13 '15 at 14:14
-
For starters, can you tell us what spice simulator are you using? And after that, you probably want to ask this as a separate question OR fully edit this question with all the details (spice code=deck). – Fizz Oct 13 '15 at 14:49
-
I should note that in ngspice (the most direct SPICE3 descendant), there's no .param sweep. See page 335 of the manual (section 17.8.7 Parameter sweep) http://ngspice.sourceforge.net/docs/ngspice-manual.pdf for a script that substitutes that. – Fizz Oct 13 '15 at 14:50
-
thank you. But I did mention I use PSPICE and WINSPICE. – Board-Man Oct 13 '15 at 14:51
-
Fair enough. I apparently missed that. ".step param" should work in PSpice. – Fizz Oct 13 '15 at 15:00
-
You could also consider this article describing a simple ABM variable resistance driven by a voltage http://powerelectronics.com/site-files/powerelectronics.com/files/archive/powerelectronics.com/mag/503PET07.pdf – Verbal Kint Apr 20 '17 at 18:51
1 Answers
1
So to summarize:
- if a precise curve of the resistor vs time doesn't matter
.step param
, which is supported in PSpice, is a good way. Actually you can remain ignorant of the SPICE dot command syntax in PSpice, because parametric sweeps can be configured entirely via GUI menus (Simulation Settings > Primary Sweep) as explained in this tutorial: http://m.eet.com/media/1179065/chapter (see p. 69) - for a curve vs time: SPICE3 behavioral expressions. I'm not sure exactly what PSpice supports in this regard... It seems the preferred way of doing this in PSpice is to use its Analog Behavioral Modeling (ABM) extension, which allows abstract components that can use
TIME
as a variable; see http://www.nordcad.dk/download/Forum/PSpice/abm.pdf for an overview. At least for this problem, it seems ABM is actually the same thing as a SPICE3 behavioral expression, with a (PSpice) syntax likeR1 1 0 VALUE={10 + 0.01 * TIME}
.

Fizz
- 14,355
- 2
- 43
- 97