# Fun with a Vector Network Analyzer

I was fascinated by radio technology from an early age. This may have started when our family become friends with a retired couple near Lake Tahoe; the man had obtained his ham radio license in the 50s, back when this required serious study, and he had a shack full of working gear he built himself. It was magic to me, how a person could send a signal around the world with a circuit they built themselves. By my early teens, our whole family had our ham licenses, and although it has now been many years since I was active, I never lost the urge to really understand RF engineering, and perhaps even get back on the air with a radio I designed myself. Having studied electrical engineering in school, I of course learned the basics, but besides the obvious limits of book learning, my later specialization in signal processing didn't leave many opportunities for hands-on RF experiments.

A useful piece of test gear for RF experimentation is the Vector Network Analyzer, or VNA. These are used to measure the reflection and transmission properties of electrical networks at radio frequencies. Practically speaking, they can measure the gain and phase response of filters and amplifiers, or the complex impedance of an antenna, versus frequency. For many engineers, there is an aura of mystery about VNAs, because not only is RF engineering seen as black magic; VNAs themselves have traditionally been very expensive instruments (like new car expensive), requiring precision-engineered, and also very expensive, "cal kits" to take proper measurements.

Over the years, progress in highly integrated RF components, and Moore's law in digital processing, have made basic VNAs much cheaper to produce. There are now decent VNAs, capable of serious work at 900 MHz and 2.4 GHz (the most common applications in industry), available for less than $1000. At the extreme low end, devices like the$50 NanoVNA offer adequate performance for many ham-radio needs, especially at HF (i.e. below 30 MHz). Thus, my decision to buy and repair a broken 90s-era analyzer, the HP 4396B, was not entirely rational.

The 4396B is one of HP's "combination analyzers" designed for use as a spectrum analyzer, vector network analyzer, and impedance analyzer. Unlike the very popular 8753 series, the 4395 and 4396 analyzers are products of HP's Yokogawa Electric division in Japan. Less is known about them than the 8753s which were designed in the US, and detailed schematics are not available, although the service manual provides a good block-level theory of operation and troubleshooting instructions. (One reason they might be less popular now is the top-end frequency of 1.8 GHz which falls short of the popular 2.4-GHz ISM band.) The 4396B comes from the early LCD era, with an eight-color display, floppy disk drive, GPIB connectivity, and custom firmware running on an M68K.

## Repair

(This is an abridged version of my repair journal on the eevblog forum.)

The condition of my 4396B was described as "powers on, no screen or LEDs." It appeared clean in the photos, and was loaded with options (there aren't many: 010 RF I-V impedance, 1D5 oven oscillator, and 1D6 time-gated analysis). Could it be a simple power-supply issue? The price seemed reasonable, so I decided to roll the dice and find out. Happily, the seller packaged the instrument exceptionally well and it survived the trip to Seattle in fine shape. After verifying the operational condition (no signs of life, as advertised), I removed the top cover and was relieved to see that all of the circuit boards were present and everything looked clean.

Fault isolation tests in the service manual pointed to the A50 DC-DC converter board, and specifically its shutdown circuit. The job of this circuit is to shut down the power supply in the event of an overcurrent condition, or if the fan is not turning. I was able to reverse-engineer a schematic diagram for this part of the A50 PCB, which allowed me to trace the problem to the processing of the fan signal (FAN LOCK). A 10-uF, surface-mount electrolytic capacitor was bad, dramatically shortening a time constant in the circuit and causing a flip-flop to trigger too early. About this time, I found a stash of HP service bulletins for the 4396B, one of which (11A) was titled "Power-on failure due to a stressed capacitor on the DC-DC converter board"---bingo!

I replaced all of the 10-uF SMT capacitors on the board, plugged everything back together, powered up, and success---the analyzer was alive! All of the power-on self tests passed, so I started working through the "external tests" in the service manual. Alas, some of them failed, and they seemed to point to a leveling problem at the sweep output (S port). There was a big hole around 136 MHz where the RF output was dropping out.

Further investigation ruled out the ALC (automatic level control) loop, and the problem also seemed to be intermittent. The breakthrough came when I discovered that pushing on the output N connector just right could make the problem come and go. Something was obviously broken inside. This turned out to be a short section of semi-rigid coax with SMA connectors; one of the joints had cracked and was making intermittent contact. Replacing this with a flexible SMA jumper cured the problem and all of the tests were passing.

While I had the analyzer open, I rejuvenated the front-panel buttons by abrading their carbon "pills" and cleaning the circuit-board contacts they press against. I also replaced the scratched and foggy plastic window over the LCD with a piece of anti-reflective "museum glass" cut to size. Now the analyzer looks and feels like new!

## DIY calibration standards

Before it can make accurate measurements, a VNA must be calibrated. Calibration is normally performed before each measurement session, after the instrument has warmed up, by measuring a set of known standards, or "calibration artifacts." Given these data and the standards' known characteristics, an error model of the VNA can be solved and used to correct subsequent measurements. Many different calibration methods are available; they differ mainly in the choice of error model and the number and type of standards needed to fully determine the unknowns. The most common method, and the only one supported on older VNAs, is SOLT (or OSLT), which stands for Short, Open, Load, Through. The OSL standards are connected to each VNA port in turn, then the ports are connected together (possibly through an adapter) for a through measurement.

The standards need not be perfect, but any imperfections must be accurately known ahead of time. For example, a "short" standard should have zero ohms impedance and perfect reflection at all frequencies, but in reality it will start to look somewhat inductive at hundreds or thousands of MHz. This is acceptable as long as the exact reflection coefficient versus frequency can be supplied to the calibration algorithm. Calibration kits---collections of the necessary, well characterized standards---tend to be quite expensive, sometimes almost as expensive as the VNA itself.

Fortunately for amateurs, DIY calibration kits are a practical alternative at low frequencies. ("Low" in this context could mean as high as 1 or 2 GHz depending on the care and skill of the builder.) The basic idea is to construct the best (lowest parasitics) standards possible, then measure their true characteristics with an already-calibrated VNA. Claudio Girardi, IN3OTD, has developed a nice Octave script which will fit these data to the model used in older HP VNAs. Assuming good fits are obtained for all of the standards, the resulting model parameters can be entered into the VNA as a custom cal kit. This effectively transfers the accuracy of a known-good cal kit to an unknown, DIY kit.

Alternatively, by transferring the raw measurement data to a PC, the VNA's built-in calibration can be bypassed. Calibration is then performed retrospectively using a tool like scikit-rf. With this approach, advanced calibration methods which are not supported on the VNA itself may be used, and with a DIY cal kit it is not necessary to perform a fit to the old HP model parameters. (The only reason those parameters exist is because early VNAs did not have the computational ability to use measured S-parameter data on each cal standard directly.)

I built a set of open, short, and load standards from board-edge female SMA connectors, very much like Claudio's, soldering them into an Altoids tin for easy accessibility and storage. (My through standard is an off-the-shelf SMA female-female adapter, Rosenberger 32K101-K00L5, not shown in the photo.)

A friend at work kindly offered to loan me his cal kit (a Copper Mountain S911) so I could characterize my standards. Summarizing the procedure:

• Look up the data sheet for the Copper Mountain cal kit; enter kit parameters into VNA.
• Perform VNA calibration using the Copper Mountain cal kit.
• Measure and save S11 for the DIY open, short, and load.
• (Option 1) Use Claudio's Octave script to fit model parameters for the DIY open/short/load; enter them into the VNA when using the DIY cal kit to calibrate.
• (Option 2) Use the measured S11 (saved as Touchstone files) to calibrate uncalibrated measurements in scikit-rf.

(The Rosenberger through has been characterized by others; the only important parameter is its electrical delay, which is 42.35 ps.) Here are the modeling results, with the actual S11 magnitude in red, and the parameterized S11 in blue:

I was quite pleased with the raw performance of my DIY cal kit. The model fit cannot track every kind of non-ideal behavior---this is particularly seen in the short---but performance is at least adequate over the 1.8-GHz bandwidth of my VNA, and very good in the low-frequency region where I will mostly stay. For the load, the HP 4396B permits an arbitrary impedance to be specified; I took advantage of this to improve its performance by measuring and using the DC resistance value, which is not quite 50 ohms.

## Test board and in-fixture measurements

The standard SOLT calibration suffices for testing RF components with coaxial connectors--for example, an antenna with feedline, or a finished RF preamp. Often, however, we want to know the RF performance of individual devices: resistors, capacitors, inductors, and transistors. In those cases, the DUT (device under test) is usually soldered to a test PCB with coax connectors at the edge and microstrip transmission line running to the DUT. A naive measurement made at the connectors will conflate the parameters of the DUT with the parameters of the connecting structures. What we need is some way to calibrate out the connectors and PCB traces, or in VNA-speak, we want to move the reference planes from the connectors to the actual DUT.

Agilent published a great application note on this subject, AN 1287-9 In-fixture measurements using VNAs. Another excellent resource is Henrik Forsten's blog, particularly his walk-through of TRL calibration using scikit-rf. As a learning exercise, I decided to make a test board with a variety of calibration structures allowing me to experiment with these techniques.

To be continued...