Modular multilevel converter(MMC)is one of the most promising direct current transmission modes.There are lots of sub-modules(SM)in series in MMC high-voltage direct-current(MMC-HVDC)transmission system.It is a challenge to model MMC-HVDC system in real-time simulation tools.Furthermore,the existing MMC component in real time digital simulator(RTDS)cannot be used for SM faults.The rtds_SM component is proposed.It is developed by CBuilder in RTDS.The component can not only reduce memory usage in RTDS,but also be used for the sub-module fault and the test of control and protection devices for MMC system in RTDS.The insulated gate bipolar transistor(IGBT),antiparallel-connected diode and capacitor are modeled;the bypass switch and thyristor models are realized for control and protection.The developed rtds_SM component has eight inputs and two outputs,which can response for various operation states under various conditions.It can also provide the information for capacitor voltage balancing.Simulation results show that the proposed rtds_SM component needs less memory usage and provides high enough simulation precision.