Analogue Modeling Tutorial

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Z1202 wrote:Thus, when we say "solve analytically", we actually mean "express the solution as a finite combination of the standard functions and operations".
That's a rather specific definition then that is only heard in the audio world/field, but not in general science fields ;) (as it goes against the standard math definition of the terms).

My point is that using a term wrongly from what the people expect is confusing.

Post

Miles1981 wrote:
Z1202 wrote:Thus, when we say "solve analytically", we actually mean "express the solution as a finite combination of the standard functions and operations".
That's a rather specific definition then that is only heard in the audio world/field, but not in general science fields ;) (as it goes against the standard math definition of the terms).

My point is that using a term wrongly from what the people expect is confusing.
I'm not sure how this is specific to the audio field. This is a pretty general definition. E.g.:
http://mathworld.wolfram.com/Analytic.html

Post

Well, that's my definition, actually...
The original equation can't be solved in closed form (because of the tanh), so the solutions called here analytical are not analytical per Wolfram's definition!

Post

Miles1981 wrote:Well, that's my definition, actually...
The original equation can't be solved in closed form (because of the tanh), so the solutions called here analytical are not analytical per Wolfram's definition!
From Wolfram site: "...in terms of known functions...". If we add f(a) to the list of "known functions" the solution becomes analytic. That's my point.

Post

OK, I see your point, it's on the definition of closed form... Actually, the original equation is not closed form, as you can't get the solution from known functions: https://en.wikipedia.org/wiki/Closed-form_expression
The Worlfram definition is precise on this as well, the solution has to be defined with those functions to be called close form.

So I stand by my definition. This is not an analytical solution, as you can't get solution = operations on "simple" analytical functions (tanh included)/it is not closed-form.

Post

Miles1981 wrote:OK, I see your point, it's on the definition of closed form... Actually, the original equation
So I stand by my definition. This is not an analytical solution, as you can't get solution = operations on "simple" analytical functions (tanh included)/it is not closed-form.
No problem with that. However, I'd like to point out, that my definition has practical implications (opening up certain ways for addressing transcendental equations, not all of them, but some). I'm not sure, whether standing on your point helps.

But since it seems, that "sticking to the origins" is more important to people here, than making practical advances, I will not elaborate further on what I tried to point to. Some guys hopefully have understood what I was pointing at already with my first post in the thread.

Post

As long as we agree that analytical means the solution has to be in closed form, which is not the case of equations like tanh(x) + x = 0, which are the subject of analog modeling.

I think the practical implications you are talking about are used often in general problms solved numerically.

Post

Miles1981 wrote:As long as we agree that analytical means the solution has to be in closed form, which is not the case of equations like tanh(x) + x = 0, which are the subject of analog modeling.

I think the practical implications you are talking about are used often in general problms solved numerically.
Sorry, I don't want to argue about terminological orthodox purism. Of course you can stick to your own definitions, no question about that.

Post

It's not about orthodox purism, it's about confusing people or not.

My last comment was not a punt or a criticism, sorry if that was felt this way, I wanted to point out that it is indeed relevant when solving general problems.

Post

Well, my point is, instead of the system based on equations like

0 = x + tanh(x)

we completely replace it with a system based on equations like

0 = x + a * x + b

My viewpoint is, the first system uses equations that can only be solved numerically. The second system uses equations that can be solved analytically.

However, if we see the second system as an actual solution for the first system, the second system would be a numerical solution towards the first system.

Post

mystran wrote:But hey, let's just slap some random tanh() on the inputs and call it an "OTA model", it's not like most of the people reading are going to know any better anyway.

Ps. I do understand that your intention is to present a method for solving systems, not demonstrate a perfect OTA model, but I don't think it helps anyone to spread information that for all practical purposes is simply wrong.
Yep, you're totally right.

In order to fix this thing I'll "lessen" the accuracy of the tutorial by introducing an electronic component that afaiaa doesn't exist, which is a differential amplifier component with tanh() distortion on each input and a voltage controlled current output, i.e. I'll take the term OTA out.

I could just change everything to match the correct the OTA formula, but it would make the concept less flexible, i.e. the difference between tanh(x-y) vs. tanh(x) - tanh(y) could not be shown in with the same implementation.

In a subsequent tutorial (or an addendum) I'll add the code for the correct OTA formula. Which might be more tricky for a one pole filter than I initially thought since we can't compute tanh(Vin) and tanh(Vout) in isolation. It's simple enough for the cascade though, maybe it won't be too tricky.

Lesson learned: Don't write those things on vacations when you can't open the books you left at home. Or take the extra time to look things up on the internet properly.

Post

Is tanh a necessity for the operation of an OTA? What's the most significant quality of it for this application, limit of -1 and 1, continuity, or explicitly defined inverses and identities?

Post

It's derived from the two exponentials in the mirrored pair of transisors (or diodes). There are additional coefficients inside the tanh and outside, but it's fundamentally a tanh-based equation.
I actually never use the tanh directly and prefer working with the exponentials, as you can then add the small asymetry that you find in the transistor/diode pair.

Post

Well, apart from being the correct non-linearity for a "perfect" component, tanh() has many nice properties - one can approximate it very fastly and one can get the derivative nearly free of cost. It's therefore ideal to use for a tutorial and it's also ideal as a starting point for a more complex model.

Once you attach an oscilloscope onto the real component, it's going to look a tad off though, usually even a bit uneven and it changes with control voltage. I'll elaborate on some ideas to deal with this as well.

Post

Urs wrote: I could just change everything to match the correct the OTA formula, but it would make the concept less flexible, i.e. the difference between tanh(x-y) vs. tanh(x) - tanh(y) could not be shown in with the same implementation.
Or you could just modify it to a tutorial about one-pole ladders! After all, in a transistor ladder each of the capacitors sees a currents that look like g*(tanh(Vin)-tanh(Vout)). :)

Post Reply

Return to “DSP and Plugin Development”