Brake sensor and throttle can cause problems disconnect them from the controller and ride just with PAS to see if the intermittent problem goes away.
Then if it works ok again connect the brake sensor again and try it out, last of all connect the throttle. That way you may be able to pin point...