Method and device for detecting a neural response in a neural measurement
11337658 · 2022-05-24
Assignee
Inventors
Cpc classification
A61B5/4848
HUMAN NECESSITIES
G06F2218/00
PHYSICS
A61B5/7282
HUMAN NECESSITIES
A61B5/7246
HUMAN NECESSITIES
A61B5/6846
HUMAN NECESSITIES
A61B5/24
HUMAN NECESSITIES
International classification
A61B5/00
HUMAN NECESSITIES
A61B5/24
HUMAN NECESSITIES
Abstract
A method for processing a neural measurement obtained in the presence of artifact, in order to detect whether a neural response is present in the neural measurement. A neural measurement is obtained from one or more sense electrodes. The neural measurement is correlated against a filter template, the filter template comprising at least three half cycles of an alternating waveform, amplitude modulated by a window. From an output of the correlating, it is determined whether a neural response is present in the neural measurement.
Claims
1. A method for processing a neural measurement obtained in a presence of artifact, in order to detect whether a neural response is present in the neural measurement, the method comprising: obtaining a neural measurement from one or more sense electrodes; at a first time offset, correlating the neural measurement against a first filter template to produce a first measure m1, the first filter template comprising an alternating waveform of a first phase; at the first time offset, correlating the neural measurement against a second filter template to produce a second measure m2, the second filter template comprising an alternating waveform of a second phase 90 degrees offset to the first phase; at a second time offset, being at a non-integer multiple of 180 degrees offset from the first time offset, correlating the neural measurement against the first filter template to produce a third measure m3; at the second time offset, correlating the neural measurement against the second filter template to produce a fourth measure m4; and processing m1 to m4 to detect whether a neural response exists in the neural measurement.
2. The method of claim 1 wherein the first filter template is anti-symmetric so as to create an imaginary DFT output, while the second filter template is symmetric so as to create a real DFT output.
3. The method of claim 1 wherein the second time offset is offset by 90 degrees or 270 degrees out of phase from the first time offset.
4. The method of claim 1 wherein the first filter template comprises four half cycles of a first alternating waveform and the second filter template comprises four half cycles of a second alternating waveform 90 degrees out of phase with the first alternating waveform.
5. The method of claim 1 wherein the first filter template and second filter template are amplitude modulated by a triangular window.
6. The method of claim 1 wherein only a single point of a correlation is calculated.
7. The method of claim 6 wherein the single point of the correlation is calculated at a predefined optimal time delay.
8. The method of claim 7, further comprising determining the predefined optimal time delay when a signal to artifact ratio is greater than one, at which a first point or a single point of a cross-correlation between the neural measurement and a filter template should be produced, by: at an approximate time delay between the neural response and the filter template, computing real and imaginary parts of a fundamental frequency of a DFT of the neural measurement; calculating a phase defined by the real and imaginary parts; relative to a fundamental frequency of the filter template, calculating a time adjustment needed to change a calculated phase to pi/2; and defining the predefined optimal time delay as being the sum of an approximate time delay and the time adjustment.
9. The method of claim 7 further comprising determining the predefined optimal time delay by: at the first time offset, correlating the neural measurement against a third filter template to produce a fifth measure m5, the third filter template comprising an alternating waveform at double the frequency of the first filter template and of a third phase; at the second time offset, correlating the neural measurement against the third filter template to produce a sixth measure m6; and determining from m5 and m6 a decay in artifact between the first time offset and the second time offset.
10. The method of claim 7 wherein the predefined optimal time delay is recalculated prior to every attempted detection of a neural response.
11. The method of claim 7 wherein the predefined optimal time delay is recalculated in response to a detected change in a user's posture.
12. A device for processing a neural measurement obtained in a presence of artifact, in order to detect whether a neural response is present in the neural measurement, the device comprising: measurement circuitry for obtaining a neural measurement from one or more sense electrodes; and a processor configured to: at a first time offset, correlate the neural measurement against a first filter template to produce a first measure m1, the first filter template comprising an alternating waveform of a first phase; at the first time offset, correlate the neural measurement against a second filter template to produce a second measure m2, the second filter template comprising an alternating waveform of a second phase 90 degrees offset to the first phase; at a second time offset, being at a non-integer multiple of 180 degrees offset from the first time offset, correlate the neural measurement against the first filter template to produce a third measure m3; at the second time offset, correlate the neural measurement against the second filter template to produce a fourth measure m4; and process m1 to m4 to detect whether a neural response exists in the neural measurement.
13. The device of claim 12 wherein the first filter template is anti-symmetric so as to create an imaginary DFT output, while the second filter template is symmetric so as to create a real DFT output.
14. The device of claim 12 wherein the second time offset is offset by 90 degrees or 270 degrees out of phase from the first time offset.
15. The device of claim 12 wherein the first filter template comprises four half cycles of a first alternating waveform and the second filter template comprises four half cycles of a second alternating waveform 90 degrees out of phase with the first alternating waveform.
16. The device of claim 12 wherein the first filter template and second filter template are amplitude modified by a triangular window.
17. The device of claim 12 wherein the processor is further configured to calculate only a single point of a correlation.
18. The device of claim 17 wherein the processor is further configured to calculate the single point of the correlation at a predefined optimal time delay.
19. The device of claim 18, wherein the processor is further configured to determine the predefined optimal time delay when a signal to artifact ratio is greater than one, at which a first point or a single point of a cross-correlation between the neural measurement and a filter template should be produced, by: at an approximate time delay between the neural response and the filter template, computing real and imaginary parts of a fundamental frequency of a DFT of the neural measurement; calculating a phase defined by the real and imaginary parts; relative to a fundamental frequency of the filter template, calculating a time adjustment needed to change a calculated phase to pi/2; and defining the predefined optimal time delay as being the sum of an approximate time delay and the time adjustment.
20. The device of claim 18 wherein the processor is further configured to determine the predefined optimal time delay by: at the first time offset, correlating the neural measurement against a third filter template to produce a fifth measure m5, the third filter template comprising an alternating waveform at double the frequency of the first filter template and of a third phase; at the second time offset, correlating the neural measurement against the third filter template to produce a sixth measure m6; and determining from m5 and m6 a decay in artifact between the first time offset and the second time offset.
21. The device of claim 18 wherein the processor is further configured to recalculate the predefined optimal time delay prior to every attempted detection of a neural response.
22. The device of claim 18 wherein the processor is further configured to recalculate the predefined optimal time delay in response to a detected change in a user's posture.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) An example of the invention will now be described with reference to the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
DESCRIPTION OF THE PREFERRED EMBODIMENTS
(19)
(20)
(21) The evoked CAP measurements in this embodiment are made by use of the neural response measurement techniques set out in International Patent Publication No. WO2012/155183.
(22)
(23)
(24)
(25) It is noted that when sampling at 10 kHz, for example, 20 samples will be obtained in a 2 ms window, so that to determine the entire cross correlation will require 400 multiply/add operations. Accordingly, rather than calculating the entire cross-correlation between a measured neural response and the filter template, the present embodiment further provides for calculation of only a single point of the correlation as the output 316 of detector 300, as a single point requires only 20 samples when sampling a 2 ms window at 10 kHz. Noting that the arrival time of the neural response, or its position within the neural measurement 302, is not known a priori, it is necessary to determine an optimal time delay or offset between the neural measurement and the template filter, at which the single point of the correlation should then be calculated. The aim is to calculate the single point at the peak of the curve 504, and no other. To this end, the present embodiment efficiently determines the optimal time delay, by noting the following.
(26) The DFT is defined by:
(27)
(28) In equation (1), and in the rest of this document, frequency-domain signals are represented by capital letters, and time-domain signals using lower-case. When using the DFT for spectral analysis, it is usual to multiply the data by a window W(n) so this becomes:
(29)
(30) This can be expressed in traditional magnitude and phase terms where the magnitude of the windowed DFT term is
|X′.sub.k|=√{square root over (Re(X′.sub.k).sup.2+Im(X′.sub.k).sup.2)} (3)
and the phase of the windowed DFT term is
(31)
(32) The hardware 600 used to compute one term of X′.sub.k is illustrated in
(33)
it is noted that detector 300 using the filter template 304 (
(34) This also provides insight into what happens as the time delay is adjusted during a clinical fitting procedure, as shown in
(35) When considering the entire cross correlation as the evoked response slides across the window (
(36) Such embodiments may be particularly advantageous as compared to a clinical process requiring exploration of the varying delays in order to find a peak
(37) The present embodiment further incorporates the third and fourth aspects of the invention, and recognises that the artifact 506 can be well modelled as being a sum of two exponentials, of differing time constant. Each exponential component has a voltage and a time value, leading to
(38)
where υ.sub.i and τ.sub.i are constants for each component.
(39) If
e(t)=ν exp(−t/τ) (7)
then we can consider its windowed DFT E′.sub.k, for which each term will have a magnitude and phase, and the term E′.sub.2 can be calculated with the complex correlator 600 of
(40) If we take some signal e.sup.−T/τ and shift the point in the signal at which the correlation is performed by some arbitrary time T, since
e.sup.−(t+T)/τ=e.sup.−t/τe.sup.−T/τ
e.sup.−(t+T)/τ=c.Math.e.sup.−t/τ (8)
where c is some constant.
(41) Thus, the phase of the DFT terms of a single exponential depend on the time constant of the exponential, as shown in
(42)
(43)
(44) When modelling the artefact as a sum of two exponential terms, it has been determined from measurements of actual artefact that the time constant τ.sub.1 of the first (slow) exponential term is typically in the range 300 μs to 30 ms, more typically 500 μs to 3 ms and most commonly about 1 ms, and that the time constant τ.sub.2 of the second (fast) exponential term is typically in the range 60-500 μs, more typically 100-300 μs, and most commonly about 150 μs.
(45) The method of this embodiment, utilising the third and fourth aspects of the invention, relies on making two complex measurements of the evoked response, at points in time separated by one quarter of a cycle, as shown in
(46)
(47)
(48) Knowing k also allows the evaluation of τ, and of the fast artifact exponential:
(49)
(50) To find the voltage of the fast exponential term for the artifact, one can further calculate the DFT of the exponential which is what would be expected from the detectors for an exponential input of that time constant, normalized to 1.0:
(51)
(52) Then, an estimation of the fast artifact term is:
(53)
(54) Having calculated the above, it is possible to improve the SAR of the signal by subtracting the estimated exponential, as shown in
(55) A difficulty in implementing this algorithm with measured data is that it measures two signals at once, namely the evoked response and the fast exponential, and each forms a noise source for the other. Usually, the phase of the evoked response is not known exactly, and this introduces errors into
(56) When the relative phase (θ) of the evoked response to the sampling window is unknown, the proposal of
(57)
(58) In turn, the five terms a,b,k,θ and c can be found. For some phase θ between the measurement window and the evoked response:
(59)
(60) The phase will change slowly, so once θ is known, it is possible to adjust the delay of the sampling window, and then revert to the four point algorithm of
(61) When considering implementation of the six point technique of
(62)
(63) It is further noted that running the calculation after the evoked response is finished allows the slow exponential to be measured.
(64) The evoked response in the spine (having three phases) takes approximately 1 ms. In embodiments employing a sample rate of 30 KHz or a simple interval of 33 us, the evoked response will take around 30 samples. Consequently in such embodiments the filter template having four phases will comprise approximately 40 tap values, or data points. In alternative embodiments, using an alternative sampling rate or measuring a faster or slower CAP, the length of the filter may comprise correspondingly greater or fewer filter taps.
(65) While the preceding embodiments have been described in relation to a filter template which comprises four half cycles, alternative embodiments of the present invention may nevertheless usefully employ a filter template comprising greater or fewer lobes. The present invention thus recognises that the ideal number if lobes is four. This is in contrast to a two lobe filter, which will have equal first and second lobes and will thus put more emphasis on the early parts of the signal where the signal-to-artifact is worse. Further, a filter with an odd number of lobes does not tend to have good artifact rejection properties. Moreover, if one were to use a six-lobe filter, or higher even-number lobed filter, the window becomes too wide relative to the 3-lobed neural response, and at least half the correlation time would just be looking at noise. Since most of the problematic artifact is in the first two lobes, a 6 lobe filter will tend not to provide better artifact rejection than the four-lobe filter. Four lobes thus provides the optimal trade-off between rejection of artifact and noise gain.
(66) Nevertheless, alternative embodiments of the present invention may usefully employ a filter template comprising greater or fewer lobes. We now describe the mathematical properties of templates of other embodiments of the invention. The term “template” is used to refer to a filter used via correlation to detect an ECAP. A template may be comprised of one or more wavelets or basis functions, or may be derived by some other method, and is configured to preferentially pass an ECAP but preferentially block or be orthogonal to artifact.
(67) That is, an important property of the sinusoidal binomial transform (SBT) is its ability to reject polynomial signals. If an SBT template of order n is used, it will reject all the terms of the Taylor series up to order n.
(68)
(69) It is further to be appreciated that cosine templates of 3, 5 or more lobes can be similarly generated, noting the
(70) The preceding embodiments further describe a filter template built using a triangular window. The triangular window is superior to the Bartlett, Hanning, rectangular and the Kaiser-Bessel for a variety of beta values. The performance of the four-lobe triangular template can be within 2 dB of a matched filter for optimised offset. Nevertheless, alternative embodiments may utilise windows other than the triangular window to useful effect, and such embodiments are thus within the scope of the present invention.
(71) Moreover, while the described embodiments use a single term of the SBT for response detection, the present invention further recognises that there are possible extensions to this method. Therefore, some embodiments of the invention may use multiple identical templates, but shifted in time. Even though these are not orthogonal, a successive approximation method creating a compound template may provide better approximation. Additionally or alternatively, some embodiments may use templates that are a sum of templates of different frequencies, templates of different offset and/or templates of different numbers of lobes.
(72) A benefit of some embodiments of the present invention is that in some embodiments the detector produces an output based on a single neural measurement, without requiring multiple neural measurements to produce a detector output. Such embodiments may thus provide a swift response time of a feedback control loop utilising the detector output.
(73) It will be appreciated by persons skilled in the art that numerous variations and/or modifications may be made to the invention as shown in the specific embodiments without departing from the spirit or scope of the invention as broadly described. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive