How do you REALLY measure THD?

Where in any THD calculation is this weighing harmonics done? Certainly not in LTspice that the OP is asking about. I ask because from what I can tell, 99.99% of the time this is NOT done.
It is possible to measure A-weighted THD+N. That would weight the harmonics that fall where the human ear is the most sensitive higher than those at away from that sweet spot. I don't recall ever seeing that specified, though.

Tom
 
  • Like
Reactions: CG
It's certainly possible to apply A-weighting to a distortion spectrum in LTspice. There's a couple ways it could be done.

I'm not exactly sure what that would end up telling you, though.

Personally, I also use a multi-tone test with LTspice, usually "pink weighted", to sorta kinda a little bit simulate actual music. Maybe. On a good day. It's interesting and hopefully can catch some glitches in a design, but so far hasn't been entirely helpful.

One of the obvious limitations with simulation is that it's very time consuming and cumbersome to include all the little things that can affect performance. Yeah, you can put in the voltage regulators you use. How about the raw DC supply? The pcb parasitics? And so on.

But, what SPICE really does is that it lets you try all sorts of possibilities quickly without having to solder in parts, blow things up, and so on. You can often discover instabilities that you'd only otherwise catch because of the smoke. You can also see trends that are helpful. And so on. It's not perfect, but it may be more linked with other hobby interests than other computer games like Baldur's Gate III. Maybe it's more like those Formula 1 and other racing simulators that give you practice and insight without real crashes.
 
I'm not exactly sure what that would end up telling you, though.
I'm not sure either. I just happened to notice it in the manual for the APx555 when I was flipping through it the other day.

But, what SPICE really does is that it lets you try all sorts of possibilities quickly without having to solder in parts, blow things up, and so on.
Absolutely! I can run a parametric sweep in SPICE much faster than I can swap components in the lab.

Tom
 
And why would I do that?
I don't think you probably would. Why not ask me why I think you wouldn't?

As far as the Sean Olive screenshot, it was hoped it could be just a brief way to make a point without going into a big long argument, and or complicated explanations. Nobody will read all that anyway as it would be too much to ask of someone just introduced to the subject. A short quote is about as much as one can hope will be given a quick read a lot of the time.

Also on the subject of separate harmonics, that should be fine and I'm sure it would be fine with Sean Olive. Its trying to distill a lot of numbers down to one all encompassing number that just doesn't work for something as complex as distortion perception can be.
 
Last edited:
  • Like
Reactions: benb
As far as the Sean Olive screenshot, it was hoped it could be just a brief way to make a point without going into a big long argument, and or complicated explanations.
It doesn't come across that way. It comes across as trolling. In particular when it happens over and over again.

Its trying to distill a lot of numbers down to one all encompassing number that just doesn't work for something as complex as distortion perception can be.
That may be. But that's also not the topic of this thread. Hence, my notion of hijacking the thread above.

Tom
 
I still tend to feel that the OP didn't really understand the implications of THD lumping too much into one number, probably because of things like exposure to other websites where SINAD ranking is used. So, my feeling is that we should let the OP know that its a questionable number. Its just about THD either. If someone doesn't know about safety, if they don't know how troubleshoot, etc., and if they are starting out with wrong or incorrectly understood assumptions, the right thing for a more experienced member is to offer a little well intended advice and or a bit deeper understanding.

Its not unusual for me to go looking for posts that have zero replies even after some time has passed. What I often do when I find one is explain about what kind of posts are more likely to elicit help as versus posts that tend to get ignored. Once I get a conversation going with the OP to help clarify the problem, then often other members step in to help too.

For me at least, sometimes helping people achieve their true end goals means explaining to them how the are on path that is not going to end up solving their real end goal.

So what is the end goal of measuring THD? Presumably it is believed that its a single number metric that is useful for judging the sound quality of an audio device. Unfortunately, its no such thing. I think it is usually to the end goal benefit of the OP to let them know about the controversy as to the metric's worth. That's true even if the OP hasn't stated a deeper end goal than measuring THD. Usually they have some assumption that its going to a valuable one-number-covers-all metric. When they find out it isn't, then they may want to reassess.
 
My "eyeball THD calculator" says that if the magnitude of the tallest harmonic is 10 dB above everybody else, then the THD is determined by the tallest harmonic. If two harmonics are equal in magnitude, the THD is 3 dB worse than either one. It's really only when multiple harmonics are close in magnitude or when I need many digits of precision that I need to get the calculator out.

Tom
 
  • Like
Reactions: njswede
How do you really measure THD?
....
So when you're stating various THD numbers, how are you measuring them? Up to a certain number of fundamentals? Up to a certain frequency? Or whatever the highest frequency your equipment can pick up? I personally measure up to 50kHz, since the THD number in LTSpice tends to be all over the place and sometimes is lower than the PHD.
I can't believe this thread is over 100 posts, especially when you answered your own question in the first post - ie. you state the limit conditions used in the calculations, and add in any pertinent notes - that should then allow anyone else to comprehend how you did the calculation and allow them to emulate it. The same situation arises in pretty much any other measurement situation.
 
Alright folks, I made some mods:
1) Added drivers. Increased the slew rate from 12V/us to 14V/us. THD still at 0.003%
2) Turned the front end upside down, i.e. swapped NPN and PNP. That increased the slew rate from 14V/us to 19V/us. THD still at 0.003%
3) Doubled the current through the VAS to 14mA. THD decreased to 0.0001% !!!

Thank you for all the feedback! The best part is that it's still made from bog standard components. Hopefully I have time to redraw the PCB this weekend so we get to find out what it sounds like! The only downside is that it's even more mundane and ordinary in its design, now that I took out the quirks. 🙂

1737767586678.png
1737767735935.png
1737768055001.png
 
  • Like
Reactions: mbrennwa
Follow it here instead. Not by my computer right now. Will upload later.

 
  • Like
Reactions: STOXX