Research on Performance of Two Real-Time Simulation Environments: RTWT and xPC Target
RTWT (Real-Time Windows Target) and xPC Target are two developing environments based on Matlab/RTW for hardware-in-loop real-time simulation and rapid control prototype. Some error messages which lead to program stop often occur in their practical applications, such as CPU overload, buffer too small, and so on. In this paper, performance of the two simulation environments were studied by analyzing their working mechanism and conducting a lot of experiments, including signal data logging capability, sampling period and system stability. And the reasons which cause error running messages were analyzed. The following conclusions have been drawn. For RTWT data logging capability is not limited by buffer size because the data in buffer are saved to file in real-time during operating. While for xPC Target data logging capability is not limited by buffer size because the data in buffer are uploaded to the host computer and stored in file at the end of run. As long as the sampling period is slightly larger than the task execution time, xPC Target can run stably. RTWT can run stably only when the sampling period is far larger than the task execution time. The proposed conclusions can provide reference for selection between RTWT and xPC Target and their application.