Magnetics (Part 2) – Creating more complex transformer models

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. He may be reached at harvey.annie@verizon.net. Simple questions for which I know the answer are free. Complex questions, especially where I am ignorant of the answers, are costly!!!

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
*SYM=Untitled
.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
.ENDS

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.

 

 


Beige Bag Software, Inc., 623 W. Huron, Suite 2, Ann Arbor, MI, 48103
(phone) 734.332.0487 (fax) 734.332.0392 (email) info@beigebag.com
© 2005-2008 Beige Bag Software, Inc