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.

memristor modelling problem and impossible import in AWR and ADS

Status
Not open for further replies.

Ivan_

Full Member level 2
Joined
Nov 16, 2007
Messages
125
Helped
47
Reputation
94
Reaction score
23
Trophy points
1,298
Location
Italy
Activity points
2,536
Hi guys,
I have never used spice netlist before 'cause I am basically an antenna designer. Now I am facing the problem of getting a memristor model for circuit simulations. I downloaded LTspice and I imported both the codes that I found ind this forum. I tried to follow the istructions contained in the LTspice manual. I created the symbol and linked the .cir files that I found in this topic (I made both tries). During the simulation I get the following error:

picture.jpg

what do I do wrong? I simply use the given codes and in the attributes reference the respective cir files. How should I do exactly. Could anybody please explain me step by step ho to do the entire process and obtain the curves that you showed in this topic? :grin: Follows the symbol attribute window tha I set up:

symbol.jpg

I have also another question. I need the model in another simulator (AWR or Agilent ADS, but preferably AWR 'cause I have to make some memristor-based circuits with other components, of which I have the AWR-libraries). As well I tried to import the spice netlists in those programs but I get errors on the windowing function (unrecognised) and on the time domain integrals (unrecognised). How comes? Does anybody imported this memristor spice models in AWR or ADS?

Looking forward to receiving your valuable help!
Ivan

CURENTLY USED NETLIST:

.SUBCKT memristor Plus Minus PARAMS:
+ Ron=1k Roff=100K Rinit=80K D=10N uv=10F p=1
Gx 0 x value={I(Em)*uv*Ron/D**2*f(V(x),p)}
Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}
Raux x 0 1T

Em plus aux value={-I(Em)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}

Eflux flux 0 value={SDT(V(plus,minus))}

Echarge charge 0 value={SDT(I(Em))}

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

;.func f(x,i,p)={1-(x-stp(-i))**(2*p)}
.ENDS memristor
X plus 0 memristor
Vmem plus 0 SIN(0 1.2V 1Hz)
.tran 0S 3S
.probe
.end
 
Last edited:

Re: Problem pspice model of memristor

My simulator doesn't like

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

Try it without the = sign. That seems to work for me.

Keith.
 

Problem pspice model of memristor and import in ADS and AWR

Dear all, I am facing the problem of modelling a memristor. I found several spice models, in particular I am using the following one:

.SUBCKT memristor Plus Minus .PARAMS:
+ Ron=100 Roff=16K Rinit=10K D=10N uv=10F p=10
Gx 0 x value={I(Em)*uv*Ron/D**2*f(V(x),p)}
Cx x 0 1 IC={(Roff-Rinit)/(Roff-Ron)}
Raux x 0 1T

Em plus aux value={-I(Em)*V(x)*(Roff-Ron)}
Roff aux minus {Roff}

Eflux flux 0 value={SDT(V(plus,minus))}

Echarge charge 0 value={SDT(I(Em))}

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

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

that I found in several topics and papers (https://www.radioeng.cz/fulltexts/2009/09_02_210_214.pdf). After some tries, I managed to let it work in LT Spice. The problem is, I get the expected results and impedance variation only for very low frequencies (max 2 Hz or so !!!!!!!!!!!!!!!). As I increase the frequency, it does not work anymore as memristor but as normal resistor. WHY? Moreover, several reference papers report simulations at very low frequencies (pretty unrealistic cases). I need a model to work from 3 to 8 GHz. Can anybody help me to fix the problem?

I also tried to import this Spice netlist in AWR Microwave Office and Agilent ADS cause I need to make some designs and I have the complete libraries here (in AWR). There is no way to get a correct import anyway. I get errors, in particular ADS and AWR do not recognise the windowing function f(x,p) and the time domain integral SDT. Clearly the thing cannot be simulated as element of a complex circuit nor alone. I tried different formats for the spice netlist (cir, sp, lib). Same negative result... Or maybe let's say "NO results". Any suggestion?

The best option would be to have an equivalent circuit that one can easily draw in the circuit simulator and create the component (i.e. in ADS) to use in external designs. Are there any practical circuits to be implemented (or maybe some examples) to create directly in ADS or AWR a memristor component (without importing the spice netlist but just using the conventional way of drawing the quivalent circuit in the schematic window) ?

Thanks in advance,
best regards,
Ivan
 
Last edited:

Ivan,

Just to answer the question you deleted - I simply copied your netlist into SIMetrix and ran the netlist. It reported:

"*** ERROR *** Error in user defined function X.f Syntax error in expression

which was fixed by removing the = sign so I had:

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

Keith.
 

Thanks Keith, unfortunately that does not work in AWR Microwave Office, even removing the = sign. As I said, the netlist works under LTspice as it is now, also with the = sign. No matter in which format I save the netlist, .cir, .sp, or if I have the = sign, the import in AWR does not work. Furthermore, the current spice model show the real memristor behavior only at "ridicolous" frequencies (1 - 2 Hz). That sounds kinda misterious.

Regards,
Ivan
 

I think the model you have is intended to show memristor behavior at low frequencies. It has capacitance and resistnace in it (a 1 Farad capacitor?) and they will be the cause of your frequency problem.

I don't know AWR or ADS, although ADS should be Spice based. The function f(x,p) is simply an equation so if you can find out how to reproduce arbitrary functions in AWR or ADS you should be able to reproduce it.

I guess your choices are -

1. try to find a model that will work with AWR/ADS
2. modify the model to work with AWR/ADS
3. use LTspice

If it works with LTspice then that would be the easiest option. Whichever route you go you still have to shift the low frequency issue.

Keith.
 
  • Like
Reactions: Ivan_

    Ivan_

    Points: 2
    Helpful Answer Positive Rating
In LTspice I cannot do much. I have to design a circuit using a foundry library which is only given for AWR and for this reason I would need to have the memristor model in AWR. I didn't find ready models for AWR/ADS. I have to check whether I can do it using APLAC (AWR) netlists.

Ivan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top