Controlled Integrator example¶
Nengo Example: Controlled Integrator:
$$ \dot{a}(t) = \mathrm{control}(t) \cdot a(t) + B \cdot \mathrm{input}(t) $$
In this notebook, we will build a controlled intgrator with LIF neurons. The Neural Engineering Framework (NEF) equivalent equation for this integrator is:
$$ \dot{a}(t) = \mathrm{control}(t) \cdot a(t) + \tau \cdot \mathrm{input}(t). $$
We call the coefficient $\tau$ here a recurrent time constant because it governs the rate of integration.
Network behaviour:
A = tau * Input + Input * Control
import numpy as np import matplotlib.pyplot as plt %matplotlib inline import nengo %load_ext nengo.ipynb
<IPython.core.display.Javascript at 0x7f991dfa9610>
Step 1: Create the network 'control' signal
We also need to create a control signal that controls how the integrator behaves. We will make this signal 1 step that changes half way through the run control_func = piecewise({0: 1, 0.6: 0.5})
We add the control signal to the network like we added the input signal, but this this time we connect it to the second dimension of our neural population.
with model:. Try adjusting it and see what happens!)(2, 1, 2)98e7afbd 1 (t < 0.6), the neural integrator performs near-perfect integration. However, when the control value drops to 0.5 (t > 0.6), the integrator becomes a leaky integrator. This means that in the absence of input, its stored value drifts towards zero.
Download
controlled_integrator as an IPython notebook or Python script.