Login / Register  0 items | $0.00 New

Analogue Modeling Tutorial

User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Fri Feb 26, 2016 4:35 pm Re: Analogue Modeling Tutorial

mystran wrote:
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)). :)

I was thinking about that... but then it would require more complex drawings which might look more confusing. E.g. if I'm not mistaken, for a highpass input we would be required to put two matched capacitors in series and place the input between the two.

How about this. I'll just keep things as they are, but replace "OTA" with "VCA". Texas Instruments for example have a VCA-on-a-chip with a positve and an inverting input, so it doesn't seem too far off (but I guess it's a voltage source...). Hmm, or maybe I call it "VCCS", for Voltage Controlled Current Source. That's a less familiar name, but it's actually what it is. Yep, VCCS doesn't seem to just apply to OTAs, it may apply to a lot of circuits.

In a subsequent tutorial I could relate things to OTAs and transistor ladders. Exciting!
mystran
KVRAF
 
4596 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Fri Feb 26, 2016 4:51 pm Re: Analogue Modeling Tutorial

Urs wrote: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.


Actually you can even have cases where using generic "NPN" in Spice gives you a perfect tanh() and selecting an actual model (eg. 2n3904 or something) gives you .. well something else. :)
Image <- plugins | forum
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Fri Feb 26, 2016 5:01 pm Re: Analogue Modeling Tutorial

mystran wrote:
Urs wrote: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.


Actually you can even have cases where using generic "NPN" in Spice gives you a perfect tanh() and selecting an actual model (eg. 2n3904 or something) gives you .. well something else. :)

Cool. I need to look into that. When we did Diva, Clemens did all the math, and after Clemens left I only dealt with conceptual filter designs (yep, arbitrarily slapping tanhs everywhere :clown: ). I guess part of writing the tutorial is to prepare myself to model some actual parts :oops:
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Fri Feb 26, 2016 5:52 pm Re: Analogue Modeling Tutorial

Ok, the first article is updated by introducing a Voltage Controlled Current Source, which poses both as a simplification for a one pole ladder (cascading via positive port) as well as OTA cascade (cascading via negative port).

https://urs.silvrback.com/one-pole-unlimited

What do you think?
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Fri Feb 26, 2016 11:43 pm Re: Analogue Modeling Tutorial

Second article is updated as well, including updated schematics and an addendum about analytical vs. numerical methods with an invitation to discuss things further.

https://urs.silvrback.com/one-pole-monster
Ivan_C
KVRian
 
1020 posts since 11 Aug, 2004, from Marcoussis, France

Postby Ivan_C; Sat Feb 27, 2016 12:10 am Re: Analogue Modeling Tutorial

Thanks Urs for sharing this !

On the Look it up section, I think you meant "Vout = (-g * tanh(Vout)) + (g * tanh(Vin) + s)" instead of "Vout = (-g * Vout) + (g * tanh(Vin) + s)"

Otherwise, have you ever used bicubic interpolation for 2d lookup tables ?
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Sat Feb 27, 2016 12:57 am Re: Analogue Modeling Tutorial

Ivan_C wrote:Thanks Urs for sharing this !

On the Look it up section, I think you meant "Vout = (-g * tanh(Vout)) + (g * tanh(Vin) + s)" instead of "Vout = (-g * Vout) + (g * tanh(Vin) + s)"

Otherwise, have you ever used bicubic interpolation for 2d lookup tables ?

At first glance, your equation would be easily rearranged and solved ;-)

bicubic lookup might be a good solution, but it might as well be much slower than Newton's Method for a one pole filter. I haven't benchmarked that yet. I'd probably do bicubic in the state/input direction and linear interpolation in the g dimension.
Ivan_C
KVRian
 
1020 posts since 11 Aug, 2004, from Marcoussis, France

Postby Ivan_C; Sat Feb 27, 2016 1:28 am Re: Analogue Modeling Tutorial

At first glance, your equation would be easily rearranged and solved

Yes, that's why I said the correct one should have a tanh(Vout) term :D
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Sat Feb 27, 2016 2:38 am Re: Analogue Modeling Tutorial

Ivan_C wrote:
At first glance, your equation would be easily rearranged and solved

Yes, that's why I said the correct one should have a tanh(Vout) term :D

:dog:

Thanks, fixed :oops:
lalo
KVRian
 
1392 posts since 14 Oct, 2002

Postby lalo; Sat Feb 27, 2016 3:31 am Re: Analogue Modeling Tutorial

Great! thanks!
math level required? :oops:
User avatar
Urs
u-he
 
21412 posts since 7 Aug, 2002, from Berlin

Postby Urs; Sat Feb 27, 2016 3:35 am Re: Analogue Modeling Tutorial

lalo wrote:Great! thanks!
math level required? :oops:

What do you think? - Most of it is standard high school I'd say, but some of it needs some time to sink (back) in, especialy for old farts beyond 45.
lalo
KVRian
 
1392 posts since 14 Oct, 2002

Postby lalo; Sat Feb 27, 2016 4:18 am Re: Analogue Modeling Tutorial

Thanks Urs! I'm 42. In italy we use to have Classical Gymnasium (latin, greek, philosophy and very poor math, as far as i remember 'til complex numbers but no integrals, derivatives, linear algebra etc.) and the Scientific Gymnasium (so more math, no greek and less latin and philosophy).
I took classical, but i'm very keen to learn some new stuff every time. Do you think i should study derivatives, integrals, complex plan etc. to get some good understanding of your posts?

thanks!
User avatar
Anoesis
KVRer
 
6 posts since 20 Dec, 2015

Postby Anoesis; Sat Feb 27, 2016 7:56 am Re: Analogue Modeling Tutorial

Urs - Thank you for these. They are easy to understand and very nicely written (i.e. fun to read).

lalo - have a look at khan academy's differential calculus class - if you understand what you are seeing in the first few videos, continue. If not, have a look at the trig stuff. Its a nice (+ free) resource.
lalo
KVRian
 
1392 posts since 14 Oct, 2002

Postby lalo; Sat Feb 27, 2016 8:09 am Re: Analogue Modeling Tutorial

Anoesis wrote:Urs - Thank you for these. They are easy to understand and very nicely written (i.e. fun to read).

lalo - have a look at khan academy's differential calculus class - if you understand what you are seeing in the first few videos, continue. If not, have a look at the trig stuff. Its a nice (+ free) resource.


Yeah thanks. I was just watching khan academy's YT channel right now. Pretty easy 'til now. At least i'll improve my math :-)
:hug:
mystran
KVRAF
 
4596 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Sat Feb 27, 2016 11:00 am Re: Analogue Modeling Tutorial

Here's what I want to say about math: it's not hard.

It's mostly just scary, because it's usually written in a weird notation and there is a lot of different rules of what you can do, and you can't do anything unless there is a specific rule that says that you can do it (and that's pretty much everything you really need to learn). You might want to learn enough rules to get where you want to, and then figure out which ones you need to use, but none of the rules are hard! There's just a lot of them, so it takes some time to get used to choosing the best ones for any given situation, but for the most part you could just try them all at random until you get what you want.

Understanding why some particular rule (or shortcut that results from some other rules, or whatever) is valid can sometimes be very hard and make your brain melt. But the good news it that you practically never need to actually understand why. You just need to know that "some wise men" have already melted their brains figuring out why it's valid and now you can just accept that it's valid and use it for what it's good for.

What I mean is that when you need to do trigonometry, you can take a table of very many trigonometric formulas, you try to find something that might (or might not) get you to the right direction, and then you just use that (or something else if the first one doesn't work out), and you never need to worry about why those trigonometric formulas work, because some wise man somewhere already melted their brain proving that they do.

After a while you might realize that you can easily derive all those formulas yourself and you'll realize that your brain in fact didn't quite melt in the process. Congratulations, there's probably another set of rules that will make your brain melt if you think about them too hard and if that's not the case you can become a real mathematician and start thinking about the sets of sets of rules or some such non-sense to keep your brain melting process active.

But until then, just get a good book of formulas and every time you're stuck, try something random. I might not be the fastest approach, but if it takes too long just let your favorite math software do it for you, that's essentially how they work (obviously with some heuristic logic in terms of which rules should be tried first, to try to get the answer in finite time, but still).

---

ps. Here's a fun personal experience: I've been using quaternions for representing 3D rotations for however-many-years I can't even remember, because they just work remarkably well for that. But it wasn't until very recently (week or two ago) that I was casually walking in the park (not even thinking about anything 3D) and finally realized that just like you can treat a complex number as a vector on a plane, you can treat a quaternion (sort-of, there's some weird geometry into it, so don't use this description when you are writing your quaternion routines) like a screw that you push through a sphere (essentially such that the sphere rotates as you push it further).

The bottom line is, don't be scared of trying to understand math, just focus on figuring out which rules are useful and which rules are not. Then learn where to look when you need more rules. It's all pretty easy when you don't try to think about it too much.
Image <- plugins | forum
PreviousNext

Moderator: Moderators (Main)

Return to DSP and Plug-in Development