Gas station without pumps

2016 December 13

Loudspeaker impedance with Analog Discovery 2

Filed under: Data acquisition — gasstationwithoutpumps @ 23:12
Tags: , , , ,

One of the features of the Analog Discovery 2 that convinced me to buy it (rather than, say, a Rigol digital scope) was the ability to couple the waveform generator to the scope to do network analysis.  The basic idea of network analysis is to measure voltages at the output and the input of a 2-port network taking their ratio at different frequencies to get the response of the network.

Here is a generic 2-port network with a shared ground. If a sine wave is applied to the input, then the output will also be a sine wave (for a linear network) of the same frequency, but a different amplitude and phase.

Here is a generic 2-port network with a shared ground. If a sine wave is applied to the input, then the output will also be a sine wave (for a linear network) of the same frequency, but a different amplitude and phase.

If you model a linear system with complex numbers, then the output of any linear network driven by e^{j \omega t} is A e^{j \phi} e^{j \omega t}, and the ratio of the output to the input is A e^{j \phi}. A network analyzer drives a network with a succession of different sine waves, recording the amplitude ratio A and the phase shift $\phi$ for each frequency.

I haven’t often needed a network analyzer, but I have many times done something very similar: impedance spectroscopy, which looks at the ratio of the voltage to the current at different frequencies. The loudspeaker and electrode labs in the course both do this, but only recording the amplitude ratio, not the phase change, as hand measurements with voltmeters do not provide a way to determine the phase.

Because the network analyzer just takes the ratio of Channel 2 divided by Channel 1 and both are differential input channels, we can use it as an impedance spectrometer.  We just put the device under test (DUT) in series with a known impedance (comparable to the one to be measured), drive the series chain with the waveform generator, and measure the voltage across the two impedances.  We then have Z_{DUT} = Z_{known} V_{DUT}/V_{known}.

For example, here is the result of running the network analyzer for an 8Ω loudspeaker with a 33Ω known impedance:

At frequencies above about 1MHz, I don't believe that the test setup is really measuring the behavior of the loudspeaker.

At frequencies above about 1MHz, I don’t believe that the test setup is really measuring the behavior of the loudspeaker.

For impedance spectroscopy, the default display with the amplitude in dB is not particularly friendly, so I saved the data, fitted a model to it with gnuplot, and plotted it:

Loudspeaker model to fit.

Loudspeaker model to fit.

Amplitude data and fitted model. Note that the impedance does not rise as fast as a simple inductor for L1 would imply.

Amplitude data and fitted model. Note that the impedance does not rise as fast as a simple inductor for L1 would imply.

Compare the plot above with the hand-measured ones at Better model for loudspeaker or Loudspeaker analysis.  We can see the limitations of the model even more clearly when we look at the phase change:

At low frequencies, the model and the measurements fit well, but at high frequencies, the phase only goes to 50°, not 90° as would be expected of an inductor.

At low frequencies, the model and the measurements fit well, but at high frequencies, the phase only goes to 50°, not 90° as would be expected of an inductor.

I also measured a tiny 8Ω loudspeaker that I had bought to experiment with ultrasonics (see Redoing impedance test for tiny loudspeaker):

The main resonance around 1390Hz is clearly visible, but there appear to be some higher resonances as well.

The main resonance around 1390Hz is clearly visible, but there appear to be some higher resonances as well.  We can do a more focussed sweep to see them clearer:

The secondary resonance peaks are clearly visible when we scan a narrower range.

The secondary resonance peaks are clearly visible when we scan a narrower range.

The model for the tiny loudspeaker fits the phase measurements better than for the larger loudspeaker, but the phase still only gets to 66°, not 90°.

The model for the tiny loudspeaker fits the phase measurements better than for the larger loudspeaker, but the phase still only gets to 66°, not 90°.

I also tried one of the ultrasonic transmitters (see Ultrasonic transmitter impedance again for hand measurements):

With a 33Ω current-sense resistor, the low frequency end of the impedance spectrum is just noise—there is almost no voltage drop across the 33Ω resistor.

With a 33Ω current-sense resistor, the low frequency end of the impedance spectrum is just noise—there is almost no voltage drop across the 33Ω resistor.

Using 1nF capacitor as a reference impedance, rather than a resistor, results in much more comparable voltages across the whole frequency range, and a cleaner impedance spectrum. But at low frequencies, we're really seeing the impedance of oscilloscope inputs, rather than the ultrasonic transmitter.

Using 1nF capacitor as a reference impedance, rather than a resistor, results in much more comparable voltages across the whole frequency range, and a cleaner impedance spectrum. But at low frequencies, we’re really seeing the impedance of oscilloscope inputs, rather than the ultrasonic transmitter.

For the piezoelectric ultrasonic transducer, the phase spectrum is easier to see the resonances in.

For the piezoelectric ultrasonic transducer, the phase spectrum is easier to see the resonances in.

There are some high frequency resonances as well as the main ones.

There are some high frequency resonances as well as the main ones.

I also tried using the network analyzer as a proper network analyzer, where the network consisted of the tiny loudspeaker acoustically coupled to  an electret microphone which had a 10kΩ pullup to 5V:

The 9.5–10kHz peak was distinctly audible (even though I’m rather deaf in that range), so the resonance was in the loudspeaker not the microphone.

I get somewhat different results with the larger 8Ω loudspeaker:

I have a much more uniform response across frequencies, but it looks like I get a fairly strong response even at very high frequencies. I wonder if I'm seeing an electrical rather than acoustic coupling.

I have a much more uniform response across frequencies, but it looks like I get a fairly strong response even at very high frequencies. I wonder if I’m seeing an electrical rather than acoustic coupling.

Finally, the ultrasonic transmitter:

With a 2V amplitude (instead of 500mV) I get a smaller signal from the ultrasonic transmitter. There does not seem to be a peak at 40kHz, where the transducer is normally used.

With a 2V amplitude (instead of 500mV) I get a smaller signal from the ultrasonic transmitter. There does not seem to be a peak at 40kHz, where the transducer is normally used.

There is an antiresonance around 39kHz and a resonance around 54kHz. Perhaps it would be better to use the transmitter at 54kHz than at the normal 40kHz!

There is an antiresonance around 39kHz and a resonance around 54kHz. Perhaps it would be better to use the transmitter at 54kHz than at the normal 40kHz!

Advertisements

3 Comments »

  1. […] Loudspeaker impedance with Analog Discovery 2, I described measuring the impedance of loudspeakers with the network analyzer function of the […]

    Pingback by Headphone impedance with Analog Discovery 2 | Gas station without pumps — 2016 December 28 @ 22:41 | Reply

  2. […] Loudspeaker impedance with Analog Discovery 2, I looked at the impedance of  various loudspeakers including an ultrasonic transducer. Today I […]

    Pingback by Ultrasonic rangefinder with Analog Discovery 2 | Gas station without pumps — 2016 December 30 @ 23:38 | Reply

  3. […] my previous experience indicated that the network analyzer was not very useful past that frequency (Loudspeaker impedance with Analog Discovery 2). I put a 22Ω resistor in series with the loudspeaker and measured the voltage across it on […]

    Pingback by Changing the loudspeaker lab | Gas station without pumps — 2017 June 28 @ 21:38 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: