How are harmonics generated in a transformer?
When transformer is operated in the non-linear region of its magnetic core, harmonics generated.
The above graph depicts typical behavior of magnetic permeability
It is observed that magnetic permeability reaches a maximum and then declines.
This is due to saturation seen in the magnetization curve or BH curve or hysteresis curve, as a bending towards right part of the curve of induced magnetic field
As seen from above figure, so long as the transformer is operated in the linear region of BH curve, there is no distortion of the electrical signal.
In transformers and inductors with ferromagnetic cores when the current through them is large enough to drive their core materials into saturation then these operate non-linearly, as their inductance and other properties vary with changes in drive current.
When AC signals are applied, this non-linearity generates harmonics and inter-modulation products.
Another figure depicting distortion of sinusoidal AC signal when transformer is operated in the saturation region of core, fig. (b). Observe that positive half cycle is distorted and negative half cycle is severely truncated/distorted.