From be9bd894a31c82a2d33030df6fed7b0248148519 Mon Sep 17 00:00:00 2001 From: Chin-Yun Yu Date: Mon, 7 Oct 2024 11:07:12 +0900 Subject: [PATCH] feat: author names --- src/grafx/processors/core/iir.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grafx/processors/core/iir.py b/src/grafx/processors/core/iir.py index 8468bfb..72cc009 100644 --- a/src/grafx/processors/core/iir.py +++ b/src/grafx/processors/core/iir.py @@ -61,6 +61,7 @@ class IIRFilter(nn.Module): where $h[n]$ is the true infinite impulse response (IIR). Clearly, increasing the number of samples $N$ reduces the error. The third one, :python:`"ssm"`, is based on the diagonalisation of the state-space model (SSM) of the biquad filter so it only works for the second-order filters. + This idea is based on `Ben Hayes `_'s derivation of associative scan for parallel IIR filter computation and implemented by `Chin-Yun Yu `_. The direct form II implementation of the biquad filter can be written in state-space form :cite:`smith2007introduction` as $$ x_i[n+1] &= A_i x_i[n] + B_i s[n], \\ @@ -73,7 +74,7 @@ class IIRFilter(nn.Module): $$ If the poles of the filter are unique, the transition matrix $A_i$ can be decomposed as $A_i = V_i \Lambda_i V_i^{-1}$ where $\Lambda_i$ is either a diagonal matrix with real poles on the diagonal or a scaled rotation matrix, which can be represented by one of the complex conjugate poles. Using this decomposition, the filter can be implemented as first-order recursive filters on the projected siganl $V_i^{-1} B_i s[n]$, where we leverage `Parallel Scan` :cite:`martin2018parallelizing` to speed up the computation on the GPU. - Finally, the output is projected back to the original basis using $V_i$. + Finally, the output is projected back to the original basis using $V_i$. We recommend using the :python:`"ssm"` over the :python:`"lfilter"` backend in general, not only because it runs several times faster on the GPU but it's more numerically stable.