Using model based design(MBD) method, deadbeat control algorithm for three-phase grid-connected inverter was designed in optimization and realized in hardware. According to the advanced idea of MBD and its basic procedure, the software-in-loop(SIL) test, processor-in-loop(PIL) test and hardware-in-loop(HIL) test for deadbeat control algorithm were mainly researched under MATLAB/Simulink environment choosing TMS320F2812 as object hardware board. In such method, embedded codes could be produced automatically and the errors brought in through algorithm model could be tested and corrected earlier. Meanwhile, simply changing the PIL related modules, the self-defined deadbeat algorithm module could be flexibly applied in other hardware platforms. At last, the correctness and efficiency of deadbeat control algorithm were verified in three-phase grid-connected inverter experiment platform.