visualdynamics.core.transmissibility¶
transmissibility
¶
The two transmissibilities of one random record, side by side, and what the cross-spectrum estimate is worth.
Transmissibility is the motion at one point over the motion at another, a response over an input, at each frequency. From random data it is computed two ways, and both are commonly labeled transmissibility.
The ASD ratio divides the response's autospectrum by the input's and takes the root, because an autospectrum is a squared quantity:
T_ASD = sqrt(Gyy / Gxx)
It needs nothing but two autospectra, so any two plots can be divided.
It has no phase, and it cannot tell how much of Gyy the input caused:
whatever is on the response channel that the input did not cause (a
sensor's noise floor, a rattle, a cable beating, another source) is in
Gyy, and the ratio counts it as response.
H1 divides the cross-spectrum by the input's autospectrum:
H1 = Gxy / Gxx
The cross-spectrum keeps the phase between the two channels and averages toward zero whatever in the response is unrelated to the input, so H1 is not lifted by uncorrelated noise on the response. The coherence,
gamma^2 = |Gxy|^2 / (Gxx Gyy),
says what share of the response's mean square at each line the input accounts for linearly. The three are tied exactly: squaring the ratio and dividing by |H1| squared leaves one over the coherence, so
T_ASD = |H1| / sqrt(gamma^2)
at every line. The ratio and H1 agree where the coherence is near one and part company where it falls, the ratio always above: at a coherence of 0.68 it reads 1.7 dB over H1, at 0.29 it reads 5.4 dB over. The gap is the coherence restated, minus ten times its log, and it says the coherence is under one, not why, nor which of the two is nearer the truth. That depends on where the content the input did not cause is:
- on the response (a noise floor, a rattle, another source), H1 is unbiased and the ratio reads high, by one over the root of the coherence;
- on the input channel (its sensor's noise), H1 reads low, by the coherence, and the ratio low by its root, so the ratio is the nearer of the two. With 6 g rms of noise on the input of a survey whose truth is 0.100 at 1 kHz, H1 reads 0.073 and the ratio 0.084;
- leakage at a sharp resonance, a nonlinearity or a second input lower the coherence too, and bias both.
A transmissibility drawn without saying which of the two it is has not said what it is, and the gap between them is a reason to look at the measurement, not a correction to apply to either.
What H1 is worth at a line follows from its coherence and the number of averages behind it. The normalized random error of its magnitude is
eps = sqrt(1 - gamma^2) / (sqrt(gamma^2) * sqrt(2 n))
with n the number of independent averages: 3.0 percent at a coherence
of 0.9 and 60 averages, 7.5 percent at 0.9 and 10. It is one standard
deviation of the estimate about its expected value, and it is a
first-order result, good where it is small; past about 20 percent it
says the estimate is poor rather than how poor. The band drawn about H1
is |H1| (1 - k eps) to |H1| (1 + k eps), k the spread asked for (1 by
default); where k eps reaches one the band has no lower edge.
The count n is the averages the estimate is worth, not the frames cut.
Overlapped frames share samples and steady an average less than the same
number of independent ones would; a history's averaging gives the
equivalent count, discounted for overlap (Averaging.statistical_dof,
half its equivalent degrees of freedom), and that is the count the error
is read at, the same discount the confidence band on an averaged PSD
takes. With no overlap the two counts are equal.
read_transmissibility reads all of this from three averaged spectra
and returns a TransmissibilityReading; TimeHistory.read_transmissibility
computes the spectra from a record, from the same frames its PSDs and
FRFs use, and Project.read_transmissibility reads the one behind an
FRF in a project. plot_transmissibility draws a reading.
References
The single-input frequency response estimate, the coherence function and the random error of an estimated gain factor are Bendat and Piersol's; the discount for overlapped frames is Welch's.
- Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures, 4th ed. Wiley. The H1 estimate, the ordinary coherence function, and the normalized random error of the gain factor estimate, sqrt(1 - gamma^2) / (|gamma| sqrt(2 n)), with its limit to small errors.
- Welch, P. D. (1967). "The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on Time Averaging Over Short, Modified Periodograms." IEEE Transactions on Audio and Electroacoustics, 15(2), 70-73. doi:10.1109/TAU.1967.1161901 The variance of an average of overlapped frames, which is why such frames are worth fewer independent averages than their count.
Classes:
| Name | Description |
|---|---|
TransmissibilityPoint |
The two transmissibilities and the error of H1 at one line: |
TransmissibilityReading |
The ASD-ratio transmissibility beside H1, with H1's coherence and |
Functions:
| Name | Description |
|---|---|
frf_random_error |
The normalized random error of an H1 magnitude, from its |
read_transmissibility |
The ASD-ratio transmissibility and H1 from three averaged spectra, |
Classes¶
TransmissibilityPoint
dataclass
¶
TransmissibilityPoint(frequency: float, h1: complex, asd_ratio: float, coherence: float, error: float, spread: float, averages: float)
The two transmissibilities and the error of H1 at one line:
what TransmissibilityReading.at returns.
frequency is the line, h1 the complex H1 there and asd_ratio
the root of the response's autospectrum over the input's, both in
the reading's units (SI, as a record is stored). coherence is the
ordinary coherence, error the normalized random error of |H1| and
spread how many of those errors the band reaches either side.
averages is the count the error was read at.
Methods:
| Name | Description |
|---|---|
describe |
One line for a status bar: |H1| with its error and coherence, |
Attributes:
| Name | Type | Description |
|---|---|---|
magnitude |
float
|
|H1|. |
phase |
float
|
The phase of H1, in degrees from -180 to 180: the response's |
lower |
float | None
|
The band's lower edge, |H1| (1 - spread * error), or None |
upper |
float
|
The band's upper edge, |H1| (1 + spread * error). |
ratio_to_h1_db |
float
|
The ASD ratio to |H1|, in decibels of a magnitude: minus ten |
small |
bool
|
Whether the error is small enough for its expression to say |
Attributes¶
phase
property
¶
The phase of H1, in degrees from -180 to 180: the response's lag behind the input reads negative, minus 90 at a mode.
lower
property
¶
The band's lower edge, |H1| (1 - spread * error), or None where the band reaches zero and has no lower edge.
ratio_to_h1_db
property
¶
The ASD ratio to |H1|, in decibels of a magnitude: minus ten times the log of the coherence, since the ratio is |H1| over the root of the coherence. It says the coherence is under one, not which of the two estimates is nearer the truth (the module's introduction sets out why).
small
property
¶
Whether the error is small enough for its expression to say
how large it is (SMALL_ERROR).
Methods:¶
describe
¶
One line for a status bar: |H1| with its error and coherence,
then the ASD ratio and how far it reads over. scale converts
the reading's units into unit.
Source code in src/visualdynamics/core/transmissibility.py
TransmissibilityReading
dataclass
¶
TransmissibilityReading(frequency: ndarray, h1: ndarray, asd_ratio: ndarray, coherence: ndarray, frames: int, averages: float, response: str = '', reference: str = '', dimension: str = UNKNOWN, notes: tuple[str, ...] = ())
The ASD-ratio transmissibility beside H1, with H1's coherence and
random error, at every line: what read_transmissibility returns.
frequency holds the lines in Hz. h1 is the complex H1 at each,
asd_ratio the root of the response's autospectrum over the
input's, in the same units (SI, as a record is stored; dimension
names them, such as 'acceleration/acceleration'), and coherence
the ordinary coherence. A line where the input has no power holds
not a number in all three. frames is how many frames were averaged
and averages the independent count they are worth, the one the
error is read at. response and reference name the two channels.
notes says, as text, what the reading should be read with.
Methods:
| Name | Description |
|---|---|
band |
(lower, upper): the band about |H1| that reaches |
line |
The index of the line nearest |
at |
The reading at the line nearest |
describe |
What was read, in a few words: the two channels and the |
Attributes:
| Name | Type | Description |
|---|---|---|
is_transmissibility |
bool
|
Whether the two channels measure one quantity, so the reading |
title |
str
|
What to call the reading: 'Transmissibility' where it is one |
magnitude |
ndarray
|
|H1| at every line. |
phase |
ndarray
|
The phase of H1 at every line, in degrees. |
error |
ndarray
|
The normalized random error of |H1| at every line |
ratio_to_h1_db |
ndarray
|
The ASD ratio to |H1| at every line, in decibels: minus ten |
Attributes¶
is_transmissibility
property
¶
Whether the two channels measure one quantity, so the reading is a transmissibility, motion over motion. A force reference makes H1 an FRF (acceleration over force, say), and undeclared quantities leave it unsaid.
title
property
¶
What to call the reading: 'Transmissibility' where it is one
(is_transmissibility), else 'ASD ratio and H1'.
error
property
¶
The normalized random error of |H1| at every line
(frf_random_error), at the reading's averages.
ratio_to_h1_db
property
¶
The ASD ratio to |H1| at every line, in decibels: minus ten times the log of the coherence. Like the coherence, it does not say which of the two is nearer the truth.
Methods:¶
band
¶
(lower, upper): the band about |H1| that reaches spread
random errors either side, |H1| (1 -+ spread * error).
The lower edge is not a number at a line where the band reaches zero, since a magnitude has no edge below nothing; a plot on a log axis leaves the gap. One error either side is one standard deviation of the estimate; two is about the 95 percent band where the error is small.
Source code in src/visualdynamics/core/transmissibility.py
line
¶
The index of the line nearest frequency.
at
¶
at(frequency: float, spread: float = 1.0) -> TransmissibilityPoint
The reading at the line nearest frequency, with its band
reaching spread random errors either side.
Source code in src/visualdynamics/core/transmissibility.py
describe
¶
What was read, in a few words: the two channels and the averages.
Source code in src/visualdynamics/core/transmissibility.py
Functions:¶
frf_random_error
¶
The normalized random error of an H1 magnitude, from its coherence and the number of averages behind it.
eps = sqrt(1 - gamma^2) / (sqrt(gamma^2) * sqrt(2 n))
coherence is the ordinary coherence at each line, 0 to 1, any
shape; averages is n, the independent averages (an equivalent
count, discounted for overlap, need not be whole). The result is one
standard deviation of the magnitude as a fraction of it: 0.030 at a
coherence of 0.9 and 60 averages, 0.075 at 0.9 and 10, 0.0092 at
0.99 and 60. A coherence of one gives zero and a coherence of zero
gives infinity, the two ends of the expression; a line whose
coherence is not a number gives not a number. It is a first-order
result, good where it is small (SMALL_ERROR).
Source code in src/visualdynamics/core/transmissibility.py
read_transmissibility
¶
read_transmissibility(frequency: Any, gxx: Any, gyy: Any, gxy: Any, frames: int, averages: float | None = None, *, response: str = '', reference: str = '', dimension: str = UNKNOWN) -> TransmissibilityReading
The ASD-ratio transmissibility and H1 from three averaged spectra, with the coherence and the random error of H1.
gxx is the input's averaged autospectrum and gyy the
response's, one value per line of frequency; gxy is their
averaged cross-spectrum, conj(X) Y, from the same frames and the
same window, so the three are on one scaling (any common factor
cancels in every quantity here). frames is how many frames were
averaged and averages the independent count they are worth, the
frames themselves when omitted (right when they do not overlap).
response, reference and dimension are carried onto the reading
for its labels.
A line where the input has no power has no H1, no ratio and no
coherence: all three are not a number there. A line where the
response has no power has an H1 and a ratio of zero and no
coherence. A line where any of the three spectra is not a finite
number (a sample in the record that is not one) has no reading
either, and is noted as such rather than as missing power. The
coherence is ordinary_coherence's, the one a CPSD's coherence is,
and H1 is TimeHistory.compute_frfs's single-reference H1.
Source code in src/visualdynamics/core/transmissibility.py
338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |