basawaraj
Newbie level 6
Hi,
I am working with memristors and have been trying to simulate their behavior using HSPICE without success. Am using the non-linear dopant drift model from https://www.radioeng.cz/fulltexts/2009/09_02_210_214.pdf
Just to confirm that the SPICE code I was using was correct I tried it in Pspice, as the testing in the above paper was done on Pspice. It worked on Pspice and I was able to simulate the code, i.e., observe the hysteresis, using it. The code I used in PSpice is very similar to the one available at:
https://www.edaboard.com/threads/224608/
Am including it here (from the above thread, but my code is similar):
PSpice Code:
* 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
Xmemrist aa 0 memristor
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 0 3s 0 3m skipbp
.probe
.end
----------------------------------------------
But when I try to use it with HSPICE it does not work, i.e., I am unable to observe the hysteresis when plotting the I-V characteristics. The I-V plot is linear, representing a simple resistor.
My HSPICE code is shown below:
* MEMRISTOR
* 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
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* DIFFERENTIAL EQUATION MODELING *
. PARAM f(x,p)= '1-pow((2*x-1),(2*p))'
Gx 0 x value='I(Emem)*uv*Ron/pow(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
Xmemrist aa 0 memristor Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 100U 5
.plot tran V(aa) I(Vtest)
.option list node post=2 ingold=2
.end
---------------------------------------------
The changes I made from Pspice to HSPICE are:
1. changed the 'window' function definition from Pspice to HSPICE equivalent,
2. commented the flux and charge computation sections, as HSPICE does not have a 'SDT' equivalent function and they are not needed to observe the memristor characteristics.
Am not able to figure out the issue, any help would be useful.
--
Thanks,
Basawaraj
I am working with memristors and have been trying to simulate their behavior using HSPICE without success. Am using the non-linear dopant drift model from https://www.radioeng.cz/fulltexts/2009/09_02_210_214.pdf
Just to confirm that the SPICE code I was using was correct I tried it in Pspice, as the testing in the above paper was done on Pspice. It worked on Pspice and I was able to simulate the code, i.e., observe the hysteresis, using it. The code I used in PSpice is very similar to the one available at:
https://www.edaboard.com/threads/224608/
Am including it here (from the above thread, but my code is similar):
PSpice Code:
* 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
Xmemrist aa 0 memristor
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 0 3s 0 3m skipbp
.probe
.end
----------------------------------------------
But when I try to use it with HSPICE it does not work, i.e., I am unable to observe the hysteresis when plotting the I-V characteristics. The I-V plot is linear, representing a simple resistor.
My HSPICE code is shown below:
* MEMRISTOR
* 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
+ Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
* DIFFERENTIAL EQUATION MODELING *
. PARAM f(x,p)= '1-pow((2*x-1),(2*p))'
Gx 0 x value='I(Emem)*uv*Ron/pow(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
Xmemrist aa 0 memristor Ron=100 Roff=16K Rinit=11K D=10N uv=10F p=10
Vtest aa 0 SIN(0 1.2V 1 0 0 0)
.tran 100U 5
.plot tran V(aa) I(Vtest)
.option list node post=2 ingold=2
.end
---------------------------------------------
The changes I made from Pspice to HSPICE are:
1. changed the 'window' function definition from Pspice to HSPICE equivalent,
2. commented the flux and charge computation sections, as HSPICE does not have a 'SDT' equivalent function and they are not needed to observe the memristor characteristics.
Am not able to figure out the issue, any help would be useful.
--
Thanks,
Basawaraj