+ Post New Thread

Results 1 to 3 of 3

- 9th November 2011, 03:30 #1

- Join Date
- Oct 2011
- Posts
- 38
- Helped
- 0 / 0
- Points
- 379
- Level
- 4

## ltspice Time Step too small

Hi All,

I am getting a "Time step too small; initial timepoint: trouble with node x"

My SPICE file is as follows:

Code:MemristorHPTest ******************************** * MemristorHP .SUBCKT MemristorHP plus minus PARAMS: + phio=0.95 Lm=0.0998 w1=0.1261 foff=3.5e-6 ioff=115e-6 aoff=1.2 fon=40e-6 ion=8.9e-6 aon=1.8 b=500e-6 wc=107e-3 G1 plus internal value={sgn(V(x))*(1/V(dw))^2*0.0617*(V(phiI)*exp(-V(B)*V(sr))-(V(phiI)+abs(V(x)))*exp(-V(B)*V(sr2)))} Esr sr 0 value={sqrt(V(phiI))} Esr2 sr2 0 value={sqrt(V(phiI)+abs(V(x)))} Rs internal minus 215 Eg x 0 value={V(plus)-V(internal)} Elamda Lmda 0 value={Lm/V(w)} Ew2 w2 0 value={w1+V(w)-(0.9183/(2.85+4*V(Lmda)-2*abs(V(x))))} EDw dw 0 value={V(w2)-w1} EB B 0 value={10.246*V(dw)} ER R 0 value={(V(w2)/w1)*(V(w)-w1)/(V(w)-V(w2))} EphiI phiI 0 value={phio-abs(V(x))*((w1+V(w2))/(2*V(w)))-1.15*V(Lmda)*V(w)*log(V(R))/V(dw)} C1 w 0 1e-9 IC=1.2 R w 0 1e8MEG Ec c 0 value={abs(V(internal)-V(minus))/215} Emon1 mon1 0 value={((V(w)-aoff)/wc)-(V(c)/b)} Emon2 mon2 0 value={(aon-V(w))/wc-(V(c)/b)} Goff 0 w value={foff*sinh(stp(V(x))*V(c)/ioff)*exp(-exp(V(mon1))-V(w)/wc)} Gon w 0 value={fon*sinh(stp(-V(x))*V(c)/ion)*exp(-exp(V(mon2))-V(w)/wc)} .ENDS MemristorHP ******************************** Vtest test GND DC 0 SIN(0 1.8V 1 0 0 0) R0 test X 1k Xmemristor X GND MemristorHP .TRAN 1m 1 uic .END

- 9th November 2011, 03:30

- 9th November 2011, 19:11 #2

- Join Date
- Nov 2004
- Posts
- 24
- Helped
- 18 / 18
- Points
- 2,084
- Level
- 10

## Re: ltspice Time Step too small

Try to decrease the step ceiling. Note that your command

.TRAN 1m 1 uic

is not optimal: the first number 1m has no effect to the simulation run; you have not set the step ceiling, thus it is defined automatically as 1/50=20ms and it is too high.

Try the following:

.TRAN 0 1 0 1m uic

Then it works in PSpice.

I do not work with LtSpice, thus I do not know if GND can be used for the ground. In PSpice, I replaced it by 0 (zero) in your code. Then it works fine.

Hope it helps you.

D.

- 9th November 2011, 19:11

- 9th November 2011, 19:51 #3

- Join Date
- Mar 2008
- Location
- USA
- Posts
- 3,735
- Helped
- 1076 / 1076
- Points
- 24,121
- Level
- 37

## Re: ltspice Time Step too small

You might look at whether this memristor model is singular

at any point. That's a good way to fail numerically.

+ Post New Thread

Please login