-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document calibration #107
Comments
Note to self: the term "transforms" is not intuitively obvious to me. AFAICT it refers to the linear-in-dB mapping from input/output power in dBm (x) to detector reading in V (or LSB?) (y). We thus have Since the firmware does not expose the detector voltage to the user (wouldn't it be useful to expose this?), only the inferred powers, we need to begin by reading out the current values of the coefficients |
AFACIT, the calibration tool doesn't currently do any of that maths for the user. If a new "transform" (consisting of a slope + offset in units of V/dBm and V respectively?) is not specified, it prints out the current coefficients, otherwise it writes new ones. This is all sufficiently non-obvious that it needs proper documentation. However, it might be easier to make the tool itself a little more user-friendly (e.g. take in x0, P0 and x1, P1 instead). We should also make recommendations for sensible values of x0 and x1 (and should ask TS/CTI to use those same values for consistency). |
NB the expression I get for the slope looks non-equivalent to the one @jordens posted here but I may just be misunderstanding his terminology (or making a silly maths slip...) Either way, it will hopefully become obvious once I run the cal. For completeness I have:
For the offset I get
|
The defaults seem to be: Where did these come from? Were they calculated on the basis of nominal circuit values to give something sensible? What's the recommended procedure for calibrating the reflected power. IIRC we're really not aiming for something accurate here so just a rough calibration for safety purposes. Are the default values expected to be good enough for that? |
Let's have a go then... input power is -20dBm (-18.9dBm on a synth at 100MHz, expect ~+20dBm output given the 40dB gain) gives: Looks like the default for the output power is pretty sensible but the input is quite far off. |
For ~1W output, the reflected power is coming out as Edit: this is just a sanity check on the default (uncalibrated) value being something sensible. |
Okay, the equations I posted above give garbage, but the ones @jordens posted in that issue seem to give sensible results, so I guess I haven't understood how these transforms are intended to functions. Nonetheless, I think I can now get on with calibrating the device. |
NB
|
Here is the hacky code I used to calculate the calibration data to save. NB I didn't bother with the reflected power yet. Hopefully the default values will be accurate enough for my purposes (the output detector looked pretty good without calibration on the one channel I looked at); next time I'm testing Booster I'll use a 3dB attenuator or so to create some VSWR to check. # Input power
old_slope = 42.857143 # V/dB?
old_offset = -26.699999 # V?
x0 = -20 # dBm
x1 = -10 # dBm
p0 = -2.0046154e1
p1 = -9.753845e0
new_slope = old_slope*(x0 - x1)/(p0 - p1)
new_offset = (x0 + x1 - new_slope/old_slope*(p0 + p1 - 2*old_offset))/2
print("input power:", new_slope, new_offset)
# Output power
old_slope = 28.571428 # V/dB?
old_offset = -5.799999 # V?
x0 = +20.65 # dBm
x1 = +29.9 # dBm
p0 = 2.1114285e1
p1 = 3.0285713e1
new_slope = old_slope*(x0 - x1)/(p0 - p1)
new_offset = (x0 + x1 - new_slope/old_slope*(p0 + p1 - 2*old_offset))/2
print("output power:", new_slope, new_offset) |
From booster/src/settings/channel_settings.rs Lines 33 to 48 in 862ce55
So the expected transformation is: My calibration gave: |
For the input, the nominal is @ryan-summers is there an operator precedence issue here? We want |
Nope, not that, just an out of date release... booster/src/settings/channel_settings.rs Line 46 in df89069
@ryan-summers please do flag if releases are way out of date before I spend time debugging issues.... This may also explain the issue I saw with the interlock thresholds. |
Summary AFAICT: Setting and getting the transforms is documented as are the transforms themselves. Computing new calibrated transforms for the user or aiding them in choosing test values isn't. |
Where are the transforms documented? Do you mean the inline comments, or did I miss something?
Yep. |
The help of
To be clear: I don't consider that critical. But as always PRs welcome. |
|
Sorry for this - that was one of the few bugs that was patched after v0.1.0 was generated and has not yet made it into a new release. You can view the changelog from the current mainline to a release by clicking on the "X commits to Unfortunately, this change appears to be listed at the very bottom of the change set. |
Don't worry about it. Rust makes building from source so easy that I should probably have just built my own binary rather than using the release anyway. |
@hartytp Hi, I appreciate that you shared your notes on the calibration procedures. I noted that you did not calibrate the reflected power transform. If my understanding is right, when we apply some high-power 50 ohm load plus a short cable at the output, in practice there should still be power reflected back to the transmitter, but the amount should be at minimal. If we remove the load and cable, using the uncalibrated reflected power readings before and after unplugging the load, can we actually infer the calibrated reflected power with open-circuit load, without the need to probe the output at all? I am taking that Or alternatively, can we still consider the calibration valid if we assume In any case, I get that the output has better not be probed without a high-power load. |
No, sorry I made a wrong statement. The So, when we probe the output with a dummy load and take the measurement as If there's some flaw in my logic, I'm all ears. Thanks! |
Roughly. This is all from memory and I haven't played with Booster for a while so I might be wrong (others should feel free to comment), but IIRC...
|
The calibration script doesn't have enough documentation to be used as is. I think I can figure it out from the issues (see conversation from #104 (comment)) but a few sentences to describe the process would make life much easier.
The text was updated successfully, but these errors were encountered: