Simulate memristor

HI
Is it possible to simulate memristors with nengo?

Hello and welcome! There are several ways one could simulate memristors with Nengo, depending on how integrated you need them to be with other parts of your model.

Usually, the most direct approach is to create a nengo.Node(...) object to encapsulate the Python code that you need to run in order to simulate the memristor each time-step. This code would consume whatever signals are connected into it via nengo.Connection, update the memrister using these inputs, and then return the output of your memristor. If you need the memristor to maintain additional state across time-steps, here is one example of how to do so: https://www.nengo.ai/nengo/examples/usage/delay-node.html.

More specific approaches include extending the builder (e.g., with a custom neuron model, or custom learning rule), but this depends on where you want the memristors and what you need them to do.

In either case, note that any Python code you write to simulate the memristor will only run on your CPU. If you need the memristors to be simulated on some neuromorphic hardware, then you would need to write some extension specific to the backend of interest to emulate/compile the function/extension.

Hello
Thank you so much for your useful explanations.

As my project is on simulating the learning and may be pattern recognition using memristor in Nengo but it doesen’t clearly defined yet, is it possible for you to guide me know how can I find out different approaches to implement memristor functionalities in Nengo?

You will first need a model / equations describing how your memristors behave (given some input, what they will do to update their state, and then what they will output). Do you have any numpy code or similar expressing your ideal memristor’s computations?