Published on April 14, 2019
Copyright © Dan P. Bullard
It happened. I joked about it in other articles, but finally, it happened. I posted a question on a website that caters to electronics issues, Electrical Engineering Stack Exchange and a comment was posted on my question: "Is this a real device or is this a simulation?"
I knew it would happen, I was just shocked that engineers would be so stupid. Name one thing in electronics that's not determined by math. One! No one designs electronics with pencil, paper and slide rule anymore. Everything today is designed with a schematic capture program on a computer; I know, I've used quite a few of them. The models of every device known to man are in somebody's library and every conceivable parameter is defined, input capacitance, output impedance, gain, slew rate, min-this and max-that, everything! That's the point, because you can't run a simulation if you don't have all the parameters, and the simulation simply does math (or logic) to tell you what is going to happen if you build this circuit. So pray tell me, what behavior of electronic circuits is not known to man? Oh, wait, I can think of one: Harmonics. Harmonics are for some reason considered magical, mysterious, unknown to the mind of man. Well, unknown to the mind of all men, save one; ME!
The question I posed was kind of a setup, because I knew the answer, but I wanted to see if anyone on this bulletin board knew, and to teach them a lesson after they had trashed my answer to another question where I listed the Bullard Laws of Harmonics. In this question I simply asked this: The top plot shows the spectrum from a peak clipping and the bottom plot shows the spectrum from a zero crossing distortion with exactly the same amount of distortion. Why do they look so different?
I got several comments. One guy who seemed to be the moderator of the site asked why I was asking, since I had "written the book" on the topic. He was being a smart ass because I had mentioned that I had written a book on the subject, but I told him the truth; I just wanted to see what the trolls on this site would say. A previous answer to a similar question was that crossover distortion has a near flat response (ignoring the behavior of the Odd and Even harmonics) due to the fact that at the crossover, the distortion has a very short period, like an impulse and very unlike the broad distortion of a peak clipping, so it would have an impulse-like spectrum. Sounds reasonable if you are the kind of guy who carries a rabbit's foot on your keychain for good luck. If you read Chapter 3 of my book you will see that that answer is totally wrong, it's not the width of the distortion, nor the flatness of the spectrum to look at. It's the number of humps that matters, and that is controlled by the angle that the sinusoid is at when it hits the distortion.
But most telling was the comment, "Is this a real device or a simulation?" I had struggled with that with other readers of my book. "Why not use real devices to show your theory?" You know, if I had a silicon foundry and a test floor full of ATE, I could do that, but the last time I was in the position I was at Maxim, and you know, they had other things they wanted me to do, like getting product out the door. But I thought about it for a while, what's the difference between math and the real world, and there are three answers: Noise, DC offset and frequency response.
I have done analog and mixed signal testing for a long time, and I have generated waveforms, placed them in AWGs, sourced them to a device and captured the output with an analog capture instrument and analyzed the results. Sometimes I bypassed the device altogether, for the purposes of calibration, or just to test a theory. In the end, I found that noise was my enemy. The incessant noise that would permeate every test fixture with such frightening influence would make me wish I could never let my waveforms see the light of day. It just made a mess of everything. It popped up stray signals that I then had to track down, like the giant AM radio transmitter tower just outside of Raytheon in Dallas, Texas, or the spurious noise from a DC-DC convertor in the tester. And of course AC, from the power supplies, the lights, everything and all the bloody harmonics that come with it.
The first time I tried to do a THD test I got an answer that did not correlate, and it drove me crazy. Until I realized that I had not set the input parameters to the exact same values called out in the notes on the THD test, and yes, they were copious. As I discovered, the DC offset of the stimulation wave for a THD test is a very important attribute because of the fact that the harmonic signature is a direct result of the angle of the stimulation sinusoid at the point it impacts the distortion. That is why those two plots look so different. And this is how I know that Bruce Tibbetts, an Applications Engineer at Teradyne who trashed my video on harmonics doesn't know a thing about harmonics: He told Applicos that I didn't know what I was talking about because you can't change the harmonics by changing the DC offset, which is exactly what I did in the movie I made for Applicos, and that is why Applicos fired me. If you watch the video, you can clearly see that changing the DC offset of the wave going into the ADC changes the harmonic signature, and with careful successive approximation, I can entirely eliminate the Even harmonics, making them (unknown to me at the time) cancel out leaving only the Odd harmonics. It took fine tuning the DC offset to 4 millivolts, and one or two millivolts on either side of that made the spectrum look entirely different, which is why most people never figure this out on a real device. Luckily the accuracy of the Applicos allowed me to do this experiment successfully, but most folks aren't lucky enough to have good equipment like I did. I assume that Bruce thought that I was faking the waveforms, because if you think that the DC offset cannot do that to a waveform, you must believe that I cherry random spectra to falsify my point, which I would never do!
Thirdly, the infuriating fact that the world at large is nothing more than a low pass filter. No matter how carefully you route your signals, how carefully you choose your components, you will invariable roll off the high frequencies. Ever work with RAMBUS or graphic chips or uPs? All kinds of stuff gets in the way, reducing your bandwidth and leading down blind alleys when the answer to your question is staring you in the face. If only we could keep the signal inside the computer with 32 or 64 bit math accuracy and never let it see the light of day.
That, my friends is the answer. I could simulate this distortion with an AWG, source it to an analog capture instrument, capture it, do my FFTs and see the results. But I wouldn't see numbers like 6.02dB for a doubling. I would get nebulous numbers up and down the spectrum that leave the result open to interpretation and doubt. No sir, no thank you, I have been using mixed signal test instruments long enough to know that there are no hidden boogy-men sabotaging my signals in the real world. What I can do in the computer is what I can see in the real world, minus the inaccuracy, noise and bandwidth issues that are waiting there to sabotage my research. I believe in math, and these holier-than-thou engineers apparently do not. Good luck with that, rabbit's foot and all.