Vankka J. - Digital Synthesizers and Transmitters for Software Radio (2000)(en)
.pdf156 Chapter 9
vide the interval in which functions have to be evaluated ([0, ʌ/4] for quadrature DDS (see Figure 9-6) and [0, ʌ/2] for single-phase DDS (see Figure 9-5) in shorter sub-intervals. Polynomials of a given degree are used in each subinterval to approximate trigonometric functions, resulting in piecewise polynomial interpolation architectures (see Figure 9-16). The phase address of the quarter of the sine wave “P” is divided into the upper phase address "u" and the lower phase address "P-u" with the word lengths of the variables
being u |
U and P |
k - 2. Thus, the piecewise polynomial approximation |
|
can be defined as: |
|
|
|
|
sin(π P) |
a0 (u) + a1 (u) (P u) + a2 (u) (P u)2... |
(9.21) |
|
2 |
|
|
where ai(u) is the polynomial coefficient as a function of the approximation interval. To implement (9.21) we have to store the polynomial coefficients, ai(u), into a lookup table and perform the arithmetic operations required to evaluate the polynomial. The block diagram of the piecewise polynomial approximation based architecture is shown in Figure 9-17. It is important to note that for this architecture there is a trade-off between the number of approximation intervals and the polynomial order for a targeted spectral purity. From the point of view of hardware implementation, this means that by increasing the lookup table locations it is possible to decrease the hardware used for the polynomial evaluation. Moreover, if the polynomial order is fixed, the increase of the lookup table locations allows the reduction of the multiplier’s wordlength used for polynomial evaluation. The architectures presented in [Fre89], [Wea90a], [Liu01], [Bel00], [Pal00], [Fan01], [Car02], [Elt02], [Sai02], [Str02], [Lan02a], [Lan02b], [Lan03a], [Lan03b], [Pal03], [Van04] are particular instances of this generic architecture. The main difference between them comes from the method used for computing the polynomial coefficients, the polynomial order, and the technique utilized for implementing the polynomial evaluation block. This differentiates them in terms of spectral purity, operating speed, area, and power consumption.
An algorithm is presented in [Sch92] where combinatorial binary logic is used to approximate the sine function. The quarter wave sine and cosine samples have been calculated by Chebyshev approximation [Whi93], [McI94], [Pal00], [Car02], Legendre approximation [Car02] and the Taylor series [Wea90a], [Edm98], [Bel00], [Sai02], [Pal03].
9.2.3.6.1 Piecewise Linear Interpolation
The case of piecewise linear interpolation is investigated in [Fre89], [Liu01], [Bel00], [Sai02], [Str02], [Lan02a], [Lan02b], [Lan03a], [Lan03b], [Str03a] All of these architectures approximate the sine function using a set of firstorder polynomials
158 |
Chapter 9 |
A different approach is used in [Lan02b], [Lan03b] in which the second coefficients of (9.22), a1, are selected so that their values can be represented with a limited number of signed digits. The selection is made by performing an exhaustive search starting from the standard linear interpolation solution [Lan03b]. This method reduces the number of the multiplication’s partial products procedure, which might result in increased multiplication speed. However, the disadvantage is that the partial products can be also negative and have to be selectively shifted. In order to diminish this drawback, the negation operation is performed using one’s complementers [Lan02b]. The hardware cost is reduced further by truncating the partial products prior to addition. Moreover, the lookup table and the multiplier are replaced by multibit multiplexers.
The technique called the dual-slope approach uses a set of first order polynomials to approximate the sine function [Str03a]. However, in [Str03a], each of the approximation intervals is divided into two equal sub-intervals having their own polynomial. These two polynomials have identical a0 coefficients, but different a1 coefficients. As a result, the lookup table storing the coefficients a0 has half of the locations of the lookup table containing the coefficients a1
9.2.3.6.2 High Order Piecewise Interpolation
By using a high order polynomial approximation, it is possible to generate high spectral purity waves or to significantly reduce or even eliminate the lookup tables. Several of the architectures proposed in the literature based on high order polynomial approximation [Car02], [Pal00], [Sod00], [Fan01], [Sod01], [Elt02], [Pal03], [Van04] will be discussed in the following.
Piecewise parabolic interpolation is proposed in [Pal00], [Fan01], [Elt02], [Pal03], [Van04]. Fanucci, Roncella and Saletti [Fan01] used four piecewise-continuous 2nd degree polynomials to approximate the first quadrant of the sine function. The authors state that, in order to maximize the SFDR, they selected polynomial coefficients that reduced the MAE. Eltawil and Daneshrad [Elt02] used the same architecture as Fanucci et al. [Fan01] for a second degree piecewise-continuous parabolic interpolation, necessitating two multipliers and two adders. The polynomial coefficients are calculated according to a Farrow structure realizing interpolation through digital filtering. An algorithm presented in [Van04] approximates the first quadrant of the sine function with sixteen equal length second degree polynomial segments (see Section 14.3). The coefficients are chosen using least-squares polynomial fitting.
The architectures from [Car02], [Pal00], [Pal03] use only two polynomials for approximating the sine/cosine function over the first quadrant. Con-
Blocks of Direct Digital Synthesizers |
159 |
sequently, the lookup table is completely eliminated, as the polynomial coefficients can be hardwired. Unfortunately, the elimination of the lookup tables increases the polynomial order and/or decreases the SFDR.
De Caro, Napoli and Strollo [Car02] introduced two designs implementing the quadrature architecture shown in Figure 9-6. The designs approximate the first octant of the sine and cosine functions with single 2nd and 3rd degree polynomials, respectively. In each case, the selection of the polynomial coefficients was made to optimize spectral purity. Several selection processes were considered by the authors, including the Taylor series, Chebyshev polynomials and Legendre polynomials. The minimax polynomial can be calculated by using numerical iterative algorithms, like the one originating from Remez [Pre92]. The Chebyshev approximation, however, is in practice so close to the minimax polynomial that additional numerical effort to improve approximation is hardly required [Car02]. The polynomial that minimizes the square error can easily be obtained using Legendre polynomials [Car02]. However, it was found in [Car02] that the best SFDR was achieved using non-linear Nelder-Mead simplex optimization [Nel65].
The method given in [Sod00] is based on quadratic polynomial interpolation, but it has the major drawback of its low SFDR (28.4dBc). This problem has been overcome in the next paper [Sod01] by using another quadratic interpolator for the error. The addition of the new interpolator makes the entire system implement a fourth degree interpolation. The obtained SFDR by this method is 62.8dBc.
Polynomials of degree n > 3 can be evaluated in fewer than n multiplications. For example,
P( |
|
) |
|
|
|
|
|
|
2 |
3 |
|
|
|
4 |
(9.25) |
|||||||
|
|
0 |
|
1 |
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
where a4 > 0, can be evaluated with 3 multiplications and 5 additions as follows [Pre92]
P(x) [ |
|
(Ax+ B)2 + Ax + C][ |
|
(Ax + B)2 + D]+ E, |
(9.26) |
|||||
|
|
|||||||||
|
|
|||||||||
where A B, C, D and E are precomputed |
|
|
|
|||||||
|
|
A = (a |
4 |
)1 / 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
B |
a3 |
|
A3 |
|
|
|
|
|
|
|
4A3 |
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|||
|
|
C |
a2 |
2B |
6B |
2 |
|
D |
(9.27) |
|
|
|
A |
2 |
|
|
|||||
|
|
|
|
|
|
|
|
|
||
|
|
D 3B2 + 8B3 + a1 A 2a2 B |
|
|||||||
|
|
|
|
|
|
|
|
|
A2 |
|
|
|
E a0 |
|
B4 |
B2 (C + D) CD |
|
Using Horner rule [Fan01], [Elt02] the equation (9.25) is computed as:
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Chapter 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
))). |
(9.28) |
This requires 4 multiplications and 4 additions. However, it is less parallel than (9.25) and the operation speed might be slower.
9.2.3.6.3 Taylor Series Approximation
The phase address "P" is divided into the upper phase address "u" and the lower phase address "P-u" [Wea90a]. The Taylor series is performed around the upper phase address (u) for sine
sin(π P) |
sin(π u) + k |
1 |
(P |
u) cos(π u) |
|
2 |
2 |
|
2 |
||
|
|
||||
|
k2 (P u) 2 sin(π |
(9.29) |
|||
|
u) |
||||
|
|
|
2 |
|
+ R3 |
|
2 |
|
|
|
|
|
|
|
|
|
where kn represents a constant used to adjust the units of each series term. The adjustment in units is required because the phase values have angular units. Therefore it is necessary to have a conversion factor kn, which includes a multiple of /2 to compensate for the phase units. The remainder is for sine
|
d n (sin( |
π r)) |
|
|
n |
|
|
|
||
Rn |
dr |
2 |
(P |
u) |
where r ε [ |
|
|
|
] |
(9.30) |
|
|
n |
|
|
|
|||||
|
|
|
|
|
|
|
|
|
Since sine and cosine both have upper limits of 1, the following upper estimate defines the accuracy:
|
|
|
u)n |
kn P |
n |
|
k (P |
u |
(9.31) |
||||
Rn |
n |
|
≤ |
|
max |
|
|
|
|
|
|
||
|
|
n |
|
|
n |
|
|
|
|
|
|
|
|
The Taylor series (9.29) are approximated in Figure 9-19 by taking two terms. The estimated accuracy is 7.5 10-5 (9.31), while additional terms can be employed, their contribution to the accuracy is very small and, therefore, of little weight in this application. Other inaccuracies present in the operation of current DDS designs override the finer accuracy provided by successive series terms. The seven most significant bits of the input phase are selected as the upper phase address "u", which is transferred simultaneously to a sine LUT and a cosine LUT as address signals, as shown in Figure 9-19. The output of the sine LUT is the first term of the Taylor series and is transferred to a first adder, where it will be summed with the remaining terms involved. The output of the cosine LUT is configured to incorporate the predetermined unit conversion value k1. The cosine LUT output is the first derivative of the sine. The least significant bits (P u) are multiplied by the output of the cosine LUT to produce the second term.
162 Chapter 9
By using trigonometric identities, it is possible to yield explicit expressions for TN(x)
T0 |
(x) = 1 |
|
|
T1 |
(x) |
x |
(9.34) |
Ti+1 |
(x) |
2xTi (x) |
Ti 1 (x), i ≥ 1 |
The phase address of the quarter of the sine wave "P" is divided into the upper phase address "u" and the lower phase address "P-u" with the word lengths of the variables being u U and P k - 2. The phase address "P represents the input phase [0, /2] scaled to a binary fraction in the interval [0, 1]. The range [0, 1] is subdivided into 2U sub-intervals. The U most significant bits of "P" encode the segment starting point u and are used as address to look-up tables that store polynomials coefficients. The remaining bits of "P" represent the offset "P-u In order to obtain the Chebyshev ex-
pansion of sin( |
P/2) function in [u, (u + 2 U)] interval, we firstly construct |
|||||||||||||||||||||||||||||||||||||||||||||||
the function f |
(x) |
|
|
which, for x ɽ [-1, +1], assumes the same values that the |
||||||||||||||||||||||||||||||||||||||||||||
function sin( P/2) assumes for P ɽ [u, (u + 2 U)]. |
|
|
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
f (x) = sin(π ( |
x |
+ |
1 |
|
+ u)), |
|
|
|
|
|
(9.35) |
||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
2U +1 |
|
|
2U +1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||
where |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ε |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ε |
|
|
|
|
|
|
]. |
(9.36) |
|
|
|
|
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
) |
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
By using (9.32), (9.33), and (9.34), it is possible to derive a piecewise
linear approximation for sine |
|
|
|
|
|
|
|
|
|
||||
sin( |
π P) c |
0 |
(u) |
+ c |
1 |
(u) T |
(2U +1 (P |
u) |
1) |
||||
|
2 |
|
|
|
|
1 |
|
|
|
|
(9.37) |
||
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
(c |
0 |
(u) |
c |
1 |
(u)) + 2U +1 c |
1 |
(u) (P |
u) |
|||
|
|
|
|
|
|
|
|
|
|
|
For sinusoidal signals, the integrals (9.33) have closed form solutions as [Str03b]
c0 (u) |
J0 ( |
|
π |
π |
(u + |
1 |
|
|
||
2U +2 |
) sin( |
2 |
2U +1 )), |
|
(9.38) |
|||||
|
|
|
π |
|
π |
|
1 |
iπ |
||
ci (u) |
2J i ( |
) sin( |
(u + |
)), i ≥ 1, |
||||||
2U +2 |
2 |
2U +1 + |
2 |
where Ji is the Bessel function of the first kind with index i
The truncation error in (9.32) can be approximated as the first term dropped from the series: cN TN(x). Furthermore, since Ti(x) is bounded between -1 and +1 (see (9.33)), the absolute value of the error can be upper
bounded by |
|
emax cN |
(9.39) |