The Run Folder¶
A control run is kept on disk as a run folder: one folder per run, written by the
control service while the run goes, that needs no other file and no running
service to be read. The analysis side converts it into an ordinary project file
(hertzforge convert-run FOLDER, or open the folder or its run.json), so a
finished run reaches every analysis tool with its channel table, its setup, its
log and its measurements. Every control module writes one for every run: the
Random, MIMO Random, Sine, Mixed Mode, Classical Shock, SRS shock, MIMO Shock
and TWR modules, Explorer, Playback and the Recorder.
The exact form is the reader's, hertzforge.io.run_folder; the conversion is
hertzforge.io.run_convert, described in docs/hforge-format.md ("Run Folders
and Their Conversion"). This guide says what is in a folder and the rules it is
written by.
Where It Goes¶
Under the service's data folder: the folder HERTZFORGE_DATA_ROOT names, or
Hertzforge_Data in the home folder. The desktop app shows the folder in the
Station panel and starts the control service with it; a folder chosen there
takes effect at the services' next start (docs/desktop-app.md, "Run
Folders"). A Random run's folder is named
<YYYYMMDD-HHMMSS>_random_<run id>, a MIMO Random run's
<YYYYMMDD-HHMMSS>_mimo_random_<run id>, a Sine run's
<YYYYMMDD-HHMMSS>_sine_<run id>, a Mixed Mode run's
<YYYYMMDD-HHMMSS>_mixed_<run id>, a Classical Shock run's
<YYYYMMDD-HHMMSS>_classical_shock_<run id>, an SRS shock run's
<YYYYMMDD-HHMMSS>_srs_<run id>, a MIMO Shock run's
<YYYYMMDD-HHMMSS>_mimo_shock_<run id> and a TWR run's
<YYYYMMDD-HHMMSS>_twr_<run id>, the time it armed in UTC. A Recorder run's
folder, an Explorer run's and a Playback run's, is the plain name its setup
gives (capture.run_name). The run's state names the folder from arm on
(random.state, mimo_random.status, sine.state, mixed.state, shock.state,
srs.state, mimo_shock.state, twr.state, explorer.state,
playback.state and recorder.state, record.folder).
Layout¶
<run name>/
run.json the manifest
table.json the channel table the run armed with
setup.json the configuration as accepted, and what it resolved to
law/law.json the control law in use
log.jsonl the run's log, one entry per line
streams/<name>/ telemetry.f32 and stream.json
results/<name>.json, <name>.bin, <name>.jsonl
end.json written once, at the end
run.json¶
The manifest: schema (hertzforge-run/1), test, run_uid (unique across
restarts and machines: the time it armed, or a Recorder run started, and eight
hexadecimal digits),
run_id (the service's own id, which repeats after a restart), title,
operator, article, notes, specification (document, clause, when
given), source (SIM or HARDWARE, from the station's class, never absent),
sim for a simulated run (the plant's model, its parameters and its
seed), station (kind, class, devices each with id, model and
serial, and clock), grid (the rate asked for and the rate the station
programmed, the FFT length, averages, line spacing and lines), build
(version, commit, dirty), armed and start (unix seconds,
utc_offset_s, and start.station_frame, the station frame at that instant),
streams and results (what the folder holds, each name and kind, a
stream also its channels), recording (streams on or off, and why when
off), channel_table (the table the run used: its revision and sha256, the
same two table.json holds, so a run names its table without opening that
file; absent from folders written before it) and complete, false until the
run has ended and end.json is written. The converter carries channel_table
into the run record (RunRecord.table_revision, RunRecord.table_sha256).
A Recorder run's manifest has no armed (its start is when acquisition
began), adds metadata (the fields its setup names, each key, label and
value) and, on the simulator, sim.source, the signal its inputs carry in
words. Its grid is the rate asked and programmed, the station's block and
batch, the input group delay in frames, and the analysis rate, line spacing and
lines. Its streams lists each recording as it begins.
The station frame counts the input frames the station has delivered since it started; every stream and log entry is placed by it.
table.json¶
Every row of the channel table the run armed with, enabled or not, in the
protocol's own spelling for a channel row (channels.get), with the table's
revision and the SHA-256 of its rows (sha256), so two runs on one table can
be told to be so.
setup.json¶
config, the configuration exactly as the service accepted it; resolved,
what the service made of it (the profile as anchors in g²/Hz, each with the
alarm and abort bands that hold from it to the next; the level schedule; the
tolerances; every limit and every abort in force with its channel; the control
settings; the control channels; the rate asked for and programmed); derived,
the derived values with the grid the run used; and feasibility, its inputs
and its verdict.
law/law.json¶
The control law in use: its id and name, builtin, its parameters and the
guards it runs under. A law that is a file has its bytes beside it.
log.jsonl¶
One JSON object per line, in order, each appended as the entry is made: seq,
at_unix, frame (the station frame, or null before the station has
delivered one), kind, text (the words the operator saw) and, where it has
any, data: the level of a level change, an alarm's lines and worst excursion,
a trip's facts, an overload's channel, an acknowledgement's words, the action
an operator took and who took it, what a record entry could not write. Every
state change, level change, alarm, trip, overload, override and operator action
is an entry.
In a Recorder run's log, frame is the station frame when the run's thread
passed the entry to the record (it does so ten times a second), not when the
entry was made, and null for the entries made before the first batch; a mark's
entry (mark or overload) has the mark's own station frame and the mark as its
data.
streams/<name>/¶
telemetry.f32: little-endian float32, frame-interleaved, in engineering
units (each channel in its table unit, the drive in volts), no header.
stream.json: kind (inputs, drives or recording), fs_hz, channels
in slot order (each with its table index and unit), first_station_frame,
frames, gaps (each at_frame, its place in the file, and
dropped_frames), complete and fault. A drive stream also says its
output_latency_frames, how many frames after being written a drive sample is
played and whether that is declared by the station or measured; a Random
run adds pipeline_lag_frames, the drive-to-response lag its system
identification measured. A gap is never padded: the samples after it follow on.
A golden folder whose streams were cut to their first frames says so with
cut_from_frames, the frames the run recorded (frames is what the file holds).
A stream of kind recording is one Recorder recording, streams/rec_NNNN/,
numbered in the order they began. Its stream.json adds the recording's own
facts: its name and trigger (start, manual or level),
requested_fs_hz, group_delay_frames, rows and units (the channels'
indexes and units again, in slot order), trigger_station_frame (time zero,
the file frame pre_frames), pre_frames and pre_frames_asked (the
pre-window held and asked), marks (each mark that fell inside it, as
recorder.marks gives them), t0_convention, n_channels, config (the
acquisition and analysis selection it was made at) and, once it is finalized,
writer (the capture writer's ring, chunks written and dropped, flushes, and
the free space at its start and the floor it kept). Its frames is 0 until it
is finalized; the file is the authority on its length. Beside it,
capture.json is the capture writer's own record of the same recording.
A pulse module's stream is a run of shots, and its stream.json lists them in
shots, in the order they were fired: each shot's first_frame (its place in
the file) and frames (what the file holds of it), first_station_frame,
pre_frames (the frames of the shot before its firing), station_frame (the
station frame it fired at, the first plus pre_frames), its level_db, and
what it was (identification or pulse) with its pulse (from 0) and
origin. The marks travel in order with the samples, so a shot's place is the
file's own, a gap included.
results/¶
A result is a set of named arrays: <name>.json describes it (kind,
abscissa, channels by table index, convention for a cross term, and each
array's name, dtype, shape, unit and byte offset), <name>.bin holds
the values (little-endian float64; complex as real and imaginary pairs). A
result that repeats appends a record's arrays to <name>.bin and a line to
<name>.jsonl each time. Cross terms are in the file's convention, conj(X)·Y,
converted once by the control service. Values are in the channels' own units;
the analysis side converts them to SI. A result kept in fixed-length records (a
Sine run's channel_levels and control_trace) fills its last record out with
NaN, and each record's line says how many it holds (points, calls).
end.json¶
run_uid, end exactly as the run's state reports it (outcome, message,
at_s, level_db, trip), at_unix, station_frames, each stream's
frames, drops, gaps and fault, and a closing summary. Written once;
run.json is rewritten with complete: true after it. A Recorder run's adds
run_id, rows (each recorded row's index, mean, rms, peak, crest
and kurtosis over the whole run) and each recording's complete; its
station_frames are the frames acquired.
The Rules¶
- One folder per run, never reused. The folder is claimed at arm by
creating it with a call that fails when it exists; a name that is taken gets
the next free
<name>-<n>. A run never writes into another's folder. - Valid at every moment.
run.json,table.json,setup.jsonand the law are on disk before the first sample; small files are written whole to a temporary name and renamed into place; the log and the streams are appended and synced to the disk every five seconds. A run that stops any way, the service killed included, leaves a folder the reader takes whole, withcomplete: falseand noend.jsonwhen it did not end cleanly. - All writing on one thread. The record has its own writer thread, and every file operation happens there. The run hands it entries and results with a send that never waits. The streams are taken where the station's blocks pass, into buffers made before the run; when the writer has fallen behind and no buffer is free, the block is dropped, counted, and kept as a gap where it happened. Nothing on the control loop's thread touches a file, takes a lock a slow disk can hold, or waits.
- The Recorder's recordings are the exception that proves it. The run
folder's own files are written by the record's writer thread as above; the
recordings under
streams/are written by the Recorder's own record thread, behind a queue of 2 s of frames, and the thread that reads the station hands each batch to it without waiting. Where a control run drops a block and goes on, the Recorder ends its run (docs/recorder.md, "What Ends a Run"): the recording is what it is for. - Self-describing. Every array has a unit, every stream names its channels by table index, and SIM or HARDWARE is stated, never guessed.
- It grows by optional members. A reader ignores members it does not know, and refuses a schema number newer than its own.
When the Disk Fails¶
- At arm. When the folder,
run.json,table.json,setup.jsonor the law cannot be written (a missing or read-only data folder), the arm is refusedrecord_unwritable, naming the path and the reason. Nothing has been driven. - Below the free-space floor at arm (512 MB kept free), the run goes on
without its streams:
run.jsonsaysrecording.streamsoffand why, the log has arecordentry, and the state'srecord.streamsisoff. - While the run goes. A stream that cannot be written, or the free space
falling under the floor (512 MB plus what the streams already hold, which the
converted file needs again), stops that stream: its
stream.jsonnames the fault, the log has arecordentry, and the state'srecord.problemsays it in words. A log line or a result that cannot be written is reported the same way. The run goes on: recording never stops, stalls or aborts a control run. - The end. When
end.jsoncannot be written, the folder keepscomplete: false, and the reader says the run did not end cleanly. - A Recorder run refuses its start under its own free-space floor
(
not_enough_space, before anything is made) and refuses itrecord_unwritable, naming the path and the reason, when the folder,run.json,table.json,setup.jsonorstreams/cannot be made. While it records, a recording that cannot be written, the free space falling under the floor, or a disk so far behind that a batch cannot be queued ends the run (write_failedorwrite_behind), the recording finalized with what reached the disk and itsfaultor its gap stated. A log line the record cannot write is arecordentry and the state'srecord.problem, and the run goes on.
Opening, Showing and Deleting a Run¶
- Opening. A run folder opens through its
run.json: opened with the desktop app from the file manager, or dropped on the window, it opens as Open in Analysis does, converted first when it has no project file or the run changed since. - Showing. Wherever the shell names a run (the Run card's recording line, a finished run's end line, a run record picked in the project), Show Folder opens the folder in the file manager (the desktop app) beside Copy Folder Path.
- Deleting. Delete Run removes the run folder and its project file
together, after a confirmation that names both paths. The analysis service
deletes it (
runs.delete,hertzforge.io.data_folder), the one place a run is deleted, and refuses, deleting nothing, a folder outside the data folder or the data folder itself, one reached through a link, one that is not a run folder (norun.jsonof the run folder schema), one with a link inside it, a run whoserun.jsondoes not saycomplete: true(still going, or did not end cleanly) unless the caller says it has established that the run is not live (not_live), and a run whose project file is open. The shell establishes it from the control service, asked just before the question and again just before the delete: a run that did not end cleanly is not deleted while its folder is the record of a run the control service reports as live, while a live run has not said which folder it records into, or while the control service cannot be asked. Its confirmation says that the run did not end cleanly and that its record may be partial, beside the two paths.
What a Classical Shock Run Saves¶
From arm: run.json, table.json, setup.json (the configuration as
accepted; resolved, the nominal pulse with its shape, amplitude, duration,
polarity, rise and fall and compensation, the tolerance standard and its bands,
the level schedule and pulse counts, the spacing, the identification, the
control settings and the controller's own, the limits and monitors, the SRS
grid and the rates; the derived values; feasibility), law/law.json (the law's
identity, parameters and guards) and log.jsonl (every state, level, pulse
fired with its level and verdict, alarm, drive-limit action, trip, hold and
operator action, each with its facts in data), and these files, each checked
against the golden run folder (schema/golden/runs/classical_shock/) by
tests/test_shock_run_folder_golden.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, a shot for the identification and one for each pulse (kind inputs) |
streams/drives |
The drive as the device accepted it, in volts, shot for shot with the inputs (kind drives) |
results/pulse_reference |
The nominal pulse at full level and its time-domain tolerance band, time from the main pulse's start (kind pulse_reference, kept as arrays) |
results/srs_reference |
The nominal pulse's SRS at full level and its informational band (kind srs_reference) |
results/identification_frf |
The identification's complex transfer function, drive to control response, on the correction band (kind frf) |
results/identification_coherence |
Its ordinary coherence, and the lines the control trusts (kind coherence) |
results/pulse_srs |
Each pulse's SRS, with the reference's at the level fired and its band (kind srs, one record per pulse measured) |
results/pulses |
Each pulse as judged: its level, scheduled level, limit scale, drive peak, peak, peak ratio, velocity change and its ratio, peak velocity, peak-to-peak displacement, error, the three verdicts and the overall one, and its SRS bands (kind pulse_results, kept as arrays, one record per pulse) |
end.json |
The end, as the run's state reports it |
Each pulse's results are written when the pulse is judged, the last pulse of
the run included; a record's line names the pulse, its level, its origin and
the station frame. A run that ends before its identification has no
identification and no pulses; one held by identification has its identification
and no pulses. A pulse whose drive was committed and then withheld in the wait
before it (held while nobody held control, or stopped there) still has its shot
in both streams: the drive committed for it, and an input shot with no frames
that says played false, so the two streams stay shot for shot; nothing names
what that shot was. With record.streams false there is no streams/ folder. The
analysis side keeps the nominal pulse and its time-domain tolerance as the
setup's resolved.pulse and resolved.tolerance and as the arrays of
pulse_reference in the run record, since no analysis class holds a nominal
pulse; the verdicts and kinematics of pulses are arrays there too.
The golden folder is written by cargo test -p sds-control --test
classical_shock_golden_run from a short run on the simulator, with fixed seeds,
its wall times and build fields normalized; scripts/make_golden_runs.sh
rewrites it.
What an SRS Run Saves¶
From arm: run.json, table.json, setup.json (the configuration as
accepted; resolved, the target as given and on the band centres, the bands and
their Q, the envelope's alarm and abort bands, the synthesis settings with the
offline synthesis's result, its pulse's kinematics and its fitted table, the
ring-out, the level schedule and pulse counts, the spacing, the identification,
the control settings and the controller's own, the limits, monitors and limit
channels, and the rates; the derived values; feasibility), law/law.json (the
law's identity, parameters and guards) and log.jsonl (every state, level,
pulse fired with its level and verdict, alarm, drive-limit action, notch, unused
law call, trip, hold and operator action, each with its facts in data), and
these files, each checked against the golden run folder
(schema/golden/runs/srs/) by tests/test_srs_run_folder_golden.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, a shot for the identification and one for each pulse (kind inputs) |
streams/drives |
The drive as the device accepted it, in volts, shot for shot with the inputs (kind drives) |
results/srs_reference |
The target SRS at full level on the run's bands, with the envelope's alarm band and abort band (kind srs_reference) |
results/synthesis |
The pulse the configuration was synthesized to, at full level and the configured rate, with its velocity, displacement and SRS on the bands (kind srs_synthesis, kept as arrays) |
results/identification_frf |
The identification's complex transfer function, drive to control response, on the band (kind frf) |
results/identification_coherence |
Its ordinary coherence (kind coherence) |
results/pulse_srs |
Each pulse's SRS, with the target at the level fired and the envelope's bands (kind srs, one record per pulse measured) |
results/drive_tables |
The drive table after each pulse: each component's frequency and drive amplitude, and the law's gains (kind srs_drive_table, kept as arrays, one record per pulse) |
results/pulses |
Each pulse as judged: its level, scheduled level, limit scale, drive peak, peak, peak velocity, peak-to-peak displacement, worst band error and its frequency, bands outside the alarm and abort bands, the limit channels' cut and its verdict (kind pulse_results, kept as arrays, one record per pulse) |
end.json |
The end, as the run's state reports it |
Each pulse's results are written when the pulse is judged, the last pulse of
the run included; a record's line names the pulse, its level and the station
frame, and the law call it played. Every SRS shot fires at its first frame. A
shot no pulse was judged on (a pulse withheld in the wait before it played, when
nobody held control, or one stopped part way) is named unjudged; a withheld
one holds the drive committed for it and no input frames, and says played
false. A run that ends before its identification has no identification and no
pulses; one held by identification has its identification and no pulses. With
record.streams false there is no streams/ folder. The limit channels' own
identified gains are not saved. The analysis side keeps the synthesis, the drive
tables and the verdicts and kinematics of pulses as arrays in the run record,
since no analysis class holds them: the synthesized pulse is a design the drive
started from, not a waveform the test was controlled to.
The golden folder is written by cargo test -p sds-control --test
srs_golden_run from a short run on the simulator, with fixed seeds, its wall
times, its law calls' times and build fields normalized;
scripts/make_golden_runs.sh rewrites it.
What a MIMO Shock Run Saves¶
From arm: run.json (with the simulator's plant by name in sim.plant),
table.json, setup.json (the configuration as accepted; resolved, the
control channels with their units and each control's reference peak and rms
at full level, the drives with their ceilings and aborts, the limit channels,
the target with its kind and tolerance (a waveform target's standard and its
share of each peak; an SRS target's bands, natural frequencies, tolerance and
each control's SRS at full level on them), the timing and the verdict, the
level schedule and pulse counts, the spacing, the identification with its
probe, its records and its holds, the law and its parameters in force, the
limits and guards, and the rates with the record's quiet frames; the derived
values), law/law.json (the law's identity, its parameters as given and in
force, and its guards) and log.jsonl (every state, the station, the
identification's hold, the seed, each pulse fired with its level and verdict,
override, trip and the end, each with its facts in data), and these files,
each checked against the golden run folder (schema/golden/runs/mimo_shock/)
by tests/test_run_folder_golden_mimo_shock.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, a shot for each of the identification's two shots (step probe and estimate) and one for each pulse (kind inputs) |
streams/drives |
Every drive as the device accepted it, in volts, shot for shot with the inputs (kind drives) |
results/srs_reference |
Each control's target SRS at full level on the natural frequencies, with the band it passes in (kind srs_reference) |
results/synthesis |
The waveform the module synthesized for each control from its target SRS, at full level (kind mimo_shock_synthesis, kept as arrays) |
results/identification_frf |
The identification's transfer function matrix, each drive to each control, on the band (kind frf) |
results/identification_coherence |
Each control's multiple coherence with the drives (kind coherence) |
results/identification |
The rms and peak each drive played, and each control's band-mean coherence, its target's share on trusted lines and its peak response (kind mimo_shock_identification, kept as arrays) |
results/seed |
Before the first pulse, each control's reachable share and floor, whether its best reachable response passes, and the seed's predicted peak ratio (kind mimo_shock_seed, kept as arrays) |
results/pulse_srs |
Each pulse's SRS at each control, with each control's target at the level fired and its band (kind srs, one record per pulse) |
results/pulse_drives |
The drives each pulse played (kind mimo_shock_drives, kept as arrays, one record per pulse) |
results/pulses |
Each pulse as judged: its levels, joint verdict, worst over-test, global SRS error and arrival spread; per control its verdict, error, over-test, delay, peak and peak ratio, margins to both abort lines, its checks, energy, rms duration, kinematics and predicted peak ratio; per drive its peak and limit scale (kind pulse_results, kept as arrays, one record per pulse) |
results/law_calls |
Every call of the control law: the drives it returned and the delay it expects at each control; the record line says seed or iterate, the pulse it followed, the level, whether it was used and why not, its time and its values (kind mimo_shock_law_calls, kept as arrays, one record per call) |
end.json |
The end, as the run's state reports it, with the pulses fired and passed, the law's calls and misses and the shots |
A waveform target saves results/target in place of srs_reference,
synthesis and pulse_srs: each control's reference waveform at full level,
time from the record's start, with the standard and its share of the peak
(kind transient_reference). Each pulse's results are written when the pulse
is judged, the last pulse of the run included, and each law call as the module
makes it; nothing is held to the end of the run. Every record of a shot follows
the quiet frames the station plays before it (pre_frames), so a shot's firing
is its record's first sample. A shot no pulse was judged on (a pulse stopped part
way, or a drive committed and withheld before it played) is named unjudged; a
withheld one holds the drives committed for it and no input frames, and says
played false. A run that ends before its identification has no
identification and no pulses; one held by identification has its
identification and no pulses. With record.streams false there is no
streams/ folder.
On the analysis side the streams become time histories, one record per shot;
each control's target SRS a ShockSpecification and each pulse's SRS an Srs,
a record per control and pulse; a waveform target a TransientSpecification
of every control; the transfer function matrix an Frf and the coherence a
MultipleCoherence; all in SI, opened in the Shock workspace. The synthesized
waveforms, the identification's facts, the seed, the drives each pulse played,
the law's calls and the verdicts and measures of pulses have no analysis
class and stay in the run record as named arrays.
The module's engine keeps its own record of every pulse and law call in memory
for its replay (hertzforge_mimo_shock::records); the control service no longer
writes it.
The golden folder is written by cargo test -p sds-control --test
mimo_shock_golden_run from a short SRS run on the simulator's linear 4 by 4
plant on records of 64 samples, with fixed seeds, its wall times, build fields
and each law call's measured duration normalized, and each shot of its streams
cut to its first 80 frames (cut_from_frames, on the stream and on each shot);
scripts/make_golden_runs.sh rewrites it.
What a MIMO Sine Run Saves¶
From arm: run.json (with the simulator's structure by name in
sim.structure; after the identification, its facts in identification: the
level it was taken at by response, the drive-to-response lag, the frames the
station held ahead of the first drive frame at the start that lag was measured
on (frames_ahead; every start of the run must hold the same), the record
length, the records averaged, the line spacing, how long it played, each
drive's rms, each control's band-mean coherence, whether the gate passed, the
resonances it found and the sweep-rate warning for each, and, once the law is
built, the tracker delay factor and the transport delay the law was told),
table.json, setup.json (the configuration as accepted; resolved, the test,
the level schedule, whether the phases are specified, the controls with their
units, profiles and phase rows, the drives with their ceilings and aborts, the
limit channels with their bounds, the guards and the notch, the shaker ratings
the kinematic monitor judges, the identification's settings, the tracking
rule, the law and its parameters, the request switch and its bounds, the rates
and the simulator's structure; the derived values; the feasibility inputs and
verdict), law/law.json (the law's identity, its parameters as given and in
force, the shapes, test types and references it accepts, its declared values
and its guards) and log.jsonl (every state, the station, each start of the
station with the frames it held ahead of its first drive frame, the
identification's gate and each flagged resonance, the engage, every level change, hold and
resume, manual frequency (where the tone was sent, to_hz in data), notch in and out, refused notched reference, alarm in
and out, unusable law call, drive over its ceiling, each change of the law's
request and its outcome, the stop or trip and the end, each with its tick, its
station time, its frequency and its level in data), and these files, each
checked against the golden run folder (schema/golden/runs/mimo_sine/) by
tests/test_run_folder_golden_mimo_sine.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, from arm, the identification included (kind inputs) |
streams/drives |
Every enabled drive as the device accepted it, in volts (kind drives) |
results/reference |
Each control's reference amplitude and phase at full level, peak, and its alarm and abort bands, on the run's band: every control's breakpoints and the points between them; the phase NaN where the run's phases are not specified (kind mimo_sine_reference) |
results/limit_ch<n> |
Each limit channel's bound and abort bound at full level on the run's band (kind limit), one result per limit channel |
results/identification_frf |
The identification: every control's and limit channel's response to every drive on its grid, a delay lagging (kind frf) |
results/identification_coherence |
Each control's and limit channel's multiple coherence with the drives (kind coherence) |
results/identification_trust |
Whether each line of the identification is trusted (kind mimo_sine_trust, kept as arrays) |
results/channel_levels |
Every control's, limit channel's and drive's tracked amplitude, peak, and phase against the tone, tick by tick, with the tone's frequency, the scheduled level, the sweep's direction and pass, whether a settle window was open, each control's reference (as judged, and its phase) and error, each limit channel's bound, the notch's scale (how far the whole drive vector was cut that tick) and depth (the share of the reference the controls were held to), whether a law's notched reference was taken, and the two readings (kind sine_levels, one record per 16 ticks) |
results/control_trace |
Every tick of the control law: whether it was called and whether as its engage, the hold it was told, the drive in force it was told, the drive it asked for and the drive played after every guard (each drive's real and imaginary parts), the miss and its reason, the call's time, its own fault judgement, its request and what came of it, the ceiling and first-drive scales, the caps that bound, the largest rotation asked for and the law's declared values (kind mimo_sine_control, kept as arrays, one record per 16 ticks) |
end.json |
The end, as the run's state reports it, with the records written and dropped and the run's report (per control its worst error and phase error and where, its time in alarm and its deepest notch; per limit channel its largest margin to its bound and where and the time the notch was in (the reference held down or the drive vector cut); per drive its largest amplitude and where and its ticks over its ceiling; the largest readings; the law's requests) |
Every tick is kept; a record is handed to the record's writer when its 16 ticks
are full, the last one, part full, at the end, and nothing is held to the end
of the run. A run that ends before it engages has its identification (when it
got that far) and no channel_levels or control_trace; one held by the
coherence gate has its identification and no levels. A run killed part way
leaves the records written so far and run.json with complete false, and
converts with what it has. With record.streams false there is no streams/
folder.
On the analysis side the streams become time histories; the references a
SineSweepSpecification of one tone with each control's own amplitude, phase
and bands (a sweep's tone one pass across the band in the direction the run
started, a dwell's its frequency held for its dwell; a stepped sine plays no
one tone, so its references stay in the run record); the levels of the last
one-way pass at the highest level a SineLevelSet of every control, limit
channel and drive (a sweep or a stepped sine; a dwell's levels are against
time and stay in the run record); the identification an Frf and its
coherence a MultipleCoherence; all in SI, opened in the Sine Sweep
workspace. The trust mask, every other point of the levels, the references as
judged, the errors, the notch, the readings and the law's calls have no
analysis class and stay in the run record as named arrays.
What a MIMO Mixed Mode Run Saves¶
From arm: run.json (with the operator's words, specification when one is named,
and recording), table.json, setup.json (the setup as sent in config, which
holds an inline reference whole; resolved.parts, each part as the controller
plays it; resolved.reference, where the floor's reference came from, its size and
band; resolved.controls, resolved.drives with their ceilings, peaks and abort
levels, resolved.limits; resolved.tolerances, each part's alarm and abort bands
per control; resolved.law with both laws, resolved.ceiling_rule and
resolved.fill_rule; resolved.identification, resolved.gates,
resolved.schedule, resolved.full_level_s, resolved.estimation and
resolved.acquisition; resolved.controller, the controller's own settings; and
derived, the grid, the band, the reference's rms, its source and where each law
came from), law/law.json (the floor's law and the tones' law, each with its
identity, the world it comes from, whether it may drive hardware and its parameters
as given; the band and ceiling rules; and calls, the format of the law-call record,
hertzforge.mimo_mixed.law_ticks.v1, and the result that holds it; a law that is a
file has its bytes beside it) and log.jsonl (the controller's events, its state
changes, levels, each part coming in and going out, alarms, holds, the review's
prediction, the operator's overrides with their words, level, mode, part, stop and
abort, each as it is made), and these files, each checked
against the golden run folder (schema/golden/runs/mimo_mixed/) by
tests/test_run_folder_golden_mimo_mixed.py. Spectral results are on the floor's
band lines, matrices in the file's convention (conj(X) Y); levels are at the level
in force:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs), the identification included |
streams/drives |
Every drive as the device accepted it, in volts (kind drives), the identification's noise included |
results/reference |
The floor's reference spectral density matrix at full level, with each control's alarm and abort lines as spectral densities from the floor part's bands (kind sdm_reference) |
results/identification_frf |
The identification's transfer function matrix, each drive to each control and limit channel, the response taken the lag it measured later (kind frf) |
results/identification_coherence |
Each control's multiple coherence with the drives (kind coherence) |
results/identification_response |
The controls' spectral matrix while the drives played (kind cpsd) |
results/identification_drive |
The drives' spectral matrix (kind cpsd) |
results/identification |
The identification's facts: its level against the reference, the steps of its level search, its frames and lag, each control's band coherence and each drive's rms (kind mimo_identification) |
results/control_spectra |
Per record, per control: the composite autospectrum with the tones in, the residual the floor law controls (the tones taken out) and the reference (kind mimo_mixed_spectra) |
results/drive_spectra |
Per record, per drive: the floor law's drive autospectrum (kind mimo_mixed_drive_spectra) |
results/tone_levels |
Each tone through the run: its frequency, part level, whether the shared ceiling held it and the scale it applied; per control its tracked amplitude, phase, target and error, and alarm; per drive the amplitude and phase it played (kind mimo_mixed_tones) |
results/band_levels |
Each band through the run: its center, its ramp, whether it is folded into the floor's reference; per control its added level against the stated, and alarm (kind mimo_mixed_bands) |
results/drive_levels |
The run's level and each control's floor error; per drive the random part's rms, the largest magnitude played, the peak held over the last second, the tones' summed amplitude and the headroom to its peak ceiling (kind mimo_mixed_drives) |
results/control_trace |
Every call of the two laws in the order taken, the law-call record law_ticks v1: station time, the law (0 the floor's, once a loop; 1 a tone's, once a tick), the tone, the drive in force before the call and the drive taken from it, the call's time, a miss and its flags; 64 calls to a record (kind mimo_mixed_control) |
end.json |
The end, as the run's state reports it (the outcome and why, the drops), every override with the operator's words, with what the record counted (the test time, the level, trace and spectra records) and the station's frames |
A run that ends before identification has no identification, and none of the loop or
level results; one that ends before it engages has no law calls. With
record.streams false there is no streams/ folder. A run killed in mid-test keeps
what it wrote: no end.json, and run.json not marked complete.
On the analysis side the floor's reference becomes a Specification with a record for
each autospectrum and each cross term above the diagonal, each control's alarm and
abort lines as the warning and abort limits of its autospectrum; the transfer function
matrix an Frf; the multiple coherence a MultipleCoherence; the identification's
spectral matrices a Psd with cross terms; all in SI, opened in the Random Vibration
workspace, until the test has an analysis of its own. The tones', bands' and drives' histories, the loops' spectra and every law
call stay in the run record as named arrays.
The golden folder is written by cargo test -p sds-control --test
mimo_mixed_golden_run from a short run on the simulator's linear 4 by 4 (a floor, a
tone and a band, the automatic schedule to completion), with fixed seeds, its wall
times, build fields and each law call's time normalized, and its streams cut to their
first 128 frames (cut_from_frames); scripts/make_golden_runs.sh rewrites it.
What a TWR Run Saves¶
From arm: run.json, table.json, setup.json (the configuration as accepted;
resolved, the reference as stored with its name, SHA-256, rate, length, units
and preparation, the record it was prepared into at the rate the station runs
at with its section and pads, the identification, the inverse and the
correction, the control law and its guards, the level schedule with its gate,
its iterations and the playback's play count, the limits and the feasibility
ceilings, and the rates; the derived values; feasibility), law/law.json (the
law's identity, parameters and guards) and log.jsonl (every state, level,
play with its level, error and how it ended, alarm, trip, hold and operator
action, each with its facts in data), and these files, each checked against
the golden run folder (schema/golden/runs/twr/) by
tests/test_twr_run_folder_golden.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, a shot for the identification and one for each play (kind inputs) |
streams/drives |
The drive as the device accepted it, in volts, shot for shot with the inputs, with the lag every play is aligned at (kind drives) |
results/reference |
The reference as imported, at its own rate (kind waveform, kept as arrays) |
results/target |
The target at full level: the prepared section between its pads on the record's samples, time from the section's start, with the alarm and abort bands' share of its peak (kind transient_reference) |
results/identification_frf |
The identification's complex transfer function, drive to control response, on the identification band (kind frf) |
results/identification_coherence |
Its ordinary coherence, and the lines the correction trusts (kind coherence) |
results/plays |
Each play: its level, kind and iteration, its rms, peak and spectral error, whether it met the gate, its clipped samples and clamped bins, its drive and response peaks, its lag and drift, its start and length in station frames, and whether it tripped or was cancelled (kind play_results, kept as arrays, one record per play) |
results/law_calls |
Every call of the control law: the drive it returned at full level on the record's samples, the level and error it was handed, its caps, whether it was used and how long it took (kind law_calls, kept as arrays, one record per call) |
end.json |
The end, as the run's state reports it |
A play is one start and one stop of the station: its shot holds the record and
the rest pad after it, and its pre_frames are the pad before the section, so
the section starts at time zero. Each play's results are written when it is
judged, the last play of the run included; the play a protection ends the run
on, and one a stop or an abort cuts short, are recorded as far as the station
acquired them, their shot and their record saying tripped or cancelled.
The law is called at the seed, after an iteration play that misses its gate,
and after a playback play only when correction goes on during playback; a call
that gave no drive has NaN for it. A run held by its identification has its
identification shot and no plays. With record.streams false there is no
streams/ folder. The analysis side keeps the target as a
TransientSpecification, which has no limits, so the alarm and abort shares
stay in its result's description; the reference as imported, each play's
measures and every law call stay in the run record as named arrays.
The golden folder is written by cargo test -p sds-control --test
twr_golden_run from a short run on the simulator, with fixed seeds, its wall
times, build fields and each law call's measured duration normalized, and each
shot of its streams cut to its first 128 frames (cut_from_frames, on the
stream and on each shot): every shot carries the station's rest pad of 1024
frames; scripts/make_golden_runs.sh rewrites it.
What a Random Run Saves¶
From arm: run.json, table.json, setup.json, law/law.json (the built-in
control law and its guards) and log.jsonl, and these files, each checked
against the golden run folder (schema/golden/runs/random/) by
tests/test_run_folder_golden.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs) |
streams/drives |
Every enabled drive as the device accepted it, in volts (kind drives) |
results/reference |
The reference and its alarm and abort bands at 0 dB on the run's lines (kind envelope, kept as arrays) |
results/identification_frf |
The system identification's complex transfer function, drive to control response (kind frf) |
results/identification_coherence |
Its ordinary coherence (kind coherence) |
results/control_psd |
Each control channel's spectrum and the composite (kind psd, one record per keeping) |
results/response_psd |
Every enabled input's spectrum (kind psd, one record per keeping) |
results/drive_psd |
The drive's spectrum (kind psd, one record per keeping) |
end.json |
The end, as the run's state reports it |
The spectra are kept from the last control loop before each level change and
from the last loop of the run; each record's line says which (why), the level
the loop ran at, the loop and the station frame. A run with a limit adds
results/limit_ch<n> for each limited channel, its ceiling on the lines it
covers (kind limit). With several control channels the identification is of
their composite, written as composite_frf and composite_coherence and kept
as arrays. With record.streams false there is no streams/ folder. A run that
ends before its system identification has no identification or spectra.
The golden folder is written by cargo test -p sds-control --test
random_golden_run from a short run on the simulator, with fixed seeds, its wall
times and build fields normalized; scripts/make_golden_runs.sh rewrites it.
What a Sine Run Saves¶
From arm: run.json, table.json, setup.json (with resolved.test, the
sweep, dwell, step or resonance search as resolved, resolved.profile, the
breakpoints with the quantity each was given in and the acceleration the
controller makes of it there, resolved.limits with the notch in
resolved.aborts, and resolved.controller, the controller's own
configuration), law/law.json (the law's identity, its parameters and its
guards; a law file is named by its SHA-256, its bytes are not copied) and
log.jsonl, and these files, each checked against the golden run folder
(schema/golden/runs/sine/) by tests/test_run_folder_golden_sine.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs), the identification's burst included |
streams/drives |
The drive as the device accepted it, in volts, and the reference output's when there is one (kind drives) |
results/reference |
The profile and its alarm and abort bands at 0 dB, peak, on the run's band: its breakpoints and points between them (kind envelope) |
results/identification_frf |
The identification's complex transfer function, drive to control response, on the band the gate judges, the response taken the lag it measured later (kind frf) |
results/identification_coherence |
Its ordinary coherence (kind coherence) |
results/channel_levels |
Each input's tracked level, peak, and phase against the drive, with the tone's frequency, the scheduled level, the direction (+1 rising, -1 falling, 0 standing), the pass (the one-way sweep, counted from 0, which changes when the sweep turns or the level changes), and the control point's target, measured value and drive, as the run went (kind sine_levels, about twenty points a second, records of 64) |
results/control_trace |
Every call of the control law: time from engage, frequency, target, measured, the drive in force, the law's output, the drive the core took, the prediction, why the core held, a miss, a cap, the call's time and the law's declared values (kind sine_control, records of 64 calls) |
end.json |
The end, as the run's state reports it |
A run with a limit channel adds results/limit_ch<n>, its lines on the run's
band: the level the notch holds it to and its abort bound (kind limit). With
record.streams false there is no streams/ folder. A run that ends before
identification has no identification; one that ends before it engages has no
levels and no trace.
On the analysis side a sweep or a dwell becomes a SineSweepSpecification of
one tone over the control channels (a sweep's tone is one pass across the band
in the direction the run started, at its rate and law), and a sweep's or a step
test's channel_levels a SineLevelSet: the last one-way sweep at the highest
level the run reached, where the tone moved. Every point of every pass, a
dwell's levels against time, the trace, the reference and the limit lines stay
in the run record as named arrays. A step test and a resonance search have no
specification: their profile stays in the setup.
The golden folder is written by cargo test -p sds-control --test
sine_golden_run from a short sweep on the simulator, with fixed seeds, its wall
times, build fields and each law call's measured duration normalized, and its
streams cut to their first 1024 frames (cut_from_frames): the identification's
burst alone is 131 072 frames;
scripts/make_golden_runs.sh rewrites it.
What a Mixed Mode Run Saves¶
From arm: run.json, table.json, setup.json (with resolved.profile, the
floor's breakpoints as anchors in g²/Hz with the alarm and abort bands that hold
from each; resolved.parts, every part with its window, its sweep, dwell or
follow, its level (a tone's amplitude or profile, a narrowband's density and
width) and its bands; the level schedule, the limits and aborts with the summed
drive's ceiling and abort, the control settings with both laws' guards, and
resolved.controller, the controller's own configuration), law/law.json (both
roles' laws, their parameters and their guards) and log.jsonl, and these files,
each checked against the golden run folder (schema/golden/runs/mixed/) by
tests/test_run_folder_golden_mixed.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order, from the identification on (kind inputs) |
streams/drives |
The drive as the device accepted it, in volts (kind drives) |
results/reference |
The floor's reference and its alarm and abort bands at 0 dB on the run's lines (kind envelope) |
results/identification_frf |
The identification's complex transfer function, drive to each control response, on the floor's band, the response taken the lag it measured later (kind frf) |
results/identification_coherence |
Its ordinary coherence per control channel, the composite the gate judged and the lines the control trusts (kind coherence) |
results/control_psd |
Each control channel's spectrum with the tones in, the composite, and the reference at the level in force with its alarm and abort lines (kind psd, one record per keeping) |
results/residual_psd |
Each control channel's spectrum with each tracked tone taken out, the composite, and the lines left out of the floor's average (kind psd, one record per keeping) |
results/drive_psd |
The random part of the drive (kind psd, one record per keeping) |
results/tone_levels |
Each tone's frequency, target, tracked level, error, drive and tracked phase against its drive per control channel, and whether it plays, as the run went (kind mixed_tone_levels, records of 32 points) |
results/band_levels |
Each narrowband's center, width, reference, measured level, error, degrees of freedom, drive and whether it plays, as the run went (kind mixed_band_levels, records of 32 points) |
results/floor_levels |
The floor's rms over its clean lines against its reference's, its error, its drive and its alarm, as the run went (kind mixed_floor_levels, records of 32 points) |
results/control_trace |
Every call of both laws, in the order the controller took them: time from engage, the law, the tone, the drive in force and the drive taken, the call's time, a miss and its flags (kind mixed_control, records of 64 calls) |
end.json |
The end, as the run's state reports it |
The spectra are kept from the last chunk before each level change and from the
last chunk of the run that had the floor's loop; each record's line says which
(why), the level in force and the station frame. The parts' levels are one
point a chunk (about a quarter second of station time) from engage. The laws'
calls are taken from the controller between chunks and written by the record's
writer; nothing writes them on the loop's thread. A run with a limit adds
results/limit_ch<n>, its ceiling on the lines it covers (kind limit). A
test with no tone has no tone_levels, one with no narrowband no band_levels.
With record.streams false there is no streams/ folder. A run that ends before
its identification has no identification; one that ends before the loop engages
has no spectra, levels or trace.
On the analysis side the floor becomes a Specification, carrying each
narrowband as a Narrowband and the width the service leaves out around each
tone (tone_exclusion), and the tones of a constant amplitude, fixed or swept
one pass in the direction the run started, a SineSweepSpecification named
Tones; MixedSpecification(floor, tones) puts them together. A tone that
follows another or whose amplitude is a profile has no analysis class: it stays
in the setup, and the conversion says so. The spectra become Psds, the
identification an Frf and a Coherence; the parts' levels, the trace, the
reference and the limit lines stay in the run record as named arrays.
The golden folder is written by cargo test -p sds-control --test
mixed_golden_run from a short run on the simulator on a coarse grid, with fixed
seeds, its wall times, build fields and each law call's measured duration
normalized, and its streams cut to their first 256 frames (cut_from_frames);
What a MIMO Random Run Saves¶
From arm: run.json (with the operator's words, specification when one is named,
and recording), table.json, setup.json (the setup as sent in config, which
holds an inline reference whole; resolved.reference, where the reference came from
(inline, or a reference file by its path and SHA-256), its size, its labels, its
control space, its band as line indexes and in hertz and its line spacing;
resolved.channels, the control channels with their bands, the drives with their
ceilings, abort levels, peaks, shakers and moving masses, the limit channels;
resolved.space with any transformations; resolved.law, resolved.estimation,
resolved.identification, resolved.control (the loop and averaging settings, the
caps, the law's budget and misses, the ramps, the soft start), resolved.schedule;
resolved.controller, the controller's own settings; resolved.setup_hash and
resolved.seed; and derived, the grid, the band and the snapshot cadence),
law/law.json (the law's identity, the parameters as given, every parameter value
the run holds in the manifest's order, and its guards; a law that is a file has its
bytes beside it, named in file) and log.jsonl (the controller's events, its state
changes, levels, alarms, overrides, law misses and trips, and the operator's stops and
aborts, each as it is made), and these files, each checked against the golden run
folder (schema/golden/runs/mimo_random/) by
tests/test_run_folder_golden_mimo_random.py. Spectral results are on the band's
lines (outside it nothing is driven or controlled), matrices in the file's convention
(conj(X) Y), referred to full level:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs), the noise floor and the identification included |
streams/drives |
Every drive as the device accepted it, in volts (kind drives), the identification's noise included |
results/reference |
The reference spectral density matrix in the control space, with each controlled quantity's alarm and abort lines as spectral densities (kind sdm_reference) |
results/identification_frf |
The identification's transfer function matrix, each drive to each control and limit channel, the response taken the lag it measured later (kind frf) |
results/identification_coherence |
Each controlled quantity's multiple coherence with the drives (kind coherence) |
results/identification_response |
The control channels' spectral matrix while the drives played (kind cpsd) |
results/identification_noise |
The control channels' spectral matrix with the drives off, the noise floor (kind cpsd) |
results/identification_drive |
The drives' spectral matrix (kind cpsd) |
results/identification_cross |
Each control and limit channel's cross spectrum with each drive (kind cpsd) |
results/identification |
The transfer function's condition number per line and the rms each drive played, with the setup hash, the level, the frames, the steps, the lag and whether the set was loaded (kind mimo_identification) |
results/drive_spectra |
Each loop: every drive's spectral density in force; its record line is the loop's summary (level, state, errors, drive rms, what the guards did, timing, misses in a row) (kind psd) |
results/control_spectra |
Each loop that judged the response: every controlled quantity's spectral density and its error against the reference, dB (kind psd) |
results/control_sdm |
The controlled quantities' full spectral matrix at the first loop at full level, every 30 s of loops and at the last loop at full level (kind cpsd) |
results/drive_sdm |
The drives' full spectral matrix at the same loops (kind cpsd) |
results/law_calls |
Every call of the control law, in its own space: the response, transfer function and multiple coherence it was given, the drive in force, the cross spectrum when the law takes it, and the drive it returned (Hermitian matrices packed by their upper triangle); the record line says seed or iterate, the loop, the outcome, a miss's words and the law's declared values (kind mimo_law_calls) |
end.json |
The end, as the run's state reports it, with what the record counted (loops, law calls, the snapshots' loops) and the report: each controlled quantity's rms, its reference's and its error, each drive's rms and smallest cap, the gates and the overrides |
A run whose controls were taken out of control at the gate adds
results/reference_after_exclusion, the reference reduced to the controls kept. A run
that ends before identification has no identification; one that ends before it
engages has no loops and no law calls but its prediction's seed. With record.streams
false there is no streams/ folder.
On the analysis side the reference becomes a Specification with a record for each
autospectrum and each cross term above the diagonal, the controlled channels' alarm and
abort lines as the warning and abort limits of their autospectra; the transfer function
matrix an Frf; the multiple coherence a MultipleCoherence; each spectral matrix and
cross spectrum, each loop's spectra and the snapshots a Psd with cross terms, a record
per loop; all in SI, opened in the Random Vibration workspace. The condition numbers,
the drives' rms, each loop's errors and the law's calls stay in the run record as named
arrays. Under virtual control the controlled quantities are degrees of freedom, not
channels of the table, so the reference, the coherence and the controlled spectra stay
as arrays, and the conversion says so.
The golden folder is written by cargo test -p sds-control --test
mimo_random_golden_run from a short run on the simulator's 4 by 4 plant, with fixed
seeds, its wall times, build fields and each loop's measured durations normalized, and
its streams cut to their first 128 frames (cut_from_frames);
scripts/make_golden_runs.sh rewrites it.
What a Recorder Run Saves¶
From start: run.json, table.json (every row, enabled or not), setup.json
(config as accepted; resolved, the acquisition at the programmed rate, the
recorded rows with their ranges, the outputs (none), the trigger with its
hysteresis and its frames, the analysis and the capture with its floor;
derived at the programmed rate; and overload, the overload indicator's
fraction and definition) and log.jsonl, and these, each checked against the
golden run folder (schema/golden/runs/recorder/) by
tests/test_run_folder_golden_recorder.py:
| File | What |
|---|---|
streams/rec_NNNN |
One recording of every recorded row, in table order, at the programmed rate (kind recording): telemetry.f32, stream.json and capture.json |
end.json |
The end, as the run's state reports it, each row's statistics over the run, and each recording's frames, gaps and fault |
A Recorder run has no law and no results: its analysis is live only. Monitoring
saves no samples, so a run that made no recording has no streams/ entries. A
recording's pre-window is its first pre_frames frames, before its trigger, and
converts to negative time.
The golden folder is written by cargo test -p sds-control --test
recorder_golden_run from a short level-triggered run on the simulator, its wall
times, build fields and what depends on when the stop arrived (the frames
acquired, the rows' statistics) normalized; scripts/make_golden_runs.sh
rewrites it. It holds no gap: a gap needs a disk that falls behind, which a test
cannot make the same every time, so gaps are tested on the Recorder's writer and
on the reader.
What an Explorer Run Saves¶
From start, before the station is opened: run.json (with the run's
metadata; its grid is the rate asked, the block, the output lookahead, the
pipeline and the band until the station has programmed its rate, then the
station's own, actual true, and the streams' fs_hz with it), table.json,
setup.json (config as accepted; resolved, the acquisition, the band and
the start frequency, the drive row with its ceiling and the 0 V start, the
slews, the ramp's span, the display's FFT, the survey's channel, unit, window and
peak level, the acquired inputs, every abort in force and the folder's name;
and derived as configured) and log.jsonl, and these, each checked against
the golden run folder (schema/golden/runs/explorer/) by
tests/test_run_folder_golden_explorer.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs) |
streams/drives |
The drive as the device accepted it, in volts (kind drives) |
results/survey |
The survey line at the end: the control row's amplitude at the tone, peak, at each frequency the tone visited, ascending, with its highest point (kind survey) |
results/spectra |
Each acquired channel's last display window at the end: its amplitude spectrum, peak, from one Hann window corrected so a tone reads its amplitude, magnitude only (kind amplitude_spectrum) |
end.json |
The end, as the run's state reports it, the state itself, and what the run measured: each acquired channel's rms, the measured frequency, the control row's derived motion and the survey's peak |
Every steering verb the run took is a log entry of kind intent, its data
the verb's facts: t_s, the generated frame it took effect at, the
input_frame it was taken at, and what was asked, adopted and clamped. With
record.streams false there is no streams/ folder. A survey with no point
has no results/survey, and a run that ended before its first display window
no results/spectra. Explorer has no law.
Before Explorer wrote this folder it kept one of its own, with the same name:
explorer.json (the configuration, the station, the rates and the derived
values) is now run.json and setup.json; intents.jsonl is the log's
intent entries; survey.json is results/survey; and end.json is
end.json, which still holds the state.
On the analysis side the streams become time histories. The survey and the spectra are magnitudes with no phase, which no analysis class holds, so they stay in the run record as named arrays.
The golden folder is written by cargo test -p sds-control --test
explorer_golden_run from a short run on the simulator: the tone at 200 Hz
raised to 0.1 V pk once the first frames have passed, held until the survey has
its point, and stopped. Explorer is steered by hand, so what follows the wall
clock is normalized: the wall times, the build fields, the folder's path, the
station frames (of the log, of the intents, of the end), the run's health, what
it measured, and the values of the survey's levels and of the spectra (their
shapes, channels and units are kept). Its streams are cut to their first 256
frames, before the first steer (cut_from_frames);
scripts/make_golden_runs.sh rewrites it.
What a Playback Run Saves¶
From start, before the station is opened: run.json (with the run's
metadata; its grid is the drive file's own rate, which the station must
program or the start is refused), table.json, setup.json and log.jsonl.
setup.json holds config as accepted; resolved: control, the words "open
loop, no control law" (the file is played as it is, scaled by the level, and
nothing is corrected from the response), the drive file (its folder, its
SHA-256, its rate, samples and channels, each with the drive row it plays on,
and its sidecar drive.json whole, with the source it was converted from and
the fixes made to it), the map, the level and its gain, the ceiling, the
pre-roll and post-roll, the stop (40 dB over 3 s, then zero), the inputs and
the drives, every abort in force (the ceiling, each row's abort limits from the
channel table, the input overload, the underrun and the reader's failure) and
the folder's name; check, the check report the run was configured with (each
channel's peak, start and end values, its velocity and displacement taken as an
acceleration with their end values and peaks, pass or fail with the reason);
and derived. Then these, each checked against the golden run folder
(schema/golden/runs/playback/) by tests/test_run_folder_golden_playback.py:
| File | What |
|---|---|
streams/inputs |
Every enabled input as read from the station, in table order (kind inputs), from the station's first frame until past the drive's last recorded frame by the station's input delay |
streams/drives |
Every drive as the device accepted it, in volts, in table order (kind drives), frame for frame with the inputs: the pre-roll's zeros (the station's lead-in first), the file at the level from the pre-roll's last frame, then the post-roll, or the stop ramp and one station block of zeros after it. A completed run's drives are the pre-roll, the file and the post-roll exactly; the zeros played after them, while the inputs come back, are not recorded |
results/playback_check |
The check report (kind drive_check, the report whole in its description) and, per file channel, its peak, start, end, velocity and displacement end values and peaks, and the envelopes of the drive, the velocity and the displacement (each bucket's minimum and maximum), in V, V s and V s² |
results/playback_outcome |
How the run ended (kind playback_outcome): ended (completed, stopped or aborted), the outcome and its reason in words, whether the emergency stop was issued and a response abort's trip; arrays played (file samples), played_s and generated (frames from the station's first, the rolls included) |
end.json |
The end, as the run's state reports it, the samples played of the file's, and the state itself, with the loop's health (engine_ticks, worst_tick_ms against budget_ms, health_faults, ring_overruns) |
The log has an entry for the check (check, data.event check_passed),
the arm (state, armed), each phase as it begins with the generated frame
it began at (pre_roll, playing, post_roll, post_roll_done, stop,
stopped, zeroed), an operator's stop or abort and who asked
(operator), a trip (trip), an underrun (underrun), an abort (abort),
an overload (overload) and the outcome (outcome). A start refused (the
file changed since its check, a rate the station does not run, the station or
the record refusing) is a state entry, beside a check entry when the file or
its rate refused it, and ends the run arm_refused. With record.streams false there is no streams/ folder.
Playback has no law.
The golden folder is written by cargo test -p sds-control --test
playback_golden_run from a short run on the simulator (one input, one drive,
2048 Hz): a half-second burst at -6 dB with an eighth of a second of pre-roll
and of post-roll, played to its end. What follows the wall clock is
normalized: the wall times, the build fields, the folders' paths, the station
frames and the read-ahead's fill. Its drive stream is whole, 1536 frames; its
input stream is cut to the same 1536 frames (cut_from_frames);
scripts/make_golden_runs.sh rewrites it.
What a Modal Test Run Saves¶
From start, before the station is opened: run.json (test modal_test, with
the run's metadata and, when the configuration names one, its
specification; its grid adds analysis_block, the setup's block, and
df_hz, the line spacing), table.json, setup.json and log.jsonl.
setup.json holds config as accepted; resolved: control (impact mode:
the words "no drive: impact mode writes no drive sample"; shaker mode: "open
loop, no control law", each shaker playing its source at its level), the input
rows and the drive rows (none in impact mode), windows (the analysis window,
the force window's pre_frames, width_frames and fall_frames, and the
exponential window's tau_s, inv_tau_per_s, end and added_damping, each
null when off), capture, in shaker mode the stop (40 dB over 3 s, then
zero) and the aborts in force (with latency: bound_s, the station's
characterized time from an abort to the drive at zero, and from, where it comes
from; null on a station with none, the words then saying what bounds it in the
loop), and on the simulator the simulated structure
(its modes, scale, shapes, the hammer's force and the impulse responses'
length); check, the check report the run was configured with (the rate, the
block, the band and its lines, the estimator, the averages, the references, the
responses, every point's DOFs, and the mode's settings; in impact mode the
trigger's signed level, its polarity and the words of what it watches). Then these, each checked
against the golden run folders (schema/golden/runs/modal_test/impact_roving/ and
schema/golden/runs/modal_test/shaker_burst_random/) by
tests/test_run_folder_golden_modal_test.py:
| File | What |
|---|---|
streams/inputs |
Every measured row as read from the station, in table order (kind inputs), from the station's first frame |
streams/drives |
Shaker mode only: every drive as the device accepted it, in volts (kind drives), frame for frame with the inputs. Impact mode opens no drive row and has no drives stream |
results/modal_frames |
Repeating, a line per hit or frame taken (event taken) and per change of its status (event status): the tile (n, seq, status, reason, overload, double_hit, start_frame, decay (on a hit or a burst frame {"row","ratio","warning"}, the decay check of schema/PROTOCOL.md, after the windows; otherwise null); in impact mode peak, tip_warning, force_window_cut and the hit's whole report, whose double_hit is null or {"frame","peak","ratio"} and whose frames count from the block's start; with a target target_verdict and target_diff_pct) and its point; array span (f8 [2], unit frame), the first station input frame and the length |
results/modal_frf |
Repeating, a record per measured point (kind frf, layout ["response","reference","line"], the abscissa in Hz from the band's first line, windows as in setup.json); array frf, c16 [responses, references, lines], unit response over reference (g/lbf). The line: measurement (from 1), point (from 0), replaces (the measurement it replaces, or null), averages, estimator (H1, H2 or Hv; matrix H1 with several references), the point's rows (each reference and response with its index, node, direction and unit) and decay, the largest decay check over the hits or frames averaged (null when none was checked) |
results/modal_coherence |
Repeating, the same lines (layout ["response","line"]): array coherence with one reference, multiple_coherence with several, f8 [responses, lines] |
results/modal_reference_spectra |
Repeating, the same lines (layout ["reference","line"]): array autospectra, f8 [references, lines], unit the reference's squared per Hz (lbf^2/Hz); with several references also condition_number, f8 [lines] |
results/modal_outcome |
Once at the end (kind modal_outcome): the mode, the outcome and its reason in words, whether the emergency stop was issued, the totals (accepted, taken, points_measured, points_planned) and the per-point counts; arrays accepted, taken, points_measured and points_planned, each f8 [1] |
end.json |
The end, as the run's state reports it, the totals, each stream's frames, drops, gaps and fault, and the state itself |
Every record is written as it is made, off the run's thread: a test cut off
part way leaves every finished point's FRF, coherence and spectra, and every
hit taken, on the disk, with run.json complete false and no end.json. A
point measured again is a new record whose replaces names the earlier one; a
reader takes each point's last record.
The log has an entry for the configure and the start (state, data.event
started), each state the run enters (state, data.event state; impact mode enters
arming on every arm and re-arm, then armed once the pre-trigger is full), each
point selected (selected), each hit or frame and its status (hit), each
point measured (result, with its measurement and replaces), the first hit or
frame of a measurement over the decay check's threshold (warning, data.event
response_not_decayed, with the point, seq, row and ratio), a drive
start (drive_start), an operator's verb and who asked (operator), a point cleared
(operator, clear_point), a force
target set from a hit (operator, target_from_hit), an abort (abort) and
the outcome (outcome). With record.streams false there is no streams/
folder. The Modal Test has no law.
The golden folders are written by cargo test -p sds-control --test
modal_test_golden_run on the simulator, at 1024 Hz with a band to 200 Hz:
impact_roving, a roving hammer over three points, two hits a point, a
512-frame block, the force and exponential windows on; and
shaker_burst_random, two shakers playing burst random (seed 7, 40 percent of
the frame) at one point, a 1024-frame block, matrix H1 over four frames.
What follows the wall clock is normalized: the wall times, the run's unique
identity, the build fields, the folders' paths and the station frames when
the run ended. Each stream is cut to its first 1024 frames, 512 in the shaker
folder (cut_from_frames); scripts/make_golden_runs.sh rewrites them.
Reports and the Run Log¶
A converted run's report reads its run record before anything else. The
runs block takes the run's level from the level the controller logged, the
chronology lists the run once with the holds, resumes and trips it logged
and its outcome in the record's words, and under the table its operator,
article, specification, level changes, alarms and counts; a report of a
recorded run has a Run section of the same facts. Mixed Mode, Explorer, the
Recorder and MIMO Shock have report templates of their own, and the MIMO
Random report reads the condition numbers, the drive prediction and the
drives' rms from the record. Data with no run record is reported as it was.
The run's log is not written into a run log (.hflog): each entry is
offered to the log keeper as a proposed entry, and only an accepted one is
written (hertzforge.core.run_log_events).