A Low Cost Resolver-to-Digital Converter