Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

Re: LF: Digital Sine Generators

To: [email protected]
Subject: Re: LF: Digital Sine Generators
From: "John Sexton" <[email protected]>
Date: Tue, 22 Jan 2002 08:28:41 -0800 (PST)
Reply-to: [email protected]
Sender: <[email protected]>
Hi Klaus,
I have been trying to understand your scheme and find that:
1) The Chinese Remainder Theorem is not necessary, since the scheme will work 
even if the divisions are not co-prime. What you are effectively doing is 
dividing the frequency range of 11025 Hz into 29 steps, then each of these into 
83 smaller steps and then each of these into 599 even smaller steps and it is 
obvious that this will cover the range whatever the 3 numbers are, but it would 
be best if they were multiple factors of 11025 so as to give integral steps, 
e.g. 105 x 105 x 200 which would make the smallest steps 5mHz.
2) You say that the "analytical outputs" (whatever they are) are multiplied 
together, whereas I find that if you add the fractions from your table for Jason and 
multiply by 11025 (modulo 11025) you obtain the frequencies listed in the table. The 
table entries for column 1 advance 3 , for column 2 go back 9 and for column 3 advance 3 
for each step (modulo the column step size), so it is clearly arithmetic.
3) The error column appears to be in error. All the entries are almost the same 
and not the difference between the calculated value and that required for Jason.
4) The little program at the end would not be so obscure if it were written in 
plain language.

If I am wrong you will surely tell me. The idea of using a Vernier though is a 
good one.
By the way, the reference from Graeme Zimmer concerning the Chinese Remainder 
Theorem is excellent, very well expressed. The only thing that is missing is 
the method of finding the solution other than just trial and error, which is 
Euclid's Algorithm. Since this is hardly the place for lessons in Number 
Theory, I will refrain from explaining it. Anyone who really feels he needs to 
know can email me privately.
Hope you find this helpful.

73 John,  G4CNN

-----Original Message-----
From: "Klaus von der Heide"<[email protected]>
To: [email protected]
Date: Mon Jan 21 03:06:24 PST 2002
Subject: LF:  Digital Sine Generators


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 ------------------------------



___________________________________________________
GO.com Mail Get Your Free, Private E-mail at http://mail.go.com




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