Using a Real Time Digital Simulator to Model and Investigate a Phase Selection Algorithm