next up previous contents index
Next: Fourier series of the Up: Classical waveforms Previous: Sawtooth waves and symmetry   Contents   Index

Decomposing the classical waveforms into sawtooth and parabolic waves

Among the several conclusions we can draw from the even/odd harmonic decomposition of the sawtooth wave (Figure 10.2), one is that a square wave can be decomposed into a linear combination of two sawtooth waves. We can carry this idea further, and show how to compose any classical waveform having only jumps (discontinuities in value) but no corners (discontinuities in slope) as a sum of sawtooth waves of various phases and amplitudes. We then develop the idea further, showing how to generate waveforms with corners (either in addition to, or instead of, jumps) using another fundamental waveform we'll call the parabolic wave.

Suppose first that a waveform of period $N$ has discontinuities at $j$ different points, ${A_1}, \ldots, {A_j}$, all lying on the cycle between 0 and $N$, at which the waveform jumps by values ${d_1}, \ldots, {d_j}$. A negative value of $d_1$, for instance, would mean that the waveform jumps from a higher to a lower value at the point ${A_1}$, and a positive value of $d_1$ would mean a jump from a lower to a higher value.

Figure 10.3: Decomposing a waveform with two discontinuities (a) as a sum of two sawtooth waves two sawtooth waves (b and c).
\begin{figure}\psfig{file=figs/fig10.03.ps}\end{figure}

For instance, Figure 10.3 shows (part a) a classical waveform with two jumps: $({A_1}, {d_1}) = (0.3, -0.3)$ and $({A_2}, {d_2}) = (0.6, 1.3)$. Parts (b) and (c) show sawtooth waves which each has one of the two jumps. The sum of the two sawtooth waves reconstructs the waveform of part (a), except for a possible constant (DC) offset.

The sawtooth wave with a jump of one unit at the point zero is given by

\begin{displaymath}
s[n] = n/N - 1/2
\end{displaymath}

over the period $0 \le n \le N-1$, and repeats for other values of $n$. A sawtooth wave with a jump at $A, d$ is given by $s'[n] = d s[n-A]$. The sum of all the sawtooth waves necessary would be:

\begin{displaymath}
x[n] = {d_1} s[n - {A_1}] + \cdots + {d_j} s[n - {A_j}]
\end{displaymath}

The slopes of the segments of the classical waveform of part (a) are all equal, and equal the sum of the slopes of the component sawtooth waves, equal in general to

\begin{displaymath}
-{{{d_1} + \cdots + {d_j}} \over {N}}
\end{displaymath}

The square and rectangle waves have horizontal line segments (slope zero); for this to happen in general the jumps must add to zero: ${d_1} + \cdots + {d_j} = 0$.

Figure 10.4: The parabolic wave.
\begin{figure}\psfig{file=figs/fig10.04.ps}\end{figure}

To decompose classical waveforms with corners we use the parabolic wave, which, over a single period from 0 to $N$, is equal to

\begin{displaymath}
p[n] = {{({n\over N} - {1\over 2})}^2}/2 - 1/24
\end{displaymath}

as shown in Figure 10.4. It is a second-order (quadratic) polynomial in the variable $n$, arranged so that it reaches a maximum halfway through the cycle at $n = N/2$, the DC component is zero (or in other words, the average value over one cycle of the waveform is zero), and so that the slope changes discontinuously by $-1/N$ at the beginning of the cycle.

To construct a waveform with any desired number of corners (suppose they are at the points ${B_i}, \ldots, {B_l}$, at which we want the slope changes to equal ${c_1}, \ldots, {c_l}$), we sum up the necessary parabolic waves:

\begin{displaymath}
x[n] = {-N c_1} p[n - {B_1}] - \cdots - {N c_l} p[n - {B_l}]
\end{displaymath}

An example is shown graphically in Figure 10.5.

Figure 10.5: Decomposing a triangle wave (part a) into two parabolic waves (b and c).
\begin{figure}\psfig{file=figs/fig10.05.ps}\end{figure}

If the sum $x[n]$ is to contain line segments (not segments of curves), the $n^2$ terms in the sum must sum to zero. From the expansion of $x[n]$ above, this implies that ${c_1} + \cdots + {c_l} = 0$. Analyses of complex waveforms (as in the figure) will always satisfy this condition because the changes in slope, over a cycle, must all add to zero for the waveform to connect with itself.


next up previous contents index
Next: Fourier series of the Up: Classical waveforms Previous: Sawtooth waves and symmetry   Contents   Index
Miller Puckette 2006-03-03