A new high accuracy software based resolver-to-digital converter