[Physics] How does the energy remain conserved in a transformer

electric-circuitselectric-currentelectromagnetismenergy-conservationpower

The induced voltage in the secondary coil of a transformer is given as $\frac { { N }_{ S } }{ { N }_{ P } } *{ V }_{ P }$ (where ${ N }_{ P}$ and ${ N }_{ S }$ are the number of turns in the primary and the secondary coil respectively, and ${ V }_{ P }$ is the voltage in the primary coil). I understand that to not violate the conservation of energy, the current in the secondary coil would need to be lessened by the same factor that the voltage is being increased with. Now, in a case where the secondary coil has twice the turns as in the primary coil, the voltage in the secondary coil would have to be twice as much of the voltage in the primary coil. Also, if both the coils were made of the same material with the same dimensions, the secondary coil would be at the very least be twice as long as the primary coil. Now, say the resistance of the primary coil was ${ R }_{ P }$, then the resistance in the secondary coil (${ R }_{ S }$) would be 2${ R }_{ P }$ (because ${ R }_{ S }=\frac { \rho (2L) }{ A } $). On applying the Ohm's law, the current in the secondary coil would come out to be the same as in the primary coil ($\frac { { V }_{ S } }{ { R }_{ S } } =\frac { 2{ V }_{ P } }{ { 2R }_{ P } } ={ I }$). The power in the primary coil was ${ V }_{ P }*I$ whereas the power in the secondary coil would be $2{ V }_{ P }*I$ which is twice the power as in the primary coil. This is clearly in disagreement with the fact that energy cannot be created. I know there's a mistake somewhere but I can't figure out where it is.

PS: For simplicity, the transformer which I considered was an ideal one.

Best Answer

Now, say the resistance of the primary coil was RP

If there is winding resistance, energy is lost and the transformer is not ideal.

Consider the following circuit model (using ideal circuit elements) of a physical transformer (from an answer here):

enter image description here

Note that, in the middle of all this, is an ideal transformer that is lossless.

The resistors in series with the primary and secondary model the winding resistance of a physical transformer which is not lossless.

The inductors in series with the primary and secondary model the leakage inductance of the primary and secondary.

The parallel circuit elements across the primary model the losses due to core hysteresis and finite permeability.