maandag 22 april 2019

Mirrors and spurs in Spectrum Analyzers

While analyzing the quality of a signal generator the SA shows a number of components next to the base frequency at 6.18MHz.. 
There are multiple causes for these components. The first obvious are harmonics generated either by the generator or internally in the SA.
A second cause is the generation of unwanted mixer products from the various LO's in the SA.
A third cause are mirrors where the quality of the IF filters is insufficient to suppress the opposite mixer output.
A real life example is this measurement




Which of the signals are real?
A common way to reduce spurs and mirrors is to wobble the intermediate frequencies of the SA and use exponential averaging to smear the energy of the unwanted signal over a wider range.
As you can see enabling this form of spur reduction does have some impact. The signals a 46MHz and 10MHz are almost gone




The IMD2 and IMD3 measurements at 12.33MHz and 18.48MHz remain at -42dB and -53dB but how to be sure these are from signal generator and not generated in the SA?
The simplest way to check is to enable some attenuation. Adding -10dB again changes the picture. The noise floor moves up 10dB. 
Most harmonics did go down as is reflected in the IMD2 and IMD3 measurement so the SA did generate most of the harmonics.




A further increase of the attenuation does not change the IMD2 and IMD3 so we can be fairly sure we are now seeing the real content of the signal from the signal generator.
The peak at 42.83MHz should be at 43.26 (=7*6.18MHz) to be a harmonic (its actually the small peak to the right). In fact it is not from the signal generator but from the PC keyboard laying in top of the coax

Building a Spectrum Analyzer resolution filter

The narrowest resolution filter of my spectrum analyzer did not perform as expected to I decided to build a new filter.
As I did not want to buy many crystals and go through all the difficult sorting, matching and calculations I decided to go for some crystal filters rather cheaply available on ebay.




In contrast with a receiver a SA resolution filter should not be as steep as possible otherwise you may miss some signal easily when you are using a too large frequency range
The NDK 10F7.5A looked suitable so I bought some. Measuring them on my VNA they al seem to be on the same center frequency (10.7MHz) which is nice!
The input impedance is, according to the datasheet, 1.5kOhm/5pF so using the online matching calculator the matching circuit should be something like this.


The 5pF of the crystal should be subtracted from the calculated value of C1 to get the actual C1
In order to confirm the matching circuit I mounted one of the filters on my universal test jig, connected the VNA and connected a tunable inductor and capacitor of about the correct value.



This simple setup lets you tune all components till you get the right performance.
After some fiddling the polar input impedance chart looked like this


Tuning could still be a bit better but the filter loss is very acceptable


As I had more of these filters the obvious next step is to use more then one. Two connected directly in series with the impedance matching at the input and output of the whole filter I got a rather disappointing result.
Way to wide, not symmetrical and too much loss



But then I remembered about connecting a small capacitor to ground in the middle of the filter



And using this ancient variable capacitor I was able to tune the filter




Adding a third filter stage and tuning for minimum loss created a somewhat wider but certainly steeper filter. I can not yet get rid of the pass band ripple but have not yet tuned the impedance matching capacitors and the input/output impedance is still a bit too high.

woensdag 3 april 2019

The benefits of switchable attenuation for spectrum analyzer measurements

During measurements there may be certain spurs that do not have an obvious cause. Are they caused by limitations of the SA? Or are they present in the input signal?
An example is this two tone measurement of the input IIP3 of a mixer


The many spurs below -70dB are cause by bad shielding of the two signal generators. Without these connected the noise at about -100dB is without spurs
The SA automatically finds the peaks and calculates the input IP3 in two independent ways, the results should be equal but there is some difference.
Left IIP3 is calculatec at +9dB where right IIP3 is calculated at +7.7dB
But can we be sure the IIP3 of the mixer is indeed around +8dB?
The simplest way to know is the add attenuation before and after the mixer.
Attenuation after the mixer did not change anything (as it should) but -10dB attenuation before the mixer resulted in a very different picture.
The measured levels are increase by the level of attenuation to keep the displayed levels equal so the noise floor moves up about 10dB

