How does a speaker work?

 

In the early 1800’s, Michael Faraday observed that when current flows through a wire, a magnetic field is created that can be observed by placing iron filings nearby and watching them align with the magnetic field (like they do when placed around a fixed magnet).  Furthermore, Faraday determined that when a magnet is moved near a wire, an impetus for charge to move is observed (i.e., a voltage, the driving force for current).  The same affect is observed if the wire moves relative to a fixed magnet.  His work brought about the widespread understanding that electric and magnet forces are inexorably linked.  Faraday’s insightful observations have led to inductors, transformers, electric motors and generators, relays, as well as a variety of transducers such as speakers and microphones.  These transducers convert electrical signals into acoustic signals and vice versa. 

 

A speaker can be made by attaching a paper cone to an electromagnet.  This electromagnet is simply a coil of wire wrapped around an iron core.  The electromagnet is set inside a fixed magnet.  When current flows through the electromagnet coil, it becomes a magnet which wants to move inside the fixed magnet, in order to satisfy its natural tendency to align its North-pole to the fix magnet’s South-pole.  The amount of movement is proportional to the current.  This gives us a way to convert an electrical signal into mechanical movement, which creates an acoustic signal.  By the way, a speaker can be used as a microphone by operating it in reverse.  Talking into a speaker causes the cone to move, which moves the wires of the electromagnet with respect to the fixed magnet.  This induces a voltage.  It is not an efficient microphone, because the cone requires a strong acoustic signal to make it move, but it does work.

 

By observing the voltage-current relationship for a typical speaker, you can see that its impedance is approximately 8 (Although some are 2 or 4).  Careful inspection may reveal that there is a slight phase shift between voltage and current, indicating that a more precise model should involve a complex valued impedance (one that affects phase).  However, in many cases, it will suffice to use the simple resistor model. 

 

 

What is a cross-over circuit?

 

One problem with a speaker is that a large slow moving cone is needed to reproduce low frequencies effectively, while a small fast moving cone is required to reproduce high frequencies.  In order to reproduce a wide range of frequency components effectively, a speaker often uses multiple cones in one housing.   We will consider a speaker with three cones:  a “woofer,” designed to reproduce low frequency acoustic signals accurately; a “midrange” speaker for middle frequencies; and a “tweeter” for the high frequency content.  What we need to do is make sure that the woofer only sees low frequency electrical signals, so that it does not attempt to move more quickly than it is capable of (which would lead to distortion).  Likewise, we want the tweeter to only see high frequency electrical signals so that it does not attempt to reproduce low frequency acoustic signals, which it is incapable of.  The midrange speaker should only see midrange frequency electrical signals.   In order to direct the various frequency components to the appropriate cone, we use a cross-over circuit.  A cross-over circuit is basically a low-pass filter, a band-pass filter, and a high-pass filter working to separate the music signal into three frequency ranges.  An example is shown in Fig. 1.  Note that the woofer, midrange, and tweeter are modeled as 8 resistors.  

 

 

 

Figure 1: Cross-over circuit.

 

 

Homework Assignment

 

1. Calculate the Laplace transfer functions of the three parallel circuits (tweeter, midrange, and woofer).  Let the input be V1 and the output be the 8 Ohm tweeter for the tweeter circuit, the 8 Ohm midrange for the midrange circuit, and the 8 Ohm woofer for the woofer circuit.  Let us refer to these transfer functions as HT(s), HM(s), and HW(s).  Submit your calculations and final transfer functions for all three.

 

2. Use MATLAB to plot the magnitude and phase frequency responses of each (review this link for help).  Use tf() to get the Laplace transfer function into MATLAB sys format.  Then use ltiview() to view the system characteristics (frequency response, impulse response, etc.).  Use the right mouse button and select ‘Bode’ to get the frequency response.   Next, use the right mouse button and select ‘Properties’ to properly title and label the plot.  Also, change the frequency units to Hz and the range from 20Hz to 20 kHz.  Include the modified frequency response plot for each of the three speakers in your submission.

 

3. Next, use lsim to simulate how these systems alter a music signal.  Load a short .wav file of your choice (such as hootie.wav from the ftp site: ftp://ftp.engr.udayton.edu/rhardie/ECE203/ ).  Use lsim to simulate the three outputs (create three output signals).  Use the sound command to listen to the three output signals and qualitatively describe each (see code below).

 

4. Finally concatenate the input and processed signal into one and use specgram to see how the spectral content is altered by the tweeter, midrange and woofer circuits (see code below). 

 

Example Code for Tweeter

 

% Tweeter system model

sys_tweeter=tf([8e-6,0],[8e-6,1])

 

% Analyze system

ltiview(sys_tweeter)

 

% right mouse, select 'Bode'

% right mouse, select 'Properties'

% to change to Hz and set range, title,

% and labels

 

% Simulate system with sound signal

[x,fs]=wavread('hootie.wav');

 

% extract left channel for testing

x1=x(:,1);

 

% generate corresponding time array

t = [0:1/fs:(1/fs)*(length(x1)-1)]';

 

% simulate output

y1=lsim(sys_tweeter,x1,t);

 

% play input

soundsc(x1,fs)

% wait until this finishes playing before next line!

 

% play output

soundsc(y1,fs)

 

% Look at spectrogram to see what frequencies are modified

figure

specgram([x1;y1],[],fs)

title('Tweeter Circuit (Before and After)')

xlabel('Time (s)');

ylabel('Frequency (Hz)');

 

 

Non-Interactive Frequency Response Plots (No ltiview)

 

 

% Manual frequency response plots

f=linspace(20,20000,1000); % frequency range in Hz

w=2*pi*f; % frequency range in rads/sec

 

% Evaluate frequency response with canned function

H=freqs([8e-6,0],[8e-6,1],w);

 

% Evaluate frequency response by hand

% Note that H and H2 are essentially identical

H2 = 8 ./ ( (1./(j*w*1e-6)) + 8 );

 

% Plot responses

figure(1)  % Linear frequency axis

 

subplot(211)

plot(f,abs(H)) % Magnitude

xlabel('f (Hz)')

ylabel('|H(f)|')

title('Tweeter Circuit Magnitude Frequency Response');

 

subplot(212)

plot(f,180*angle(H)/pi) % Phase, from rads -> degrees

xlabel('f (Hz)')

ylabel('\angle H(f) (degrees)')

title('Tweeter Circuit Phase Frequency Response');

 

figure(2) % Log frequency axis

 

subplot(211)

semilogx(f,20*log(abs(H))) % Magnitude, from absolute -> dB

xlabel('f (Hz)')

ylabel('|H(f)| (dB)')

title('Tweeter Circuit Magnitude Frequency Response');

 

subplot(212)

semilogx(f,180*angle(H)/pi) % Phase, from rads -> degrees

xlabel('f (Hz)')

ylabel('\angle H(f) (degrees)')

title('Tweeter Circuit Phase Frequency Response');