PSpice Ratiometric Simulations

This is not a school question. It's a real-life question.

Suppose three resistors are connected to a common node. The other end of each resistor is connected to a voltage source.

So V1 is connected to R1, V2 is connected to R2, and V3 is connected to R3. The opposite terminal of each resistor connects R1, R2, and R3 together.

I want to use PSpice Monte Carlo to observe the voltage at the common node.

R1 is a 1% resistor.

R2 and R3 are two resistors in a single package. Their tolerance is 1% but the tolerance of their ratio is 0.1%.

How can PSpice Monte Carlo be used to accurately determine the possible voltages of the common node?

Reply to
Bob Penoyer
Loading thread data ...

This might get you started. Got the basic idea from elsewhere on the web , so no credit to me :0) It does a worst case analysis 1% on all resistors , but I have NOT done the 0.1% ratio calculation. I'm sure someone can improve , but it will get you started. Use LTSpice.

Version 4 SHEET 1 880 680 WIRE 176 -32 16 -32 WIRE 320 -32 176 -32 WIRE 432 -32 320 -32 WIRE 16 16 16 -32 WIRE 176 16 176 -32 WIRE 320 16 320 -32 WIRE 16 160 16 96 WIRE 176 160 176 96 WIRE 320 160 320 96 WIRE 176 240 16 240 WIRE 320 240 176 240 WIRE 176 256 176 240 FLAG 176 256 0 FLAG 432 -32 Vout SYMBOL voltage 16 144 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 1 SYMATTR Value2 "" SYMATTR SpiceLine "" SYMBOL voltage 176 144 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V2 SYMATTR Value 2 SYMATTR Value2 "" SYMATTR SpiceLine "" SYMBOL voltage 320 144 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value 3 SYMATTR Value2 "" SYMATTR SpiceLine "" SYMBOL res 0 0 R0 WINDOW 3 -70 117 Left 2 SYMATTR InstName R1 SYMATTR Value {wc_a({R1},tola)} SYMBOL res 160 0 R0 WINDOW 3 -32 119 Left 2 SYMATTR InstName R2 SYMATTR Value {wc_a({R2},tola)} SYMBOL res 304 0 R0 WINDOW 3 68 68 Left 2 SYMATTR InstName R3 SYMATTR Value {wc_a({R3},tola)} TEXT -264 -24 Left 2 !.param tola=0.01 TEXT -264 296 Left 2 !.function wc_a(nom,tola) if(run==1,nom,if(flat(1)>0,nom*(1+tola),nom*(1-tola))) TEXT -264 -64 Left 2 !.step param run 1 40 1 TEXT -264 328 Left 2 !.tran 1 TEXT -264 24 Left 2 !.param R1 = 1k TEXT -264 64 Left 2 !.param R2 = 2k TEXT -264 104 Left 2 !.param R3 = 2k

Reply to
robindavis001

Parameterize the _value_ of R2 and R3. Then Monte Carlo on the parameter and the ratio? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

You could make R2 and R3 each from two resistors in series, and apply different Monte Carlo rules to them, specifically lock R2A and R3A to the same value and flog them 1%, but let the other two be independent and vary 0.1%.

Something could be done with a Y-configuration representing R2 and R3, but takes more thinking.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

Jim Thompson a écrit :

The real question being: does one need spice for such a simple answer that should take no more than 2 or 3 lines?

--
Thanks, 
Fred.
Reply to
Fred Bartoli

You didn't include the "2 or 3 lines" ?:-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Come on... I carefully wrote 1 2/3 lines to hint you in the right direction, leaving you 1 1/3 line to complete the answer :-) Now you have between 20 and 30 characters left. That's getting to be tough.

--
Thanks, 
Fred.
Reply to
Fred Bartoli

I was yanking your chain. It's a simple Algebraic expression. I don't (generally) do Monte Carlo... I do worst case. If I pass worst case I know I'll pass _any_ Monte Carlo. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

You can use the known ratio tolerance, if you change the circuit part with R2, R3, V2, and V3 to a de Thevenin equivalent circuit, applying the resistance tolerance to the internal resistance and the ratio tolerance to the equivalent EMF of the de Thevenin voltage source.

--

Tauno Voipio
Reply to
Tauno Voipio

Worst case in this instance means only testing eight points, so one does wonder why they can't start there...

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
Why am I not happy that they have found common ground? 

Tim Wescott, Communications, Control, Circuits & Software 
http://www.wescottdesign.com
Reply to
Tim Wescott

Some managers get a hard-on over Monte Carlo... you know the type, they live in Californica, vote leftist, and buy Cadence tools >:-}

In my ASIC world it's easier to do worst case... maybe 15-120 simulation runs depending on the component type-count... and it's easier to evaluate the results by eye. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I could see doing Monte Carlo either if it runs faster than worst-case, or if some of your "goodness" to parameter relationships weren't monotonic (meaning that the worst case isn't on a vertex of your parameter space), or if you (a) have a good grasp on the actual probabilities within your ranges, and (b) aren't passing worst-case but think you could get sufficient yield in the real world.

I don't know if I believe either (a) or (b), I'm not sure that there are any cases of non-monotonic relationships like I'm hypothesizing, and I'm not sure than you really get a good statistical sampling in Monte Carlo unless you do more testing than you would need for worst case.

Maybe it's just that "Monte Carlo" sounds like a better place to be than "worst case".

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
Why am I not happy that they have found common ground? 

Tim Wescott, Communications, Control, Circuits & Software 
http://www.wescottdesign.com
Reply to
Tim Wescott

The main non-monotonic worst cases are usualy in filters, where the resonant point is included in the range of values...

Charlie

Reply to
Charlie E.

I was once in the casino at Baden-Baden, Germany. Talk about feeling out-of-place... people were betting more than I made in 5 years :-(

But nice restaurants... like "Der Kleiner Prinz" ;-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     | 
| Analog Innovations, Inc.                         |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| Phoenix, Arizona  85048    Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

er

s
e
e

en

I

rst

      ...Jim Thompson

es

y

on

I read an article about by who travels around to casinos, the only place he really felt poor was one of the asian casinos where new rich chinese were shoveling piles of money on the tables like there was no tomorrow

-Lasse

Reply to
langwadt

It's been a while since I was at either, but the Macau casinos looked pretty grubby compared to Monte Carlo. A lot of money changing hands at both though.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward" 
speff@interlog.com             Info for manufacturers: http://www.trexon.com 
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Stay in the casino awhile and the two rapidly become one. :(

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 USA 
+1 845 480 2058 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Free drinks!

--

John Larkin         Highland Technology, Inc 

jlarkin at highlandtechnology dot com 
http://www.highlandtechnology.com 

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom laser drivers and controllers 
Photonics and fiberoptic TTL data links 
VME thermocouple, LVDT, synchro   acquisition and simulation
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.