ABSTRACT In this paper two methods for real-time debugging and testing of a control system are proposed. The basic instruments used are personal computers, a Visual C++ compiler and MATLAB including the GUI Design Environment, Simulink, real-time workshop, xPC target, and some relevant hardware. For the first method, MATLAB functions are used to build a control system debugging and testing environment. This method is flexible and only one RS-232 serial cable is used. Limited programming is used for the second method and ready-made blocks in MATLAB/Simulink are used to build the simulation environment and communication channel. In both methods, the parameters of the emulation system can be modified online, important graphs can be drawn in real time and relevant data can be easily saved for the later analysis. As can be seen from the presented examples, both techniques are easily realized.
Cite this paper
Z. Wang, "Real-Time Debugging and Testing a Control System Using Matlab," Open Journal of Applied Sciences, Vol. 3 No. 2, 2013, pp. 61-64. doi: 10.4236/ojapps.2013.32B012.
 P. Xu, C. N. Huang and Y. T. Wang, “Studying A Physical Simulation System for Characteristics in Targets and Background of the Remote Sensor on Spacetorne,” Journal of System Simulation, Vol. 15, No. 12, 2003, pp. 1763-1765.
 A. Davari and D. Y. Shen, “On-line Control of A Real System with Matlab/Simulink,” Proceedings of 30th Southeastern Symposium, 1998, pp. 7-9.
 F. C. TENG, “Real-time Control Using Matlab Simulink,” IEEE International Conference, 2000, pp. 2697-2706.
 P. S. Shiakolas and D. Piyabongkarn, “On the Development of A Real-Time Digital Control System Using Xpc-Target and A Magnetic Levitation Device,” Proceedings of the 40th IEEE Conference on Decision and Control, 2001, pp. 1348-1351.
 L. Fu and H. H. Jin, “Research and Design of An Emulating Environment Based on Real-time and Testing for Embedded Software,” Computer Engineering and Applications, Vol. 39, No. 3, 2003, pp. 117-119.