Nested parens are driving me nuts

J

Johnson

Guest
some of my SPICE ventures get to be Rube Goldberg-esque -- and the nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so that
I can de-"erroratate" my sims?
 
On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net>
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so that
I can de-"erroratate" my sims?
Get better at Algebra ?:)

Read up on functions (.FUNC) and expression syntax.

...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.
 
On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net>
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so that
I can de-"erroratate" my sims?

Use a text editor that keeps track of paren pairs. Ultra Edit may do
this and Semware's editor does this.

---
Mark
 
On Thu, 10 Nov 2005 23:28:17 GMT, qrk <SpamTrap@spam.net> wrote:

On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so that
I can de-"erroratate" my sims?

Use a text editor that keeps track of paren pairs. Ultra Edit may do
this and Semware's editor does this.

---
Mark
UltraEdit does it quite nicely. But if you need an editor to keep
track I don't know that I'd trust your Algebra ;-)

...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.
 
"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> wrote in
message news:k8m7n1p67u272dpk56qeo80ufbdaiho1vf@4ax.com...
On Thu, 10 Nov 2005 23:28:17 GMT, qrk <SpamTrap@spam.net> wrote:

On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the
nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so
that
I can de-"erroratate" my sims?

Use a text editor that keeps track of paren pairs. Ultra Edit may do
this and Semware's editor does this.
Here's a vacuum model (can you tell the author is Italian?) which I am
trying to shoe-horn into EWB (Multisim8) -- of course PWR and PWRS isn't
supported for the VCCS , but (1+SGN(x)) can be employed. I have pulled that
portion apart and it works. It's the VCVS which is causing the program to
terminate. The model purportedly works in SwitcherCAD. Instead of passing
the capacitor and resistor PARAMS I insert the values where appropriate.

I have gotten other vacuum tube models to work in Multisim8.

..subckt 6dj8i 1 2 3 ; placca griglia catodo
+ params: mu=28 ex=1.3 kg1=330 kp=320 kvb=300 rgi=2k
+ ccg=2.3p cgp=2.1p ccp=.7p
e1 7 0 value=
+{v(1,3)/kp*log(1+exp(kp*(1/mu+v(2,3)/sqrt(kvb+v(1,3)*v(1,3)))))}
re1 7 0 1g
g1 1 3 value= {(pwr(v(7),ex)+pwrs(v(7),ex))/kg1}
rcp 1 3 1g
c1 2 3 {ccg}
c2 1 2 {cgp}
c3 1 3 {ccp}
r1 2 5 {rgi}
d3 5 3 dx
..model dx d(is=1n rs=1 cjo=10pf tt=1n)
..ends
 
On Fri, 11 Nov 2005 08:34:22 -0500, "Johnson" <jdwalton@comt.net>
wrote:

"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> wrote in
message news:k8m7n1p67u272dpk56qeo80ufbdaiho1vf@4ax.com...
On Thu, 10 Nov 2005 23:28:17 GMT, qrk <SpamTrap@spam.net> wrote:

On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the
nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes so
that
I can de-"erroratate" my sims?

Use a text editor that keeps track of paren pairs. Ultra Edit may do
this and Semware's editor does this.

Here's a vacuum model (can you tell the author is Italian?) which I am
trying to shoe-horn into EWB (Multisim8) -- of course PWR and PWRS isn't
supported for the VCCS , but (1+SGN(x)) can be employed. I have pulled that
portion apart and it works. It's the VCVS which is causing the program to
terminate. The model purportedly works in SwitcherCAD. Instead of passing
the capacitor and resistor PARAMS I insert the values where appropriate.

I have gotten other vacuum tube models to work in Multisim8.

.subckt 6dj8i 1 2 3 ; placca griglia catodo
+ params: mu=28 ex=1.3 kg1=330 kp=320 kvb=300 rgi=2k
+ ccg=2.3p cgp=2.1p ccp=.7p
e1 7 0 value=
+{v(1,3)/kp*log(1+exp(kp*(1/mu+v(2,3)/sqrt(kvb+v(1,3)*v(1,3)))))}
re1 7 0 1g
g1 1 3 value= {(pwr(v(7),ex)+pwrs(v(7),ex))/kg1}
rcp 1 3 1g
c1 2 3 {ccg}
c2 1 2 {cgp}
c3 1 3 {ccp}
r1 2 5 {rgi}
d3 5 3 dx
.model dx d(is=1n rs=1 cjo=10pf tt=1n)
.ends
Maybe break down the pieces into small functions and then see where
the error reports lead you.

...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.
 
"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> wrote in
message news:0fkan1lq5ggeq2b28tiinn117431c5g8el@4ax.com...
On Fri, 11 Nov 2005 08:34:22 -0500, "Johnson" <jdwalton@comt.net
wrote:

"Jim Thompson" <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> wrote in
message news:k8m7n1p67u272dpk56qeo80ufbdaiho1vf@4ax.com...
On Thu, 10 Nov 2005 23:28:17 GMT, qrk <SpamTrap@spam.net> wrote:

On Thu, 10 Nov 2005 13:22:00 -0500, "Johnson" <jdwalton@comt.net
wrote:

some of my SPICE ventures get to be Rube Goldberg-esque -- and the
nested
parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes
so
that
I can de-"erroratate" my sims?

Use a text editor that keeps track of paren pairs. Ultra Edit may do
this and Semware's editor does this.

Here's a vacuum model (can you tell the author is Italian?) which I am
trying to shoe-horn into EWB (Multisim8) -- of course PWR and PWRS isn't
supported for the VCCS , but (1+SGN(x)) can be employed. I have pulled
that
portion apart and it works. It's the VCVS which is causing the program to
terminate. The model purportedly works in SwitcherCAD. Instead of
passing
the capacitor and resistor PARAMS I insert the values where appropriate.

I have gotten other vacuum tube models to work in Multisim8.

.subckt 6dj8i 1 2 3 ; placca griglia catodo
+ params: mu=28 ex=1.3 kg1=330 kp=320 kvb=300 rgi=2k
+ ccg=2.3p cgp=2.1p ccp=.7p
e1 7 0 value=
+{v(1,3)/kp*log(1+exp(kp*(1/mu+v(2,3)/sqrt(kvb+v(1,3)*v(1,3)))))}
re1 7 0 1g
g1 1 3 value= {(pwr(v(7),ex)+pwrs(v(7),ex))/kg1}
rcp 1 3 1g
c1 2 3 {ccg}
c2 1 2 {cgp}
c3 1 3 {ccp}
r1 2 5 {rgi}
d3 5 3 dx
.model dx d(is=1n rs=1 cjo=10pf tt=1n)
.ends


Maybe break down the pieces into small functions and then see where
the error reports lead you.
Yes, that was I resorted to -- I built up the model with multiple nodes
until it worked, then substituted back -- in some SPICE-ware LOG returns
Natural Logarithm, not in Multisim where LN must be used.
 
some of my SPICE ventures get to be Rube Goldberg-esque -- and
the nested parenthesis are probably the reason.

how is it possible to break the equations into manageable bite-sizes
so that I can de-"erroratate" my sims?
Zeus has a configurable find matching brace feature:

http://www.zeusedit.com/features.html
Note: Zeus is shareware (45 day trial).

The feature is located under the Edit, Find Matching Brace menu.

NOTE: If you this menu reports no braces found you will need to use
the Options, Properties menu and in the Templates section define a
set of matching braces strings.

Jussi Jumppanen
Author: Zeus for Windows IDE
 

Welcome to EDABoard.com

Sponsor

Back
Top