• The move to the new server is done. There are some software and database maintenance updates in process. This has us passing the hat around to help out. We appreciate any donations. Seriously, even a dollar helps. The payment page may be found here - https://www.audiokarma.org/support.html

Modeling transformers in LTspice

thorpej

AK Subscriber
Subscriber
Recently, I've been learning how to model transformers in LTspice, and today I decided to make a SUBCKT for the Heath 54-89 (the power transformer for the AA-100). It seems to work fine. Attached, in case anyone is interested.

The LTspice tutorial is pretty clear on how to do this, and so I just used the rated primary voltage as the inductance value for the primary winding, and then calculating the inductance for each secondary winding as thus:

Lsec = ((Vsec/Vpri)^2) * Lpri

For a center-tapped winding secondary winding, I connect 2 separate inductors in series with opposite phasing.

So, for the case of the 54-89, it's a 117Vac primary and a 740VCT secondary (370-0-370). So, the primary inductor is assigned:

L1 = 117H
L2 = ((370/117)^2) * 117 = 1170H
L3 = ((370/117)^2) * 117 = 1170H

...and then you connect them all together with a mutual-inductance statement:

K1 L1 L2 L3 1​

The tutorial seemed to indicate that whatever you used for the primary inductance was arbitrary - that it was a starting point for the calculation and nothing more.

Add additional inductors for the remaining secondary windings. Add the DC resistance of each winding as a parameter of that inductor for more accurate results.

Now, what I'd like to do is learn how to model output transformers... but I have no idea how to get the primary inductor(s) defined correctly for the desired primary impedance (once you know the primary, the secondary presumably follows the same formula as for a power transformer). I suspect I actually need to care a bit more about the actual primary inductance instead of using some arbitrary value... but that's just a hunch. I'm just an interpreter (software engineer), and not very good at telling stories (actual electrical engineering).

Any actual-EEs out there who can help me out?
 

Attachments

Register to hide this ad
Recently, I've been learning how to model transformers in LTspice, and today I decided to make a SUBCKT for the Heath 54-89 (the power transformer for the AA-100). It seems to work fine. Attached, in case anyone is interested.

The LTspice tutorial is pretty clear on how to do this, and so I just used the rated primary voltage as the inductance value for the primary winding, and then calculating the inductance for each secondary winding as thus:

Lsec = ((Vsec/Vpri)^2) * Lpri

For a center-tapped winding secondary winding, I connect 2 separate inductors in series with opposite phasing.

So, for the case of the 54-89, it's a 117Vac primary and a 740VCT secondary (370-0-370). So, the primary inductor is assigned:

L1 = 117H
L2 = ((370/117)^2) * 117 = 1170H
L3 = ((370/117)^2) * 117 = 1170H

...and then you connect them all together with a mutual-inductance statement:

K1 L1 L2 L3 1​

The tutorial seemed to indicate that whatever you used for the primary inductance was arbitrary - that it was a starting point for the calculation and nothing more.

Add additional inductors for the remaining secondary windings. Add the DC resistance of each winding as a parameter of that inductor for more accurate results.

Now, what I'd like to do is learn how to model output transformers... but I have no idea how to get the primary inductor(s) defined correctly for the desired primary impedance (once you know the primary, the secondary presumably follows the same formula as for a power transformer). I suspect I actually need to care a bit more about the actual primary inductance instead of using some arbitrary value... but that's just a hunch. I'm just an interpreter (software engineer), and not very good at telling stories (actual electrical engineering).

Any actual-EEs out there who can help me out?

For output transformers (or any transformers working in wide range of frequencies), you need to model many more parameters: internal capacitance, stray inductance, coupling efficiency and others. Model gets much more complicated. You can study things like this http://www.nascentechnology.com/pdf/extracting_transformer_parameters.pdf or even this http://hotstreamer.deanostoybox.com/temp/TN69.pdf and this http://web.archive.org/web/20060316234454/http://www.midcom-inc.com/Tech/pdf/tn82.pdf
 
You can measure the primary inductance, but it's not really a constant - it varies with AC level (and dropping at high levels, near saturation). For a power transformer, measure the unloaded current, and it's 117/(I*2*pi*60) Henries. You can do that with an output transformer to get an idea of the high-level inductance, likely much higher than a low-level measurement with an LCR meter. Single-ended thansformers add the complication of inductance changing with DC current too.

The leakage inductance can be added in series with the primary or included in the k-factor. But won't help much unless the winding capacitance and shunt capacitance are known. Primary resonant frequency can help estimate the former, second can be measured primary to secondary. Though it's still an approximation - shunt capacitance is distributed along the winding, probably not equally divided between primary halves.

I happen to have measured one of the AA-50/100 outputs on a Wayne-Kerr impedance bridge, attached, though I missed the resonant frequency and primary-secondary capacitance on this one. Excellent transformer - impedance and phase are pretty flat past 100 kHz.
 

Attachments

Honestly, right now, I'm mainly interested in modeling a hypothetical "ideal" audio output transformer just for simulating full amplifier circuits. Knowing how the knobs need to be turned to change the primary impedance vs the secondary(-ies).

I agree, @Tom Bavis, those are excellent output transformers, and I'm always on the lookout for them.
 
Well lucky me, a YouTube channel I watch from time to time (ElPaso TubeAmps) recently had an episode about measuring and modeling output transformers. Handy! The most important take-away for me was "modeling arbitrary ideal transformer", which has proven handy last couple of days.

For a simple push-pull transformer, it goes a little something like this.
  • Determine the secondary impedance you care about (this is probably the one you want to take your global NFB from). Let's do "4 ohm" for this example.
  • Decide the primary impedance (plate-to-plate) that you want to model. Let's do "7.5K ohm" for this example.
  • Compute the impedance ratio: 7500 / 4 = 1875.
  • Draw 3 inductors -- 2 for the primary (L1 and L2, say), 1 for the secondary (Ls, say). Orient the phase dot the same "direction" for the primaries (one of the phase dots will be at the center tap, one will be on one of the plate leads), and however you wish to model for the secondary.
  • Connect the 2 primary inductors together (tail of L1 to head of L2) to form the center-tap.
  • Select an arbitrary-but-in-the-ballpark inductance for each half of the primary winding -- let's say 10H. Assign that value to each primary inductor.
  • Compute the inductance of the entire primary winding: (SQRT(L1) + SQRT(L2)) ^ 2 -> (SQRT(10) + SQRT(10)) ^ 2 = 40H
  • Divide the total primary inductance by the impedance ratio to get the secondary inductance: 40H / 1875 = 21.3mH... assign that to the secondary inductor.
  • Couple the 3 inductors together: "K L1 L2 Ls .99995" ("nearly-perfect-but-not-quite coupling").
You now have an ideal output transformer with no leakage inductance or stray capacitance, etc. I used this to sketch out the output stage of an EL84 amp that's on the drawing board, and it worked out pretty nicely (resulted in basically what I expected); see attached.

Modeling the other stuff is pretty straight-forward assuming you have the equipment to measure a specific transformer. But if you're just concerned with modeling a specific impedance ratio, then this is your ticket to simulation nirvana.
Screen Shot 2017-10-30 at 8.12.24 PM.png
 
Last edited:
My question is where do you get the exact model of the specific output transformer. On top of the core material, there are different winding techniques, separate sectioning of primary and/or secondary that gives different parasitic capacitance and coupling. It is hard for me to imagine you can really get an accurate model.

One thing you can try is to actually write to the output transformer manufacturers and ask if they have Spice model of their transformers. That's your best bet.

I use extensively LTSpice for designing my SS power amp. I can tell you, even with very reliable transistor models from Bob Cordell library ( he's "the" people on SS amp design), the simulation result is quite different from my actual amp. I can assure you my layout is as good as it can be because I have years of experience in pcb layout for circuit that is much more critical than audio amplifier and did lots of RF circuit layout.

Both the stability compensation, THD performance is very far off. I was even frequent the LTSpice Yahoo group to ask question and verify the simulations. It's just not representative.

Yes, if you want to check for obvious mistake and stuff, it's helpful so you don't design something that rail upon power up. But getting down to the finer detail, I won't really trust it. It is not the fault of LTSpice, it's the accuracy of the model files.

The most disappointing thing is the phase margin and stability simulation. It just cannot be more far off. I just designed a new version of the input stage of the power amp, I simulated to make sure it's not a bomb, I fab a set of boards and going to work on the stability from experience, didn't even do the simulation for the phase margin.
 
The models are never going to be 100% accurate. Heck, even for solid state stuff, they're essentially modeling the "bogey" sample; your mileage may vary.

Of course, half the fun is tweaking once built, right? I'm mostly interested in eliminating any major mistakes before huffing solder. (It also allows me to "build" things without filling up the garage / house with more stuff... :-) )
 
Some bed time reading materials, I am actually reading about output transformers. Max of Maxhifi here gave me the link of these. Some formulas might be helpful if you try to create models:

This is 4 part on Distortion in Transformer Cores by N Partridge in 1939: https://varietyofsound.wordpress.com/2012/03/30/distortion-in-transformer-cores-n-partridge-1939/

This is the follow up of the Partridge papers by Menno Van Der Veen https://www.plitron.com/wp-content/uploads/2010/04/Atcl_3.pdf
https://www.plitron.com/wp-content/uploads/2010/04/Atcl_3.pdf
It is complicated, inductance change with Bmax. Then you have hysteresis.
 
The models are never going to be 100% accurate. Heck, even for solid state stuff, they're essentially modeling the "bogey" sample; your mileage may vary.

Of course, half the fun is tweaking once built, right? I'm mostly interested in eliminating any major mistakes before huffing solder. (It also allows me to "build" things without filling up the garage / house with more stuff... :) )
Yes, eliminate stupid obvious mistakes, don't count on the detail. When you get to THD measurement and stability, it ain't going to help much.
 
As far as modeling a SPECIFIC transformer... you're going to be able to get close if you measure all of the parasitic parameters ... but yah, the intricacies of winding technique are going to be tricky (inductance is going to vary with frequency). As I said, I'm mostly interested in getting close to the mark. Once the thing is built, then I can dial it in.

After all, I'm not an EE by trade... so this is totally good enough for my purposes.
 
Back
Top Bottom