summaryrefslogtreecommitdiff
path: root/MIL_testing/hp_memristor.cir
diff options
context:
space:
mode:
authorYour Name <[email protected]>2026-07-14 12:20:20 -0700
committerYour Name <[email protected]>2026-07-14 21:04:43 -0700
commit99c240a1c69da19813c50f167cd51456208479d2 (patch)
tree958d1d99fa8ab24d84f42de4fe18021e7dff1a4d /MIL_testing/hp_memristor.cir
parent4f36a1654ff6560c915a39e1f9999e0efc4a9680 (diff)
backup before big change
Diffstat (limited to 'MIL_testing/hp_memristor.cir')
-rw-r--r--MIL_testing/hp_memristor.cir45
1 files changed, 45 insertions, 0 deletions
diff --git a/MIL_testing/hp_memristor.cir b/MIL_testing/hp_memristor.cir
new file mode 100644
index 0000000..1865a7a
--- /dev/null
+++ b/MIL_testing/hp_memristor.cir
@@ -0,0 +1,45 @@
+* 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*
+***********************************************
+*does not work with ngspice
+*Eflux flux 0 value={SDT(V(plus,minus))}
+***********************************************
+*Charge computation*
+***********************************************
+*does not work with ngspice
+*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