Hi everyone,
I'm working with Capture and Pspice 16.3 and I'm trying to do simulations with the model of a memristor, in particular the one developped by HP (I found it in a pdf file searching on-line so I suppose it is pubblic and available for everyone); here is the SPICE model implementation of the memristor:
* HP Memristor SPICE Model
* For Transient Analysis only
* created by Zdenek and Dalibor Biolek
**************************
* 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=1K Roff=100K Rinit=80K D=10N uv=10F p=1
***********************************************
* 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
I used it in several circuits finding almost no problems (except for some convergence issues, partially solved with autoconvergence) but now I would like to simulate its behaviour changing the resitive parameters of the device with time. There is a way to do this? I've tried to substitute the value of one of the parameters with an expression depending on the TIME variable (such as {5k*EXP(-TIME/10)}), but I only got the error "TIME not allowed in this context" before simulation could start. I've read about some solutions that allow to create voltage-controlled resistors that can simulate the behaviour of a time-dependent resistor, but since the resistor in this case is a parameter defined only inside the device I'm not sure that solution could be used for my purpose, and the same is true also for the voltage current controlled source-based solutions; in this last case I would not be able to apply the current signal on the resistive parameters of the memristor, even because the device is used as feedback in circuits like waveform generators and so the current signal would come in conflict with the one applied by the circuit on the memristor itself. Any suggestions about this?
Thank you for your attention!
I'm working with Capture and Pspice 16.3 and I'm trying to do simulations with the model of a memristor, in particular the one developped by HP (I found it in a pdf file searching on-line so I suppose it is pubblic and available for everyone); here is the SPICE model implementation of the memristor:
* HP Memristor SPICE Model
* For Transient Analysis only
* created by Zdenek and Dalibor Biolek
**************************
* 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=1K Roff=100K Rinit=80K D=10N uv=10F p=1
***********************************************
* 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
I used it in several circuits finding almost no problems (except for some convergence issues, partially solved with autoconvergence) but now I would like to simulate its behaviour changing the resitive parameters of the device with time. There is a way to do this? I've tried to substitute the value of one of the parameters with an expression depending on the TIME variable (such as {5k*EXP(-TIME/10)}), but I only got the error "TIME not allowed in this context" before simulation could start. I've read about some solutions that allow to create voltage-controlled resistors that can simulate the behaviour of a time-dependent resistor, but since the resistor in this case is a parameter defined only inside the device I'm not sure that solution could be used for my purpose, and the same is true also for the voltage current controlled source-based solutions; in this last case I would not be able to apply the current signal on the resistive parameters of the memristor, even because the device is used as feedback in circuits like waveform generators and so the current signal would come in conflict with the one applied by the circuit on the memristor itself. Any suggestions about this?
Thank you for your attention!