LONGTERM SPECTRUM ANALYSER

R.E.E. Robinson

Speech, Hearing, and Language Research Centre

Macquarie University

ABSTRACT - A Long Term Spectrum Analyser is described. It is based on a microcomputer and a set of real time multichannel filters and RMS detectors. The device can sample at rates as fast as 20 complete audio spectrums per second for periods in excess of 1 hour and produce machine readable output. The device was designed and built and is in use at Macquarie University.

INTRODUCTION

The Macquarie University Long Term Spectrum (LTS) analyser grew out of a need to determine the average spectrum of the audio band for periods of up to 1 hour. It was built using one of the Speech, Hearing, and Language Research Centre's (SHLRC) microcomputers as the controlling device and data logger. This allows data to be saved to disc, for printing, or for statistical analysis on the University's main computers.

The LTS analyser consists of a set of bandpass filters, a set of Root Mean Square (RMS) detectors, an Analog to Digital converter (A/D), and a computer to manage the data. Any audio input signal from a microphone, or more typically, a tape recorder, can be fed into this device. It divides the audio spectrum (25Hz to 20kHz) up into 30 channels, using 30 filters of 1/3 octave each. The output of the filters are then applied to 30 RMS detectors which measure the RMS level in each channel. The A/D then samples each channel continuously and the computer records the levels. A spectrum is measured every 50mS, 125mS, or 600mS, depending on the rate selected. A graph of the spectrum can be shown during the analysis, showing the continuous average spectrum updated every sample, or the instantaneous spectrum, updated every sample. The computer software performs the averaging function in real time, and then it can save the LTS to disc or print it on a printer. The analysis can be stopped, restarted, or continued at any time, to allow tape changing or editing. The software also allows the addition of a title, a date, and an identification code. The channel values are recorded in dBm (line levels), but a calibration adjustment is provided to allow the levels to be changed to Sound Pressure Level (SPL). When the data is saved or printed, the 1/3 Octave Band Level is tabulated against band centre frequency, together with Spectrum Level and the A Weighted level. The Overall levels are also calculated.

AUDIO INPUT

The input to the LTS can be any sound source which provides a Line Level output (approx 0dBm in 600 ohms, balanced). A reel to reel tape recorder is normally used, so that the recorded sound on the tape provides repeatable and reliable results. The tapes are usually edited beforehand to ensure that only the required information is analysed. The tape recorder can be stopped and restarted for analyses which are longer than the tape duration. The LTS analysis can be paused while the tapes are changed. Field recordings should be made using a Sound Pressure Level (SPL) meter connected to a tape recorder. A calibrating tone can then be recorded on the tape at a known SPL and the results can then be interpreted as SPL.

The audio input level can be adjusted by looking at the instantaneous graph display. The filters will pass levels up to +26dBm and the RMS detectors will cope with levels up to +16dBm. The input level can be adjusted to approximately 0dbm while looking at the instantaneous graph. This will then allow 16dB of headroom, to accommodate the 1% of speech peaks which exceed the RMS value by approximately 12dB (ANSI S3.S-1969).

FILTER

An analog filter is used to divide the audio spectrum up into 30 channels. It is a General Radio GR1925 Multifilter. Each of the 30 filters is a 6 pole Butterworth filter with a 1/3 octave effective bandwidth that conforms to ANSI S1-1966 class III. Each filter has an input maximum level of +26dBm (17 volts peak) and a noise floor of about - 90dBm (less than 15 microvolts). The 1/3 octave band centre frequencies cover from 25Hz to 20kHz in 30 standard bands. The filter accepts audio input at line levels, and is normally connected to a reel to reel tape recorder. The filter has adjustable attenuators and these are normally kept in the flat response position at mid range. The calibration control (CAL) is used to set the peak reading meter at 0bB.

RMS DETECTOR

The output of the 30 filters goes to 30 RMS detectors. Each RMS detector consists of an Analog Devices AD536AJD true RMS converter. A buffer feeds the output of the multifilter to the RMS detector. The RMS detector is set up in the minimal configuration and gives a linear voltage output directly proportional to the RMS of the input signal. An averaging capacitor of 1uF was chosen giving a time constant of 25mS. The capacitors for all the RMS detectors were selected and matched to 1% to provide a uniform settling time and to minimise error. The ripple on the output was unacceptable for frequencies below 630Hz so a single pole filter was added for the bands 125Hz to 500Hz and a 2 pole filter for 25Hz to 100Hz. This increased the settling time from 100mS (for 630Hz to 20kHz), to 300mS (for 25Hz to 500Hz). The 30 RMS detectors were mounted on a printed circuit board, with their buffers, and with a 30 channel multiplexer for the A/D converter. The RMS card is plugged into the computer card frame next to the A/D card and gets it's power from the computer bus. The connections between the cards are by ribbon cables. The input to the RMS card is also by ribbon cable directly from the multifilter.

ANALOG TO DIGITAL CONVERTER

The output from the 30 RMS detectors is multiplexed into a 12bit A/D converter. The A/D is a TECMAR S100 A/D and the computer samples each of the 30 channels sequentially at software selectable rates.

CALCULATING THE LONG TERM SPECTRUM

The channels are scanned by the computer and a value is read from each channel RMS detector. The computer's job ideally, is to sample the 30 channels at the appropriate rate, save them, and at the end of the data gathering session, average them by taking the RMS of all of them (the RMS of all the RMS's). This requires a large amount of storage, beyond the capacity of the computer, so the calculations are partially done in real time. The computer samples the 30 channels, squares the value, and adds them together in real time. The division, to work out the mean, and the square root calculation, is done at the end of the data gathering session. This reduces the storage to a buffer of 30 bins and a count of the number of samples. The value from the A/D is first converted to a unipolar value (0 to 4095) and then changed from an integer to a real number. Each value is then squared and then added to the running total. Thus each sampled spectrum increases the running total. A count of the number of spectrums is kept so that the mean can be calculated when required. There is no danger of overflow in the numbers or calculations, as all calculations are done in real numbers and the real number range is large enough to allow spectrum sampling for 1.6 X10 exp22 years. This calculation method allows the sample rate to be as fast as 20 complete spectrum samples per second (every 50mS).

A graph of the instantaneous spectrum can be shown, in real time, every spectrum sample, during data gathering at the expense of a reduced sample rate. This is because the values have to be converted to dB, and then the graph has to be displayed. The sampling rate is reduced to 8 complete spectrum samples per second (every 125mS). This is a common sampling rate as used by DUNN & WHITE (1940) and ANSI S3.5-1969.

A graph of the continuous Long Term Spectrum can be shown, in real time, every spectrum sample, during data gathering at the expense of a further reduced sampling rate. This is because the running total has to be divided by the count, the square root taken, the results converted to dB, and then the graph displayed on the screen. The sampling rate is reduced to 1.6 times per second (every 600mS).

The sampling rate can be increased under all of the 3 conditions, to a proportionally faster rate, by scanning fewer than 30 channels. This option can be set in the software.

DB CONVERSION

The conversion from a linear voltage range to a dB range is done in software rather than in hardware, due to the simplicity, zero maintenance, and long term stability. However, the calculation takes too long to perform in real time, so they were done beforehand, and placed in a lookup table. The value from the A/D is used as the entry pointer, and the dB value is the output. All calculations are done in the linear range and converted to dB for output.

1/3 OCTAVE LEVEL

The filters used to partition the audio spectrum are 1/3 octave filters. The characteristic of this type of filter is such that the filter bandwidth is proportional to the filter centre frequency. This results in the higher frequency filters having a wider bandwith than the lower frequency filters. This produces a slope on the output levels of 3dB per octave. All data is measured using this 1/3 octave filter set and is displayed unchanged. The data obtained is thus called the "1/3 Octave Level" and is tabulated as a separate column in the output.

SPECTRUM LEVEL

An adjustment is carried out to take into account the different bandwidths of each 1/3 octave filter. This is applied to all filters and makes it appear that each filter has the same bandwidth. This classical approach is derived from wide spectrum data and thus does not apply to pure tones. The adjustment is obtained from a lookup table in the software. The adjusted (or flattened) spectrum is called the "Spectrum Level". This is tabulated as a separate column in the output.

A WEIGHTED LEVEL

Some applications require additional information, so an A weighted curve is included. The A weighted curve is produced by adding an appropriate factor to each channel. This is obtained from a lookup table in the software. The output is called the "A Weighted Level" an is tabulated as a separated column in the output.

SOUND PRESSURE LEVEL & SOUND INTENSITY

The levels measured by the LTS correspond to SPL (equivalent to voltage) and when a calibrating tone is recorded in the correct manner, they can be interpreted as SPL. They can be converted to Sound Intensity (equivalent to power) by multiplying by 0.98 x10 exp-12 W/M exp2.

OVERALL LEVELS

The Overall Levels are calculated as a sum of the powers of all the individual channels. The SPL dB readings are converted to power, then to the linear domain, then summed, then converted back to dB, and finally back to SPL. This is done for the 1/3 Octave Levels, the Spectrum Levels, and the A Weighted Levels.

ACCURACY

The accuracy of the calculations give the LTS RMS voltage level in dB to an accuracy of 1dB. The dynamic range is 72dB and due to the linear amplitude sampling A/D and the logarithmic dB representation, the measuring accuracy varies over the range. At +16dBm the accuracy is 0.004dB. This decreases until at -40dBm it is 1db, and at -56dBm it is 6dBm. The overall accuracy is also affected by the filters, the RMS converters, and the multiplexer, but it has been measured and found to be negligible in comparison. The total accuracy is therefore 1db from +16dBm to -40dBm, and up to 6dB for the -40dBm to -56dBm range. There is no cumulative error since the calculations are done at output time. These results are tabulated at output time. A coarse graph is also provided and this is accurate to 4dB.

COMPUTER

The computer consists of a case containing a keyboard, a display screen, and an S100 bus for the electronics. A switch allows the operator to view on the screen, the text display (for commands), or a graphic display (for the data). The S100 bus has a CPU (Central Processing Unit) card, a graphics card, an A/D card, and a 30 channel RMS detector card. The CPU card has a 4MHz Z80, 64 kilobytes of RAM (Random Access Memory), two 1 megabyte 8" discs, and the operating system is CP/M. The graphics card is a Matrox ALT512 which provides a raster scan graphic display of 512x512 resolution. The S100 A/D card is a Tecmar S100 A/D which has a 16 channel A/D of 12 bit resolution capable of sampling at 40kHz. The S100 RMS card was designed and built at Macquarie University by the SHLRC. It contains 30 buffered RMS detectors and a multiplexer.

SOFTWARE

The software runs under CP/M and is disc resident. It is written in FORTRAN and Assembler and linked to the Sublogic graphic driver package. There are twelve commands and each is a single letter. These commands control the data gathering and data storage. The software is menu driven. The main menu looks like this:-

MACQUARIE UNIVERSITY LONG TERM SPECTRUM ANALYSER (V6.0)

Title:

Mean of: 0. samples

ID Codes:  0  0  0  0  0  0

----------------------------------------------------------

M = MEASURE the data

T = type in a new TITLE.

N = clear buffer for a NEW analysis.

I = set the IDENTIFICATION codes.

D = set the DATE.

G = set the GRAPH (Instantaneous or Average or None).

S = set the group of channels to be SCANNED.

O = set the OFFSET for the DB scale.

P = PRINT the data on the printer.

L = LIST the data on this screen.

W = WRITE data to a disk file.

C = CLOSE the disc file.

Q = QUIT (close any files and exit program).

----------------------------------------------------------

Use control H as backspace to fix typing errors.

To Display data, switch to graphics screen.

Please type the letter then press return.......... ?

OUTPUT

Attached is a typical output.

ACKNOWLEDGMENTS

Thanks to all the people who helped either directly or indirectly, during the design, construction, debugging, and testing of the Long Term Spectrum Analyser: John Clark, Harvey Dillon, Mark Stevens, Peter Koob, John Telec, Juanita Russel, and Harry Purvis.

REFERENCES

ANSI S3.5-1969 (1969)"Methods for the Calculation of the Articulation Index" (American National Standards Institute Inc).

DUNN,H.K. & WHITE,S.D. (1940)"Statistical Measurement on Conversational Speech", Journal of the Acoustical Society of America. Vol. 11, p278.

PETERSON, ARNOLD P.G. & GROSS JR, ERVINE (1963) "Handbook of Noise Measurement" 7th Edition, (General Radio).