pub struct PermutationEntropyEstimator<const W: usize> { /* private fields */ }Expand description
Permutation Entropy (PE) estimator for order m=3 (six ordinal patterns).
§Theoretical Basis: Bandt & Pompe (2002)
PE measures the complexity of a time series by examining the rank-order (ordinal) structure of consecutive m-tuples, completely ignoring amplitude. This critical property makes PE significantly more robust to measurement noise than Shannon entropy on amplitude histograms (Zanin et al. 2012 §III).
PE is uniquely powerful for RF diagnostics because cyclostationary jammers and low-power periodic structures produce ordinal patterns with a decidedly non-uniform distribution — detectable even at −20 dB SNR where amplitude distributions are indistinguishable from thermal noise.
Normalized PE ∈ [0, 1]:
- 0.0: maximally ordered — single pattern dominates (strong periodic structure)
- 1.0: maximally disordered — uniform over 3! = 6 patterns (pure AWGN)
§References
- Bandt, C. & Pompe, B. (2002). “Permutation entropy: A natural complexity measure for time series.” Phys. Rev. Lett. 88(17):174102.
- Zanin, M. et al. (2012). “Permutation entropy and its main biomedical and econophysics applications.” Entropy 14(8):1553–1577.
- Manis, G. et al. (2017). “Bubble entropy: An entropy almost free of parameters.” IEEE Trans. Biomed. Eng. 64(11):2711–2718.
§Design
no_std,no_alloc, zerounsafe- Fixed circular window of W norm values
- O(W) PE computation per query (query is optional; push is O(1))
- m = 3 is optimal for RF residual analysis (Manis et al. 2017)
Implementations§
Source§impl<const W: usize> PermutationEntropyEstimator<W>
impl<const W: usize> PermutationEntropyEstimator<W>
Sourcepub fn push(&mut self, norm: f32) -> PermEntropyResult
pub fn push(&mut self, norm: f32) -> PermEntropyResult
Push a new norm observation. Returns the current PE result.
Sourcepub fn compute(&self) -> PermEntropyResult
pub fn compute(&self) -> PermEntropyResult
Compute normalized PE from all valid values in the window.
Scans all consecutive triplets (W − 2 patterns when full).
Returns PermEntropyRegime::Insufficient if fewer than 3 values.