Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

Features:

Oscilloscope

Spectrum Analyzer

8-Channel
Signal Generator

(Absolutely FREE!)

Spectrogram

Pitch Tracker

Pitch-to-MIDI

DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Period
    Event
    Spectral Event

    Temperature
    Pressure
    MHz Frequencies

Data Logger

Waveform Averager

Histogram

Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls

Auto-Calibration

Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording

Accessibility

Applications:

Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery

Automotive

Product test

Contact us about
your application!

Sound Card Impulse Response

Another way to measure the frequency response of a linear system is to drive it with an impulse. The spectrum of the impulse response gives the frequency response of the system. The pulse must be narrow, only one sample wide, which means that not a lot of energy is delivered to the system so the response will be rather small. This typically requires synchronous waveform averaging to get an acceptable response signal.

In addition, the response waveform must decay essentially to zero within the 1024 samples used to obtain the spectrum. Mechanical systems tend to have response times proportional to size, so this may not work for large, low-frequency "woofer" loudspeakers, for example.

While viewing the unexpanded waveform of the output channel, set the tone frequency low enough that you get no more than one cycle per screen (1024 samples). At a sample rate of 48000 Hz, that will be 48000 / 1024 = 46.875 Hz or less.

Use the Pulse Wave option of the Generator. Set the Width Units to Samples, then set Pulse A Width to 1 sample, and Pulse B Width to 0. Make sure Pulse A Level is 100%.

Alternatively, you can just load the Impulse45.GEN setup that already incorporates these settings.

Make sure Trigger is active and set to Normal mode, with Source set to Left Out, Slope set to Positive, Level set to 50% (not critical), and Delay set to -20 samples. You should see a single spike near the start of the trace.

Now toggle to Spectrum mode. With Y-log active and the Spectrum Window button off, the output trace should be a flat line at about -54 dB relative to full-scale, except for the 0 Hz bin at -60. This is because the energy of a single-sample pulse is spread evenly over 512 spectral lines, so each line is only 1/512 of the pulse voltage. The 0 Hz bin shows only half the energy of the rest, since the FFT puts the other half at the Nyquist frequency which isn't shown.

Recall that dB = 20 times the base-10 log of the voltage ratio. 20 * log10(1/512) = -54.1854 dB. (See dB From Voltages.) Note that the Y axis is calibrated for the Inputs, if visible, not the output. You can toggle Input off momentarily to have both the axis and cursor readouts reflect the output, or you can toggle the Input Display buttons off to see the output axis, and/or toggle the colored cursor select buttons to change the readouts. Note that the output range is affected by the volume controls.

Important: Never use a Window function when viewing the spectrum of an impulse response or any other transient event that is completely captured in the 1024 input samples used to create the spectrum. Window functions reduce the initial portion of the response, which will seriously compromise the spectrum of the transient. Use Window functions only for continuous waveforms.

The reason for the negative Trigger Delay is to insure that the entire Input waveform response is captured, including any pre-response that is a result of the digital anti-alias filter on the Input line. This assumes that the speaker or other device under test has a response that is essentially over before the end of the trace.

Now if you use this pulse signal to drive a speaker, you must preserve the pulse shape. This is a difficult signal for amplifiers to handle properly. The biggest danger is from "slew limiting", a form of distortion where the amplifier simply can't change its output fast enough so it (typically) produces a fixed slope at its slew limit, measured in volts/microsecond. To see if this is going to be problem for your impulse tests, use a purely resistive voltage divider to reduce the amplifier output down to a range that the sound card inputs can handle (a volt or so), and observe it directly. This way, the amplifier is still delivering its full voltage (as compared to just turning down the level) and you can see if it is behaving properly.

It's also important that the Input signal not be overdriven. You can detect clipping by reducing the Input Level, and making sure the observed pulse response waveform is reduced accordingly, but its shape is unchanged.

Another, and often better, way to detect Input clipping is to switch the Generator Wave type to Sine or Triangle and the Tone Frequency to around 100 Hz. Clipping will usually be quite obvious on the waveform display. Adjust Input and Generator levels as needed, and then keep those settings when you go back to the impulse signal.

The input spectrum of the drive signal should ideally be a flat line just like the output spectrum, but in reality there may be some gentle ripples, and the upper end will be rolled off due to the anti-alias filter. You'll have to decide how much error you can tolerate. If you are measuring frequency response as a production screening method, such as with Spectrum Limits, you may be able to tolerate moderate errors as long as you can still detect faulty units.

Since the speaker is being driven with a narrow, and hence low-energy, pulse, the response from the microphone may be at such a low level that it has excessive noise relative to the desired response. To clean that up, you can use synchronous waveform averaging. Once you start the Average in waveform mode, you can toggle to Spectrum mode and view the frequency response as the noise melts away. You must use Y-log Spectrum mode with User Units active and the proper Mic .CAL file (or .FRD file) loaded in order to see the true speaker response. This is not strictly necessary for production screening, as long as you know what a "good" unit looks like with that microphone.

You may want to set a very large wave averager Frames Request, and then just Pause manually when there have been enough averages that the frequency response noise is acceptable.

For absolute calibration measurements, and not just relative curve shapes, you will need to boost the measured response by a factor of 512 to account for the narrow drive pulse. You can do that by reducing the External Gain setting on the Input line by that factor. If the original gain value was at the default of 1.00, set 0.00195 instead. Daqarta will interpret the actual signal as having been reduced by 512, and it will compensate by scaling up by 512 to show the true input.


See also Frequency Response Measurement

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved