Neuromorphic muscle spindle model (Vannucci et al 2017)

 Download zip file 
Help downloading and running models
Accession:235123
A fully spike-based, biologically inspired mechanism for the translation of proprioceptive feedback.
Reference:
1 . Vannucci L, Falotico E, Laschi C (2017) Proprioceptive Feedback through a Neuromorphic Muscle Spindle Model. Front Neurosci 11:341 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Dorsal Root Ganglion cell: Spinal cord muscle spindle type Ia sensory fiber; Dorsal Root Ganglion cell: Spinal cord muscle spindle type II sensory fiber;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEST; SpiNNaker;
Model Concept(s): Spindles;
Implementer(s): Vannucci, Lorenzo [l.vannucci at santannapisa.it];
import time
import math

from spynnaker_external_devices_plugin.pyNN.connections\
    .spynnaker_live_spikes_connection import SpynnakerLiveSpikesConnection

# class that sends a lenghts and extensions speeds, using SpiNNaker APIs
# it simulates a simple stretch
class SpindleLengthSender(object):

    def __init__(self, pop_labels):
        self._length_sender = SpynnakerLiveSpikesConnection(
                                receive_labels=None, local_port=19999,
                                send_labels=pop_labels)
        self._len = 0.95
        self._dlen = 0.0
        self._go_on = True

        for label in pop_labels:
            self._length_sender.add_start_callback(label, self.send_input_spindle)

        self._count = 0

    def len_to_intlist(self):
        l = list()
        l.append(int(math.trunc(self._len)))
        l.append(int((self._len - math.trunc(self._len)) * 1000))
        l.append(int(math.trunc(self._dlen)))
        l.append(int((self._dlen - math.trunc(self._dlen)) * 1000))
        return l

    def stop(self):
        self._go_on = False

    def generate_new_length(self):
        if self._count < 110:
            self._len = 0.95
            self._dlen = 0.0
        elif self._count < 220:
            self._len += (1.08-0.95)/110
            self._dlen = (1.08-0.95)/1.1
        else:
            self._len = 1.08
            self._dlen = 0.0
        self._count += 1

    def send_input_spindle(self, label, sender):
        while self._go_on:
            self.generate_new_length()
            sender.send_spikes(label, self.len_to_intlist())
            time.sleep(0.01)