Asymmetric Clipped Waveform - find RMS

Discussion in 'Math' started by pdelaney, Feb 11, 2013.

  1. pdelaney

    Thread Starter New Member

    Feb 11, 2013
    I have an asymmetrical clipped repeating waveform and I want to be able to find the root mean square.

    The function is as follows, with r and b constants:

    y(t) = ((exp(sin(t)*b)-exp(-sin(t)*b*r))/(exp(sin(t)*b)+exp(-sin(t)*b)))*(1/b)

    This is pretty computationally heavy. What are some approaches to use to get to a simpler root mean square? Should I use a Fourier transform?

    Thanks :D
  2. blah2222

    Distinguished Member

    May 3, 2010
    Is this the function you are describing? Hard to read from your post.

    y(t) = [\frac{1}{b}][\frac{e^{bsin(t)} - e^{-rbsin(t)}}{e^{bsin(t)} + e^{-bsin(t)}}]
  3. WBahn


    Mar 31, 2012
    That's a pretty strange looking function. Have you plotted it to get a feel for what it looks like? Does it look "clipped"? That's not at all apparent, to me, from the form of the equation.

    Are you required to produce a closed-form solution as a function of b and r? That's not going to be fun, either directly or via a Fourier transform (good luck finding an applicable pair). You might try doing it numerically, if only to get a feeling for the behavior. I'd set r=1 and see how the answer responds to changes in b. If that is pretty tame, then look at how it responds to values of r relative to b.
  4. The Electrician

    AAC Fanatic!

    Oct 9, 2007
    If the variable r is set to 1, you have the tanh function, a function I've used before to create a smoothly clipped waveform.

    It appears that the variable b controls the amount of clipping. Here are 3 waveforms with r=1 and b equal to 1, 2 and 3, with 3 giving the most clipping:


    The variable r controls the asymmetry. Here is the same family of waveforms but with r=1.1:


    I don't think you're going to be able to derive a closed form expression for the RMS value, but numerical evaluation isn't hard. Here's a curve of the RMS value for r=1 and b varying from .05 to 50: