Author Topic: ESA instrument adjustments  (Read 3413 times)

0 Members and 1 Guest are viewing this topic.

Offline AiyTopic starter

  • Regular Contributor
  • *
  • Posts: 74
  • Country: se
ESA instrument adjustments
« on: June 07, 2022, 06:45:15 pm »
Hello Everyone,
While working on my own E4407B I uncovered a few things. My own machine had an untuned YTF in the RYTHM which I have since successfully corrected. I discovered from the N7800 docs that no special equipment is used except an external synthesizer with great enough frequency range and a GPIB interface. I therefore set about looking for hidden commands for the SCPI interface.
Here are some that I have found so far, with my own notes on format/function calls.
Disclaimer: Using these commands can mess with your calibration data, making your unit worse. Please use with caution.

SCPI CommandDescription
DIAG:CAL:ADC?\n Get ADC value
DIAG:CAL? NNN,N\n GetStateEEPROM, NNN,N = address
DIAG:CAL NNN,N,xxx.yyy\n SetStateEEPROMData (RAM), NNN,N = address, xxx.yyy = new value
DIAG:CAL:BEG\n SetStateEEPROMBegin
DIAG:CAL:STOR %s\n SetStateEEPROMStore
DIAG:CAL:END\n SetStateEEPROMEnd
DIAG:CAL:SOUR?\n GetStateCalSource
DIAG:CAL:SOUR %s\n SetStateCalSource
SYST:PASS %s\n SetStatePassword
DIAG:CAL:PIECE %s\n SetStateUpdate
DIAG:OPT %s\n SetStateEEPROMOption
DIAG:PARK:LO?\n GetStateParkLO
DIAG:PARK:LO %d\n SetStateParkLO
DIAG:CARD? %s\n GetStateInformation
DIAG:TEMP? %s\n GetStateTemperature
DIAG:LATC:VAL %f\n SetStateRAM
DIAG:LATC:SEL %s\n ?
DIAG:LATC:VAL?\n GetStateRAM

In addition, I have started mapping out the address space accessible with the DIAG:CAL? nnn,n command. Here a few of the addresses and their corresponding register contents

