Return-Path: Received: (qmail 20059 invoked from network); 22 Jan 2002 17:44:29 -0000 Received: from unknown (HELO warrior.services.quay.plus.net) (212.159.14.227) by excalibur-qfe1-smtp-plusnet.harl.plus.net with SMTP; 22 Jan 2002 17:44:29 -0000 X-Priority: 3 X-MSMail-Priority: Normal Received: (qmail 2639 invoked from network); 22 Jan 2002 16:56:16 -0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Received: from unknown (HELO post.thorcom.com) (212.172.148.70) by warrior.services.quay.plus.net with SMTP; 22 Jan 2002 16:56:16 -0000 Received: from majordom by post.thorcom.com with local (Exim 3.33 #2) id 16T40e-0006S4-00 for rsgb_lf_group-outgoing@blacksheep.org; Tue, 22 Jan 2002 16:42:56 +0000 Received: from [204.202.140.198] (helo=webmailmta.go.com) by post.thorcom.com with esmtp (Exim 3.33 #2) id 16T40c-0006Rz-00 for rsgb_lf_group@blacksheep.org; Tue, 22 Jan 2002 16:42:55 +0000 Received: from gomailjtp05 ([10.212.0.165]) by mta06.seamail.go.com (Sun Internet Mail Server sims.4.0.2000.10.12.16.25.p8) with ESMTP id <0GQC0022ALRX1T@mta06.seamail.go.com> for rsgb_lf_group@blacksheep.org; Tue, 22 Jan 2002 08:28:45 -0800 (PST) Date: Tue, 22 Jan 2002 08:28:41 -0800 (PST) From: "John Sexton" Subject: Re: LF: Digital Sine Generators To: rsgb_lf_group@blacksheep.org Message-ID: <5820836.1011716921516.JavaMail.computernetworks@gomailjtp05> MIME-Version: 1.0 X-Mailer: GoMail 3.0.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group Sender: 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" To: rsgb_lf_group@blacksheep.org 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 > >dj5hg@qsl.net >v.d.heide@on-line.de >heide@informatik.uni-hamburg.de > >------------------------------------------------------------- > >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