I am trying to understand how is energy transferred as a current to secondary of flyback transformer. First due to the dot convention and secondary side diode, current will not flow in secondary and energy is going to be stored in the core. But after opening the switch, how polarity changes? I mean the current in the primary wont change suddenly and will try to flow in the same direction, as well as the flux in the core. The created flux is going to force secondary current to flow in the same direction as it was closed. What causes the change in the secondary polarity? Can someone explain it?
and energy is going to be stored in the core
actually, in the magnetic field.
When the switch closes, the secondary diode will be reverse biased (remember the dots - winding polarities) and does not let the current flow.
But after opening the switch, how polarity changes?
Remember the basic inductor behavior: Inductors always generate an emf to counteract any change on the applied voltage. For example, if the applied voltage is suddenly removed then the inductor will generate a very high voltage with reversed polarity across its terminals.
Let's put this behavior in a flyback converter: When the switch opens, the primary inductor will not let the current stop suddenly and will generate a reversed and very high voltage across its terminals. So the voltage at the switch side of the inductor will be greater than the voltage at the supply side of the inductor. That's how the polarity changes.
The stored energy will be partly (or completely, hence the name DCM or CCM) transferred to the secondary. This will induce a voltage across the secondary winding.
Changing the polarities on the windings is the only thing that the flyback transformer can do because it has to transfer the stored energy. If the stored energy will not be transferred to the secondary then the core will never reset and will saturate eventually (Remember the B-H Loop).
I mean the current in the primary wont change suddenly and will try to flow in the same direction, as well as the flux in the core.
That is correct except the current will now be flowing in the secondary because, in an ideal flyback transformer there is no path for current to flow in the primary. Maybe consider simplifying the flyback transformer to a basic inductor-switch circuit like this: -
Notice that I've re-positioned the secondary circuit in the left image to be inverted to help make the transition easier to the simplified inductor-switch model (on the right).
- S1 is the MOSFET
- S2 is the diode
The created flux is going to force secondary current to flow in the same direction as it was closed.
That's basically where your error of thinking is. Just think about a normal transformer with two identically wound and 100% coupled windings: -
\$I_P\$ is naturally in the opposite direction to \$I_S\$. If it were the other way round then the output voltage would have to be inverted and, of course, that is not what the dots associated with each winding is about.
Picture from here.
What causes the change in the secondary polarity? Can someone explain it?
If there is no voltage polarity change then there has to be a polarity change in current. If there is no current polarity change then there has to be a change in polarity for voltage.
Understanding transformers - as well the usually used ones as the ones in flyback circuits - can happen after a person understands that induction happens in the magnetic field around the windings. High permeability transformer core helps to keep the magnetic field inside a certain area and direct the magnetic flux through the windings.
The induction law states that as soon as for any reason a magnetic field changes there exists a circular electric field around the magnetic flux lines. In transformers the induced electric field has the same direction as the wire in the windings, so having plenty of turns collects a substantial voltage.
The induction law (in the vector field differential equation form) states also that the generated electric field has a polarity which tries to cause such current in the windings that the change of the magnetic field is reduced.
Thus if you break the current in the primary of a flyback transformer both windings generate a voltage. In the secondary there's a diode which allows the secondary output current. That current has direction and strength which generates at first just the same magnetic field in the core that you just tried to break by stopping the primary current. The current decays gradually as the magnetic field energy decreases; it goes to the output.
When you break the primary current the voltage over both windings jumps as high as needed to make the current possible. The current bulldozes its way through the insulations if needed. In flyback power supplies the diode in the secondary allows the current from the secondary charge the output capacitor. It's capacitance is so high that the voltage rises only very little, say less than 100 millivolts with one induced pulse. Induction lifts the voltage in the winding just as high as it's needed to charge the capacitor.