Modelling and Control Design of Switched Reluctance Machine using Modelica