Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Problem with PSPICE 132 character limit

Status
Not open for further replies.

soumendu89

Junior Member level 1
Junior Member level 1
Joined
Apr 29, 2011
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,397
Hello,

I am trying to create a subcircuit in PSPICE and I need to include following (dependent)voltage expression between two nodes 2 and 10 inside the subcircuit

E 2 10 value={(q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))+{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23))))}

The complete expression cannot fit in one line due to 132 character limit, so I tried using the following technique of breaking the expression into two lines
E 2 10 value={(q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))}
+{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23))))}

Yet, the simulator does not take into account the second line while calculating the voltage between nodes 2 and 10. I am using Orcad PSPICE for the simulation. Can someone help me in solving this issue?

Please let me know if you need the complete subcircuit code where I have defined terms like q, Ceq, Nsil etc.

Soumendu
 

Hello soumendu89. There is a sintax error.

Feri
 

Attachments

  • Changes.pdf
    127.5 KB · Views: 200
Hi,

It didnt work Feri. If I remove the braces, when I use *(multiplication) sign, the characters after that assume a form of comment, rendered useless. What can I do then?
 

Hi soumendu89,

If you can post the complete subckt, it would be easier to find the error point and look for a possible solution.

Mvaseem

- - - Updated - - -

Hi soumendu89,
Looks like I could get this working. See attached Image.

Mvaseem
 

Attachments

  • 132_char.png
    132_char.png
    17.6 KB · Views: 214

Hi soumendu89,

If you can post the complete subckt, it would be easier to find the error point and look for a possible solution.

Mvaseem

- - - Updated - - -

Hi soumendu89,
Looks like I could get this working. See attached Image.

Mvaseem

Hi Mvaseem,

Its not working as its giving the error "end of expression not seen".

I have attached the complete code for reference. The expression for V(2,10) is not taking into account the second line
+{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn/Ka)*exp(V(23))))}, as evident from the result where the Id/Vgs curve doesn't change with changing Nnit values. So, what shall I do?

Soumendu
 

Attachments

  • PSPICE code - Copy.txt
    1.7 KB · Views: 146

Hi Soumendu

I could get this working at my end. Attaching the modified circuit file.
I could see variation in Id-Vgs trace by changing Nnit value.
Attaching the image where you can see the variation for two values of Nnit. Appended two dat files for Nnit=2.0e9 and Nnit=2.0e15.
I also added tolerances at the end of circuit because pspice was not converging for high values of Nnit. For Nnit > 2e15, I always get overflow (probably because the expression for E device is returning numerically high values).

Also I am using 16.6 version of pspice.
 

Attachments

  • pspice_mod.txt
    1.8 KB · Views: 139
  • traces.png
    traces.png
    24.9 KB · Views: 127
Hello Soumendu.

Not the multiplication sign. Please, the 'plus' is the right replacement there. The curly braces {} are using only for enclosing the (all) VALUE expression.

E 2 10 value={(q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/(exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+exp(V(46))))
++{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23)))))}

... or You can use (as example) the next lines:

E 2 10 VALUE {
+ (q/Ceq)*(Nsil*(exp(-2*V(2,10)*ET)-exp(V(46)))/
+ (exp(-2*V(2,10)*ET)+exp(V(23))*exp(-1*V(2,10)*ET)+
+ exp(V(46))))+((q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/
+ (exp(-1*V(2,10)*ET)+(Kn)*exp(V(23)))))
+ }

The mismatched parentheses warning during simulation are also corrected.
Also, I hope it will work from now.

Best regards

- - - Updated - - -

Hi and sorry. I made a mistake in previous post:

++{(q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23)))))}

correction:

++((q/Ceq)*(Nnit*(exp(-1*V(2,10)*ET))/(exp(-1*V(2,10)*ET)+(Kn)*exp(V(23)))))}
 
Thank you very much. I could implement the code correctly. But, I need to put Nnit value as 2.0e18 to be specific. As you mentioned in your post, Nnit>2e15 gives an error of "overflow in device X1.EP3".
Kn=1e-10 and Nnit=2e14 gives some output.
Kn=1e-03 and Nnit=2e18 gives some output.
Kn=1e-10 and Nnit=2e18 (actual parameters for my device) results in device overflow. I am not able to get around this issue. What shall I do about this in your opinion? I am using pspice 16.5
 

Some Expressions in Device EP3 are returning very high values probably for one of the two reasons. Due to use of exponentials or somewhere denominator is getting too small resulting in overall values to be very large. In such cases you should apply LIMIT on the culprit expressions. It's usage is documented in pspice reference guide.
I tried to put limit randomly, could resolve overflow, but then it gets convergence failure.
Have not been able to find a way to resolve convergence so far.
Apart from loosening tolerances and increasing ITL values, it's sometimes advisable to modify circuit by adding resistances, capacitances at high swing nodes to get away with convergence.
 
Some Expressions in Device EP3 are returning very high values probably for one of the two reasons. Due to use of exponentials or somewhere denominator is getting too small resulting in overall values to be very large. In such cases you should apply LIMIT on the culprit expressions. It's usage is documented in pspice reference guide.
I tried to put limit randomly, could resolve overflow, but then it gets convergence failure.
Have not been able to find a way to resolve convergence so far.
Apart from loosening tolerances and increasing ITL values, it's sometimes advisable to modify circuit by adding resistances, capacitances at high swing nodes to get away with convergence.

Thank you mvaseem,

I modified the expressions in the circuit and finally, I could get converged results. It was great to take your guidance and I appreciate your expertise in this area.

Soumendu
 

Glad that your problem got solved. Cheers.

mvaseem
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top