0

I am trying to find the formula to generate the waveform below. By using harmonics on standard sine waves and then combining the outcomes, I have managed to generate, triangle, sawtooth and square waveforms but I am having great difficulty generating this one. Is there another basic waveform I have missed that is required to generate this wave ?

t.b.
  • 78,116

2 Answers2

1

Adding up the following waves makes your modified sawtooth:

$$\text{triangle}(x)=\int_0^{x}\text{sign}(\sin(t))dt$$

and

$$\text{square}(x)=\frac{1}{2}(\text{sign}(\sin(x))-1) \; .$$

Here's a description of those waves and their Fourier series:

http://en.wikipedia.org/wiki/Triangle_wave

http://en.wikipedia.org/wiki/Square_wave

Raskolnikov
  • 16,108
1

Raskolnikov's solution works; here is something a bit more elaborate:

$$b\left(\left(\frac{2x}{p}-2\left\lfloor\frac{x}{p}\right\rfloor-\frac12\right) \mathrm{sign}\left(2\left\lfloor\frac{x}{p}\right\rfloor-\frac{2x}{p}+1\right)+\frac12\right)$$

This function was constructed such that the function has period $p$, and that the two linear segments in a period have slopes $b$ and $-b$.