Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpl-opus!hpnmdla!hpsad!toma From: toma@hpsad.HP.COM (Tom Anderson) Newsgroups: comp.dsp Subject: Re: Sine curve fit algorithms Message-ID: <9520005@hpsad.HP.COM> Date: 29 Sep 89 17:40:54 GMT References: <2421@radio.oakhill.UUCP> Organization: HP Signal Analysis Division - Rohnert Park, CA Lines: 27 > charlie@oakhill.UUCP Charlie Thompson at Motorola Inc. Austin, Tx > I am looking for C source code for sine wave curve fitting algorithms. > Such an algorithm can be used to compute THD/Noise in a digitized sine > wave. The fitting algorithm with adapt to phase frequency, and > amplitude and create a minimum RMS error replica of the digitzed > sinewave. The RMS error thus indicates error in the original digitzer. A good paper on what you are looking for is in an Product Note 5180A-2 "Dynamic Performance Testing of A to D Converters". The code is in appendix IV. This app note includes some source code for what you are looking for, but it's not in C. Embarrasingly enough it's in HPL. This is a good A/D testing technique. The "effective bits" number is a good way to compare A/D converters. Unfortunately there is not good agreement on what "effective bits" means, but when measured with the technique you describe it is quite enlightening. Different A/D testing techniques reveal different types of problems with A/D's and S/H's. Anyone who needs to test A/D's will find a treasure trove of techniques in 5180A-2. If you find or write the C code, please post or mail it to me. Tom Anderson Hewlett-Packard Signal Analysis Division toma@hpsad.hp.com "It's only hardware" Opinions expressed are my own and not HP's.