Skip to content

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

  1. Pre-run checklist complete; test section empty (no model). Tunnel is allowed to spin freely.
  2. Run code/wind_tunnel_control/ref1_sweep.ps1 from PowerShell. The script writes a sequence of REF1 values and records the drive's frequency feedback (parameter 01.02 or similar — see the script's source for the exact register).
  3. The output CSV has columns: REF1, drive frequency (Hz), drive speed (RPM).
  4. Fit a line REF1 = k × drive_RPM. The fit should be linear through the origin with a slope near 22.42.
  5. Compare to the previous calibration. If the slope has changed by more than 1 %, replace the constants.

Refresh drive_RPM ↔ wind_speed

  1. 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.
  2. Output CSV has columns: setpoint RPM, drive RPM, static pressure (Pa), wind speed (MPH or m/s).
  3. Fit a line MPH ≈ a × drive_RPM + b for drive_RPM > 300 (below that the transducer is in its noise floor).
  4. Compare to the previous fit. If a or b have 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:

  1. code/adcl_winsoft/src/adcl_winsoft/vfd/controller.pyREF1_PER_RPM constant.
  2. code/wind_tunnel_control/WindTunnelControl.ps1 — search for 22.42.
  3. 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>.csv and captures/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".