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.

PSPICE -> ngspice Memristor Troubles....

Status
Not open for further replies.

lambchops511

Member level 1
Joined
Oct 10, 2011
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,539
Hi All,

I am using the HP Memristor model [https://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5937942]


I am trying to port it from PSPICE -> ngspice... and I am having lots of troubles =\

What I have so far....

Code:
.SUBCKT memristorhp plus minus +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

Original PSPICE Model:
Code:
.SUBCKT modelmemristor 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 modelmemristor
 

What problems you are facing?
You may need to convert the expression in ngspice format.
BTW, why you want to convert?
 

Hi,

Thanks. I've managed to convert it to ngspice format... so close, I want to do an I-V curve analysis on it... here is what I have:

Code:
.INCLUDE memristor-hp.cir

Vtest VDD GND SIN(0 8V 1)
X1    VDD GND memristor

.TRAN 10m 10s uic 
.END

However when I run it I get something like:
Code:
Warning: vtest: no DC value, transient time 0 value used
Error: 0 out of range for log
Note: Starting dynamic gmin stepping
Trying gmin =   1.0000E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   5.6234E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   8.6596E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.6466E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.9105E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.9775E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.9944E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.9986E-03 Error: 0 out of range for log
Warning: Further gmin increment
Trying gmin =   9.9996E-03 Error: 0 out of range for log
Warning: Last gmin step failed
Error: 0 out of range for log
Warning: Dynamic gmin stepping failed
Note: Starting source stepping
Supplies reduced to   0.0000% Error: 0 out of range for log

Trying gmin =   1.0000E-02 Error: 0 out of range for log
Warning: gmin step failed
Warning: source stepping failed



Any advice? Thanks!!!
 

This indicates that your circuit is having issues with convergance, and most likely DC convergance. You may want to check if translation is error free and has not altered circuit connectivity or implementation.
You may also want to try after relaxing convergance parameters like ITL1 & ITL2.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top