Basic principles of electromechanical energy conversion and power system analysis