[go: nahoru, domu]

Skip to content

Commit

Permalink
biolek LTSpice
Browse files Browse the repository at this point in the history
  • Loading branch information
timmolter committed Jan 23, 2017
1 parent 14dae52 commit cf3c1ae
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions Biolek_Linear_Resistance_Switch/LTSpice/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## About

| Model Class | Model Language | Simulator |
|---|---|---|
|SPICE Subcircuit|SPICE|LTSpice|

Other names: "The Ideal Memristor", "The Resistance Switch"

## Sources

1. Original Source of SPICE Model: <https://cyakopcic1.files.wordpress.com/2014/02/memristor-spice-modeling.pdf>

## How to Run Model

1. LTSpice Intro - [The Joglekar Resistance Switch Memristor Model in LTSpice](http://knowm.org/the-joglekar-resistance-switch-memristor-model-in-ltspice/)
1. LTSpice - [Memristor Models in LTSpice](http://knowm.org/memristor-models-in-ltspice/)
34 changes: 34 additions & 0 deletions Biolek_Linear_Resistance_Switch/LTSpice/memristor_biolek.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
* HP Memristor SPICE Model Using Biolek Window

* Connections:
* TE: Top electrode
* BE: Bottom electrode
* XSV: External connection to plot state variable
* that is not used otherwise

.SUBCKT MEM_BIOLEK TE BE XSV

* Ron: Minimum device resistance
* Roff: Maximum device resistance
* D: Width of the thin film
* uv: Dopant mobility
* p: Parameter for window function
* x0: State varaible initial value

.params Ron=100 Roff=1K x0=.076 D=16N uv=40F p=7

* Biolek Window Function
.func f(V1,I1)={1-pow((V1-stp(-I1)),(2*p))}

* Memristor I-V Relationship
.func IVRel(V1,V2) = V1/(Ron*V2 + Roff*(1-V2))

* Circuit to determine state variable
Gx 0 XSV value={I(Gmem)*Ron*uv*f(V(XSV,0),I(Gmem))/pow(D,2)}
Cx XSV 0 {1}
.ic V(XSV) = x0

* Current source representing memristor
Gmem TE BE value={IVRel(V(TE,BE),V(XSV,0))}

.ENDS MEM_BIOLEK
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[Transient Analysis]
{
Npanes: 2
Active Pane: 1
{
traces: 1 {336592898,0,"Ix(U1:TE)"}
Parametric: "V(n001)"
X: (' ',2,-1.2,0.02,1.2)
Y[0]: ('m',1,-0.001,0.0002,0.0012)
Y[1]: ('_',0,1e+308,0,-1e+308)
Amps: ('m',0,0,1,-0.001,0.0002,0.0012)
Log: 0 0 0
NeyeDiagPeriods: 0
TeyeEnd: 3
},
{
traces: 1 {268959747,0,"V(nc_01)"}
Parametric: "V(n001)"
X: (' ',2,-1.2,0.02,1.2)
Y[0]: (' ',2,0.21,0.07,1.05)
Y[1]: ('_',0,1e+308,0,-1e+308)
Volts: (' ',0,0,2,0.21,0.07,1.05)
Log: 0 0 0
NeyeDiagPeriods: 0
TeyeEnd: 3
}
}
26 changes: 26 additions & 0 deletions Biolek_Linear_Resistance_Switch/LTSpice/memristor_biolek_sim_T.plt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[Transient Analysis]
{
Npanes: 2
Active Pane: 1
{
traces: 2 {268959747,0,"V(n001)"} {336592898,1,"Ix(U1:TE)"}
X: ('m',0,0,0.02,0.2)
Y[0]: (' ',1,-1,0.2,1)
Y[1]: ('µ',0,-0.00042,7e-05,0.00042)
Volts: (' ',0,0,1,-1,0.2,1)
Amps: ('µ',0,0,0,-0.00042,7e-05,0.00042)
Log: 0 0 0
NeyeDiagPeriods: 0
TeyeEnd: 3
},
{
traces: 1 {268959748,0,"V(nc_01)"}
X: ('m',0,0,0.02,0.2)
Y[0]: ('m',0,0.52,0.04,0.96)
Y[1]: ('µ',0,1e+308,7e-05,-1e+308)
Volts: ('m',0,0,0,0.52,0.04,0.96)
Log: 0 0 0
NeyeDiagPeriods: 0
TeyeEnd: 3
}
}
19 changes: 19 additions & 0 deletions Biolek_Linear_Resistance_Switch/LTSpice/memristor_with_state.asy
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Version 4
SymbolType CELL
LINE Normal 4 33 -4 33
LINE Normal 0 -48 0 -32
LINE Normal 0 48 0 33
LINE Normal 32 0 0 0
CIRCLE Normal 4 33 -4 0
CIRCLE Normal 4 -32 -4 0
SYMATTR Prefix X
SYMATTR Description Parameterized Memristor
PIN 0 -48 RIGHT 8
PINATTR PinName TE
PINATTR SpiceOrder 1
PIN 0 48 RIGHT 8
PINATTR PinName BE
PINATTR SpiceOrder 2
PIN 32 0 LEFT 8
PINATTR PinName xsv
PINATTR SpiceOrder 3

0 comments on commit cf3c1ae

Please sign in to comment.