This paper proposes an algorithm development and test procedure for power electronics and power system research using simulation, hardware in the loop (HIL) simulation, and electrical experiments. A flexible and reconfigurable experimental setup is introduced in this paper first and the related problems of power electronics and power system research are identified. The importance of the simulation, especially the real time HIL simulation is emphasized, and a complete design procedure is proposed and analyzed in detail. Using the proposed procedure, the research and test cycle can be greatly reduced. The algorithm development can also be standardized according to design requirements. A converter control case study demonstrates the entire design procedure and verifies the effectiveness of the proposed design procedure.