The subject matter of this patent application is generally related to digital-to-analog converters.
A digital-to-analog converter (DAC) is a device for converting a digital code to an analog signal. For example, a DAC can convert an 8-bit digital signal into an output voltage or current having an amplitude representing the digital code. Two common examples of DACs are the “R-string” DAC and the “R-2R ladder” DAC. Another example is the Parallel Resistors Architecture (PRA) digital-to-analog converter (DAC). Advantages of the PRA-DAC over the “R-string” DAC and the “R-2R ladder” DAC include that the PRA-DAC has a constant output impedance and inherent monotonicity compared to “R-2R ladder” DACs.
PRA-DACs suffer, however, from code dependent current consumption. Code dependent current consumption can severely worsen the DACs linearity, and more particularly its integral non-linearity (INL) due to unavoidable parasitic access resistance of the DACs references. Thus use of PRA-DACs is often limited to low resolution applications.
A current compensation circuit and an optimized current compensation circuit are disclosed for a Parallel Resistors Architecture (PRA) digital-to-analog converter (DAC). The circuits are used to balance code dependent current consumption of the PRA-DAC.
An advantage of the current compensation circuit and the optimized current compensation circuit is that they allow the use of the PRA-DAC without the need of a costly calibration process, or dramatically increased area due to oversizing of resistors. Furthermore, the optimized current compensation circuit allows the use of the PRA-DAC without the use of a weighted resistors compensation network.
An additional advantage of the current compensation circuit and the optimized compensation circuit is that they improve the linearity of the PRA-DAC because the voltage drop across the parasitic access resistance is substantially independent of the digital code. Furthermore, because the current sourced from the DAC is substantially independent of the digital code, load regulation of a buffer used to supply the DACs references does not need to be optimized.
Another advantage of the optimized current compensation circuit is that it allows the use of a single resistor matched to the PRA-DAC that is sufficient to obtain a well matched compensation current.
Like reference symbols in the various drawings indicate like elements.
In some implementations, the DAC 102 is coupled to a compensation circuit 104 via a node 110 having a reference voltage level, Vref. The DAC 102 and the compensation circuit 104 can receive the reference voltage Vref from the node 110. The DAC 102 and the compensation circuit 104 receive currents Iref and Icomp, respectively. The system 100 includes a current source 108 to supply the currents Iref and Icomp. The current source 108 includes a voltage supply node, Vsrc, and a parasitic access resistance, Rsrc, of the voltage supply node, Vsrc. The current source 108 generates a source current, Isrc, based on Vsrc and Rsrc. In some implementations, the voltage supply node, Vsrc, supplies a substantially constant voltage to the system 100 during operation. At the node 110, Isrc divides into Iref and Icomp to supply the DAC 102 and the compensation circuit 104, respectively.
In an example operation, a current consumption of the DAC 102 (Iref) varies based on the digital input D. For example, the DAC 102 can receive IrefdD1 for a digital input D1 and IrefD2 for a digital input D2, in which IrefD2>IrefD1. The voltage drop across the parasitic resistance Rsrc due to Iref varies for digital input D1 and D2 because IrefD2 and IrefD1 are substantially different.
To balance the voltage drop across Rsrc, in some implementations, a current consumption of the compensation circuit 104 (Icomp) also varies based on the digital input D. Using the above example, the current consumption of the compensation circuit 104 may be IcompD1 and IcompD2 for the digital inputs D1 and D2, respectively. In one implementation, the compensation circuit 104 can generate the compensation currents IcompD1 and IcompD2 so that:
Isrc
D1
=Iref
D1
+Icomp
D1
≈Iref
D2
+Icomp
D2
=Isrc
D2.
Using the compensation circuit 104, the system 100 can have a substantially code-independent current consumption Isrc. Accordingly, the voltage-drop across the parasitic access resistance Rsrc may be code-independent. In some implementations, the system 100 is configured to maintain Vref to be substantially constant for various digital inputs D. The linearity of the DAC 102 can be improved because of the constant reference Vref at the node 110. Moreover, because Isrc is code-independent, the need for optimizing a load regulation of a buffer for supplying the reference voltage, Vref, is reduced.
The DAC 102 includes 2N parallel resistors 202. In this example, each of the resistors 202 has substantially the same resistance R. One of the parallel resistors 202 is connected to ground GND. 2N−1 of the parallel resistors 202 are coupled to switches S1, S2, . . . , S2N−1. The switches S1 to S2N−1 can control the 2N−1 parallel resistors 202 to be connected either to the reference voltage Vref or to a ground node GND.
The switches S1 to S2N−1 connect the parallel resistors 202 based on a control word generated by a decoder 206. For example, the switches S1 to S2N−1 can be configured so that the switch connects the connected resistor to Vref if a control signal representing logic “1” is received, and the switch connects the connected resistor to GND if a control signal representing logic 0 is received. Other reference levels can also be used. A switch can be a transistor that is biased to behave like a switch.
The decoder 206 generates a 2N−1 bits control word based on the received digital input D. In one implementation, each control bit in the control word corresponds to one of the switches S1 to S2N−1. Based on the corresponding control bit, the switches S1 to S2N−1 can connect the coupled resistors 202 to Vref or GND. In one implementation, the control word can be a decoded representation of the digital input D. For a digital input D (e.g., D is an integer between 0 and 2N−1), D of the 2N−1 control bits may be at logic 1 and 2N-D of the control bits may be at logic 0. In some implementations, because the decoder 206 is configured to generate D of the 2N−1 control signals at logic 1 for the digital input D, D of the resistors 202 are connected to Vref and 2N−D resistors are connected to the ground GND if the DAC 102 receives a digital input D.
Accordingly, the DAC 102 can generate Vout based on a voltage division between the parallel resistors connected to Vref and the parallel resistors connected to GND. In some implementations, the equivalent resistance between the reference voltage Vref to the analog output voltage, Vout, is approximately
and the equivalent resistance between the analog output voltage, Vout, and the ground GND is approximately
For example, the DAC 102 generates Vout based on the digital input D according to the following equation:
The DAC 102 can generate an analog output voltage, Vout, that is substantially monotonic to the digital input D. For example, as the digital input D is incremented by one (e.g., increment from D to D+1), an additional resistor is connected to the voltage reference Vref. Thus, the output voltage Vout based on D (Vout(D)) is smaller than the output voltage, Vout, based on D+1 (V(D+1)). In some implementations, the monotonic property of the DAC 102 is substantially independent of the quality of the matching of the resistors 202. For example, if the parallel resistors 202 are poorly matched, resulting in highly varied resistance across the resistors 202, the monotonic property of the DAC 102 can still be substantially preserved because more resistance is still connected to Vref.
As shown, the DAC 102 draws Iref from the voltage reference Vref. In this example, Iref flows first from Vref to the output node Vout through D parallel resistors, and then from Vout to GND through 2N-D parallel resistors. Depending on the digital input D, the current consumption of the DAC 102 is given by:
From the above equations, an expression of the current consumption Iref of the DAC 102 is:
By rearranging the above equation, the current consumption can be expressed as:
Note that the current consumption Iref(D) is a second order polynomial depending on the input digital word D. Iref is at minimum at D=0. The minimum value of Iref is:
I
min
=Iref(D=0)=0.
At mid-scale (2N-1), Iref rises to the maximum. The maximum value of Iref is:
After mid-scale, Iref symmetrically decreases to:
The current consumption of the DAC 102 is code dependent. In some examples, the code dependency of Iref can degrade the linearity of the DAC 102. To maintain the linearity of the DAC 102, the compensation circuit 104 can generate another code-dependent current Icomp(D) that substantially mitigates code-dependent variations of Iref(D). By balancing variations of the current consumption Iref, a code independent current consumption Isrc of the system 100 can be maintained.
In one implementation, Isrc is substantially maintained at the maximum current consumption of Iref(D) using the compensation circuit 104. As described above, Imax=Iref(D=2N-1). By substituting Isrc=Imax, the total current consumption can be expressed as:
Since Iref(D) is a second order polynomial with maximum at the mid-scale, Iref is symmetrical with respect to the mid-scale. Referring to
Icomp(D)=Isrc−Iref(D).
By substituting equations for Iref(D) and Isrc, the following equation is obtained:
Icomp(D)=[22N-2−D·(2N−D)]·ILSB.
Let k be the distance from a given input digital word D to mid-scale, and
D=2N-1‡k with kε[0,2N-1] and Dε[0,2N−1].
Using the above definition for k, the compensation current can be expressed as:
Icomp(D=2N-1‡k)=k2·ILSB.
Based on Fermat's polygonal number theorem, k2 can be expressed as a sum of the first k odd positive integers. Therefore,
The compensation current at code D=2N-1‡k is thus the sum of the first k odd positive integers multiples of the current ILSB. By generating the compensation current, the total current consumption of the system 100 can be maintained to be substantially constant. For example, the linearity of the DAC 102 can be improved. Some example compensation circuits for generating such code-dependent compensation current are described below.
The WRN 302 includes a set of resistive elements. In particular, WRN 302 includes 2N-1 parallel connected resistors R1, R2, . . . , R2N-1. For example, N is the number of bits of the received digital input D. In some implementations, the resistance of a resistor Rk can be computed by
For example, the resistance of R1 is 2N·R, the resistance of R2 is
etc.
As shown, the parallel resistors R1, R2, . . . , R2N-1 are connected to ground GND through switches S1, S2, . . . S2N-1, respectively. After the switch Sk is closed, the resistor Rk is connected to GND. In this example, if the switch Sk is closed, a current Ik flows from Vref to GND. The current Ik can be expressed as:
The switches S1-S2N-1 are controlled by a 2N-1-bits control word generated by a compensation code generator 304. In one implementation, the compensation code generator 304 generates the compensation code C based on the digital input D. In one implementation, the compensation code generator 304 is configured to generate an intermediate code based on a most significant bit (MSB) of D. In one example, if the MSB of D is 0, then the compensation code generator 304 is configured to generate the intermediate code by determining two's complement of the remaining least significant bits (LSBs) of D. Conversely, if the MSB of D is 1, then the compensation code generator 304 is configured to generate the intermediate code based on the remaining LSBs of D. Next, the compensation code generator 304 generates C by converting the intermediate code to a thermometer code.
In this example, C includes 2N-1 data bits. For example, if the intermediate code represents a binary value of b, b of the LSB of the compensation code C is at logic 1, and the rest of the compensation code C is at logic 0. In one example, suppose the intermediate code is “101,” representing a binary value of 5. Then, the compensation code generator 304 can generate a thermometer code “0000 0001 1111” as the compensation code C. The switches S1 to S2N-1 can then use the generated code C to determine whether each of the resistors R1-R2N-1 is to be connected to GND. For example, if the compensation code C is “0000 0001 1111,” then the switches S1-S5 are closed, causing the resistors R1-R5 to be connected to GND. Thus, the currents I1-I5 are flowing through the resistors R1-R5 to GND. As a result, the compensation circuit 104a generates Icomp that balances the current consumption of the DAC 102 to be:
As an illustrative example, suppose N=3 and D=010. The current consumption at the DAC 102 is:
To generate the compensation current, the compensation code generator 304 determines to use the two's complement of the LSBs of D, “10,” because the MSB of D is 0. Next, the compensation code generator 304 generates the two's complement of LSBs of D, which is “10” in this case, to a thermometer code “0011.” As a result, the switches S1 and S2 are closed, and the other switches S3 and S4 are opened. In some examples, the current generated by closing S1 and S2 is:
The compensation current Icomp(D=2) can substantially mitigate the current consumption variance generated by the input code D=010 at the DAC 102.
In another example, suppose N=3 and D=101. The current consumption at the DAC 102 is:
In this case, the compensation code generator 304 determines to use the LSBs of D, “01,” because the MSB of D is 1. Next, the compensation code generator 304 converts the remaining LSBs of D, which is “01” in this case, to a thermometer code “0001.” As a result, the switch S1 is closed, and the other switches S2, S3 and S4 are opened. In some examples, the current generated by closing S1 and S2 is:
The current Icomp(D=5) can substantially mitigate the current consumption variance generated by the input code D=101 at the DAC 102. For example, the total current consumption of the system 100 including the DAC 102 and the current compensation circuit 104a can be maintained at:
Although one implementation of the compensation circuit 104 is described, other implementations are also possible. For example, transistors (e.g., metal-oxide-semiconductor field-effect transistor (MOSFET)) can be used to generate the compensation currents I1-I2N-1.
The weighted current mirror network 402 includes a set of resistive elements. In particular, the weighted current mirror network 402 includes 2N-1 transistors M1-M2N-1. As shown in
Each of the transistors M1-M2N-1 can be coupled to one of the corresponding switches S1-S2N-1. In this example, the switches S1-S2N-1 are controlled by a compensation code C generated from the compensation code generator 304. The operations of the switches S1-S2N-1 and the compensation code generator 304 are described with reference to
The compensation subcircuit 412 includes a resistive divider 404. In some implementations, the resistive divider 404 includes two resistors R1 and R2. The resistance of R1 and R2 can be substantially the same to generate a divided voltage
The compensation subcircuit 412 also includes a voltage follower 406 operable to buffer the divided voltage
In the example shown, the voltage follower 406 includes an amplifier 408 and a PMOS MP. The voltage follower 406 is connected to the resistive divider 404 through a negative terminal of the amplifier 408 and to a resistor RDAC at a node connecting the positive terminal of the amplifier 408 and a terminal of MP. The voltage follower 406 generates a voltage VCMBUFF at the top of a resistor RDAC. In one implementation, RDAC may be substantially identical to the resistors R used in the DAC 102 as described in reference to
The voltage follower 406 is also connected to a diode 410 via another terminal of MP. In this example, the diode 410 includes a PMOS M0. Using the notation M0:2N-1, M0 is made up with 2N-1 identical instances of a unit PMOS placed in parallel. Thus, the current density in each instance of M0 is:
Using the current mirror network 402, the current flowing through M0 is copied at the transistors M1 to M2N-1 in the current mirror network 402. As described above, the current flowing from each instance of unit PMOS is
After the switch Sk is closed, the current available from Mk is:
Using the described example, in which N=3 and D=010, the compensation code generator 304 generates the compensation code C such that the switches S1 and S2 are closed, and the other switches S3 and S4 are opened. As such, the compensation circuit 104b can generate a compensation current
As described with reference to
the compensation current Icomp(D=2) generated by the compensation circuit 104b can substantially mitigate the current consumption variance generated by the input code D=010 at the DAC 102.
Depending on the compensation code C, the compensation circuit 104b can generate the compensation current to substantially maintain the total current consumption, Isrc, of the system 100 at a maximum level. Therefore, the linearity of the DAC 102 can be preserved. In some implementations, the compensation circuit 104b can be implemented using less circuit area than the compensation circuit 104a because a reduced number of matched resistors (a single matched resistor RDAC in the compensation circuit 104b) is required to obtain the compensation current.
Although one implementation of the compensation circuit 104b is described, other implementations are also possible. For example, the diode 410 can include other types of resistive elements.
A number of implementations of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. Accordingly, other implementations are within the scope of the following claims.