Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

12AX7 SPICE Model Comparison

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 12AX7 SPICE Model Comparison

    Since there have been some discussions on the usefulness of SPICE models and circuit simulation on several recent threads, I thought it might be of interest to some of us - the non-believers can skip this - to see a comparison of the different SPICE models in action... The accuracy of any simulation depends on the models used, so model verification is an important step in the design process, alas tube models are notoriously in-accurate particularly in their grid modeling. While it is not so bad for hi-fi designs, where the designers try to avoid non-linearity of the tube at all cost, in guitar amp designs, quite the opposite happens, where the grid is often pushed way beyond its normal operating range, that's when the trouble starts... So we are talking about the extreme cases here, actually most tube models work fine in their linear region.

    Anyway, in the following comparison charts, I used Loudthud's great scope trace as the reference. And three 12AX7 models were used to generate the plate voltage/current vs. grid voltage curves, the only change was to flip Loudthud's scope shot around, so the coordinates match up.

    First, the the plate voltage traces (with plate resistor of 100k) of the models showing the differences in saturation voltages:
    Click image for larger version

Name:	12AX7 Ia_Gk.gif
Views:	1
Size:	33.4 KB
ID:	867285

    Next, the plate voltage vs. grid voltage traces of the models:
    Click image for larger version

Name:	12AX7 Va_Gk.gif
Views:	1
Size:	30.6 KB
ID:	867286

    And, a comparison of Ayumi's model vs. Loudthud's:
    Click image for larger version

Name:	12AX7 Real vs Ayumi.gif
Views:	1
Size:	13.9 KB
ID:	867287

    So it can be seen that not only do the models differ greatly from each other, none of them matches the real thing! Although Ayumi's model does come pretty close. For a more in depth look at the various models, please refer to the following:

    Spice Models For Vacuum Tubes
    Norm Koren SPICE Models
    Duncan Munro Triode Model
    Ayumi's Lab (use Google Translate for non-Japanese speakers)

    Jaz

  • #2
    Jaz,
    If you look at the fine print in many of the spice model descriptions they actually state that grid current is either not modeled or is an approximation.

    As you suggest, in guitar amp use where we overdrive the tube routinely, then that is not ideal when trying to see what really happens. Of-course, the best model of a 12AX7 is an actual real glass envelope 12AX7.

    One of the reasons that grid current is not modeled well is that grid current is often not understood too well, Of the three grid currect types (POSITIVE grid current, NEGATIVE grid current and Grid Rectification Current) only Grid Rectification Current is sometimes modeled or at least that is my limited understanding.

    I haven't got into much modeling of the tube amp hobby but do a fair bit of it for the day job.
    I use MICROCAP ($US10,000) for serious stuff, XSPICE (3F4? part of Altium Schematic Capture and PCB Layout package) occasionally, and B2Spice (Beige Bag) for quick checks to see if some circuit I'm proposing is going to work or not. I like B2Spice as it comes with many tube models, output transformer models etc. in its library.

    I see modeling as something you do to catch the gross errors (the go / no go stuff) in your design. In the end you just have to build it and do the fine tuning on the bench. That applies to the hobby work guitar amp design as much as (for example) the laser drive electronics for the day job.

    I could wish that the industry would settle on either the Berkley based XSPICE (Spice 3F4 {or is it 3f5 by now}) or P-Spice. Converting Models between the two is not too hard, its just a pain.

    Cheers,
    Ian

    Comment


    • #3
      Yes, nothing beats the real thing! I think you hit the nail on the head, the grid current model is not well understood - thus very difficult to generate a realistic model (if it were so easy, I would expect it to be done by some smart folks already). The three models that I used do include grid models (there are many out there that do not), but they all behave quite differently... I guess all I am trying to say is don't blame SPICE, blame the darn models Again, when operating in the linear region, I found all these models give acceptable results - well within the tolerance of the tube.

      Jaz
      Last edited by jazbo8; 04-23-2013, 07:14 AM.

      Comment


      • #4
        The cut-off in tube models isn't that bad, but most grid current models, and in turn grid current limiting distortion are pretty inaccurate. I had a little project going a while back that used a giant look up table measured from some 12AX7's running at low voltage (it was really only a proof of concept). It used a ton of 3D linear interpolation and iterative methods, but it turned out quite fast due to how it would converge, and the relatively low bandwidth requirements. I was actually looking at revisiting it for an easy engineering final year project. Everyone was done in a rather explicit fashion, and I had to manually program each nodal equation and how to solve the mess. I'm still in the process of hacking together some netlist parsers and whatnot. The ultimate goal is to eventually get a real time VST plug-in, and maybe stick it in a piece of embedded hardware.

        IIRC you can make LUT models for spice, so that may be an avenue to explore if you have the equipment to measure that sorta stuff.

        Comment


        • #5
          I think I have seen the LUT idea done by some guy over at diyaudio, and Demwolf & Zolzer have done some interesting work on triode physical modeling and 3D surface fitting, it appears that some research is still being done in this area, so I am sure one day there will be an accurate model we can all rely on... In the meantime, we just have to learn to work with what we got. I agree with you that real-time VSTs will be hard to beat in the future, so best enjoy playing with tubes while we still can.

          Jaz

          Comment


          • #6
            Originally posted by jazbo8 View Post
            I have've tinkered with all but the Ayumi tube. Does he have a 12AX7 somewhere?

            Edit, I found it, but my simulations is all messed up when I use it.
            Last edited by überfuzz; 04-23-2013, 07:06 PM.
            In this forum everyone is entitled to my opinion.

            Comment


            • #7
              Originally posted by Gingertube View Post
              I could wish that the industry would settle on either the Berkley based XSPICE (Spice 3F4 {or is it 3f5 by now}) or P-Spice. Converting Models between the two is not too hard, its just a pain.
              Personally I find the popularity / incompatibility of LT-Spice to be a major obstacle. For those of us who haven't used Spice before but would like to learn how, not having a Windows box is a deal breaker.
              "Stand back, I'm holding a calculator." - chinrest

              "I happen to have an original 1955 Stratocaster! The neck and body have been replaced with top quality Warmoth parts, I upgraded the hardware and put in custom, hand wound pickups. It's fabulous. There's nothing like that vintage tone or owning an original." - Chuck H

              Comment


              • #8
                I don't use LTSpice, but try changing the INC version of Ayumi's model by replacing all the ^ with ** and see if it works.

                Comment


                • #9
                  Yep that's it.

                  A word regarding the usability of the models. A spice model of an amplifier isn't close to a real amplifier in some regards. Non linear behaviour like the cut-off in the tubes, or in a larger scale break up, sounds very different. In my ears it still gives a fair idea of how much break up to expect if a spice designed amplifier is built. In other aspects a spice model seems very true. This would be in linear parts of the tube model. The frequency response seems very close to real amplifiers.

                  My summary would be something like, for working designs.
                  Spice is good to derive frequency responses, gives a rough idea of the level of break up.
                  In this forum everyone is entitled to my opinion.

                  Comment


                  • #10
                    Originally posted by jazbo8 View Post
                    I don't use LTSpice, but try changing the INC version of Ayumi's model by replacing all the ^ with ** and see if it works.
                    Spice is handicapped by a poor design. I guess it would just be too burdensome to the designers to have the interpreter automatically take care of that for you. It makes me think that these guys who produce the different spice flavors want there to be an incompatibility barrier. Capturing users that way is shitty design.
                    "Stand back, I'm holding a calculator." - chinrest

                    "I happen to have an original 1955 Stratocaster! The neck and body have been replaced with top quality Warmoth parts, I upgraded the hardware and put in custom, hand wound pickups. It's fabulous. There's nothing like that vintage tone or owning an original." - Chuck H

                    Comment


                    • #11
                      Originally posted by bob p View Post
                      Personally I find the popularity / incompatibility of LT-Spice to be a major obstacle. For those of us who haven't used Spice before but would like to learn how, not having a Windows box is a deal breaker.
                      LTSpice is claimed to run fine on Linux and Mac, using Wine. The programmers at LT actually support use with Wine, which is more than the other major circuit simulators can claim. Here is a Mac example. LTSpice for Mac OSX

                      The basic design of Spice dates from the punched card era. It's old and creaky to say the least. The industry could really do with a new standard. Many people seem to like NI's Multisim, but it's incredibly expensive.

                      Spice will often struggle to converge on what should be a simple circuit. Line operated power supplies can often be tricky. The simulation will sometimes grind to a halt at a zero crossing when all the diodes turn off. You have a bunch of diodes all connected to each other and operating at extremely low currents, where the diode model doesn't work too well. You end up adding 1 gigaohm resistors in weird places to define the node voltages better and keep the simulator happy.

                      I recall a photo of Bob Pease using Spice printouts (back in the days of line printers!) to line the floor of a bird cage. I'm not quite so much of a Luddite, but I often find that I can breadboard the real circuit and take the measurements I want, quicker than I could simulate it successfully.
                      Last edited by Steve Conner; 04-24-2013, 08:44 PM.
                      "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

                      Comment


                      • #12
                        Originally posted by bob p View Post
                        Personally I find the popularity / incompatibility of LT-Spice to be a major obstacle. For those of us who haven't used Spice before but would like to learn how, not having a Windows box is a deal breaker.
                        What distribution do you have? I've got openSUSE and there are several spice softwares. You should be able to one click them in your system tool software.
                        In this forum everyone is entitled to my opinion.

                        Comment


                        • #13
                          Fedora Electronics Lab. Installing isn't the problem.
                          "Stand back, I'm holding a calculator." - chinrest

                          "I happen to have an original 1955 Stratocaster! The neck and body have been replaced with top quality Warmoth parts, I upgraded the hardware and put in custom, hand wound pickups. It's fabulous. There's nothing like that vintage tone or owning an original." - Chuck H

                          Comment


                          • #14
                            Originally posted by bob p View Post
                            Fedora Electronics Lab. Installing isn't the problem.
                            I wasnt talking about installing softwares. Rather, you should be able to find a nice spice client if youre on linux.
                            In this forum everyone is entitled to my opinion.

                            Comment


                            • #15
                              Couldn't agree more, after nearly 30 years and we are still trying to massage the SPICE syntax, really!!?
                              OTOH, SPICE is a good tool to have when it's working, but we can certainly do without all the aggravation getting there...

                              Jaz

                              Comment

                              Working...
                              X