Abstract:
A method and system for providing automatic gain control for a differential amplifier are provided. An impedance network is set to have a first impedance that corresponds to a first gain for a differential amplifier, which amplifies an input signal by the first gain. Once the amplified input signal is greater than a first threshold voltage, the impedance network is set to have a second impedance that corresponds to a second gain for the differential amplifier, which amplifies the input signal. Once amplified input signal is greater than a second threshold voltage and a predetermined period has lapsed, the impedance network is reset to have the first impedance that corresponds to a first gain for the differential amplifier.

Description:
TECHNICAL FIELD 
       [0001]    The invention relates generally to an amplifier and, more particularly, to an automatic gain control for a differential amplifier. 
       BACKGROUND 
       [0002]    Referring to  FIG. 1  of the drawings, a graph depicting the input and output voltage signals for an amplifier having conventional automatic gain control (AGC) is shown. As can be seen, for input voltages that are low, the amplifier outputs a signal having a low total harmonic distortion (THD), while there is larger THD for the larger input voltages. This is, at least in part, due to a tradeoff between the maximum, set peak-to-peak voltage and the THD, where there is a relationship between the maximum or largest size of the signal swing and the THD. This relationship means that for very large maximum, set peak-to-peak voltage the THD is also very large. So it is difficult to implement an AGC for an amplifier that has both a large maximum, set peak-to-peak voltage and a small THD. Some examples of convention amplifier arrangements are U.S. Pat. No. 4,066,977; U.S. Pat. No. 4,637,066; U.S. Pat. No. 5,793,241; U.S. Pat. No. 6,388,524; PCT Publication No. WO2001/061842; and PCT Publication No. WO2008/070349. 
       SUMMARY 
       [0003]    A preferred embodiment of the present invention, accordingly, provides an apparatus. The apparatus comprises an amplifier having a first gain and a second gain that are selected by a first selection signal, wherein the amplifier receives the an input voltage and generates a plurality of output voltages by amplifying the input voltage by one of the first and second gains; a comparator that receives the plurality of output voltages from the amplifier, wherein the comparator compares the greater of the plurality of outputs from the amplifier to one of a first threshold voltage and a second threshold voltage; a switch network that is adapted to provide at least one of the first and second threshold voltages to the comparator based on a second selection signal; and gain adjustment logic that receives an output from the comparator, that provides the first selection signal to the amplifier, and that provides the second selection signal to the switch network, wherein the gain adjustment logic provides a hysteresis when transitioning from the second gain to the first gain. 
         [0004]    In accordance with a preferred embodiment of the present invention, the gain adjustment logic further comprises a counter that receives the output from the comparator and that outputs the second selection signal; an inverter that receives the second selection signal and generates the first selection signal from the second selection signal; and an OR gate that logically ORs the second selection signal with a first clock signal and that provides a second clock signal to the counter. 
         [0005]    In accordance with a preferred embodiment of the present invention, the switch network further comprises an inverter that receives the second selection signal and generates the first selection signal from the second selection signal; a first transistor that receives the first selection signal at its gate and that receives the first threshold voltage at its drain; and a second transistor that receives the second selection signal at its gate, that receives the second threshold voltage at its drain, and that is coupled to the source of the first transistor at its source. 
         [0006]    In accordance with a preferred embodiment of the present invention, the amplifier receives a feedback voltage from the comparator. 
         [0007]    In accordance with a preferred embodiment of the present invention, the amplifier further comprises a differential amplifier having a first amplifier stage that receives a non-inverting input signal and an inverting input signal; a second amplifier stage that is coupled to the first amplifier stage and, that provides the plurality of output voltages; and a common mode stage that is coupled to the first and second amplifier stages and that receives a common mode reference voltage; and an impedance network that is coupled to the differential amplifier and that is adapted to generate provide a first impedance and a second impedance for the differential amplifier that correspond to the first and second gains for the differential amplifier based on the first selection signal. 
         [0008]    In accordance with a preferred embodiment of the present invention, the impedance network further comprises a first resistor that is coupled to the amplifier section of the differential amplifier; a second resistor that is coupled to the first resistor; a third resistor that is couple between the second resistor and the amplifier section of the differential amplifier; a first switch that is coupled in parallel to the third switch, wherein the first switch is actuated and deactuated by the first selection signal; a fourth resistor that is coupled to the amplifier section of the differential amplifier; a fifth resistor that is coupled to the second fourth resistor; a sixth resistor that is coupled between the fifth resistor and the amplifier section of the differential amplifier; and a second switch that is coupled in parallel to the sixth resistor, wherein the second switch is actuated and deactuated by the first selection signal. 
         [0009]    In accordance with a preferred embodiment of the present invention, the first amplifier stage further comprises a current mirror; a pair of differential input FETs, wherein each FET is coupled to the current mirror, and wherein each FET receives one of the non-inverting and the inverting input signals; and a bias transistor that is coupled to each of the FETs. 
         [0010]    In accordance with a preferred embodiment of the present invention, the comparator further comprises a first FET that is coupled to the switch network at its gate, that is coupled to a first voltage rail at its drain, and that is coupled to a second voltage rail at its source; a second FET that is coupled to the first voltage rail at its drain and that receives at least one of the output voltages at its gate; a third FET that is coupled to the first voltage rail at its drain and that receives at least one of the output voltages at its gate; a fourth FET that is coupled to the first voltage rail at its source; a fifth FET that is coupled to the source of the first FET at its gate and that is coupled to the drain of the fourth FET at its source; a sixth FET that is coupled to the sources of the second and third FETs at its gate and that is coupled to the drain of the fourth FET at its source. 
         [0011]    In accordance with a preferred embodiment of the present invention, an apparatus is provided. The apparatus comprises a differential amplifier having a first amplifier stage that receives a non-inverting input signal and an inverting input signal; a second amplifier stage that is coupled to the first amplifier stage and, that provides the plurality of output voltages; and a common mode stage that is coupled to the first and second amplifier stages and that receives a common mode reference voltage; an impedance network that is coupled to the differential amplifier and that is adapted to generate provide a first impedance and a second impedance for the differential amplifier that correspond to a first gain and a second gain for the differential amplifier based on a first selection signal; a comparator that is coupled to the amplifier section of the differential amplifier so as to receives the first and second output signals from the amplifier section and to provide the inverting and non-inverting feedback signals to the amplifier section, wherein the comparator compares the greater of the plurality of outputs from the amplifier to one of a first threshold voltage and a second threshold voltage; a switch network that is coupled to the comparator, wherein the switch network is adapted to provide one of the first and the second threshold voltages to the comparator based on a second selection signal; a counter that receives the output from the comparator and that outputs the second selection signal, wherein the counter provides a hysteresis when transitioning from the second gain to the first gain; and output logic is coupled to the inverter and the impedance network, wherein the output logic receives the second selection signal and generates the first selection signal from the second selection signal, and wherein the output logic provides a second clock signal to the counter. 
         [0012]    In accordance with a preferred embodiment of the present invention, the output logic further comprises an inverter that receives the second selection signal and generates the first selection signal from the second selection signal; and an OR gate that logically ORs the second selection signal with a first clock signal and that provides a second clock signal to the counter. 
         [0013]    In accordance with a preferred embodiment of the present invention, a method for providing automatic gain control for a differential amplifier is provided. The method comprising the steps of setting an impedance network to have a first impedance that corresponds to a first gain for the differential amplifier; amplifying an input signal by the first gain; determining whether the input signal that is amplified by the first gain is greater than a first threshold voltage; setting the impedance network to have a second impedance that corresponds to a second gain for the differential amplifier if the input signal that is amplified by the first gain is greater than the first threshold voltage; amplifying an input signal by the second gain; determining whether the input signal that is amplified by the second gain is greater than a second threshold voltage; determining whether a predetermined period has lapsed if the input signal that is amplified by the second gain is greater than the second threshold voltage; and resetting the impedance network to have the first impedance that corresponds to a first gain for the differential amplifier. 
         [0014]    In accordance with a preferred embodiment of the present invention, the step of determining whether the input signal that is amplified by the first gain is greater than a first threshold voltage further comprises receiving a first output signal and a second output signal from the differential amplifier by a comparator; providing a first feedback signal and a second feedback signal to the differential amplifier; and comparing the greater of the first and second output signals to the first threshold voltage. 
         [0015]    In accordance with a preferred embodiment of the present invention, the method further comprises the step of setting a switch network to transmit the second threshold voltage to a comparator if the input signal that is amplified by the first gain is greater than a first threshold voltage. 
         [0016]    In accordance with a preferred embodiment of the present invention, the method further comprises the step of setting a switch network to transmit the first threshold voltage to a comparator if the predetermined period has lapsed. 
         [0017]    In accordance with a preferred embodiment of the present invention, the method further comprises the steps of clearing a counter if the input signal that is amplified by the first gain is greater than the first threshold voltage; and starting the counter if the input signal that is amplified by the first gain is greater than the first threshold voltage. 
         [0018]    In accordance with a preferred embodiment of the present invention, the step of determining whether the predetermined period has lapsed if the input signal that is amplified by the second gain is greater than the second threshold voltage further comprises determining if the counter is full. 
         [0019]    The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and the specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0020]    For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which: 
           [0021]      FIG. 1  is a graph depicting the input and output voltages for an amplifier employing a convention AGC; 
           [0022]      FIG. 2  is a block diagram depicting system having a differential amplifier with a AGC in accordance with a preferred embodiment of the present invention; 
           [0023]      FIG. 3  is a circuit diagram of at least a portion of the differential amplifier of  FIG. 2 ; 
           [0024]      FIG. 4  is a circuit diagram of at least a portion of the comparator and switch network of  FIG. 2 ; and 
           [0025]      FIG. 5  is a graph depicting the input and output voltages of the system of  FIG. 2 . 
       
    
    
     DETAILED DESCRIPTION 
       [0026]    Refer now to the drawings wherein depicted elements are, for the sake of clarity, not necessarily shown to scale and wherein like or similar elements are designated by the same reference numeral through the several views. 
         [0027]    Referring to  FIGS. 2-4  of the drawings, a system  200  having a differential amplifier with an AGC is shown. The system  200  generally comprises an amplifier  202 , a comparator  204 , and gain adjustment logic (preferably counter  206  and output logic). Additionally, the amplifier  202  is generally comprised of an impedance network, and a multi-stage differential amplifier  214 . 
         [0028]    Looking first to the impedance network, it is generally comprised of resistors R 1  through R 6  (or resistor network  302 ) and switches S 1  and S 2 . The impedance network is generally adapted to have two different impedances that correspond to gains for the differential amplifier  214  by forming feedback networks for each of the differential inputs of the differential amplifier  214 . Each of resistors R 1  and R 4  (which preferably have the same value) receive the differential input signals V IN1  and V IN2  and are coupled to input terminals to the inverting and non-inverting terminals of differential amplifier  214 . Also, coupled to the resistors R 1  and R 4  are resistors R 2  and R 5  (which preferably have the same value), respectively. Resistors R 3  and R 6  (which preferably have the same value) are coupled between resistors R 2  and R 5  and output terminals V OUT1  and V OUT2 . Additionally, switches S 1  and S 2  are coupled in parallel to resistors R 3  and R 6 , respectively. These switches S 1  and S 2  are generally transmission gates and are shown as transistors Q 30  through Q 33  of  FIG. 4 . 
         [0029]    In operation, the switches S 1  and S 2  are actuated or deactuated by a selection signal to operate the differential amplifier  214  at a first gain and a second gain. Under “normal” operation, switches S 1  and S 2  are open or deactuated, meaning that the gain of differential amplifier  214  is generally about (R 2 +R 3 )/R 1 . Under “clamping” conditions, the switches S 1  and S 2  are actuated to scale back to a gain of about R 2 /R 1 . 
         [0030]    In operation, system  200  begins under “normal” operation and attenuates the gain of differential amplifier  214  if “clamping” conditions occur. Preferably, the outputs of differential amplifier  214  are received by comparator  204 , and the comparator compares the larger of the values from the differential amplifier  214  to the first threshold V TH1  (transmitted or supplied) by the switch network  208 . Once the greater output from the differential amplifier  214  is larger than the threshold V TH1 , the output from the comparator  204  resets the counter  206 , which then can outputs logic low or “0” as a selection signal. The “0” is inverted by inverter  210  as a selection signal, which actuates switches S 1  and S 2 , and the “0” is transmitted to OR gate  212  and switch network  208 , causing the switch network  208  to transmit threshold voltage V TH2  to comparator  204 . 
         [0031]    Once the second gain for the differential amplifier is implemented, the system  200  waits for the “clamping” condition to clear. Preferably, the comparator  204  outputs a signal to the counter  206 . When the larger of the outputs of the differential amplifier is smaller than the second threshold V TH2 , the counter  206 , though, does not immediately issue a selection signal to deactuate switches S 1  and S 2 ; instead, the output logic (preferably, inverter  210  and OR gate  212 ) enable to the counter  206  to measure whether a predetermined or “hysteresis” period has lapsed (by waiting for the counter  206  to become full). Preferably, the previous “0” is ORed with a clock signal CLK so as to provide a hysteresis or delay in the transition from the second gain to the first gain. By having this hysteresis, recovery is generally ensured. Additionally, system  200  can be modified to operate with multiple gains (more than two) and can be modified to operate with different polarities. 
         [0032]    Now turning to  FIG. 3 , the differential amplifier  214  can be seen in greater detail. Differential amplifier  214  does not generally operate or amplify based solely on the input signals provided through its inverting and non-inverting terminals, but also generally uses feedback from comparator  204 . Preferably, the differential amplifier  214  is comprised of three sections: the first amplifier stage  304 , the second amplifier stage  306 , and the common mode stage  308 . 
         [0033]    The differential amplifier is configured as a two stage fully differential structure. The first stage  304  is generally comprised of a current mirror (preferably PMOS FETs Q 3  and Q 4 ), differential input pair (preferably NMOS FETs Q 1  and Q 2 ), and a bias transistor Q 8  (which is preferably an NMOS FET). The second stage  306  is generally comprised of transistors Q 5  and Q 6  (which are preferably PMOS FETs) and current sourcing transistors Q 7  and Q 9  (which are preferably NMOS FETs) and provides the output signals V OUT1  and V OUT2 . The common mode stage is generally comprised of transistors Q 10  through Q 14 , which set the output common mode signal by comparing it with common mode reference voltage V CM  and which feeds back the result to control the gate voltage of transistors Q 3  and Q 4 . 
         [0034]    Now turning to  FIG. 4 , the comparator  204  and switch network  208  can be seen in greater detail. In operation, the switch network  208  operates to transmit one of the threshold voltages V TH1  and V TH2  to comparator  204 . The comparator  204  is able to compare the larger of the output signals V OU1  and V OUT2  from differential amplifier  214  to one of the threshold voltages V TH1  and V TH2 . 
         [0035]    The switch network  208  is generally comprised of transistors Q 15  and Q 16  that operate as an analog switch. Transistor Q 16  (which is preferably a PMOS FET) is coupled to comparator  204  at its source and receives threshold voltage V TH2  at its drain. Transistor Q 15  (which is preferably a PMOS FET) is coupled to comparator  204  at its source and receives threshold voltage V TH1  at its drain. A selection signal, which is generally the output of counter  206 , is employed to select between threshold voltages V TH1  and V TH2 . Preferably, transistor Q 16  is actuated when the output of counter  206  is logic low or a “0.” Additionally, inverter  402  inverts the output of counter  206  so that transistor Q 15  is actuated when the output of counter  206  is logic high or “1.” 
         [0036]    The comparator  204  is generally comprised of activation or enable transistors, a differential pair arrangement, a current mirror, and a selective branch. Bias transistor Q 19  (which is preferably PMOS FETs) is coupled to voltage rail  310  and receive a bias voltage V BIAS1 . Bias transistors Q 18  and Q 27  (which are preferably NMOS FETs) are coupled to voltage rail  312  and receive bias voltage V BIAS2 . Transistors Q 20  and Q 22  (which are preferably PMOS FETs) are coupled to one another in a differential pair arrangement and are coupled to current sourcing transistors Q 24  and Q 25  (which are preferably NMOS FETs) that operate as a current mirror. Additionally, transistors Q 21  and Q 26  (which are preferably NMOS FETs) generally comprise the selective branch. 
         [0037]    In operation, the output of the switch network  208  can then be applied to comparator  204  along with output signals from the outputs V OU1  and V OUT2  from differential amplifier  214 . Preferably, transistor Q 17  (which is preferably an NMOS FET) is coupled at its gate to the source of transistors Q 15  and Q 16  and is coupled between voltage rails  308  and  310 ; thus, transistor Q 17  operates as a source follower which transfers the selected threshold voltage V TH1  or V TH2  from switch network  208  to the gate of transistor Q 20 . Additionally, the selective branch (transistors Q 21  and Q 26  that are coupled generally in parallel to one another) selects the greater of the outputs V OUT1  and V OUT2  and transfers it to the gate of transistor Q 22 . The output V OUT  of comparator  204  is then output through the drain of transistor Q 29  (which is preferably an NMOS FET). 
         [0038]    Now turning to  FIG. 5 , a graph depicting an example of the operation of system  200  is shown. For  FIG. 5 , it is assumed that the common mode voltage is 0.8V, the selected maximum peak-to-peak output voltage from the differential amplifier  214  is 2228 mV, the selected peak-to-peak output threshold voltage is 1000 mV, and the “normal” gain of differential amplifier  214  is 5. With these assumptions, threshold voltage V TH1  is 1.05V (due to fully differential structure, the 1000 mV threshold voltage can be transferred into 250 mV over common mode voltage: 0.8+0.25=1.05V), and threshold voltage V TH2  is 0.9V. Additionally, with these assumptions, the second gain or gain under “clamping” conditions is 2. Between times t 0  and t 1 , the differential amplifier  214  is operating under “normal” conditions. At time t 1 , a “clamping” condition occurs because the peak-to-peak output voltage (V DOUT ) exceeds 1000 mV, so that system  200  changes the gain from 5 to 2. Between times t 1  and t 2 , the system  200  remains under “clamping” conditions. At time t 2 , the peak-to-peak input voltage falls to a level such that the output voltage at a gain of 5 would not exceed the threshold of 1000 mV; however, because of the hysteresis included in system  200 , the gain remains at 2 for a predetermined period between times t 2  and t 3  to generally ensure recovery. At time t 3 , the gain is returned to 5. 
         [0039]    Having thus described the present invention by reference to certain of its preferred embodiments, it is noted that the embodiments disclosed are illustrative rather than limiting in nature and that a wide range of variations, modifications, changes, and substitutions are contemplated in the foregoing disclosure and, in some instances, some features of the present invention may be employed without a corresponding use of the other features. Accordingly, it is appropriate that the appended claims be construed broadly and in a manner consistent with the scope of the invention.