mohd113
Junior Member level 1
- Joined
- Apr 21, 2012
- Messages
- 17
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,406
I am trying to simulate a memristor with SUBCKT code (memristor component is named U1)
* Ron, Roff - Resistance in ON / OFF States
* Rinit - Resistance at T=0
* D - Width of the thin film
* uv - Migration coefficient
* p - Parameter of the WINDOW-function
* for modeling nonlinear boundary conditions
* x - W/D Ratio, W is the actual width
* of the doped area (from 0 to D)
*
.SUBCKT memristor Plus Minus PARAMS:
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* DIFFERENTIAL EQUATION MODELING *
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 1T
* RESISTIVE PORT OF THE MEMRISTOR *
Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}
*Flux computation*
Eflux flux 0 value={SDT(V(plus,minus))}
*Charge computation*
Echarge charge 0 value={SDT(I(Emem))}
* WINDOW FUNCTIONS
* FOR NONLINEAR DRIFT MODELING *
*window function, according to Joglekar
.func f(x,p)={1-(2*x-1)^(2*p)}
*proposed window function
;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
.ENDS memristor
my circuit code that is generated by Orcad for simulataion is
R_R1 -1 0 100 TC=0,0
V_V1 -1 0 SIN 0V 0.1V 0.56Hz 0 0 0
X_U1 -1 0 MEMRISTOR PARAMS: RON=100 ROFF=16K RINIT=11K D=10N UV=10F P=10
**** RESUMING trail1.cir ****
.END
then it give me the error
ERROR -- Incorrect number of interface nodes for X_U1
What can I do to solve this problem?
Thanks
* Ron, Roff - Resistance in ON / OFF States
* Rinit - Resistance at T=0
* D - Width of the thin film
* uv - Migration coefficient
* p - Parameter of the WINDOW-function
* for modeling nonlinear boundary conditions
* x - W/D Ratio, W is the actual width
* of the doped area (from 0 to D)
*
.SUBCKT memristor Plus Minus PARAMS:
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* DIFFERENTIAL EQUATION MODELING *
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 1T
* RESISTIVE PORT OF THE MEMRISTOR *
Emem plus aux value={-I(Emem)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}
*Flux computation*
Eflux flux 0 value={SDT(V(plus,minus))}
*Charge computation*
Echarge charge 0 value={SDT(I(Emem))}
* WINDOW FUNCTIONS
* FOR NONLINEAR DRIFT MODELING *
*window function, according to Joglekar
.func f(x,p)={1-(2*x-1)^(2*p)}
*proposed window function
;.func f(x,i,p)={1-(x-stp(-i))^(2*p)}
.ENDS memristor
my circuit code that is generated by Orcad for simulataion is
R_R1 -1 0 100 TC=0,0
V_V1 -1 0 SIN 0V 0.1V 0.56Hz 0 0 0
X_U1 -1 0 MEMRISTOR PARAMS: RON=100 ROFF=16K RINIT=11K D=10N UV=10F P=10
**** RESUMING trail1.cir ****
.END
then it give me the error
ERROR -- Incorrect number of interface nodes for X_U1
What can I do to solve this problem?
Thanks