The improvements generally relate to devices for processing electrical pulses, and more specifically relate to standalone pulse processing apparatuses.
Processing electrical signals such as neural signals or cardiac signals, including for instance the real-time or quasi real-time detection and classification thereof, generally require a considerable amount of hardware and software. In applications where a subject's brain tissues are to be interrogated, the heaviness of existing head-mounted pulse processing apparatuses may prevent normal behaviour, which may taint at least some in situ experiments. Although existing pulse processing apparatuses are satisfactory to a certain degree, there remains room for improvement, especially in reducing their footprint and/or power consumption.
In an aspect of the present disclosure, there is provided methods and devices for processing electrical pulses. The processing of the electrical pulses can require the detection of the electrical pulses, including the generation of arrays of amplitudes values indicative of the detected electrical pulses; the compression of the arrays of amplitudes values, including the dimension reduction of these arrays of amplitudes values resulting into arrays of wavelet coefficients; and the classification of the arrays of wavelet coefficients into respective reference pulse shapes.
In some embodiments, the compression of a received array of amplitudes values into a corresponding array of wavelet coefficients can be performed using a hardware coded sorting tree algorithm, which can reduce the amount of computational power and/or memory requirements on the pulse processing device compared to existing pulse processing apparatuses.
In accordance with a first aspect of the present disclosure, there is provided a method of associating a pulsed signal to a corresponding reference pulse shape, the method comprising: accessing reference data having a plurality of reference pulse shapes, each reference pulse shape having a sparse array of average coefficients; receiving a pulsed signal having an array of amplitude values, including generating a sparse array of instantaneous coefficients based on said pulsed signal; calculating a plurality of first distances between said instantaneous coefficients of said sparse array and the average coefficients of each one of said reference pulse shapes, said first distances having a first minimal distance identifying a closer one of the reference pulse shapes; and upon determining that said first minimal distance is below a first distance threshold, associating said sparse array of instantaneous coefficients to the closer one of the reference pulse shapes.
Further in accordance with the first aspect of the present disclosure, the method can for example register the sparse array of instantaneous coefficients as a sparse array of average coefficients of a new reference pulse shape in the reference data.
Still further in accordance with the first aspect of the present disclosure, at least one of said first distances can for example be a L1 distance given by a relation equivalent to the following equation:
d
L1=Σi=1N|xi−
wherein i denotes an integer, N denotes a number of coefficients of said sparse arrays, xi denotes the ith instantaneous coefficients of said sparse array and
Still further in accordance with the first aspect of the present disclosure, the method can for example further comprise updating said average coefficients of the closer one of the reference pulse shapes based on said instantaneous coefficients.
Still further in accordance with the first aspect of the present disclosure, the method can for example further comprise calculating a plurality of second distances between the updated average coefficients of the closer one of the reference pulse shapes and the average coefficients of the other ones of the reference pulse shapes, the second distances having a second minimal distance identifying a closer one of said other ones of the reference pulse shapes.
Still further in accordance with the first aspect of the present disclosure, the method can for example further comprise, upon determining that said second minimal distance is greater a second distance threshold, registering the instantaneous coefficients as a sparse array of average coefficients of a new reference pulse shape in the reference data.
Still further in accordance with the first aspect of the present disclosure, said generating said sparse array of instantaneous coefficients can for example include performing one or more discrete transforms on said amplitude values of said pulsed signal.
Still further in accordance with the first aspect of the present disclosure, said performing can for example include performing one or more discrete wavelet transforms on said amplitude values of said pulsed signal, said instantaneous and said average coefficients being wavelet coefficients.
Still further in accordance with the first aspect of the present disclosure, said discrete wavelet transform can for example be a Symmlet-2 discrete wavelet transform.
In accordance with a second aspect of the present disclosure, there is provided a pulse processing device comprising: a substrate; and a pulse classification module mounted on the substrate, the pulse classification module having a processor and a memory having instructions stored thereon that when performed by the processor perform the steps of: accessing reference data having a plurality of reference pulse shapes, each reference pulse shape having a sparse array of average coefficients; receiving a pulsed signal having an array of amplitude values, including generating a sparse array of instantaneous coefficients based on said pulsed signal; calculating a plurality of first distances between said instantaneous coefficients of said sparse array and the average coefficients of each one of said reference pulse shapes, said first distances having a first minimal distance identifying a closer one of the reference pulse shapes; and upon determining that said first minimal distance is below a first distance threshold, associating said sparse array of instantaneous coefficients to the closer one of the reference pulse shapes.
Further in accordance with the second aspect of the present disclosure, the pulse processing device can for example further comprise, upon determining that said first minimal distance exceeds said first distance threshold, registering the sparse array of instantaneous coefficients as a sparse array of average coefficients of a new reference pulse shape in the reference data.
Still further in accordance with the second aspect of the present disclosure, at least one of said first distances can for example be a L1 distance given by a relation equivalent to the following equation:
d
L1=Σi=1N|xi−
wherein i denotes an integer, N denotes a number of coefficients of said sparse arrays, xi denotes the ith instantaneous coefficients of said sparse array and
Still further in accordance with the second aspect of the present disclosure, the pulse processing device can for example further comprise updating said average coefficients of the closer one of the reference pulse shapes based on said instantaneous coefficients.
Still further in accordance with the second aspect of the present disclosure, the pulse processing device can for example further comprise calculating a plurality of second distances between the updated average coefficients of the closer one of the reference pulse shapes and the average coefficients of the other ones of the reference pulse shapes, the second distances having a second minimal distance identifying a closer one of said other ones of the reference pulse shapes.
Still further in accordance with the second aspect of the present disclosure, the pulse processing device can for example further comprise, upon determining that said second minimal distance is greater a second distance threshold, registering the instantaneous coefficients as a sparse array of average coefficients of a new reference pulse shape in the reference data.
Still further in accordance with the second aspect of the present disclosure, said generating said sparse array of instantaneous coefficients can for example include from performing one or more discrete transforms on said amplitude values of said pulsed signal.
Still further in accordance with the second aspect of the present disclosure, said performing can for example include performing one or more discrete wavelet transforms on said amplitude values of said pulsed signal, said instantaneous and said average coefficients being wavelet coefficients.
Still further in accordance with the second aspect of the present disclosure, said discrete wavelet transform can for example be a Symmlet-2 discrete wavelet transform.
Still further in accordance with the second aspect of the present disclosure, the pulse processing device can for example have a footprint below 5 cm3, below 2.5 cm3 and most preferably below 1 cm3.
Still further in accordance with the second aspect of the present disclosure, the pulse processing device can for example have a power consumption below 1 mW, preferably below 500 μW and most preferably below 100 μW.
In some embodiments, the classification of a received array of wavelet coefficients into a respective reference pulse shape is performed by comparing geometrical distances between the wavelet coefficients of the received array and average wavelet coefficients associated with some reference pulse shapes. When it is determined that a minimal one of the geometrical distances is below a given distance threshold, the received array of wavelet coefficients can be associated with the corresponding reference pulse shape, which when hardware coded into a standalone integrated circuit or field-programmable gate array can reduce the amount of computational power and/or memory requirements on the pulse processing device compared to existing pulse processing apparatuses.
In accordance with a third aspect of the present disclosure, there is provided a method of sorting coefficients associated to a pulsed signal, the method comprising: sampling a pulsed signal, including generating an array of amplitude values; performing a discrete transform using said amplitude values of said array, including generating an array of coefficients indicative of an energy distribution of said pulsed signal; and sorting said coefficients using a tree sorting algorithm, said tree sorting algorithm finding a maximal one of said coefficients and an Nth maximal one of said coefficients, including generating a sparse array of said coefficients consisting of said maximal one of said coefficients, said Nth maximal one of said coefficients and any coefficients therebetween, including the relative position of the coefficients relative to one another. For instance, null values may replace each of the other coefficients in said sparse array.
Further in accordance with the third aspect of the present disclosure, N can for example be an integer being smaller than said number of said coefficients of said array.
Still further in accordance with the third aspect of the present disclosure, N can for example be twenty.
Still further in accordance with the third aspect of the present disclosure, said finding can for example comprise disregarding an initial polarity of each of said coefficients, said sparse array comprising the N maximal coefficients with their initial polarity.
Still further in accordance with the third aspect of the present disclosure, a number of said coefficients can for example be equal to or smaller than a number of said amplitude values.
Still further in accordance with the third aspect of the present disclosure, the method can for example further comprise normalizing said N maximal coefficients of said sparse array, the N maximal coefficients ranging between the positive unity and the negative unity.
Still further in accordance with the third aspect of the present disclosure, the method can for example further comprise X-bits quantizing said sparse array of said N maximal coefficients, wherein X is an integer greater than one.
Still further in accordance with the third aspect of the present disclosure, said performing can for example include performing one or more discrete wavelet transforms on said amplitude values of said pulsed signal, said coefficients being wavelet coefficients.
Still further in accordance with the third aspect of the present disclosure, said discrete wavelet transform can for example be a Symmlet-2 discrete wavelet transform.
Still further in accordance with the third aspect of the present disclosure, the Symmlet-2 discrete wavelet transform can for example be a level 4 Symmlet-2 discrete wavelet transform.
In accordance with a fourth aspect of the present disclosure, there is provided a pulse processing device comprising: a substrate; and a pulse compression module mounted on the substrate, the pulse compression module having a processor and a memory having instructions stored thereon that when performed by the processor perform the steps of: sampling a pulsed signal, including generating an array of amplitude values; performing a discrete transform using said amplitude values of said array, including generating an array of coefficients indicative of an energy distribution of said pulsed signal; and sorting said coefficients using a tree sorting algorithm, said tree sorting algorithm finding a maximal one of said coefficients and an Nth maximal one of said coefficients, including generating a sparse array of said coefficients consisting of said maximal one of said coefficients, said Nth maximal one of said coefficients and any coefficients therebetween, including the relative position of the coefficients relative to one another. For instance, null values may replace each of the other coefficients in said sparse array.
Further in accordance with the fourth aspect of the present disclosure, N can for example be an integer being smaller than said number of said coefficients of said array.
Still further in accordance with the fourth aspect of the present disclosure, N can for example be twenty.
Still further in accordance with the fourth aspect of the present disclosure, a number of said coefficients can for example be equal to or smaller than a number of said amplitude values.
Still further in accordance with the fourth aspect of the present disclosure, said finding can for example further comprise disregarding an initial polarity of each of said coefficients, said sparse array comprising the N maximal coefficients with their initial polarity.
Still further in accordance with the fourth aspect of the present disclosure, the pulse processing device can for example further comprise normalizing said N maximal coefficients of said sparse array, the N maximal coefficients ranging between the positive unity and the negative unity.
Still further in accordance with the fourth aspect of the present disclosure, the pulse processing device can for example further comprise X-bits quantizing said sparse array of said N maximal coefficients, wherein X is an integer greater than one.
Still further in accordance with the fourth aspect of the present disclosure, said performing can for example include performing one or more discrete wavelet transforms on said amplitude values of said pulsed signal, said coefficients being wavelet coefficients.
Still further in accordance with the fourth aspect of the present disclosure, said discrete wavelet transform can for example be a Symmlet-2 discrete wavelet transform.
Still further in accordance with the fourth aspect of the present disclosure, said Symmlet-2 discrete wavelet transform can for example be a level 4 Symmlet-2 discrete wavelet transform.
Still further in accordance with the fourth aspect of the present disclosure, the pulse processing device can for example have a footprint below 5 cm3, below 2.5 cm3 and most preferably below 1 cm3.
Still further in accordance with the fourth aspect of the present disclosure, the pulse processing device can for example have a power consumption below 1 mW, preferably below 500 μW and most preferably below 100 μW.
In some embodiments, the above-described electrical pulses may be generated by an entity (e.g., brain tissue, heart tissue) which has been previously stimulated with a stimulation signal. In these embodiments, the pulse processing device can decide how the pulse generating entity is to be stimulated. For instance, the stimulation signal may be a given optical signal of a given colour and/or a given intensity, as in optogenetic experiments, or an electrical signal. The stimulation of the pulse generating entity can trigger the generation of one or more electrical signals that are to be detected, compressed and classified on the go by the pulse processing entity, and so forth. When all these steps are performed using a subject-mounted standalone pulse processing device, the pulses processing device operates in a closed-loop, which can be beneficial in at least some situations. For example, the pulse generating entity may be stimulated with a given stimulation signal which is expected to lead to a corresponding reaction from the pulse generating entity. The corresponding reaction may be recognized by the generation of electrical pulses of a given reference pulse shape following the stimulation. When it is determined that at least some pulses are detected within a given time window following the stimulation, and classified to be associated with that given reference pulse shape, the stimulation may be deemed to be successful. As a result, the pulse generating entity may be controlled in closed-loop using the pulse processing device.
In accordance with a fifth aspect of the present disclosure, there is provided a method of stimulating a pulse generating entity, the method comprising: implanting a probe head within the pulse generating entity, the probe head having a stimulation element and an electrode; during a given time window, the electrode collecting a corresponding plurality of electrical signals; and upon associating at least a threshold number of said electrical signals to a common reference pulse shape, stimulating the pulse generating entity using the stimulation element, including generating a stimulation signal within the pulse generating entity.
Further in accordance with a fifth aspect of the present disclosure, said stimulation signal can for example be selected on the basis of the common reference pulse shape of the threshold number of electrical signals.
Still further in accordance with a fifth aspect of the present disclosure, said stimulation signal can for example be an optical stimulation signal.
Still further in accordance with a fifth aspect of the present disclosure, a wavelength of said optical stimulation signal can for example depend on the common reference pulse shape of the threshold number of electrical signals.
Still further in accordance with a fifth aspect of the present disclosure, said given time window can for example extend during at least 100 ms, preferably at least 50 ms and most preferably at least 25 ms.
Still further in accordance with a fifth aspect of the present disclosure, said stimulation signal can for example be associated with a reaction of said pulse generating entity, the method further comprising conditioning the pulse generating entity to react according to the reaction via said stimulating.
Still further in accordance with a fifth aspect of the present disclosure, said pulse generating entity can for example be at least one of brain tissue and heart tissue.
Still further in accordance with a fifth aspect of the present disclosure, the method can for example further comprise accessing reference data having a plurality of reference pulse shapes, the common reference pulse shape being identifiable in said reference data.
In accordance with a sixth aspect of the present disclosure, there is provided a pulse processing device comprising: a substrate; a probe head implantable within a pulse generating entity, the probe head having a stimulation element and an electrode; a stimulation module mounted on the substrate and communicatively coupled to the probe head, the stimulation module having a processor and a memory having instructions stored thereon that when performed by the processor perform the steps of: during a given time window, collecting a plurality of electrical signals using said electrode; and upon associating at least a threshold number of said electrical signals to a common reference pulse shape, stimulating the pulse generating entity using the stimulation element, including generating a stimulation signal within the pulse generating entity.
Further in accordance with the sixth aspect of the present disclosure, said stimulation signal can for example be selected on the basis of the common reference pulse shape of the threshold number of electrical signals.
Still further in accordance with the sixth aspect of the present disclosure, said stimulation element can for example include an optical fiber delivering an optical stimulation signal to the pulse generating entity.
Still further in accordance with the sixth aspect of the present disclosure, a wavelength of said optical stimulation signal can for example depend on the common reference pulse shape of the threshold number of electrical signals.
Still further in accordance with the sixth aspect of the present disclosure, said given time window can for example extend during at least 100 ms, preferably at least 50 ms and most preferably at least 25 ms.
Still further in accordance with the sixth aspect of the present disclosure, said stimulation signal can for example be associated with a reaction of said pulse generating entity, the stimulating module further performing conditioning the pulse generating entity to react according to the reaction via said stimulating.
Still further in accordance with the sixth aspect of the present disclosure, the pulse processing device can for example further comprise accessing reference data having a plurality of reference pulse shapes, the common reference pulse shape being identifiable in said reference data.
Many further features and combinations thereof concerning the present improvements will appear to those skilled in the art following a reading of the instant disclosure.
In the figures,
c are graphs showing detected, compressed and sorted arrays of wavelet coefficients at two different depths within the rat's brain tissue, in accordance with one or more embodiments;
As depicted, the pulse processing device 100 has a controller 102 which is communicatively coupled to a probe 104 which is to be implanted into the pulse generating entity 10.
In this example, the controller 102 has a pulse detection module 106, a pulse compression module 108, a pulse classification module 110, a decision making module 112 and a stimulation module 114. The decision making module 112 may be configured to determine how, when and at which frequency the pulse generating entity 10 is to be stimulated. As shown, the stimulation module 114 is communicatively coupled to the decision making module 112. Accordingly, based on the decisions taken by the decision making module 112, the stimulation module 114 may be configured to generate instructions to stimulate the pulse generating entity 10 with a given stimulation signal via the probe 104. For instance, the stimulation signal may be an optical signal of a given amplitude, duration, and/or color (wavelength). The stimulation signal may be an electrical stimulation signal of a given amplitude, pulse shape, duration and/or frequency.
In some embodiments, the pulse generating entity 10 may generate electrical pulses of different pulse shapes in short succession. When successive electrical pulses are detected within a given time window using the pulse detection module, and classified to be of the same reference pulse shape, the stimulation module 114 may stimulate the pulse generating entity 10 with a corresponding stimulation signal to condition the pulse generating entity 10.
To save computational power and/or memory requirements, the detected pulses are processed to compress them and to classify them into a corresponding reference pulse shape. Based on the reference pulse shape of the detected pulsed signal, the decision making module 112 may determine whether an experiment is successful or with which stimulation signal the pulse generating entity 10 is to be stimulated. In any case, the modules 106 through 114 form a closed loop which may be repeated any desired number of times, depending on the embodiment.
The controller 102 can be provided as a combination of hardware and software components. The hardware components can be implemented in the form of a computing device 300, an example of which is described with reference to
Referring to
The processor 302 can be, for example, a general-purpose microprocessor or microcontroller, a digital signal processing (DSP) processor, an integrated circuit, a field programmable gate array (FPGA), a reconfigurable processor, a programmable read-only memory (PROM), or any combination thereof.
The memory 304 can include a suitable combination of any type of computer-readable memory that is located either internally or externally such as, for example, random-access memory (RAM), read-only memory (ROM), compact disc read-only memory (CDROM), electro-optical memory, magneto-optical memory, erasable programmable read-only memory (EPROM), and electrically-erasable programmable read-only memory (EEPROM), Ferroelectric RAM (FRAM) or the like.
Each I/O interface 306 enables the computing device 300 to interconnect with one or more input devices, such as button(s), switch(es), or with one or more output devices such as a communication unit (e.g., an antenna).
Each I/O interface 306 enables the controller 102 to communicate with other components, to exchange data with other components, to access and connect to network resources, to serve applications, and perform other computing applications by connecting to a network (or multiple networks) capable of carrying data including the Internet, Ethernet, plain old telephone service (POTS) line, public switch telephone network (PSTN), integrated services digital network (ISDN), digital subscriber line (DSL), coaxial cable, fiber optics, satellite, mobile, wireless (e.g. WMAX), SS7 signaling network, fixed line, local area network, wide area network, and others, including any combination of these.
The computing device 300 and the software circuits described herein are meant to examples only. Other suitable embodiments of the controller 102 can also be provided, as it will be apparent to the skilled reader.
With the rise of optogenetics in experimental neuroscience methods, it is now possible to use light to study the microcircuits deep inside the intact brain. This groundbreaking approach can activate specific neurons in the cortex of transgenic animals to observe their role in vast biological networks. Recently, optogenetics has been used to carry various behavioural experiments with freely behaving transgenic rodents, especially with mice. These experiments are performed using predefined stimulation patterns, with or without, simultaneous electrophysiological recording, and often using a bulky hardwired setup.
A promising paradigm with potential to accelerate the development of new therapeutics against brain diseases consists of closing the loop between the optical stimulator and the neural sensing device. This approach, known as closed-loop optogenetics, can stimulate select brain areas according to the level of activity detected from a specific group of neurons or brain areas. Mainly, it requires three essential components, including a neural recording interface, an optical stimulator, and a neural analyzer. One major challenge facing CL optogenetic systems consists of analyzing dense neural activity in real time to quickly issue proper stimulation feedback commands inside specific brain areas. Existing pulse processing apparatuses designed for this purpose typically use a PC-based system and a wired experimental setting, which usually limits their use to anesthetized animals models. Although these systems are convenient for performing complex neural analysis, they are not suitable for freely-moving experiments seeking natural behaviour, since the animals are tethered.
The ND-IC 404 processes the neural activity data using three digital modules: 1) a detector module 406 detecting and extracting the action potential (AP) of individual neurons using an adaptive threshold; 2) a data dompression module 408 compressing the detected AP using a discrete transform such as the Symmlet-2 discrete wavelet transform (DWT) for reducing the amount of data to be communicated within the ND-IC 404 and also communicated to external network using a low-power wireless link, for instance; 3) a classification module 410 sorting the compressed AP into separated reference shapes on the fly according to their pulse shapes.
As will be described below, the compression module 408 reduces the complexity from O(n2), to O(n·log (n)) compared to existing pulse processing apparatuses, while using two times less memory, thanks to the use of a new coefficient sorting tree 412. Accordingly, the compression module 408 discussed herein can have reduced electrical power requirements and/or reduced computational power requirements. The AP classification module 410 can reuse both the compressed DWT coefficients to perform implicit dimensionality reduction, which allows for performing intensive signal processing on-chip, while increasing power and hardware efficiency. The classification module 410 can also reuse the signal standard deviation already computed by the AP detector module 406 as threshold for performing automatic AP sorting. The headstage also introduces a wireless CL module 414 between the neural data acquisition module and the optical stimulator. The proposed CL module 414 uses the AP sorting and timing information produced by the ND-IC 404 for detecting complex firing patterns within the brain. The headstage is also smaller (1.13 cm3), lighter (3.0 g with a 40 mAh battery) and less-invasive than existing pulse processing apparatuses, while providing a measured autonomy of 2h40, with the ND-IC 404. Moreover, the ND-IC 404 is provided within a housing 416 which is miniature, lightweight and wireless, which is well suited for CL optogenetic experiments in real time. Further, the pulse processing device 400 has been validated in vivo and it is demonstrated that the CL scheme with a freely-moving animal works in some circumstances. More specifically, the whole device 400 and the ND-IC 404 are firstly validated in vivo in the LD thalamus of a Long-Evans rat, and then, in freely-moving CL experiments involving a mouse virally expressing ChR2-mCherry in inhibitory neurons of the prelimbic cortex, and the results show that the proposed pulse processing device 400 can work well within an in vivo experimental setting with a freely moving mouse.
The ND-IC 404 is the most important module for CL optogenetics in the pulse processing system 400. It provides real-time neural data decoding to establish a connection between a readout and a stimulator. As shown in the block diagram of
In addition to the ND-IC 404, the headstage encompasses three other building blocks: i) a custom mixed-signal 0.13-m CMOS system-on-chip (SoC) 417 for simultaneous neural recording and optogenetic stimulation, which is depicted in
Still referring to
The detection module, the compression module, the classification module and the stimulation module are described in this order in the following paragraphs.
The proposed detector module 406 has two main modules: the pre-processor for conditioning the neural data and the adaptive threshold for discriminating the APs from noise.
The detector module 406 is based on the absolute value operator. As previously demonstrated, this simplified operator can be as efficient as a more sophisticated energy-based operator, such as the non-linear energy operator (NEO), the smoothed NEO and the matched-filter (MF), providing an excellent trade-off between low complexity and high performance. The absolute value operator concept is shown in
The output of the absolute value operator is compared with a threshold, the value of which is recalculated in real time according to the characteristics of the neural signal. The proposed threshold calculation strategy is based on the estimated standard deviation (σa) of the noise embedded in the neural signal. This strategy is effective and robust, and is used extensively in electrophysiology. The detector module computes σa through a feedback loop that is using the statistical property of the signal's noise, as seen in
As mentioned above, the detected AP is provided in the form of an array 800 of amplitude values Ai, such as the one shown on the leftmost waveform of
As best shown in
At step 902, a pulsed signal is sampled. The sampling of the pulsed signal leads to the generation of an array of amplitude values Ai. The pulsed signal may be sampled by the detection module discussed above, after which the detected pulsed signal is transmitted to the compression module.
At step 904, a discrete transform is performed using the amplitude values Ai of the array sampled at step 902. This step includes the generation of an array of coefficients Ci indicative of an energy distribution of the pulsed signal sampled at step 902. As with such discrete transforms, the number of the coefficients Ci can be the same as a number of the amplitude values Ai. In some other embodiments, the number of the coefficients Ci can be smaller than a number of the amplitude values Ai. Reducing the dimension from the array of amplitudes values Ai to the array of coefficients Ci can reduce the power and/or memory requirements of the pulse processing device.
In some embodiments, the discrete transforms are provided in the form of discrete wavelet transforms. In such embodiments, the coefficients resulting from the discrete wavelet transforms are wavelet coefficients. As different types of discrete wavelet transform may be used, the Symmlet-2 discrete wavelet transform was found to be convenient in at least some circumstances.
At step 906, the coefficients Ci are sorted using a tree sorting algorithm. In this embodiment, the tree sorting algorithm finds a maximal one of the coefficients Ci, Cmax and an Nth maximal one of the coefficients Ci, Cn. Wth these coefficients found, step 906 also includes the generation of a sparse array of coefficients Ci which consists of the maximal coefficient Cmax, the Nth maximal coefficient Cn and any coefficients therebetween, with null values replacing each of the other coefficients in the sparse array. As such, the N coefficients Ci which carry the more relevant information pertaining to the corresponding AP are kept along with their position relative to one another. The information of their relative positions can be provided in the form of zeroes replacing each one of the other, non-kept coefficients. In this way, the burden in terms of computational and/or memory requirements can be reduced.
It is expected that the number N of coefficients that are selected at step 906 is generally smaller than the number of coefficients in the array. Accordingly, at least some coefficients are zeroed to provide the sparse array of coefficients Cmax, Cmax-1, . . . , Cn. In some embodiments, the number N of coefficients is set to at least 30, preferably set to at least 25 and most preferably set to at least 20. In some embodiments, the detected array of amplitudes values comprises 48 data points, which when compressed using the method 900 result in only 6 relevant data points, leaving zeroes on the 42 addresses of the array.
It is noted that, at least in some embodiments, the step 906 includes a step of calculating an absolute value of all the coefficients Ciat lea, and the step of finding the coefficients Cmax, Cmax-1, . . . , Cn is based on the absolutes values. As such, the initial polarity (e.g., whether the coefficients are positive or negative) may be disregarded in the selection step. However, as the polarity of the coefficients Cmax, Cmax-1, . . . , Cn may be disregarded in the selection step, the resulting sparse array of coefficients will include the initial polarity of each of the N maximal coefficients so as to properly convey the energy distribution of the detected AP. In some embodiments, the method 900 may have a step of normalizing the N maximal coefficients of the array between the position unity and the negative unity, i.e., between −1 and +1. The normalization can be performed by dividing each one of the Cmax, Cmax-1, . . . , Cn coefficients by the maximal coefficient Cmax. In some embodiments, the method 900 may have a step of quantizing the coefficients of the array into a string of a given number of bits.
It is envisaged that the controller incorporating the pulse compression module, or the pulse compression module itself, can have a footprint below 5 cm3, below 2.5 cm3 and most preferably below 1 cm3, with a power consumption below 1 mW, preferably below 500 μW and most preferably below 100 μW.
The detected APs are forwarded to the compression module, which can increase the number of recording channels, reduce the power consumption, and increase the transceiver range, while providing a dimensionality reduction to help the classification module. As shown in
More specifically, in the first stage, a Symmlet-2 lifting DWT is performed on each of the detected AP waveforms. The Symmlet-2 lifting scheme diagram is shown on the left-hand side of
The proposed compression module 1000 uses an advantageous sorting tree circuit to find the coefficient having the Nth amplitude (CN). As shown in the middle portion of
During the compression stage, the coefficients greater or equal to CN are retained, normalized, and quantized from 16 to 6 bits, while the other coefficients may be discarded. The position of the retained coefficients are stored inside a 48-bits array. A coefficient normalization is performed by dividing the retained coefficients by Cmax, while a requantization is performed by keeping the 6 MSB of the division. The 16 bit per 16 bit division is performed with a sequential non-restoring division circuit, which yields a simplified implementation. Only Cmax is kept on 16 bits for allowing a resolution equivalent to the original neural data in the AP reconstruction.
Once the detected AP are compressed, the pulse processing device can classify the detected AP into one of a plurality of reference shapes.
At step 1102, reference data are accessed. The reference data typically have a plurality of reference pulse shapes S1, S2, . . . SB, with each reference pulse shape having a sparse array of average coefficients [
At step 1104, a pulsed signal is received. The pulsed signal typically has an array of amplitude values [A1, A2, . . . , AM], such as discussed above. However, in this method, step 1104 includes the generation of a sparse array of instantaneous coefficients [C1, C2, . . . , CN] based on the pulsed signal. As can be understood, in at least some embodiments, the generation of the sparse array may be performed using the method 900 describe above. The instantaneous coefficients may thus be wavelet coefficients at least in some embodiments.
It is noted that the sparse array of instantaneous coefficients can be generated by performing one or more discrete transforms on the amplitude values of the pulsed signal. As such, the number N of instantaneous coefficients is smaller than the number M of amplitude values. It is noted that the number N of average coefficients corresponds to the number N of instantaneous coefficients. As such, the average coefficients and the instantaneous coefficients may be obtained using similar same discrete transforms. For instance, in embodiments where the discrete transform(s) is(are) discrete wavelet transform(s), the instantaneous coefficients are in fact instantaneous wavelet coefficients. An example of a discrete wavelet transform that was found to be satisfactory is the Symmlet-2 discrete wavelet transform. In these types of discrete wavelet transforms, the level 4 Symmlet-2 discrete wavelet transform was found convenient in at least some embodiments.
At step 1106, a plurality of first distances are calculated. Each first distance corresponds to the geometrical distance between the instantaneous coefficients of the sparse array and the average coefficients of a corresponding one of the reference pulse shapes. In other words, geometrical distances separating the sparse array from each one of the reference pulse shapes are calculated. Accordingly, if in some embodiments the reference data incorporates a number B of reference pulse shapes, a number B of distance distances may be calculated in this step. By calculating the first distances, it will become apparent that a minimal one of the first distances identifies which of the reference pulse shapes is closer to the sparse array.
At step 1108, the sparse array of instantaneous coefficients is associated with the closed one of the reference pulse shapes upon determining that the first minimal distance is below a first distance threshold.
Otherwise, the method 1100 can have a step of registering the sparse array of instantaneous coefficients as a sparse array of average coefficients of a new reference pulse shape in the reference data upon determining that the first minimal distance exceeds the first distance threshold.
In some embodiments, the first distances are L1 distances which are calculated by a relation equivalent to the following equation:
d
L1=Σi=1N|xi−
wherein i denotes an integer, N denotes a number of coefficients of the sparse arrays, xi denotes the ith instantaneous coefficients of the sparse array and
In some embodiments, the method 1100 includes a step of updating the average coefficients of the closer one of the reference pulse shapes on the basis of the instantaneous coefficients of the sparse array. By updating the average coefficients of a given one of the reference pulse shapes, the updated reference pulse shape may drift away from the original reference pulse shape. As such, the method 1100 can include a verification step comprising the calculation of second distances between the updated average coefficients of the closer one of the reference pulse shapes and the average coefficients of the other ones of the reference pulse shapes. As for the first distances, the second distances will typically have a second minimal distance identifying a closer one of the other one of the reference pulse shapes. In these embodiments, the method 1100 can include a step of registering the instantaneous coefficients of the sparse array as a sparse array of average coefficients of a new reference pulse shape in the reference data upon determining that the second minimal distance is greater than a second distance threshold.
It is envisaged that the controller incorporating the pulse classification module, or the pulse classification module itself, can have a footprint below 5 cm3, below 2.5 cm3 and most preferably below 1 cm3, with a power consumption below 1 mW, preferably below 500 μW and most preferably below 100 μW.
The following paragraphs describe a specific example implementation of such a method. As discussed above, a major burden for AP classification is the dimensionality reduction step, which consumes time, power, and area. Fortunately, the aforementioned compression module produces a dimensionality reduction at each of the DWT levels. The proposed strategy consists generating a 6×6-bit element array per AP using the level-3 (L3) compressed DWT coefficients. This type of strategy can use ˜3 times less memory compared to the non-compressed coefficients, while negligibly impacting the results (−1.2% classification results, worst simulated case). A block diagram implementing an example of that method is depicted in
V
fed
=V
AP
+V
Noise, (2)
where VAP is a noiseless AP waveform, and VNoise represents an additive noise array. The Symmlet-2 DWT has a major advantage of being an orthonormal transformation. A property of such a transformation is that a Gaussian white noise remains Gaussian under an orthogonal transformation. Thus, if VNoise is fed at the input of the Symmlet-2 DWT module, each level will produce a noise array with a scaled standard-deviation compared to the original noisy array. The Symmlet-2 DWT of
V
L3(z)=[G(z){circle around (*)}[H(z){circle around (*)}[H(z){circle around (*)}Vfed(z)]↓2]↓2]↓2, (3)
where ↓2 represents a downsampling by 2 operation, {circle around (*)} is a convolution operation, and the filters H(z) and G(z) are expressed by:
H(z)=H5[H2+(H1H2−1)z−1+(1−H3)z−2+H1(1−H3)z−3]
G(z)=H6[−H2+(1−H1H2)z−1+H3z−2+H1H3z−3], (4)
where H1-H6 are the filter coefficients and scaling factors of the Symm-2 DWT. Computing the amplitude of these filters at π/2 can find the gain at each DWT level:
meaning that if the DWT input is VNoise, the L3 output array (VL3,N) will also be Gaussian with an amplitude gain of 1.28, and a standard deviation 1.28 times greater than VNoise. Thanks to the adaptive threshold scheme provided in the AP detector module, we already computed σa of |VNoise|, which relates to the standard deviation of VNoise by the scaling factor √{square root over (1−2/π)}. Thus, an approximated value of the standard deviation of the L3 coefficient (σL3,N) is already available according to VNoise.
The calculation of the L1 distance between the cluster average array and VL3 is influenced by the noise in Vfed, which is reflected as additive noise inside VL3 as stated above. This bias error can be modeled by summing the absolute value of the components of VL3,N. Since the components of VL3,N are assumed to be independent, the standard deviation of the bias error (σe), i.e. the σ of Σn=05|VL3,N(n)|, is equal to √{square root over (1−2/π)}·√{square root over (6)}·σL3,N. Since σL3,N is already known, we set T1 and T2 as multiple of σe, the value of which is:
σe=√{square root over (1−2/π)}·√{square root over (6)}·σL3,N=1.28·√{square root over (6)}·σa≈3.14·σa, (5)
as to reduce the classification errors due to the signal noise.
Once the detected AP are compressed and classified, the result may be used to stimulate the pulse generating entity on the go. For instance,
At step 1302, a probe head is implanted within the pulse generating entity. As discussed above, the probe head can be part of a probe unit communicatively coupled to the controller. The probe head typically has one or more stimulation elements and one or more electrodes. In some embodiments, the stimulation element includes an optical fiber delivering an optical stimulation signal within the pulse generating entity. In some other embodiments, the stimulation element can include an electrode delivering an electrical stimulation signal within the pulse generating entity. The probe head may also incorporate one or more optical fibers which is configured to collect optical signals from the pulse generating entity, when such pulses are optical. In these embodiments, the electrode(s) may be omitted.
At step 1304, the electrode collects a plurality of electrical signals during a given time window. Depending on the embodiment, the time window can extend during at least 100 ms, preferably at least 50 ms and most preferably at least 25 ms.
At step 1306, upon associating at least a threshold number of the electrical signals to a common reference pulse shape, for instance using the method 1100 of
Accordingly, as the pulse generating entity is stimulated with the same stimulation signal over and over again whenever a few electrical signals of the same types are being detected within the same time window, the behaviour of the pulse generating element can be conditioned. In some embodiments, the rat's behaviour may be rewarded or punished with a given stimulation signal each time it is detected that the rat thinks or does something that triggers the firing of the neuron(s) surrounding the electrodes of the probe unit. As such, the stimulation signal can be associated with an expected reaction of the pulse generating entity, so that the pulse stimulation module can condition the pulse generating entity to react according to the expected reaction upon a corresponding stimulation.
As such, in some embodiments, the stimulation signal may be selected on the basis of the detected common reference pulse shape. For instance, a first stimulation signal may be used when the detected common reference pulse shape is identified to be a first reference pulse shape, a second stimulation signal may be used when the detected common reference pulse shape is identified to be a second reference pulse shape, and so forth. In these embodiments, the first and second stimulation signals may differ from one another, in order to properly condition the pulse generating entity. Differences in these stimulation signals can be provided in terms of amplitude, frequency, pulse shape and/or color when the stimulation signals are optical stimulation signals.
In some embodiments, the given time window can be modified on the go. The given time window can even be slid over the duration of a received raw signal, with the compression and classification modules continuously compressing and classifying any AP detected within the given time window at all times, in some embodiments.
It is envisaged that the controller incorporating the pulse stimulation module, or the pulse stimulation module itself, can have a footprint below 5 cm3, below 2.5 cm3 and most preferably below 1 cm3, with a power consumption below 1 mW, preferably below 500 μW and most preferably below 100 μW.
A CL link can be established between the stimulator and the neural recording circuit of the mixed-signal SoC through the ND-IC. The FPGA is counting the number of detected APs in real time within a sliding time window and with respect to their respective cluster associations (i.e. classification) established by the classification module inside the ND-IC. Each AP-to-cluster association can be set to trigger a stimulation pattern after a predetermined amount of occurrences found within a sliding time window. The duration of the sliding window can be configured to target numerous recognizable firing patterns, like AP bursts of varying lengths, while the stimulation patterns, i.e. number of pulses, pulse width, and the stimulation channel, are also configurable.
The CL scheme, whose diagram is shown in
Following the preliminary validation of the system, we performed CL optogenetic stimulation with a freely-moving mouse expressing ChR2-mCherry. In this experiment, the base station was placed beside the animal cage, approximately 1.5 feet away from the animal. The threshold gain was set to 4.2, the AP CR was set to 4.17, the maximum number of clusters to five, and the feedback stimulation was set to 1× pulse of 10 ms (20 mA flowing through the LED). The CL algorithm was configured to trigger when 6 APs belonging to cluster 1 were found within a 150-ms time window. This configuration was selected after manually looking at close successive APs belonging to the same cluster. This simple approach was used to validate the system in freely-moving animals. However, further analysis of the neural bursting activity may be required to find the optimal configuration.
As depicted in
C
i(n)=Ci(n−1)+(VL3,i(n)−Ci(n−1))/26, (6)
where Ci is the ith element of the cluster average array C and VL3,i is the ith element of the new array VL3. Equation (5) is computed using only simple bit shifting and addition/subtraction operations. Then, the FSM computes the L1 distance between the updated array C and all the other cluster average arrays. If two clusters get too close to each other (i.e. Dmin2<T2), they are merged together by taking the average of the two arrays. Then, Nactive is decremented, and the FSM reorders the cluster averages stored in the SRAM. At worst, forty clock cycles are required to complete a classification step, which yields a minimal operating frequency of 40 kHz to handle 10 channels, assuming a maximal firing rate of 100 AP/s.
The integrated headstage and the ND-IC micrograph are shown in
The following paragraphs present simulation results of the proposed AP detector, and a comparison with other detection techniques. For these tests, we generated synthetic neuronal signals built using real, previously-recorded AP waveforms. These signals were designed to have a non-constant firing rate and a realistic SNR by adding both white Gaussian noise and neuronal noise. The SNR is measured as follows:
SNR=10·log(σAP2/(σnoise2+σneuronal2)), (7)
where σAP2 is the mean variance of the APs, σnoise2 is the variance of the added neural noise and σneuronal2 is the mean variance of the neuronal noise.
We compared the absolute value operator used with the MAD threshold (MAD1, δ=median{|x|}/0.6745), the MAD threshold windowed (MAD2), the RMS threshold windowed and the NEO operator with the MAD threshold. Both windowed algorithms are calculated over a window of 50 ms.
CF=ω1·TP+ω2·FP+ω3·Ai/Aj+ω4·Pj/Pi, (8)
where ω1,2,3,4 are the weight (1, 1, 0.025 and 0.025 respectively), Ai and Pi are the synthesized estimated circuit area and estimated dynamic power consumption, respectively, of the algorithm being tested, while Aj and Pj represent the same parameters for the other algorithm. Post-synthesis power and area estimations (using Synopsis) give 30 nW (Fclk=20 kHz) and 0.013 mm2 respectively for the proposed algorithm, while similar estimations using a 0.13-m process yield 50 nW (Fclk=20 kHz) and 0.021 mm2. Higher area and power consumption for NEO were predictable, since it requires a minimum of two extra multiplications. The CF results are presented in
A signal-to-noise distortion ratio (SNDR) analysis using in vivo collected AP waveforms is provided.
The following presents the measured results of the proposed classification algorithm when compared to other sorting techniques. For the first tests, we used readily available synthetic neural signals built using real AP waveforms. This public neural data bank is used to benchmark the Waveclust off-line neural sorting software, making it perfectly suited to benchmark our algorithm. We used 20 datasets, each of which encompass, on average, 3,400 different AP waveforms belonging to up to three clusters per set. Most of the datasets include overlapping AP, adding an extra level of difficulty.
The proposed dimensionality reduction technique is compared with 1) the more computationally-intensive principal component analysis (PCA) (w/ three components) as a reference (used as ground truth), 2) with the discrete derivative (DD) (using 10 coefficients found with the Lillifor test for normality), and 3) with a DWT algorithm based on the Haar mother wavelet (which is the simplest and most popular mother wavelet). The dimensionality reduction for the Symmlet-2 and for the Haar DWT are validated using the L3 and L4 coefficients. We used the same K-means classification algorithm to benchmark all the dimensionality reduction techniques.
The power breakdown of the ND-IC is depicted in
The headstage was validated in vivo within two experiments, the first involving an anesthetized Long-Evans rat, and the second a freely-moving mouse. The first experiment demonstrated the system's ability to detect, compress, sort, and generate CL trigger signals (without feedback optical stimulation) in vivo. Following good preliminary results, the second experiment demonstrated the CL operation of the headstage with a freely-moving mouse.
For the preliminary in vivo trials, a Long-Evans rat was anesthetized with ketamine/xylazine solution. A glass micropipette (5-μ tip) filled with saline solution was lowered in the LD brain region of the thalamus (4.5-5 mm depth). For the freely-moving in vivo trials, a B6SJLF1/J mouse (Jackson Laboratory, USA) was injected with 300 nL of AAV5-mDlx-ChR2-mCherry-Fishell-3 (Plateforme d'Outils Moléulaires, Canada; titre 2.0E13 GC/mL), in the PL region of the medial prefrontal cortex (1.80 AP; 0.30 ML and −1.70 DV from Bregma) followed by an implantation of a detachable optrode (Doric Lenses, Canada), consisting of one optical fiber (200-m module; 0.66 NA) and four Tungsten microelectrodes (50-m flat tip). It should be noted that the ChR2-mCherry stimulation will result in the activation of the interneurons, an inhibitory effect is therefore expected. The recordings were carried out seven months after the viral injection, so the animal was able to fully recover from the surgical procedure and to adopt a normal behaviour with the headstage in place. All protocols were performed in accordance with guidelines from the Canadian Council on Animal Care.
In these experiments, the threshold gain was set to 3.5, the AP CR was set to 4.17 and the maximum number of clusters was set to five. As shown in
Following the preliminary validation of the system, we performed CL optogenetic stimulation with a freely-moving mouse expressing ChR2-mCherry. In this experiment, the base station was placed beside the animal cage, approximately 1.5 feet away from the animal. The threshold gain was set to 4.2, the AP CR was set to 4.1, the maximum number of clusters to five, and the feedback stimulation was set to 1× pulse of 10 ms (20 mA flowing through the LED). The CL algorithm was configured to trigger when 6 APs belonging to cluster 1 were found within a 150-ms time window. This configuration was selected after manually looking at close successive APs belonging to the same cluster. This simple approach was used to validate the system in freely-moving animals. However, further analysis of the neural bursting activity may be required to find the optimal configuration.
After this experiment, three validation experiments were performed. The first validation involved the same animal and a commercial Fi-Wi optogenetic system from Doric Lenses, Canada.
Stimulation artifacts are visible in
The AP automatically sorted by the ND-IC are shown compared to the same AP sorted off-line by a PCA and K-means in
We tested the adaptive threshold algorithm in vivo by simultaneously transmitting the threshold calculated inside the headstage to the base station along with the raw recorded signal (SNR ≈6.8 dB).
The proposed headstage and ND-IC are compared to recently published systems and experimental settings for either CL optogenetics, optogenetics with neural recording or CL electrical stimulation. As illustrated, the proposed wireless headstage has features comparable to complex wired PC-based CL optogenetics settings. The headstage calculates its CL optogenetic triggers based on the AP classification, and also on the AP bursting, which are two essential features for performing neural decoding. This contrasts with simple trigger solutions based on AP detection, PID controller based on the LFP energy or open-loop optogenetic wireless systems. The proposed ND-IC integrates more features (detection, compression, and classification) than the other reported systems. Most state-of-the-art CL optogenetic systems are based on simplistic feedback algorithms, and do not transmit the neural data wirelessly for providing live or post-experimental analysis. In contrast, the proposed IC is the only solution that performs AP detection and AP compression to further reduce the amount of data to transmit, which can monitor all the 10 neural channels simultaneously. Moreover, the proposed headstage has the lowest reported weight with the battery (3.0 g), which is critical to enable experiments with small freely-moving rodents. Conversely, recent publications only present ICs that are not integrated within fully working systems, and only tested in vivo with anesthetized animals. To the best of our knowledge, we have reported the first integrated circuit for CL optogenetics demonstrated in vivo within freely-moving animal trials. Future works will focus on integrating the ND-IC, the SoC, the CL algorithm and a controller to interface with the external wireless transceiver in the same CMOS chip, to reduce further the size and power consumption.
We presented a miniature wireless electro-optic headstage that is the first attempt towards complex CL optogenetics in the brain of freely-moving rodents. The headstage is based on a custom 0.13-m ND-IC than can detect, compress, and sort the neural signals on-the-fly over 10 channels in parallel without supervision, enabling a CL optogenetic strategy in situ. The ND-IC can detect the APs using an adaptive threshold, compress the APs using a DWT-based algorithm, and automatically classify the APs by reusing the sub-products of the compression and detector modules. The headstage can trigger complex CL optical stimulation patterns using the AP classification information along with their time occurrence within a sliding time window. Measurement and simulation results show that the ND-IC can detect, compress, and sort the AP with remarkable accuracy. The electro-optic headstage and the ND-IC have been validated in vivo in the brain of a rat and of a freely-moving mouse expressing ChR2-mCherry. The results show that our system works well within an in vivo experimental setting with a freely moving mouse.
As can be understood, the examples described above and illustrated are intended to be exemplary only. The scope is indicated by the appended claims.