In defense of the unscientific harebrained idea of an "AC Transfer function"

Started by Vivek, August 12, 2021, 06:34:08 AM

Previous topic - Next topic

Vivek

I'm no mathematician or EE, but I feel as follows :

We all agree that non linear stages are extremely hard to study, quantify and classify with 100% accuracy.

The problem is that the full characteristics vary with
level of the signal
frequency of the signal
settings of pots
the level and duration of the signal before the time of measurement
Temperature of the components
Age of components
and maybe other parameters that I dont know about


The problem is multidimensional.

Indeed, the true graph of a distortion stage could be better described as a surface or maybe even a solid or even a multi-dimensional thing that changes with time and temperature.


Yet, we all understand the need to measure something as a method of starting to understand / standardise/ replicate such a complex stage. Instead of a total refusal to measure, we need to understand the limits, errors, blind spots of our measurement procedure so that the measurement is somewhat meaningful and is applied correctly with its attached caveats and application zone.


Now, the way we DIYers do things could be "seat of the pants" methods that are oversimplifications of the methods that white coated Boffins use. Yet there is no denying that DIYers invented some of the most juicy bits of guitar electronics.

In our humble way to measure / simulate a non linear stage, one of the first attempts was:

Fixed frequency, fixed amplitude, assumption that the distortion does not change with time, temperature, previous signal level:


That's the output of two distortion stages in a BMP, with 1Khz input signal at 200mvP

It's obvious that more data can be conveyed if we plot output for multiple input signal amplitudes or multiple frequencies on the same graph, with the same assumptions that the distortion does not change with time, temperature, previous signal level


Above shows output of a Boss BD-2 with inputs of fixed frequency but multiple input signal levels.

Does it convey the complete truth about the non-linear stage: No !

Is it useful and tells us something pertinent about the circuit ? I would expect a resounding yes to that question.


Sometime ago, I wrote about a crazy idea I had for an "AC Transfer function". I collected data on the Vpeak of output for various input levels of the same frequency but different amplitudes, and plotted that against Vpeak of the sine wave input signal.

Totally unscientific. Totally wrong. Tries to describe a 5D object by looking at its shadow !!!!!

But is it a useful, information conveying metric if you know the method of measurement, its limits, its possible errors ?


One way of looking at it is that the "AC Transfer function" that I use is nothing but another way to plot the peaks of the above transient graph of same frequency, multiple input levels. Hence it cannot be any less or more error prone or significant than the above method which the DIY community do already consider as a valid initial measurement for characterizing or describing a distortion stage.

Here is a typical "AC transfer function" graph that I generate. It shows the peak output Voltage at output of each stage of an Opamp based Uberschall emulator pedal, at a fixed frequency of 1Khz. I know it does not show wave shape or harmonic content.

Far from accurate !!!

Far from complete !!!

But I propose that it is still useful for some purposes.



Since it is only a different way to show the Vpeak of "Multiple input levels, same frequency" Transient Analysis, it has all the same benefits, constraints and drawbacks. However it is easy to understand and conveys information about the stage being studied. It shows Vp of output for 200 different input voltages, for each curve. That is more information dense than plotting 10 different input levels as in the earlier graphic (But does not directly show wave shape)

(It is also easily possible to graph out Vpeak of outputs for multiple input levels of multiple frequencies. Like maybe about 200 readings for different input amplitudes for about 5 different frequencies)


Here is a quote from an article on VOX emulation that was edited by the respected Rod Elliot of Elliot Sound Products:

http://www.radanpro.com/Radan2400/Predpojacala/Vox%20AC30%20Guitar%20Amplifier%20Simulator.htm

QuoteMy intention was to develop an opamp circuit which simulates the VOX AC30 Preamp.  The main problem was that the non-linearities of the VOX are hard to determine.  For example, it is not possible to measure the DC transfer function of the VOX, because it has capacitors in the signal path.  A sine signal is the only signal on which distortions can be identified.

The thing is, that the different input levels of the sine wave will cause different output signals.  Like when you play a single guitar tone into an amplifier.  At the beginning the tone has full volume and the amplifier has a lot of distortion.  Then the tone gets lower and lower, and the distortion gets smaller and smaller.  The distortion  changes with the input level.  So I calculated a sine burst signal with an exponential volume decrease.  You can see a comparison of measurements of the preamps (VOX-AC30 and AC30SIM)

If I use a circuit which has exactly the same amount of stages and the same filters between them, it is only necessary to find the non-linearities of each stage to simulate the behaviour of the VOX.  It's enough to use an exponential sine stimulus of only one single frequency. Which frequency is not important.  I took a 400Hz expontial sine stimulus.  That signal I fed into the VOX and began in parallel to compute with PSpice some circuit simulations to find possible solutions to get near to the behaviour of the VOX.

Some readers might be baffled by Stephan's claim that the frequency is not important, however this is the case provided the chosen test frequency is within the normal bandwidth of the amp - preferably at an approximate centre frequency.  For guitar and most music, 400Hz is actually a better test frequency than 1kHz.  Having found the non-linearities and the frequency response, the two combine to provide the overall characteristics of the original.  RodE

When I had a good solution, I took some measurements of my circuit and compared it to the VOX.  When the measurements of my circuit where not near enough, I modified the circuit and took some more simulations with PSpice.  And so on.

The key points from above quote regarding attempting to study non-linear stages are :
-- DC analysis cannot be done on multiple stages with caps for coupling / filtering
-- The input signal should be a sine wave
-- You already get a lot of useful information by studying the non-linear stage at one fixed frequency
-- There is a need to input multiple levels of a sine wave at the chosen frequency and check the output for each input
-- The graphs of Transfer function at one fixed frequency together with the Frequency response of that stage are quite close to all that is necessary to characterize a non-linear stage for the purpose of trying to build an emulation.

The author above used an input sine wave with exponential rise in amplitude and plotted the resultant outputs. I use a linear increase in amplitude. That is nothing more than plotting the same data on a different axis.


If we dip our finger into a soup, we have no idea of its content or taste. Yet we get a very rough idea about its temperature and that already gives us more information than

--refusal to measure any parameter at all

--totally reject some pertinent and true information with the logic that it is not comprehensive or fully scientific.

--wait for 1 Million USD equipment and 2 years of measurements to totally characterize our soup


I therefore submit that the seemingly harebrained, nonscientific idea of an "AC transfer function" has its place in DIY electronics since it does convey useful information for the purpose of characterizing nonlinear stages sufficiently with the aim to create reasonable simulations of the original non-linear stages.

What say you ?

Digital Larry

Having studied engineering 40 years ago, I know why there is such insistence on linearity - it makes the math relatively simple and allows for incredibly accurate predictions of behavior.  You don't realize how important this is if you haven't done it.  You get really dependent on it.  The same reason I look for my lost keys under the streetlight - I can see better.

There are things like PWM for motor control where the choice of output waveform was done so that output devices was either "on" or "off", reducing their power dissipation significantly.   Nobody cares about distortion, and properly filtered, PWM turns out to be "effectively" pretty linear anyway.

Music (in fact a subset) is the only field I can think of where signal distortion itself is the goal, and not just any distortion, but one with a specific sort of behavior that is often far from some academic notion of "ideal".  The entire time I was learning to design transistor amplifiers, the general goals were:
a) Flat frequency response, either to the point where you can't hear any more or to the limits of the circuitry
b) Distortion as low as possible.

Amazingly, "NEGATIVE FEEDBACK" combined with super high loop gain, gives you those.  But wait, what?  You DON'T LIKE IT?  (looks befuddled)

I opened up my grandpa's "Radiotron Designer's Handbook" and it doesn't talk about designing guitar amps either.  Some notion of super-linear transformers to reduce distortion in tube stages is the pinnacle of the state of the art back then.

I've certainly thought that a set of 3-D type graphs would allow you to visually compare two distortions, and given a third, you could say it's "more like" A or B, that sort of thing.  I think the real challenge here is to try to zoom in on the things that make a distorted waveform one thing or the other.  What makes a Fender waveform different from a Marshall waveform?  Obviously it's not just single level so your consideration of multiple levels is pretty relevant. 

Fun topic!  I'm gonna go look for my keys again.

DL
Digital Larry
Want to quickly design your own effects patches for the Spin FV-1 DSP chip?
https://github.com/HolyCityAudio/SpinCAD-Designer

Eb7+9

Quote from: Vivek on August 12, 2021, 06:34:08 AM
I'm no mathematician or EE, but I feel as follows :

We all agree that non linear stages are extremely hard to study, quantify and classify ...

The problem is that the full characteristics vary with
level of the signal
frequency of the signal

What say you ?

the problem is not shifting characteristics but rather user methodology

much of them whole of basic analogue EE teaching centres around LTI systems (Linear Time Invariant) ... it's just a mathematical opportunity that presents itself ... not only does it produce important offshoots like op-amp simulations and DSP but it offers so much more (eg., Filters, control theory) ... the minute you introduce NL behaviour that theory starts getting complicated fast ... Bias and Gain are nothing more than the two constants that make up a linear Taylor series approximation of a NL curve around a stable operating point ... under strong dynamic conditions a NL circuit no longer presents stable Biasing ... and the Gain constant now turns into a curve

Remember, the connection between steady-state analysis and reality was always meant in the incremental sense .... ie., by limiting input signals to low values

as wonderful as small-signal analysis goes it's just a starting point ...

In a linear system sine wave in gives sine wave out and gain is definable ... in NL not so unfortunately ... if you re-ran your Fetzer valve simulation by showing along side the voltage across the output capacitor you'd see there are unanswered questions that remain there / some which might challenge expectations ... then redo them with no capacitor at all, simply plotting Drain voltage in absolute terms

The key in those experiments is to distinguish between input sensitivity and a NL gain curve ... and how it pertains to Vgs(off)

That number should be visible in your output

Eb7+9

Quote from: Vivek on August 12, 2021, 06:34:08 AM

Sometime ago, I wrote about a crazy idea I had for an "AC Transfer function". I collected data on the Vpeak of output for various input levels of the same frequency but different amplitudes, and plotted that against Vpeak of the sine wave input signal.

Totally unscientific. Totally wrong. Tries to describe a 5D object by looking at its shadow !!!!!

But is it a useful, information conveying metric if you know the method of measurement, its limits, its possible errors ?


Theorems come with their set of subtle and not-so-subtle assumptions ... that's the part that gets ignored in these kinds of circles

Case in point, your idea of doing steady-state transfer is nothing new or not un-obvious ... like, what "else" are you gonna do with sig-gen and a scope ?!

Well, the big one is in doing compressor/limiter response curves ... why, because the signal channel on those types of circuits tend to be very linear inside their linear range

Even though the side-chain might typically be non-linear the adiabatic response curve (shift, wait till response settles, record... etc) is generally considered useful enough to publish

The Dynacomp and Thumbs ALC are both waiting to have their curves simulated and posted using this steady-state transfer approach ... which some might find revealing