Monday, November 28, 2011

How to Make an Oscilloscope into a Network Analyzer

Ever been searching for a network analyzer but couldn’t find one nearby?  Ever wanted to measure the front-end response of your oscilloscope, but didn’t know how?  A network analyzer can do a lot of things, but one of the most common tasks is insertion loss.  Believe it or not, there is an easy way to do insertion loss without a network analyzer, and all you need is….
an oscilloscope with a math system and a fast risetime pulse.
The traditional way to measure the frequency response of an oscilloscope is to feed a pure sine wave from a signal generator into the oscilloscope channel.  Since the generator likely not perfectly level (especially at the end of the cable with a scope load on it), a power splitter is placed right on the oscilloscope front end.  Half of the signal is diverted to a power sensor.   The signal generator is set to a frequency (like 1GHz) and the user records the peak-to-peak voltage on the oscilloscope and the true power on the meter.  Then, the generator is moved to 1.1GHz and the process repeats.  While you can do this test manually, an external PC using GPIB makes it a lot faster...  It's kind of like building your own network analyzer.

It is slow but accurate, and results in plots like the one below from a Tektronix TDS6154C.  This bode plot from a published white paper was likely produced from a calibration station making a measurement similar to above.

So how do we do all of this right on the oscilloscope with a fast rising pulse?

To explain, an infinitely fast rising edge should contain all frequencies from DC to infinity.  Anything that slows or rounds the edge, whether it’s the characteristic risetime of the oscilloscope or the insertion loss of a cable (often called S21) is due to lost frequencies.  By taking the FFT of the derivative of the edge, we can see the entire bandwidth response of the system.  To characterize an oscilloscope, you need a pulse significantly faster, hopefully at least 2x times faster than the risetime of the oscilloscope.
Now, bear in mind that the result you get won’t be the actual bode plot of the front-end response because that is measured with sine waves, and the response of a system to a pure sine is different than its response to an “infinite” edge.  In fact, I once tried this technique to measure a MEMS comb filter, and found that there was insufficient energy at the right resonate frequency to get anything through.  Oscilloscopes are not specified with impulse response but rather bandwidth, and the risetime is mathematically related (this is a contentious point amongst manufacturers, but the equation "bandwidth = 0.35 / risetime" gets you close).  Hence, a 2.5GHz oscilloscope should have about a 140ps risetime.  Now this rule depends on the roll-off of the scope amongst other things – it gets you in the ball park, but is not an exact number.  Look at the footnote on an Agilent or Tektronix datasheet, and you will see that while bandwidth is a guaranteed measured specification, risetime is always "calculated from bandwidth".  It is generally not measured directly.
So first, put the rising edge in CH1 with extra time on both sides to get the low frequency content and reflections (unless the pulse generator is very non-flat between pulses, in which case you don’t want to include the generator slope).   In MATH1, do a derivative of the channel.  On a Tektronix oscilloscope such as this DPO5104, it’s MATH1=DIFF(CH1).

In MATH2, do an FFT of the derivative, or MATH2=SpectralMag(MATH1).  Since the default vertical scale on a Tektronix oscilloscope is 20dB/div, I adjusted this one to 1dB/div.  Also note that since I am at 10GS, the FFT covers 5GHz (10/2), but the useful information is under 2GHz since this is just a 1GHz scope (there is signal above 1GHz, but it is below 3dB attenuated).  In the follow display, the purple line is my front-end response.

In this example, I have 2 cables I want to compare to see which one is more lossy.   I am using a 12.5GHz oscilloscope for this measurement at 50GS/s, a Tektronix DPO71254C.  The pulse originates from a Tektronix AWG7122C, which should have intrinsic risetime of 35ps.  First, I want to know how good first cable performs, so I connect the AWG to the scope and test it out.  Here is the derivative shown in orange:

And MATH2 is the bode plot of the first cable I am using to evaluate my generator.  It’s not very good and hits 3dB around 3GHz (my vertical scale is 3dB/div).

My next step was to save MATH2 to REF1 and then connect my second cable in the path with my now measured cable.  The purple trace in M2 now shows the total loss.  The white trace is REF1, my original measurement.  But using MATH3 to subtract the two, I have in MATH3 the difference plot showing how much worse my second cable performs.

I did another interesting experiment when I sat in front of a LeCroy WaveMaster 816Zi for the first time a few years ago.  I didn’t have much equipment with me, and was fascinated by the 3 different DSP settings, labeled Pulse, Flatness, Eye.  A Tektronix oscilloscope has DSP ON and DSP OFF.  Most performance oscilloscopes do not have more than 1 DSP setting, so I wanted to know their effect on the bode plot of the scope.  I didn’t have time to sweep the entire front end, so I used a Tektronix DSA8200 with 80e10 TDR head to pulse (7ps risetime) on an oscilloscope with a specified 28.5ps risetime.  Bear in mind, this technique does not verify the flatness of the scope to specification, but does give a good idea of how the DSP setting change response.

Below is a 7ps pulse on a 28.5ps risetime scope.  It is interesting to note that FLATNESS (in green) has a ton of pre-shoot (ringing before the edge), characteristic of a DSP filter that is boosting the risetime to improve high frequency response.  Indeed, it reads 28ps, just like the specification says.  PULSE (in yellow) has little preshoot and a lesser risetime, likely to reduce visual distortion on the pulse.

As you can see below, the flatness setting really does just that – it gives flatter response out to 16GHz, but the DSP filter implementation in boosting the higher frequency creates a lot of preshoot, something undesirable for a person who wants to look at just a pulse.  The risetime spec of the scope is given in flatness mode, presumably because the pulse setting sacrifices high frequency response and risetime for faithful pulse replication.

It is interesting to note that there is a 1dB hump near 11GHz.  I thought perhaps my setup must be faulty, but then I read a paper LeCroy published showing their 30GHz raw response.  I’ll link to it here:  See figure 4 on page 3.
According to LeCroy, the bottom 16GHz of their 30GHz scope should be the same as their 16GHz scope (they use an intriguing technology known as "DBI" or frequency doubling to get to 30GHz).  Comparing the response of the WaveMaster 816Zi to the bottom 16GHz of the WaveMaster 830Zi, the same characteristic hump appears at 11GHz in both places.  Of course, I can't see the waveform without DSP applied, so I presume that the DSP improves the response from DC to 8GHz where the LeCroy published white paper makes it look like there might be some signal loss in that area.  It is possible that the 3 DSP modes are used to tradeoff various DSP effects as proper correction of that hump may depend on the application.
The conclusion is that with nothing more than a fast pulse, I can measure a cable, and even measure an oscilloscope well enough to get decent correlation with a white paper that likely involved some pretty involved setup to measure.
You don’t always need a 7ps pulser to make use of this new knowledge.  An inexpensive function generator often has an edge fast enough to measure 100MHz or so in insertion loss.   And best of all, you'll impress your friends when they wonder how you got your oscilloscope to work as a network analyzer!

1 comment:

  1. Yeah Sure , Joel.
    And I can use my 30 V 5 A power supply to roast a turkey.
    Nice but not very useful. If I was that desperate for a NA I could cook one up with a few parts from the ole junk box. And learn a few tricks along the way. I am not being sarcastic. Perish the thought but This use of the scope is too far away from what it is meant to do. And NAs are not that hard to make either.