Energy-Based Magnetic Hysteresis Models - Theoretical Development and Finite Element Formulations