Development of an automated control system for 6/0.4 kV transformer substation with automatic transfer switch using standard IEC 61131-3

. This work is devoted to the development of an automated transfer switch (ATS) for the 6/0.4 kV substation. The work is relevant due to the introduction of automation and the replacement of electromechanical equipment with microprocessor devices in the power systems. At the lower (field) level, automation is driven by the use of programmable logic controllers (PLCs) and various smart sensors. The possibility of using modular PLC in automation systems is considered. Developed are an algorithm and a program for the implementation of automated regulation of the application of automatic transfer switches at a substation using the recommendations of the IEC 61131.3 "Programming languages of programmable logic controllers" standard.


Introduction
To ensure an uninterrupted operation of the power system, one should connect current collectors of the first and second reliability categories to two or more independent power supply sources. To switch loads between the main and standby sources, automatic transfer switches (ATS) are used [1,2]. The main task of the ATS system is to control the voltage of the supply inputs and the load current and to switch the consumer to the backup power line. For the implementation of ATS schemes at electric power facilities, commercially available equipment is used. However, for its application in various enterprises, one should develop a specific circuitry and/or logical solution at the site of installation. Moreover, now it is becoming even more in demand due to the development of automation systems and the possibility of complicating the logic of their construction.
To improve practical solutions in the development of ATS functional circuits, the digital technologies are becoming relevant. Logic relays and industrial logic controllers are now being used in ATS boards, due to which the operation is carried out more flexibly than with a standard automatic machine built on contactors [3][4][5]. Such circuits based on microprocessor devices are more sensitive, which makes it possible not to respond to short-term deviations in the parameters of the power grid or a slight decrease in voltage associated with starting powerful electric motors.
In addition, the modern ATS circuits make it possible to implement remote control by embedding it in more complex control and monitoring systems. An example of such a system in the electric power sector is the SCADA -Supervisory Control And Data Acquisition System. SCADA is one of the components of automated control systems, which are a complex set of software and hardware.
Industrial logic controllers programmed in the languages of the IEC-61131-3 standard, including industrial communication buses such as Modbus, Profibus, CANopen, ProfiNET, etc., are used at enterprises for ATS implementation [6][7][8]. The IEC 61131-3 standard defines five PLC programming languages, three graphical and two textual. The main goal of the standard is to increase the speed and quality of developing programs for PLC, as well as to create programming languages focused on technologists, to ensure that the PLC conforms to the ideology of open systems, to exclude the stage of additional training when changing the PLC type [9][10].
Programming systems based on IEC 61131-3 are characterized by the reliability of the software they create. Reliability is ensured by the fact that programs for controllers are created using a specially designed development environment that contains all the necessary tools for writing, testing and debugging programs using emulators and real microprocessor devices. Also, such systems have a simple modification of programs, the ability to increase its functionality and portability of the project from one PLC to another; reuse of used fragments of the program; the simplicity of the language, and the limitation of the number of its elements.
The choice of one of the standard languages is determined by the problem being solved. So if the algorithm is formulated in terms of sequential processing and signal transmission, then it is more convenient to use the language of function blocks -FBD. If the algorithm E3S Web of Conferences 288, 01105 (2021) https://doi.org/10.1051/e3sconf/202128801105 SUSE-2021 has a description of a sequence of operation of keys and relays, then it will be more convenient to use the ladder diagram language LD. With a complex branched algorithm, the ST (Structured Text) language is more convenient. This work uses the CFC and ST languages.

Materials and methods
At the first stage of work on the creation of software, structural and schematic diagrams were developed. According to the schematic diagram, the electrical connections of the controller with external equipment, the list of signals for processing will be taken into account.
The diagram describes 13 input channels and 10 output channels, covering all the needs for the implementation of the automatic transfer switch algorithm. At the inputs and outputs, signal conditioning devices are used that convert the measured physical quantities into standard electrical signals in accordance with the Russian State Standard GOST R 51841-2001. All digital inputs of the general design are designed to detect standard signals with a level of 24 V DC, the current of one digital input is 10 mA.
The operation principle of the developed circuit will be based on the non-parallel operation of the input switches (i.e. both the input and the sectional switch cannot be simultaneously turned on in the automatic mode). In emergency mode, the restoration of normal mode is carried out only by operating personnel.
The ATS device powers the substation via two voltage relays, which monitor undervoltage and overvoltage, phase rotation and imbalance, issuing an alarm to the ATS device in case of protection operation. The ATS device also monitors the temperature of transformers according to signals from two temperature sensors installed directly on the transformers. Additional criteria for tripping any of the upstream breakers are several external signals, such as the 6 kV line-side single-phase earth fault protection and an external trip signal.
Equipment was selected to implement the functionality tasks. The transformer substation is located in a closed room, therefore the equipment is selected taking into account the assessment of the intrinsic safety of electrical circuits in accordance with the Russian State Standard GOST 31610.11-2012/IEC 60079-11: 2006 "Electrical equipment for explosive gas atmospheres" [11]. A PLC was chosen according to its performance: the duration of the controller cycle; time of command execution; industrial network bandwidth; bus bandwidth between the controller and I/O modules; polling cycle time for all controllers in a single master network; reaction time. In addition, utmost attention was paid to the criterion of the spatial arrangement of the individual components and the structure of the PLC. So, according to the classification, PLCs can have a monolithic (monoblock) structure, where the composition of all components, including I/O elements, are fixed in one case and controllers of a modular structure, in which part or all of the I/O units can be structurally separated from the central part of the controller [12].

