Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the module
pytta.vibration, for human vibration measurements: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.rms,mtvv(maximum of the running rms with a 1 s time constant) andvdv(fourth power vibration dose value), weighted or not, by channel.integrate(signalObj, times=1, fmin=0)anddifferentiate(signalObj, times=1)in the frequency domain, to go between acceleration, velocity and displacement, asita_integrateandita_differentiatedo.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.pycheck 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 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com