Maker Pro
Maker Pro

Parameter tolerance Pspice

ryz

Aug 16, 2012
6
Joined
Aug 16, 2012
Messages
6
Hi there!

I have a rather tricky question (or it kept me busy for a few days now at least).
I want to analyze a simple temperature measurement circuit using an NTC as the sensing device.
I found nice detailed information about creating NTCs in SPICE programs and I created my device which works just fine.
However I want to take the model to the next level by adding the tolerance of the NTC parameters. Adding deviation to a part is easy, as far as you only want to do it with resistances or capacitors, well I want to do it with parameters instead!

The NTC model which I use is attached to this post.

Now my problem in detail, and how I tried to solve it (but did not succeed):The parameters which this small subcircuit uses are only used to adjust the output voltage of a voltage source, therefore they do not appear as resistors or capacitors in the circuit. If the would I could simply add the DEV to the RC parts and be done with the job.

What I tried:
The first thing that came to my mind was to simply add the DEV=1% after the parameter value like this
.PARAM R_25 10k DEV=1%
This did not work because Pspice thought that I am trying to redefine DEV.

The other thing was to add resistors which are connected on both their pins to GND. In this case it is possible to add the DEV to the resistor´s .MODEL directive, but I was unable to use the resistor´s value in the equation later.

I tried other silly things too but I failed to achieve my goal (or the plot of the maximum deviation and the nominal velue aligned perfectly, which basically means that there was no deviation)

I would really appriceate any input on this matter. :)

Thank you!
 

Attachments

  • NTC_10k.txt
    775 bytes · Views: 159

ryz

Aug 16, 2012
6
Joined
Aug 16, 2012
Messages
6
Sadly not. I have stumbled upon this when I was googling my problem. He also asks a similar quastion but the answer is not quite good, because in the answer the poster passes parameters to resistors which already have this built-in DEV property.

In my case I have no real resistors, i want to model an NTC with the voltage source.

I was thinking on some really dirty workaround but I don´t know if it works. I will post it if it does.
 

ryz

Aug 16, 2012
6
Joined
Aug 16, 2012
Messages
6
So here is my dirty trick, which also failed (but I can´t see why)

  1. Instead of using the parameters directly in the equations I created a separate part of the circuit with a current source and two resistors connected in series. (There are two parameters with tolerance)
  2. I assigned the two resistors the values from the parameters and defined a DEV for each of the resistors.
  3. Using Ohm´s Law (U=R*I) I used the voltage over the corresponding resistor instead of the parameter itself, therefore gaining the resistance of the resistor (I=1)

The simulation runs but the deviation is still not visible, however now I really don´t see my mistake.

The way I think it should work is the following: The resistor value can be gained as the voltage drop of the resistor (I=1). This value is varied through the DEV, therefore it should be different from the nominal. This voltage drop (the deviated parameter) is used in the equation to calculate the output, therefore the output should also deviate.

Any input is appriceated. :confused:
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
I can understand that you want the NTC to be controlled by the temperature. You're going to some length to model it.
Since this is obviously a problem, why not use a simple resistor with a value defined by a .PARAM statement where the resistance is evaluated using another parameter, namely the temperature, whcih can be gobally defined for the whole simulation in another .PARAM statement? This means each simulation runs only at one temperature - no changing temperature within one run.
Currently I can't say whether it is possible to change the temperature within one simulation run at all.
 
Top