How to simulate transformers

By Nigel Atkinson

Hello and welcome to this short blog on the simulation of transformers in Opera. Starting with the very basics of transformers, in an ideal world different windings on primary and secondary circuits produce transformed voltages and currents on the output compared to the input according to very simple calculations. But in the real world you have a less than 100% flux linkage. Hence there are flux leakages to consider in both the primary and secondary. When designing a real-life transformer a certain amount of leakage may be desirable, when designing air-gaps or magnetic bypass shunts to limit short-circuit currents that it will supply.

In addition to the leakage flux, the coils will be made of less than perfect conductors, therefore there are copper losses to deal with. And in the core you will have magnetising reactance and losses from the iron. All of these deviations from the perfect transformer can be expressed as equivalent circuit parameters and are often used in transformer specification. In the diagram on slide, V1 represents the primary voltage. The resistances R1 and R2 represent the copper losses in primary and secondary windings respectively. The primary and secondary windings do not share exactly the same flux, instead there is some flux leakage. However, this leakage doesn’t cause power losses, rather it causes a phase change between the voltages and currents, and the effect can be modelled using the reactances L1 and L2 for the primary and secondary flux leakages respectively. The resistance R3 represents the iron losses, i.e. the hysteresis and eddy current losses in the core. A transformer with finite permeability needs a small magnetizing current.
This current is in phase with the core flux, but not with the induced voltage. This effect is modelled by the reactance L3. When it comes to assessing the performance of a prospective transformer, three tests are commonly carried out. These can be reproduced in the virtual world using simulation to calculate the parameters that we see above.

So, what happens when you’ve taken the designs as far as you can with hand calculations, test-based processes and analytical methods and need to turn to more accurate and versatile techniques to provide the insights necessary to design better transformers? Simulation provides designers with the means to replicate those tests virtually, saving time and money. But simulation also allows effects to be separated. In the past designers would only have been able to measure, for example, a limited number of samples of operating temperature, but simulation allows you to see which types of loss are generating the most heat. Because of the variety of advanced post-processing techniques you can see what’s happening inside the device – where the problems or inefficiencies are arising. You can see where flux leakage is occurring, where structures are saturated and at what position problems could occur.

Once you have built a model of the base design, “what-if” scenarios are far easier and quicker to run virtually than in the lab. And when you have developed a functional design, automated optimization techniques can be employed to refine the design even further. Opera has been developed extensively over 30 years, and has a proven track record in the design of electrical machines, power systems, particle accelerators, medical devices, and a wide variety of other applications. Opera offers a range of FEA modules, enabling accurate robust solution of multi-physics problems in low and high-frequency electromagnetics, thermal, and stress domains. It also has a fully integrated optimizer.  Opera is based on a scripting language, augmented with Python, which allows automation of all the steps in the modelling process, and customization of the user environment.  So, with the option to create any shape of device, add nonlinear properties plus any shape of magnets and coils, and any generic electronic circuit you can define a model of virtually any type of transformer, or electrical machine in general. You are not limited to analytical representations, you are merely limited by the capability of your hardware to solve the resulting matrices.

But what about conceptual design? How can designers without years of analysis experience utilise the techniques we’ve shown to virtually try-out designs rapidly? The Opera Software team have produced a Transformer Environment that captures the many years of analysis knowledge of our engineers and automates the process of analysing common machine configurations. It functions with the ease-of-use of analytical software, but solve the resulting problems using accurate Finite Element techniques.

The Transformer Environment uses a wizard-style data-entry for ease-of­use. It is written in the COMI language mentioned earlier, so it’s not merely a closed executable. Common types of configurations are offered, but the command files are, mainly, open-source so the user is free to make adjustments to the standard command file. This could be a small tweak to a geometrical shape right through to a completely new topology of winding. Relevant data, in terms of standard parameters, is gathered for the transformer being analysed then the environment builds a full-fidelity finite element model. Analyses are submitted automatically to the Batch processor, then standard post-processing commands automatically generate plots and reports such as efficiency ratios, losses and inductances.

The Transformer Environment is launched from the standard 3d Opera GUI. First you select whether you want a transformer or a reactor. If you have defined a transformer already, and want to continue working with it, you have the option to pick up the geometry from an existing file. Otherwise you can start generating the geometry afresh automatically using the environment.

Several standard configurations are available, after you’ve selected one, you can give some basic topological information. Choose whether you want to include details in the model such as the air gaps, the tank, the clamps, leg-plates and bolts. The more details that you choose to add, the greater the number and types of results you can extract, but probably at the cost of more elements and longer run-times.
Once you’ve chosen the basic topology you are presented with a series of dialogs to enter the geometrical information.  Both for the legs of the transformer, and for the coils. You can choose, by default, from solenoids and racetracks, and can split them automatically into a number of sub-windings.  If you chose to include air-gaps and the support structure in the model, you will be presented with dialogs to enter geometrical information for the appropriate components also. It’s easy to generate a number of air-gaps in the legs if you’re investigating the effect of such features in a new design.
Once you have a representation of the device, you select which test you would like to perform. The default options are Open-circuit, Short-circuit and Inrush. Each test will generate the appropriate circuit definition and drive the transformer as per the real-world test. Results generated for each test are shown in the table on the right hand side of the slide. Note that this is generating a standard Opera model, so if you have some non­standard tests you can edit the driving function or circuit connectivity to suit.

At the outset, you had the option to tick to box to perform an optimization analysis. If you chose this option, you are presented with a dialog containing all of the possible variables for the optimization run. Select any that you would like to be considered a variable to be optimized, or varied.

For the Inrush test a full 3-phase circuit is automatically defined and attached to the transformer. You can see the fully driven 3-phase primary, and loaded secondary with resistance and inductance.
Above we see typical resulting models. The top view shows the geometrical entities for the particular device as designed. You can see the tank and support structure as well as the transformer itself, complete with coils. The bottom view shows the model to be analysed complete with coils and mesh, including the air. You can see the graded mesh, where the elements increase in size away from the area of interest. When the model build is complete, the software lists the variables that you have declared for optimization, and the outputs requested.
Here we see some of the typical output of an Inrush test. There are the forces and currents on the primary and secondary windings, but more calculations are carried out automatically and save as pictures or text files. The eddy current losses on Tank, Clamp, Legplates and Bolts are calculated. The efficiency of the transformers is given by output power over input power.

  • The input power is accounted for by total losses in the device.
  • The output power is accounted for by the resistive losses in the load The value of efficiency is then stored in a text file which is saved in the working folder along with other text files.

For any of the results cases you can use the post-processor to investigate the behaviour of your device. Results can be presented on individual components to investigate the efficiency of individual components as well as the device as a whole.

At this point, you might be thinking “but my machine is different” Opera can cater for differences because of the way that the Environments are structured. As mentioned previously, the Environments are largely open COMI files. This means that you are not limited to purely the transformer configurations offered. You have two choices in using the Environments for your own design that differs from those on offer in the pre-packaged Environment.

Firstly, you can run the COMI file, then at a chosen point pause execution. Make changes to the model interactively, then continue with the operation. Or, secondly, you can edit the COMI file to account for your adjustments every time it operates. If you do the first of these, it’s often a simple job to cut and paste the logged commands from the interactive session to create an edited COMI file.

In summary, Opera provides a fully-functional analysis system for design of electromagnetic devices such as transformers, in both 2D and 3D. Standard Transformer templates can be used, defined by the advanced user, or licensed from our industry-experts. Opera models can be used in system-level-design. All of this industry-proven and supported by experts in the field of transformer design.

I hope you have found this blog useful. You can find more detailed and relevant information about transformer design at the link below.