a question about PSPICE multiple variables simulation
Aug 04, 2005 11 Replies
L
leelsuc
hi,all
I want to simulate an register and another potentionometer in the same schematic. When the pot changes, the register's value will change too. I couldn't express the relation in formal equations so I must use arbitrary value pairs for the pot and the register.
How can I simulate this in pSpice? I use ORCAD/pSpice 9.1.
I can use parametric simulation but I can only simulate single variable, e.g. a potentionometer. I know I need to write some codes but i have no clue. Anybody could do me a favor or give me some examples I'd appreciate that.
Thanks.
Didn't find your answer? Ask the community — no account required.
J
Jim Thompson
Use a single parameter, say .PARAM Counter = 1, then step it to N in increments of 1.
Express your register and potentiometer as TABLE functions of "Counter"
THIS IS A MAJOR FLAW IN PSPICE, Charlie!!
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
L
leelsuc
Hi,
I have to learn a new software....:( I also want to use ORCAD optimizer function to get better performance. Dear Jim, could you please write a simple code for me to follow? e.g. two pots in a closed-loop circuit. Thank you in advance.
I know they upgrade pSpice with a "parametric plotter" in ver. 10.X, but mine is v9.2.
thanksthanks t t t h h h h h a athanksa a a n n n n k k k k k s s s s s
Kev> > > >
C
Charlie Edmondson
Well, if he needed to have these guys vary independently, then he can use Advanced Analysis, and do a multi-parameter simulation. (I know you haven't played with this, Jim, since it is sorta hard to do from Schematics. There have to be a FEW advantages for using Capture and Concept... 8-) ) However, in this case, they need to be linked, since the pot value and the register value are linked, so he needs to just have a defined relationship. I have often had a single parameter defined in a PARAM, and have the second defined as an expression. Since this is a register/counter/pot relationship, this implies an analog to digital conversion, tricky in an expression. I would probably build in a circuit to do the ADC for me, or DAC if setting the register made more sense.
Charlie
J
Jim Thompson
That's why I suggested TABLE... avoids an expression between parameters, but I've resorted to that way as well :-(
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
J
Jim Thompson
[snip]
I only design microchips so I don't use optimizer, though I use sensitivity analysis occasionally.
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
K
Kevin Aylward
Indeed. It gives me the opportunity to point out that in SuperSpice you can go:
R1: 10k 3k 8k C2: 1n 2n 5n 6n L1: 5u 7u 10u
and SS will run every combination of all the values and plot them all in one go!
Kevin Aylward snipped-for-privacy@anasoft.co.uk
formatting link
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.
*
*This model can be distributed provided this notice remains
*copyright (c) Kevin Aylward, 2004, snipped-for-privacy@anasoft.co.uk
*This is an analog A to D
d0 is lsb. aref is the +/-vin range. dref is the digital output level e.g. 5V supplies
*
*This model can be distributed provided this notice remains
*copyright (c) Kevin Aylward, 2004, snipped-for-privacy@anasoft.co.uk
*This is an analog D to A
d0 is lsb. aref is the +/-vout range. dref is the digital switch point, e.g. 2.5 on 5V supplies
output and input is referanced to 0V.
The 1/512 is 1/2 lsb offset to provide for symetrical swings etc...
SuperSpice, a very affordable Mixed-Mode Windows Simulator with Schematic Capture, Waveform Display, FFT's and Filter Design.
L
leelsuc
there is no such a "look-up table" in ORCAD pspice A/D 9.2. I've spent three days on studing advanced simulation by pspice and draw a conclusion:
....write two sub circuit files and define the two registers as two function of a parameter, e.g. a counter N, respectively, then do simulation. this is silly 'coz I must solve the LMS interpolation to find coefficients of equations by using somekind of maths software package. e.g. IDL, Matlab. then go back to ORCAD.
The ORCAD optimizer is garbage, don't try to learn, it'll waste your time.
okey, it's concluded.
J
Jim Thompson
What are you running on, a contraband copy? You'll find Etable, Gtable and just plain "Table" in the PSpice Users Guide.
That's alright, optimizers are for amateurs ;-)
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
L
leelsuc
I READ GTABLE/ETABLE BUT I DON'T KNOW HOW TO PLAY IT.
I RUN SVBKSB (I.E. singular value backsubstitution) UP TO 4RD ORDER TO CAL. COEFFICIENTS. IT WORKS WELL. 3RD ORDER IS ENOUGH.
IF YOU HAVE TIME, JUST SHOW US SOME EXAMPLE CODES OF HOW TO USE GTABLE/ETABLE FOR AN ANALOG REGISTER.
THANKS.
J
Jim Thompson
No "codes" to it, just fill in the x,y values... "x" = input, "y" = output.
And knock-off the all-caps!
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.