Transformer Modeling

By Harvey Morehouse


Magnetics (Part 1) - Transformer Modeling

About the writer: Harvey Morehouse is a contractor/consultant with many years of experience using circuit analysis programs. His primary activities are in Reliability, Safety, Testability and Circuit Analysis.

Summary: This paper describes perfect and ideal transformers and provides the building blocks for constructing realistic models for simulations with multi-turn transformers and non-ideal inductors. This is not a magnetics primer, and assumes a basic knowledge of magnetics, especially in the parts to follow. The focus is on how to create models of real, lossy transformers of increasing complexity using an ideal transformer as a building block, and also non-ideal inductors.

Three transformers

There are three transformer primitive models useful in SPICE simulations. They are the perfect transformer, the ideal transformer, and the lossy transformer. The perfect transformer is simple, easy to model, however it is often the subject of misunderstanding.

Perfect Transformer: The perfect transformer consists of two lossless inductors which are magnetically coupled together. The primary has an inductance we will call Lp, and the secondary an inductance value of Ls. The coupling inductance or mutual inductance we can call Lm. The perfect transformer is the most easy to construct, however it is often the subject of misunderstanding. Refer to Reference 1 for more details.

The transformer equations familiar to all of us are:

V1 = V2 * n
I1 = I2 / n
Z1 = Z2 * n * n

Voltage V1 is the voltage impressed in the primary of a transformer, with a current of I1 resulting. V2 is the secondary transformed voltage, with a current of I2. (The coupling is assumed to be unity.)

These equations ONLY apply to an ideal transformer, however. This is the cause of some misunderstanding. For a perfect transformer there are other considerations. First, the turns ratio is the square root of Ls/Lp (or L2/L1) as shown in the reference.

Second, the effects of the primary (or secondary inductance) are NOT considered in the preceding equations. As an example, per Reference 1, create a test circuit similar to that shown in the following.

In the example circuit, the primary has a 16uH inductance, the secondary a 1uH inductance, and the turns ratio is 4, the square root of 16/1. The coefficient of coupling is again assumed to be unity as shown. Resultant analysis will show that that the voltage is transformed as expected, but the currents are not!!!

The reason for the apparent discrepancy is that the value of Ls has not been included in the familiar equations. The real equations that should be used are, for the perfect transformer:

V1 = V2 * n
I1 = I2 * (1 + Zl;/(s*L2)) / n
Z1 = Z2 * n * n / (1 + Zl/(s*L2))

Note that IF L2 in the above equations is very large (and consequently L1 to maintain the turns ratio), or the load Zl is very small compared to sL2, the results will approach those of an ideal transformer. There MAY be a range of frequencies and loads where a given perfect transformer will approach in performance that of an ideal transformer.

As an illustration of this confusion, several years ago a fellow worker was designing a circuit with an AC coupled transformer in a transistor collector. He specified to a transformer shop the turns ratio he wanted (no problem) as well as the frequencies over which he wished to use it, and the device transformed power (no problem) but he also specified he wanted a LOW primary inductance (BIG problem).

I became aware of this problem when the circuit with the prototype transformer failed to perform as expected and I was asked for my input. I pointed out that the designer REALLY wanted the primary impedance to be LARGE, so that the transformed load at the transformer primary would be essentially only the transformed impedance, consistent with size and weight considerations (and the fact that larger transformers tended to have larger winding resistances and stray capacitances). With this modification the secondary inductance exceeded the expected load impedance by a large factor, and it performed as expected.

Ideal Transformer: The ideal transformer is a lossless transformer. It differs from the perfect transformer as it will pass DC and all frequencies. It is of course unrealizable in the 'real world'; however it serves as a building block for building complex, non-ideal transformers. This will be done in subsequent parts of this article, but in this part of the paper we will consider only how to model the ideal transformer.

An ideal transformer can be modeled as shown in the following:

In this model the secondary current is reflected as the primary current and the primary voltage reflected as the secondary voltage, each with a multiplier of 'RATIO'. 'RATIO' being the reciprocal of the 'n' term as previously defined as the primary to secondary turns ratio. Components RP and RS are model elements added to prevent problems when the ideal transformer is used in an implementation, RS being arbitrarily large, and RS being arbitrarily small. VM is used as an ammeter to measure the secondary current. The depicted 'F' and 'E' elements are not shown in B2 SPICE format however the elements show clearly their relationships as to controlling and controlled nodes. In B2 SPICE format the circuit becomes:

An AC source was provided as an input V1, and a load resistance as R1. The turns ratio is in this case 0.1. The netlist for this circuit is:

* B2 Spice
* B2 Spice default format (same as Berkeley Spice 3F format)

***** main circuit
F1 N2 0 VAm1 10
E1 3 0 N2 0 10
VAm1 3 4 0
RP N2 0 1e10
RS 4 N1 1e-9
V1 N2 0 DC 0 SIN( 0 10 10K 0 0) AC 10
R1 N1 0 1

.OPTIONS gmin = 1E-12 reltol = 1E-4 itl1 = 500 itl4 = 500
+ rshunt = 1G
. TRAN 10u 1m 0 1u uic

Performing a transient analysis on this circuit shows that the transformer output voltage is ten times the transformer input voltage, and the transformer input current is ten times the transformer output current.

The above graph output shows the primary to secondary step-up turns ratio of 10 for the voltage, and the secondary to primary current step-down ratio also of 10.

Similarly, for the output currents, the following graph shows the relationship between the input and output currents show the output current being ten times that of the input current.

Close examination shows the input and output voltages and current maximums are not exactly 10 and 100 volts and amperes, as expected. This is due to the plotted curve sampling point not being exactly at the maximum excursions, as well as to computational and rounding errors.

Interestingly enough, the current plot seems to show an erroneous 180-degree phase shift between the primary and secondary currents. This occurs because of the transformer primitive being modeled as a two-port device, with 'positive' currents entering input and output terminals.

This could be eliminated and complying with the external device 'dot' convention by reversing the sense of the model device measuring output current, VAm1, and changing the gain of the 'F' to a negative value. Alternately, if it were expected that this current would be widely used in the final product, one could just remember to multiply any printed and plotted magnitude current magnitude curves by negative one. However, because a final realizable lossy model with a core and parasitic elements is expected to be the final 'product' of this effort, with multiple primitives being used to make the final output, it seems worthwhile to maintain the definitions and to rely on external ammeters and/or plots of currents through external elements to be directly performed without any mental gymnastics required in using the model current sense.

In the test circuit, a ground is added to both input and output, however this is not required in the subcircuit, as it is expected that ground references would be determined by external components. One could easily add a large resistance between the 'primary' and the 'secondary' in the subcircuit to eliminate the need for a secondary ground point in the SPICE schematic representation, and perhaps to simulate inter-winding resistance, eliminating the secondary ground reference.

Having created a working model, it is best to add this model (less of course, elements V1 and R1) as a subcircuit to the library. Whether it should be parameterized or not will be discussed in part 2. In order to facilitate usage, and to make its nature clearer in a schematic view, the transformer depiction(s) should be altered slightly from that of the 'standard' transformer. The normal two winding transformer symbol named 'transformer' is shown as follows:

Several additions are suggested for the new transformer symbol. First is the addition of winding polarity dots, which should be added to show the relationships of the impressed and induced voltages. This is desirable to aid in the creation of multi-winding transformers with the desired winding polarities. Second, the winding turns ratio would be nice to indicate with an 'n' and a '1' showing the primary with 'n' turns and the secondary with one. It should be noted that in the creation of multi-winding transformers the individual transformer primitives would often have different turns ratios. But for building block purposes, a symbol such as the following is suggested.

Lastly is an indication of the core type. In this case, if the subcircuit is to be used as a building block for a 'real' transformer nothing more need be done. It is expected that this will be the case; at least after the design topology has been 'proven' using an ideal transformer composed of the interconnection of ideal transformer primitives. (Note that an ideal transformer primitive used alone in a flyback power supply model is useless in itself, as it relies on energy stored in the magnetic field to power the load when the primary winding is non-conducting. It could be used in a forward converter, however.)

The anticipated use of this simple device is to construct more complex devices, especially with a real magnetic core material, however it itself could be useful in building a 'real' transformer with a single primary and secondary winding. When all of the ideal transformer elements have been added, by interconnecting ideal transformer primitive(s), a core, and parasitic elements (as will be shown in the next part of this article, a representation of the transformer to indicate that it is air-gapped, saturable or (essentially) linear with a magnetic core material may be appropriate. For this case, the primitive transformer (meaning generally the transformer constructed only of perfect transformer model elements), is sufficiently shown as in the following should be sufficient:

The symbol was created using the B2 SPICE database editor and first duplicating and then altering, renaming and saving the symbol as 'transformer_primitive'.

Using it one can build multiple winding transformers. This is done by creating a subcircuit of the device. By paralleling or placing in series input and/or output windings, transformers with multiple winding combinations in the primaries and secondaries can be created, creating more complex subcircuits. Moreover, it is not difficult to add a lossy core model, winding resistances, leakage inductances, stray capacitances, all of which can tailor the device to more nearly perform as would a 'real' transformer. This then creates a model for a specific real transformer. The external elements modify the ideal characteristics to create a realistic device, as well as do parameterized inputs to the subcircuits. This will be covered in a later part.

There IS a single drawback to using this as a basis of our transformer models, however. Namely that it will pass DC. IF there is some DC voltage impressed, it will be transformed. Some care may need to be taken to account for this if it is the case.

Lossy Transformer: The lossy transformer can be constructed using a perfect transformer, or an ideal transformer. Alternately, one can create it using one of many transformer models described in textbooks. This paper, in subsequent parts, will show how to build a realistic, real-world transformer from ideal transformers with the inclusion of lossy elements added to the ideal transformer model.

One may model 'real' transformers in many ways. Textbooks models of real transformers are often quite complex, with many elements. However, when there are more than three or four windings, the models become very cumbersome, increasing in what seems to be a geometric nature as the number of windings increase. So much so that most persons are tempted to never use them, save perhaps for a homework assignment! (Note that many of these models rely on an ideal transformer to achieve isolation, however they do not consider how to do this from a SPICE modeling viewpoint and not pass DC.)

Creating multiwinding transformers with an ideal transformer at their 'core' is much easier, as the lossy, parasitic elements can be added later as needed and as appropriate. The modeling can be done in stages, first with an ideal transformer and later refined.

The next part will describe the process used to build more and more complex transformers using the ideal transformer as a building block. Center tapped windings, multiple outputs will be considered. Subsequently, it will be shown how to add elements to the models created to simulate the effects of losses and undesirable parasitic. The last part will show how to create a transformer (or inductor) which exhibits core losses and hysteresis effects using a much more realizable method than the Giles-Atherson core model.

Other Methods

It should be noted that there IS another reasonable way of creating non-ideal multi-winding lossy transformer and lossy inductor SPICE models. This is by use of the Magnetics Designer ™ program sold by Intusoft. Using a 'fill in the blanks' method one can design a transformer and get a lossy SPICE model for the device as well as construction/specification details using the provided list of core materials. The library can be extended by the addition of new core materials.

If one can afford it this is the best way to get a realistic model of a lossy inductor and/or transformer. (It would be desirable in this case to create new symbols for the lossy transformer model, but this in itself is not a daunting task.) It is recommended even if one uses the method used in this paper for preliminary device modeling, and often in conjunction with it, as a more realistic estimate of a realizable inductance value(s) (for the cores in the provided or user extended magnetic core material data) with construction information for the realization. But because the design is often iterative in nature, it is useful in conjunction WITH the method shown in this paper. Details regarding the software are available at, unless or until it is relocated, but it may be found in that event by going directly to the Intusoft web site and following the Magnetics Designer ™ links.


1.Perfect Transformer vs Ideal Transformer, Spectrum Microsoft newsletter, Spring/Summer 1999.

Magnetics (Part 2) – Creating More Complex Transformer Models

Summary: Part 1 described the perfect and ideal transformer models. This article, Part 2, shows how to create more complex ideal transformer realizations using the ideal transformer primitive. Also discussed are how to add parasitic and other non-ideal elements, including real core elements which provide core loss, magnetization and hysteresis to this model. Part 3 will discuss how to create a lossy inductor model with hysteresis.

Ideal Transformer Model

The ideal transformer model was described previously described as having a symbol as follows.

Figure 1
Ideal Transformer Primitive Symbol

The ideal transformer model, slightly modified, was shown as:

Figure 2
Ideal Transformer Primitive Model

The changes to this model are the inclusion of R1, which allows the secondary winding to essentially 'float' unless grounded. It is assumed that this model has been incorporated into the library as an element, with a symbol associated with it.

Given that, we will first create a subcircuit for the ideal transformer primitive. Again, the turns ratio can be changed when it is used either separately or in building a more complex primitive.

Using the subcircuit just created or hopefully in the library, one can create another slightly more complex ideal transformer with a single input winding and a push-pull output winding by interconnecting two instances of the Figure 2 device as shown in the Figure 3.

Figure 3
Push-pull output single winding input Transformer primitive

If the two output windings were not connected, one would SEEM to have the basis for a transformer with a single input winding and two output windings. This is shown in Figure 4.

Figure 4
Push-pull input two winding output (invalid by itself)

Figure 4 may seem to be a legitimate implementation, but it is not IN ITSELF. The reason being that a current flowing in the U1 half of the circuit will not cause a voltage change in the U2 transformer portion of the implementation. Whenever ideal transformer primitives are combined, there MUST be a winding(s) which is (are) connected in parallel or in series, either on the input or the output side, to 'link' the all of the ideal transformers used in the simplest and most complex transformer primitive parts. A valid connection, to produce a push-pull primary winding and a single output winding would be either to flip the transformer configuration of Figure 3 by 180 degrees (again remembering that the definition of 'n' is inverted), or just reconnect the primitives as shown in Figure 5.

Figure 5
Push-pull input single winding output primitive

Note that because the transformer primitives are ideal devices, there is no real detrimental effect in paralleling windings, except for the very minor effect of the resistors Rp, Rs and R1 in the primitive model. The output windings can be placed in series or in parallel in Figure 5, as in either case the transformers would be properly 'coupled' but the turns ratio with the series output winding would be half that of the implementation with paralleled windings to be identical in effect.

It should be fairly evident from the examples provided that most common transformer topologies can easily be created with a few transformer primitives. Some ingenuity may be required for special cases such as a push-pull combination of two tapped windings, similar to that shown in the as the symbol of Figure 6.

Figure 6
Unusual Transformer topology

There are several ways to realize this configuration. We have previously described how to create a transformer with a push-pull input and a single output winding in Figure 3. Three instances of the circuit of Figure 5 could be used, all paralleled at the input (6-2-7 winding). One instance would provide the secondary output winding 3-5. The other two output windings of the primitives, 1-6 and 7-4 would be connected to the extremities of the push-pull input winding (nodes 6 and 7 of winding 6-2-7).

A third way would be to construct a primitive transformer with a single input winding and two isolated windings, from an arrangement similar to that of Figure 4.

The version of Figure 5 would form windings 6-2-7 and 3-5. One instance of Figure 4 is used, with its input side windings connected in parallel with winding 6-2-7, while the two disconnected secondary side windings would be interconnected with the push-pull primary to form windings 1-6 and 7-4. IN THIS CASE the Figure 4 transformer primitive gets its 'drive' from the first transformer primitive of Figure 5.

Non-ideal model additions

There are several lossy elements that should be added to these ideal transformer primitives to make them representative of real transformers. A search of the internet will reveal many articles that will discuss how to estimate and add lossy elements to an ideal transformer model.

The first is the winding resistance. A resistance should be added to each output winding, at each terminal of the transformer primitive representing the winding resistance. One could make this resistance a function of frequency; however that is a topic in itself. Also in series with this resistance is a leakage inductance. In many cases this is small, but it can be extremely important. Between each winding and the others a leakage resistance can also be added.

Capacitances representing the effects of the turn-to-turn capacitance of each winding may be added. To model these well one might wish to do this in a transmission line manner, assuming that one is masochistic. Additionally, winding-to-winding capacitances may be added.

For most cases, simple capacitors, resistors and (leakage) inductances will sufficiently model a transformer with the inclusion of one more element, namely a core. This can often be the REAL problem in transformer modeling.

Other than where they are pre-determined, most SPICE lossy core models that incorporate hysteresis and eddy current effects are simply of no use to users. The problem is that the required parameters are difficult if not impossible to get from core manufacturers. Moreover, the units of the parameters used to create these are not familiar to the majority of engineers who would like to use these models. A means of creating core models using parameters meaningful to engineers that one can get from manufacturers data sheets will be discussed in the next part of this discussion. For the remainder of this discussion it is assumed that such a core model of some type exists and is available.

Although there is no magnetic flux coupling in these ideal transformers, in order to produce voltages properly at all the windings one must ensure that somewhere there is a coupling between the primitive models of the realization. Specifically, both halves of a push-pull transformer must be 'coupled' such when one side is driven the effects are seen on the other winding half and on all other windings. This is accomplished by paralleling primitives at the input or output such that every ideal transformer primitive and its own constituent primitives, is 'coupled' to every other winding.

With a single driven transformer winding, a core model can be connected directly across the input winding. Where there is a push-pull primary, where is the magnetic core connected? It cannot be connected across just one of the input winding halves. The core must be driven by both halves of the input winding to cause to flux to change appropriately due to both halves of the input winding.

One way to do this is to add a transformer primitive to the model with a push-pull input winding, with a push-pull winding paralleled with the input winding, and a single isolated output winding (as in Figure 5) which has as its sole load the core model. (No other lossy elements would be applied to this output winding.) This will cause the current in the core element to be driven by the push-pull input winding in the same manner as a real core would be in a real transformer. In this event, the turns ratio would most conveniently be unity from each half of the input winding to the core 'load' output, with the core modeled and sized for the appropriate number of primary turns and hence resultant flux in the core material.

Transformer model testing

If you remember your magnetics courses, the core model represents the magnetizing inductance of the final, 'real' transformer model. If the core model exhibits losses and hysteresis the realization will also. Once the transformer primitive construction is completed, it should be 'tested', before adding second order effects. While a trivial exercise, this will verify that the 'sense' and turns ratios of the windings are as desired. Then, an ideal inductance might be added to the transformer. Using a square wave drive (with the DC component removed), and minimal output resistance loading (large values of load resistance) one should see a ramp of current during each half cycle with a pure inductor added to the ideal transformer realization. For the simplest transformer, a single input and output transformer, this can be as shown using the circuit of Figure 7.

Figure 7
Ideal transistor primitive test circuit

In this test circuit inductor L1 is added to show the effects of the magnetization inductance. Note that, lacking more realistic values of R2 and Rs, which can simulate winding resistances, as well as inductors in series with those resistances to simulate leakage inductances, the test circuit will show the effects of the magnetization inductance mainly in the current through the V1 source. Note that to speed up the steady state output simulation with a square wave drive, even with the source V1 offset, it may be convenient to set the initial current in L1 to at or near the level where it would be, at the end of the transient condition, to the starting value at the positive going input transition. This can be estimated from Lenz's law, solving for the current resulting from a DC excitation for a time equal to one half of the (assumed) square wave drive period.

With an essentially perfect magnetization inductance, and little resistive loading, the current will be a sawtooth in shape at steady state. As the transformer is loaded with increasingly larger resistive loads, a square wave of current will be added to the ramp in each half cycle.

A more realistic test circuit, which incorporates these elements, can be created as shown in Figure 8. In to simplify the circuit representation a symbol (Figure 1) is used to represent the transformer topology of Figure 2.

Figure 8
More detailed lossy Model

In this representation the winding resistances are shown as RWx, leakage inductances as LLx, inter winding capacitance as CWWxy, and distributed winding turn to turn capacitances as the combination of CWx and RDCx. A winding-to-winding resistance could also be added. Several different models with different topologies and combinations of elements of varying complexity can be found in the literature. The biggest problem is not in the model, but in finding suitable values

The general topology of Figure 8 should be very familiar. It is the familiar 'T' transformer model. Numerous variations of this model exist. There are certain basic model rules that should be observed. If LM were to be connected to the output winding, its impedance would have to be changed in size by 1/n^2 to have the same effect. And, if connected to a single winding that is used for an output, it must be connected directly across that winding before the parasitic elements. Transforming it to any single winding would leave the effect unchanged at the driven side, were it properly transformed.

When a core model is used for Lm, they are generally specified on the basis of turns, explicitly or implicitly, among other factors. If the proper turns are specified for the winding where the core is placed, the inductance will be correct. It is inherently assumed that core magnetization and saturation (if it occurs) will be similar for all windings. This need not and may not be the case, but in most instances this is probably not worth worrying about.

Unlike the magnetization inductance, for a multiple winding transformer each winding must have its own leakage inductance. This occurs both physically due to winding differences in materials, layering and other effects creating different values, but because their effect is dependent on the loading of their specific winding.

As an aside, the Intusoft Magnetics Designer ™ program was mentioned in part 1 of this article as being able to product a SPICE model. For illustrative purposes, a transformer with 4:1 turns ratio will be modeled. The excitation will be AC. Other details are somewhat unimportant; again the realization topology is of most interest. The resultant spice netlist produced is as follows:

*SRC=Untitled;Untitled;Transformers;;TDK, UU17
.SUBCKT Untitled 1 2 3 4
*TDK, UU/UI Ferrite (TDK), PC30-HF-100C, UU17
** ** ** **
Rdc1 N41 N61 34.57m
Lmag N41 2 1.171m
Rcore N41 2 4.247k
Rac1 N61 1 0.2951
Lac1 N61 1 313.6n
** ** ** **
L12 N41 in2 1.112u
C1_2 in2 2 15.67p
C2_23 2 4 108.8p
C3_23 2 N42 -69.23p
Efwd2 N82 4 in2 2 0.2500
Vsens2 N82 N42
Ffbk2 in2 2 Vsens2 0.2500
Rdc2 N42 N62 1.321m
Rac2 N62 3 21.87m
Lac2 N62 3 23.29n

The Magnetics Designer ™ realization uses 15 elements, including the E and F generators. What is interesting is that a negative capacitance value is used in the realization. The transformer has a 4:1 turn ratio, and is designed to operate at 100kc with a square wave input.

As in any model, one can include increasingly more and more elements to model second order effects better. However, one must trade off model complexity with simulation time, as well as the effect of the parasitic elements on the final design realization. Where the first order effects are not well defined, it makes little sense to use precision second order effects in many cases.

An aside

It is possible to create a transformer using just capacitors in a 'T' realization as the perfect transformer primitive. This would create an AC transformer, even when used with an ideal transformer. The problem would then be how to add the core model to this realization. It is believed that forming a Cm element by gyrating the core model into a capacitor could do this. The leakage inductances that are usually added by using ideal elements could be transformed directly into equivalent capacitances. This has not been done by me yet, and would be an interesting project to investigate.

Magnetics (Part 3) – The Core Model

Summary: Part 1 and Part 2 described the perfect and ideal transformer models, and how to add lossy elements to transformer models created with ideal transformer primitives. This part discusses the methods that can be used to create core elements which can include core loss, magnetization and hysteresis in these models.

Creating Core Models:

SPICE is NOT a design tool, but rather an analysis tool. While it may be true that an overall simulation can reveal performance information which can be used to modify some model parameters, as an example in the feedback compensation of a switching mode power supply, its primary use is to validate an existing design.

It is assumed herein that one knows what primary inductance one needs, what the approximate voltage and current levels are, the frequency (s) of operation, the modes of operation (continuous/discontinuous, and the overall network topology. These and other considerations will drive the core selection process. It is assumed one has selected an appropriate core material and core topology for the intended final design.

Searching the net, one finds there are about six methods to arrive at core models. The first way is to find a core suitably characterized already that one could use immediately. Generally this is rather unlikely to occur. This will not characterize parasitic elements such as winding resistances, stray capacitances and leakage inductances, but it may include hysteresis and eddy current effects.

The second way is to create your own core model using the Jiles Atherson method.

The third method is to hire a shop to arrive at an inductor/transformer model for you. The model itself has to be tailored to the specific version of SPICE one is using, as extensions and additions in one version of SPICE may not be present in the others. Most commonly the models may be tailored to one of the more popular SPICE products, containing non-standard extensions/features from time to time. However, unless they create a model geared to a specific production method of the transformer as part of their effort (using method 5 or some alternate which will estimate them), the problem of parasitics remains.

The fourth way is to empirically measure the characteristics of an existing transformer or inductor, and use that that as a basis for a core/transformer model. This is not a bad method, however as magnetic materials can vary widely in many parameters, several devices may be required for test to ensure that the sample is not at one extreme or the other.

The fifth method is to use software that will enable you to create core models including in some cases construction details of the finished inductor/transformer. This can be quite good IF the core library supports the selected core material and mechanical configuration, and the mechanical configuration is properly optimized. These methods do not in general include hysteresis and eddy current effects.

The sixth way is to use vendor data, entered into a specialized SPICE subcircuit model of a core. Again, the parasitics remain a problem but the hysteresis and eddy current effects may be modeled.

Methods one and two are often fruitless. The third method will work, but one must find the right shop, and the cost can be prohibitive. Method four can be done by you or by an outside shop, but methods three and four often presume the existence of a working finished transformer/inductor to characterize. This is due to construction methods of the physical end product affecting the model.

Method five will work, and is often the best choice. These products do not produce models exhibiting hysteresis in general. Still, the BEST model is the simplest one that works. This paper will discuss the sixth method, namely behavioral modeling of a core.

Behavioral modeling of a core (or any other device) consists of the arrangement of devices connected to provide, at the external terminals, a model that behaves like the 'real' device, although the internal device configuration may be very dissimilar to that of the 'real' device. This is commonly done with such devices as opamps. This still leaves such questions as leakage inductance and other construction related parameters open,

However, in accordance with the maxim that one should ALWAYS use the simplest model which provides suitable simulation results, progressing to more complex models only when required, one can add these missing elements later as required. One may always use this model when simulations are complete, as a basis for a design in method 5, or in conjunction with it.

Refer to Reference 1. In this interesting paper, which appears in many places on the WEB, both as shown and as a reference, a behavioral model of a magnetic core is presented. This is shown in Figure 1. This basic circuit can be modified slightly to account for the low frequency loss effects of a core, as contained in Reference 2, which presents the same model with some modifications. Reference 2, the Magnetics Designers Handbook, is available for free download from Intusoft at their website. This is a MUST item to acquire and read.

There are other behavioral models that can be used to model a core. In most cases hysteresis does not need to be included and is not. Indeed, this is an effect to be avoided in the transformer design in many if not most cases, as an undesirable second order effect.

The specific model, as described in Reference 1, is shown in Figure 1.

Figure 1
Saturable Core Model

The netlist for this model can be found in the reference. As this is not in B2 SPICE format, it is easily conformable. Before doing this, it might be well to examine the model a bit, although it is covered in the reference materials. The 'G' element integrates the core voltage and produces a voltage across capacitor CB proportional to the core flux. The 'E' element applies this voltage (flux) to shaping elements. VM measures this current.

RB represents the magnetic impedance, with the VP, VN, D1 and D2 elements representing saturation effects as the voltage (flux) levels increase, decreasing the impedance seen by the 'E1' source. The current sensed through VM is an input to the 'F' element that is fed back to the input terminals creating an incremental inductance value at the 'core' model input. (Note: Reference 2 shows how to create low frequency loss effects in the equivalent core, and they will be included, with the correction of one slight error.)

An equivalent B2 SPICE realization of this circuit with some modifications is shown in Figure 2.

Figure 2
B2 SPICE core model

The terminals of this equivalent inductor are N2 and N1. An auxiliary output 'Flux' representing the core flux, the voltage across capacitor C1, is provided. This is in this realization 'buffered' by E2, with resistor 'Rx' providing a return path. There is no compelling reason NOT to ground the internal circuitry save for the input terminals, as the input terminals, when the circuit is imbedded in a larger circuit, will find a ground path, and neither input need be connected directly to ground. Resistor 'R3' is provided to ease simulations in the same manner as is 'Rx', both being arbitrarily large.

Some other changes were made in the model, one being that the passed parameters were modified to make the turns a subcircuit parameter. In general this is not a major change, but it enables the basic core turns to be modified easily without recalculating several subcircuit input parameters.

These changes are subjective, and the original definitions may be retained if desired. The following are the parameters to be passed, their units and definitions:

SVSEC = BSAT * AE Core capacity, in Volt-seconds/turn
IVSEC = B * Ae Initial condition, in Volt-seconds/turn
LMAG = (µ0 * µr * AE)/LM Magnetizing Inductance, in Henries/turn2
LSAT = (µ0 * AE)/LM Saturation Inductance, in Henries/turn2
IHYST = H0 * LM Magnetizing current at zero flux, in Amperes/turn
N = turns
FEDDY = Frequency where the permeability vs frequency is 3 dB down, in Hz.

Where: BM is the maximum flux density in Gauss
H0 is the magnetic field strength in Oersteds
AE is the effective area of the core in cm2
LM is the effective magnetic path length in cm

There may be occasion to use the following conversions, among others, when using manufacturer's data sheets.

It is assumed that most if not all of the above can be determined from manufacturer's data sheets. It might be useful to create a parameterized subcircuit model in which ALL of the data is passed for the maximum flexibility. This is a matter of preference. Some calculations may be required to prepare the inputs, however it would seem the terms are most meaningful to engineers as shown. A netlist for this parameterized subcircuit (assumed to be created) is as follows:

* B2 Spice Subcircuit
* Pin # Pin Name
* N2 N2
* N1 N1
* Flux Flux
.Subckt test N2 N1 Flux
***** main circuit
G1 0 N3 N2 N1 1
E1 11 0 N3 0 1
F1 N2 N1 VM 1
E2 Flux 0 N3 0 1
C1 N3 0 {SVSEC*N/250} ic = {IVSEC/SVSEC*250}
VM 11 12 0
RB 12 0 {LMAG*N*250/SVSEC}
RS 12 23 {LSAT*250*N/SVSEC}
I1 N2 8 DC {IHYST/N}
I2 N1 8 DC {IHYST/N}
DS2 22 23 DCLAMP
R3 N3 0 1e9
VS2 22 0 DC 250
Rx Flux 0 1e9
VS1 4 0 DC 250
.model DHYST D is = 2.55e-9 rs = 0.042 n = 1.75 tt = 5.76e-6 cjo = 1.85e-11 vj = 0.75
+ m = 0.333 bv = 1000 ibv = 9.86e-5
.model DCLAMP D is = 2.55e-9 rs = 0.042 n = 1.75 tt = 5.76e-6 cjo = {3*SVSEC/(6.28*FEDDY**500*LMAG*N)} vj = 25
+ m = 0.333 bv = 1000 ibv = 9.86e-5
***** process models
.model dclamp D

The problem now is to obtain the required values. Examination of a core material data will provide this, with most of the data coming from a material B-H curve. This is done in the following manner, using an example B-H curve. Refer to Figure 3 following:

Figure 3
Tape wound core material typical hysteresis loop

Figure 3 came from Magnetics Incorporated, in this case being specific to a Square Permalloy tape. Refer to Reference 3, and be sure to look at many of the helpful articles Magnetics Incorporated provides. Typical brochures for their cores will show a B-H loop such as this, where hysteresis is a major contributor to core losses and/or a necessary design consideration. Other manufacturers will do likewise.

In this case, using the Figure 3 curve as a representative sample, several core elements may be determined. Assuming our frequency is 6kHz, corresponding to the dashed curve, the BM and BR points on the curve correspond the BM and B values in the equations for SVSEC and IVSEC respectively. For square loop cores the manufacturer will usually provide a value or a range for BM as well.

In this event, use the mean value. If this is done, then one can arrive at a value of (µ0 * µr) using the curve and the relation that:

(µ0 * µr) = B/H

Alternately, one can choose a point on the midrange value of BM from the curve, use the corresponding H value, and arrive at the permeability value if it is not specified. Also,

(µ0 * µr) = ?B/?H

So one may use an average value from selected points. Or, the manufacturer may provide a µ vs H curve(s) from which the values can be determined. If the manufacturer provides an 'AL' value, inductance per thousand turns, this may be used with the turns to compute LMAG. Knowing the permeability over this range from the B-H curve or however, with AE and LM known or to be determined, one can find the 'missing' parameters.

AE and LM are usually specified, but they can be estimated if not. AE is usually the hardest to estimate; especially when a core has a single air gap, as flux fringing effects will modify the physical gap area. Usually in a toroidal core with a distributed air gap (powdered core material) a value for the AE is given. ML is often given as well, but it is usually close to the mean circumference of the core magnetic element in a toroidal core. It the coil is NOT a toroid, the manufacturer will usually provide a value or a formula which can be used to determine this. The manufacturer can assist you with these values if they are not shown the data sheet. Now we have enough information to determine LMAG. LSAT can be determined in a similar manner, and it will be essentially that of an air-core inductor.

H0 may be found as the x-axis value of the dashed curve when the flux is zero.

The hardest parameter to find is usually FEDDY. If one is fortunate, one can find a curve of permeability vs frequency for the core material and select the 3dB down frequency. Usually this is provided for ferrite cores, or where the core is essentially linear. I could not find a value for FEDDY readily available for the specific tape core material

Recognizing that FEDDY is an input parameter, and that one can construct a test circuit to 'tweak' the parameters to fit the B-H curve properly to the manufacturers curves, an estimate may be found from curves of core loss versus frequency. Select a value of frequency where the core will be operating. A lower value is more conservative.

It should be noted that if one does not have a bipolar drive across the core model, and where the core is reset as in a flyback transformer mode, the core flux will describe a 'minor loop' wherein the 'working' B-H full loop is not traversed. These details are out of scope here, but the model will nonetheless work, although the Flux output may seem unusual at first glance. Figure 3 of reference 4 shows this effect. It is expected this will be different for non tape-wound-cores, and will differ where there are significant material differences.

XMag2 empirical Core Modeling:

The basic core model of Figure 2 is also capable of being modified slightly to account for changes in core permeability using empirical equations. Figure 3 of reference 2 provides a schematic and a netlist for such a circuit, which unfortunately do not agree with each other.

References 5 and 6 discuss this model also, and the model of Reference 5 was chosen to be generated in B2 SPICE format for this circuit, resolving the documentation problems. This is shown in Figure 4:

Figure 4
XMag2 model

This circuit is very similar to that of Figure 2, and it is drawn in a manner to show the similarities. This circuit is best suited for cores with little hysteresis. The model used user defined equations as shown in the following netlist. Because of the user defined equations, it is best NOT to convert this into a subcircuit until it has been tested and verified. Then, it will represent a specific core model ('N' will be a parameter to be passed, along with IC) or if a specific coil is described, 'N' will be imbedded in the model and only 'IC; will remain as a parameter to be passed.

The model as shown does not have a 'flux' output, as does that of Figure 3. It can be provided as a source replacing B4, or as an additional VCVS generator E1 with controlling input nodes of N8 to N2. I would prefer a flux output myself, but it is a matter of preference. In any event, the netlist for the model as shown follows:

* B2 Spice
* B2 Spice default format (same as Berkeley Spice 3F format)
***** main circuit
RDCR N1 N4 resistor {RDCR/N} ; winding resistance per turn
G1 N2 N8 N7 N2 1
G2 N4 N3 N8 N2 1
C1 N8 N9 {( N^2)*AL*10^-9} IC={IC}
R2 N9 N2 {1/(2*PI*FEDDY*N^2)*AL*10^-6}
VAm1 N3 N2 0
B1 N5 N2 V=ABS(1.256*{N}*I(VAm1)/Lm
B2 N6 N2 V={USER EQ #1} ; %Permeability as function of H
B3 N7 N2 V=V(1,2)/(V(N6,N2) + 0.2)
B4 N10 0 V=V(N6, N2)*{AL}*10^-6 ; Inductance in UNITS OF AL
.model resistor r res = 1

More details can be found in Reference 5. It also provides a test circuit and values for testing the model. However, an application of the model in Figure 2 is present in Reference 6 provides details of a simulation of an actual core which may be used to validate the Figure 3 model. Note that is some implementations that R2 is shown in parallel with C1, and in other cases it is in series with it.

In this case, Reference 5 provides the following parameters to be passed to the XMag2 model of Figure 4, to simulate a Kool Mu 77140 core. Specifically,

RDCR = .01
AL = 26 mH
Lm = 0.817
FEDDY = 7.07E6
µ = 125
N = 20

The test circuit becomes as shown in Figure 5:

Figure 5
XMag2 Test circuit


The netlist for Figure 5 is:

Xmag2 test circuit.ckt
* B2 Spice
* B2 Spice default format (same as Berkeley Spice 3F format)
***** main circuit
G1 0 N8 N7 N2 1
B4 0 N4 v=v(n6,n2)*625*26*10^-6
G2 N1 N3 N8 N2 1
C1 N8 9 10.4u
R2 0 9 21.646m
B1 N5 0 v=abs(1.256*20*I(V1)/.817)
B2 N6 0 v=(0.96402*exp(-125*v(n5,n2)*.0001659))-(-0.893*exp(-125*v(n5,n2)*.00004708))
B3 N7 0 v=v(n1,n3)/(v(n6,n2)+.02)
R3 13 N1 .1
V2 13 0 DC 1 PULSE( -10 10 0 1n 1n .005m .01m)
V1 N3 0 DC 0
.OPTIONS gmin = 1E-12 reltol = 1E-4 itl1 = 500 itl4 = 500
+ rshunt = 1G
.TRAN 10u 1m 0 1u uic

In using the test circuit, it should be noted that if the inductor is driven into saturation in the first half cycle, or close thereto, then the operation on the coil B-H loop will 'walk' up the B-H loop to the point where a net DC current will be drawn from the input source. As the core becomes lossier, the effect will be minimized. It is interesting to adjust the parameters of the core model to see the effects of the various parameters.

Practically, the only way to really test the coil is to imbed it within a circuit whose input stimulus to the coil is dynamically adjusted by the circuit to produce no net-DC to the coil, or to 'ramp up' the coil stimulus, or to provide an initial condition for capacitor 'C1' such that the operation is centered about the origin.

One way would be to use the core model in a Royer saturating core circuit model. Another would be to use the core with an ideal transformer in a 'flyback' configuration where the stored energy in the core was allowed to totally reset the core each cycle. Either of these is out of scope for this paper, however the references should provide information to do this if it is desired. Still, in any real core, walking up the B-H loop will occur to some extent although it will be small if saturation is never reached.

I have never had the need to model a saturating transformer circuit using SPICE. But, if it is desired, it can be done using B2 Spice or indeed any version of SPICE that one has using one of the two models shown herein, and the ideal transformer models previously created.


One item should be noted. It is assumed that the transformer coupling from any single winding to any other is independent of which winding is being driven. In the case of a transformer such as a toroid, or a cup-core or E-I core where all the windings are on a single bobbin this will be true. However, were one to wind a transformer on an E-I core with a normally primary winding on the center leg, and two output windings, each on an outer leg of the 'E', then the effects of either of the output windings on the other would NOT be as expected. This can be seen by drawing the flux produced by the center leg core and its relation to the outer cores, and then the flux of either outer winding and the resultant flux in the remaining windings. Fortunately this construction is seldom done now.


1. Article Title: "SPICE Models For Power Electronics"
Author: L.G. Meares and Charles E. Hymowitz

2. Intusoft Power Specialist's App Notebook.

3. TWC-S2, How to Select the Proper Core for Saturating Transformers, Magnetics Inc.

4. TWC-600, Tape Wound Cores Design Manual.
Magnetics Incorporated

5. Non-linear Saturable Kool Mu Core Model
Scott Frankel, Analytic Engineering

6. PCB Café book exerpt
SMPS Simulation with SPICE3
Stephen M. Sandler

Magnetics (Part 4) - Core/Transformer Conversation

Summary: Part 3 described a method of modeling a core. In another article, hopefully to be posted before this one, is a means of creating a simple, lossless, nonlinear core model. This article is intended to discuss some core considerations and misconceptions regarding cores. It does not pretend to be exhaustive or even rigorous, but nonetheless to illustrate some important points in a discussion format. I am, of course, playing the 'expert' while my friend, the questioner, is speaking in italics.

Air gaps:

So as I was saying before coffee break, one can learn a lot from a B-H curve of an inductor or from a core model, or its material. Here is one.

Figure 1
Tape wound core material typical hysteresis loop

To a greater or lesser extent, all useful core materials display a curve somewhat similar to this (Figure 1). The curves often have less loss and are narrower. Often they saturate less abruptly, and are more 'S' shaped. This curve is for a tape wound core and is effectively 'gapless', as the core material is a continuous strip of a specially prepared magnetic material.

When this core, or any core material is driven deep into the saturation region, E.G., the 'flat' upper and lower portions of the curve, the incremental inductance approaches that of an air core inductor. Essentially all of the magnetic domains present in the material have been aligned with the magnetic field.

About the origin, in the somewhat steep and linear regions of the curve, there are large numbers of unaligned magnetic domains at any point, and an increase in H will cause a correspondingly linear increase in the number of aligned magnetic domains.

Between these two regions is a transition region. In this portion of the curve, which can be relatively large dependent on the material, the number of unaligned magnetic regions is becoming smaller, and the B-H curve flattens. This region, dependent on the core material, can be rather small or even quite large.

Let me sketch a lossless B-H curve. ..

Figure 2
Typcial Lossless Core

This drawing (in Figure 2) shows a curve of a hypothetical lossless, saturating core. Such a B-H loop approximates the midpoints of a curve for a material such as a ferrite, which can have a 'skinny' B-H loop, representing little core loss. The 'flat' top portion can represent an extended transition region, or an air-core, fully saturated region of operation, again dependent on the material. Some powdered toroid cores already have an inherent air gap distributed throughout the core, in between the many grains of material that constitute the core material. Generally such powdered cores cannot be easily modified, nor is there often a need to do so.

We are often interested in curves of un-gapped material B-H curves. Un-gapped material B-H curves are often provided for materials and core construction types where the air gap can be customer specified to the manufacturer during the ordering process, or the customer can if desired create their own air gap.

The specific cores can be of many different configurations. They could be E-I cores, where the windings are placed on bobbins, placed over the center post of the E shaped block of material, and then the magnetic core 'I' block affixed to the 'E' block which has the bobbin placed on it. They could be pot cores, in which the 'E' cross section can be thought of as being rotated through 180 degrees to form a solid 'cup' with a center post. The mating 'I' section can itself be thought of as a rotated block, or another 'E' section can be mated with the first section. One or two 'slots' are provided to bring winding ends out of the enclosure. The particular configuration is of no great concern for us at this time other than to observe that, because of mating surface irregularities, some inherent air-gap will always be present.

In the B-H curve, B is proportional to voltage, and H is proportional to current. So, to get a B-H curve of a core model, all one has to do is to plot the current through the device on the x-axis, and the voltage across the device on the y - axis, right?
Well, you are close. B is proportional to the integral of voltage across an unloaded inductance model, and H is proportional to the current through the device.

e = n * (dphi/dt)

Come to think of it, B = (µ0 * µr) * H, and H is proportional to current, so why is not B proportional to current? Well, it is a function of current, so in a linear core or in that region where the core is linear, then it is related by a constant. But of course this is a straight line and is not very interesting. In the region where the core material is nonlinear, then the core effective permeability is a function of current but not a linear one. So yes, B is in general a nonlinear function of current, but at least for me and most persons it is clearer to describe it as being proportional to the integral of the voltage across the device.

So for a transformer model, represented by a nonlinear core in parallel with the primary winding of a transformer (which may be constructed with several ideal transformers), all you have to do is to measure the integral of the voltage across the primary, and plot this against the current through the primary to get a B-H shaped curve?
That depends on what you mean by primary current. If you mean the current through the effective primary winding, which means the core model and the perfect transformer primary winding, the transformer must be unloaded, as the secondary(s) load(s) are reflected back to the primary, and appear in parallel with the core currents. Otherwise you must measure the current directly through the core model to eliminate the reflected load currents. The curve will then have the shape of a B-H curve, but to be exact some constants must modify the voltage to produce B and the current to produce H values. Bear in mind that manufacturer's B-H curves are usually provided on the basis of one turn.

Changing the subject. air gaps are of course bad ….. or are they? Why would we want to buy a high permeability core, and then add an air gap?
In general, air gaps can be very useful and desirable. Look at the B-H loop I sketched before (Figure 2). Curve 1 represents a hypothetical B-H curve for an ungapped ferrite core. Its relative permeability in the unsaturated region is rather large. Curve 2 represents the same core material, but with an air gap. We know that

B = (µ0 * µr) * H

Looking at the two curves, the maximum flux density value at the onset of saturation is unchanged. However, for the gapped core in curve 2, at what was the original saturation magnetic field intensity value of H for curve 1, the corresponding flux density is noticeably lower. The gapped core is somewhat removed from saturation for this same value of H. In fact, the new value of magnetic field intensity H required to saturate the magnetic core material of curve 2 has greatly increased.

The corresponding effective permeability of the device in curve 2 has decreased. At the same time, its inductance in the linear region has also decreased. What has happened?
Without going into too many details, the reluctance, or resistance to the magnetomotive force or 'H' has increased. Using the reluctance model, the magnetic path the flux flows through presents a 'resistance' that is inversely proportional to the permeability. However, in the air gap the flux encounters in a serial manner a very low permeability air gap, which has a high 'resistance'. And just as resistances in a series DC circuit, the reluctances in a serial magnetic path add. The air gap has a much higher reluctance than that of the magnetic material, so the reluctance of the air gap predominates. Flux is proportional to the magnetomotive force divided by the reluctance. The flux density decreases for the same stimulus, and does the effective permeability. Inductance is a function of permeability so it decreases also.

This is bad news, right?
Not really. For one thing, the allowable current which the inductor will pass without saturating the device is greatly increased. But its inductance has at the same time decreased, L being a function of permeability.

So there is no net gain, right?
Wrong. There is often a very decided advantage. And that is in the energy storage capability of the inductor. The energy stored in an inductor is ½ LI2. So while the inductance has decreased, the maximum current it can pass without saturating the core has increased, and the energy storage capacity has increased by the square of the current. Also, the number of turns required to gain a given inductance has increased. With a small number of turns getting the desired inductance, or transformation ratio for a transformer may be difficult.

Now the energy stored in the gapped inductor is really stored in the air gap, but this is of little concern. Energy storage is of particular importance in flyback transformer operation.

Well wait a doggone moment!!! If energy is stored in an air gap, why not just eliminate the core altogether and be done with it?
Good question. Here is what is hoped is a good answer. First, the magnetic material guides the path of the magnetic flux, and prevents this flux largely from coupling with other conductors and inducing currents in those devices. But second and more importantly, consider a fairly typical inductance of perhaps 100, or even 10 mH. How many turns of wire do you suppose are required to get an air core inductance of this value? Now how much wire resistance would there be? The answers are lots, and lots.

Okay, but I am not building a flyback transformer, one where energy is stored in the inductor during a 'charge' cycle, but I am using one where energy is being transferred by means of transformer action. In this case, where the inductor (core) is effectively in parallel with the primary winding of an ideal transformer, the transformed load(s) is(are) effectively in parallel with this magnetizing inductance (of the primary winding). So why use a gapped core here?
Another good question. This is more complex. The magnetizing inductance does indeed appear in parallel with the transformed load impedance(s). In general one would desire the largest primary or magnetizing inductance possible. If one were driving the transformer with an AC waveform, it would be essentially as you say.

I am driving a transformer primary with a unipolar drive waveform. One end of the primary is connected to +30V. The other end is be periodically switched to ground, and then opened . The switch has a 50% duty cycle. That would present an average 15V DC to the primary winding!!!! Why does the transformer not saturate with a net DC voltage across the primary?
Glad you mentioned that. You see, the transformer primary does NOT see a net DC applied to it. It would seem so, but that is not the case. When the switch opens, the voltage across the primary will reverse. Remember the switch opens and closes, and while it is open or off, its impedance is very large.

In this case the transformer will, if all goes well, operate on a minor loop. Using the hypothetical device of Figure 2, one can envision a 'DC' operating point perhaps half way between the origin and the core saturation point. When the switch is 'ON', the primary voltage is 30V and the operating point 'walks' up the curve to the saturation point. When the switch is off, the load voltage reverses, and hopefully the load removes the energy stored in the core and returns the operating point to the origin in this example, or in general to as far below the operating point as the on switch cycle moved it above the operating point. Typically one would wish to stay well away from the saturation point, however. What a gapped core does in this case, is both confine the magnetic field AND provide a wider range of allowable operating points for variable loads, input voltage variations and other circuit parameters which change over time, temperature and so on.

Actually, this situation is not that much different than that of a filter inductor at the output of a switching regulator, that is continuously conducting. The inductor is charged during a switch on time, and the current increases. The switch is opened, and the inductor current still supplies the load through another switch of diode, but the voltage across the inductor reverses. The inductor current decays. The inductor does pass a net DC current, but it does not see a net DC voltage across itself.

In the transformer situation, the primary voltage will indeed reverse, just as in the case of the inductor. But in this case one has to rely on the secondary loading to 'reset' the magnetics. (Now of course the leakage inductance present at the primary will also store energy, and it in general is desirable to provide a 'snubber' circuit to remove this energy and prevent dangerous spikes from occurring when the switching device turns off. There are ways to recover much of the stored energy, but this is too complex to go into during this break.)

Well, gapped core or not, it is always best to have some core then, to confine the magnetic field and minimize the leakage inductance, correct?
Well, you are right on the first part. Amazingly and counter-intuitively, the leakage inductance is pretty much independent of the core material, and hence it is essentially a constant for a given inductor/transformer topology and winding physical arrangement. This has been shown several times in the literature. Magnetics Incorporated in one of their application notes provides an emperical formula for determining leakage inductance for specific toroid cores which is independent of the core material, being a function of how the winding is distributed and its dimensions. It is not very exact, as varying winding methods can cause it to vary by 50% or more, but the important point is that it is independent of the core material. Hence it is unchanged whether the core is saturated or not.

There is something I am confused about. You mentioned a 'minor loop'. But the B-H curve shows no such thing. How can this occur?
A typical B-H curve is of course the result of specific currents or voltages applied to a core which has no DC component. The curve is the response of the 'inductor' in response to those specific stimuli, in accordance to the defining equations or characteristics of the core material. When DC is present, the trajectory, or the path in which the B-H values of the device will trace in accordance with the AC variations, will be about a DC operating point, in accordance with the defining equations of the device. As a first approximation it will be an 'S' shaped curve about the DC value of H. but it can vary quite a bit in shape dependent on where the DC component places the operating point.

So a air-gap is useful then?
It can be. The shape of the air-gap can be important as well. Some devices are built with a 'stepped air-gap'. This causes the magnetic field in the vicinity of the gap to concentrate near the narrower portion of the gap (which has a lower reluctance). This portion of the device will saturate before that near the longer gap. The device will exhibit an initial higher inductance until a portion of the material saturates, when the device will exhibit a 'step' to a lower value. Thus for low values of DC excitation the device will exhibit an inductance higher than for larger values of DC, creating what is called a 'swinging choke', useful in some filter applications. One can use a 'wedge' shaped air gap to create a more smoothly varying inductance with DC excitation. But of course these changes will also occur with instantaneous excitation as well.

Why is there a gap or 'hole' in the middle of a typical B-H curve? What causes this?
The specific cause of the 'middle' portion of the curve can be complex. It represents a loss component, however. Most magnetic materials will retain some magnetization after being 'magnetized' and the excitation is removed. There will be some residual flux present. This must be overcome to return to a benign, zero flux state.

So a 'fat' curve is bad?
Often this is the case, however to get a very sharply saturating transition, one has to either have a core which has a large remnant magnetization, resulting in a 'square' loop, or one has to operate the device over a very large range of H to see this behavior. Abrupt changes are often useful in certain applications.

Lemme ask you something. I have had problems in some of my transformers matching the core losses to the winding losses. The core loss varies with frequency, while the winding losses vary dependent on wire diameter and also frequency, due to skin effects. What is the best way to do this?
A design rule often stated is that the copper losses should equal the core losses. This rule was derived for low frequency AC power transformers. It has NO bearing on the design of modern electronic transformers.

Why is this?
For one thing, anything that would add heat to a transformer is to be avoided. Thus one tends to use the maximum (manufacturable) winding wire sizes and types one can to minimize heating. One usually minimizes core losses for the same reason. .

Okay then, I guess I can buy that. But one thing has always bothered me. For maximum power transfer, the load impedance should be equal to the source impedance. How do you match the output loading on a transformer to the winding resistance, leakage inductance and transformed source impedances to the secondary side to get the maximum power transfer?
Well, the problem is you are incorrectly stating the requirement. For a given source with a given source impedance, for maximum power transfer the load impedance should equal the source impedance. But with a given load impedance, the maximum power transfer occurs when the source impedance is zero. All of the power is present at the load under those conditions. We generally wish to have the lowest possible source impedance, which means holding the winding resistances, leakage inductances and all other impedances which could appear in series with the load to as small values as is possible.

To change the subject, I have several coupled inductor transformer models. How can I add leakage inductance to them?
I hesitate to tell you, but leakage inductance is already present in those models IF the coefficient of coupling is less than unity. One can transform this model into a 'T' model and see this. However this model assumes that the equivalent secondary leakage inductance, transformed to the primary, is equal to the primary leakage inductance, which often is not the case. It may or may not be a good approximation for any specific transformer, depending on how the windings are constructed. As one example, a 1:1 transformer, with the primary winding and secondary windings wound 'two in hand' would have very similar leakage inductances. Other configurations in general would not.

I guess you are telling me that all of many of the things I learned in school about magnetics were wrong?
No, I am saying some of the things you thought you learned in school are wrong.

I have a few questions though, that I would like to ask Namely, ….
Forgive me for interrupting, but the coffee break has been over for a few moments. I need to get back to work, and I am sure you do too. The boss is sorta grumpy over long breaks, and I am getting paid by the hour, working on a contract basis.

I will mention to the boss we were working during the break if he grumbles. Can we do this again sometime?
Well perhaps. Let me write a little blurb about what we discussed and perhaps some other topics in my off time and send it to you. Perhaps some others might wish to read it, so if you wish you can share it with them.

Thanks. I need to go to the floor so I will see you later at the cubicle. See you later.


The intent was not to belittle schooling, but often what is taught, while correct, is easily subject to misinterpretation. Every topic herein has been come up more than a few times for me. I hope that a few useful ideas have been presented and possibly a few erroneous ones corrected.

Magnetics, electromagnetism, is not something most engineers work with regularly, and often appears to be a black art. Yet consider, what other device type is there which a rather typical engineer is so deeply involved in the details of creating? Surely not semiconductor devices nor IC's. Most devices are selected and the engineer is not involved with their design and manufacture.

When I went to school transformer courses were something to be endured. This of course was during the dark ages. But if you stand out in a hot sun long enough without a hat it will start to make some sense.

General references:

1. Article Title: "SPICE Models For Power Electronics"
Author: L.G. Meares and Charles E. Hymowitz

2. Intusoft Power Specialist's App Notebook.

3. TWC-S2, How to Select the Proper Core for Saturating Transformers, Magnetics Inc.

4. TWC-600, Tape Wound Cores Design Manual.
Magnetics Incorporated

5. Non-linear Saturable Kool Mu Core Model
Scott Frankel, Analytic Engineering

6. PCB Café book exerpt
SMPS Simulation with SPICE3
Stephen M. Sandler

Magnetics (Part 5) - Current Transformers

Summary: Current transformers are usually used to measure currents, especially where large values of current are expected, and a voltage drop across a series resistive element might represent large losses, the voltages might be hazardous, or a 'clamp-on' sensing element might be desired. A 'current' transformer (CT) and its model is no different in topology than a conventional 'voltage' transformer. However its intended usage is somewhat different causing some conceptual difficulties.

Current Transformer basics:

A typical current transformer application is to apply a current to the primary of a transformer low-turn primary winding and to measure or otherwise sense the voltage across a resistive load of the multi-turn transformer secondary.

Because the transformer is a 1:N device, the current at the secondary is the primary current divided by 'N' and the secondary voltage is the primary voltage multiplied by 'N'. 'N' being the number of secondary turns divided by the number of primary turns.

Now in most cases we wish to minimize the insertion effects of the transformer on the current being measured. Consequently, by construction of the transformer, either as a 'clamp-on' or permanent insertion into a circuit, the number of primary turns is often unity. Refer to Figure 1 following:

Figure 1
Primitive CT model & Application

In the primitive circuit and model of Figure 1 an ideal transformer is used to represent the CT. Resistor RB is the 'burden resistor' while the primary current is established by V1 and some load RL. Now the load might be complex, but the intent is to choose 'n' and RB in such a manner as to minimize the effect of the transformer and RB upon the effects of the measured current.

We know (or should know) that ideally the effect of the transformer is to present at the primary RB/n2 ohms in series with RL. Suppose that V1 represented a high voltage AC powerline of 10,000 volts, and that RL was 10 ohms. The primary current in the absence of the CT and RB insertion into the circuit would be 1,000 amps, and the power delivered by V1 would be 10 megaWatts.

Let us suppose now that 'n' equaled 1000. The secondary current would be approximately 1 amp, equal to the primary current divided by 'n'. This current would cause the secondary voltage to be approximately 10 volts. The secondary power would be about 10 watts. Now the secondary power has to come from somewhere, and in this case the power delivered to the primary load would be slightly diminished.

With the reflected load being equal to RB/n^2 ohms, or 10^-5 ohms, the load on V1 would be decreased ever so slightly, and the voltage across the primary load also diminishing slightly due the voltage divider of RL and RB/n^2 ohms.

One can perform tests on the circuit, bearing in mind that the 'sense' of the transformer currents are such that when current enters the primary 'dot' it exits the secondary dot. One finds that the peak primary current is 999.999A, the secondary current is 999.999mA, and the secondary voltage a peak of 9.167 volts.

However one things that the model reveals is that when the burden resister is not present, the voltage V1 appears across the primary and the secondary voltage can ideally become extremely large. Practically a 'real' transformer, as well as a better CT model would not allow this, but it still could reach hazardous levels.

A more practical CT model:

Figure 2 following shows a somewhat more complete CT model, and this should look familiar.

Figure 2
Primitive CT model2

In Figure 2, Lkp and Lks represent the primary and secondary leakage inductances. Rs is the secondary winding resistance. (Because the primary winding resistance is usually much much smaller than the primary load resistance it is not shown.)

Ri represents an isolation resistance such that one may 'float' the primary or secondary winding. Its value should usually be on the order to 10 to 100 megohms.

Rcl and Lm represent the transformer core. Rcl is a fair representation of the core loss, while Lm represents the transformer magnetization inductance. Now IF the Lm were represented by an equation or function representing an 'average' B-H curve value, this is not a bad representation.

Note that secondary load impedance appears in parallel with Lm and Rcl. If the magnetizing inductance and Rc are large compared to the transformed load impedance, the error is small.

A better representation for the magnetization inductance would include hysteresis and saturation effects, such that the Rcl would vanish as an element, being incorporated into the B-H curve model for Lm.

If the Lm exhibited saturation effects, then when it did become fully saturated, Lm would reflect an air core transformer incrementally, and thus the secondary output voltage would not become as large as in the ideal case, but it still could become excessive.

Now of course if the Lm value represented a 1 turn winding, it could be placed as shown in Figure 2 as part of the primary, but if it were based on 'n' turns it would appear at the secondary.

One might question whether the use of an ideal transformer, which passes DC, would cause problems. But at DC the inductances Lkp and Lm are short circuits, resulting in heavy CT primary currents, but no ideal transformer primary voltage, and no secondary voltage.

Now elements not present in the model are the winding capacitances, as well as the interwinding capacitance. If the model were used for a low frequency application, such as to measure a 60 Hz line current, they might be neglected. But to make the model more accurate one would add winding capacitances to the model as shown in Figure 3 of the next section.

Better CT model:

Figure 3
Better CT model2

Here we have added lumped capacitances Cp and Cs to the primary and secondary windings. Rp, a primary winding resistance has also been added to the model, but its use is problematic as is Cp IIn the case of a one turn, 'clamp-on' circuit, one has to ask what has changed when the current is being measured from when it is not?

Certainly for the one turn primary current case, Rp at most could represent a portion of the resistance of the conductor carrying the current being measured. The same is true for Cp, being at most the change in capacitance for the remainder of the conductor due to the placement of the clamp-on measurement transformer.

Now IF the transformer was embedded into the circuit, and the primary turns greater than unity, Rs and Cp could be measured or calculated. It could be useful to include these items were the circuit used for complex current measurements, as in an oscilloscope current probe.

In any event, the next question becomes how to make a model of the circuit. As a first pass, one could include just the linear elements/parameters indicated by the topology of Figure 3.

Now versions to incorporate a nonlinear magnetization inductance for Lm would require different versions for each way that Lm could be modeled, and there could be several. It would seem appropriate to make a second model with terminals brought out to where an Lm model can be attached. For versatility this could be directly across the primary or secondary of the ideal transformer device. However, this would also accommodate a linear representation of Rcl and Lm, so we will make one model which does all these things. Refer to Figure 4 in the following section.

Best CT model:

Figure 4
Best CT transformer model

Figure 4 shows the model topography as well as the parameters to be passed to the model. The device designations were changed to make them different from the passed parameter values

The magnetization inductance Lm (and Rcl if required) are to be connected between LMp1 and LMp2 (or LMs1 and LMs2) terminals as determined for a 1 turn or 'n' turn magnetization inductance model respectively (assuming that the ideal transformer primary winding has 1 turn). If the primary winding had 3 turns, then a 3-turn Lm would be provided for the primary or a 3*n-turn Lm provided at the secondary.

An advantage of this model is that an inter-winding capacitance could be added from LMp1 to LMs1 (and from LMp2 to LMs2 if applicable). However, there is another little problem with the model as shown. B2SPICETM does not like elements with the same name as that of the parameters being passed, hence the symbol device designations were renamed. When the external connections points for the magnetization were placed, this results in a node naming conflict. To resolve this two zero voltage sources were placed in the circuit, resulting in the circuit of Figure 5 following:

Figure 5
Ctrans part and device model

Figure 5 shows the final model and the symbol chosen for the part. Now we need to test the circuit to be sure it is correct. In Figure 6 which follows, we have a contrived circuit whose values do not necessarily represent anything more than a 1:1 transformer model driven by a 1A, 60 Hz current source.

Figure 6
Ctrans test circuit #1

In Figure 6 we have chosen a 1 ohm load for the basic circuit and the Ctrans device model shown by the U2 symbol.

A frequency sweep of this circuit is shown in Figure 7 following:

Figure 7
Ctrans test circuit #1 graph

Here we see the very low frequency gain starts at zero and increases to unity when the magnetizing inductance becomes effective. After some time a resonance is reached between Lm and Cp, and then it decreases. The responses overlap and only a single curve is reached. The midband gain is almost zero dB.

We could do some more experimentation, and should do so, however the model is believed to be accurate and to keep the article to a reasonable length further testing will be left to the user to verify the model.

A netlist for the model follows:

* B2 Spice Subcircuit
* Created by Harvey Morehouse
* Pin # Pin Name
* LMp1 LMp1
* INp INp
* LMs1 LMs1
* INn INn
* LMp2 LMp2
* LMs2 LMs2
.Subckt Ctrans LMp1 INp LMs1 OUTp INn LMp2 LMs2 OUTn

***** subcircuit definitions

* b2 spice subcircuit
* pin # pin name
* n2 n2
* n3 n3
* n1 n1
* n4 n4
.subckt itrans2 n2 n3 n1 n4
***** subcircuit definitions
***** main circuit
r1 n2 n3 1e10
e1 3 n4 n2 n3 1.000000000000e+000
f1 n2 n3 vam1 1.000000000000e+000
r2 6 n1 1e-9
vam1 3 6 0

***** main circuit
XU1 LMs1 LMs2 LMp1 LMp2 itrans2
Lkp1 5 LMp1 {Lkp}
Lks1 LMs1 6 {Lks}
Rs1 6 OUTp {Rs}
Ri LMp2 LMs2 10Meg
Rp1 INp 5 {Rp}
Cp1 5 INn {Cp}
Cs1 6 OUTn {Cs}
V1 INn LMp2 1.000000000000e+000
V2 OUTn LMs2 1.000000000000e+000



It was convenient to prepare a model for a two winding current transformer. Ctrans device was made for this purpose. Besides the use as a current sensing/ monitoring device for a scope or other current reporting/display device, there are other interesting possibilities.

One interesting application for this device could include a circuit which could be powered by a power line that could be used to report the current through the line to a remote reporting device. This would be complicated by the fact that powerline currents can vary from a few amperes to tens of thousands of amperes.

If one could vary the burden based on the current amplitude it could be possible to power the device over a wide range of currents. If one made a battery powered load, then it should be possible to charge the battery from the line, and at the same time, with suitable calibration, be able to report the line current.