Mixed-signal quadratic operators for the feature extraction of neural signals
Abstract
This paper presents design principles for reusing charge-redistribution SAR ADCs as digital multipliers. This is illustrated with an 8-b fully-differential rail-to-rail SAR ADC/multiplier, designed in a 180 nm HV CMOS technology. This reconfigurability property can be exploited for the extraction of product-related features in neural signals, such as energy content, or for the discrimination of spikes using the Teager operator.
Full text
Mixed-signal quadratic operators for the feature extraction of neural signals Manuel Delgado-Restituto, Rafaella Fiorelli, Manuel Carrasco-Robles and Ángel Rodríguez-Vázquez Institute of Microelectronics of Seville IMSE-CNM (CSIC) & University of Seville, SPAIN Email: {mandel, fiorelli, carrasco, angel}@imse-cnm.csic.es Abstract—This paper presents design principles for reusing charge-redistribution SAR ADCs as digital multipliers. This is illustrated with an 8-b fully-differential rail-to-rail SAR ADC/multiplier, designed in a 180 nm HV CMOS technology. This reconfigurability property can be exploited for the extraction of product-related features in neural signals, such as energy content, or for the discrimination of spikes using the Teager operator. I. INTRODUCTION Closed-loop neural implants are a promising solution for the treatment of neurological diseases [1], [2], as well as for the implementation of sensori-motor brain-machine interfaces [3]. Neural signals captured by the implant are internally processed and, based on the analysis, stimulation patterns are triggered either for ameliorating the impact of the disease (e.g., by stopping uncontrolled epileptic seizures [4]) or for restoring lost senses after a neural injury. Signal processing in neural implants should, on the one hand, reduce dimensionality and extract features able to provide clinically relevant information [5], [6] and, on the other, exhibit low power consumptions to not exhaust the presumably short energy resources available. Quadratic operators are often used in the calculation of neural features. For instance, the accumulated energy in spectral bands, the variance of amplitude distributions, the auto- or cross-correlation of neural recordings or the calculation of nonlinear interdependences are measures typically used for the univariate or multivariate analysis of local field potentials and EEGs [7]. Similarly, the Teager operator, also called Nonlinear Energy Operator (NEO), which also relies on the multiplication of neural samples, is an effective procedure for the detection of neural spikes [8]. These quadratic operators can be implemented in analogue domain by exploiting translinear principles [9], or in digital domain at the price of an increased computation complexity due to the use of digital multipliers [10]. Indeed, the use of look-up tables after data rounding has been proposed to alleviate the computational burden of binary multiplications [11]. Herein we propose an alternative mixed-signal approach for the multiplication of digitized neural samples. The design principle is based on reusing the analog-to-digital conversion process (assuming charge-redistribution SAR ADCs) to also compute quadratic terms. In doing so, the presented approach requires little extra hardware thus leading to area-efficient solutions. The paper is organized as follows. Section II describes (a) VDAC,L Ck+1 CkCk-1 FD FDFDFD xk+1 xkxk-1 (b) VDAC,S Cj+1 CjCj-1 FD FDFDFD yj+1 yjyj-1 Vref Vref Vref Vref Vref Figure 1. Voltage loading (a) and voltage scaling (b) processes. the operations of voltage loading and voltage scaling in capacitor arrays which are behind the mixed-signal multiplication concept. Then, Section III presents an 8-b differential SAR ADC/multiplier based on those operations. Section IV shows two examples of quadratic operator implementations using the described circuit. After illustrating in Section V the simulated performance of the ADC/multiplier, Section VI concludes the paper. II. OPERATIONS IN CAPACITOR ARRAYS Mixed-signal multiplication of two digital vectors with a charge-redistribution ADC can be accomplished by generating a voltage proportional to the product of the two multiplicands in the capacitor array of the ADC and then converting that voltage with a conventional binary search algorithm. The synthesis of the product voltage can be easily implemented, without relying to any external block, by means of two simple digital-to-analog operations in the capacitor array. Such operations, denoted as voltage loading and voltage scaling, are applied sequentially and require one single clock cycle each. Voltage loading consists on programming the switching nodes of the capacitor array according to the bits of a digital word X={xk}. The operation is illustrated in Fig. 1(a), where bottom-plate programming is assumed (of course, other configurations are also possible). When ΦD= 1, the top plates of the capacitors in the array are all connected to Vref , whereas the bottom plates are connected to ground or Vref , depending on the xkvalues. Afterwards, in the holding phase (ΦD= 0), the top plates of the capacitors are disconnected from Vref , the bottom plates are connected to ground, and the charge is redistributed in the array to 978-1-5090-2959-4/16/$31.00 2016 IEEE 368
C s0 FL x1 F0 + FC b1FS FDFD 2C s1 FL x2 F0 + FC b2FS FDFD 4C s2 FL x3 F0 + FC b3FS FDFD 8C s3 FL x4 F0 + FC b4FS FDFD 16C s4 FL x5 F0 + FC b5FS FDFD 32C s5 FL x6 F0 + FC b6FS FDFD 64C s6 FL x7 F0 + FC FS FDFD FD Vin+F0 C s0 FL x1 F0 + FC b1 FS FDFD 2C s1 FL x2 F0 + FC b2 FS FDFD 4C s2 FL x3 F0 + FC b3 FS FDFD 8C s3 FL x4 F0 + FC b4 FS FDFD 16C s4 FL x5 F0 + FC b5 FS FDFD 32C s5 FL x6 F0 + FC b6 FS FDFD 64C s6 FL x7 F0 + FC FS FDFD FD Vin+ F0 SAR Logic B B VDAC,D VDAC,U Caux y7 FL x0 F0 + FC FS FDFD Caux Caux y7 FL x0 F0 + FC FS FDFD Caux y7 = 0 s j = y j , j =0,…,6 y7 = 1 s j = y j , j =0,...,6 z7+b7 z7+b7 z7 = x7Åy7 Figure 2. SAR ADC multiplier architecture. clk F0 FL FS FD FC A/D conversion Multiplication Figure 3. Timing diagram. generate VDAC,L =Vref ·Pxk·Ck/CT, where CTis the total capacitance of the array. Once the voltage VDAC,L has been stored in the capacitor array, the next operation is to scale that voltage according to a second digital word Y={yj}. This is done by selectively discharging part of the capacitors in the array. Fig. 1(b) illustrates the procedure. When ΦD= 1, the top plates of the capacitors are all connected to Vref . Contrarily, the bottom plates are only connected to Vref if the associated bit yj= 0 (capacitor Cj discharges), otherwise the bottom plate is left open (capacitor Cjpreserves the previously stored charge). In the holding phase (ΦD= 0), all the bottom plates are connected to ground, the top plates are disconnected from Vref , and again the charge is redistributed through the array. This gives rise to a voltage VDAC,S =VDAC,L ·Pyj·Cj/CTwhich, assuming the capacitors of the array are binary weighted, represents an analogue version of the dot product Z=X·Ynormalized between ground and Vref . As metioned, the actual vector Z can be obtained after a conventional A/D conversion process. It is worth observing the above operations follow similar principles as the Multiplying SAR ADC proposed in [12]. However in this case, both multiplicands are binary words what open vistas for the implementation of quadratic operators with digital vectors, as will be shown in Section IV. III. SAR ADC MULTIPLIER Figure 2 shows a possible implementation of the mixedsignal domain multiplier concept presented in Sec. II. The architecture is based on the monotonic capacitor switching procedure described in [13], although the strategy could be likewise applied to other switching schemes. The multiplier is built upon an 8-b fully-differential SAR ADC with two binary weighted arrays of capacitors which are constructed by shunting replicas of a unit instance with capacitance C. In total there are 28+ 2 unit capacitors, including the four auxiliary capacitors (Caux =C) employed for loading the first multiplicand. The shaded switch arrangements in Fig. 2 and the associated driving circuitry constitute the extra hardware required for adding multiplication functionality to the ADC. The circuit has three input ports: one analog, for data conversion; and two digital, for multiplication. Fig. 3 shows the timing diagram of the circuit when both operations are chained. The analog port is used for sampling the differential input voltage Vin in the capacitor arrays. During phase Φ0, the top plates of the capacitors arrays are connected to terminals V+ in and V− in , respectively, while the bottom plates of all capacitors, no matter the array, are connected to Vref . After sampling, the conversion process starts (ΦC= 1) and the comparator decides the most significant bit, b7, without switching any capacitor. At the next clock cycle, the largest capacitor of the array with higher potential (upper array if b7= 1; bottom array, otherwise) is switched to ground while the equivalent capacitor in the other array remains connected to Vref . After a new comparison, bit b6is decided. This process repeats until the LSB is obtained. Including the sampling phase, the overall procedure requires 9 clock cycles. Digital ports are used for parallel uploading the words X and Yto be multiplied. Following, the concepts presented in Sec. II, this is done in two steps, one for loading Xand the other for scaling the charge stored in the capacitor arrays according to the bits of Y. Once the proper VDAC value is generated, a conversion process finally obtains Z=X·Y. The loading and scaling procedures are illustrated in Fig. 4. During the first half (ΦD= 1) of the Xloading phase (ΦL= 1), the top plates of the capacitors in both arrays are shorted to ground and the bottom plates are connected to the bits of X(top array) or the bits of X(bottom array), as illustrated in Fig. 4(a). Note that the auxiliary capacitors in both arrays are arranged so as to provide an equivalent capacitance C/2. Afterwards, when ΦD= 0 [see Fig. 4(b)], all the bottom plates are connected to Vref , the top plate switches are open, and charge is redistributed. Taking advantage of the differential circuit structure and 369
VDAC,D VDAC,U x7 64C x6 32C x5 16C x4 8C x3 4C x2 2C x1 CC/2 64C 32C 16C 8C 4C 2C C C/2 x6x5x4x3x2x1x0 64C 32C 16C 8C 4C 2C C C 64C 32C 16C 8C 4C 2C C C (a) (b) VDAC,D VDAC,U VDAC,U 64C 32C 16C 8C 4C 2C C C 64C 32C 16C 8C 4C 2C C C 64C 32C 16C 8C 4C 2C C C (c) (d) VDAC,D VDAC,U s6s5s4s3s2s1s0 VDAC,D 64C 32C 16C 8C 4C 2C C C s6s5s4s3s2s1s0 x7 x7 x0 x7 y7 y7 Figure 4. Specific steps for the multiplication process. the fact that the MSB of Zcan be easily derived beforehand as z7=x7⊕y7, the scaling by Yphase (ΦS= 1) is accomplished in such a way that only the remaining bits of Zare resolved, thus saving a conversion step. To that end, the MSB and the remaining bits of Yare handled differently. As shown in Fig. 4(c), when ΦD= 1, the top plates of the capacitors are shorted to ground and the charge stored in the auxiliary capacitors are either discharged (case y7= 1) or preserved (case y7= 0). Similarly, bits yj, j = 0, ..., 6, are used to cancel or retain the voltages stored in the capacitors of the binary weighted arrays. For y7= 1, the charge in capacitor Cj= 2jCis preserved if the associated bit yj= 1; otherwise, if yj= 0, capacitor Cjis discharged. For y7= 0, the opposite occurs, i.e., yj= 1 implies discharging and yj= 0 implies preserving. At the next step, when ΦD= 0, the charge is redistributed again by restoring the same configuration in Fig. 4(b). Afterwards, a conversion process begins assuming that the MSB is already known. This is illustrated in Fig. 4(d) in which the largest capacitors of the top and bottom arrays are connected to x7or x7, respectively. After 7 conversion steps, the remaining 7 LSBs of vector Zare obtained as follows: if y7= 1, then zj=bj, j = 0, ..., 6; otherwise zj=bj. IV. QUADRATIC OPERATORS A. Running average energy operator The running average energy of a time series {s(n)}is obtained by cumulatively summing the instantaneous energy of that signal according to [7] ED(k) = 1 N·UD(k) = 1 N k(N−D)+D X n=1+(k−1)(N−D) s2(n)(1) Memory Register Write ADC s(n) s2(n) Y X Vin Read ADC Y X Vin s(n-2) c·T s(n) 1 0 j1 j1 j1 jejeCounter j1 & j2 j1 j2 s2(n-1) s(n)·s(n-2) Y[n-1] 0 1 2D Q D Q D Q Vin Vin Counter je j1 j2 j1e j2e je j1e j1e j2e (a) (b) ED(k) Figure 5. Implementation of (a) running average energy and (b) nonlinear energy operators. where Nis the length of the observation window (for simplicity, N= 2mwhere mis a positive integer), Dis the amount of overlap between consecutive windows, nis an integer indicating the time index of {s(n)}, and kis the feature time index. Note that for k > 1,ED(k)updates every N−Dsamples of {s(n)}. Fig. 5(a) shows an implementation of this operator based on the proposed SAR ADC/multiplier. The circuit has two operation modes: analog signal conversion (phase ϕ1= 0) and digital squaring of the previously quantized signal s(n) (phase ϕ1= 1). This latter operation is carried out by feeding back s(n)to both digital input ports of the ADC. The squared values s2(n)are cyclically stored in an N- sample memory at instances of the pulse train ϕe. This is done by first retrieving and then replacing the memory positions previously occupied by the instances s2(n−N). A counter, running at the same rate as ϕe, addresses the read/write positions. The samples stored in the memory are accumulated in an output register to provide the ED(k)values. Two cases can be distinguished. For k= 1, the samples s2(n),n= 1, ..., N, are summed in the accumulator as soon as they are stored in the memory. For k > 1, the digital word in the register is updated by solely adding the difference s2(n)−s2(n−N). The values of the running average energy ED(k)are obtained by shifting right by mbits the values stored in the register. B. Nonlinear energy operator The nonlinear energy operator of a time series {s(n)}is defined as [8], [10] Ψ(n−1) = s2(n−1) −s(n)·s(n−2) (2) which can be easily implemented by the circuit of Fig. 5(b). In this case, the SAR ADC/multiplier has three operation modes, one for converting the input signal into the vector s(n), another for calculating the square term in (2) (phase ϕ1= 1), and a third term for calculating the last product in (2) (phase ϕ2= 1). As long as different samples of the input signal are involved in the NEO operator, digital registers are used to store s2(n−1) 370
and s(n−2). When both terms in (2) are available, a simple substractor obtains the operator value. V. SIMULATION RESULTS The SAR ADC/multiplier described in Sec III has been sized in a 0.18 µm HV CMOS technology. Transistor-level simulations of the circuit performing as ADC preliminary show 7.8-b ENOB at 4 kS/s and consumes about 10nW. Fig. 6 illustrates the performance of the circuit as multiplier, running at the same sampling frequency of 4 kS/s. All possible Xand Ycombinations have been formed and the product deviations from the ideal Zvalue have been computed. As can be seen, errors remain below ±1bit and, most often, no errors occur. The SAR ADC/multiplier has been also evaluated when embedded in the running average energy operator decribed in Sec. IV.A. The digital circuitry around the multiplier has been modeled in VHDL. The sampling frequency of the SAR ADC/multiplier has been scaled down to 512 S/s, the observation window is N= 128 samples and the average energy updates with every new sample, i.e., D=N−1. Fig. 7 (top) show the signal used as testbench. It is a scalp EEG signal sampled at 256 S/s available in the CHB-MIT Scalp EEG Database [14]. Concretely, the signal is a 70 seconds beta-band filtered sequence recorded from channel 9 (FP2-F4) of a patient (11 years, female). This time interval includes an epilepsy episode that according to annotations happens during the interval [1467, 1494] seconds. Fig. 7 (bottom) compares the theoretical and simulated results obtained in the calculations. The maximum deviation between both plots only amounts 1 LSBs and, hence, the proposed circuit could be suitably used in the detection of epileptic seizures. Proper operation with similar error levels were also observed in the electrical simulation of the NEO operator of Fig. 5(b). VI. CONCLUSIONS This paper has presented the design principles of a noncoventional approach for the multiplication of digital vectors by reusing charge-redistribution SAR ADCs. The concept has been illustrated and verified with electrical simulations of a 8-b fully-differential rail-to-rail SAR ADC/multiplier, sized in a 180 nm HV CMOS technology. Preliminary results indicate that the proposed approach may represent a promising lowarea low-power alternative for the feature extraction of neural signals when quadratic operators are involved. Figure 6. Errors in the multiplication of X and Y. ACKNOWLEDGMENTS This work has been supported by the Ministry of Economy and Competitiveness under grant TEC2012-33634, the ONR under grant ONR N00014141355 and the FEDER Program. REFERENCES [1] G. K. Bergey et al., “Long-term treatment with responsive brain stimulation in adults with refractory partial seizures,” Neurology, vol. 84, no. 8, pp. 810–817, Feb. 2015. [2] J. B. Zimmermann et al., “Closed-loop control of spinal cord stimulation to restore hand function after paralysis,” Frontiers in Neuroscience. Neuroprosthetics, vol. 8, pp. 87:1–8, 2014. [3] S. J. Bensmaia et al., “Restoring sensorimotor function through intracortical interfaces: progress and looming challenges,” Nature Reviews Neuroscience, vol. 15, no. 5, pp. 313–325, May 2014. [4] W.-M. Chen et al., “A Fully Integrated 8-Channel Closed-Loop Neural- Prosthetic CMOS SoC for Real-Time Epileptic Seizure Control,” IEEE J. Solid-State Circuits, vol. 49, no. 1, pp. 232–247, Jan. 2014. [5] J. Yoo et al., “An 8-channel scalable EEG acquisition SoC with patientspecific seizure classification and recording processor,” IEEE J. Solid- State Circuits, vol. 48, no. 1, pp. 214–228, 2013. [6] N. Verma et al., “A micro-power EEG acquisition SoC with integrated feature extraction processor for a chronic seizure detection system,” IEEE J. Solid-State Circuits, vol. 45, no. 4, pp. 804–816, 2010. [7] N. Moghim et al., “Predicting Epileptic Seizures in Advance,” PLoS ONE, vol. 9, no. 6, p. e99334, Jun. 2014. [8] S. Gibson et al., “Technology-Aware Algorithm Design for Neural Spike Detection, Feature Extraction, and Dimensionality Reduction,” IEEE Trans. on Neural Systems and Rehabilitation Engineering, vol. 18, pp. 469–478, 2010. [9] F. Zhang et al., “A low-power ECoG/EEG processing IC with integrated multiband energy extractor,” IEEE Trans. Circuits Syst. I, vol. 58, no. 9, pp. 2069–2082, 2011. [10] W. Biederman et al., “A 4.78 mm 2 Fully-Integrated Neuromodulation SoC Combining 64 Acquisition Channels With Digital Compression and Simultaneous Dual Stimulation,” IEEE J. Solid-State Circuits, vol. 50, no. 4, pp. 1038–1047, Apr. 2015. [11] A. Klinefelter et al., “A programmable 34 nW/Channel sub-threshold signal band power extractor on a body sensor node SoC,” IEEE Trans. Circuits Syst. II, vol. 59, no. 12, pp. 937–941, 2012. [12] K. Abdelhalim et al., “915-MHz FSK/OOK wireless neural recording SoC with 64 mixed-signal FIR filters,” IEEE J. Solid-State Circuits, vol. 48, no. 10, pp. 2478–2493, 2013. [13] C.-C. Liu et al., “A 10-bit 50-MS/s SAR ADC With a Monotonic Capacitor Switching Procedure,” IEEE J. Solid-State Circuits, vol. 45, no. 4, pp. 731–740, Apr. 2010. [14] A. L. Goldberger et al., “PhysioBank, PhysioToolkit, and PhysioNet components of a new research resource for complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215–e220, Jun. 2000. (b) (a) Signal (V) -1 -0.5 0 0.5 1 t (s) 1450 1460 1470 1480 1490 1500 1510 1520 0 20 40 60 Simulated Theoretical Annotated seizure 15201460 1480 1500 time (s) 0 1 Error (LSB) Energy (LSB) Figure 7. (a) Scalp EEG signal and (b) running average energy from circuit simulation and theoretical calculation (the inset shows the difference between them). 371