Hysteresis effects in transformers, including ferroresonance