Author Topic: Building a 22 GHz network analyzer for under $1000  (Read 7450 times)

0 Members and 1 Guest are viewing this topic.

Offline arlo_g

  • Contributor
  • Posts: 10
  • Country: ca
Re: Building a 22 GHz network analyzer for under $1000
« Reply #25 on: September 20, 2024, 10:31:18 pm »
Looks like a fun project and you have some great parts to work with!

Your photo of the inside of an HP directional coupler is quite interesting. It looks like yours is similar to the 779D couplers. They claimed in the HP journal articles about those that the “arrowhead” metal triangles was important for directivity.     

I think that most high performance VNA’s  since the HP 8510 have used directional bridges for frequencies below mm wave.  Directional bridges can be built with coaxial baluns to deliver 1000:1 frequency ranges, while getting even a 50:1 frequency range with good directivity and uniform coupling out of a directional coupler is pretty heroic.   The Julius Botka “triaxial bridge” patents have a lot of good detail about the very high performance 8510 bridges.  Henrik Forsten seemed to get good performance to 6GHz from his directional bridge build, but I think that he hadn’t fully enclosed them, and higher frequencies are likely a challenge on several fronts.  Since you have nice directional couplers already, it makes perfect sense to use them.

If you wanted to bootstrap your way to a calibration kit, then a coax LRL calibration would be a good place to start.  A single “line” length (assuming you don’t count your 0 length through as a line) only gives a good calibration over an 8:1 frequency range though, so multiple lines, or hybrid schemes like LRM would be needed to cover your full range. 
 

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #26 on: September 20, 2024, 11:40:38 pm »
My plan in the future is to use two different paths, with one going to a high frequency directional coupler and one going into the classic return loss bridge with balun. An RF switch could be used to switch between the two depending on the frequency, which would let you cover both frequencies in the low megahertz and mmwave frequencies.

 

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #27 on: September 25, 2024, 07:57:14 pm »
I finally got the S11 measurement to mostly work. (For some reason my code doesn't work when I try sweeping from 5 - 22 GHz, but it does when I try sweeping from 18 - 22GHz. It also breaks if I try doing more than 201 points).

Calibration was done with the cheap calkit from the LiteVNA. I'm pretty sure it's not good at 22 GHz.

The setup is mostly similar to what I did before, except I'm using some random splitter in my collection to get the reference signal. I'm pretty sure the performance of the splitter isn't critical since any errors will just be calibrated out. The antistatic bag helps increase isolation between the two oscillator boards (I found in my previous tests that adding the bag increased isolation by at least 10dB).

I calibrated everything using the set, then I took off the calibration sets and remeasured them to determine repeatability. It looks like we're doing better than 0.5dB. I also measured a shorted transmission line, which seems correct (we should expect the line to go around the Smith Chart). The shorted transmission line is just two SMA barrels and the short from the cal kit.

I also measured a 10dB attenuator, with the other end open and terminated.

Finally, I verified that my setup was indeed sweeping from 18 - 22 GHz. The amplitude in the picture is a lot lower than expected since the signal had to go through a lot of coax to make it to the spectrum analyzer.




« Last Edit: September 25, 2024, 08:00:32 pm by EggertEnjoyer123 »
 

Offline wilhe_jo

  • Regular Contributor
  • *
  • Posts: 194
  • Country: at
Re: Building a 22 GHz network analyzer for under $1000
« Reply #28 on: September 25, 2024, 08:18:03 pm »
I can't really contribute too much but maybe this could get you a big step forward: https://github.com/scott-guthridge/libvna

13GHz would be a reasonable compromise for be.... That's right above where you can get troubles with 2.4G ISM radio.

But I tend to look into TDR for this because CML Logic seems fast enough for the "heavy lifting".

However, if you need some testing... I have a receiver that can do 26.5GHz and some anechoic room good for double digit GHz is coming soon.

Regards
 

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #29 on: September 25, 2024, 09:56:56 pm »
I fixed one of the software bugs and now I can sweep from 3GHz to 23GHz. Even though my coupler is rated for 12.4 - 18 GHz, there seems to be enough directivity left at lower and higher frequencies for my system to work correctly. The amount of signal coupled out definitely changes, but that doesn't matter and only the directivity matters.

Here are the new plots from 3 - 23 GHz. I also measured the return loss of a 6.2 GHz lowpass filter. I think I need better calibration standards since the LiteVNA ones suck at high frequency.

I also plotted the return loss of a 17.7 - 19.7 GHz isolator, and a WR18 waveguide adapter.

(In case anyone is wondering, I basically programmed my board to act as a LiteVNA, and I am using the NanoVNASaver application to display my result).
« Last Edit: September 26, 2024, 07:40:56 am by EggertEnjoyer123 »
 
The following users thanked this post: joeqsmith

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #30 on: September 27, 2024, 12:19:36 am »
I now have S21 working. An RF switch is used to switch between measuring S11 and S21.

The isolation sucks (maybe -30dB at some frequencies), but that is probably because I have no shielding. All my measurements have zero averaging so far. My C program takes 32 samples at 48 kHz (the IF is 12kHz) and just adds/subtracts every other sample to get the sine and cosine amplitude.

I'm also not sure why the S21 measurement isn't accurate below 6 GHz. I think it might be some weird programming error, because the points seem to be in the same place between sweeps if a 10dB attenuator is added, but without the 10dB attenuator the points jump around. It could also be that I'm saturating my ADC or mixer.

Here are my measurements for a 10dB attenuator, a 17.7 - 19.7 GHz isolator (both directions), a 6.2GHz lowpass filter, and a directional coupler which seems to be a 2-8 GHz coupler with -16dB coupling according to my LiteVNA (coupling and isolation were measured). The isolation is also shown. I wonder if it's possible to build a good RF shield using conductive filament.
« Last Edit: September 27, 2024, 12:24:26 am by EggertEnjoyer123 »
 
The following users thanked this post: tszaboo, joeqsmith

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #31 on: September 28, 2024, 08:16:21 am »
I tried wrapping everything in the tinfoil bags that you get when you buy SMD components. That didn't really help much.

The interesting thing is that the isolation goes up with averaging, so there is some random aspect. Averaging 10 times seems to improve the isolation by around 10dB (the two plots are from an uncalibrated setup, so you can't compare them with my previous results, and the actual isolation is around 5-10dB worse). You can see that the peak goes down, but at other frequencies the isolation is the same, which is what you would expect if the leakage path is deterministic. (If you have a 70dB attenuator connected between the ports, no matter how much averaging you do you will always get 70dB). I've ruled out the issue being the RF switch (which is only rated to 20 GHz) and the mixer leakage, because the problem remained even after disconnecting the reference signal and the reflected signal. It could be the power rails potentially, or maybe the control voltage for the amplifier. Touching the pins with my fingers had no effect though.

The isolation also "increases" after 22 GHz, but that's only because I run out of power to drive the mixers, so the conversion loss increases by 20dB.
« Last Edit: September 28, 2024, 08:23:40 am by EggertEnjoyer123 »
 

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #32 on: Yesterday at 12:24:23 am »
It seems like to get TDR to work, I need to have low frequency data, which I can't do right now without having to splice together S2P files from the LiteVNA.

In any case the software I'm using (NanoVNASaver) does not calculate the TDR correctly. I have submitted a pull request to fix the issue: https://github.com/NanoVNA-Saver/nanovna-saver/pull/715

The software takes the raw S11 data, windows it, and then does an inverse FFT to get the impulse respose from the S11 data. The resulting signal is complex, while the impulse response should be real, so the developer used the absolute value function to make it real. This is the wrong way to do it (for starters, a short and open would look exactly the same, since their S11 values are just negatives of each other, so if you take the absolute value you will get the same result). The correct way is to take the S11 data and append the conjugate of the measured data. Basically, for real signals, the FFT must be symmetric (in that the negative frequencies must be the complex conjugate of the positive frequencies). After adding terms to the end so that the negative frequencies and positive frequencies are conjugates of each other, if you take the inverse FFT, the signal is real, and you get the correct impulse response.

I probably need to design a better VNA which has a copy of the LiteVNA circuit, and some RF switches to switch between the high band (>2 GHz, which I have now) and low band (50kHz - 2 GHz). That way I can do TDR.
 

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #33 on: Yesterday at 04:01:44 am »
I also have a major issue with thermals. At high frequencies I run out of power to drive the mixers, and as a result the conversion loss is highly dependent on the LO amplitude. As everything heats up it seems like the output amplitude goes down. The difference between hot and cold is quite a bit (like about 5dB), but it only seems to be an issue above 21 GHz.

I calibrated my setup, and then power cycled everything a few times. As you can see, for all frequencies below 21 GHz, nothing bad seems to happen. However, since after power cycling the board is cooler, the amount of LO power going to the mixer is higher, which means the conversion loss is lower. If the board is completely cold the peak reaches about 6dB, and drops below 0dB after the board is warmed up more. All frequencies below 21 GHz remain the same though since there is enough LO power to make the conversion loss roughly constant.
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11808
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #34 on: Yesterday at 03:17:52 pm »
...
The software takes the raw S11 data, windows it, and then does an inverse FFT to get the impulse respose from the S11 data.
...

From Brian and CMT, they use chirp-Z transform:
https://www.eevblog.com/forum/rf-microwave/vna-for-cable-characterization/msg5656049/#msg5656049

Offline EggertEnjoyer123Topic starter

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #35 on: Today at 02:53:33 am »
The software I'm using doesn't seem to implement that. I read through the code for the TDR measurements and it just does the IFFT. Nothing fancy.

Anyways I swapped the two mixers and now I seem to have >50dB isolation across the entire band. I'm not exactly sure why this happened. The blue line is what I get when I connect a cable, and the brown line is with nothing connected. The difference should be the isolation. There is a peak in the blue and brown lines near 22 GHz but that is just because the mixers are running out of LO power, and one of them seems to be significantly better at lower amplitude than the other (probably because they're using different diodes). In my next design I'll probably pay $30 more and buy higher power amplifiers.

I'm not sure what's causing the remainder of the error. If I disconnect the ADC the noise floor is around -90 dB, so it's not the ADC. It's not the RF relay either.

Edit: my IF bandwidth is 1.3 kHz. Here is the frequency response of my "filter" (which is just correlating the sequences 1, 0, -1, 0, 1, 0, -1, 0, ... and 0, 1, 0, -1, 0, 1, 0, -1, ... with the received signal at 48 ksps). The IF frequency is 12 kHz.
« Last Edit: Today at 08:07:21 am by EggertEnjoyer123 »
 

Offline smaultre

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
Re: Building a 22 GHz network analyzer for under $1000
« Reply #36 on: Today at 05:43:51 am »
Why don't you try to buy some used HP? VNA 26-40GHz acquisition frontend?
And add some modern, generators, ADC, & PC-based software?
Start a new life here!!!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf