Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

LF: Digital Sine Generators

To: [email protected]
Subject: LF: Digital Sine Generators
From: "Klaus von der Heide" <[email protected]>
Date: Mon, 21 Jan 2002 12:06:24 +0100
In-reply-to: <000a01c1a1f8$fd172b80$5be486d4@erica>
Reply-to: [email protected]
Sender: <[email protected]>


Hello all in the group,

If someone is interested in the following stuff, please e-mail.

73 de Klaus, DJ5HG

[email protected]
[email protected]
[email protected]

-------------------------------------------------------------

Digital Sin/Cos-Synthesis using the Chinese remainder theorem
=============================================================

A fundamental discussion upon the principles and drawbacks of Direct Digital Synthesis about one and a half year ago on this reflector inspired me to an investigation in this field. A number-theoretic approach led me to a new synthesis that in most cases is superior to classic DDS in three respects: Spurious free dynamic range (SFDR), speed, and requirement of memory. This is not the place for a full discussion. But the principle is simple:
In place of one single sin-table of length equal a power of 2
take a few cos/sin-tables of different prime-number-lengths and use them for parallel cos/sin-generation with individual phase accumulators. The analytical outputs then are all multiplied. The smallest frequency step is the sampling frequency divided by all the table lengths. The Chinese Remainder Theorem guarantees that all multiples of the frequency step can be realized.

The Advantages are:
(1)  There is no address quantization as in classic DDS.
(2) The table lengths is not a power of two which leads to spurs in classic DDS at frequencies m*2^-n times the sampling frequency (small integers m,n).
(3)  The implementation on DSPs is extraordinary simple
    and fast.

Example: Generation of the 17 tones of Jason at fs = 11025 Hz.
My choice of three cos/sin table lengths is:   29,  83,  599.
The frequency step then is  11025/29/83/599 = 0.007647 Hz.

Phase Accu Step in Table    resulting   frequency    SFDR
   1       2       3       frequency     error       dB
------------------------------------------------------------
  25      46     393      797.982027    0.000764    154.5
  28      37     396      798.234369    0.000764    154.2
   2      28     399      798.486711    0.000764    153.7
   5      19     402      798.739053    0.000764    154.4
   8      10     405      798.991395    0.000764    154.1
  11       1     408      799.243737    0.000763    153.1
  14      75     411      799.496079    0.000763    154.1
  17      66     414      799.748421    0.000763    154.2
  20      57     417      800.000763    0.000763    153.9
  23      48     420      800.253105    0.000763    154.1
  26      39     423      800.505447    0.000763    154.1
   0      30     426      800.757789    0.000762    158.2
   3      21     429      801.010131    0.000762    153.1
   6      12     432      801.262473    0.000762    153.9
   9       3     435      801.514815    0.000762    154.2
  12      77     438      801.767157    0.000762    154.0
  15      68     441      802.019499    0.000762    153.7

On my old DSP56002 it takes 8 instructions per sample and requires 2*(29+83+599) = 1422 words of memory for the tables. The spurious free dynamic range (SFDR) for this implementation in 24-bit-arithmetic is given in the table. It increases with 6 dB per additional bit to infinity because there is no approximation. The kernel of the program to compute n4 samples by two complex multiplications of three complex table lookups each is:

     do n4,loop
     mpy   x1,y1,a  ab,l:(r4)+
     mpy   x1,y0,b  y:(r0)+n0,x0
     macr -x0,y0,a  y:(r2),y0
     macr  x0,y1,b  a,x1
mpy x1,y0,b b,x0 mpy -x0,y0,a x:(r2)+n2,y1
     macr  x1,y1,a  x:(r0),x1
     macr  x0,y1,b  l:(r1)+n1,y
loop

That's in short.
--------------------------- END ------------------------------


<Prev in Thread] Current Thread [Next in Thread>