.step temp 0 100 10 , with simulation command set to DC op point or am I missing something here. Rob
.step temp 0 100 10 , with simulation command set to DC op point or am I missing something here. Rob
The it drew a staggered set of curves but I needed only one graph.
What exactly are you trying to do, Joerg? Get a DC output versus temperature? Or what? You're showing less and less clarity as you go :-) ...Jim Thompson
Yes, a DC output versus temperature as _one_ contiguous graph. Not as a set of graphs like what the .step function usually does.
But as I said, it's now all done and done, using a few sheets of paper and ye olde pencil :-)
.DC TEMP START STOP INCREMENT
eg
.DC TEMP -40 85 0.1
.STEP is for performing other types of simulations, repeatedly, with different "parameter" values for each simulation. ...Jim Thompson
Hello Joerg,
If you use
.step TEMP 0 100 1
together with only
.OP
You will get only one graph.
There is one drawback with the global TEMP. If you have opamp models around, they may suffer because of this varying TEMP. Opamp models are mostly made for only the standard temperature in SPICE (27°C). If this is the case with your circuit, I can make you another example where the NTC-resistor is controlled by a free variable, e.g. TMP.
Best regards, Helmut
Yes, there are opamps in there. But as I mentioned before I am already done with this circuit, did it in part with the old method (dead tree plus pencil, and lots of eraser crumbs by the end ...).
But I still want to check out the file set you sent. Not sure if I can this weekend because I may have to work. Another switcher design. It almost feels like eating the same meal every day :-)
Hi Mark,
Saturday morning, time to muse over adding your thermistor equation to my symbol and model libraries, and studying the Steinhart-Hart equations for "R", I wondered why you needed to use "PWRS"?
They way I read those equations, "x" is always greater than "y/2", so simply PWR, or even **(1/3) should suffice.
Or am I overlooking a trap (like, can B/3C be negative ?:-)
Thanks! ...Jim Thompson
Not sure why I used PWRS. This was done 7 years ago and my stack overfloweth. I would guess that it's force of habit or there could be a negative value involved. I sort of remember fighting with the PWR function and realizing that it didn't honor the negative sign some years ago.
Mark
And it looks like "standard" data is resistance versus temperature tables, rather than specifying A, B & C. Is that typical, or am I not looking in the right places?
It _would_ be easy enough to specify the subcircuit with parameter pairs, R1/T1, R2/T2, R3/T3, then have the behavioral model compute A, B & C. ...Jim Thompson
That is the standard for NTC. Probably because the big market for them is industrial control and the usual PLC can't do much more than simple ladder logic.
Also, those things have large tolerances so there ain't no real precision. However, if you run a tight PID control with them the table surely doesn't cut it.
Most of the times when I try this the PC starts to bog down. And heat the office which is nice these days but not in August :-)
I run a _real_ simulator :-)
Got a table of values I can try out my model on?
My guess is it'll run in seconds. ...Jim Thompson
For circuit level design I have yet to find anything I need where LTSpice can't do something that PSpice does. Chip design is probably different, I guess there comes a limit in terms of BSIM model support and so on.
Here ya go:
On its own it always does but once it's in the middle of a rather dense concoction of analog parts that quickly changes.
That part should end up all being linear Algebra. Does temperature change in ns ?? ...Jim Thompson
No, but once in a while one must monitor temperature pulses or fast trends. Usually to dodge a phut ... *BOOM* situation.
Standard are tables, not the A B C coeffs. I had an app note with the equations on it (too lazy to do arithmetic) which I solved in Mathcad using 3 points, but you can probably use Excel. Seems like a lot of work for PSpice to solve the coefficients.
What's interesting is simulating a resistor in hardware. A couple of people make VME and CPCI modules that have a lot of resistors and relays on board. They have limited ranges, nasty transient glitches, and tend to be not monotonic. And expensive.
We did this one, which we recently spun (rev C!) to finally make it really good. It was a surprisingly difficult thing to do.
It's full of MDACs, trim DACs, SSRs, bootstrapped opamps, and lots, lots of firmware and cal tables.
John
Yep, That's what I've found.
It's actually downright trivial to paste the table into a subcircuit, even if it's published in PDF form (given some nice editor like UltraEdit).
So I'm abandoning my "solver" approach (3 data points from the "table" :-), in favor of copy-and-paste of the whole table, as in:
*************************************************** .SUBCKT Thermistor THERMP THERMN R_RCONVERGE THERMP THERMN 1G G_G1 THERMP THERMN VALUE {V(THERMP, THERMN)/V(DATATABLE)} R_RDUMMY DATATABLE 0 1K X_SUB1 DATATABLE 0 THERM_DATA .ENDS Thermistor *************************************************** .SUBCKT THERM_DATA RTP RTN E_THERM_DATA RTP RTN TABLE {TEMP}The data was directly copied and pasted from the first two columns of the PDF link that Joerg posted.
Then cleaned up (in UltraEdit) in column mode, then processed with a macro to add the "continuation +" marks needed by Spice.
Much like the tabular varicap subcircuit posted on my website.
I'll (later :-) create an appropriate symbol, then post all of this method. ...Jim Thompson
Compliance (both ends to freely assignable nodes) might present some momentary difficulty... the rest is trivial :-) ...Jim Thompson
0.03 seconds, -55°C to 125°C, in 1°C steps, using the full table method. ...Jim Thompson
Have something to add? Share your thoughts — no account required.
Ask the community — no account required