
Signal measures: group delay, noise level, LMS bound, QRS duration, ZCR, spectrogram
Source:R/SignalMeasures.R
group_delay.Rdgroup_delay is the exact group delay of B(z)/A(z) (the algorithm of
scipy.signal.group_delay) on w = pi k / worN; noise_power the
reference-based noise power or the successive-difference estimator
sum diff(x)^2 / (2(N - 1)); noise_psd the white-noise PSD level
sigma^2 / fs (two-sided) or twice it; max_step_size the LMS bound
2 / (M P_x); qrs_duration the mean and SD of (off - on)/fs;
zero_crossing_rate the share of sign changes (zero counted positive);
spcgm the one-sided PSD spectrogram with scipy's conventions.
Usage
group_delay(b, a, worN = 512)
noise_power(x, signal = NULL)
noise_psd(x, fs = 1, onesided = FALSE)
max_step_size(x, order = 16)
qrs_duration(qrs_on, qrs_off, fs = 1)
zero_crossing_rate(x, frame_length = NULL)
spcgm(x, fs = 1, nperseg = 256, noverlap = NULL, window = "hann", nfft = NULL)Arguments
- b, a
Numerator and denominator coefficients.
- worN
Number of frequencies.
- x
Signal.
- signal
Clean reference (NULL for the difference estimator).
- fs
Sampling frequency.
- onesided
One-sided PSD level.
- order
Number of LMS taps.
- qrs_on, qrs_off
Onset and offset sample indices.
- frame_length
Frame length (NULL for the whole signal).
- nperseg
Segment length.
- noverlap
Overlap (default
nperseg %/% 8).- window
"hann", "hamming" or "boxcar".
- nfft
DFT length (default
nperseg).
References
Oppenheim, A. V. and Schafer, R. W. (2010). Discrete-Time Signal Processing, 3rd ed. Pearson. Rice, J. (1984). Bandwidth choice for nonparametric regression. Annals of Statistics 12, 1215-1230. Haykin, S. (2014). Adaptive Filter Theory, 5th ed. Pearson. Rabiner, L. R. and Schafer, R. W. (1978). Digital Processing of Speech Signals. Prentice-Hall. Rangayyan, R. M. (2015). Biomedical Signal Analysis, 2nd ed. Wiley-IEEE Press. Allen, J. B. and Rabiner, L. R. (1977). A unified approach to short-time Fourier analysis and synthesis. Proceedings of the IEEE 65, 1558-1564.