Tuesday, June 5, 2018

audio - Monotonic, symmetrical soft-clipping polynomial


Okay, I intend to answer this question myself, but I would like other folks to pipe in on it. The issues or requirements are this:




  1. Input to soft-clipper is $x(t)$, output is $y(t)$.

  2. Output $y(t)$ limited in magnitude to $1$: $|y(t)| \le 1$

  3. Memoryless. $y(t)$ only a function of the present $x(t)$, no past values. So we may as well call the input $x$ and the output $y$. And we will call the memoryless soft-clipping function: $ y \triangleq f(x) $.

  4. $f(-1)=-1$ and $f(1) = 1$.

  5. $f(-x) = -f(x)$, an odd-symmetry (about $x=0$) function (so polarity of the input is irrelevant).

  6. Monotonically increasing function: $f'(x) \ge 0 \quad \forall x$

  7. For $|x| \le 1$, then $f(x)$ is a finite-order polynomial (so the frequency components generated are finite in frequency) and an odd-order polynomial (so all even-order terms are zero because of the odd-symmetry). Let's call that odd order $2N+1$ where $N\in \mathbb{Z} \ge 0$. Being a finite-order polynomial means a limit to the width of spurious frequency components generated which tells us what oversampling ratio suffices.

  8. $f(x)$ to have as many derivatives equal to zero as possible where $x=\pm 1$. So at $\pm 1$, this splices to a constant function ($f(x) = \operatorname{sgn}(x)$ for $|x| \ge 1$) with as many derivatives being continuous as possible.



So what is $f(x)$?


$$ f(x) = \begin{cases} -1 & x \le -1 \\ \sum\limits_{n=0}^{N} a_n \, x^{2n+1} \quad & -1 \le x \le +1 \\ +1 & +1 \le x \\ \end{cases}$$


$$ $$


$$\begin{align} y(t) & \triangleq f\big(x(t)\big) \\ & = \sum\limits_{n=0}^{N} a_n \, \big(x(t)\big)^{2n+1} \\ & = x(t)\sum\limits_{n=0}^{N} a_n \, \big(x(t)\big)^{2n} \quad |x(t)| \le 1 \end{align}$$


$f(x)$ is continuous everywhere and as many derivatives as possible are continuous everywhere and the only discontinuity in any derivative is at $x = \pm 1$.


What are the odd-order polynomial coefficients $a_n$?




No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...