Skip to content

hertzforge.core.limit_prediction

limit_prediction

Where the limit channels would notch a random test, predicted before the test from a low-level transmissibility.

A limit channel is a response channel with a ceiling, its limit profile: an autospectrum the response there may not exceed. A controller holds its control channel to the reference everywhere in the band, except where holding it would put a limit channel over its profile. There it lowers the drive until the limit channel sits on its profile, and the control channel falls below the reference over those lines. That dip is the notch, and it is a change to the test: the article receives less than the requirement asked for in that band.

With one drive, every channel at a line moves in proportion to the control channel at that line, by the transmissibility T from the control channel to it. So the response a limit channel would have at full level is the reference passed through its transmissibility,

R = |T|^2 G_ref,

at every line, with G_ref the reference autospectrum. Where R is over the limit profile L, the control has to come down to L / |T|^2 for that channel to sit on its limit, and the control the controller can hold at a line is the lowest of what every limit channel allows:

G_ctrl = min(G_ref, L_1 / |T_1|^2, L_2 / |T_2|^2, ...).

The notch is where G_ctrl is under G_ref. Its depth at a line is 10 log10(G_ref / G_ctrl) decibels on the ASD, and its ratio, the control left over the reference, G_ctrl / G_ref: a limit channel twice over its profile cuts a notch 3 dB deep, a ratio of a half. A run of adjacent notched lines is one notch, named by its band, its deepest line, its depth there, the control left there and the limit channels that cut it. Each notch is then read against the specification's tolerance: where G_ctrl falls under the lower edge of the tolerance (the abort pair by default), the notch takes the control outside its tolerance, and the test as specified cannot be run on this setup without a written departure from it.

Every curve is read over each line's bin the way a comparison reads it (compliance.coverage and the curve's own area rule, Psd.areas and Bounded.limit_areas): its area over the part of the line's bin it is written over, divided by that width, or by the whole bin for a curve written at breakpoints, the cell compliance.judge judges the line by. Outside the reference nothing is specified and nothing is predicted, and outside a limit profile nothing is limited.

What it is and what it is not

This is a prediction, made once, open loop: the notch a controller would settle on if the article stayed linear between the low level and full level. It does not iterate a control loop. Three things make the as-run notch differ from it, and the reading says so where it applies:

  • a controller cannot cut a notch only a line or two wide; it cuts wider than predicted (NARROW_LINES);
  • joints and isolators usually damp more and soften as the level rises, so a sharp low-level peak is often lower and a little lower in frequency at full level, and the predicted notch deeper than the one cut;
  • a limit channel that would notch most of the band is, in effect, controlling the test, and whether the test as written exists on this setup is a question for the requirement's owner before the run (MOST_OF_BAND).

The prediction is single-input: every transmissibility is taken against the one control channel the specification is written at. A multi-point control strategy is the controller's to report and is not predicted here.

References

The output autospectrum of a single-input linear system, the input's autospectrum times the squared magnitude of its frequency response, is Bendat and Piersol's.

  1. Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures, 4th ed. Wiley. The single-input output spectral density, G_yy = |H|^2 G_xx.

Classes:

Name Description
Exceedance

One band where a limit channel's predicted response is over its

LimitChannel

One response channel's predicted response at full level, against

Notch

One notch the limit channels would cut in the control spectrum.

LimitPrediction

The notch a set of limit channels would cut in a random test at

Functions:

Name Description
response_through

The autospectrum of a response, from the autospectrum of the

predict_limits

Predict, before the test, where each limit channel would exceed

Classes

Exceedance dataclass

Exceedance(channel: str, low: float, high: float, lines: int, frequency: float, over_db: float)

One band where a limit channel's predicted response is over its limit profile at full level.

low and high are the first and last lines over, in Hz, and lines how many lines that is. frequency is the line where it is furthest over, and over_db how far, in dB on the ASD, above zero.

Methods:

Name Description
describe

The band in words.

Methods:
describe
describe() -> str

The band in words.

LimitChannel dataclass

LimitChannel(label: str, dimension: str, response: ndarray, profile: ndarray | None, judged: bool, exceedances: tuple[Exceedance, ...] = ())

One response channel's predicted response at full level, against its limit profile where it has one.

label is the channel's DOF and dimension the autospectral dimension both curves are in. response is the predicted autospectrum at every line of the prediction, SI, NaN where it is not predicted; profile the limit profile read at the same lines, NaN where the profile is not written, or None for a channel with no limit profile, which is predicted and does not notch. judged is False for a limited channel whose prediction says nothing (a transmissibility that is zero or not a number at every predicted line), which is left out of the notch. exceedances are the bands over the profile.

Methods:

Name Description
closest

(dB, Hz): where the predicted response comes nearest its

describe

The channel in a line: how far over its profile and where, or

Attributes:

Name Type Description
limited bool

Whether the channel has a limit profile.

over_db ndarray

The predicted response over the profile at every line, in dB

worst Exceedance | None

The exceedance furthest over, or None.

Attributes
limited property
limited: bool

Whether the channel has a limit profile.

over_db property
over_db: ndarray

The predicted response over the profile at every line, in dB on the ASD: above zero where it is over, NaN where either is not a number (and everywhere for a channel with no profile).

worst property
worst: Exceedance | None

The exceedance furthest over, or None.

Methods:
closest
closest(frequency: ndarray) -> tuple[float, float] | None

(dB, Hz): where the predicted response comes nearest its profile, or furthest over it; None where nothing is compared.

describe
describe(frequency: ndarray, unit_system: UnitSystem | None = None) -> str

The channel in a line: how far over its profile and where, or how close it comes; or its predicted peak with no profile.

Notch dataclass

Notch(low: float, high: float, lines: int, frequency: float, depth_db: float, ratio: float, level: float, reference: float, channels: tuple[str, ...], outside: bool | None, outside_lines: int, beyond_db: float)

One notch the limit channels would cut in the control spectrum.

low and high are its first and last notched lines, in Hz, and lines how many. At frequency, its deepest line, the control is depth_db decibels under the reference (reference, SI), at level: ratio of the reference on the ASD. channels are the limit channels that set the control anywhere in it, the one that sets the deepest line first. outside says whether the control falls under the tolerance's lower edge anywhere in it, at outside_lines lines and by beyond_db at most; None where the tolerance is not written over it, so nothing was judged.

Methods:

Name Description
tolerance_words

Whether it leaves the tolerance, in words.

describe

The notch in a line: band, depth in dB and as a ratio, the

Attributes:

Name Type Description
narrow bool

Whether it is fewer than NARROW_LINES lines wide, narrower

Attributes
narrow property
narrow: bool

Whether it is fewer than NARROW_LINES lines wide, narrower than a controller cuts.

Methods:
tolerance_words
tolerance_words(pair: str) -> str

Whether it leaves the tolerance, in words.

describe
describe(dimension: str, pair: str, unit_system: UnitSystem | None = None) -> str

The notch in a line: band, depth in dB and as a ratio, the control left, the channels and the tolerance.

LimitPrediction dataclass

LimitPrediction(frequency: ndarray, reference: ndarray, control: ndarray, lower: ndarray | None, tolerance: str, control_label: str, dimension: str, channels: tuple[LimitChannel, ...], notches: tuple[Notch, ...], notes: tuple[str, ...] = ())

The notch a set of limit channels would cut in a random test at full level, predicted from the transmissibilities from the control channel: what predict_limits returns.

frequency holds the transmissibility's lines, in Hz. reference is the specification read at each, SI, NaN outside it; control the control autospectrum the controller could hold with every limit channel at or under its profile, NaN where a limit channel's transmissibility is not a number; lower the lower edge of the tolerance pair tolerance read at each, or None where the specification carries none. control_label names the control channel and dimension the autospectral dimension of the control's curves. channels are the response channels, limited or not; notches the notches, in frequency order; notes what the reading should be read with.

Methods:

Name Description
describe

The verdict, then a line a notch and a line a channel, then

verdict

The prediction in one line, with what makes the predicted

table

A row a notch, as text: 'band' (Hz), 'depth' (dB and ratio),

Attributes:

Name Type Description
depth_db ndarray

How far under the reference the control is at every line, in

notched ndarray

True at every line inside a notch.

outside ndarray

True at every line where the control falls under the

limited tuple[LimitChannel, ...]

The channels with a limit profile.

judged tuple[LimitChannel, ...]

The limited channels whose prediction says something.

deepest Notch | None

The deepest notch, or None.

within_tolerance bool | None

Whether every notch leaves the control inside its tolerance:

reference_rms float

The reference's rms over the lines the control is predicted

control_rms float

The predicted control's rms over the same lines, SI.

Attributes
depth_db property
depth_db: ndarray

How far under the reference the control is at every line, in dB on the ASD: zero where there is no notch, NaN where nothing is predicted.

notched property
notched: ndarray

True at every line inside a notch.

outside property
outside: ndarray

True at every line where the control falls under the tolerance's lower edge.

limited property
limited: tuple[LimitChannel, ...]

The channels with a limit profile.

judged property
judged: tuple[LimitChannel, ...]

The limited channels whose prediction says something.

deepest property
deepest: Notch | None

The deepest notch, or None.

within_tolerance property
within_tolerance: bool | None

Whether every notch leaves the control inside its tolerance: True with no notch, None where no limit channel was judged or a notch's tolerance was not written.

reference_rms property
reference_rms: float

The reference's rms over the lines the control is predicted on (compliance.rms), SI.

control_rms property
control_rms: float

The predicted control's rms over the same lines, SI.

Methods:
describe
describe(unit_system: UnitSystem | None = None) -> list[str]

The verdict, then a line a notch and a line a channel, then the notes; the lines carry no full stop.

verdict
verdict() -> str

The prediction in one line, with what makes the predicted notch differ from the one a controller cuts, since the verdict is what the status line shows.

table
table(unit_system: UnitSystem | None = None) -> list[dict[str, str]]

A row a notch, as text: 'band' (Hz), 'depth' (dB and ratio), 'level' (the control left at the deepest line), 'channels' and 'tolerance' ('inside', 'outside' or 'not judged'), with 'describe', the whole notch in words.

Functions:

response_through

response_through(transmissibility: Any, density: Any) -> ndarray

The autospectrum of a response, from the autospectrum of the channel it is measured against and the transmissibility between them: |T|^2 G at every line.

transmissibility is complex (or real), density real, one value per line each. A line where either is not a number is not a number. It is the one-input case of the output spectral density matrix of a linear system, conj(H) S H^T with a cross term stored as conj(X_a) X_b (compute_cpsds); on one input and one output both conjugations meet on the one entry and leave |H|^2 S, so only autospectra are read and the result is the same in either convention.

predict_limits

predict_limits(transmissibility: Frf, specification: Specification, profiles: Psd | None = None, *, tolerance: str = 'abort') -> LimitPrediction

Predict, before the test, where each limit channel would exceed its limit profile at full level and the notch the controller would cut in the control spectrum to hold it there.

transmissibility holds one record per response channel, each the response over the control channel (H1 from a low-level run, or any FRF from the control channel's quantity), all against the one control channel. specification holds the reference at that control channel, with its tolerance. profiles holds the limit profiles, one autospectrum per limit channel at that channel's DOF and quantity; when omitted, they are the specification's own records at the response channels (a specification may carry them beside the reference, with no tolerance of their own). A response channel with no limit profile is predicted and does not notch. tolerance is the pair, 'abort' or 'warning', whose lower edge the notched control is read against. The module docstring sets out the method.

Parameters:

Name Type Description Default
transmissibility Frf

The response channels over the control channel.

required
specification Specification

The reference at the control channel, and its tolerance.

required
profiles Psd

The limit profiles; the specification's records when omitted.

None
tolerance ('abort', 'warning')

Which tolerance the notch is read against.

'abort'

Returns:

Type Description
LimitPrediction

The predicted responses, the notched control, the notches and the notes.

Raises:

Type Description
ValueError

If the transmissibility holds no record, fewer than two lines, records against more than one channel, or two records to one channel; if the specification holds no autospectrum at the control channel; if a pair's quantities cannot be compared (compliance.units_check) or a curve is on octave bands (compliance.comparable); if the specification is written over none of the lines; or if no response channel has a limit profile.