Calibration refresh¶
There are two calibrations to refresh: REF1 ↔ drive_RPM (the speed reference scaling) and drive_RPM ↔ wind_speed (the operating-velocity mapping). Both come from the sweep scripts in code/wind_tunnel_control/.
The procedure is described from the engineering / contributor perspective; the Software → Extending the code page has the per-step recipe (the "Refresh the REF1 ↔ RPM calibration" section).
When to refresh¶
- After any drive parameter change in groups 20 or 22 (limits and ramps).
- After a motor or coupling replacement.
- After a long idle (months without runs).
- When a sanity-check measurement (e.g. spinning at the previously calibrated 400 RPM) drifts by more than ~5 % from the previously recorded wind speed.
Refresh REF1 ↔ drive_RPM¶
- Pre-run checklist complete; test section empty (no model). Tunnel is allowed to spin freely.
- Run
code/wind_tunnel_control/ref1_sweep.ps1from PowerShell. The script writes a sequence of REF1 values and records the drive's frequency feedback (parameter01.02or similar — see the script's source for the exact register). - The output CSV has columns: REF1, drive frequency (Hz), drive speed (RPM).
- Fit a line
REF1 = k × drive_RPM. The fit should be linear through the origin with a slope near 22.42. - Compare to the previous calibration. If the slope has changed by more than 1 %, replace the constants.
Refresh drive_RPM ↔ wind_speed¶
- Without resetting between sweeps, run
code/wind_tunnel_control/rpm_velocity_sweep.ps1. The script sets a sequence of RPM setpoints and reads the static-ring pressure differential — converted to MPH via Bernoulli using the static-ring transducer's calibrated slope/offset. - Output CSV has columns: setpoint RPM, drive RPM, static pressure (Pa), wind speed (MPH or m/s).
- Fit a line
MPH ≈ a × drive_RPM + bfor drive_RPM > 300 (below that the transducer is in its noise floor). - Compare to the previous fit. If
aorbhave changed by more than 5 %, replace the constants.
Update the source of truth¶
The constants live in three places that must be kept in sync:
code/adcl_winsoft/src/adcl_winsoft/vfd/controller.py—REF1_PER_RPMconstant.code/wind_tunnel_control/WindTunnelControl.ps1— search for22.42.docs/manual/content/reference/calibration_constants.md— both constants and the date of the sweep.
Commit the source changes with a message like vfd: recalibrate REF1=RPM*22.51, wind=0.0815*RPM-12.98 (2026-08-12 sweep). Reference the sweep CSV by path in the commit body.
File the sweep results¶
Open a new WT_MS_<n>/ milestone folder (see docs/repository_layout.md). Inside:
README.md— what was calibrated and the result.debug_session.md— chronological notes if anything surprised you.captures/ref1_sweep_<date>.csvandcaptures/rpm_velocity_<date>.csv.
This keeps a historical record of calibration drift over time, which is useful when diagnosing whether a future discrepancy is "the tunnel changed" or "the model changed".