Skip to content

[FEATURE] add pytta.vibration with human vibration weightings - #76

Open
aguirreSL wants to merge 1 commit into
PyTTaMaster:developmentfrom
aguirreSL:dev-vibration
Open

aguirreSL wants to merge 1 commit into
PyTTaMaster:developmentfrom
aguirreSL:dev-vibration

Conversation

@aguirreSL

@aguirreSL aguirreSL commented Oct 31, 2026 •

Copy link
Copy Markdown

Adds the module pytta.vibration, for human vibration measurements:

  1. weighting_filter(kind, fs) for the frequency weightings Wb, Wc, Wd, We, Wf, Wj, Wk and Wm of whole-body vibration (ISO 2631-1, -2, -4) and Wh of hand-arm vibration (ISO 5349-1), with the parameters of ISO 8041: band-limiting high-pass and low-pass (second-order Butterworth), acceleration-velocity transition and upward step. Each factor goes into the filter as its own poles and zeros. A single polynomial of the whole transfer function lost precision on the poles near 0.4 Hz, which moved Wk at 1 Hz by 0.15 dB.
  2. rms, mtvv (maximum of the running rms with a 1 s time constant) and vdv (fourth power vibration dose value), weighted or not, by channel.
  3. integrate(signalObj, times=1, fmin=0) and differentiate(signalObj, times=1) in the frequency domain, to go between acceleration, velocity and displacement, as ita_integrate and ita_differentiate do.

I did not have the ISO texts. The parameters and the tabulated weightings used in the tests come from a technical note of Virtins, "Frequency weightings for sound and vibration perceived by humans", which reproduces the parameter table of ISO 8041. Wk, Wd and Wh match its tabulated values within 0.04 dB from 0.1 Hz to 1 kHz. Please check the parameters against ISO 2631-1 Annex A or ISO 8041 if you have them.

The tests in tests/test_vibration.py check the weightings against those values, the rms, MTVV and VDV of a sine (A / sqrt(2) and A (3T/8)^(1/4)), and the first and second integrals and the derivative of a sine.

Checked with Python 3.12, numpy 1.26 and scipy 1.17. The existing tests behave as on development: the 7 failures there (3 in test_h5io.py, 4 in test_pyttasave.py) are the same with and without this change.

Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com

Frequency weightings Wb, Wc, Wd, We, Wf, Wh, Wj, Wk and Wm of ISO 2631
and ISO 5349-1 with the parameters of ISO 8041, built from the poles and
zeros of each factor (band limiting, acceleration-velocity transition,
upward step) so that the low-frequency poles keep their precision; the
weighted rms, MTVV and VDV; and integration and differentiation in the
frequency domain.

Tests check Wk, Wd and Wh against tabulated values within 0.05 dB, rms,
MTVV and VDV of a sine, and the integral and derivative of a sine.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant