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

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

  1. Click on the Qucs app icon on the Launcher Bar.

Open a Project File

  1. Double click the Ymemristor_prj to automatically open the Content tab.
    qucs_proj_list

    Qucs Project List

    qucs_proj_contents

    Qucs Project Contents

Create the Schematic diagram

  1. Select the Components tab in the Main Dock.

  2. Open the sources from the drop down combo box.

  3. Select the ac Voltage Source and then left click on the schematic to place the symbol.

  4. Press the Esc key to exit place mode.

    qucs_comp_sources_select

    Qucs Component Sources

    qucs_sch_ac_vsrc

    AC Voltage Source

  5. Open the nonlinear components from the drop down combo box.

  6. Select the MR Memristor and then left click on the schematic to place the symbol.

  7. Press the Esc key to exit place mode.

    qucs_comp_non_linear_select

    Non-linear Components Selection

    qucs_sch_ac_vsrc_mr

    Components MR1 Memristor

  8. Open the probes from the drop down combo box.

  9. Select the Current Probe and then left click on the schematic to place the symbol.

  10. Press the Esc key to exit place mode.

    qucs_comp_probes_select

    Component Current Probe

    qucs_sch_ac_vsrc_mr_prb

    AC Voltage Source, MR1 Memristor and Current Probe

Set AC Voltage Source properties

  1. Select the f row in the properties table.

  2. Change the frequency from 1 GHz to 10 Hz.

  3. Select the display in schematic checkbox.

    qucs_ac_freq_set

    AC Voltage Source Frequency Setting

  4. Click Apply to set the frequency value.

  5. Click OK to exit the properties dialog.

  6. Open the lumped components from the drop down combo box.

  7. Select the Resistor US and then left click on the schematic to place the symbol.

    qucs_comp_res_select

    Select Component Resistor US from lumped components

  8. Press the Esc key to exit place mode.

    qucs_sch_ac_vsrc_mr_prb_res

    Schematic with All Components

    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

  1. Click on the Resistor symbol and select the Rotate

    qucs_toolbar_rotate

    Toolbar Rotate Button

    button on the toolbar or press Command⌘+R keys to orient the resistor symbol with its text to the right.

  2. 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.

    qucs_sch_ac_vsrc_mr_res_rotate

    Schematic with R1 and MR1 Rotated

  3. Right click again on the MR1 Memristor symbol Move Component Text from the context menu.

  4. Left click on the MR1 MEMERISTOR label and drag it to a position to the right of the memristor symbol.

    qucs_sch_mr_rotate_move_text

    MR1 Component with Repositioned Text

  5. Left click anywhere on the schematic to exit move mode.

Edit the Value of Resistor R1

  1. Right click on the R1 Resistor symbol and select the Edit Properties.

    qucs_sch_mr_res_select

    Select R1 to Edit the Properties

  2. Select the R row and enter 75 Ohms

    qucs_sch_mr_res_set

    Set R1 Resistance Value

  3. Click Apply to set the frequency value.

  4. Click OK to exit the properties dialog.

Place the Ground nodes

  1. Select the Gnd symbol on the toolbar.

    qucs_toolbar_gnd

    Gnd Toolbar Button

    Then left click on the lower terminal of the R1 Resistor to place the symbol on the schematic.

  2. Click on the minus terminal of the ac Voltage Source to place another Gnd symbol on the schematic.

  3. Press the Esc key to exit place mode.

    qucs_sch_ac_vsrc_mr_prb_res_gnd

    Schematic with Gnd Nodes Added

Wire the Schematic Components

  1. Select the Wire tool button on the toolbar.

    qucs_toolbar_wire

    Wire Toolbar Button

  2. Select the upper terminal of R1 node and then left click the negative node of the MR1 memristor symbol.

  3. Press the Esc key to exit place mode.

  4. Select the positive node of the ac Voltage Source and then left click the input node of the Current Probe.

  5. Select the positive node of the MR1 Memristor and drag to the out node of the Current Probe Pr1.

    qucs_sch_ac_mr_prb_res_gnd_wired

    Schematic with All Components Wired

Add a Named Node (Vmr)

  1. Click the Name button on the toolbar.

    qucs_toolbar_name

    Named Node Toolbar Button

  2. Left click on the positive node of the MR1 Memristor symbol.

  3. Enter the Vmr for the label.

    qucs_add_name_vmr

    Vmr Named Node

  4. Click OK to save the changes.

  5. Press the Esc key to exit place mode.

  6. Click on the Vmr label and drag it to a position below the memristor symbol.

  7. Left click on the schematic to exit move mode.

    qucs_sch_name_vmr

    Named Node (Vmr) Set to Retrun Memristor Voltage

Add a Named Node (Vout)

  1. Click the Name button on the toolbar.

    qucs_toolbar_name

    Named Node Toolbar Button

  2. Left click on the connection between R1 and the negative node of the MR1 Memristor symbol.

  3. Enter the Vout for the label.

    qucs_add_name_vout

    Add Named Node (Vout)

  4. Click OK to save the changes.

  5. Press the Esc key to exit place mode.

  6. Click on the Vout label and drag it to a position below the memristor symbol.

  7. Left click on the schematic to exit move mode.

    qucs_sch_name_vout

    Named Node (Vout) Set to Return Volts Output

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
qucs_lib_xyce_memristor_tech

Xyce Memristor Technology Lib

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

  1. Select the Libraries tab from the Main Dock.

  2. Left click on the Xyce_Memristor_Technology to expand the list.

  3. Select the appropriate MRM(X) file for the model you want to use. In this case MRM2

    qucs_lib_mrm2_select

    MRM2 for TEAM Model

  4. Left click to place the .Model directive on the schematic.

    qucs_sch_team_model

    Schematic with TEAM Model

  5. Press the Esc key to exit place mode.

Assign the MRM2 TEAM Model to MR1 Memristor

  1. Double click on the MR1 symbol to open the setup parameters dialog.

  2. Select MEMRISTOR line 1.

  3. Enter MRM2 for the TEAM model to assign it to the MR1 Memristor compnent

    qucs_sch_team_mrm2_set

    MR1 Component Set MRM2 to use TEAM Model

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

    qucs_sch_team_model_set

    Schematic with MRM2 TEAM Model

Configure the Transient Simulation

  1. Select the Components tab from the Main Dock.

  2. Open the simulations from the drop down combo box.

  3. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol.

  4. Press the Esc key to exit place mode.

    qucs_comp_sims_select

    Select Transient simulation

    qucs_sch_team_sim_tran

    Schematic with Transient Simulation

  5. Double click on the transient simulation symbol to open the setup parameters dialog.

    qucs_sch_team_sim_tran_set

    Transient Simulation Settings

  6. Enter 1 ns in the Start param field.

  7. Enter 1 s in the Stop param field.

  8. Enter 101 in the Number value field to set a 10 ms step size.

  9. Click Apply to save the changes.

  10. Click OK to exit the properties dialog.

    qucs_sch_team_sim_tran_comp

    Schematic with Transient Simulation Parameters Set

Save the Schematic Diagram File

  1. Click the Save button on the toolbar.

    qucs_toolbar_save

    Save Toolbar Button

  2. Enter the filename team_mr_test for the schematic diagram.

  3. Click Save to save the schematic to the .sch file.

Run a Simulation

  1. Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar.

    qucs_toolbar_run

    Run Simulation Toolbar Button

  2. Check simulation for errors or warnings. See the status bar at the bottom of the Qucs window lower right corner.

    qucs_sim_extern_sim

    External Simulation Window

  3. Click the Exit button to close the Simulation window.

  4. You can view and messages written by the simulator by clicking the F5 key or selecting Show Last Messages from the Simulations menu.

    qucs_xyce_sim_trans_msg

    Xyce Message Log

  5. 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.

    qucs_team_mr_test_netlist

    Qucs-S Generated Netlist

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.

  1. Right click on the schematic and select Document Settings...

  2. Select Simulations tab.

  3. Uncheck open data display after simulation checkbox in the dialog.

    qucs_team_doc_set

    Document Settings

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

Check Tabular Results

  1. Select the Components tab from the Main Dock.

  2. Open the diagrams from the drop down combo box.

    qucs_comp_diag_tab

    Component Diagram Tabular Data

  3. Select the Tabular and then left click on the schematic to place the table.

    qucs_diag_team_mr_tab_set

    Tabular Diagram Settings

  4. Double click on the tran.I(PR1) row to add it to the graph.

  5. Double click on the tran.V(VMR) row to add it to the graph.

  6. Click Apply to set the value.

  7. Click OK to save the changes.

qucs_sch_sim_team_mr_trans_tab

Schematic with Trasient Tabular Results

  1. Press the Esc key to exit place mode.

Create a I-V vs. Time Plot

  1. Select the Components tab from the Main Dock.

  2. Open the diagrams from the drop down combo box.

  3. Select the Cartesian and then left click on the schematic to place the symbol.

    qucs_comp_diag_cart

    Component Diagram Cartesian Plot

  4. Double click tran.V(VMR) row to add it to the graph.

    qucs_diag_team_mr_cart_v_t_set

    I-V vs Time Plot Settings

  5. Double click on the tran.I(PR1) row to add it to the graph.

    qucs_diag_team_mr_cart_iv_t_set

    I-V vs Time Plot Settings

  6. Select the tran.I(PR1) in the Graph window and then select right Axis from the y-axis: drop-down list.

    qucs_diag_team_mr_cart_iv_t_set_y2

    I-V vs Time Plot Settings – PR1 on Y2 Axis

  7. Click Apply to save the changes.

  8. Click OK to exit the properties dialog.

  9. Press the Esc key to exit place mode.

  10. Left click anywhere on the plot window and use the corner grab handles to resize the plot.

    qucs_diag_team_mr_cart_iv_t_plot

    I-V vs Time Plot

Create a Hysteresis Plot

  1. Select the Components tab from the Main Dock.

  2. Open the diagrams from the drop down combo box.

  3. Select the Cartesian and then left click on the schematic to place the symbol.

    qucs_comp_diag_cart

    Component Diagram Cartesian Plot

  4. Double click on the tran.I(PR1) row to add it to the graph.

    qucs_diag_team_mr_cart_iv_hys_set

    Hysteresis I vs V Setting

  5. Select the tran.I(PR1) in the Graph window.

  6. Select tran.V(VMR) in the Plot Vs. dropbox.

    qucs_diag_team_mr_cart_iv_hys_set_pvs

    Hysteresis I vs V with Plot vs Set to VMR

  7. Click Apply to save the changes.

    Notice that the Graph Input changes to xyce/tran.I(PR1)@tran.V(VMR)

  8. Click OK to exit the properties dialog.

  9. Press the Esc key to exit place mode.

  10. Left click anywhere on the plot window and use the corner grab handles to resize the plot.

    qucs_diag_team_mr_cart_iv_hys_plot

    Hysteresis I vs V Plot

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

qucs_team_mr_model_sims_tran

TEAM Model Simulation

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

qucs_toolbar_new

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

qucs_sch_yak_name_vmr

Schematic with All Components Wired and Vmr

To Select the Yakopcic Model

  1. Select the appropriate MRM(X) file for the model you want to use. In this case MRM3
    qucs_lib_mrm3_select

    Select MRM3 for Yakopcic Model

  2. Left click to place the .Model directive on the schematic.

    qucs_sch_yak_model

    Schematic with .Model MRM3 for Yakopcic Model

  3. Press the Esc key to exit place mode.

Assign the MRM3 Yakopcic Model to MR1 Memristor

  1. Double click on the MR1 symbol to open the setup parameters dialog.

  2. Select MEMRISTOR line 1.

  3. Enter MRM3 for the Yakopcic model to assign it to the MR1 Memristor compnent

    qucs_sch_yak_mrm3_set

    Set MRM3 for Yakopcic Model

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

    qucs_sch_yak_model_comp

    Schematic with MR1 Assignend MRM3 Yakopcic Model

Configure the Transient Simulation

  1. Select the Components tab from the Main Dock.

  2. Open the simulations from the drop down combo box.

  3. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol.

  4. Press the Esc key to exit place mode.

    qucs_comp_sims_select

    Select Transient simulation

    qucs_sch_yak_sim_tran

    Schematic with Transient simulation

  5. Double click on the transient simulation symbol to open the setup parameters dialog.

  6. Enter 1 ns in the Start param field.

  7. Enter 1 s in the Stop param field.

  8. Enter 101 in the Number value field to set a 10 ms step size.

    qucs_sch_yak_sim_tran_set

    Transient Simulation Settings

  9. Click Apply to save the changes.

  10. Click OK to exit the properties dialog.

    qucs_sch_yak_sim_tran_comp

    Schematic with Transient Simulation

Save the Schematic Diagram File

  1. Click the Save button on the toolbar.

    qucs_toolbar_save

    Save Toolbar Button

  2. Enter the filename yakopcic_mr_test for the schematic diagram.

  3. Click Save to save the schematic to the .sch file.

Run a Simulation

  1. Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar.

    qucs_toolbar_run

    Run Simulation Toolbar Button

  2. Check simulation for errors or warnings. See the status bar at the bottom of the Qucs window lower right corner.

    qucs_sim_extern_sim

    External Simulation Window

  3. 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.

qucs_yakopcic_mr_model_sims_tran

Yakopcic Model Simulation

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

  1. Double click on the ac Voltage Source symbol to open the parameters for the source.

  2. Select the U row in the properties table.

  3. Change the voltage from 1 V to 500 mV.

  4. Click Apply to set the voltage value.

    qucs_ac_volts_set

    AC Voltage Source Settings

Your schematic should now look something like this:

qucs_sch_ac_mr_prb_gnd_wired

Complete Wired Schematic

To Select the Joglekar Model

  1. Double click on the MR1 symbol to open the setup parameters dialog.

  2. Select MEMRISTOR line 1.

  3. Select the appropriate MRM(X) file for the model you want to use. In this case MRM4

    qucs_lib_mrm4_select

    Joglekar model MRM4

Assign the MRM4 Joglekar Model to MR1 Memristor

  1. Double click on the MR1 symbol to open the setup parameters dialog.

  2. Select MEMRISTOR line 1.

  3. Enter MRM4 in the param list and model spec field.

    qucs_sch_jog_mrm4_set

    Enter MRM4 for MR1 Memrsitor

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

    qucs_sch_jog_model_set

    Joglekar model selected for MR1

Configure the Transient Simulation

  1. Select the Components tab from the Main Dock.

  2. Open the simulations from the drop down combo box.

  3. Click and drag the Transient Simulation and drop it on the schematic and left click to place the symbol.

  4. Press the Esc key to exit place mode.

    qucs_comp_sims_select

    Select Transient simulation

    qucs_sch_jog_sim_tran

    Transient simulation

  5. Double click on the transient simulation symbol to open the setup parameters dialog.

  6. Enter 1 ns in the Start param field.

  7. Enter 1 s in the Stop param field.

  8. Enter 101 in the Number value field to set a 10 ms step size.

    qucs_jog_sim_tran_set

    Transient Simulation Parameters

  9. Click Apply to save the changes.

  10. Click OK to exit the properties dialog.

    qucs_sch_jog_sim_tran_comp

    Schematic with Transient simulation

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.

  1. Select the Components tab from the Main Dock.

  2. Open the SPICE specific sections from the drop down combo box.

  3. Click and drag the .PARAM Section and drop it on the schematic and left click to place the symbol.

  4. Press the Esc key to exit place mode.

    qucs_comp_spice_select

    Components SPICE Specific

qucs_sch_spice_rinit

Schematic with .PARAM

  1. Double click on the .PARAM symbol to open the setup parameters dialog.

  2. Enter R_init in the param field.

  3. Enter 11000 in the value field to set R_init=11000 ohms.

    qucs_param_rinit_set

    Set R_init to Default Resistance

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

    qucs_sch_spice_rinit_set

    .PARAM R_init set to 11000

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.

  1. Right click on the schematic and select Document Settings...

  2. Select Simulations tab.

  3. Uncheck open data display after simulation checkbox in the dialog.

    qucs_jog_doc_set

    Document Settings

  4. Click Apply to save the changes.

  5. Click OK to exit the properties dialog.

Save the Schematic Diagram File

  1. Click the Save button on the toolbar.
    qucs_toolbar_save

    Save Toolbar Button

  2. Enter the filename joglekar_mr_test for the schematic diagram.

  3. Click Save to save the schematic to the .sch file.

Run a Simulation

  1. Press F2 or select Simulation/Simulate menu item or click the Run button on the toolbar.

    qucs_toolbar_run

    Run Simulation Toolbar Button

  2. Check simulation for errors or warnings. See the status bar at the bottom of the Qucs window lower right corner.

    qucs_sim_extern_sim

    External Simulation Window

  3. 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.

qucs_jog_mr_model_sims_tran

Transient Simulation of Joglekar Model

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

Michael Arendall

Michael Arendall is an experienced software developer, entrepreneur and innovator with more than 25 years experience working with leading semiconductor manufacturers, academia and government laboratories; directly supporting research and development labs by building tools and apparatus for characterizing, analyzing and performing reliability studies on advanced semiconductor process nodes.

Related Posts

Subscribe To Our Newsletter

Join our low volume mailing list to receive the latest news and updates from our team.

Leave a Comment

Knowm 32X32 Crossbar

Knowm Newsletter

Are you ready for memristor AI processors? With our newsletter, you will be.