Results and discussion
The PLCs from different manufacturers offered on the market were analyzed. It was decided to use the PLC160-L from OWEN. The selected PLC type has several advantages: it is made in full compliance with the GOST R 51840-2001 (IEC61131-2) standard, which ensures high hardware reliability; it has class A electromagnetic compatibility. The controller has 16 discrete inputs and 12 discrete outputs (electromagnetic relays), 8 analog inputs and 4 analog outputs, equipped with Ethernet, RS-232, RS-485, USB interfaces. The I/O memory is 360 bytes [13].
The PLC initially has powerful computing resources in the absence of an operating system: a highperformance RISC processor of ARM9 architecture with a frequency of 200 MHz from Atmel; 8 MB of RAM; large 4 MB of ROM; up to 16 kB of non-volatile memory for storing variable values; the default cycle time is 1 ms with 50 logical operations, no network communication. Due to its good performance characteristics, it is widely used in the HVAC systems; heating, automated control systems for water utilities; to control small machines and mechanisms; for the automation of commercial equipment; in the energy and construction sectors, etc. It is the optimal controller when building distributed control and dispatching systems using both wired and wireless technologies [14].
RNPP-311M relays were used to control the section voltage and disconnect the 380 V/50 Hz load in case of unacceptable voltage fluctuations with a duration of at least 0.02 sec; during violation of the amplitude symmetry of the mains voltage or phase failure. The latter are widely used to protect air conditioning, compressor, refrigeration equipment.
To control and monitor the transformer temperature, the Termodat-10K with a durable metal case in a panelmounted design was used. The device is of high versatility, it is designed to work with thermocouples, thermal resistances, as well as to measure DC voltage in the range of 0-50 mV and current in the range of 0-20 mA. It has a four-digit LED indicator: the current temperature is shown during the main mode of operation, a blinking numerical value of the parameter is displayed when the device is setting up.
When developing a main program in CoDeSys V2.3 the CFC language was chosen ( Fig. 1) [15]. All signals with their purposes are listed in the program (Fig. 2). The program also includes a functional block for remote control and setting the selection of the control key mode. For this, there are three input fields in the variable input field of the SAC function block -input variables, output variables, and ordinary variables used to describe the block. The input variables will take the values of the set block's inputs, while the output variables will become outputs.
To write the logic of the block, the IF operator is used, which allows one to describe the operating conditions of the block and set the corresponding values at its output, and the AND operator, which forms true at the output only if all values at the operator's input are true. In addition, since one of the inputs must be negative, the NOT operator is used, which inverts the variable, so the AND operator will form true only when one of the inputs is in the true state, and the second is inverted, that is, in the false state: Fig. 3. Description of the operator output.
Next, the THEN operator is written, after which the truth values are set at the block outputs. For convenience, 1 will be issued at the first output of block when the second output is 0, to facilitate receiving an inverse signal from the block.
Further, the ELSE condition is introduced, which describes the truth in a situation when the IF content is not satisfied, that is, the inputs In1 and In2 are not equal to 0 and 1, respectively. After the ELSE condition, the output values for such a case are entered. Since one of the outputs is inverse, then the values of O1 and O2 will be taken as 0 and 1, respectively. After the end of the input of the condition, the END_IF command is added, which means the end of the input of the conditions of the IF operator.
To build the logic of disconnecting one of the inputs, the principle of processing the input signals affecting the disconnection has been determined. Timers are introduced into the program.
The program includes the signals to control the voltage on the input switch, the temperature of the transformer, a single-phase ground fault signal. Thus, these signals form a group of signals that are equal in meaning and open the input switch without inhibiting the switching on the reserve.
After the completion of the collection of opening circuit breaker tripping signals, the circuit is supplemented with elements that issue pulse signals. After assembling the sets of signals that act on opening the circuit breaker without inhibiting the ATS, a circuit breaker tripping block is added, composed of signals with the ATS inhibited (these are the signals "Input emergency", "Disable external protections").
The final stage in the creation of the algorithm and logic of the ATS operation was the inclusion of the section switch operation in it.
Thus, the algorithm for controlling three circuit breakers of a transformer substation is described, depending on which signals will come to the input of the logic controller (Fig. 4).
To test the work without involving a real PLC and logic processing, the emulation mode was used, which is provided by the Codesys V.2.3 software. The project imitates the statuses of the input switches. The operation of the substation power circuit in normal mode is restored with the ATS function disabled. At the time of emulation, everything is highlighted. All active signals are highlighted in blue, inactive signals are highlighted in black.  In addition to the emulation function, the software package provides the ability to visualize the work. It allows one to establish a visual and informative diagram of the device's operation, and to display a list of equipment involved in the project and show its state at the time of the program operation (Fig. 6).

Conclusions
ATS devices are relevant for power supply systems. Correct configuration of ATS equipment at all levels of power supply can prevent losses during its implementation. Currently, high-speed ATS systems allow one to effectively cope with the task of backup power input. The work implements the logic and algorithm of the automated transfer switch at the 6/0.4 kV substation. In addition to the obvious advantages of automatic control of the operation of switches, microprocessor controllers can be connected to an industrial communication network, which makes it possible to remotely monitor and control and transmit status information.