An introduction to electrical machines and transformers