Return to KLUBNL.PL main page

rsgb_lf_group
[Top] [All Lists]

Re: LF: Related Technical Query - Soundcard calibrator

To: [email protected]
Subject: Re: LF: Related Technical Query - Soundcard calibrator
From: "Stewart Bryant" <[email protected]>
Date: Wed, 10 Dec 2003 11:15:45 +0000
In-reply-to: <[email protected]>
References: <[email protected]>
Reply-to: [email protected]
Sender: <[email protected]>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
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






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