The results (15dB improvement of IIP3)  is not entirely what was expected as every dB reduction of the input signal level should  increase the IIP3 with one dB.
There is still more to investigate and learn.

Phase noise and the choice of the first IF in a spectrum analyzer

Many of you may have heard about "phase noise" but do you thoroughly understand what this is all about.
I also was not aware of the relevance before I started measuring the performance of the my home build spectrum analyzer.

The 10.7MHz resolution filter (third IF filter) I'm using  has a -50dB width of about 60KHz and a -90dB width of 100kHz when measured on a VNA.
When sweeping this third IF filter in the SA while using a first IF at 2.6GHz a very different filter picture appears

The staircase at the center is caused by the discrete steps of the fractional PLL used for the sweep
From 20kHz offset and -40dB down there are side skirts and even a shoulder at 150kHz from center. (the peak at 120kHz is leakage) where neither the side skirts or the shoulders are visible on the VNA.
These skirts and shoulders are caused by the phase noise of the LO's. Not all energy is in the single intended output frequency but there is also noise generated that reduces when farther away from the intended frequency.
A standard way to measure this phase noise is to remove the first mixer and use the first LO as test signal and scan this LO and use a log frequency scale as can be seen in below plot

What you see is a upper side band scan, the lower side band scan should and actually does looks the same (apart from the small leakage peak)
The horizontal scale is the frequency in MHz from the the LO frequency. The sweep of the first LO is still done lineair so the lower frequencies have less measurement points compare to the higher frequencies.
The first point at 0.01MHz is the full LO signal normalized at 0dB and the first point with offset is at 0.1MHz away from the LO. You can not see the resolution filter details (as can be seen in the first picture in this post) as there are insufficient points in this scan at low frequencies but the noise fall-of when further away from the LO signal is clearly visible till about 10MHz where the phase noise goes below the SA noise floor of -105dB
A practical implication of this phase noise is when you have a strong (0dB) signal 300kHz away from a weak signal the noise floor of the SA will increase from -105dB (right part of scan) to -80dB so the sensitivity of the SA is reduced in the near presence of strong signals.
Do keep in mind that what you see is actually a result of 3 LO's  (first IF at 2.6GHz, second IF at 110Mhz and third IF at 10.7MHz)  so you can not simply attribute all to one LO but the bandwidth of the first and second IF will impact contribution of the second and third LO. This still needs more investigation.

Now what has this to do with the choice of the first IF of the SA? 
Phase noise is caused by noise in the steering of the VCO in the PLL of the LO. If you have a high first IF you need a high output frequency from the LO, in this case of a ADF4351 and a first IF at 2.6GHz  no output dividers are being used. When using a lower first IF frequency (say 110MHz) and using the same ADF4351 the output divider will be 16 and this will reduce the phase noise.
To check this I measured the close phase noise when a first IF of 110MHz is used and you get below picture (first IF at 110MHz and second IF at 10.7MHz and no third IF)

The shoulders have moved down with about 25dB, still not as good as the VNA measurement.
The VNA measurement was done at 10.7Mhz so phase noise is expected to have less impact in the VNA measurement
 
But what about the far out phase noise?
As you can see in below graph the far out phase noise also has gone down.

The divide by 16 of the output of the PLL has increased the steepness of the fall-of of the phase noise.
The phase noise at an offset of 300kHz is at the level of the noise floor so a strong (0dB) signal 300kHz way from a weak signal will have no impact on the noise floor of the SA when using the first IF of 110MHz instead of 2.6GHz

All this implies when building your own SA you should not blindly go for the highest possible first IF. You have to understand the impact of the PLL in the LO's you use and their phase noise and the output divider in relation to the selected IF frequencies. In general having a high first IF will introduce more phase noise and this makes your SA less sensitive in the presence of strong signals. Its probably better to choose the first IF low enough for most measurements and use a down converter for the odd measurement where you have to go higher.