• WARNING: Tube/Valve amplifiers use potentially LETHAL HIGH VOLTAGES.
    Building, troubleshooting and testing of these amplifiers should only be
    performed by someone who is thoroughly familiar with
    the safety precautions around high voltages.

spice model for UL output transformer?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi,

i would like to model an UL output XFMR and tried the following model but it yields an unsymmetric waveform. Do you have any hints how to do this?
 

Attachments

  • xfmr_ul.gif
    xfmr_ul.gif
    7.1 KB · Views: 3,536
Hi Docali,

I have never used this, but the model looks over-simplified to me. There should also be resistance and capacitance somewhere, which parameters would certainly make a difference. Especially the latter; contrary to some perceptions the intersection capacitance is often the parameter limiting high frequency response, not the leakage reactance. Leakage reactance between primary sections need also be included; in fact any nearly accurate model would be quite complex i.m.o.

The values would of course differ from unit to unit and C is mostly not given by manufacturers, thus I have chickened out in the past and settled for final response as measured in a real built-up unit.

It would thus interest me as well and I hope someone with experience would broaden our horizons here.
 
Here's a 3f4 spice model for a CT transformer from Circuit Maker:

Code:
*XTRANSCT:Transformer Subcircuit Parameters
*XTRANSCT:RATIO:|Turns ratio= Secondary/Primary [1m,]|1
*XTRANSCT:RP:|Primary DC resistance [0,]|0.1
*XTRANSCT:RS:|Secondary DC resistance[0,]|0.1
*XTRANSCT:LEAK:|Leakage inductance[0,]|1u
*XTRANSCT:MAG:|Magnetizing inductance[0,]|1u
*{RATIO=1 RP=0.1 RS=0.1 LEAK=1u MAG=1u}
*Generic ct secondary type:transformer
.SUBCKT XTRANSCT 1 2 3 4 5
RPRI  1 7 {RP}
LLEAK 7 10 {LEAK}
LMAGNET 6 10 {MAG}
VSEC1 9 4 DC 0V
FSEC1 6 2 VSEC1 {(RATIO/2)}
ESEC1 8 9 10 2 {(RATIO/2)}
RSEC1  8 3 {(RS/2)}
VSEC2 12 5 DC 0V
FSEC2 6 2 VSEC2 {(RATIO/2)}
ESEC2 11 12 10 2 {(RATIO/2)}
RSEC2 11 4 {(RS/2)}
.ENDS XTRANSCT

*alias:XTRANSCT {RATIO=1}
.PARAM A1TO1CT

*alias:XTRANSCT {RATIO=.5}
.PARAM A2TO1CT

*alias:XTRANSCT {RATIO=.2}
.PARAM A5TO1CT

*alias:XTRANSCT {RATIO=.1}
.PARAM A10TO1CT

*alias:XTRANSCT {RATIO=.05}
.PARAM A20TO1CT

*alias:XTRANSCT {RATIO=.04}
.PARAM A25TO1CT

*alias:XTRANSCT {RATIO=.03448}
.PARAM A29TO1CT

I've found this model works great with resistances specified, rather than ratios. In your netlist, just edit as follows (for 5K primary, 40% UL example):

Secondary: 0.08 (for 8 ohms)
Primary plate to CT: 4
CT to V+: 1

Adjust other params as per transformer specs.
 
Hi, thanks so far.

I use LTSpice for simulations and it unfortunately does not work with 3f4 models. LTSpice only has a model for inductances but this model is good in my opinion, because it has model parameters for series resitance and capacitance.

To model an UL transformer it should be possible to use two inductances in series with mutual inductance. The spice directive for this is for example:
K1 L1 L2 0.999

But this did not work well in my simulations.

Best regards from germany!
 
You can use a current-controlled current-source (or voltage controlled current sourc) and add the parasitic capacitance between primary and secondary add the leakage inductances and resistances on both sides of the device. Only problem with this approach is that it works down to DC.

There are some good discussions on the theoretics of modeling non-linear RF transformers, transformers for switching supplies on the web, you just have to look.
 
transformer spice models

Here are just two examples of how I do output transformers. They should work with any Spice variant as far as I know, I personally use LTSpice. I do have a vague recollection however that some spices wont allow more than 2 inductances on a K statement, so you have to put a seperate line for each pair of inductances.

Complex example, ie PP, UL, and multiple output taps.

.SUBCKT 1650R P1 Sg1 B Sg2 P2 O16 O8 O4 Com
* Push Pull transformer, with Ultralinear taps at 40%
* 5000 to 16 ohms, with 8 ohm and 4 ohm taps, 3db 15 to 60Khz
* Hammond 1650R
*
LP1 1 2 2.409088925H ; PRIMARY
LS1 2 B 1.070706189H ; primary, scrren grid tap portion
LS2 B 3 1.070706189H
LP2 3 4 2.409088925H
LA1 5 6 0.007348166H ; SPEAKER SECONDARY
LA2 6 7 0.003674083H
LA3 7 Com 0.021414124H
KALL LP1 LS1 LS2 LP2 LA1 LA2 LA3 0.999199994;
RP1 P1 1 30.0
RP2 Sg1 2 15.0
RP3 Sg2 3 15.0
RP4 P2 4 30.0
RS1 O16 5 0.1
RS2 O8 6 0.1
RS3 O4 7 0.1
.ENDS 1650R

P1 and P2 are the plate connections, B is the B+ connection, Sg1 and Sg2 screen grid connections, and O16, O8 and O4 the 16, 8 and 4 ohm outputs, and Com the common secondary terminal


Simplest example, ie SE, single output.

.SUBCKT 5KSE P1 P2 Sp1 Sp2
* Single ended audio transformer
* 5k to 8 ohm, 10 to 40KHz
*
LP1 1 P2 40.26021568H ; PRIMARY
LSA 2 Sp2 0.064416345H ; SPEAKER SECONDARY
KALL LP1 LSA 0.999499875 ;
RP1 P1 1 56
RS Sp1 2 .1
.ENDS


P1 and P2 are the primary ie plate connections, and Sp1 and Sp2 the secondary ie speaker connections.

When loaded by the specified input and output resistances they give the specified frequency response. They include winding resistance so you get the expected voltage drops. These are purely linear models and so do not give any distortion. So they are not realistic in that regard, but the fact that the taps "work right", ie the ultralinear acts as it should, and you can put 4 ohms on the 4 ohm tap or 8 ohms on the 8 ohm tap and get the right results make them very useful in my opinion. The frequency response may not have all the little quirks of the real transformer, but it is reasonable, not DC to infinity or anything like that.

I use the attached spreadsheet to derive the model parameters. The values given for the various transformers listed are taken from various data sheets and websites and so on. Many of the dc resistances are just pure guesses on my part. I make no claim that the models will match the real transformer, only that the model will have the frequencey response and impedance ratio that the spec sheet claims for the real transformer.

The spreadsheet is just something I whipped up for myself, so it is not particularly user friendly perhaps, but it should be fairly easy to use. Just input nominal source impedance, output impedance, winding resistances and upper and lower 3dB frequencies, and then in the rightmost columns you will get KA, LP and LS for SE types, or KA, LP1, LP2, and LS2 for PP types. Paste those values into the spice model. If you want multiple output taps then take the value for LS and paste it into cell A7 on sheet 2, set the tap impedances as required ( default is 4, 8, and 16) and then see the values for LA1, LA2 and LA3. Paste these into the spice model.
 

Attachments

  • transformer model parameters.zip
    16.8 KB · Views: 1,838
Good work...

Looks like alot of thought went into that, nice one.:)

On a related note:
I recently bought a bargain pair of hammond 1615 output transformers (which match your table reasonably well) but when I put the measured specs (LP, LS, DCRs...) into my LTpice simulation it didn't perform as well as expected.
Normally these have a Zp-p of 5000 but I am using them with 8ohms on the 4ohm taps to get a Zp-p of 10000.
I thought that this was the problem for a while and was quite disheartened as my design didn't seem able to produce a 50Hz square wave of more than about 2W without entering class B with the 1615. (It is supposed to be a 7 - 8W pure class A amp).

However I now realise that it was the NFB that was the problem. As the output level falls on the tops of the square wave the amp tries to miantain the level through the transformer resulting in the drive signal to the output tubes increasing. As my NFB was quite substantial it tried to maintain the output exactly by a huge increase in drive signal resulting in one valve shutting off.

Seems obvious now but it vexed me for quite some time. Just thought the info might be usefull for anyone else in the same situation.

Incidentally- The differences between my measurements and your specs on the spreadsheet are mainly the primary DCR (You show 30 Ohm on each primary, I measured about 84 and 90), and the Lprimary (yours is about 6 in total, I measured about 2.4, which might account for the perfomance of your model being better at low frequencies than the hammond specs)
 
Hi jackinnj,

What's the vertical measurement / scale of that scope? Looks terrible!


Further to my last post I have investigated further and now realise what exactly is going on.
Hammond specs show +/- 1dB at max power of 30Hz - 30KHz.
I have found this is all about how you test.
Before I bought these OPTs I had my sim running with Lp approx 50H and getting quite nice response through it.
The Lp of the 1615's i bought was worryingly low at 2.71H, but I thought oh well "+/- 1dB at max power of 30Hz - 30KHz" they must be fine. Unfortunately its a bit more complicated than that.
Yes if you feed a 200Vrms sine into the primary you get ~ 5.6Vrms out whether it's 50Hz or 10KHz, what changes is the transformers ability to accurately reflect the load.
At 10KHz the total currrent through the primary is is likely to be 200V / 10Kohm = 20mA. Fine with a class A quiescent current of 50mA. Unfortunately at lower frequencies there is not enough Lp to sustain the primary impedance and this falls drasticly.:(
at 50Hz that 200Vrms signal draws about 200mA through the primary, putting my amp way into class B if not B2 which it is not designed for.
Another way of looking at it would be if the OPT is fed with a 20mA sine wave and the +/- 1dB points were measured the range would probably extend down to about 500Hz or higher. Rather poorer than the 30Hz specified.
Am I right in thinking this, or am I missing something? The Hammond specs seem to assume the preceeding amp is a pure voltage source with infinate current capability. If that were the case why bother with an OPT?!:whazzat:
Please someone tell me I'm wrong and it will all be fine.
A little while ago I proposed using mains transformers as OPTs but was told by everyone who responded that I'd be better to go with real OPTs. The mains transformers I'm sure would have had FAR higher Lp, and while I accept the overall sound quality may not be as good it would be better than hard clipping any signal below 300Hz!
My options seem to be:
Limit the output to about 1W :(
Sell the Hammonds and buy some mains toroids :rolleyes:
Redesign the entire amp + power supply as a class AB. :(
Sell ALL the stuff I accumulated for this amp and move on to my next project. An OTL!:devilr:
To be honest I'll probably end up building this with the Hammonds to see if they do sound that bad.
Any advice? Are Hammonds just a big pile of $#!+? Should I just take up knitting?
:mad:
 
StoneT said:
Any advice? Are Hammonds just a big pile of $#!+? Should I just take up knitting?
:mad:

Here's another Hammond -- I changed the test setup, averaging the response 8 times over 20 seconds with 1Hz bandwidth. I pulled up the other one in Photoshop and danged if I can't make out the vertical scale -- this one is 1 dB per interval and the horizontal is 20Hz to 20kHz -- plus I isolated the transformer into a cookie tin so the 60Hz artifacts are removed.

I would not take up knitting, you should be just fine with your Hammonds.

An externally hosted image should be here but it was not working when we last tested it.
 
Administrator
Joined 2004
Paid Member
LTSpice definitely is compatible with 3F4 models, I have imported many (most) tube models based on 3F4 without problems.

LTspice also will allow many more than two inductors with the K (coupling factor) - I've done at least 4 and perhaps more without problems. Probably breaking it down into sections based on the interleave ratio and then adding appropriate leakage inductance is better than using K < 1 anyway. You can also add stray capacitances/interwinding capacitances if you know what they are. Inductors in LTSpice can include resistance and shunt capacitance directly resulting in fewer nodes for the solver to deal with - this does seem to speed things up a bit.

Norman Koren has a very good spice model on his site for the Dynaco A-470 used in the ST-70, IIRC at one point I got it to run in LTSpice, although that required some editing. (I think it was not a trivial task to get it working.)

Most of the time when I can't get something to run it is because a model has an error in it or I have not set up the conditions correctly to allow the solver to converge to a solution.

The LTSpice forum is a very useful place (yahoo groups) to learn about the power of this tool. There is actually very little it can't do.
 
Thanks Jack,
I am wondering what source you used for the measurements though. If it was a voltage source with low output resistance and reasonable current capability then the chart is what I would expect, but I would equally expect that your source was supplying considerably more current at 50Hz than at 5000Hz to produce the same input voltage.
I am currently investigating mains toroids. I know, DC imbalance problems etc, but I am not expecting this to be a zero maintenance amp anyway.
Anyone know any UK available transfomers that may be suitable?
I looked for threads but only found 1 from 5 years ago that didn't mention any names, and manufacturers of power transformer dont seem to specify Lp :rolleyes:
 
Here is another good paper about transformer modeling:

http://www.onsemi.com/pub/Collateral/AN1679-D.PDF

I have an LTspice file that implements the method from page 4 of that paper, and automatically calculates all of the model parameters of a two-winding transformer from simple measurements. The measurement procedures are also on the schematic. I did this for power transformers (with excellent help from andy_c and powerbecker, at diyaudio.com). So I don't know how well it might apply to an output transformer. But it might be worth trying, since it's easy to do. Or, it might provide a starting point, if a better model is needed.

My downloadable LTspice transformer modeling schematic is at:

http://www.fullnet.com/~tomg/gooteesp.htm

Regards,

Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
jackinnj said:
You should also incorporate into your model several hundred pF's from primary to secondary...

Hi Jack,

I wondered about that, but had hoped that the interwinding capacitance might have a negligible effect for low (mains) frequencies.

If I were to try to incorporate it into the model that I have at http://www.fullnet.com/~tomg/gooteesp.htm , between what two points in the model's schematic should I connect the several hundred pF?

And, is that capacitance something that can be easily measured? Could I, for example, just short the two primary leads and short the two secondary leads and then use a capacitance meter between primary and secondary? (I'm at the computer, right now, but can try it, later.) Or is it something that is best derived with some more-dynamic running-conditions setup? Or am I way out of the ballpark? Transformers still often make me feel quite ignorant.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
jackinnj said:
You should also incorporate into your model several hundred pF's from primary to secondary...


Sorry don't agree.....I'll give you some figures to pump in to your screens..It's the high frequencies that cause the trouble. In the real world one expects at least 1nF coupling cap between whole prim to sec and one has to distinguish between windings to UL tap and worst of all the relationship between UL tap to anode. On many o/p trannies the whole primary leakage inductance with sec s/c sits around several mH. Shorting out relevant sec and primaries isn't a reliable method for a tube o/p transformer. The leakage capacitance is a wild variable.
After this having spent xxx on tubes one is after a good performing o/p tranny..at least with a response -3dB at 40Khz min and the practibility of winding how many sections of primary and secondary does one want ?.....this is harder than blackjack and yet some designers still produce first class designs from sliderules.
The Williamson which most commercial designers have CAD programs for, calaculate up to 18 sectioned windings. The rest is cost. !

richj

richj
 
Administrator
Joined 2004
Paid Member
Hi Rich,
I think jackinnj was talking about gootee's power transformer model so his comments about capacitance would seem to be relevant - capacitance though may well be (much) higher depending on construction. Split bobbin designs may have significantly less capacitance between primary and secondary windings.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.