Address: Description:
43,0 TG CAL OFFSET
43,1 TG CAL SLOPE
111,0 IF CAL LEVEL
112,0 RF CAL LEVEL
112,0 ?
112,1 50 MHZ CAL ADJUST DAC (EEPROM)?
113,0 COARSE SET FREQ REF
113,1 FINE SET FREQ REF
114,0 LO LEVEL DAC (EEPROM)
115,0 COARSE RF GAIN DAC
120,0 BITG LO LEVEL DAC (EEPROM)
121,0 TG CORNER
122,0 TG MOD OFFSET
123,0 TG GAIN
124,0 TG A OFFSET
124,1 TG LB OFFSET
124,2 TG A SLOPE
125,0 TG X OFFSET
125,1 TG X SLOPE
126,0 TG F SLOPE
131,0 FEXT B1 LO LEVEL DAC
131,1 FEXT B2 LO LEVEL DAC
131,2 FEXT B3 LO LEVEL DAC
131,3 FEXT B4 LO LEVEL DAC
131,4 FEXT TG LO LEVEL DAC
131,5 FEXT B5 LO LEVEL DAC
131,6 FEXT MIX LO LEVEL DAC
132,0 YTF TUNE A0
132,1 YTF TUNE A1
132,2 YTF TUNE A2
132,3 YTF TUNE A3
132,4 YTF TUNE EXT 0
132,5 YTF TUNE EXT 1
132,6 YTF TUNE EXT 2
132,7 YTF TUNE EXT 3
133,0 FEXT YTF DELAY OFFSET 0
133,1 FEXT YTF DELAY OFFSET 1
133,2 FEXT YTF DELAY OFFSET 2
133,3 FEXT YTF DELAY OFFSET 3
133,4 FEXT YTF DELAY OFFSET 4
133,5 FEXT YTF DELAY OFFSET 5
133,6 FEXT YTF DELAY OFFSET 6
133,7 FEXT YTF DELAY OFFSET 7
133,8 FEXT YTF DELAY OFFSET 8
133,9 FEXT YTF DELAY OFFSET 9
134,0 B0 REF TEMP PA OFF 0
134,1 B0 REF TEMP PA OFF 1
134,2 B0 REF TEMP PA OFF 2
135,0 B0 REF TEMP PA ON 0
135,1 B0 REF TEMP PA ON 1
135,2 B0 REF TEMP PA ON 2
136,0 B1 REF TEMP 0
136,1 B1 REF TEMP 1
136,2 B1 REF TEMP 2
137,0 B2 REF TEMP 0
137,1 B2 REF TEMP 1
137,2 B2 REF TEMP 2
138,0 B3 REF TEMP 0
138,1 B3 REF TEMP 1
138,2 B3 REF TEMP 2
139,0 B4 REF TEMP 0
139,1 B4 REF TEMP 1
139,2 B4 REF TEMP 2
140,0 LO PRETUNE CONST 0
140,1 LO PRETUNE CONST 1
142,0 FEXT YTF DELAY SLOPE 0
142,1 FEXT YTF DELAY SLOPE 1
142,2 FEXT YTF DELAY SLOPE 2
142,3 FEXT YTF DELAY SLOPE 3
142,4 FEXT YTF DELAY SLOPE 4
142,5 FEXT YTF DELAY SLOPE 5
142,6 FEXT YTF DELAY SLOPE 6
142,7 FEXT YTF DELAY SLOPE 7
142,8 FEXT YTF DELAY SLOPE 8
142,9 FEXT YTF DELAY SLOPE 9
143,0 FEXT BREATHING ROOM 0
143,1 FEXT BREATHING ROOM 1
143,2 FEXT BREATHING ROOM 2
143,3 FEXT BREATHING ROOM 3
145,0 FEXT PULSE WIDTH
145,1 FEXT SWEEP DWELL
145,2 FEXT OVERTUNE FREQ
145,3 FEXT OVERTUNE STATE
145,4 FEXT MIX PULSE WIDTH
145,5 FEXT MIX SWEEP DWELL
145,6 FEXT MIX OVERTUNE FREQ
145,7 FEXT MIX OVERTUNE STATE
145,6 FEXT MIX OVERTUNE FREQ
146,0 B5 REF TEMP 0
146,1 B5 REF TEMP 1
146,2 B5 REF TEMP 2
147,0 EXT MIX REF TEMP 0
147,1 EXT MIX REF TEMP 1
147,2 EXT MIX REF TEMP 2

Perhaps with the community's help we can find out more on these units and work together on keeping them running going forwards.
Best regards

Edit: formatting
« Last Edit: June 07, 2022, 08:58:07 pm by Aiy »
 
The following users thanked this post: siggi, smgvbest, jjoonathan, volvo_nut_v70, ps, mankan

Offline smgvbest

  • Supporter
  • ****
  • Posts: 632
  • Country: us
    • Kilbourne Astronomics
Re: ESA instrument adjustments
« Reply #1 on: June 08, 2022, 12:56:00 am »
Thank you for bringing this over here.
Hopefully we can discover all the SCPI commands and with luck maybe we can come up with some home based calibration procedures.

Did you discover these SCPI commands on the E4407B itself or was it by looking at the TME install?
if on the E4407B how did you locate these?

I looked at previous memory dumps and could not find any of the SCPI commands.   
I assumed they might be on the SIMM models as that where the application code is.

Happy to work with you on this

Sandra
Sandra
(Yes, I am a Woman :p )
 

Offline smgvbest

  • Supporter
  • ****
  • Posts: 632
  • Country: us
    • Kilbourne Astronomics
Re: ESA instrument adjustments
« Reply #2 on: June 08, 2022, 01:26:32 am »
I don't know if this helps any but this is a scan of the Disk7 of the install disks
I don't see any of the commands you found except DIAG:CAL:BEG and DIAG:CAL:END and that was on the FW disks


