A Test Bench For Differential Circuits

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

A Test Bench for Differential Circuits

5 April 2002

The procedures described in this application note are deliberately broad and generic.
Requirements for your specific design may dictate procedures slightly different from those
described here.

Overview
This Application Note introduces a new test bench constructed using ideal baluns that makes
the simulation of differential circuits easier and less error prone.

The Traditional Test Bench


Consider the test bench shown in Figure 1-1.This test bench, or some variation of it, is
commonly used when simulating differential circuits. While it does generally get the job done,
it has a number of short comings. First, driving the device-under-test, or DUT, with a purely
differential input requires that the stimulus be applied from two sources, Vdm1 and Vdm2.
Doing so is somewhat of a bother, and represents a potential source of error. If the stimulus
is only applied to one source, or if the stimuli are applied differently from both sources, then
the signals that drive the DUT will contain an undesired common-mode component that can
cause erroneous results. In addition, determining the differential output signal requires
measuring a floating voltage, again this is somewhat of a bother because many waveform
viewing tools do not make displaying floating signals as easy as they should.

Figure 1-1 Traditional test set-up used when simulating a differential amplifier

−+ + +
−+ Vdm1 Rin1 DUT Rout1
Rin0 Rout0
Vcm +− − −
Vdm2 Rin2 Rout2

The differential source impedance seen by the DUT is Rin1 + Rin2 and the common-mode
source impedance is Rin0 + Rin1 || Rin2. Similarly, the differential load impedance seen by the
DUT is Rout1 + Rout2 and the common-mode load impedance is Rout0 + Rout1 || Rout2. Thus,

May 2002 1 Product Version Generic


A Test Bench for Differential Circuits

controlling the source and load impedance involves setting several resistor values. To
maintain differential symmetry, one must always assure that Rin1 = Rin2 and Rout1 = Rout2.
Again, maintaining these relationships is both a bother, and a potential source of errors. In
addition, there is a lower bound on the common-mode impedances that is set by Rx1 || Rx2.

This test bench is improved somewhat in Figure 1-2. In this case, the negative input to the
amplifier is created using a controlled source that mimics the voltage on the positive input. In
this way, to specify a differential input you only need set the voltage on one source, which
reduces the effort needed to adjust in the input and reduces the chance of error. In addition,
the floating output voltage is converted to a ground-referred signal with a controlled source.
This addresses some of the issues of the test bench of Figure 1-1, but not all. In particular,
you would have to specify the input on the differential sources as half the desired differential
input voltage, a possible source of confusion and error. In addition, while a ground-referred
version of the output voltage is now available, one would still have to go through the trouble
of making differential measurements for the input voltage and both the input and output
currents if they were desired.

Figure 1-2 Somewhat improved test set-up for simulating a differential amplifier.

−+ + +
−+ Vdm1 Rin1 DUT Rout1
Rin0 Rout0
Vcm +− − −
Vdm2=Vdm1 Rin2 Rout2
+

vod Voutd= vod


The New Test Bench


Imagine that instead of constructing a test bench for differential circuits using a combination
of simple resistors and voltage sources as in Figure 1-1, that one had an ideal block that
maps between two distinct ground-referred signals and a balanced pair of signals. The two
distinct signals would represent the differential- and common-mode components of the
balanced signals. Thus, if vd and vc represent the distinct signals representing the differential-
and common-mode components, and vp and vn make up the balanced pair of signals, then

(1-1) differential-mode voltage vd = vp – vn

(1-2) common-mode voltage vc = (vp + vn)/2

(1-3) positive voltage vp = vc + vd/2

(1-4) negative voltage vn = vc – vd/2

May 2002 2 Product Version Generic


A Test Bench for Differential Circuits

Now, while we are dreaming, lets further imagine that the block does the same mapping for
the currents, and so

(1-5) differential-mode current id = ip – in

(1-6) common-mode current ic = (ip + in)/2

(1-7) positive current ip = ic + id/2

(1-8) negative current in = ic – id/2

Then a test bench could be created for a differential circuit that allows you to easily create
differential- and common-mode stimuli, probe differential- and common-mode responses,
and set the differential- and common-mode source and load impedances. Such a test bench
is shown in Figure 1-3.

Figure 1-3 New test bench for differential circuits

−+ d p + + p d
Rid DUT Rod
Vdm
−+ c n − − n c
Ric Roc
Vcm

This balanced/unbalanced converter, or balun, can be constructed with two ideal


transformers, as shown in Figure 1-4. The implementation of an ideal balun using a Spectre
subcircuit is given in below.

The figure below shows a balun for converting ground-referred differential-mode (d) and
common-mode (c) signals to balanced positive (p) and negative (n) signals. Ideal
transformers are used, and so the balun works and is accurate at all frequencies, including
DC.

May 2002 3 Product Version Generic


A Test Bench for Differential Circuits

Figure 1-4 Balun for converting ground-referred differential-mode (d) and common-
mode (c) signals to balanced positive (p) and negative (n) signals
2:1 P

2:1 N

Balun for Spectre implemented using ideal transformers


// BALUN
//
// A bidirectional balanced-unbalanced converter.
// Maps between the unbalanced signals d and c and the balanced signals p and n.
simulator lang=spectre
subckt balun (d c p n)
T1 (d 0 p c) transformer n1=2
T2 (d 0 c n) transformer n1=2
ends balun

Notice that the balun is bidirectional. Either the unbalanced signals (d for differential mode
and c for common mode) or the balanced signals (p for positive and n for negative) can act
as the inputs or the outputs. This means that the same circuit is used at the input of a
differential amplifier to convert the stimuli to the balanced form needed to drive the amplifier,
and at the output to separate the balanced output into distinct differential-mode and common-
mode signals for easy measurement. Furthermore, since it is implemented with ideal
transformers the balun works for all frequencies, including DC. This is a feat that is not
possible using real transformers.

With this test bench, driving the DUT with a differential stimulus only requires setting the
stimulus on one source. Similarly, the differential- and common-mode input and output
voltages and currents can all be observed by probing at one point. Finally, one controls the
differential- and common-mode source and load impedances by specifying the value of a
single resistor for each, and they are completely independent of each other.

Applying the Test Bench


Consider a slightly enhanced test bench as shown in Figure 1-5. In this version, output
sources have been added so that the bias point at the load can be controlled. They will also

May 2002 4 Product Version Generic


A Test Bench for Differential Circuits

be used when measuring output impedance. The first step in tailoring the test bench to a
particular DUT is to determine the needed differential- and common-mode source and load
impedances, and setting Rid, Ric, Rod, and Roc accordingly. Then determine the needed bias
points and set the DC levels of Vid, Vic, Vod, and Voc accordingly.

Figure 1-5 Test bench for differential circuits

−+ d p + + p d +−
Rid DUT Rod
Vid Bi Bo Vod
−+ c n − − n c +−
Ric Roc
Vic Voc

For example, if one were testing an LVDS buffer, one might set Rid = Rod = 100 Ω, Ric = Roc
= 10 kΩ, Vid = Vod = 0 V, and Vic = Voc = 1.2 V.

Gain
To measure differential-mode gain using an AC analysis, set the AC magnitude on Vid to 1 V
and on all other sources to 0. For simplicity, assume that this is a low frequency application
and both Rid and Ric are 0 Ω. Perform the AC analysis. Then the differential voltage gain is
identical to the voltage at the d terminal of Bo (because the input amplitude was set to 1 V).
(If Rid were not 0 Ω, then the gain would be equal to the voltage on d of Bo divided by the
voltage on d of Bi). The differential-to-common-mode conversion is identical to the voltage at
the c terminal of Bo.

To measure the common-mode gain, set the AC magnitude on Vic to 1 V and on all other
sources to 0. The common-mode voltage gain is then identical to the voltage at the c terminal
of Bo and The common-to-differential-mode conversion is identical to the voltage at the d
terminal of Bo.

Input and Output Impedance


One can measure the differential input impedance while measuring the differential gain
(above). During this test the differential input admittance is identical to the current through
terminal d of Bi. Simply take the reciprocal of this current to compute the impedance. (If Rid
were not 0 Ω, then the input impedance would be equal to the voltage on d divided by the
current through d.) Similarly, one measures the common-mode input impedance during the
common-mode gain test by taking the reciprocal of the current through terminal c of Bi.

To measure the differential output impedance, set the AC magnitude on Vod to 1 V and on all
other sources to 0. The output impedance is then equal to the voltage on terminal d divided

May 2002 5 Product Version Generic


A Test Bench for Differential Circuits

by the current through termial d, both of Bo . Measure the common-mode output impedance
by setting the AC magnitude on Voc to 1 V and on all other sources to 0. The output
impedance is then equal to the voltage on terminal c divided by the current through terminal
c, both of Bo.

Other Quantities of Interest


All interesting performance metrics of a differential amplifier can be measured with the test
bench of Figure 1-5. For example, one can apply pulses to either input to determine the
differential- or common-mode step response, one can perform a noise analyses, one can
perform s-parameter analysis [2], or one could even use the ideas in Section 3.4.1 of [1] to
measure the 4 feedback parameters (open-loop gain, closed-loop gain, loop gain, and
feedback factor) of a feedback amplifier.

Summary
Figure 1-5 is a general purpose test bench for differential circuits that in general is easier and
less error prone to use than other, more traditional, test benches.

References
1. Kenneth S. Kundert. The Designer’s Guide to SPICE and Spectre. Kluwer Academic
Publishers, 1995.
2. Ken Kundert. Measuring S-Parameters of a Differential Mixer. Available from
www.designers-guide.com.

May 2002 6 Product Version Generic

You might also like