Design of Software for Calculating Tidal Currents in AT Power Supply Systems

: High-speed passenger railway, referred to as "high-speed rail", is a very important mode of transportation in today's society, which have attracted social attention and have been widely studied by domestic and foreign railway industry researchers. However, the transportation capacity and transportation conditions of high-speed railways are closely related to locomotive types, traction power supply systems, and traffic information control. Among them, the traction power supply system is an important source of its energy, which ensures the normal operation of the locomotive, so it has very important research significance. This article first introduces the AT power supply mode used in today's high-speed railways. Then the power flow calculation method and principle are derived as the design of the software below will pave the way. At the end, a complete power flow calculation method is summarized and implemented on the Visual Studio platform using C# language. A power flow calculation software for the AT power supply system was established, inputting parameters such as voltage and current, using Newton-Raphson method to iteratively calculate, and the final result can be directly displayed in the software, or exported and saved with Excel. And after the test, the software can run well, and the calculation speed is relatively fast, the result is normal, within the error range, and basically meets the expected requirements.


Introduction
With the rapid development of electrified railways, the study of their main power supply method -the AT power supply method -is extremely important.By writing a program that transfers the complex process of calculating AT power supply system currents to a computer, the calculation speed and efficiency are greatly improved [1][2][3] .
The novelty of this project lies in the establishment of a mathematical model of the AT traction power supply system based on the electrical parameters of the fully parallel AT power supply system, the derivation of a specific method for tidal current calculation and its implementation in software using C# language, making the calculation clearer and the operation more convenient [3][4][5][6][7][8] .

AT power supply system modelling
The analysis of the circuit has always been based on the three elements of voltage, current and resistance, so to analyse this AT power supply problem, the first step is to determine its current distribution, and because of the different AT power supply methods specific to high-speed railways, a new method of decomposing each AT current into two independent and exactly equal current phases is used [9] , as shown in Figure 1 below.(1) The distribution of the train power is therefore composed of two parts, W1 and W2, as shown in Figure 2, represented by the "main current" (Imain, solid line) and the "auxiliary current" (Iaux, dashed line) respectively.According to the principle of magnetic potential balance there are Figure 2: Individual AT zone power distribution Figure 3: Equivalent circuit diagram

Analytical calculation of the main train current
Since in practice the train power is less affected by external influences relative to the voltage, the locomotive in this topic is a constant power model and is considered a current source, while the voltage provided by the traction substation remains constant, each AT can be considered a constant voltage source, and then combined with the forward current distribution, the Figure 3 equivalent circuit can be obtained Since the primary and secondary currents of the same AT are in the same phase, one is found and the other is known, i.e.
Locomotive current is known, and then analytically solve for each branch current, which can be obtained according to the series-parallel formula, first find out the conductance of each part, calculated as follows.
Where YN is the total conductance sum between the locomotive and the Nth AT.The above equation needs to be analysed in the process of solving for the specific case of the series conductance equation.The subsequent current in each branch can be calculated by the following equation.

Solving for train voltage
Figure 4 below shows an example of the equation for calculating the voltage when a train passes.The four ATs are labelled X1, X2, X3 and X4 from left to right, all starting with the first AT on the left.Therefore, according to the above current distribution, combined with the actual unit impedance and distance at each location, the voltage drop can be analysed and the final train voltage can be found [10] .

I = (
The pressure drop of the traction current is therefore divided into the pressure drop of the traction network, the pressure drop of the rails and other pressure drops.The pressure drop in the contact network is as follows The voltage drop of the rail is The train voltage is therefore finally expressed as Where: ZC for the contact line unit self-impedance; ZF for the feeder unit self-impedance; ZR for the rail unit self-impedance; ZFR for the feeder -rail unit mutual impedance; ZCR for the contact line -rail unit mutual impedance; ZFC for the feeder -contact line unit mutual impedance;

Newton's method of iterative solving
Combining the equations of the Newton-Raphson method gives The end of the iteration is marked by the difference between the last resulting current and the result of the penultimate iteration being no greater than the error value, see the following equation (ε represents the error) If the above equation is satisfied after several iterations, the loop is jumped out, otherwise continue to repeat the previous steps, and then the newly obtained current to find the voltage to find the distribution, until the iteration is completed by jumping out of the loop.

Software development environment
Visual Studio (hereinafter referred to as VS), is a complete development toolkit product developed by the US company Microsoft.It is an integrated development environment that can be used to edit and debug development code and then implement applications, while greatly simplifying the software development process [11] .C# is a good object-oriented language that inherits and builds on the strengths of languages such as C++ and Java, and develops them further.It is adapted to the current environment [12] .This design was developed using the Visual Studio platform, operating on a Windows GUI.

Overall software design solution
The overall design flow chart is shown in Figure 5 below

User login detection screen
The user login module is a necessary module for every complete software.This software login interface is beautiful and simple as shown in Figure 6.

Basic input module design
The input interface of the software is therefore divided up and down, and the whole is roughly divided into two parts.The upper part is the interface of basic parameters that are generally not entered.The lower part is the actual input screen of the software.The specific input interface is shown in Figure 7 below.

Design of the software output module
The software output incorporates common data output methods and is presented in a tabular format in the output interface in Figures 8.All the iterations are displayed, and the data can be arranged in ascending or descending order to make the output more logical.

Introduction to the parameters of the algorithm
Let the whole section to be calculated for the total length of 30kM, divided into three sections of four autotransformers, the interval between each AT is 10kM.Assume that the locomotive constant power operation is 10mW, power factor is 1, the initial value of current is 400A, iteration error ε is set to 0.01, the locomotive at the beginning of 5kM from the first autotransformer.The detailed parameters of the power supply system are shown in Table 1

Equation models and calculations
The calculation example is slightly altered relative to the model of the formulae derived in Chapter 2, see Figure 9 below, and therefore differs in the modelling and calculations.

Data entry and calculation page tests
Enter the above data and the parameter information from Table 1 as shown in Figure 10 below.It can be seen that the requirements to be achieved by the design can be met, with the upper half being unchangeable fixed parameters and the lower half being variable parameters that can be altered, with the calculation button placed in the lower right hand corner and the page display complete with full data.

Testing of the calculation output interface
On the premise of completing the data input and examination in the last two steps, click on the calculation button, and after the program is calculated and run according to the flow chart in Figure 7, it eventually enters the output interface in Figure 11.
After completing the calculation, you can click on the Export button in the bottom right corner to save it as an Excel file as shown in Figure 12 below.it is not only perfect for saving the data for later access and other operations, but also for the next calculation, allocation, design and other applications directly in Excel.

Conclusions
This design is in the context of a high-speed railway traction power supply system with a fully parallel AT supply as the main supply method, which is very complex, but which provides excellent power supply with low losses and low impact on external electromagnetic interference, etc.The design is both favoured and felt by railway researchers.In this context, the AT power supply system tidal current calculation software under the VS platform has been designed to simplify the manual calculation, improve the efficiency and accuracy of the calculation, as well as to better collect and integrate the data for the next application and calculation, which has long-term application significance.
There are still some shortcomings in the article.The software is only designed for single train operation, but in actual operation, some mainline railways often have two or even three or more locomotives on a few kilometres of line, which has not been covered here and the design and development of the software has not been solved well.The software can achieve the function but the interface is not too scientific and beautiful, which is a place to change.

Figure 1 :
Figure 1: Current distribution diagram Let the train current be it and the autotransformer ratio be 2:1, the following relationship can be obtained  2 =     =  1 +  2(1)

Figure 4 :
Figure 4: Breakdown of the train voltage solution Combining Figure 2-2, Figure 2-3 and Figure 2-3, as well as the actual position of the trains as in Figure 2-4, the following current distribution matrix can be written for each section of the traction network as a whole (set to the right as the positive direction of current reference).

Figure 5 :
Figure 5: Program flow diagram Figure 6: Software login authentication interface

Figure 7 :
Figure 7: Basic data entry screen Figure 8: Output screen

Figure 9 : 4 . 2
Figure 9: Sketch of train distribution for the new example There is no major difference in the process of finding the main current in the first step, but later, when finding the train voltage, the different locomotive positions lead to different current distributions and therefore different voltage drops.The current distribution matrix equation (2.6) is therefore strained to the following equation (2.13).

Figure 12 :
Figure 12: Saving diagrams in Excel

Table 1 :
: Table of power supply system parameters