human
I am working on the file "SYDE 556 Lecture 5 Dynamics.ipynb".
The first task is:
So we can think of the distortion error as introducing a bunch of local attractors into the representation
Any 'downward' x-crossing will be a stable point ('upwards' is unstable).
There will be a tendency to drift towards one of these even if the input is zero.


Noise error

What will random noise do?
Push the representation back and forth
What if it is small?
What if it is large?


What will changing the post-synaptic time constant $\tau$ do?

How does that interact with noise?


But real eyes aren't perfect integrators

If you get someone to look at someting, then turn off the lights but tell them to keep looking in the same direction, their eye will drift back to centre
How do we implement that?


$\dot{x}=-{1 \over \tau_c}x + v$

$\tau_c$ is the time constant of that return to centre

$A'=\tau {-1 \over \tau_c}+1$

$B' = \tau$
Can you write Python program for it?
assistant
#Here will random noise do.

import nengo
from nengo.utils.functions import piecewise

tau = 0.1
tau_c = 2.0

model = nengo.Network('Eye control', seed=5)

with model:
    stim = nengo.Node(piecewise({.3:1, .6:0 }))
    velocity = nengo.Ensemble(100, dimensions=1)
    position = nengo.Ensemble(200, dimensions=1)
    
    def feedback(x):
        return (-tau/tau_c + 1)*x
    
    conn = nengo.Connection(stim, velocity)
    conn = nengo.Connection(velocity, position, transform=tau, synapse=tau)
    conn = nengo.Connection(position, position, function=feedback, synapse=tau)

    stim_p = nengo.Probe(stim)
    position_p = nengo.Probe(position, synapse=.01)
    velocity_p = nengo.Probe(velocity, synapse=.01)
    
sim = nengo.Simulator(model)
sim.run(5)

plot(sim.trange(), sim.data[stim_p], label = "stim")
plot(sim.trange(), sim.data[position_p], label = "position")
plot(sim.trange(), sim.data[velocity_p], label = "velocity")
legend(loc="best");