Return-Path: Received: (qmail 78140 invoked from network); 10 Dec 2003 11:17:58 -0000 Received: from unknown (HELO marstons.services.quay.plus.net) (212.159.14.223) by ptb-mailstore with SMTP; 10 Dec 2003 11:17:58 -0000 Received: (qmail 16169 invoked by uid 10001); 10 Dec 2003 11:17:57 -0000 X-Filtered-by: Plusnet (hmail v1.01) X-Priority: 3 X-MSMail-Priority: Normal X-Spam-detection-level: 11 Received: from post.thorcom.com (193.82.116.20) by marstons.services.quay.plus.net with SMTP; 10 Dec 2003 11:16:38 -0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Fake-Domain: majordom Received: from majordom by post.thorcom.com with local (Exim 4.14) id 1AU2Jo-0002L9-8k for rs_out@blacksheep.org; Wed, 10 Dec 2003 11:15:48 +0000 Received: from [212.23.8.70] (helo=heisenberg.zen.co.uk) by post.thorcom.com with esmtp (Exim 4.14) id 1AU2Jn-0002L0-KN for rsgb_lf_group@blacksheep.org; Wed, 10 Dec 2003 11:15:47 +0000 Received: from 82-68-48-134.dsl.in-addr.zen.co.uk ([82.68.48.134] helo=virgin.net) by heisenberg.zen.co.uk with esmtp (Exim 4.22) id 1AU2Jm-00006a-JA for rsgb_lf_group@blacksheep.org; Wed, 10 Dec 2003 11:15:46 +0000 Message-ID: <3FD70061.50707@virgin.net> Date: Wed, 10 Dec 2003 11:15:45 +0000 From: "Stewart Bryant" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: rsgb_lf_group@blacksheep.org References: <01C3BEFA.E3D319B0.g4jnt@thersgb.net> In-reply-to: <01C3BEFA.E3D319B0.g4jnt@thersgb.net> X-Originating-Heisenberg-IP: [82.68.48.134] Subject: Re: LF: Related Technical Query - Soundcard calibrator Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on post.thorcom.com X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-SA-Exim-Scanned: Yes Sender: Precedence: bulk Reply-To: rsgb_lf_group@blacksheep.org X-Listname: rsgb_lf_group X-SA-Exim-Rcpt-To: rs_out@blacksheep.org X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Spam-Rating: 1 Andy According to http://integrals.wolfram.com/index.en.cgi integral (sin[x^2)]/(x^2) is sqrt(2 pi) * FresnelC[sqrt(2/pi) * x] - sin(x^2)/x and according to http://functions.wolfram.com/GammaBetaErf/FresnelC/02/ FresnelC(z) = integral from 0 to z (cos (pi/2 * t ^2)) dt But there are a number of simpler approximations including a series approximation that looks easy to compute. I suspect that somewhere in your lab there is a copy of mathematica, and that is almost certainly the best way to evaluate your integral. 73 Stewart G3YSX Andy talbot wrote: > Is there anyone who can answer this... > > I want to make a calibrator to enable accurate (better than 0.5%) absolute > audio measurements using a soundcard - ie. at audio frequencies to 20kHz. > Generating a square wave from CMOS logic with a precisely 5V p-p (2.5v peak) > waveform is trivial and can be measured accurately to doubl;e check. The > levels of the odd harmonic tones are all precisely defined by : > > RMS Amplitude = 2.5V * 4 / PI / SQRT(2) / N > > Where N is the (odd) harmonic number, so the fundamental has an amplitude of > 2.251 Vrms which can be potted down with an accurate potential divider - > straightforward, all harmonics can be used at known levels... > > Now, here is the complicated bit, I also want to include a calibrated noise > source for accurate S/N measurements and evaluation of various decoding > techniques. To remove the need for accurate true RMS measurement to set up > this unit, I am going to use Pseudo Random Sequence generated from a shift > register clocked very much faster than the frequencies of interest. It is > straightforward to make a 2^32-1 bit long sequence clocked at, say, 5MHz which > will have a repeat cycle of 14 minutes, suitable for most purposes - even Argo > calibration ! By filtering to a bandwidth significantly less than the clock > rate (20kHz max vs. 5MHz) the result will be sufficiently Gaussian to act as if > it were true noise. In practice, any real hardware filtering won't be > necessary as the soundcard itself will do the job; but there will be some basic > filtering to keep out the nasty birdies likely to be generated. > > Now, here is the bit I'm less sure how to work out. How do I calculate the > noise density of the PN sequence in the area of interest? Assumimg the PRN > Sequence has 1:1 mark/space ratio (with 2^32 bits it will be certainly near > enough) and assuming a perfect square edged waveform up to several 5MHz clocks > away (guaranteed by using HC series logic) the TOTAL power over the (almost) > infinite spectrum from DC to several clock multiples is defined exactly by the > RMS value of the waveform; and for a squarewave this is equal to the peak value > - here 2.5V. > > This TOTAL power is spread out in a SIN(x^2)/x^2 pattern. Since it will be > filtered to, essentially, just a small part of the first spectral lobe, the > calculation really comes down to calculating the height of this lobe which will > can be assumed to be sufficiently flat over the small bandwidth of interest. > Once that is done, the noise power, and hence the RMS value can be defined in > Volts / SQRT(Hz) which can be added to the signal / test tone of interest in > variouis proportions, with the S/N then known exactly. > > I'm quite incapable of integrating SIN(x^2)/x^2 from first principles (or any > other way for that matter :-) to calculate the level of the main lobe. Can > anyone point out the best way to do this calculation ? Instinct says that > for a small bandwidth segment, BW, close to zero frequency, the power will be > proportional to BW / Fclock, but I haven't a clue what scaling factors will > be included in this, and they are what matter for an absolute level calibrator. > > Andy G4JNT > > > > > >