In 2012, Chris Yakopcic co-authored a book chapter in the book titled Advances in Neuromorphic Memristor Science and Applications, featuring a chapter on memristor modeling in LTSpice. In this chapter, he does a wonderful review of the most common memristor models up to that point in time including LTSpice code and simulation results for simple sine wave driven hysteresis loops. Here, we repeat many of his simulations in order to gain a better understanding of the various models and to learn a few tricks about using LTSpice. Some of the basics for memristor modeling and setting up LTSpice was already published in a previous post. I would like to thank Chris Yakopcic for sending me all the LTSpice model files appearing in his book chapter and for sharing his techniques for running his simulations on LTSpice. For more of Chris’s work, check out his blog.

In this post I will run a few of Chris’s memristor model simulations in LTSpice followed our own implementation of our Knowm Mean Metastable switch model. And as usual, all model and simulation files appearing here can be found in our memristor-models-4-all project on github.

LTSpice

In a previous post titled The Joglekar Resistance Switch Memristor Model in LTSpice, I already covered the basics of setting up LTSpice, memristor modeling in general and running a memristor model simulation in LTSpice. Here, I’ve adopted the methods of Yakopcic, so things are a tad bit different. For example, I added a third node to the memristor symbol, which is used to represent the internal state of the memristor, XSV. I didn’t connect it to anything and plotting the state is done by accessing the V(nc_01) variable. Another change from the previous post is that I link the memristor subcircuit not from the memristor symbol itself, but as a directive added to the simulation file (.asc). The Value attribute for the symbol needs to be updated however to match the subcircuit name. For each simulation there are two corresponding .plt files – one for I-V plots and one for time plots. LTSpice will look for a .plt file corresponding to the .asc file being run so what you need to do is remove the _IV and _T part of the complete .plt file name before running the simulation.

Yakopcic

University of Michigan

Knowm

Because this model does not appear in Yakopcic’s book chapter referenced above, I will include a quick review of the mode and the LTSpice subcircuit here.

The Mean Metastable Switch Memristor Model

The mean metastable switch memristor model was previously described here, but I will summarize it again here for completeness. The model describes a memristor as a collection of metastable switches where each switch can be in either one or the other state. At any given time, the probability of switches switching state as a function of applied voltage is calculated.

The change in the number of switches, scaled between 0 and 1, is:

If the probabilities and are defined as:

The number of switches switching state is thus:

. Therefore plugging everything in, also setting :

The final step to complete the MMSS model description is to define the current as a function of X. We can break that definition down into two steps, first the conductance, followed by the current. The conductance as a function of X is

Note that this describes a summation of conductances. Relating this to the real-world it tells us that our model is in fact 2 parallel resistors whose resistance values are coupled to each other via X.

Conclusion

In this post I presented my simulation results taken more or less directly from Chris Yakopcic’s book chapter in the book titled Advances in Neuromorphic Memristor Science and Applications. I didn’t run all of the examples in the chapter, but doing so shouldn’t be hard at all. One of the motivations for running these simulations was to understand the basic mechanics of memristor modeling in LTSpice so that I could implement Knowm’s mean metastable switch memristor model, which I presented as the last simulation.