Preview only show first 10 pages with watermark. For full document please download

Software For Metrological Characterisation Of Pc Sound Cards

   EMBED


Share

Transcript

Software for Metrological Characterisation of PC Sound Cards Ján Šaliga (1), Linus Michaeli (2) Department of Electronics and Telecommunications, Technical University in Košice, Park Komenského 13, SK-04120 Košice, Slovak Republic (1) Phone (421) 95 6022866, Fax (421) 95 6323989, e-mail: [email protected] (2) Phone (421) 95 6022857, Fax (421) 95 6323989, e-mail: [email protected] Abstract – The paper demonstrates virtual instrument software that enables performing simple and fast testing and metrological characterisation of any PC sound card in waveform recorder applications. In addition to the visualisation of recorded signal patterns in time and spectral domain, the software directly computes a variety of basic metrological parameters of input analogue channels e.g. effective number of bits, THD, THD+noise, SINAD, etc. according to IEEE Std 1057, IEEE Std. 1241 and DYNAD. The parameter determination is performed in time as well as in spectral domain to compare the achieved results. The software was developed in LabWindows/CVI (C language) with implementation of low-level Win32 API multimedia functions. The authors’ intention is to apply the software for computer component vendors and in educational demonstration of ADC testing principles. The paper contains also a few examples of achieved interesting results from testing some PC sound cards and practical authors’ experiences from PC sound card testing. Keywords - PC sound card, waveform recorder test, ADC dynamic test, virtual instrumentation software Introduction Sound cards, sometimes called soundblasters, are very common and often used as a component of many computers (PC) nowadays. They can be considered as their “standard” audio (analogue) interface. Sound cards are much cheaper than multifunction and industrial data acquisition plug-in boards – usually more than 10 –100 times. On the other hand, the parameters of analogue inputs and outputs declared by vendors, e.g. at least 16 bits resolution of analogue-to-digital and digital-to-analogue converters (ADCs and DACs), indicate the possibility to apply such a card in low cost, and low frequency data acquisition systems acquiring signals from chemical, pressure, vibration, and other sensors. The frequency bandwidth of sound card can be extended on DC or quasi DC signals by applying a chopper or a modulation amplifier on card input followed by a digital demodulation in the PC. These ideas as well as an industry challenge led the authors to perform some tests of analogue signal recording channels according to the IEEE Std. 1057, IEEE Std. 1241, and DYNAD drafts to verify the application possibilities of sound cards in the examples indicated hereinbefore. New proprietary virtual instrument (VI) software had to be developed to perform the experiments and tests. Dynamic test methods for waveform recorders based on plug-inboards The standard test methods for waveform recorders are generally well known, and they were brought out in a comprehensive form in IEEE Std. 1057 [1]. Nowadays the new, about to be accepted standards IEEE Std. 1241 [2] and DYNAD [3] are coming with some new ideas and test procedures described in more details. More over, many researchers have contributed with lots of ideas and approaches to solving AD and DA converters test problems. Probably the widest survey of those ideas was made in [4]. Comparing the standards, IEEE Std. 1057 - “Standard for digitising waveform recorders” is the most close to the task of sound card testing. On the other hand, this standard covers mostly the static and quasi-static tests methods based mainly on the histogram testing and there is a deficiency of procedure and data processing details on testing and determining the dynamic parameters of ADC especially in the frequency domain. The histogram-based methods are generally not very convenient for sound card characterisation because of the AC coupling on signal input of the cards (Fig. 1). Both on-coming standards are more focused on testing stand-alone ADCs but they contain much more specific details on execution and evaluation of some dynamic tests. Particularly the DYNAD draft contains very detail descriptions of the data processing for estimation of the ADC dynamic parameters in the spectral domain. These facts as well as many similarities in testing ADCs and digitising waveform recorders led to the decision to apply many procedures referred in DYNAD and in IEEE Std. 1241 for evaluation of ADC dynamic parameters on PC sound card testing in the role of waveform recorder. Testing waveform recorders in the form of PC plug-in boards have some specifics. The interior of PC is generally illicit for a precise digitalisation of an input signal. The test methods developed and suggested as well as some achieved test results for multifunction industrial plug-in boards in various circumstances have been published in [5], [6], [7]. The authors preferred the dynamic test methods based on FFT spectrum or sinusoidal curve fit with determining effective number of bits (ENOB) versus test frequency as the main quality characterisation parameter of the tested board. In software area, two universal versions of VI test software have been developed and published – one in LabVIEW [9] and another in Matlab [8]. Both versions of software have very general assignation – they process data from any measurement recorded in a file and they don’t contain any data acquisition part. Sound card as a waveform recorder Sound cards are generally dedicated to recording and playing sound signals. This results in a restriction of input and output frequencies span usually to the frequency bandwidth from 20Hz to 20kHz what prevents from applying the static test methods and leads to the application of the dynamic test methods using the sinusoidal input test signal. The typical function block diagram of soundblaster input recording channels is shown in Fig. 1 ([10], [11] and others). System interface FIFO µ-law, A-law, linear Σ∆ ADC M U X Progr. gain amplifiers Microphone, line aux, video sound Optional voltage divider and preamplifier R AC coupling L Optional EMC components Sound CODEC circuit Variable sample frequency generator CODEC control unit Fig. 1. Typical function block diagram of analogue and digital circuits for signal recorder part in sound cards The analogue to digital conversion usually employs sigma-delta converters that can work at least in two precision modes – 8 and 16 bits. Data can be coded into a few non-linear and linear formats. The linear format (PCM), which is the most suitable format for the performance test, was chosen in the developed testing procedure. A variety of optional sampling frequencies depending on the sound card model – at least 8, 11, 22.05 and 44.1 kHz are commonly offered. The stability and eventually a frequency shift of these frequencies are not usually explicitly indicated in sound card manuals. Digitising input may be switched by an analogue multiplexer. A microphone input and a less sensitive line-in (aux) input are builtin for linking external analogue signal sources. Sound cards are probably most often used in PCs with operational systems (OS) Windows 9x/NT/2000/ME/XP. Any sound application under Windows can use some of three levels of Win32 API multimedia class of functions for controlling and data transferring to/from any Windows compatible sound card: • The highest MCIWnd window class, • The middle MCI device-independent interface, • The low-level audio interface, which is used by applications that need the finest possible control over audio devices. Test software and setup characteristics The general setup needed for performance testing soundblaster recording part is very simple. It consists only of a precise test signal generator and a common PC with the sound card to be tested in a PC chassis. The ultra low distortion generator DS360 by Stanford Research Systems with 20bits DAC and THD better than 100dB was used in the testing setup. The sound cards were tested in various new (ATX) and old (AT) PC chassis with different motherboard and in a few notebooks. L Precise sinewave generator (DS360) Unbalanced PC with sound card output Optional isolating transformer Power R Fig. 2. Setup for sound card testing This setup must be integrated with a convenient software, which must control the soundblaster to be tested, collect and process the recorded data as well as present and archive the results. The current general-purpose software ([8], [9]) does not contain any part of data collecting and they enable only data processing. A possible additional distortion in the recorded data, which can be caused by using a third-party, unknown in details recording software acquiring data from sound card in a non-linear format, led to the decision to develop a new special VI software. The software was created with intention of maximal comprehensiveness at sound card testing. It was fully integrated with its low-level data recording subroutines and it can be installed as an executable file in any PC with Windows OS and correctly installed sound card including installation of its Windows compatible driver. Software development environment LabWindows/CVI by National Instruments with support of Software Development Kit (SDK by Microsoft) was used as the main software-developing tool. The user panel is shown in Fig. 3. Fig. 3. User front panel of the developed VI software The software enables: • Recording data from any sound card in standard 8/16bits and mono/stereo modes at an optional standard sampling frequency in linear PCM format. The user can follow the • • • recording process and simply identify any problem from text messages showed in the message window. Visualisation of recorded data, including zooming for visual assessment as well as saving and reading recorded data to/from a file. Analysing recorded data in time domain: o Performing optionally 4 and 3 parameter fitting with enumeration of noise power, effective numbers of bits (ENOB) and others derived parameters o Estimation of real sampling frequency o Estimation of DC value, amplitude and phase of test signal Analysing and visualisation of recorded data in spectral domain: o Computing of power density spectrum and power spectrum distribution function o Estimation of basic harmonic, THD, THD+noise, ENOB and other parameters calculated from the power density spectrum The iteration algorithm for the four parameters sine wave fitting was a bit changed to IEEE standards because of its convergence problem. The applied algorithm starts with computing sinewave fit and corresponding noise power PN0 with normalized frequency fn0 = fsignal/(fsampling sf) higher than its estimation from given fsignal and fsampling by sampling frequency shift sf < 1. Then next two fits and corresponding noise powers PN1, PN2 are computed at frequencies fnk = fsignal/(fsampling.sf +k.fstep) (k=0,1,2), where fstep0 is a beginning sampling frequency step for minimal PN searching procedure. Comparing PNk values, either the fn0 or .fstep is decreased for the next iteration. The iteration process is stopped if the difference between PNk is lower than armed limit. The iteration process converges certainly if the estimations of fsignal and fsampling are relatively close to their exact values and sf is chosen properly. Examples of achieved test results By now, 8 models of sound cards were tested. They can be divided into two groups • Sound cards implemented on PC mainboards or in notebooks • “Stand-alone” plug-in sound cards The first tested models were soundblasters integrated on relatively new ATX mainboards m805lr and m807r by PC CHIPS [12], [13] in 2000. The mainboards support Socket-462 (Socket-A) processor front-side bus speeds of 200MHz or 266MHz. They use the VIA VT8363 chipset, which provides a 4X AGP slot for highly graphics display, CPU Plug & Play through firmware. The mainboards have built-in the same AC97 Codec, provide an AMR (Audio Modem Riser) slot to support Audio and Modem application. The m805lr has a builtin 10BaseT/100BaseTX. The vendor specifies following features of implemented AC97 Codec: “Supports 18-bit ADC and DAC as well as 18-bit stereo full-duplex codec” ([12], [13]). Two samples the PC CHIPS m805lr and one m807r were tested. Some results obtained at a sampling frequency of 44.1 kHz are presented in Tab. I and II, as well as in Fig. 4 and 5. Tab. I. Results from ENOB testing of sound CODECs implemented on mainboard PC CHIPS m805lr in form: result from fitting/results from spectrum Test freq. 8 bits mode 16 bits mode [Hz] mono L R mono L R 21 7.67/7.45 7.75/7.54 7.69/7.53 8.6/8.56 8.62/8.59 8.52/8.46 41 7.63/7.53 7.71/7.63 7.67/7.54 8.62/8.55 8.63/8.57 8.59/8.51 81 7.55/7.37 7.57/7.36 7.53/7.46 8.66/8.56 8.66/8.57 8.61/8.55 211 7.52/7.44 7.51/7.45 7.5/7.42 8.52/8.48 8.54/8.51 8.47/8.35 411 7.34/7.05 7.35/7.09 7.39/7.27 8.28/8.12 8.32/8.26 8.26/8.09 811 7.34/7.11 7.34/7.12 7.2/7.08 7.64/7.42 7.67/7.48 7.64/7.4 2.1k 7.19/6.9 6.92/6.83 6.86/6.69 7.58/7.46 6.60/6.29 6.46/6.25 4.1k 6.5/6.39 6.34/6.22 6.21/6.03 6.51/6.42 5.77/5.51 5.62/5.37 8.1k 5.1/4.92 5.1/4.91 4.98/4.85 5.11/4.9 4.93/4.77 4.89/4.62 12.1k 3.92/3.66 3.88/3.65 3.82/3.62 4.01/3.92 3.99/3.8 3.97/3.78 15.1k 0.5 0.5 0.3 0.5 0.5 0.4 Fig.4a. ENOB dependence on the test signal frequency, for the 8 (*) and 16 (x) bit mono modes of sound codec on PC CHIPS m805lr Fig. 4b. Typical spectrum in the 16bit mode of sound codec on PCCHIPS m805lr (test frequency is 2.1kHz). Tab. II. Results from ENOB testing of sound codec implemented on mainboard PC CHIPS l807r Test freq. 8-bit mode 16-bit mode [Hz] mono L R mono L R 21 7.93/7.87 7.91/7.86 7.94/7.95 9.6/9.53 9.60/9.57 9.71/9.64 41 7.95/7.89 7.94/7.88 7.95/7.94 9.79/9.73 9.89/9.85 9.84/9.82 81 7.96/7.98 7.95/7.94 7.97/7.96 10.25/10.28 10.29/10.29 10.16/10.09 211 7.97/7.98 7.96/7.97 7.97/7.94 10.25/10.27 10.34/10.34 10.18/10.11 411 7.97/7.97 7.96/7.98 7.98/7.97 10.31/10.28 10.35/10.36 10.20/10.14 811 7.96/7.96 7.95/7.98 7.98/7.98 10.35/10.29 10.37/10.39 10.21/10.19 2.1k 7.97/7.97 7.97/7.95 7.98/7.96 10.41/10.38 10.44/10.45 10.20/10.19 4.1k 7.97/7.98 7.97/7.96 7.98/7.97 10.41/10.39 10.47/10.44 10.11/10.09 8.1k 7.97/7.97 7.96/7.97 7.97/7.97 10.21/10.19 10.41/10.45 10.08/10.05 16.1k 7.96/7.97 7.96/7.97 7.97/7.96 10.14/10.18 10.14/10.07 10.08/9.98 20.1k 7.95/7.96 7.94/7.89 7.97/7.98 9.75/9.76 9.75/9.7 9.74/9.68 21.1k 7.94/7.82 7.94/7.96 7.96/7.94 9.72/9.75 9.72/9.66 9.71/9.67 Fig. 5a. ENOB dependence on the test signal frequency for the 8 (*) and 16 (x) bit mono modes of sound codec on PC CHIPS m807r. Fig. 5b. Typical spectrum for the 16 bit mode of sound codec on PCCHIPS m807r (test frequency 20.1kHz. The achieved results show a big difference between vendor’s declared parameters and the real ones. Especially in the 16 bit mode, the maximal reached ENOB value was always below 10 bits at m805lr and slightly more than 10 bits at m807r. Moreover, the sharp decrease of ENOB dependence with the input test signal frequency on frequencies over about 5kHz was assigned at m805lr. Also an offset of the ADC input range midpoint – 112, resp. 28846 instead of 128, resp. 32768 – was detected. It deteriorates the input voltage range. Better values of the last mentioned parameters were achieved for m807r. It is rather strange because both motherboards use the same sound chips. Spectrum comparison in Fig. 4b and 5b adverts much lower distortion by non-harmonics for m807r. Changing the sampling frequency did not result in any changes overcoming 0.1 bit at both l80x boards. The further tested sound blaster was built on chip CM8330 [14] integrated on an older AT mainboard m559 by PC CHIPS The first test results indicated a very low quality of the sound blaster recorder part and led to the cancellation of any next test. The reasons can be seen in Fig. 6 - the floor limitation of test signal at level 16000, resp. 62 in the tested recorder degrades all quality parameters of CM 8330 sound blaster chip and prevent correct determination of others recorders parameters. Fig. 6. Recorded sine wave for the 16 bit mode from m55. The limitation on level 16062 totally degrades the CM8330 parameters. Sound cards implemented in notebooks were also tested. The most interesting results were achieved at notebook Acer TravelMate 212TX [16] with audio 16-bit AC’97 stereo codec. Tab. III and Fig. 7 illustrate some of them. Tab. III. Results from ENOB testing of sound codec implemented in notebook Acer TravelMate 212TX 16 bits mode Test freq. 8 bits mode [Hz] mono L R mono L R 21 7.92/7.83 7.21/7.12 7.21/7.12 7.89/7.85 7.89/7.85 7.89/7.85 41 7.63/7.64 7.23/7.15 7.22/7.15 7.79/7.77 7.79/7.77 7.79/7.77 81 7.56/7.52 7.26/7.22 7.26/7.22 7.75/7.73 7.74/7.68 7.74/7.68 211 7.54/7.52 7.27/7.22 7.26/7.24 7.76/7.74 7.73/7.67 7.74/7.69 411 7.54/7.52 7.26/7.22 7.26/7.22 7.75/7.73 7.74/7.7 7.75/7.68 811 7.52/7.5 7.29/7.27 7.29/7.27 7.75/7.74 7.75/7.74 7.75/7.74 2.1k 7.52/7.52 7.29/7.27 7.29/7.27 7.75/7.74 7.75/7.74 7.76/7.74 4.1k 7.53/7.5 7.42/7.38 7.42/7.38 7.77/7.76 7.76/7.73 7.75/7.73 8.1k 7.52/7.49 7.38/7.3 7.4/7.35 7.76/7.74 7.75/7.73 7.76/7.74 10.1k 7.51/7.51 7.34/6.97 7.35/6.97 7.76/7.75 7.75/7.73 7.75/7.73 11.1k 7.52/7.51 - Fig. 7a. ENOB dependence on test signal frequency for the 8 (*) and 16 (x) bit mono modes of soundblaster implemented in notebook Acer TravelMate 212TX. Fig. 7b. Typical spectrum for the 16 bit mode of soundblaster implemented in notebook Acer TravelMate 212TX (test frequency 4.11kHz, sampling frequency 44100Hz). Fig. 7c. Detail of typical spectrum for the 16 bit mode of soundblaster implemented in notebook Acer TravelMate 212TX (test frequency 11.11kHz, sampling frequency 44100Hz). The achieved results indicate, likewise hereinbefore, a bad quality of audio input in the tested notebook especially in the 16-bit mode. Moreover, the strange spectrum shown in Fig. 7b and 7c, implies an idea that the real sampling frequency in the sound codec is different from the set one or the digital filter in the sigma-delta ADC does not work correctly. The last example is the “stand-alone” plug-in board SoundBlaster PCI64 by Creative Technology, Ltd. [15]. Some achieved results are shown in Tab. IV, Fig. 8 and Fig. 9. In comparison with previous sound blasters, this card proved lightly better metrological parameters. Tab. III. ENOB dependence on the test signal frequency of Sound Blaster PCI64. Test freq. 8 bits mode 16 bits mode [Hz] mono L R mono L R 21 7.96/7.86 7.92/7.83 7.96/7.87 9.43/9.41 9.42/9.39 9.72/9.69 41 7.97/7.95 7.97/7.95 7.97/7.94 11.82/11.83 11.81/11.82 11.87/11.87 81 8.02/8.02 8.02/8.02 7.98/7.98 12.0/12.1 12.1/12.1 12.0/11.99 211 8.02/8.02 8.02/8.02 8.01/8.02 11.86/11.88 11.97/11.99 11.96/11.97 411 8.02/8.03 8.02/8.02 8.01/8.01 12.1/12.16 12.13/12.15 12.16/12.17 811 8.0/8.0 8.0/8.0 7.96/7.97 12.2/12.23 12.21/12.25 12.24/12.27 2.1k 8.02/8.03 8.01/8.03 8.01/8.02 12.19/12.17 12.18/12.15 12.21/12.17 4.1k 8.01/8.01 8.01/8.02 8.01/8.02 12.18/12.17 12.14/12.15 12.16/12.17 8.1k 8.0/8.0 8.0/7.99 7.99/8.0 12.13/12.16 12.12/12.15 12.14/12.17 16.1k 8.0/7.99 8.0/7.99 7.99/7.96 11.92/11.96 11.9/11.96 11.92/11.98 21.1k 7.95/7.54 7.93/7.54 8.0/7.54 9.79/9.13 9.96/9.33 9.97/9.76 Fig. 8a. ENOB dependence on test signal frequency for the 8 (*) and 16 (x) bit mono modes of Sound Blaster PCI 64. Fig. 8b. Typical spectrum in the 16 bit mode of Sound Blaster PCI64 (test frequency 211Hz, sampling frequency 44100Hz). The sound card in the 8-bit mode seems to be very close to the ideal one – the results more than 8 bits are caused by comparison the real quantisation noise with the ideal, which normalised power is simplified in the most standards to be 1/12. However the maximal achieved value of ENOB in the 16 bit mode was only slightly more than 12 bits, what is still far away from the declared 16 bit resolution. More over, if the input signal meets nearly the full scale of tested audio input, a significant nonlinear distortion was observed in the recorded data (see Fig. 9). Testing the same card in different PCs brought only negligible differences in the achieved results – not more than 0.5bit and typically only about 0.1bit. This fact indicates that the main influence on the metrological parameters of sound card has the card design and not the disturbance of other PC components. Fig. 9. Distortion observed at Sound Blaster PCI64 for input signal meeting the full scale of audio input (input frequency 21Hz, sampling frequency 44100Hz). Conclusions The developed software was applied and tested in the assessments of a few sound cards. It seems to be very useful tool – it enables measuring and obtaining many complex parameters of sound cards in a relatively short time. Developed software employment by PC retailers can lead to the improvement of quality and confidence of offered PC components. The software will be also used in educational process at teaching of electronic measurement and data acquisition systems at the Technical University in Košice as a demonstration virtual instrument for explanation and demonstration standard ADC test methods. The achieved results from the executed tests of various sound cards indicate generally a low quality of their audio inputs from the metrological point of view. This fact is especially evident in the 16-bit mode. The stand-alone plug-in sound cards seem to be a bit better (by 12 bits) than the sound cards integrated on motherboars. Disturbing effects caused by other components inside PC seem to have much less influence on metrological parameters of the sound cars than the sound card design. All these fact restrict sound card application only on simple systems where the needed resolution is not higher than 10 – 12 bits. Moreover, there are big differences between the metrological parameters of the various sound cards. Referencies [1] [2] IEEE Std. 1057-1994, “Standard for Digitizing Waveform Recorders IEEE Std. 1241 draft ver. VS022500 [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] DYNAD, draft ver. 3.3., 2001, http://www.fe.up.pt/~hsm/dynad Arpaia, P., Cennamo, F., Daponte, P.: “Metrological characterisation of analog-todigital converters – a state of the art”, Third International Conference on Advanced A/D and D/A Conversion Techniques and Their Applications (Conf. Publ. No. 466), 1999, pp. 134-144. Pokorny, M., Roztocil, J., Haasz, V.: “Suppression of Test Signal Distortion by ADmodules Dynamic Testing, Symposium of IMEKO TC-4, Naples Italy 1998, pp.889892 Pokorny, M.; Haasz, V. “Alternative method of A/D conversion quality verification”, Instrumentation and Measurement Technology Conference, IMTC/99. Proceedings of the 16th IEEE Vol. 3, pp. 1421 –1424 Holcer R.: “The Performance test of AD Converters embedded on some microcontrollers”, XVI IMEKO World Congres IMEKO 2000“ Proceedings, Vienna, Austria, 2000, pp.165-169 Kollár, I., Márkus J.: “Sine wave test of ADC’s means for international comparison”, XVI IMEKO World Congres IMEKO 2000“ Proceedings, Vienna, Austria, 2000 Blair, J.: “Sine-fitting software for IEEE Standards 1057 and 1241” Instrumentation and Measurement Technology Conference, 1999. IMTC/99. Proceedings of the 16th IEEE Vol. 3, 1999, pp. 1504-1506 Analog Devices: AD 1845 Parallel port 16-bit SoundPort Stereo Codec, Product application manual, Analog Devices, Inc., 1997 OPTi: 82C931Plug and Play Audio Controller, Product application manual, OPTi, Inc., 1997 PC CHIPS: 805lr user manual PC CHIPS: 807 user manual PC CHIPS m569 user manual http://www.creativehelp.com/specs/audio/pci/es1370.html http://www.acer.com