2. Design
The signals at the input of an LNA present a variety of challenges, such as low amplitudes, on the order of microvolts, low frequencies, very close to 0 Hz, or both. The amplifiers for neural recordings found in the literature typically exibit a mid-band gain of 40 dB, with bandwidths ranging from sub-Hz to a few kHz or even a few dozens of kHz [
23,
24,
25,
26,
27,
28,
29,
30,
31,
32].
Figure 2a shows the schematic of the LNA presented in this paper [
32]. This amplifier is composed by an operational amplifier (OpAmp), two pairs of capacitors
C1 and
C2, and a pair of resistors
R2. The internal schematic of the OpAmp, in turn, is presented in
Figure 2b. The OpAmp has a basic configuration with two stages and comprises six PMOS and four NMOS transistors. The PMOS transistors M
1 and M
2 form a differential pair, working as the input stage. The NMOS transistors M
3 and M
4 form an active pair load. The PMOS transistors M
5 and M
7 form the biasing circuit for the input and output stages, respectively. These two PMOS mirror the current
Isd9 of M
9, multiplying it to form
Isd5 and
Isd7. The NMOS M
6 forms a common source amplifier and provides additional gain to the input stage, thereby increasing the total gain of the OpAmp. The PMOS M
8p and the NMOS M
8n act as a resistance in series with the capacitor
CC, creating a dominant pole
fp and ensuring that the OpAmp is unconditional stable.
The calculation of the LNA gain requires the knowledge of the input and feedback impedances
Z1 and
Z2, respectively. These impedances are given by:
The relation of the impedances
Z1 with (
Z1+
Z2), named feedback factor, is given by:
The gain of the LNA can be easily deduced if we consider
VIM= -VIP = Vin/2 (
Figure 2) Since the complete LNA forms a difference amplifier, the voltage
Vout at the output of LNA, is given by:
where
A(s) is the transfer function of the OpAmp. Therefore, the gain of the LNA, i.e., the feedback gain,
Af(
s) is given by:
Normally,
A(
s) can be expressed with a single pole, or at least with a dominant pole close to the origin. However, additional poles must be considered if they exists and are located near the pass-band of the LNA. The one-pole appoximation is a useful and general model, employed here for deducing the feedback gain and to understanding the frequency behavior of the LNA. Taking the example of the existence of only one pole, the OpAmp transfer function
A(s) is given by:
Now, by substituting
A(s) into equation (5), a new expression for the LNA is found:
It must be noted that the transfer function of the LNA has a zero at 0 Hz and two negative poles, which are called
pL = -1/(2
πfL) and
pH = -1/(2
πfH) (
fL and
fH are postive real numbers). If
A0 is such that
A0 >> 1, then, 2
πfpA0 >> 1/(
R2C2), i.e., the gain × bandwidth product (
GBW) of the OpAmp is such that
GBW>>1/(
R2C2), the expression for
Af(s) can be approximated as:
Additionaly, if the two poles
pL and
pH are well spaced between one to each other and assuming that
pL <<
pH, then, the approximated values for
fL and
fH can be found as follows:
and relation (8) can be rewritten as:
For medium frequencies operation, i.e.,
fL << frequency << fH, the LNA gain is then:
which is in accordance with what is stated in literature [
32].
The capacitances C1 and C2 are in the order of pF, therefore, the resistor R2 must be in the order of TΩ, to ensure that the first pole fL=1/(2πR2C2) of Af(s), equation (8), has a value near or lower than 1.0 Hz.
High-value resistors, like R2, can not be implemented in a conventional form in an integrated circuit due to the large area they would occupy.
Pseudo-resistors are a widely recognized method for implementing high-value resistors, as described in references [
33].
Figure 2a also illustrates the implementation of resistors
R2 with pseudo-resistors. Each of these pseudo-resistors employs a series of two PMOS transistors, as detailed in the zoomed section of the figure. It has been found that these pseudo-resistors can reach values in the order of TΩ and occupy an area many orders of magnitude smaller than that of a conventional resistor implementation. These implementations are called "pseudo" because they mimic the behavior of a real resistor when small voltages are applied at their terminals. The red dots at terminal A of the pseudo-resistors
R2 serve to show how these pseudo-resistors connect to the LNA.
To achieve low noise and low power, even using an OpAmp with a simple configuration, the LNA design in this work was done through the use of metaheuristic algorithms, specifically particle swarm and simulated annealing [
34,
35]. To accomplish this task, a framework for transistor sizing and circuit optimization, based on metaheuristics, was applied. The framework requires for its operation a rating score for each design, obtained through electrical simulations. To acquire the design score, an aggregated objective function must be developed that generates a simulation file containing the circuit netlist, device sizes, and simulation commands. The function also triggers an electrical simulation, reads the results, and calculates the score. To carry out this calculation, the relevant circuit attributes are measured and predefined shaping functions.
Figure 3, which reflect desired goals, are applied to the measured values. Finally, the fuction outputs are combined to build the score. Users can choose which shaping function to apply for each attribute result, enabling them to tailor the sizing and optimization to their specific needs. For example, if an attribute must be kept below a certain limit, the function
< d1 d2( ) can be used; if the attribute should be minimized, the function
/ d1 d2( ) is applied.
Objective functions are tailored to specific classes of circuits, such as Voltage Reference Sources, OpAmps, Oscillators, Prescalesr, and neuronal LNAs. Once the objective function of a class is available, the framework will make possible the sizing/optimization of any circuit topology for which a SPICE like parameterized netlist, describing this particular topology, is provided. In Figure 4 is shown part of the parameterized SPICE netlist of the LNA (
Figure 2 presents the circuit described in the netlist). For the netlist, X1, .., X12 are the circuit parameters that provide the device dimensions, and their values will be adjusted in the sizing/optimization process. The level of detail included in the netlist, such as the areas and perimeters of the transistor drain/source, parasitic elements, etc., as well as the knowledge embedded in it, such as the fact that dimensios of M5 and M7 shoud be related to avoid a systematic offset, directly affects the quality of the optimization.
M1 1 in 4 4 pch L='X1*1u' W='X5*1u' AD='X5*1u*Wpadrao/2' PD ='X5*1u Wpadrao'
+AS= 'X5*1u*Wpadrao/2' PS = 'X5*1u + Wpadrao'
M2 3 ip 4 4 pch L='X1*1u' W = 'X5*1u' AD='X5*1u*Wpadrao/2' PD='X5*1u + Wpadrao'
+AS = 'X5*1u*Wpadrao/2' PS = 'X5*1u + Wpadrao'
M3 1 1 vs vs nch L ='X2*1u' W='X6*1u' AD='X6*1u*Wpadrao/2' PD ='X6*1u + Wpadrao'
+M = 'nint(X12)'
M4 3 1 vs vs nch L='X2*1u' W= X6*1u' AD='X6*1u*Wpadrao/2' PD ='X6*1u + Wpadrao'
+M = 'nint(X12)'
M5 4 bias vd vd pch L='X3*1u' W='X7*1u' AD='X7*1u*Wpadrao/2' PD='X7*1u + Wpadrao'
+M = '2*nint(X12)*nint(X8)'
M6 out 3 vs vs nch L='X2*1u' W='X6*1u' AD ='X6*1u*Wpadrao/2' PD ='X6*1u
+Wpadrao'
M7 out bias vd vd pch L = 'X3*1u' W='X7*1u' AD='X7*1u*Wpadrao/2' PD='X7*1u + Wpadrao'
+M= 'nint(X8)'
*** compensation
M8n 3 vd 5 vs nch L ='X4*1u' W ='X9*1u' AD ='X9*1u*Wpadrao/2' PD = 'X9*1u + Wpadrao'
+As = 'X9*1u*Wpadrao/2' Ps ='X9*1u + Wpadrao'
M8p 3 vs 5 vd pch L = 'X4*1u' W = '2*X9*1u' AD = '2*X9*1u*Wpadrao' PD = '2*X9*1u
+Wpadrao' +AS = '2*X9*1u*Wpadrao' Ps = '2*X9*1u + Wpadrao'
Cc 5 out 'X10*1p'
** Bias
M9 bias bias vd vd pch L = 'X3*1u' W = 'X7*1u' AD = 'X7*1u*Wpadrao/2' PD = 'X7*1u
+Wpadrao'
* external bias current
Ibb bias 0 DC '(10^X11)*1u'
Figure 1 Parameterized SPICE netlist for AmOp of
Figure 2. X1, .. X12 are the wanted parameters of the sizing/optmization process.
The framework has already been employed for design of Reference Voltage Sources [
36], OpAmps, LNAs, VCOs, Prescalers [
37], etc. The metaheuristics available in it are genetic algorithms (GA), simulated annealing (SA), particle swarm (PSO), quatum QPSO (QPSO) among others.
In
Figure 5 the operation flux of the framework is detailed. The sizing/optimization process starts with the selection of a circuit class for which an objective function is available. Next, a topology of the specified class is chosen, along with some parameter values (power supply, operation frequency), the goals of the sizing/optimization (power consuption, noise, gain, etc.), the shaping functions applied to each goal, and the search space (minimum and maximum allowed values for circuit parameters to be sized). Finally, a metaheuristic, along with execution conditions (initial solutions, stop condition, etc.) is selected, and the sizing/optimizing process begins. The process will continue until the stop condition is met, and the duration of the process can vary from a few minutes to several hours, depending on factors such as the size and operation of the circuit, the performed simulations, and the stop condition employed. In this work, the number of evaluated circuits was used as the stop condition.
For the design of a circuit, one or more sizing/optimization processes were performed. When multiple processes are applied, they may or may not be independent. In the latter case, the results of the optimization are used as initial conditions for the next.
For the calculation of the design score in the neuronal LNA class, the following attributes are taken in consideration: the Differential gain, Common Mode gain, CMRR (Commum Mode Rejection Rate), PSRR (Power Supply Rajection Rate), common mode volatage range, slew rate, and phase margin of the AmpOp; the gain, power consuption, input noise, low and high cut off frequency, and area of the LNA. The evaluations of the area do not require simulations and are estimated based on the width and length of the transistors and of capacitors.
Table 1 presents the simulated characteristics of the final version of the sized/optmized LNA.
Note that during the design otimization, an input noise of 4.0 μVrms was initially specified. However, achieving this level of noise requires a significant amount of power consuption in the technology applied, due to various factors, including the large gate capacitance of the diferential pair transistors, M1 and M2. Technologies with larger minimum dimensions, like 180 nm technology, can be advantageously used in the design of low noise LNAs.
Several neural amplifiers aim for noise floors as low as 1-3 μVrms, which is significantly below the cortical recording noise [
23,
26]. For this reason, in our design, we increased the input noise while maintaining a low power consuption.
Table 2 lists the dimensions of the MOSFETs of the OpAmp and of the pseudo-resistors and the value of the capacitor
Cc generated by the sizing/optimization algorithms. The listed Total (W/
L) refers to the total value ratio and the other columns refere to the numer of paralel transistors and number of fingers applied. For example, the transistors M
1 and M
2 with Total (
W/
L)
1,2=(59 μm/0.52 μm) are composed of two parallel transistors, each with dimensions of (24.5 μm/0.52 μm) and, at the same time, containing ten fingers measuring (2.45 μm/0.52 μm). In another example, the transistor M
5 with Total (
W/
L)
5=(48 μm/2.22 μm) is composed by twenty four parallel transistors, each with dimensions of (2 μm/2.22 μm) containing only one finger for each of the twenty-four parallel transistors. The capacitor
CC was composed by 36 sub-capacitors of MIMcap type, which are connected in parallel and form a 6 × 6 array arrangement. Each sub-capacitor cell measures 10 μm × 10 μm.
2.2. Neurostimulator
The neurostimulators must preferably provide current pulses with biphasic shape due to electrical safety reasons, such as avoiding the accumulation of charges at the interfaces between the electrodes and the ionic species within the neuronal tissue [
39].
Figure 6a,b illustrate two examples of pulse shaping, where the durations (or stimulation times), frequency, amplitudes, and interpulses delay of the pulses can be settled according medical requirements. The mean value of the signals is zero on both examples in
Figure 6a,b, thanks for the arbitrary pulse shaping. The neurostimulator presented in this paper can generate other types of pulses with arbitrary shapes, gradients, amplitudes and mean values.
To maintain electrical safety, as previously mentioned, the neurostimulator circuit was designed to offer the capability of generating current with a biphasic waveform, which can invert the direction of charge injection in the neuronal tissue. The phenomenon to nullify charge accumulation is called charge balance [
39]. Traditionally, the inversion of the current direction requires a bridge with H-topology [
40], with the disadvantage of requiring four transistors for current inversion, increasing the number of necessary components and the programming complexity. However, the biggest disadvantage of the H-topology is that it requires access to two different contact points on the electrodes, which are normally unipolar. For these reasons, the circuit responsible for injecting the current into the electrodes is based on the Howland Current-Pump [
41]. This circuit is easy to integrate because it uses low resistance values, that is, below 20 kΩ.
Figure 7a shows the schematic of the Current-Pump that implements the neurostimulator, which is a Howland Current-Pump circuit. The neurostimulator is composed by an OpAmp and four resistors {
R1,
R2,
R3,
R4}, all fully implemented using the mask layers of the TSMC 65 nm CMOS process.
Figure 7b presents the schematic of the OpAmp used by the Current-Pump. The PMOS M
8 also works as resistance
Rc in series with the capacitor
Cc. The series combination of
Rc/Cc is placed in parallel with the capacitor
Cx to form a struture that ensures unconditional stability of the OpAmp.
Table 3 lists the dimensions of the MOSFETs of the OpAmp and the internal capacitance
Cx generated by the sizing/optimization algorithm. The relations (
W/
L) listed in the table follows the same logic of the relations in the
Table 2. The same applies to the capacitors
Cc and
Cx.
4. Conclusions
This paper presented a low-noise amplifier (LNA) and a neurostimulator circuit, which were optimized for application on Closed-Loop Deep-Brain Stimulation (CLDBS). The LNA and neurostimulator were designed and fabricated in the CMOS 65 nm from TSMC.
Table 5 compares this LNA with a few related key works found in the literature [
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32]. It was calculated the figure-of-merit (
FOM) to better rank and compare this work with the others with respect to the internal noise-power consuption trade off. The noise efficiency factor (
NEF) was introduced in 1987 by Steyaert et al. [
38], and since then, it has been widely used. It is given by:
where Itotal is the total current absorbed by the amplifier stage (this current excludes the amount absorbed by the bias stage), UT is the thermal voltage given by kT/q (≈ 26 mV at the room temperature of 300 K), k is the Boltzmann constant, T is the room temperature expressed in Kelvin, IRN [Vrms] is the total input-referred noise, and BW is the LNA bandwidth.
It must be noted that this FOM compares the noise-power trade-off with that of a single ideal bipolar transistor. The lowest the FOM, the better will be the LNA with relation to the global noise performance.
Two important observations must be made regarding the results presented in
Table 5: the two circuits with the lowest NEF, [
24,
28], use a single-input CMOS inverter as the first gain stage. The invert has half the number of transistors compared to the inpu stage of an OpAmp, and therefore introduces approximately half the amount of power noise. Consequently, the NEF is reduced by (2)
½ ; implementations with technologies with higher minimum length, [
29,
30,
31,
32], have a better NEF.
The LNA presented in this work exhibits an NEF that is comparable to the best ones found in the literature. This result is partly due to the sizing/optimization process performed through the application of metaheuristics.
Table 6 compares the features of this neurostimulator circuit with few related key works found in the literature [
42,
43,
44,
45,
46,
47,
48]. All works listed in
Table 6 were implemented using CMOS components. The neurostimulator presented in this paper and the neurostimulator presented by Adams
et al [
46] are the only ones that simultaneously allows the generation of current signals with non-standard waveforms and are suitable for delayed feedback.
To conclude,
Figure 12 shows a photograph of the fabricated CMOS microdevice, which occupies 1.8 mm × 1.8 mm of area. Moreover, this figure also makes an emphasis to the LNA and neurostimulator presented in this paper.
Figure 12.
Photograph of the fabricated CMOS microdevice (1.8 mm × 1.8 mm), with emphasis to the LNA presented in this paper and to one of the ESD protections.
Figure 12.
Photograph of the fabricated CMOS microdevice (1.8 mm × 1.8 mm), with emphasis to the LNA presented in this paper and to one of the ESD protections.