DIYbanter

DIYbanter (https://www.diybanter.com/)
-   Electronic Schematics (https://www.diybanter.com/electronic-schematics/)
-   -   LTspice Question (https://www.diybanter.com/electronic-schematics/347925-ltspice-question.html)

Jim Thompson[_3_] October 18th 12 08:32 PM

LTspice Question
 
Suppose, in PSpice, I have a behavioral current source that "quits"
unless it has at least 0.5V across it...

GDC_I1 N_1 N_2 VALUE {(1+TANH(2.2/0.1*(V(N_1,N_2)-0.5)))/2*1mA}

Can LTspice understand that line "as is", or must it be changed?

If it must be changed, what is the proper syntax?

Thanks!

...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.

Jim Thompson[_3_] October 20th 12 07:34 PM

LTspice Question
 
On Sat, 20 Oct 2012 11:09:15 -0700, Fred Abse
wrote:

On Thu, 18 Oct 2012 12:32:23 -0700, Jim Thompson wrote:

Suppose, in PSpice, I have a behavioral current source that "quits" unless
it has at least 0.5V across it...

GDC_I1 N_1 N_2 VALUE {(1+TANH(2.2/0.1*(V(N_1,N_2)-0.5)))/2*1mA}

Can LTspice understand that line "as is", or must it be changed?

If it must be changed, what is the proper syntax?

Thanks!


"As is", that produces a linear ramp of current from 0 to 1 mA, in
LTspice.


Thanks, Fred,

Helmut answered me that the PSpice notation works, but recommended the
Bxxx notation.

However I need to stick with the "VALUE" method, since other Spice's
use Bxxx as a GaAsFET


Try this:

Version 4
SHEET 1 880 680
WIRE 304 64 192 64
WIRE 432 64 304 64
WIRE 192 96 192 64
WIRE 432 96 432 64
WIRE 192 240 192 176
WIRE 272 240 192 240
WIRE 320 240 272 240
WIRE 432 240 432 176
WIRE 432 240 320 240
FLAG 320 320 0
FLAG 304 64 N_1
FLAG 272 240 N_2
SYMBOL Misc\\Gpoly 192 192 M180
WINDOW 0 24 104 Left 2
WINDOW 3 -260 4 Left 2
SYMATTR InstName GDC_I1
SYMATTR Value VALUE = {(1+TANH(2.2/0.1*(V(N_1,N_2)-0.5)))/2*1mA}
SYMBOL res 304 224 R0
SYMATTR InstName R2
SYMATTR Value 1T
SYMBOL voltage 432 80 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value 0
TEXT -70 338 Left 2 !.dc v1 0 10 0.5


...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.


All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter