Forums :: Resources :: Features :: Photo Gallery :: Vintage Radio Shows :: Archives :: Books
Support This Site: Contributors :: Advertise


It is currently May Thu 23, 2019 6:12 am


All times are UTC [ DST ]





Post New Topic Post Reply  [ 15 posts ] 
Author Message
 Post subject: Tube Amplifier Modeling Software
PostPosted: May Wed 15, 2019 7:20 pm 
Member
User avatar

Joined: Mar Sun 11, 2007 6:55 am
Posts: 10480
Location: Mission Viejo, southern California
Which tube amplifier modeling software do you recommend? Why? It would be fun to model the 6L6GB/C amplifier I built, and future projects.

_________________
many of my radios http://s269.photobucket.com/user/FSteph ... t=3&page=1


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Wed 15, 2019 11:48 pm 
Member
User avatar

Joined: Jan Thu 01, 1970 1:00 am
Posts: 5222
Location: Montvale NJ, 07645
Ltspice. You can download tube amps for guidance.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Wed 15, 2019 11:59 pm 
Member
User avatar

Joined: Jul Mon 26, 2010 8:30 pm
Posts: 25707
Location: Annapolis, MD
LTSpice: +1

But: circuit simulation SW does not typically allow for non-linear component characteristics. Also, I doubt if it will deal with things like phase linearity.

To me, analysis is for getting you in the ballpark, and for dealing with pesky thinks like component ratings. Performance is determined on the test bench based on "appropriate and relevant" criteria---eg "Do it Sound Gud?"

_________________
-Mark
"Measure voltage, but THINK current." --anon.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 2:59 am 
Member
User avatar

Joined: Nov Sat 26, 2011 4:09 am
Posts: 9473
Location: Texas. USA
pixellany wrote:
LTSpice: +1

But: circuit simulation SW does not typically allow for non-linear component characteristics. ...
Maybe you meant something else but all active devices are "non-linear" and that's what SPICE simulates.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 3:54 am 
Member
User avatar

Joined: Jan Thu 01, 1970 1:00 am
Posts: 4851
Location: Perrysburg, OH, U.S.A.
^ +1
Indeed, there are even models for actual iron core transformers that can indicate saturation and non-liner inductance with current.
John

EDIT: Just for grins I used a SPICE model of a 6L6 and ran a simulation of the plate characteristics.
Attachment:
Nakabayashi 6L6 Model Plate Curves.jpg
Nakabayashi 6L6 Model Plate Curves.jpg [ 63.96 KiB | Viewed 151 times ]

Each curve represents grid voltages from -30v at the bottom to 0v in increments of 5v. The screen voltage was 250v as called out in the data sheet.
John

_________________
“Never attribute to malice that which can be adequately explained by stupidity.”
― R. A. Heinlein


Last edited by OldWireBender on May Thu 16, 2019 4:32 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 4:30 am 
Member
User avatar

Joined: Mar Sun 11, 2007 6:55 am
Posts: 10480
Location: Mission Viejo, southern California
Thank you-all!

_________________
many of my radios http://s269.photobucket.com/user/FSteph ... t=3&page=1


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 1:23 pm 
Member
User avatar

Joined: Jul Mon 26, 2010 8:30 pm
Posts: 25707
Location: Annapolis, MD
Flipperhome wrote:
pixellany wrote:
LTSpice: +1

But: circuit simulation SW does not typically allow for non-linear component characteristics. ...
Maybe you meant something else but all active devices are "non-linear" and that's what SPICE simulates.

Looks like I need to do my homework on Spice, but "all active devices are non-linear"?? We certainly know that real-world devices have less that ideal characteristics, but why would non-linearity be a fundamental truth?

So--in Spice--the crude model of a tube is a current source linked to an AC voltage. (Vac * Gm = Iac) There's a command to make Gm dependent on DC current?

_________________
-Mark
"Measure voltage, but THINK current." --anon.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 1:45 pm 
Member
User avatar

Joined: Jul Mon 26, 2010 8:30 pm
Posts: 25707
Location: Annapolis, MD
From the Berkeley SPICE webpage:
Quote:
SPICE is a general-purpose circuit simulation program for nonlinear dc, nonlinear transient, and linear ac analyses.

emphasis in bold is mine...

Can someone translate??

_________________
-Mark
"Measure voltage, but THINK current." --anon.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 2:15 pm 
Member

Joined: Oct Thu 04, 2018 2:11 pm
Posts: 95
Location: Suburban Chicago
The AC analysis part of any SPICE implementation, any of them that I have worked with anyway, will "linearize" the circuit models by solving for the DC operating points and calculating the effective gains at those points. It can then generate the frequency response of the circuit and those calculations will be accurate for signal levels that do not generate significant distortion. If you want to know what the circuit does under high signal level conditions you need to run a transient analysis instead. However well designed audio amps, for example, will behave as the linear model predicts at quite high signal levels.

More advanced simulators for professional use can use other techniques to produce accurate simulations at high signal levels nearly as quickly as a linear AC analysis can produce inaccurate results. Simulation times with transient analysis can be very long which is why it is not used exclusively. Harmonic balance is one of the techniques that are commonly used to get rapid, accurate numbers for certain kinds of analyses but there are others whose names escape me and may differ from vendor to vendor.

If you are careful to respect its limitations SPICE is an excellent tool in spite of all the nasty things Bob Pease, rest his soul, said about it. And you simply cannot beat the price of LTSpice! If you want vacuum tube models there is an excellent thread about them on DIY Audio:

https://www.diyaudio.com/forums/tubes-valves/243950-vacuum-tube-spice-models.html


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 2:53 pm 
Member
User avatar

Joined: Jul Mon 26, 2010 8:30 pm
Posts: 25707
Location: Annapolis, MD
Veering further off-topic.....

Different Implementations? Is there a basic core that is common to all---but some have features that are not available on others?
AKA, LTSpice is free, but adding certain features involves money?

_________________
-Mark
"Measure voltage, but THINK current." --anon.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 6:55 pm 
Member
User avatar

Joined: Nov Sat 26, 2011 4:09 am
Posts: 9473
Location: Texas. USA
pixellany wrote:
Flipperhome wrote:
pixellany wrote:
LTSpice: +1

But: circuit simulation SW does not typically allow for non-linear component characteristics. ...
Maybe you meant something else but all active devices are "non-linear" and that's what SPICE simulates.

Looks like I need to do my homework on Spice, but "all active devices are non-linear"?? We certainly know that real-world devices have less that ideal characteristics, but why would non-linearity be a fundamental truth?

So--in Spice--the crude model of a tube is a current source linked to an AC voltage. (Vac * Gm = Iac) There's a command to make Gm dependent on DC current?
I don't know about "fundamental truth" but all (known) active devices are non-linear. Find a linear one and you'll probably win a Nobel prize.

The first thing you need to realize about SPICE is it isn't just 'one equation'. It's a collection of circuit analysis tools that automate what, previously, was done by hand.

The apparent point of confusion is the "Linear AC Analysis" tool but the "linear" there means the criteria under which the assumptions are valid and not a statement about the devices. Namely that the device(s) are biased into their 'active region' and the AC signal applied is small enough so that their non-linear characteristics can, to some degree, be approximated by a linear function. (Note, if your devices aren't biased properly then you need to first fix the circuit before the "Linear AC Analysis" has valid meaning.) This 'simplification' was done long before SPICE came about.

But to even get to the 'Linear AC Analysis" you have to first do a DC Analysis, and that includes the full non-linear parameters. In my case, amplifier design, I also do a "Transient Analysis," which again includes the full non-linear parameters and is what gives you the waveform graphs (you can 'probe' the circuit like you had a scope on it). In addition, I do a Fourier transform for distortion, which is based on the transient analysis. So, of the three tools I use (there are at least 6 more) only the "Linear AC Analysis" is based on the assumption of 'linear' operation (because you're trying to see what the amplifier does when it's operating properly and well within it's bounds, often referred to as "small signal analysis" {in the frequency domain}).

Your "crude" model is indeed crude and I don't know of any SPICE tube model that uses it. Doesn't mean there isn't one, I've just never seen it. For example, here's my model of a 6SN7.

Vacuum Tube Triode (Audio freq.) pkg:VT-8 (A:2,1,3)(B:5,4,6)
.SUBCKT X6SN7GTB A G K
* ANODE MODEL
BLIM LI 0 V=(URAMP(V(A)-V(K))^ 1 )* 0.0037
BGG GG 0 V=V(G)-V(K)- 0
BRP1 RP1 0 V=URAMP(-V(GG)* 0.02 )
BRP2 RP2 0 V=V(RP1)-URAMP(V(RP1)-0.999)
BRPF RP 0 V=(1-V(RP2)^ 2 )+URAMP(V(GG))* 0.002
BGR GR 0 V=URAMP(V(GG))-URAMP(-(V(GG)*(1+V(GG)* 0.006167 )))
BEM EM 0 V=URAMP(V(A)-V(K)+V(GR)* 19.2642 )
BEP EP 0 V=(V(EM)^ 1.4 )*V(RP)* 0.0000189
BEL1 EL1 0 V=URAMP(V(EP))
BEL EL 0 V=V(EL1)-URAMP(V(EL1)-V(LI))
BLD LD 0 V=URAMP(V(EP)-V(LI))
BAK A K I=V(EL)
* GRID MODEL
BGF GF 0 V=(URAMP(V(G)-V(K)- 0 )^1.5)* 0.000213
BG G K I=V(GF)+V(LD)
* CAPS
CAK A K 0.0000000000007
CGK G K 0.0000000000024
CGA G A 0.0000000000039
.ENDS X6SN7GTB

Does that look like your Vac * Gm = Iac ?

SPICE is a fantastic set of tools but you do need to know when and why their valid and when their (perhaps) not. Case in point, the 'base' simulation can give unusually low 2'nd harmonic distortion numbers for tube push pull outputs (it can happen in other circumstances too) because all components are 'perfect'. I.e. a 100k resistor is exactly 100k and all of them are the same. And all the 6L6s are the same, as is every other tube of the same type, so the circuit can be 'perfectly' balanced. That's never the case in real life since everything has tolerances. However, you can simulate that too with a Monte Carlo run, which randomly varies components within tolerances you specify. It takes forever to run though, at least on my pitiful machine, because you're doing multiple simulations to get a good distribution of random values.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 7:27 pm 
Member
User avatar

Joined: Jul Mon 26, 2010 8:30 pm
Posts: 25707
Location: Annapolis, MD
Having displayed my ignorance, maybe i can recover just a little bit...:)

How about an Op-Amp? With the right set of assumptions--and some precision resistors--we can build a widget that has E(out) = k * E(in) over a wide range of conditions. In my pea brain, that is a linear device.....So, if the statement is that active devices tend to be non-linear in certain conditions, then there will be peace in the valley.

To further refine this, we'll probably need to quantify the linearity. In my Op-Amp example there is a deterministic relationship to the loop gain. With high-end audio, we typically talk about Total Harmonic Distortion, but that parameter is also related to linearity.

But perhaps the only point is that real-world analog DEVICES tend to be non-linear. That is certainly true, but can it be shown from first principles that it MUST be true?

As for SPICE, I'm not qualified. I use it, but only for really simple things.

_________________
-Mark
"Measure voltage, but THINK current." --anon.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 7:28 pm 
Member
User avatar

Joined: Jan Thu 01, 1970 1:00 am
Posts: 4851
Location: Perrysburg, OH, U.S.A.
^ +1
Here's 6L6 the model I used to produce the plate characteristics:

* Generic pentode model: 6L6
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sat Mar 8 22:40:38 2008
* Plate
* | Screen Grid
* | | Control Grid
* | | | Cathode
* | | | |
.SUBCKT 6L6 A G2 G1 K
BGG GG 0 V=V(G1,K)+0.91804059
BM1 M1 0 V=(0.10751078*(URAMP(V(G2,K))+1e-10))**-1.743575
BM2 M2 0 V=(0.4624527*(URAMP(V(GG)+URAMP(V(G2,K))/4.9999386)))**3.243575
BP P 0 V=0.0016883841*(URAMP(V(GG)+URAMP(V(G2,K))/10.811784))**1.5
BIK IK 0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.0021948901*V(M1)*V(M2)
BIG IG 0 V=0.0022135943*URAMP(V(G1,K))**1.5*(URAMP(V(G1,K))/(URAMP(V(A,K))+URAMP(V(G1,K)))*1.2+0.4)
BIK2 IK2 0 V=V(IK,IG)*(1-0.4*(EXP(-URAMP(V(A,K))/URAMP(V(G2,K))*15)-EXP(-15)))
BIG2T IG2T 0 V=V(IK2)*(0.942171668*(1-URAMP(V(A,K))/(URAMP(V(A,K))+10))**1.5+0.057828332)
BIK3 IK3 0 V=V(IK2)*(URAMP(V(A,K))+2180)/(URAMP(V(G2,K))+2180)
BIK4 IK4 0 V=V(IK3)-URAMP(V(IK3)-(0.00056920996*(URAMP(V(A,K))+URAMP(URAMP(V(G2,K))-URAMP(V(A,K))))**1.5))
BIP IP 0 V=URAMP(V(IK4,IG2T)-URAMP(V(IK4,IG2T)-(0.00056920996*URAMP(V(A,K))**1.5)))
BIAK A K I=V(IP)+1e-10*V(A,K)
BIG2 G2 K I=URAMP(V(IK4,IP))
BIGK G1 K I=V(IG)
* CAPS
CGA G1 A 0.6p
CGK G1 K 5.7p
C12 G1 G2 3.8p
CAK A K 5.9p
.ENDS

There's even a model for the triode connected 6L6:
* Generic triode model: 6L6T
* Copyright 2003--2008 by Ayumi Nakabayashi, All rights reserved.
* Version 3.10, Generated on Sat Mar 8 22:40:38 2008
* Plate
* | Grid
* | | Cathode
* | | |
.SUBCKT 6L6T A G K
BGG GG 0 V=V(G,K)+0.91804059
BM1 M1 0 V=(0.10751078*(URAMP(V(A,K))+1e-10))^-1.743575
BM2 M2 0 V=(0.4624527*(URAMP(V(GG)+URAMP(V(A,K))/4.9999386)+1e-10))^3.243575
BP P 0 V=0.0016883841*(URAMP(V(GG)+URAMP(V(A,K))/10.811784)+1e-10)^1.5
BIK IK 0 V=U(V(GG))*V(P)+(1-U(V(GG)))*0.0021948901*V(M1)*V(M2)
BIG IG 0 V=0.0022135943*URAMP(V(G,K))^1.5*(URAMP(V(G,K))/(URAMP(V(A,K))+URAMP(V(G,K)))*1.2+0.4)
BIAK A K I=URAMP(V(IK,IG)-URAMP(V(IK,IG)-(0.00056920996*URAMP(V(A,K))^1.5)))+1e-10*V(A,K)
BIGK G K I=V(IG)
* CAPS
CGA G A 4.4p
CGK G K 5.7p
CAK A K 5.9p
.ENDS

John

_________________
“Never attribute to malice that which can be adequately explained by stupidity.”
― R. A. Heinlein


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Thu 16, 2019 10:39 pm 
Member

Joined: Oct Thu 04, 2018 2:11 pm
Posts: 95
Location: Suburban Chicago
pixellany wrote:
Veering further off-topic.....

Different Implementations? Is there a basic core that is common to all---but some have features that are not available on others?
AKA, LTSpice is free, but adding certain features involves money?


The SPICE core was written in Fortran (I think) a long time ago at some university. Stanford perhaps? Since then it has been rewritten in more modern languages and every company that sells or gives it away adds a lot of bells and whistles to it. Almost everything you interact with on your screen when you run LTSpice was added to the core. Back in the day there were no schematic drawing tools, you did that with a pencil and paper (and probably an eraser!!). You labeled the circuit nodes carefully so that you could then type the netlist in by hand. If you needed device models you had to make them from looking at data sheets and then type them in too. The data came out in tabular form, you either developed the skill of interpreting the columns of numbers or plotted them by hand with a pencil and graph paper. The really, really advanced versions used ASCII art to print your schematic and graph your results. Tedious? Sure. But so much better than doing all that by hand. Most of us did not have weeks and weeks of time in which to solve all the differential equations with a slide rule!!

LTSpice has a nice array of features. I think it is a real gift to us that Linear Technology created and that Analog Devices assures me will be continued. If you want more or nicer features I am told there are still commercial versions available and you would have to look them up and evaluate their feature sets to see if they are worth anything to you or not. I virtually stopped looking when someone told me the price of LTSpice and once I had installed and used it for a while any thought of looking for something better vanished!

Commercial grade circuit simulators tend to use proprietary simulation engines. The one I use the most at work, ADS, is a very powerful tool for RF design but I could never justify the expense of the license for hobby use.


Top
 Profile  
 
 Post subject: Re: Tube Amplifier Modeling Software
PostPosted: May Fri 17, 2019 5:01 am 
Member
User avatar

Joined: Nov Sat 26, 2011 4:09 am
Posts: 9473
Location: Texas. USA
pixellany wrote:
Having displayed my ignorance, maybe i can recover just a little bit...:)

How about an Op-Amp? With the right set of assumptions--and some precision resistors--we can build a widget that has E(out) = k * E(in) over a wide range of conditions. In my pea brain, that is a linear device.....So, if the statement is that active devices tend to be non-linear in certain conditions, then there will be peace in the valley.

To further refine this, we'll probably need to quantify the linearity. In my Op-Amp example there is a deterministic relationship to the loop gain. With high-end audio, we typically talk about Total Harmonic Distortion, but that parameter is also related to linearity.

But perhaps the only point is that real-world analog DEVICES tend to be non-linear. That is certainly true, but can it be shown from first principles that it MUST be true?

As for SPICE, I'm not qualified. I use it, but only for really simple things.
Yes, Total Harmonic Distortion is "related to linearity" in that it measures how much it deviates from linear. In other words, it's a measure of it's non-linearity. Why would you need to measure what it doesn't have (non-linearity)? If it were truly "linear" then measuring Total Harmonic Distortion would be a waste of time.

Btw, the reason an opamp is so 'close' to linear is through the magic of negative feedback.

Part of this is a matter of 'reality' vs 'reasonable' assumptions (for the purpose to hand). Any curve can be approximated, to any arbitrary degree of accuracy, by a series of linear segments and can 'be considered linear' within each segment. Is it really linear? No. But for a specific purpose it can be 'close enough' so that we may ignore (for convenience) the non-linearity.

It's the same with the opamp. You want to 'consider it linear' because the deviation is so dern small (for your purposes), but in reality it's still non-linear. Now, for your purposes that might be a reasonable simplification (assumption) but for other applications it might not. It all depends on 'how linear' you need it to be (which is just one reason why there are so many different opamps out there).


Top
 Profile  
 
Post New Topic Post Reply  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: oregonwinger73 and 1 guest



Search for:
Jump to:  




























Privacy Policy :: Powered by phpBB