0
$\begingroup$

I have a signal X which is a sinusoid with asymmetrical clipping on the positive half of the waveform. The clipping characteristic is “soft”. I don’t know ahead of time either the clipping threshold or the sharpness of the clipping characteristic. I know the frequency exactly. I can only observe this signal through a linear filter whose characteristics are unknown, although it is very likely minimum phase. I wish to recover X from the signal at the filter output. Any ideas on how to proceed ?

Bob

$\endgroup$
  • $\begingroup$ By "recover", do you mean recover its frequency? $\endgroup$ – A_A Jan 11 at 15:55
1
$\begingroup$

A memoryless time-invariant non-linearity, a waveshaper, has an input $W$ output $X$ relationship $X = f(W).$ To arbitrarily small error for a given range of input values, the function $f(x)$ can be thought to be a polynomial of sufficient degree. A polynomial $f(x)$ is a weighted sum of powers $x^n$ with nonnegative exponents $n$. The input $W$ to the waveshaper is a sinusoid, assumed to be of unit amplitude for simplicity of presentation:

$$W = \cos(\omega T + \alpha),$$

where $T$ represents time, $\omega$ represents frequency, and $\alpha$ represents phase at time $T = 0$. The output of the waveshaper is a weighted sum of powers of $W$ with exponents $0, 1, 2, 3, 4, 5, \ldots:$

$$1,\\ \color{blue}{\cos(\omega T + \alpha)},\\ \frac{1}{2}\cos(2ωT + 2α) + \frac{1}{2},\\ \frac{1}{4}\cos(3ωT + 3α) + \frac{3}{4}\color{blue}{\cos(ωT + α)},\\ \frac{1}{8}\cos(4ωT + 4α) + \frac{1}{2}\cos(2ωT + 2α) + \frac{3}{8},\\ \frac{1}{16}\cos(5ωT + 5α) + \frac{5}{16}\cos(3ωT + 3α) + \frac{5}{8}\color{blue}{\cos(ωT + α)},\\ \ldots$$

Highlighted in blue, the phase-shifted cosine of frequency $\omega$ appears always with the original phase shift in the different powers of $W.$ If the distortion is mild, then the power $W^1$ with a positive weight dominates the output $X$. Also each $n$th harmonic phase-shifted cosine of frequency $\omega$ appears in the powers of $W$ always with phase shift $n\alpha,$ so it will be in the output $X$ of the waveshaper with that phase shift or the inverted phase shift $n\alpha + \pi$ due to possible negative weights in the waveshaper polynomial.

Things come even easier to see if you construct $f(x)$ as a weighted sum of Chebyshev polynomials of the first kind $T_n(x):$


Figure 1. Chebyshev polynomials of the first kind. (source)

With $n = 0, 1, 2, 3, \ldots,$ the approximation error will be made arbitrarily small for range $-1 \le x \le 1$. The output will be constructed of basis functions that for the sinusoidal input are directly its harmonics:

$$T_n(W) = \cos(n\omega T + n\alpha).$$

If you have some parametric model of the unknown filter, perhaps you can find the parameters based on the phase relationships of the harmonics and construct an inverse filter that recovers the phase alignment of the harmonics and also adjusts their amplitudes so that the waveshaped signal $X$ is recovered.

If you don't have a parametric model for the filter, I don't know if knowing the phase frequency response at a set of discrete frequencies (and with a modulo $\pi$ ambiguity) helps to recover the magnitude frequency response using a relationship between the two for minimum-phase filters.

One parameterized model for a positive-side-soft-clipping waveshaper with sharpness $v > 0$ and maximum value $s$ is:

$$f(x) = x + s - \frac{\ln\left(e^{vx} + e^{sv}\right)}{v}.$$

$\endgroup$
  • $\begingroup$ Excellent response. The unknown filter is actually the response of an acoustic tube open at one end. The response therefore looks like multiple resonances centered on the harmonic series, with an additional low pass characteristic due to non-ideal end-effects and friction. $\endgroup$ – Bob Jan 12 at 11:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.