Speakers are one of those components that are simple to use, but difficult to simulate. Most of us have used a simple resistor to do the job. But a speaker’s response is much more complex, and while that might be enough for a simple simulation the fidelity is nowhere near close. [Sourav Gupta] recently shared his technique for modeling speakers and it looks as though it does a credible job.
[Sourav] shows how a simple resistor and an inductor can do the job, but for better fidelity you need more components to model some mechanical effects. The final model has six components which keeps it easy enough to construct but the problem lies in finding the values of those six components. [Sourav] shows how to use the Thiele-Small parameters to solve that problem. Speaker makers provide these as a guide to low frequency performance, and they capture things such as Q, mass, displacement, and other factors that affect the model.
If you can find those parameters — often known as TSP — then you can use the formulae provided to get the component values. There’s even a real-word example for a specific speaker. We would have been interested to see how the simulation stacked up to a real speaker, but this is still an interesting post.
Of course, if you grab a surplus speaker you may or may not be able to find the TSP data. At that point, you could make some guesses or measurements, but it certainly won’t be as easy.
The techniques in the post were not simulator-specific, so they ought to work with whatever tool you use. Our favorite browser simulator, Falsted, doesn’t have a speaker (but it does have an audio output port). The same tricks should work in LT Spice, too.
If this is for a sim which has “perfect” components then why the two capacitors instead of one?
Looking at the article, one represents speaker component mass, and one represents air mass. Those appear to be calculated separately, so they’re simply putting two caps in instead of adding the two parts and using that value.
For an .AC simulation in LTspice you can actually measure up your speaker with LIMP (part of free ARTA software) and put the phase and magnitude data into a behavioural current source. The model then looks like this (just longer, but I removed most of the values for clarity):
.subckt speakerload 1 2
B1 1 2 V=I(B1) MAG FREQ=
+ 20.142, 7.540, 20.971
+ 20.508, 7.564, 21.387
+ 21.240, 7.666, 22.072
+ 21.973, 7.772, 22.653
+ 22.705, 7.869, 23.831
+ 23.438, 8.016, 22.457
+ 24.170, 8.265, 24.358
+ 24.902, 8.211, 24.728
+ 25.635, 8.416, 22.599
+ 26.367, 8.571, 25.396
+ 27.100, 8.707, 25.959
+ 27.832, 8.895, 26.814
+ 28.564, 9.152, 26.909
+ 29.297, 9.343, 27.048
+ 30.029, 9.612, 26.830
.ends
+1. LIMP is great tool for fault finding speakers. I was using it so often at work that I made a dedicated test unit for it:
http://levysounddesign.blogspot.com/2016/04/speaker-impedance-measurement.html
And of course, as well as not being simulator-specific, it is also not specific to simulation. This would also be useful for making a more realistic load for an audio amp.
Doesn’t Thevenin’s Theorem state that that entire circuit should reduce to just a single resistor plus either a capacitor or inductor?
For the specific case of a single frequency, yes.
For the general case, no.
This type of simulation fails to reproduce intermodulation distortion.
Edit:-
“Phase intermodulation distortion”
Since there is no resistance, or inductance between the two capacitors, then they are effectively in parallel and could have been summed up as a single capacitor. Or is a component missing in the diagram?
See the first comment.
For real life components: No because there are hidden parasitics (R & L) and will have frequency dependent characteristics.
For a simulation that uses idealized component model, the two capacitors can be lumped together – the non-ideal and parasitics are modeled separately. The only reason why they are separate is that they came from different part of the speaker system.
if you are needing just a load so you dont blow the amplifier then probably the resistor is good enough.
if you need to recreate the same inductance you could probably use a motor or even a desk lamp ballast
Seen this at least 15 years ago. Martin J. King first simulated speakers with an equivalent electrical circuit as part of his theory on the function of transmission line speakers. As I understand it, his spreadsheets can be used to model speaker drivers in free air, in a sealed box and in a ported box, of which transmission lines are a special case. I’ve built speakers with his simplified alignment tables and they are amazing for the time and money spent.
Realistic PC speaker emulation in DOS emulators anyone ? How wonderful that would be
I’ve got a problem with this approach.
Basically, you want to get a certain level of sound out vs. frequency, being able to control parameters like box size, power input, money, stuff like that. Sometimes you want a particular response; maybe it’s a guitar amp/speaker, or a PA, or a foghorn, I dunno. Whatever, you want to build an electronic circuit (filter) followed by a power amp/speaker, that gives you the sound level you want at the frequencies you want.
Simulating a speaker doesn’t tell you what comes out of it. Second problem: when you put it in a box, you have a system, not a bare speaker. The system doesn’t behave the way a bare speaker does. It laughs at your resonant frequency measurement, and if the box is wrong it will sound like an oil drum instead of the kettle drum signal you put into it.
You can get simulations of speakers in a box, and if you have the money and time you can simulate any kind of acoustic contraption and environment. You can simulate any kind of electronic network, filter, and amplifier. But you can’t get a simulator that does both.
If I design an antenna I can figure out the radiation resistance of the antenna, which represents the load that free air presents to the antenna. Any power burned up in Rrad is radiated out. I can simulate the radiation pattern using other apps, and design a transmitter using a different app. The design flows from electronics to radiated EM.
So how do I do the same thing from audio electronics to acoustic energy?
You have to figure out the differential equations for the electrical to acoustic energy from the physics.
http://www.inmateh.eu/INMATEH_III_2011/10%20-%20Filip%20N.%20doc.pdf
I have sort of the same questions. How does this simulation lead to better sound at my ear?
I know that the Thiele-Small params of a speaker in free-air are used to help specify what sort of cabinet and porting might be best for a given driver. I believe that up to the mid to late 60’s there was more attention paid to the complex interactions of amplifier to crossover to speaker, with sometimes “magic” results. But since then, with the advent of power amps with very low output impedance, I believe the best results always come from directly driving each speaker driver with its own amplifier (and an active line-level crossover in front of the amps), and the low amp impedance essentially swamps most impedance anomalies of the driver, provides better damping and control, etc.
Can we stop linking to *really* *bad* audio projects? I mean, I love audio hacking and would be happy to see more of the genre show up on HAD, but please can we up the quality a bit?
I suggest the HAD staff start browsing diyaudio.com. Come back with a writeup on a folded horn or something really funky and original that was modeled in akabak then constructed and validated against the model. People are doing seriously farking amazing stuff in audio these days enabled by modern manufacture (CNC routers, cheap PCBs, etc).
Or if we want the basics, a good detailed writeup on Thiele & Small modelling would be a good place to start. I mean, you mention “TSP” in TFA but don’t even say what those letters mean!
Speakers are deceptively tricky critters. Simple in that a child who understands magnets attract and repel and had wound an electromagnet can see pretty clearly how they work. But the devil is in the details. You are dealing with a device where to some extent the properties change with the excursion of the cone From both the perspective of the spring action of the surround, is that totally linear over the full range of speaker excursion, to the voice coil moving in the magnet gap. Is the magnetic flux the same over the entire range of motion of the cone? Than you get into all of the various resonances of the raw driver and the raw driver in an enclosure. It is not as simple as it seems at first.
All of that being said, things have gotten amazingly better in the last decade. I am amazed at the sound you can now get out of a modestly priced and sized set of bluetooth speakers. Not window rattling but certainly room filling and at very good fidelity. And while no one is writing home about the sound quality from smartphones or notebooks, when you consider the size of the speakers and the very limited power budgets, some of them are pretty amazing.
Recurrent Neural Networks apparently do a creditable (or at least passable) job at this sort of thing.
https://ieeexplore.ieee.org/document/6567472