Hello Everyone,
In this post I will describe how I adjusted the preselector filter YTF / RYTHM on my E4407B. It is a description which has to be put into open-source friendly code
Symptoms:The spectrum analyzer does not present correct signal amplitude in the frequency range >3GHz. The signal amplitude is decreasing with increased frequency.
Quick check:To check if your analyzer has the YTF misaligned, set the center frequency to a frequency where the amplitude is not correct, but still visible, in my case 5GHz was about 15dB lower than expected amplitude for an input of 5GHz, -20dBm.
Set the span to 250MHz, resolution bandwidth 1MHz.
Press AMPLITUDE -> Y Scale -> Preselector Center on the spectrum analyzer.
The spectrum analyzer will sweep the YTF DAC around the center frequency, attempting to maximize the signal at the center frequency.
If successful, your amplitude should be closer to the correct level.
Calibration procedure:You need a frequency source that can generate at least 2-20GHz for this procedure, preferrably also connected to your PC so you can script the operations.
Connect your spectrum analyzer to your PC using GPIB.
Use the DIAG:CAL? NNN,N\n SCPI command to extract your original YTF DAC polynomial data. These reside in the following registers:
132,0 YTF TUNE A0
132,1 YTF TUNE A1
132,2 YTF TUNE A2
132,3 YTF TUNE A3
The coefficients represent a polynomial which takes frequency in Hz (3.0Ghz - 27GHz) as input and outputs the 16-bit DAC value (0-65535). My polynomial coefficients were
-192.18894, 2.2079824e-6, -1.0678219e-18, 3.366169e-29
Which gives the following graph when evaluated for 3.2 - 27G

To extract the data needed to adjust the polynomial, the input frequency should be stepped with a constant amplitude (-20dBm).
For each frequency in the sweep, the preselector should first be tuned using the SCPI command SENS:POW:RF:PCEN\n.
Then, the YTF offset frequency read out using the SCPI command SENS:POW:RF:PADJ?\n.
I swept my signal generator at 3.2G, 4G, 5G, 6G ... 20G. The 3.2G is to be sure that the High/low frequency selector is set to the high band.
With the YTF offset frequencies in hand, the next step is to evaluate the DAC polynomial with:
DAC(input_frequencies + YTF_offset_frequencies) = DAC_setting_new
To get the new polynomial, do a polynomial fit using the DAC_setting_new and the input_frequencies arrays.
With the new polynomial settings you can replace the RAM values on your spectrum analyzer using the SCPI command
DIAG:CAL nnn,n,xxx.yyy\n SetStateEEPROMData (RAM), nnn,n = address, xxx.yyy = new value
Where the addresses are the same as above and xxx.yyy should be your new polynomial coefficients.
Take your spectrum analyzer for a testdrive at this point, checking that the input signal has better signal amplitude than it had before. You can reboot the spectrum analyzer to restore the old polynomial coefficients.
EXPERIMENTAL:When you are happy with the coefficients it is time to put them into EEPROM. At this point I have to admit I am not entirely certain how this worked, but I will try to explain my steps and I will edit this post when the method has been verified by someone else.
Upload my polynomial settings using the commands above.
Next. unlock the EEPROM using the SCPI command DIAG:CAL:BEG\n. I believe there is a waiting period here, perhaps OPC? or something can be used.For each coefficient repeat:
Reaffirm the polynomial settings using the DIAG:CAL nnn,n,xxx.yyy\n
Store the coefficients using the DIAG:STORE nnn,n\n (might be DIAG:CAL:STOR nnn\n, have to check)
Lock the EEPROM again with DIAG:CAL:END\nReboot the spectrum analyzer and read out the YTF polynomial coefficients to see if they are now stored in EEPROM.
EDIT:
Struck out the EEPROM unlock / lock commands. Apparently they are not needed / misleading.
Best regards,
AIY