Electrical machines and their applications