visualdynamics.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. For a curve written at
breakpoints that is 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.
- 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
¶
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:¶
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¶
over_db
property
¶
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).
Methods:¶
closest
¶
(dB, Hz): where the predicted response comes nearest its profile, or furthest over it; None where nothing is compared.
Source code in src/visualdynamics/core/limit_prediction.py
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.
Source code in src/visualdynamics/core/limit_prediction.py
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 |
Attributes¶
narrow
property
¶
Whether it is fewer than NARROW_LINES lines wide, narrower
than a controller cuts.
Methods:¶
tolerance_words
¶
Whether it leaves the tolerance, in words.
Source code in src/visualdynamics/core/limit_prediction.py
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.
Source code in src/visualdynamics/core/limit_prediction.py
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
¶
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.
outside
property
¶
True at every line where the control falls under the tolerance's lower edge.
judged
property
¶
judged: tuple[LimitChannel, ...]
The limited channels whose prediction says something.
within_tolerance
property
¶
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
¶
The reference's rms over the lines the control is predicted
on (compliance.rms), 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.
Source code in src/visualdynamics/core/limit_prediction.py
verdict
¶
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.
Source code in src/visualdynamics/core/limit_prediction.py
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.
Source code in src/visualdynamics/core/limit_prediction.py
Functions:¶
response_through
¶
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.
Source code in src/visualdynamics/core/limit_prediction.py
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
( |
Source code in src/visualdynamics/core/limit_prediction.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | |