An observer based quasi sliding mode controller for permanent-magnet synchronous motors