CMOS Analog AGC for Biomedical Applications

: In this paper, we present the design of an analog Automatic Gain Control with a small silicon area and reduced power consumption using a 0.5 µ m process. The design uses a classical approach implementing the AGC system with simple blocks, such as: peak detector, difference ampliﬁer, four-quadrant multiplier, and inversor ampliﬁer. Those blocks were realized by using a modiﬁed Miller type OPAMP, which allows indirect compensation, while the peak detector uses a MOS diode. The AGC design is simulated using the Tanner-Eda environment and Berkeley models BSIM49 of the On-Semiconductor C5 process, and it was fabricated through the MOSIS prototyping service. The AGC system has an operation frequency of around 1kHz, covering the range of biomedical applications, power consumption of 200 µ W, and the design occupies a silicon area of approximately 508.8 µ m × 317.7 µ m. According to the characteristics obtained at the experimental level (attack and release time), this AGC can be applied to hearing aid systems.


Introduction
Chronic diseases are considered the main cause of death in the world, with cardiovascular, oncological and respiratory diseases, as well as cerebrovascular accidents and diabetes comprising 54% of deaths in 2016 [1].In recent years, mobile technologies, in conjunction with biomedical systems, have been used to aid in the recognition of diseases and patient management.These systems provide direct and regular monitoring of important vital signs, such as heart rate, blood oxygen saturation level, body temperature, respiratory rate, blood pressure in the circulatory system [2], and can be used as clinical tools to observe a particular disease or provide a better understanding of a user's health status.Since the electronics industry is in continuous advance, there is a tendency in the monitoring of biological signals towards reducing device size and power consumption.As shown in Table 1, these signals range from a few microvolts (µV) to hundred of millivolts (mV), which makes it difficult to obtain an accurate reading, especially when assessment is done in a noisy environment.The block diagram of a portable biomedical system for ECG signals is shown in Figure 1 [3].The low frequency electrode signal (0.01-300 Hz), is injected into an instrumentation amplifier coupled in AC, which amplifies the signal up to a range of 32 dB to 40 dB, and filters the common-mode noise and electrode offset [4].Subsequently, the filter (Reject Band) rejects the power line noise (50 Hz-60 Hz) [5].The next stage is a variable gain amplifier (VGA) [6], which changes its gain in order to maintain the output signal within optimal values for an analog-to-digital converter (ADC).This paper proposes the use of an Analog Automatic Gain Control (AGC) to handle amplitude changes in biomedical signals to adequate the signal into the input range of the ADC.An AGC is an essential component in many electronic systems in fields such as communications [7][8][9], audio, sensor calibration [10], disk drives and charge-coupled device (CCD) type imaging equipment.The main contributions in AGCs for biomedical applications are in Cochlear Implant [11][12][13][14], control of the amplitude of biomedical signals [15], hearing aids [16], and bionic ears [17].References [16,17] report a circuit design integrated into a silicon area less than 4.41 mm 2 and power consumption less than 100 µW.Its main purpose is maintaining the amplitude of a given signal in a range such that the following blocks can process it.If the input signal shows large variations in its amplitude, it may cause the circuit to malfunction.For example, in a communication system where the transmitter-receiver are too far apart, the signal is weaker when it reaches the receptor and, according to probability, failure to transmit tends to decrease the signal-to-noise ratio of the transmission channel [18].Despite being a well-known block, AGC is still heavily worked on by circuit designers to improve their power consumption, raise their response speed, minimizing size, etc. [18,19].
In this paper, we present an analog AGC, in a small area of silicon, low power consumption, a high output voltage swing (1.2 V), a programmable operating frequency between 1 Hz and 1 kHz, release times, attack time and reconfigurable reference voltage with a simple AGC structure for handling biomedical signals shown in Table 1.The proposed amplifier is a variant of the conventional Miller amplifier, which use an indirect compensation loop that reduces the area consumption in silicon, improves the product gain bandwidth, and the setting-time of the opamp with reduced power consumption compared to a class A amplifier.The peak detector was built by using the modified Miller opamp and a diode.This structure is proposed because presents better output voltage swing compared to [8,20].Despite a diode is a simple device, the selected technology does not provide this element as part of the available library, so it was necessary to fabricate several diode structures in order to obtain its electrical characteristics.

Automatic Gain Control (AGC)
Ideally, an AGC will keep the amplitude of its output signal constant despite amplitudes changes at its input [19].An AGC is typically a feedback system, which can be represented in terms of a nonlinear transfer function.The ideal transfer function for an AGC scheme is depicted in Figure 2.With an input signal lower than a voltage threshold V 1 , the AGC will not work and the output signal is a linear function of the input.When the output signal passes the threshold value (V 1 ), the AGC works and maintains an approximately stable level at the output until it enters a second threshold value (V 2 ).After passing this threshold it stops functioning correctly due to the saturation of the output signal.The operation thresholds discussed above are determined by a reference voltage V REF , which regulates the amplitude of the output signal.There are two ways to implement an AGC: by feeding the output signal to an internal block (feedback) [21,22] or by feeding the input signal to more than one internal block (feed-forward) [23].This work will analyze the analog version of the first option, which is shown in Figure 3.

Operating Principle
The main feature of the configuration shown in Figure 3 is its requirement of a single detector with a low dynamic range, as well as its high linearity.The input signal V I N is injected into a variable gain amplifier (VGA) controlled by the V C signal, which closes the loop.Some parameters of the output signal, such as amplitude, carrier frequency, modulation index or frequency, are sensed by the peak detector, after which the undesirable components are filtered.The V F signal is then subtracted by voltage reference V REF to generate the V C signal, which controls the VGA to adjust the loop gain and therefore keep the amplitude of the output signal V OUT at a constant level.The mathematical description of the transfer function is taken from [24].

Analog AGC
The proposed CMOS analog AGC is shown in Figure 4a, and implements the Variable Gain Amplifier (VGA) with a four-quadrant multiplier.As to the selected CMOS multiplier uses differential input and output signals, a differential-to-single (D2S) and single-to-differential (S2D) converters are required.A peak detector was selected in order to extract the output signal amplitude and a simple RC circuit was used as the filtering block.Finally, a difference amplifier closes the feedback loop.

Operational Amplifier
The AGC design is based on an modified Miller type operational amplifier (OPAMP) with indirect compensation and a class-A output as shown in Figure 5, which is composed of a differential pair (M 3 -M 4 ), followed by an output stage comprising a type-A amplifier (M 9 -M 10 ) and a capacitor (C c ).
The non-inverting input is connected to the gate of M 3 , which works as a voltage to current transconductor, connected to M 5 -M 10 , these transistors constitute a current mirror that copies the current from M 3 to the output branch v o .The inverter input (V in− ) is connected to the gate of M 4 , which works as a voltage-to-current transconductor, and is converted to voltage by (r 04 r 06 ).This voltage is connected to the gate of M 7 and is converted in current through gm 7 .The M 8 -M 9 transistors copy this current to the output node v o and this loop is used to perform indirect compensation with the capacitor (C c ) connected between v x and v o nodes.Indirect feedback compensation [25] is achieved by feeding the feedback current indirectly from the output high impedance node of the first stage (v y ).In this technic, the compensation capacitor (C c ) is placed at a low impedance node in the first stage (v x ) allowing indirect feedback current compensation from the output (v o ) to the internal high impedance node of the output of the OPAMP thus obtaining pole splitting and hence frequency compensation.Besides the advantage of eliminating the right-hand plane zero, the operational amplifier with indirect feedback compensation exhibits a significant reduction in the layout area.The amplifier design process is: 1. We determine the necessary transconductance of differential pair (gm (M 3 ,M 4 ) ) for a GBW = 2 MHz and a lod capacitance(C L ) of 2 pF as shown in Equation (1).
A v = gm 4 (r 04 r 06 )gm 7 (r 09 r 10 ) ≈ 87dB ( 5) Figure 5, all transistors operate in the saturation region and results of this amplifier present a DC open-loop gain (OL GAI N ) of 87 dB, gain-bandwidth product (GBW) of 2.2 MHz and phase margin of 62 • as shown in Figure 6.Experimental voltage offset (V o f f set ) refered to input of 1.2 mV and power consumption of 6.6 µW.

Four-Quadrant Analog Multiplier
The multiplier used for this work is the well-known Gilbert cell [26] shown in Figure 7, which is comprised by 6 transistors operating in the saturation region (M 3 -M 8 ) and a bias current mirror (M 1 -M 2 ).The design of this circuit was proposed using equation 1 for a GBW = 4 MHz and a capacitance of 10 pF due to the load represented by an internal pad, thus obtaining a gm 1 = 251.32µs.The aspect ratio was obtained by means of Equation ( 2) with values of V Dsat = 0.1 and current through M 5 = 12.5 µA, obtaining (W/L) = 23.The same Figure 7 shows the transistor sizing and bias conditions.This multiplier presents a gain of 7.4 dB, a GBW of 4 MHz, a linear range of 150 mV and a power consumption of 165 µW.For the transient simulation of this circuit two differential signals were used: a sinusoidal of 100 mVp amplitude at 10 kHz frequency, and a triangular signal of 100 mVp amplitude at 1 kHz frequency.The output voltage of this multiplier is shown in Figure 8, where a gain of ≈2.5 and a DC level of ≈1.2 V can be seen.
All dimensions in [µm]

Peak Detector
There are a wide variety of peak detectors, which can realize by diodes or by MOS transistors [8,20].The diode is constituted of 3 structures within a well type N, which is located into the substrate (type P) of the IC; in the well, there is a main P-type diffusion, surrounded by an N-type diffusion ring and enclosed by another P-type diffusion ring as shown in Figure 9.A super diode structure was used for realizing the peak detector.This structure is essential as the threshold voltage of the diode (for silicon Vth = 0.7 V) is divided by the open-loop gain of the OPAMP and reduced to a value close to 0 volts.The operating frequency of the peak detector is determined by the expression f c = 1/(6.283× R D C D ).If the operating frequency changes, R D and C D must be recalculated.The maximum frequency of the AGC is mainly restricted by the OPAMP.Since the 0.5 µm technology does not provide characterized diodes nor their models, it was necessary the diode characterization.The transient response of the peak detector when applying a sine wave signal with a frequency of 1 kHz with different amplitude values, between 0.15 V-1.2 V is shown in Figure 10.It can be seen that the settling time depends on the signal amplitude.The next block is the filter, which is a simple RC circuit, hence it does not need any discussion.However, this block along with the peak detector determines the maximum operating frequency.

Subtractor
A subtractor circuit used as a comparator is shown in Figure The circuit generates a signal proportional to the difference between V REF and the filter output V H .This circuit is composed of an OPAMP and two 10 kΩ resistors.
Figure 4b shows the implementation of the single-to-differential (S2D) converter, while Figure 4c shows the differential-to-single circuit (D2S).These blocks are used before and after the analog multiplier because the Gilbert cell requires differential input and output signals.Both blocks are based on the OPAMP circuits discussed in Section 3.1.It can be noticed that the DC level is canceled by using these blocks.Because of the limited dynamic range obtained by the four-quadrant multiplier, it is necessary to attenuate its input signals.This is achieved by modifying the values of the resistors in block S2D.In the same way, block DS2 is also used to amplify the output signal of the multiplier up to a suitable amplitude for the peak detector.In this case, the input/output signals are attenuated/amplified by a factor of 4.

Analog AGC Simulation Results
Simulation results of the Analog AGC were obtained using a sinusoidal signal which amplitude varies from 300 mV to 180 mV at a frequency of 1 kHz, as shown in Figure 11 (In the upper and lower of this figure the input and output signal are shown respectively).Settling time is calculated by Equation ( 8), V re f is a voltage reference, the constant k AM = 2.45 mV indicates linear gain control slope and g m , C are the transconductance and capacitance of the peak detector.Figure 11, we use V REF = 500 mV and get a release (R T ) and attack (A T ) time of 220 ms and 5 ms respectively.Under the same input signal conditions and with an increase of C, is obtained a R T of 32 ms and A T negligible, as shown in Figure 12. Figure 13 shows the simulation results for a sinusoidal input signal at a frequency of 1 Hz.The AGC controls the output signal at Vref = 220 mV, obtaining a R T of 6.2 s and A T negligible.The results can be applied to amplitude control an electrocardiogram (ECG) signal.

Experimental Results and Discussions
Figure 14 shows the microphotograph of the analog AGC fabricated in On-Semiconductor 0.5 µm technology.Section A is the peak detector, 280 µm × 90 µm, section B shows the inverting amplifier (138 µm × 90 µm), section C shows the S2D converter 180 µm × 90 µm, section D is the subtractor circuit 213 µm × 90 µm, section E is the four-quadrant multiplier 87 µm × 88.80 µm and section F shows the D2S circuits with 397 µm × 90 µm.The total dimension of the analog AGC is 508 µm × 317 µm.The experimental results of each block are shown independently.

Analog Four-Quadrant Multiplier
Operating conditions for this circuit are given in Figure 7.A transient simulation shows similar behavior to the post-layout simulation, seen in Figure 15.Two input signals were used: a triangular and sinusoidal waveform with 400 mV of peak amplitude at 100 Hz and 4 kHz, respectively.

Peak Detector
The diode was experimentally measured with a Keithley 4200-SCS Semiconductor Characterization System, obtaining a reverse bias current of 10 pA.A dual supply of Vdd = 1.65,Vss = −1.65 V and a bias current Ib = 2 µA were used for the experimental characterization of the peak detector.For the Opamp-Diode configuration, a sinusoidal input signal of 200 mVp at a frequency of 200 Hz was introduced.The obtained result is shown in Figure 16a, where a half-wave rectifier is observed.When an external capacitor is connected at the super-diode output, a peak detector is obtained.Figure 16b shows the peak detector output for a 0.75 V sinusoidal input signal at 1 kHz and an 50 nF capacitance.As expected, the output signal is held at the peak value.

Complete Analog AGC
The electrical characterization of the analog AGC was performed under the same conditions as the schematic simulation level shown in Figure 4a.In Figure 17a a V REF = 500 mV with a release time of 210 ms and attack time of 10 ms is used while in Figure 17b, V REF is equal to 700 mV with a release time of 200 ms and an attack time of 20 ms is used.Table 2 shows a comparison of simulation and experimental results.A summary of the characteristics of the operation of different AGCs is shown in Table 3.They were used for hearing aids [16], sensor calibration [10], and Bionic Ears [17].This work presents a lower power consumption, configurable operating frequency, lower consumption of silicon area despite being designed in technology of longer channel length [10,16,17] and reconfigurable frequency of operation, attack time and release.

Conclusions
In this article, we have presented a practical implementation of an Analog Automatic Gain Control in an integrated circuit.The proposed modified Miller type OPAMP with indirect compensation have excellent experimental characteristics such as a reduced area in silicon, better gain band-width, and setting time of the op-amp with a minimal power consumption compared to a class A amplifier, those characteristics improve the attack and release time in the AGC system.The proposed diode had good experimental measurements which allowed the peak detector to function properly.In the experimental results of AGC, we applied analog signals with different amplitudes (180 mV-300 mV) for voltage reference =500 mV, so that the best release time was 210 ms, with 10 ms of attack time.The AGC has a voltage output swing ≈1.2 V, attack and release time can be increased or decreased by the peak detector capacitor and reference voltage can be adjusted for voltages between 100 mV to 1.2 V.The design is simple, occupies a small silicon area of 0.16 mm 2 , has power consumption ≈200 µW.According to the characteristics obtained at the experimental level (attack and release time), this AGC can be applied to hearing aid systems [11,12].

Figure 2 .
Figure 2. AGC ideal and practical transfer function.

Figure 3 .
Figure 3. Analog AGC feedback configuration [23].Some important parameters for AGCs are: • Settling time (τ): Set time needed by the circuit to regulate the loop gain in the AGC in response to a variation in amplitude in the input signal.• Attack time (A T ): Time necessary for the AGC to respond to an abrupt increase in the amplitude of the input signal.It is quantified from when the input signal changes until the AGC attenuates the output amplitude to a value close to the V REF with a tolerance.• Release time (R T ): Time required for the AGC to respond to an abrupt loss in amplitude.It is quantified from when the input signal changes up until it amplifies the output signal to a value close to the V REF with a tolerance.

Figure 4 .
Figure 4. Proposed AGC for this work.

Figure 13 .
Figure 13.Analog AGC transient response for V REF = 500 mV, with R T = 6.2 s.

Figure 15 .
Figure 15.Experimental results of the analog multiplier.

Figure 16 .
Figure 16.Experimental results of the peak detector.

Table 1 .
Characteristics of biomedical signals.
ADC Figure 1.Basic diagram for a biomedical system.

Table 3 .
Comparison with others AGC.