Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] problem with obtaining memristor I-V characteristic in LTSPICE

Status
Not open for further replies.

fuadfadz

Newbie level 5
Joined
May 26, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,373
Has anyone used a spice model of memristor? I am trying to use the model proposed in BIOLEK's paper (https://www.radioeng.cz/fulltexts/2009/09_02_210_214.pdf) in LTspice.

* 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=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-sttp(-i))**(2*p)}
.ENDS memristor

How can i get the I-V characteristic in LTspice?
I use dc sweep and it gave me pure linear line
Have you successfully observed the hysteresis loop in LTspice?
 

am i do it wrong? Capture.JPG
 

this is what i get when i run dc sweep Capturez.JPG
 

I know little about memristors but there's animated simulations using them at this link:

Click Yes if a message comes up asking if it can install the java applet.

https://www.falstad.com/circuit/e-mr-sine.html

There are several other simulations of memristor action. It has a whole library of various circuits.
 

thanks for the animated simulations. but still keep bothering me on how to simulate the iv hysteresis on this ltspice.
 

Did you search the forum? There have been quite a few discussions about simulating memristors such as https://www.edaboard.com/threads/202648/

Keith

yes i did. but the problem is, i dont know how to get the hysteresis loop for memristor in LTSpice.

i supposed we have to use dc sweep to get the iv characteristic. but when i used .dc -1.2 1.2 0.1, i get pure linear graph instead of hysteresis loop.

the model did well on PSpice claim by Dalibor and LTSpice by guangyu in https://www.edaboard.com/threads/202648/

btw my transient analysis works well, but not for the iv
 
Last edited:

You need to plot the iv characteristics FROM the transient analysis. You cannot get hysteresis from a single DC sweep. You already have the correct characteristics here: https://www.edaboard.com/threads/253755/#post1086659 you just need to plot current against voltage from that run.

Keith.
 

You need to plot the iv characteristics FROM the transient analysis. You cannot get hysteresis from a single DC sweep. You already have the correct characteristics here: https://www.edaboard.com/threads/253755/#post1086659 you just need to plot current against voltage from that run.

Keith.

thanks for the reply keith. that clarify everything. i did try to plot the characteristic from transient analysis but there is no option to plot the current against voltage. i want to try to work on raw data from the output circuit and plot it on matlab,, is it possible?
 

You can do x-y plots on LTspice. If you have current plotted against time, left click on the x axis (a ruler should be showing for your cursor) then edit the name "time" to whatever you want the x axis to be.

Keith.
 
  • Like
Reactions: ehmb and TuAtAu

    TuAtAu

    Points: 2
    Helpful Answer Positive Rating

    ehmb

    Points: 2
    Helpful Answer Positive Rating
You can do x-y plots on LTspice. If you have current plotted against time, left click on the x axis (a ruler should be showing for your cursor) then edit the name "time" to whatever you want the x axis to be.

Keith.

SILLY ME! thanks keith! i get my hysteresis loop already! 4 days working on it.

aaa.JPGaaaa.JPG
 

Hello all,

Can you please let me know how can I add the memristor symbol to the ltspice so I can add it to my circuit later on?

In other words, how can I add a new element to the previously defined elements in ltspice when I have its behavior as a descriptive code?


Cheers,
Analogstudent
 

anyone know how to test proposed window function by biolek in ltspice?

*proposed window function
.func f(x,i,p)={1-(x-sttp(-i))**(2*p)}

when i try to simulate the circuit if show me an error,, syntax error f():No such function

- - - Updated - - -

anyone know how to test proposed window function by biolek in ltspice?

*proposed window function
.func f(x,i,p)={1-(x-sttp(-i))**(2*p)}

when i try to simulate the circuit if show me an error,, syntax error f():No such function
 

anyone know how to test proposed window function by biolek in ltspice?

*proposed window function
.func f(x,i,p)={1-(x-sttp(-i))**(2*p)}

when i try to simulate the circuit if show me an error,, syntax error f():No such function

When this kind of error happens, it may help to break up a long line of code into several lines. It's a way to get the compiler to point out the error for you.
 

When this kind of error happens, it may help to break up a long line of code into several lines. It's a way to get the compiler to point out the error for you.

i've been trying but still failed. LTspice doesnot allow a function with 3 parameter?

- - - Updated - - -

.func f(x,p)={1-(2*x-1)**(2*p)}

joglekar window fuction working fine on LTspice



.func f(x,i,p)={1-(x-stp(-i))**(2*p)}

but not with biolek window function
 

Try contacting Linear Technology - I believe there is a limit of 2 parameters in a .FUNC but it is not mentioned in the documentation. You could try breaking the function down into two parts.

Keith.
 

i've been trying but still failed. LTspice doesnot allow a function with 3 parameter?

- - - Updated - - -

.func f(x,p)={1-(2*x-1)**(2*p)}

joglekar window fuction working fine on LTspice



.func f(x,i,p)={1-(x-stp(-i))**(2*p)}

but not with biolek window function


To use biolek window function, you should edit this line 'Gx 0 x value={ I(Emem)*uv*Ron/D**2*f(V(x),p)}' to 'Gx 0 x value={ I(Emem)*uv*Ron/D**2*f(V(x),I(Emem),p)}'
Then comment out joglekar window function, and uncomment biolek window function. This should solve your issue.
 
  • Like
Reactions: sue88

    sue88

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top