Write the program that recovers the generator speed of wind-turbine drivetrains from the vibration channels alone when the tacho has failed (gear-mesh ridge tracking and phase demodulation on the high- and low-speed records, across gearbox variants, firmware formats, missing channels and tacho faults); it is run on further CMS snapshots with known speed and scored on the speed profile and the order-tracking quality.
harbor run -t reactive-labs/tacholess-speedharbor download reactive-labs/tacholess-speedYou are Sigrun Dahle, condition monitoring engineer in Asset Engineering at Vardholm Energi AS. Vardholm runs the Lysmyra wind farm: 18 Aldervik AV-3.6/132 turbines (LYS-01 to LYS-18) with Hollerup HGX-3600 gearboxes and Tellvik TVK-CM8 condition monitoring systems. Each CMS records vibration snapshots of the drivetrain. Today is Thursday 21 January 2027. Tor Einar Brekke, head of Asset Engineering, wrote this morning:
Until the new probes are fitted, LYS-09, LYS-15, LYS-16 and LYS-18 have no shaft angle, so neither the bearing program nor the gear program can run on them. I want one program that gives the generator speed over the whole of each record, HS and LS, from the vibration channels alone, so that the order tracking can run on it. It must take any snapshot folder as the TVK export writes it, whatever state the tacho channel is in. Run it on the eight records from the four turbines in cms_tacho_fault.
You have 60 minutes. Whatever is in /app/output when the time is up is graded, so keep a working program saved as
you go.
In /app/inputs:
cms_tacho_fault/: the eight snapshots of 20 to 31 December 2026 from LYS-09, LYS-15, LYS-16 and LYS-18, one
folder per snapshot (<turbine>_<yyyymmddThhmmss>), each holding the HS and LS records of that snapshot as .tvr
files.cms/: the 32 routine snapshots of the Q4 2026 export, in the same format, with working tachos.docs/: the bearing procedure SE-CM-02 rev 3, the drivetrain kinematics workbook, the Tellvik export format and
firmware notes, the transfer path survey TP-2019-LYS01, the Aldervik cage-slip bulletin, a bearing datasheet, the
2026 bearing inspection findings, and mail/.cmms/: the 2026 work orders of the farm.scada/: the 10-minute SCADA export for Q4 2026 and its signal list.legacy/: Mats Lundgren's bearing scan and his notes./app/output/shaft_speed.py, run as
python3 /app/output/shaft_speed.py <snapshot_dir> <out.json>
It reads one snapshot folder in the format of those in hand and writes one JSON object:
{"turbine": "LYS-15",
"hs_rpm": [1251.2, 1251.4, ...],
"hs_mean_rpm": 1259.8,
"ls_rpm": [1263.0, 1262.7, ...],
"ls_mean_rpm": 1270.1}
| Key | Content |
|---|---|
hs_rpm |
generator (HSS) speed in rpm during the HS record at t = 0, 0.01, 0.02, ... s from its first sample, up to the last multiple of 0.01 s not after its last sample (640 values for a 6.4 s record) |
ls_rpm |
the same for the LS record at t = 0, 0.05, 0.10, ... s (1024 values for a 51.2 s record) |
hs_mean_rpm, ls_mean_rpm |
mean generator speed over the record, in rpm |
The program runs with Python 3.12, numpy 2.1.3, scipy 1.14.1 and pandas 2.2.3, on one CPU core with 2 GB of
memory and no network, and must finish a snapshot within 10 seconds. It is run as another user from a copy of
/app/output: it may load helper files that you put in /app/output (found relative to __file__), but
/app/inputs is not there when it runs.
/app/output/results/<snapshot>.json for each of the eight snapshots in cms_tacho_fault (for example
/app/output/results/LYS-15_20261220T183425.json): the program's output for that snapshot.
Ingrid Solheim runs your program on 30 further snapshots from the farm's CMS, in the same format, for which the generator speed is known: records from the four turbines in the same weeks, and records from across 2026 on all 18 turbines, most with the tacho channel taken out, some as they came off the CMS. The eight snapshots in hand have a known speed too, and your result files are compared with it in the same way.
For each record, the credit for an error e against a band tol is 1 when e <= tol, falling linearly to 0 at
3 x tol. A snapshot scores the sum of:
| Record | Quantity | Weight | tol |
|---|---|---|---|
| HS | RMS of hs_rpm minus the true speed over the grid |
0.20 | 0.25 rpm |
| HS | order tracking: 1 - R at the HSS gear-mesh order and at three times that order (mean of the two credits) |
0.15 | 0.01 |
| HS | absolute error of hs_mean_rpm |
0.05 | 0.1 rpm |
| LS | RMS of ls_rpm minus the true speed over the grid |
0.30 | 2.0 rpm |
| LS | order tracking: 1 - R at the planetary gear-mesh order and at twice that order (mean of the two credits) |
0.20 | 0.01 |
| LS | absolute error of ls_mean_rpm |
0.10 | 0.3 rpm |
R is the share of the peak at order k (in orders of the generator shaft) that is kept when the record is
resampled at constant shaft angle with your speed: the angle is taken from a cubic spline through your speeds,
integrated from the first sample, and R = |mean over the record of exp(2 pi i k (true angle - your angle))| with
angles in revolutions. The mesh orders are those of the gearbox the turbine had on that date. The credit for a mean
speed counts only when the RMS credit of that record is above zero. A record whose list is missing, of the wrong
length, or holds a non-finite or non-positive value scores 0; a snapshot on which the program fails, runs out of
time or writes no readable JSON scores 0. The final score is 80 % the mean over the 30 further snapshots and 20 % the
mean over the eight result files.