I am using this bellow model

.SUBCKT memristor Plus Minus

.PARAMS Ron=1K Roff=100K Rinit=80K D=10N uv=10F p=1

Gx 0 x value={ I(Emem)*uv*Ron/D^2*f(V(x),p)}

Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}

Raux x 0 1G

Emem Plus aux value={-I(Emem)*V(x)*(Roff-Ron)}

Roff aux Minus {Roff}

.func f(x,p)={1-(2*x-1)^(2*p)}

.ENDS

while running it

**** INCLUDING SCHEMATIC1.net ****

* source MEMRISTOR4

X_M1 IN OUT MEMRISTOR

V_V1 IN 0 AC 5AC

+SIN 0 1Vdc 500Hz 0 0 0

R_R1 OUT 0 1k TC=0,0

**** RESUMING sim1.cir ****

.END

**** FROM LIBRARY C:\Cadence\SPB_16.6\tools\pspice\library\memristor4.lib ****

.SUBCKT memristor Plus Minus

.PARAMS Ron=1K Roff=100K Rinit=80K D=10N uv=10F p=1

$

ERROR(ORPSIM-16363): Command invalid in subcircuit

this msg is coming in the netlist.

Can anyone suggest how i can solve this issue. It will be also very helpful if some one can provide me a working pspice model.

Regards

Similar questions and discussions