*3.1. Emergency Power Supply Scheme Testing*

To verify the feasibility of the proposed emergency power supply scheme and the accuracy of the stability analysis, a simulation model of the PV and battery power generation systems, RPC, and CRH3 locomotive, as shown in Figure 1, was built based on Starsim. Figure 16 shows Shanghai Yuankuan Energy's Starsim HIL real-time simulation software 5.0 and HIL real-time simulator (Modeling Tech, Shanghai, China). This system can perform small-step real-time testing on power electronic models based on state equations, switch averaging, and modeling of large and small resistors. In this paper, the model was verified using a real-time test system (MT 6020) with a 5 μs step size and 20 kHz sampling frequency.

**Figure 16.** Hardware-in-the-loop real-time testing platform.

Here are the model parameters in the above-mentioned testing system, as shown in Table 1. In this paper, the parameters in Table 1 are referred to as the original parameters. Unless otherwise specified, analysis or testing will default to using the original parameters.

#### 3.1.1. Emergency Traction Test based on Locomotive Power Failure

The upper computer calculation display is shown in Figure 17a, where *P*RPC is the output power of the PV and battery, *P*net is the output power of the substation, and *P*CRH3 is the absorbed power of one locomotive. At 1 s, the traction network unexpectedly lost power to the locomotive; after a short response time, the RPC identified the operation status of the PV and battery devices and switched to the corresponding mode to achieve the emergency power supply for the locomotive. At 2 s, the power supply to the substation was restored; to ensure passenger safety, the RPC delayed the power outage. Finally, at 2.5 s, the RPC exited the power supply or returned to the power compensation scheme. During this power outage process, the locomotive remained running, as shown in Figure 17b. If emergency-response-type locomotive traction is started in actual engineering, it can provide on-site measured data support and technical guidance for future new energy self-sufficient traction. For example, the working conditions of delayed power outages are equivalent to the actual test of changing to the substation supply when the new energy self-sufficient traction encounters an accident.

**Figure 17.** Emergency response traction power supply: (**a**) system energy flow; (**b**) locomotive voltage and current.
