## 1 Introduction  
As electric railway systems have been widely employed around the world, various concerns regarding electric power systems have emerged. Since electric railway systems intermittently consume huge amounts of active and reactive power, they hinder load forecasting for power system operators and raise power quality problems such as harmonics, flickers, and negative-sequence currents in the three-phase balanced systems [1; 2; 3; 4; 5; 6]. In severe cases, this might threaten the stability of the whole electric power system. Thus, it is essential to develop a model of an electric railway system, calculate the power flows, and analyze the effect on the transmission network [7; 8; 9; 10; 11; 12]. The electromagnetic transients (EMT) program has been widely used to investigate power quality phenomena in the electric railway system [1; 10; 13; 14]. Furthermore, real-time simulations (RTS) have attracted attention for power system analysis to handle problems closer to the real world [15; 16; 17; 18; 19]. In particular, RTS can be utilized to perform a hardware-in-loop (HIL) test for reactive power compensation systems and the coordination of protection systems [19; 20; 21; 22; 23]. In South Korea, large-scale real-time simulators are being used to investigate the effect of moving loads and the performance of the protection system. Among the power quality problems, three-phase unbalance is one of the critical problems that the electric railway system causes on a balanced AC network. Since many electric railway systems act as a strong single-phase load, specially connected transformers such as the Scott, Le Blanc, Woodbridge, and V-connected transformers are required to deliver the power from the transmission network to the railway system [24; 25; 26; 23]. Commonly, the Scott transformer has been employed to convert three-phase to two single-phases and maintain the three-phase balance [27; 28; 29; 30]. Thus, the Scott transformer model is necessary to perform an EMT study for an electric railway system. The problem is that the transformer model is rarely included in the library provided by general EMT programs. Many users combine two transformer models to handle the problem, i.e., a single-phase transformer and a three-winding transformer to implement the Scott connection [10; 13; 25; 26]. In fact, the Scott transformer model has recently been added to the library provided by the EMT program for real-time digital simulators (RSCAD). However, the model cannot set the actual parameters of Scott transformers, such as the leakage reactance of two phases. Accordingly, it cannot accurately involve the Scott transformer's detailed characteristics, which are essential for simulating the electric railway system. Due to the incomplete model, voltage and current unbalance problems were repeatedly observed in RTS. To address this concern, we formed a Scott transformer by connecting two transformer models in the RSCAD Substep library in the same way as previously mentioned. When it comes to RTS for electric railway systems, it should be noted that the railway system components, including power electronics-based apparatus and moving loads, require heavier computational resources. However, the Substep library models should completely occupy one of the processor units of real-time simulators. As for the approaches using two transformer models in the Substep library to implement the Scott connections, the limitations of the processor resources become a concern when it comes to executing RTS for electric railway systems. To overcome the limitations above, we developed a Scott transformer model linked to C source code with a mathematical foundation.