Calibration Commands
Commands for performing VNA calibration and managing calibration data.
Perform calibration measurements or control calibration state.
Syntax
Section titled “Syntax”cal [operation] [value]Operations
Section titled “Operations”| Operation | Description |
|---|---|
open | Measure OPEN standard |
short | Measure SHORT standard |
load | Measure LOAD standard |
thru | Measure THRU standard (S21) |
isoln | Measure isolation (S21) |
done | Calculate error terms and apply |
reset | Reset calibration data |
on | Enable calibration correction |
off | Disable calibration correction |
data <n> | Output calibration data for type n |
Calibration Types
Section titled “Calibration Types”| Index | Type | Standard |
|---|---|---|
| 0 | CAL_LOAD | 50 ohm load |
| 1 | CAL_OPEN | Open circuit |
| 2 | CAL_SHORT | Short circuit |
| 3 | CAL_THRU | Through connection |
| 4 | CAL_ISOLN | Isolation |
Example Session
Section titled “Example Session”ch> sweep 1M 100M 101ch> cal openopench> cal shortshortch> cal loadloadch> cal thruthruch> cal donedonech> save 0Calibration Data Format
Section titled “Calibration Data Format”ch> cal data 00.001234 0.0056780.001245 0.005689...Each line contains real and imaginary parts for one sweep point.
Save current calibration and settings to flash memory slot.
Syntax
Section titled “Syntax”save <slot>Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
slot | Calibration slot number (0-4 for F072, 0-6 for F303) |
Examples
Section titled “Examples”ch> save 0ch> save 3What Gets Saved
Section titled “What Gets Saved”The properties_t structure is saved, containing:
- Calibration data for all standards
- Frequency range (start, stop, points)
- Electrical delay settings
- S21 offset
- Trace configurations
- Marker positions
- Current calibration slot number
- Checksum
Slot Capacity
Section titled “Slot Capacity”| Target | Slots | Size per Slot |
|---|---|---|
| F072 | 5 (0-4) | 0x1800 (6 KB) |
| F303 | 7 (0-6) | 0x4000 (16 KB) |
recall
Section titled “recall”Load calibration and settings from flash memory slot.
Syntax
Section titled “Syntax”recall <slot>Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
slot | Calibration slot number |
Examples
Section titled “Examples”ch> recall 0ch> recall 3What Gets Loaded
Section titled “What Gets Loaded”All data saved by save command:
- Calibration coefficients
- Sweep settings
- Trace/marker configuration
Behavior
Section titled “Behavior”- If slot contains valid data, loads and applies it
- If slot is empty or corrupted, reports error
- Triggers sweep restart with loaded settings
Verifying Slot Contents
Section titled “Verifying Slot Contents”After recall, use these commands to verify:
ch> sweep1000000 100000000 101
ch> trace 00 1 0 1 1.000000 7.000000Calibration Data Structures
Section titled “Calibration Data Structures”Error Term Array
Section titled “Error Term Array”Calibration data is stored as complex values per sweep point:
float cal_data[CAL_TYPE_COUNT][SWEEP_POINTS_MAX][2];Calibration Status
Section titled “Calibration Status”The cal_status byte indicates which calibrations are valid:
| Bit | Mask | Calibration |
|---|---|---|
| 0 | 0x01 | LOAD |
| 1 | 0x02 | OPEN |
| 2 | 0x04 | SHORT |
| 3 | 0x08 | THRU |
| 4 | 0x10 | ISOLN |
Full 1-port cal requires bits 0-2 (mask 0x07). Full 2-port cal requires bits 0-4 (mask 0x1F).
Error Term Calculation
Section titled “Error Term Calculation”When cal done is executed:
- Calculates 1-port error terms from OPEN, SHORT, LOAD
- Calculates 2-port error terms from THRU, ISOLN (if available)
- Sets
CALSTAT_APPLYflag to enable correction
Calibration Interpolation
Section titled “Calibration Interpolation”If sweep range differs from calibration range:
- RANGE mode ON: Interpolates calibration data
- RANGE mode OFF: Uses closest calibration points
Control via menu: CALIBRATE > RANGE
Or via config command:
ch> config range 1Enhanced Response Calibration
Section titled “Enhanced Response Calibration”For S21 measurements with limited standards:
- Perform THRU measurement only
- Calculate response correction
Enable via menu: CALIBRATE > ENHANCED RESPONSE
Non-50 Ohm Systems
Section titled “Non-50 Ohm Systems”If using non-standard load impedance (requires __VNA_Z_RENORMALIZATION__):
ch> config loadr <ohms>Example for 75 ohm system:
ch> config loadr 75ch> cal load... (connect 75 ohm load)Source Code Reference
Section titled “Source Code Reference”Calibration commands in main.c:
cmd_cal: lines 2400-2500cmd_save: lines 2502-2530cmd_recall: lines 2532-2570
Calibration math in main.c:
apply_CH0_error_term: lines 900-950apply_CH1_error_term: lines 952-1000cal_interpolate: lines 1002-1100