Center for New Music and Audio Technologies

next up previous
Next: Implementation Up: Controlling the Oscillator Previous: Controlling the Oscillator

Frequency

The CORDIC algorithm returns sine values for a given input angle. In order to generate a sine wave a sequence of input angles corresponding the rotation of a unary vector within the angle range of the CORDIC algorithm, e.g., $ -\pi/2$ to $ \pi/2$ is required. Two such sequences of input angles are depicted in Figure 1.7.a.

Figure 1.7: a) Sequence of input angles. b) Triangular wave derived from a sawtooth.
\begin{figure}
\centerline {\epsfig{figure=triangl.wave3.eps,width=130mm}}\end{figure}

The gradient of the side of the triangle determines the period or frequency of the triangular wave and therefore of the resulting sinusoid.
A triangle wave can be derived from a sawtooth (see Figure 1.7.b), which is easily implementd using an accumulator. However, the direct translation of an interval $ -\pi/2$ to $ \pi/2$ into digital structure is an involved undertaking. This is because $ \pi$ is not a multiple power of $ 2$ - essential for the use of an accumulator. In this place a feature inherent in the CORDIC algorithm presents a convenient solution. As stated in equation 1.13, the infinite sum of signed values in the CORDIC lookup table equals the input angle. Consequently, if the range for the input angles is converted into a more suitable interval, such as $ -2^{n-1}$ to $ 2^{n-1}-1$, a scaling factor $ \xi$ can be described:

$\displaystyle \xi=\frac{2^n-1}{\pi}=\frac{\phi'}{\phi}\qquad \textrm{for all }n\in\mathbb {N}$ (1.15)

with $ \phi\in\left[-\pi/2;\pi/2\right] \textrm{ and }
\phi'\in\left[-2^{n-1};2^{n-1}-1\right].
$ This factor applied to equation 1.13 gives:

$\displaystyle \phi' = \xi \cdot \sum_{i=0}^{\infty}d_i\cdot \arctan\left(2^{-i}\right)$ (1.16)

We then gather the rescaled values for use in the CORDIC lookup table. This facilitates the input angle to be of an interval $ -2^{n-1}$ to $ 2^{n-1}-1$, and hence using an accumulator for generating the sequence of input angles.

Subsections
next up previous
Next: Implementation Up: Controlling the Oscillator Previous: Controlling the Oscillator
Home
Norbert Lindlbauer
2000-01-19