MEASURING AND SPICEMODELING A POWER TRANSFORMER
teemuk said:
Ain't that many transformer manufacturers publishing decent specs. Most manufacturers list only VA rating and maybe mounting configuration, diameter and weight. Why not primary/secondary inductances, winding resistances and parallel capacitances. It's a damn shame.
I have used following to simulate 250VA 23048 transformer:
Lp = 10H, series resistance 6,4 ohms
Ls = 0,45H, series resistance 1,5 ohms.
The resistances are real measured values. The primary inductance was guessed based on some article I read yours ago (I do not have an inductance meter) and the secondary inductance is selected to give the specified voltage to moderate load.
My point is to say that if you know some specs of the actual part you can at least make a decent model which, in simple applications, works pretty well. I have noted that the model tends to sag pretty early, though. Something like this is also a highly simplifed version of an actual transformer and one has to take that in account when running simulations. For example, I wouldn't dare to trust into its accuracy in SMPS sims.
Edit: Inspired by this thread I did a quick search on primary inductances... again with mediocre luck. Fortunately, Rod Elliott's site (http://sound.westhost.com/xfmr2.htm) lists some measurements, which seems to indicate I estimated the inductance to be too low when I came up with the described model. 40  50H could be a more realistic value for a 250VA toroid.
teemuk,
After further LTSpice testing, the twocoupledinductors transformer model, that I mentioned earlier in this thread (which was derived from your model), seemed to not work correctly, for modeling the 56VA transformer for the power supply that I had already designed and built. That was possibly because I didn't have good parameters for the model. I tried tweaking the parameters, quite a bit, and using my transformer's measured winding resistances, testing just the transformer model with an ideal voltage source input and various resistances across the output. But even the models that seemed to perform OK, that way, still suffered from not having enough available power at the output, when used in my existing PSU's LTSpice simulation.
So, I went looking for a better way to measure transformers, and model them in Spice, and found this:
http://www.onsemi.com/pub/Collateral/AN1679D.PDF ,
which I found referenced in this thread:
http://groups.google.com/group/sci....read/thread/90a5f710a1dda388/f02846e2cededb30
Look at Page 4 of the appnote AN1679D.PDF, Steps 1 through 8, and Figure 8.
Like you, I don't have an inductance meter or bridge, either. So, I calculated approximate inductance using an oscilloscope's display of the voltage resulting from applying a square wave, using L= V/(di/dt) and the measured resistance. I used the scope's builtin 1 kHz calibration output, for the square wave.
Below, I'll go through the steps from Page 4 of the appnote referenced above, and show how I measured the transformer and derived my model parameters.

Transformer modeled in this example: Triad Magnetics VPP361560 (same as Hammond 183K36), 56VA, dual 115V primaries, dual secondaries (36VCT @ 1.56A or 18V @ 3.12A), PCB mounted.
I use this transformer with the secondaries in parallel. And for 115V117V inputs, the primaries are also used in parallel, in my application. So I modeled one primary and one secondary as "the transformer model" and then, in my LTSpice PSU circuit model, used two of those transformer models in parallel, with 115V117V input. But any other primary/secondary configurations can be used just as easily, once a transformer model representing one primary and one secondary has been created.
The following is a description of how I implemented the eight steps from Page 4 of the appnote referenced above (AN1679D.PDF from onsemi.com):
1. Calculate N= Np/Ns = Vp/Vs. I didn't measure, using the Vp and Vs specs instead:
N=116v/18v = 6.444
2. Measure primary inductance, with secondary OPENcircuit:
a) Attached scope probe tip to calibration output. Adjusted probe's compensation trimmer until square wave looked square. (This is important.)
b) Attached scope probe tip and scope calibration squarewave output to one of tranformer's primary pins and attached probe's ground clip to other (corresponding) primary pin. Scope display showed pulses with tops sloping downward (from left to right), with peaks at 0.3V, sloping from 0.3v to 0.25v over 0.3 ms.
Noted that V = L(di/dt) > L = V/(di/dt).
Resistance of primary was already measured as 20.85 Ohms, so
di/dt approx= [(0.3v0.25v)/20.85 Ohms]/0.3ms = 7.9936 A/S
Used V=0.3v (peak value; could also use 0.25v; maybe should use average of 0.3 and 0.25):
V = L(di/dt) > L = V/(di/dt) = 0.3/7.9936 = .03753 = 37.53 mH
Lpsopen = 37.53 mH
3. Measure primary inductance, with secondary SHORTcircuited:
Performed same procedure as in step 2, above, except had a wire jumper connected between (corresponding) secondary's pins.
Lpsshort = 2.5 mH
4. Compute coupling coefficient k = sqrt(1Lpsshort/Lpsopen):
k = sqrt(1(.0025/.03753)) = 0.966
5. Compute L11 = (1  k)(Lpsopen) = (1  0.966)(.03753) = .001276
L11 = 1.276 mH
6. Compute L12 = (1  k)(Lpsopen)/(N^2)
= (1  0.966)(.03753)/(6.444^2) = .00003073
L12 = 0.03073 mH
7. Compute Lm = (k)(Lpsopen) = (0.966)(.03753) = .03625
Lm = 36.35 mH
8. Rprimary and Rsecondary resistances are measured with ohm meter:
Measured resistances across primary and secondary and then subtracted, from each one, the resistance measured with the Ohm meter's probes shorted together:
Rp = 20.85 Ohms
Rs = 0.73 Ohms
Now, see the schematic in Figure 8 of the appnote (AN1679D.PDF from onsemi.com, linkedto above).
Note that the transformer in Figure 8 is an IDEAL transformer.
For the Spice model of the ideal transformer, I labeled the ideal transformer's input nodes as "ID1+" and "ID1", and had no downstream connections to them. For the ideal transformer's output, I used a "bv" (behavioral voltage) source, and set the voltage to V=0.15517*( V(ID1+)  V(ID1) ), where the 0.15517 = 1/N, using the N calculated in Step 1, above. i.e. 116VAC RMS input gives 18VAC RMS output.
Created schematic as shown in Figure 8 of appnote, with ideal voltage source input (Used 164V @ 60 Hz, since 116VAC RMS input X 1.414 = 164V 0peak input): Connected Rp, Lm, and L11 in series (from ideal voltage source's + to  terminals, in the sequence just given), across input source. Node for input source's "+" terminal and top of Rp was labeled "ID1+". Node between Lm and L11 was labeled "ID1". Inserted bv (behavioral voltage) source to the right of nodes ID1+ and ID1 (but NOT connected to them). Set V=0.15517*( V(ID1+)  V(ID1) ), for bv source (by rightclicking on bv source, clicking on "Value" field, and entering the V expression just given). Inserted Rs and L12 in series, from bv source's "+" terminal to overall output terminal 1 of 2. Connected bv source's "" terminal to overall output terminal 2 of 2. Inserted a 1000Meg resistor from ideal input voltage source's "" terminal to Ground, so Spice wouldn't complain about "floating nodes".
It works!
Unfortunately, using the behavioral voltage source for the ideal transformer model, the way I did, means that the conditions at the secondary winding cannot affect the primary winding in any way. There should be a way to model the ideal transformer so that the coupling would work in both directions. But I couldn't immediately think of one. If anyone knows, or can imagine, a better way to try doing it, please let us know.
 Tom Gootee
http://www.fullnet.com/~tomg/index.html
