1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

LTspice to model circuits?

Discussion in 'Building With Reaktor' started by RobLo, Nov 19, 2017.

  1. RobLo

    RobLo NI Product Owner

    Messages:
    319
    Has anybody used it? Was looking into a bunch of freely available analog circuits from old designs on the web.... I know it's kind of a generic question but was wondering how to translate the circuit into a core macro....or if it's even possible???
     
  2. colB

    colB NI Product Owner

    Messages:
    3,969
    Theoretically it's possible, but very difficult and a lot of work.

    The component models are simplified, and ofter the ones that are less simplified have their extra detail in areas that are useful to people working at very high frequencies, microwave etc.
    A lot of what is important for audio - e.g. saturation behaviour - is not modelled. So you would probably have to build your own component models.
    Then there's the efficiency problem. getting a model of an actual circuit to run in realtime using a sensible amount of cpu means understanding the circuit well enough to be able to radically simplify or just remove sections that are less important and only model the really important bits with any level or accuracy.
    There are some good threads on KVR forum that have discussion of this topic.
    But basically, the approach seems to be to use a simplified subset of the techniques that are applied by software like LTspice, combined with enough knowledge and artistry to sidestep the issues introduced by the simplifications.
    perform nodal analysis to create a set of differential equations, then solve these... or something like that.
    Maybe LTspice can output the equations for you, but I'm not sure it can work with the kinds of radical simplifications you would need to be able to run things in realtime. It definitely can't auto simplify, that's for sure.

    For a rough idea, here's a document that presents and discusses the algorithms used by circuit simulation software. I've just been working through some of it myself.

    here an example of the simplification requirements:
    Steiner parker filter schematic looks like this:
    sp schem.PNG

    In this post on KVR, Urs from u-he presents a fantastic mini tutorial on how to create a simplified dsp model of this filter.
    His simplified version of the schematic looks like this:
    Capture.PNG

    As you can see there is some serious simplification going on here :). I guess you could create a more complicated model and it might sound closer to the real hardware, but significant simplification is still required. And to do it you have to REALLY understand the circuits.

    FWIW, I worked through his tutorial and built the filter in Reaktor. It works great and sounds great. I would recommend doing the same. I definitely understood the basics of the process a little better afterwards, and ended up with a nice filter too :)
     
  3. RobLo

    RobLo NI Product Owner

    Messages:
    319
    Wow, yea way over my head. I can read schematics and I understand the flow in the above diagrams....but I wouldn't be able to simplify anything. I have no idea about what could or should be sidestepped, however, FWIW...I am looking to try and recreate the Polivoks filter.

    The schematic is so simple as it is...can't imagine how much would need to be sidestepped.

    [​IMG]

    One issue though is finding the suitable equivalents/replacements for the Russian transistors....as I'm sure LTSpice doesn't have any of them in the library.

    Also capacitorless design
     
  4. colB

    colB NI Product Owner

    Messages:
    3,969
    Hehe, I had a look at that myself, but I think maybe simplicity is deceptive.
    Sometimes very simple circuits only work because they exploit features and/or side effects of the hardware components, and don't work when modelled unless the component models are extremely detailed. Not sure that's the case here but I think it might be...
    Yes, it seems it's similar to a more standard 2 pole filter but some usual components are missing (like capacitors) because the Russian IC's being used have functionality built-in that can be used for similar purposes...
    So instead of modelling some standards resistors and capacitors alongside a well known op amp or OTA, you might have to build a relatively detailed model of the internal functionality of a Russian IC, I wonder if the datasheets are available in English ?
    FWIW, there's some discussion about this filter on another KVR thread where also involving Uhe.
     
    • Like Like x 1
  5. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    • Like Like x 1
  6. RobLo

    RobLo NI Product Owner

    Messages:
    319
    Yea, that's actually me in that thread (Bump)....I've grown a bit obsessed with my Polivoks. My grasp on maths is nowhere near good enough to tackle something like DSP and analog modeling....was just trying to take a stab in the dark to see if I can maybe come across some kind of happy accident in my attempts lol

    Maybe one day someone will tackle it.
     
  7. Vadim @ NI

    Vadim @ NI NI Team NI Team

    Messages:
    280
    Here's the interview with the guy who originally did the synth:
    http://prosound.ixbt.com/exp/polyvox.shtml
    It's in Russian, but google translate seems to work. There is a particular passage dedicated to the filter, although he doesn't go into the theoretical analysis, as that was not his goal ;)
     
    • Like Like x 2
  8. RobLo

    RobLo NI Product Owner

    Messages:
    319
    "It should also be said that the filter sounded somewhat harsh, especially in the low frequency region, this was due to the appearance of a step in the output stage of the microcircuit with small control currents. In those days, this could be considered a disadvantage, but now this property is slightly distorted sound is appreciated. The unusually aggressive and bold sound of "Polivoks", noted by modern musicians, largely owes its qualities to this filter work."

    Really interesting. I've found interviews with Kuzmin but none where he goes into this much detail about the design!!

    So it really is a 2-pole SVF with a few quirks....Fascinating. Nothing sounds like a Polivoks!
     
  9. colB

    colB NI Product Owner

    Messages:
    3,969
    Interesting:
    capless filter.PNG
     
    • Like Like x 1
  10. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    "Somewhat harsh". What an understatement! :D
     
    • Funny Funny x 1
  11. RobLo

    RobLo NI Product Owner

    Messages:
    319
    Might be time to get the breadboard out

    I have a handful of LM346 around...I believe a few 3342 as well
     
  12. colB

    colB NI Product Owner

    Messages:
    3,969
    There are other interesting examples in that datasheet as well.
    It does seem, at least to me with my very limited EE knowledge that the additional pin on this and the polivoks chip externalises part of the inner circuit of the op-amp allowing it to be configured or abused, meaning that the op-amp can't be handled as an 'ideal' black box component in a dsp model. So a polivoks filter model would need at least some of what's inside an op-amp. probably at least a few transistors?

    The datasheet talks about controlling bandwidth product and slew rate amongst other things. Don't know enough about the workings of op-amps to know which bits of the internal schematic might be important.
     
  13. RobLo

    RobLo NI Product Owner

    Messages:
    319
    I believe it was touched on already in the KVR thread by Urs...but the opamp that does the heavy lifting in the Polivoks filter circuit is K140UD12 (Cyrillic translation is probably wrong)...which is an equivalent of the UA776..and of course, that datasheet is readily available...and yes, looks like it's comprised of a handful of transistors .

    http://html.alldatasheet.com/html-pdf/25557/STMICROELECTRONICS/UA776/6491/4/UA776.html
     
  14. Vadim @ NI

    Vadim @ NI NI Team NI Team

    Messages:
    280
    It seems there are some differences:
    http://www.vecon.ru/prompub/293/17/
    (scroll to the end to see К140УД12 internal circuit diagram)
     
    • Like Like x 1
  15. RobLo

    RobLo NI Product Owner

    Messages:
    319
    Thank you for this. Nice find!