arvoelke / nengolib

Nengo library of additional extensions
Other
29 stars 6 forks source link

Add digital derivative synapse #79

Open arvoelke opened 8 years ago

arvoelke commented 8 years ago

Adding the synapse (1. - ~z) / dt to a connection is an elegant / cheap way to implement differentiation.

arvoelke commented 7 years ago

Resolve #64 first.

arvoelke commented 7 years ago

Also note there exists no analog system such that zoh discretization yields (1. - ~z) / dt, because discrete2cont encounters a singular matrix. However, Euler and Tustin discretization can yield this digital synapse:

cont2discrete(([ 1. / dt,  0.], [  1., 1. / dt]), dt, method='euler') == (1. - ~z) / dt
cont2discrete(([ 2. / dt,  0.], [  1., 2. / dt]), dt, method='tustin') == (1. - ~z) / dt