« Last Edit: June 08, 2022, 01:33:06 am by smgvbest »
Sandra
(Yes, I am a Woman :p )
 

Offline smgvbest

  • Supporter
  • ****
  • Posts: 632
  • Country: us
    • Kilbourne Astronomics
Re: ESA instrument adjustments
« Reply #3 on: June 12, 2022, 02:36:35 pm »
Been thinking of some of what we need to do.
Since we're looking to mess around with calibration values we first need to insure we identify them all then have a method to back them up incase we mess up (and we likely will)

is there any value in dumping the actual eeproms for comparisons?

High Level Steps
  • Identify all parameters that can be read/written to (we have a good start above from Aiy)
  • Create/Maintain list of matching PCB/EEPROM/PROM including different board revisions if needed (use spreadsheet and maintain on groups.in)
  • Routine to backup those parameters by board/revision (don't expect this to be an issue but best to plan for it)
  • Build a library of backups for (just thinking it could be usefull)
  • Create Calibration guide (for each board)
  • Create Calibration program/scripts
  • Repeat 4-5 for each board

Are there any other high level steps we should do

Skills needed.
  • Researchers (those looking for the SCPI Commands and EEPROM locations)
  • Testers (those willing to try on their ESA SA)
  • Programmers (Those who will write calibration programs)
  • Technical Writers (those who will be writing documentation)

Does this cover everything we might need?
Sandra
(Yes, I am a Woman :p )
 

Offline smgvbest

  • Supporter
  • ****
  • Posts: 632
  • Country: us
    • Kilbourne Astronomics
Re: ESA instrument adjustments
« Reply #4 on: June 15, 2022, 01:08:09 am »
I wonder if this topic is would be better in the "Projects, Designs, and Technical Stuff" topic.
Any thoughts?
Sandra
(Yes, I am a Woman :p )
 

Offline volvo_nut_v70

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: ESA instrument adjustments
« Reply #5 on: June 15, 2022, 02:28:28 am »
Is it possible (or make sense) to post a pointer in that group to here?
 

Offline AiyTopic starter

  • Regular Contributor
  • *
  • Posts: 74
  • Country: se
Re: ESA instrument adjustments
« Reply #6 on: June 17, 2022, 06:00:18 pm »
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
1514734-0

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\n

Reboot 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
« Last Edit: May 15, 2023, 07:59:08 pm by Aiy »
 
The following users thanked this post: smgvbest, volvo_nut_v70, mankan, Uunoctium

Offline AiyTopic starter

  • Regular Contributor
  • *
  • Posts: 74
  • Country: se
Re: ESA instrument adjustments
« Reply #7 on: June 17, 2022, 06:06:55 pm »
Hello Everyone,

I have performed a scan with the DIAG:CAL? nnn,n\n command on my spectrum analyzer, a E4407B.
I looped the readout from 0 to 1000.

Note: I scan from 0 to 1000 for the "sub-registers" after the comma, if there is no response from "sub-register" 0 (zero), then I proceed to the next "register". If there are registers hidden that do not start from nnn,0 then I missed them in the scan. The reason I programmed my scan this way was it was too time-consuming :P

Best regards,
AIY
 
The following users thanked this post: smgvbest, ps

Offline smgvbest

  • Supporter
  • ****
  • Posts: 632
  • Country: us
    • Kilbourne Astronomics
Re: ESA instrument adjustments
« Reply #8 on: July 03, 2022, 02:05:11 pm »
@Aiy,

What Additional Boards/Features do you have in your unit beyond the base?

This is basic info on mine
Code: [Select]
E4407B 
FW:A.16.06
Boot Rom: 500
Rom: 16777216 Ram: 33664432
B72:Expansion Memory
1DN: 3.0 Ghz TG, 50 Ohm
1D5: Hi Stability Freq Ref
A4H: GPIB & Parallel

Also, I'm interested in being able to calibrate the Tracking Generator
Sandra
(Yes, I am a Woman :p )
 

Offline mbielman

  • Contributor
  • Posts: 44
  • Country: us
Re: ESA instrument adjustments
« Reply #9 on: May 14, 2023, 02:06:42 pm »
I've been working on software to do this and it all works EXCEPT writing data to the EEPROM.
I've tried the following and various alterations - always get an error. (invalid parameter, missing parameter, etc)
DIAG:STORE nnn,n\n (might be DIAG:CAL:STOR nnn\n

So stuck now!
 

Offline mbielman

  • Contributor
  • Posts: 44
  • Country: us
Re: ESA instrument adjustments
« Reply #10 on: May 15, 2023, 09:12:49 pm »
Got it working! As can be seen from the earlier (edited) post, I removed the DIAG:CAL:BEG (and DIAG:CAL:END) commands and no more errors when saving to EEPROM.
Doesn't make much sense, but that's what I discovered. (at least for MY own E4407B)

I used Python 2.7 for the script. Fortunately the numpy.py library has a polyfit() function to do the work.

It took a while to get the math right. Here is what I did:

for f in calfreqs:
        x[n] = float(f)*1e9
        y[n] = x[n]+float(preselect[n])
        z[n] = A0 + A1*y[n] + A2*y[n]**2 + A3*y[n]**3
        if DEBUG: print x[n], y[n], z[n]
        n += 1

poly = np.polyfit(x, z, deg=3)
poly = poly.tolist()

# these are the new coefficients
A0 = str(poly[3])
A1 = str(poly[2])
A2 = str(poly[1])
A3 = str(poly[0])

In my case, the only sig gen I have that goes to 26GHz is the HP 8350B with the 83595A plug in. These are NOT phase locked so the output frequency is a bit off.
I tell the SA to do a Peak Search, Center the Marker, and read the frequency. Those are saved in the calfreqs array. I then evaluate using the ORIGINAL polynomial
at (calfreqs+preselect offset) and save the result to z[n]. polyfit() then spits out the new coefficients, which are then saved to RAM with DIAG:CAL 132,n.
Finally, these are saved to EEPROM with DIAG:CAL:STOR 132.

I can post the entire script if there is any interest.

regards
 
The following users thanked this post: ps, mankan

Offline mankan

  • Regular Contributor
  • *
  • Posts: 104
  • Country: se
Re: ESA instrument adjustments
« Reply #11 on: January 05, 2024, 01:53:13 pm »
A while a ago I discovered that power measurements were way off on my E4407B. Started reading service manuals and so and all pointed to a faulty RYTHM unit  :(
1972377-0

However last night I did some googling and found this thread and today I started experimenting and scripting.
My signal generator is not very level but with in a 3dB interval, however I figure it cannot be that critical since this is matter of tuning a preselector YIG filter, right?

Anyway, it looks much better now  ;D
1972383-1

Script for doing this is available at my GPIB Playground repo at https://github.com/mankangustafsson/gpib_playground/blob/master/esa_yig_polynom.py.
Use at your own risk. No warranties given.

Many thanks to Aiy and mbielman.
« Last Edit: January 05, 2024, 01:56:21 pm by mankan »
 

Offline mankan

  • Regular Contributor
  • *
  • Posts: 104
  • Country: se
Re: ESA instrument adjustments
« Reply #12 on: January 05, 2024, 08:38:22 pm »
Anyone knows what calibration registers that affects the "Frequency Response" tests or the "Absolute Amplitude Accuracy" tests?
 

Offline mbielman

  • Contributor
  • Posts: 44
  • Country: us
Re: ESA instrument adjustments
« Reply #13 on: January 05, 2024, 09:07:29 pm »
It would be great to have the full list of registers and how they work but I never found that.  :(
Nice work on your adjustments!
 

Offline eb3frn

  • Contributor
  • Posts: 11
  • Country: es
Re: ESA instrument adjustments
« Reply #14 on: December 07, 2024, 10:58:13 am »
Hi

I'm looking your gpib_playground scripts in Github and are great, it will be very useful for me. 

Thanks a lot to share the  info and congratulations for your findings.

73! Iban
eb3frn
« Last Edit: December 07, 2024, 12:35:20 pm by eb3frn »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf