Abstract:In terms of the disadvantages of long development period and inefficiency by manual programming during designing and developing control system, this paper presents a model-based design method with automated code generation. Regard the electro-optical control system as the object of research, use Simulink tools to design controller and build system model, and then generate code automatically. Conduct the experiment and compare the different control effect between semi-physical simulation system and embedded system. The result of experiment demonstrates that the code generated from Simulink model can realize the function of motor speed-control, time consumed in development progress of control program is reduced by 50% or more, indicating that model-based design method is efficient and rapid in development of servo control system.