Overview

This is the second in a series of posts that I will be publishing to serve as tutorials for using the Knowm OSS EDA Stack to support the design, layout and simulation of memristors and neuro-memristive circuits and devices. This post will cover three additional memristor models which are available in the Known OSS EDA – Xyce-6.6 release candidate 1. The first model is the TEAM model developed by Shahar Kvatinsky, Eby G. Friedman, Aninoam Kolodny and Uri C. Weiser and presented in a paper titled TEAM: ThrEshold Adaptive Memristor Model, published in IEEE Transactions on Circuits and Systems -I: Regular Papers, Vol. 60, No. 1, January 2013. The second model is the Yakopcic model developed at the University of Dayton, by Chris Yakopcic and presented in a paper titled, Memristor Device Modeling and Circuit Design for Read Out Integrated Circuits, Memory Architectures, and Neuromorphic Systems, published in 2014 as part of the requirements for a PhD in Electrical Engineering. The third model is the Joglekar model developed by Biolek et al., published in 2009 titled, SPICE Model of Memristor with Nonlinear Dopant Drift, which decribes the mathematical model of the prototype memristor device manufactured in 2008 at HP Labs. The first two models, TEAM and Yakopcic models were added to the Xyce OpenModels library by the Xyce Team at Sandia National Labs. The third Joglekar model is now available within the Xyce Electronic Simulator’s OpenModels library thanks to Tim Molter of Knowm, Inc., and is featured in his post Native Memristor Device Developement in Xyce, Creating the Joglekar memristor model in Xyce from scratch

Prerequisites

Please follow the installation and configuration of your Knowm OSS EDA Environment found in the tutorial titled Simulating the Knowm M-MSS Memristor Model Using Qucs-S with Xyce

NOTE: The current release candidate for the Knowm OSS EDA Stack is available for macOS Sierra 10.12 and Ubuntu 16.04 LTS (Xenial Xerus). This post covers installation on MacOS and Linux but usage only on the macOS platform. The installation process is different, but the use of the software is more or less the same. There is currently support for Xyce (Serial) simulations. The included versions of Qucs-S (0.0.19S) and Xyce 6.6 include libraries for amd64 (intel) 64-bit architectures. Support for other architectures and operating systems are under development and will be released when available.

Launch Qucs-S

Click on the Qucs app icon on the Launcher Bar.

Open a Project File

Double click the Ymemristor_prj to automatically open the Content tab.

Create the Schematic diagram

Select the Components tab in the Main Dock. Open the sources from the drop down combo box. Select the ac Voltage Source and then left click on the schematic to place the symbol. Press the Esc key to exit place mode. Open the nonlinear components from the drop down combo box. Select the MR Memristor and then left click on the schematic to place the symbol. Press the Esc key to exit place mode. Open the probes from the drop down combo box. Select the Current Probe and then left click on the schematic to place the symbol. Press the Esc key to exit place mode.

Set AC Voltage Source properties

Select the f row in the properties table. Change the frequency from 1 GHz to 10 Hz . Select the display in schematic checkbox. Click Apply to set the frequency value. Click OK to exit the properties dialog. Open the lumped components from the drop down combo box. Select the Resistor US and then left click on the schematic to place the symbol. Press the Esc key to exit place mode. SUGGESTION: Try to place each component’s nodes on the grid. You can either manually position the component using you mouse or right click on the component symbol and select Set on Grid .

Clean up component and set MR Memristor parameters

Click on the Resistor symbol and select the Rotate Command⌘+R keys to orient the resistor symbol with its text to the right. Right click on the MR1 Memristor symbol and select the Rotate or press the Command⌘+R three times to orient the memristor with the minus terminal in the down position. Right click again on the MR1 Memristor symbol Move Component Text from the context menu. Left click on the MR1 MEMERISTOR label and drag it to a position to the right of the memristor symbol. Left click anywhere on the schematic to exit move mode.

Edit the Value of Resistor R1

Right click on the R1 Resistor symbol and select the Edit Properties . Select the R row and enter 75 Ohms Click Apply to set the frequency value. Click OK to exit the properties dialog.

Place the Ground nodes

Select the Gnd symbol on the toolbar. R1 Resistor to place the symbol on the schematic. Click on the minus terminal of the ac Voltage Source to place another Gnd symbol on the schematic. Press the Esc key to exit place mode.

Wire the Schematic Components

Select the Wire tool button on the toolbar. Select the upper terminal of R1 node and then left click the negative node of the MR1 memristor symbol. Press the Esc key to exit place mode. Select the positive node of the ac Voltage Source and then left click the input node of the Current Probe . Select the positive node of the MR1 Memristor and drag to the out node of the Current Probe Pr1 .

Add a Named Node (Vmr)

Click the Name button on the toolbar. Left click on the positive node of the MR1 Memristor symbol. Enter the Vmr for the label. Click OK to save the changes. Press the Esc key to exit place mode. Click on the Vmr label and drag it to a position below the memristor symbol. Left click on the schematic to exit move mode.

Add a Named Node (Vout)

Click the Name button on the toolbar. Left click on the connection between R1 and the negative node of the MR1 Memristor symbol. Enter the Vout for the label. Click OK to save the changes. Press the Esc key to exit place mode. Click on the Vout label and drag it to a position below the memristor symbol. Left click on the schematic to exit move mode.

Select .Model Directive for the MR1 Memristor Component

The MR Memeristor model is accompanied by several model directives that can be independently applied to each memristor symbol instance in the schematic diagram. These are selected from the Libraries tab. The MR Memristor component is used for multiple model definitions in Xyce. These are selected by the level parameter of the model. The following levels are available for the MR Memristor model in Xyce.

The parameters sets are stored in the .Model card format for SPICE compatible simulators.

level=2 : TEAM memristor model

level=3 : Yakopcic memristor model

level=4 : Joglekar memristor model

level=5 : Knowm M-MSS memristor model

NOTE: There are 4 different levels for the Memristor Model in Xyce. Each of these correspond to the model parameter sets above. At this point of this tutorial you can select form any of the available models in the Xyce Memristor Technology Library. The selection .Model and assignment to the MR1 Memristor component in the schematic determines the the model being simulated. There are a few other differences in the circuit design based on the model selected. I will point out the subtle changes to the circuit schematic and explain their significance as we proceed through the rest of this tutorial.

To Select the TEAM Model

Select the Libraries tab from the Main Dock. Left click on the Xyce_Memristor_Technology to expand the list. Select the appropriate MRM(X) file for the model you want to use. In this case MRM2 Left click to place the .Model directive on the schematic. Press the Esc key to exit place mode.

Assign the MRM2 TEAM Model to MR1 Memristor

Double click on the MR1 symbol to open the setup parameters dialog. Select MEMRISTOR line 1. Enter MRM2 for the TEAM model to assign it to the MR1 Memristor compnent Click Apply to save the changes. Click OK to exit the properties dialog.

Configure the Transient Simulation

Select the Components tab from the Main Dock. Open the simulations from the drop down combo box. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol. Press the Esc key to exit place mode. Double click on the transient simulation symbol to open the setup parameters dialog. Enter 1 ns in the Start param field. Enter 1 s in the Stop param field. Enter 101 in the Number value field to set a 10 ms step size. Click Apply to save the changes. Click OK to exit the properties dialog.

Save the Schematic Diagram File

Click the Save button on the toolbar. Enter the filename team_mr_test for the schematic diagram. Click Save to save the schematic to the .sch file.

Run a Simulation

Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar. Check simulation for errors or warnings . See the status bar at the bottom of the Qucs window lower right corner . Click the Exit button to close the Simulation window. You can view and messages written by the simulator by clicking the F5 key or selecting Show Last Messages from the Simulations menu. You can save the current netlist by clicking the Save Netlist button on the simulation window. NOTE: The F6 key or Show Last Netlist from the Simulations menu currently only displays the last netlist for the lastest Qucsator simulation. If you save the netlist using the button on the simulation window then you can open the .cir file under Others list in the project tree.

Set Document Settings (Optional)

For smaller sized schematics it is often desirable to add the data tables and plots to the schematic diagram. The default behavior is for the data to displayed in a separate tab after the simulation is complete. You can change this behavior by changing the settings for the schematic diagram.

Right click on the schematic and select Document Settings... Select Simulations tab. Uncheck open data display after simulation checkbox in the dialog. Click Apply to save the changes. Click OK to exit the properties dialog.

Check Tabular Results

Select the Components tab from the Main Dock. Open the diagrams from the drop down combo box. Select the Tabular and then left click on the schematic to place the table. Double click on the tran.I(PR1) row to add it to the graph. Double click on the tran.V(VMR) row to add it to the graph. Click Apply to set the value. Click OK to save the changes.

Press the Esc key to exit place mode.

Create a I-V vs. Time Plot

Select the Components tab from the Main Dock. Open the diagrams from the drop down combo box. Select the Cartesian and then left click on the schematic to place the symbol. Double click tran.V(VMR) row to add it to the graph. Double click on the tran.I(PR1) row to add it to the graph. Select the tran.I(PR1) in the Graph window and then select right Axis from the y-axis: drop-down list. Click Apply to save the changes. Click OK to exit the properties dialog. Press the Esc key to exit place mode. Left click anywhere on the plot window and use the corner grab handles to resize the plot.

Create a Hysteresis Plot

Select the Components tab from the Main Dock. Open the diagrams from the drop down combo box. Select the Cartesian and then left click on the schematic to place the symbol. Double click on the tran.I(PR1) row to add it to the graph. Select the tran.I(PR1) in the Graph window. Select tran.V(VMR) in the Plot Vs. dropbox. Click Apply to save the changes. Notice that the Graph Input changes to xyce/tran.I(PR1)@tran.V(VMR) Click OK to exit the properties dialog. Press the Esc key to exit place mode. Left click anywhere on the plot window and use the corner grab handles to resize the plot.

Whew! Now you should have project for TEAM Model simulation. Be sure to save your project before continuing.

Yakopcic Model (Additional Exercise)

Try to create the schematic diagram yakopcic_mr_test.sch on your own. You will need to start from scratch with a new schematic. Use the File/New menu option or click the New toolbar button

When creating your new schematic for the Yakopcic memristor test you can omit the current limiting resistor R1 that was present in the TEAM model test circuit because the Yakopcic model does not require this component in order to perform the transient simulation. This will give you a feel for the model characteristics without the addition of the voltage divider configuration of the TEAM model test circuit.

When you have completed the wired schematic you should have all the components placed and wired. Your schematic should look something like this

To Select the Yakopcic Model

Select the appropriate MRM(X) file for the model you want to use. In this case MRM3 Left click to place the .Model directive on the schematic. Press the Esc key to exit place mode.

Assign the MRM3 Yakopcic Model to MR1 Memristor

Double click on the MR1 symbol to open the setup parameters dialog. Select MEMRISTOR line 1. Enter MRM3 for the Yakopcic model to assign it to the MR1 Memristor compnent Click Apply to save the changes. Click OK to exit the properties dialog.

Configure the Transient Simulation

Select the Components tab from the Main Dock. Open the simulations from the drop down combo box. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol. Press the Esc key to exit place mode. Double click on the transient simulation symbol to open the setup parameters dialog. Enter 1 ns in the Start param field. Enter 1 s in the Stop param field. Enter 101 in the Number value field to set a 10 ms step size. Click Apply to save the changes. Click OK to exit the properties dialog.



Save the Schematic Diagram File

Click the Save button on the toolbar. Enter the filename yakopcic_mr_test for the schematic diagram. Click Save to save the schematic to the .sch file.

Run a Simulation

Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar. Check simulation for errors or warnings . See the status bar at the bottom of the Qucs window lower right corner . Click the Exit button to close the Simulation window.

Try to reproduce the Tabular and Cartesian Plot setup on your own. You can refer back to the TEAM Memristor section of above if you need a hint. When you have completed this section your schematic should look something like the following image.

Joglekar Model (Additional Exercise)

Again try to create the schematic diagram joglekar_mr_test.sch on your own.

For this exercise let’s change the AC Sinusoidal amplitude for this model simulation. To change the voltage of the AC sinusoidal voltage source do the following.

Set AC Voltage Source properties

Double click on the ac Voltage Source symbol to open the parameters for the source. Select the U row in the properties table. Change the voltage from 1 V to 500 mV . Click Apply to set the voltage value.

Your schematic should now look something like this:

To Select the Joglekar Model

Double click on the MR1 symbol to open the setup parameters dialog. Select MEMRISTOR line 1. Select the appropriate MRM(X) file for the model you want to use. In this case MRM4

Assign the MRM4 Joglekar Model to MR1 Memristor

Double click on the MR1 symbol to open the setup parameters dialog. Select MEMRISTOR line 1. Enter MRM4 in the param list and model spec field. Click Apply to save the changes. Click OK to exit the properties dialog.

Configure the Transient Simulation

Select the Components tab from the Main Dock. Open the simulations from the drop down combo box. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol. Press the Esc key to exit place mode. Double click on the transient simulation symbol to open the setup parameters dialog. Enter 1 ns in the Start param field. Enter 1 s in the Stop param field. Enter 101 in the Number value field to set a 10 ms step size. Click Apply to save the changes. Click OK to exit the properties dialog.

Configure the R_init Parameter for the MR Memristor Model

Like the KnowmMemristor M-MSS model which we looked in our very first tutorial you need to add the .PARAM directive to set the initial resistance R_init for the model. This again can be accomplished by do the following steps.

Select the Components tab from the Main Dock. Open the SPICE specific sections from the drop down combo box. Click and drag the .PARAM Section and drop it on the schematic and left click to place the symbol. Press the Esc key to exit place mode.

Double click on the .PARAM symbol to open the setup parameters dialog. Enter R_init in the param field. Enter 11000 in the value field to set R_init=11000 ohms. Click Apply to save the changes. Click OK to exit the properties dialog.

Set Document Settings (Optional)

For smaller sized schematics it is often desirable to add the data tables and plots to the schematic diagram. The default behavior is for the data to displayed in a separate tab after the simulation is complete. You can change this behavior by changing the settings for the schematic diagram.

Right click on the schematic and select Document Settings... Select Simulations tab. Uncheck open data display after simulation checkbox in the dialog. Click Apply to save the changes. Click OK to exit the properties dialog.

Save the Schematic Diagram File

Click the Save button on the toolbar.

Enter the filename joglekar_mr_test for the schematic diagram. Click Save to save the schematic to the .sch file.

Run a Simulation

Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar. Check simulation for errors or warnings . See the status bar at the bottom of the Qucs window lower right corner . Click the Exit button to close the Simulation window.

Try to reproduce the Tabular and Cartesian Plot setup on your own. You can refer back to the TEAM Memristor section of above if you need a hint. When you have completed this section your schematic should look something like the following image.

Conclusion

That completes this three part tutorial. You should also checkout the documentation and other examples listed in the Qucs 0.0.19 and Qucs-S 0.0.19 documentation available on the web at the following URLs. In my next post we will be exploring more dynamic behavior or the Knowm M-MSS Memristor Model with respect to square-wave pulse response by looking at Bi-directional Incremental Conductance Change and other effects.

Other References

Further Resources