Transformer Model in LTSpice – Step by Step Guide

I love LTSpice due to its very easy interface and very handy. It has several built-in models that can be used. For ICs, it has many parts available to be used in simulation although most of it is manufactured by Linear Technology (the maker of LTSpice). For beginners and newbie to LTspice, I suggest you visit the tutorial LTSpice Circuit Simulation Tutorials for Beginners. Despite of the above mentioned advantages, there are few disadvantages but for me this is not actually a disadvantage because I already know how to address it. I am referring on how to make a transformer model in LTSpice. Unlike other circuit simulators, LTSpice does not have a transformer part or model in its library. However, there is a special command to come up with a transformer.

Step by Step Guide on How to Make a Transformer Model in LTSpice

A transformer is just coupled inductors. Ideally, the power in the primary will be delivered to the secondary 100%. In real case, there is a reduction of power delivered to the secondary and this is the coupling loss. Coupling effectiveness is represented by a number less than unity to unity in LTSpice.

Unity means a perfect coupling while less than one is non-perfect coupling.

Below is a transformer model in LTSpice environment. L1 and L2 are the primary and secondary inductances. R2 is required for the simulation to run. This can be the primary winding resistance. R1 is the load and not part of the model.

Transformer Model in LTSpice

1. Turns Ratio

The turns ratio is very important to transformer. It determines the transformer winding voltages. In most cases, the primary winding voltage is given so the secondary winding voltage will be the unknown term.

pic 2

For instance, the primary voltage is 120Vrms, the required turns ratio to get a secondary voltage of 12V is

pic 3

2. Inductance and Turns Ratio Relation

LTSpice transformer is set in terms of primary and secondary inductances. The relation between inductance and turns ratio is

pic 4

For instance, the primary winding voltage is 120Vrms (169.71 peak), to get around 53V peak on secondary winding, the inductance ratio should be

pic 5

For a 400uhenry primary inductance, the secondary inductance would be

pic 6
pic 7

The resulting model will be

pic 8

If run the simulation, the secondary voltage waveform is

pic 9

3. Declaration to make LTSpice Understand That We want a transformer

“K1 L1 L2 1” is the command needed to declare a coupled inductor to act as a transformer. K1 is simply a notation that you want L1 and L2 to be inductively coupled to each other. The constant “1” means a perfect coupling. It can be less than one to simulate a non-ideal coupling.

pic 10

To Setup K1 L1 L2 1, follow below step by step guides.

pic 11

4. Run Transient Command

To verify the result, a transient command is can be used. To configure a transient command, follow the instructions below.

pic 12

How to Make a Transformer Model in LTSpice with Multiple Secondary Windings

Follow above instructions on how to compute for the inductances. A multiple secondary transformer is can be done by making use of the spice directive window. To demonstrate well, let us consider below circuit. L1 is the primary inductance of the primary winding while L2 and L3 are the inductances of the secondary windings. Be mindful of the dots in the secondary inductors; they must be in the same orientation with the dot of the primary inductor to have an in-phase output.

pic 13

To declare L1, L2 and L3 as one transformer with two secondary windings, follow below instructions.

pic 14

Then setup a transient command in step number 6 to view the result. Below are the waveforms.

pic 15

If you want an inverted secondary voltage, do not follow the dot orientation of the primary inductor. For instance in below circuit, L2 is oriented not the same as L1 and it has a secondary voltage (Vsec1) out of phase of the primary voltage Vin.

pic 17
pic 16

If you have another way on how to create a transformer model in LTSpice, feel free to share it here through the comment section.


Help me promote by advocacy to help people to learn electronics, to answer questions related to it and share some design tips and advices by liking the Facebook page “Electronics Believer” and inviting friends to join the group “Electronics Consultations, Tutorials, Discussions, Etc”.

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.