A method and system for simulating operation of a complex power supply system

CN122801271APending Publication Date: 2026-09-22BEIJING 21VIANET DATA CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610756742.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

这样方式能够模拟切换逻辑,但是外挂模拟器可移动性差,无法满足异地学员的培训,从而导致运行效率比较低

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801271A_ABST
    Figure CN122801271A_ABST
Patent Text Reader

Abstract

This application relates to the field of simulation technology, specifically to a method and system for simulating the operation of a complex power supply system. It addresses the problem of poor portability of external simulators, which cannot meet the training needs of students in different locations. The method includes: responding to control commands triggered by the user on the operating interface; determining the mains power status based on the voltage and current set by the user in the control commands; and integrating the medium-voltage power distribution system, the diesel generator emergency power supply system, and the low-voltage power supply system into the operating interface. With the support of control logic, the method simulates the state changes of electrical components in each system and displays them to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of simulation technology, specifically to a working simulation method and system for a complex power supply system. Background Technology

[0002] Mains power switching logic is a core element of data centers, and operations and maintenance personnel need to understand it to perform independent switching operations. In most data centers, this is achieved through theoretical explanations in textbooks or by playing back previous operation videos for operations and maintenance personnel to learn from. However, this approach lacks a hands-on experience for them.

[0003] The relevant technology employs a combined simulation method combining environmental monitoring, the Internet of Things (IoT), and an external switch simulator. Specifically, simulation software is used to simulate scenarios, which are then sent to the actual control system PLC (Programmable Logic Controller) cabinet. The actions issued by the PLC cabinet are then sent to the external switch simulator, which performs the actions. This method can simulate switching logic, but the external simulator has poor portability, making it unsuitable for training students in different locations, resulting in relatively low operational efficiency. Summary of the Invention

[0004] This application provides a method and system for simulating the operation of a complex power supply system, which enables visualization of automatic mains power control in a simulation environment and improves operating efficiency.

[0005] In a first aspect, this application provides a method for simulating the operation of a complex power supply system, comprising: Responding to control commands triggered by the user on the operation interface, the mains power status is determined based on the simulated voltage and simulated current provided by the user in the control commands; wherein, the operation interface includes: an analog circuit, and operation modes corresponding to multiple power supply systems included in the analog circuit; the analog circuit is a single-line circuit diagram integrating multiple power supply systems for power supply; The state of electrical components in the analog circuit is determined by using the control logic to simulate control of the mains power under the mains power condition. According to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit, the electrical components in the analog circuit are adjusted, and the adjusted analog circuit is displayed to the user.

[0006] The above method can display an operation interface that includes analog circuits and operation modes corresponding to various power supply systems. Users can view and trigger the operation interface to generate the mains power status. Under the mains power status, the analog circuit is adjusted based on the operation mode and control logic selected by the user in the control command, and the changed analog circuit is displayed. This enables the visualization of automatic mains power control in the simulation environment, improving operating efficiency.

[0007] In one possible embodiment, responding to a control command triggered by the user on the user interface includes: Receives interface elements triggered by the user on the operation interface; wherein, the interface elements include elements for controlling the operation mode, voltage simulation elements, and current simulation elements; The control commands are determined using the variables corresponding to the interface elements.

[0008] In one possible embodiment, determining the mains power state based on the user-simulated voltage and simulated current in the control command includes: If the simulated voltage in the control command is lower than the set no-voltage lower limit threshold, the simulated current is lower than the set no-current lower limit threshold, and the duration exceeds the first preset time, then the mains power state is a power outage state. If the simulated voltage in the control command is higher than the set lower limit threshold of the reference voltage and the duration exceeds the second preset time, then the mains power status is the power-on status.

[0009] In one possible embodiment, the power supply system composed of the analog circuit includes at least one medium-voltage power supply system from the mains, a low-voltage power supply system, and an emergency power supply system; the control logic is determined in the following manner: If the power supply of all circuits of a medium-voltage power supply system with at least one mains power supply is converted to a power supply with at least one mains power supply, and the bus tie switch connecting multiple mains power supplies is closed, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply. If the power supply of all circuits of the medium-voltage power supply system with at least one mains power supply is converted to power supply with at least one mains power supply and the bus tie switch connected to multiple mains power supplies is tripped, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply and the power supply logic corresponding to the low-voltage power supply system. If at least one medium-voltage power supply system with mains power is switched to a medium-voltage power supply system with at least one mains power, and all mains power supplies are unable to provide power, then the control logic is determined to be the power supply logic for switching from mains power supply to emergency power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, the system is switched to supply power from at least one mains power supply line of the medium-voltage power supply system, and the bus tie switch connecting multiple mains power supply lines is closed, then the control logic is determined to be the power supply logic for switching from emergency power supply to mains power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, and the mains power supply line of the medium-voltage power supply system is switched to at least one mains power supply line, and the bus tie switch connecting multiple mains power supply lines is tripped, then the control logic is determined to be the power supply logic for switching the emergency power supply to the mains power supply and the power supply logic corresponding to the low-voltage power supply system.

[0010] In one possible embodiment, adjusting the electrical components in the analog circuit according to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit includes: If the user selects the automatic mode in the control command, the control program corresponding to the state adjustment electrical component in the analog circuit is called, and the state of the electrical component in the analog circuit is used as the input of the called control program. The control program is executed to obtain the adjusted analog circuit. If the user selects the manual mode in the control command, then the system responds to the user's manual command on the operation interface. When the state of the electrical component determined by the control logic is the same as the state of the electrical component selected by the user in the manual command, the system calls the control program corresponding to the electrical component in the analog circuit that adjusts the state. The system uses the state of the electrical component in the analog circuit as the input of the called control program, executes the control program, and obtains the adjusted analog circuit.

[0011] In one possible embodiment, before invoking the control program corresponding to the state-adjusting electrical element in the analog circuit, the method further includes: If the user selects the automatic mode in the control command, then the control method of the state-adjusting electrical element in the analog circuit is determined to be the remote control mode. If the user selects the manual mode in the control command, then the control method of the state-adjusting electrical components in the analog circuit is determined to be the local control method. The control mode of the state-adjusting electrical components in the analog circuit is determined when the user triggers the command on the operation interface to display the first sub-operation page.

[0012] In one possible embodiment, after displaying the adjusted analog circuit to the user, the method further includes: In response to a user's trigger command on the operation interface, the first sub-operation page triggered by the trigger command is displayed; In response to the user's selection command, the system uses the processing strategy corresponding to the selected fault mode in the selection command to simulate the control of the mains power in the mains power operation environment, determines the state of the electrical components in the simulation circuit, adjusts the simulation circuit according to the state of the electrical components in the simulation circuit, and displays the adjusted simulation circuit to the user.

[0013] In one possible embodiment, after displaying the adjusted analog circuit to the user, the method further includes: Acquire monitoring records; wherein the monitoring records include the switching status and time of the analog circuit; In response to a user-triggered start command, a monitoring interface is displayed, which includes the status of the analog circuit's switches and the time.

[0014] In one possible embodiment, the method further includes: Responding to user test commands on the operating interface, verifying whether the control commands match the adjusted analog circuit; or verifying the correctness of the program execution state; or verifying the response speed and stability.

[0015] Secondly, this application provides a working simulation system for a complex power supply system, comprising: The response module is used to respond to control commands triggered by the user on the operation interface, and determine the mains power status based on the simulated voltage and simulated current in the control command; wherein, the operation interface includes: an analog circuit, and operation modes corresponding to multiple power supply systems included in the analog circuit; the analog circuit is a single-line circuit diagram integrating multiple power supply systems for power supply; A determination module is used to determine the state of electrical components in the analog circuit by using the control logic to simulate control of the mains power under the mains power state. The display module is used to adjust the electrical components in the analog circuit according to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit, and to display the adjusted analog circuit to the user.

[0016] Thirdly, this application provides an electronic device, comprising: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method described in any one of the first aspects according to the obtained program instructions.

[0017] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in any one of the first aspects.

[0018] Fifthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of the first aspects. Attached Figure Description

[0019] Figure 1 A flowchart illustrating a method for simulating the operation of a complex power supply system, as provided in this application embodiment; Figure 2A schematic diagram of an operation interface provided in an embodiment of this application; Figure 3 A schematic diagram of another user interface provided in an embodiment of this application; Figure 4 A schematic diagram illustrating another user interface provided in an embodiment of this application; Figure 5 A schematic diagram of a fault interface provided in an embodiment of this application; Figure 6 A structural diagram of a working simulation system for a complex power supply system provided in this application embodiment; Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0021] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, and / or more; this application does not impose limitations on its embodiments.

[0022] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already and / or necessarily used such solutions.

[0023] The design concept of the embodiments of this application is briefly introduced below: Mains power switching logic is a core element of data centers, and operations and maintenance personnel need to understand it to perform independent switching operations. In most data centers, this is achieved through theoretical explanations in textbooks or by playing back previous operation videos for operations and maintenance personnel to learn from. However, this approach lacks a hands-on experience for them.

[0024] The relevant technology employs a combined simulation method combining environmental monitoring, the Internet of Things (IoT), and an external switch simulator. Specifically, simulation software is used to simulate scenarios, which are then sent to the actual control system PLC (Programmable Logic Controller) cabinet. The actions issued by the PLC cabinet are then sent to the external switch simulator, which performs the actions. Users learn about mains power switching by observing the actions of the external switch simulator. This method can simulate switching logic, but the external simulator requires investment and has poor portability, making it unsuitable for training trainees in remote locations.

[0025] Based on this, embodiments of the present invention provide a method and system for simulating the operation of complex power supply systems. This system is positioned as a PLC control program developed based on the Siemens TIA Portal V17 platform. It utilizes the platform's built-in simulation software to achieve a fully virtual simulation of high- and low-voltage power switching logic, without relying on physical I / O points or physical devices. Data interaction is achieved solely through PLC internal data logic programming and the user interface. It integrates diesel generators, medium-voltage mains power, and low-voltage mains power, using a single-line diagram to construct an integrated user interface. It supports real-time observation of operations and actions, 100% reproducing real-world scenarios, and accurately simulating power switching control logic under multiple scenarios. This meets the needs of maintenance training, power switching strategy verification, and control program debugging. It features no dependence on physical equipment, full coverage of simulation scenarios, diverse switching modes, an intuitive and convenient user interface, and modular design for functional expansion.

[0026] The method proposed in this invention can also be used for scenario drills: simulating real-world scenarios such as single-circuit mains power failure, dual-circuit mains power interruption, and diesel generator failure. It supports collaborative demonstrations of manual operation and automatic logic, allowing maintenance personnel to master emergency switching operation procedures in an environment without physical equipment risks, thereby improving their fault handling capabilities.

[0027] The application scenarios described below are briefly explained. It should be noted that these scenarios are for illustrative purposes only and are not intended to limit the scope of this application. In actual implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.

[0028] The method proposed in this invention is applied to electronic devices. For example, the electronic device in this invention can be an electronic device with an image display device (e.g., a display panel); for example, it can be a smart terminal, smart mobile terminal, tablet computer, laptop computer, smart handheld device, personal computer (PC), computer, smart screen, display device, in-vehicle device, various wearable devices, personal digital assistant (PDA), etc.; among which, wearable devices include virtual reality (VR) devices, augmented reality (AR) devices, etc.

[0029] Another example is that the electronic device can also be a server connected to a device with display functionality (e.g., a display device). For example, the server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server can be connected to the device with display functionality via wired or wireless means, and the present invention does not limit the connection method.

[0030] It is understood that the present invention does not limit the specific type of the above-mentioned electronic device.

[0031] The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for illustration and explanation of the present invention and are not intended to limit the present invention. Furthermore, the embodiments of the present invention and the features therein can be combined with each other without conflict.

[0032] The working simulation method of the complex power supply system provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings: Figure 1 This diagram illustrates the workflow of a method for simulating the operation of a complex power supply system according to an embodiment of the present invention. Figure 1 As shown, the specific process of this method is as follows: S110: Responds to control commands triggered by the user on the operation interface, and determines the mains power status based on the simulated voltage and simulated current in the control commands; wherein, the operation interface includes: analog circuit, operation modes corresponding to multiple power supply systems contained in the analog circuit; the analog circuit is a single-line circuit diagram that integrates multiple power supply systems for power supply.

[0033] For example, the power supply system composed of analog circuits provided in the embodiments of the present invention includes at least one medium-voltage power supply system with mains power, a low-voltage power supply system, and an emergency power supply system.

[0034] In other words, this embodiment of the invention provides both mains power supply and emergency power supply, namely, diesel engine power supply. During mains power supply, the mains power supply can include multiple sources. For example, this embodiment proposes two mains power sources: mains power 1 and mains power 2. When both mains power 1 and mains power 2 fail, the diesel engine is activated to supply power. When mains power 1 or mains power 2 is supplying power alone, power needs to be supplied through the medium-voltage bus tie; if the medium-voltage bus tie cannot be closed, it is necessary to consider the low-voltage bus tie to power both loads.

[0035] Combination Figure 2 The diagram illustrates an operating interface. The interface employs an integrated full-screen layout, displaying all devices on a single screen. It is divided into zones: "Medium Voltage Mains Zone - Diesel Generator Parallel Unit Zone - Low Voltage Automatic Transfer Switch Zone," symmetrically distributed. Each zone is connected by a single line, clearly showing the power flow. The interface layout is as follows: Top: System title bar + mains power simulation slider + diesel generator parallel operation area, 6 diesel generators arranged in parallel → parallel operation switch → diesel generator bus, labeled with diesel generator numbers (EG1~EG6). Central medium-voltage mains power area: Single-line diagram topology area, drawn according to power flow direction. Dual mains power inlet lines → segmented busbars → 5 transformers in each segment → bus tie switch, labeled with equipment numbers (e.g., mains power inlet line 1 / 2, bus tie AH13); Low-voltage standby automatic transfer zone: 5 sets of low-voltage systems are connected in parallel, each set includes dual incoming lines → bus tie switch → load, and is connected to the output terminal of the medium-voltage transformer; Bottom: Screen switching button, used to switch between the main screen, alarm screen, and function logic description screen.

[0036] The system uses standard single-line diagram symbols from the power industry, combined with dynamic styles to achieve status visualization.

[0037] In this embodiment of the invention, the power sources include mains power 1, mains power 2, and a diesel engine. The power supply system includes a medium-voltage power distribution system, a diesel generator system, and a low-voltage power distribution system. The operating modes for both the medium-voltage and low-voltage power distribution systems include automatic transfer, manual transfer, automatic reset, and manual reset. The operating modes for the diesel generator system include automatic start, manual start, automatic stop, and manual stop. Automatic transfer of the medium-voltage power distribution system means that when the mains power fails, the relevant mains power switches are automatically disconnected, and other power sources are automatically connected. For example, if mains power 1 fails, the mains power 1 incoming line switch is automatically disconnected, and the bus tie switch is automatically closed. If both mains power lines fail, the relevant mains power incoming line switches are automatically disconnected, and the diesel generator incoming line switch is automatically closed once power is supplied to the front end. Manual transfer of the medium-voltage power distribution system means that when the mains power fails, the relevant mains power switches are manually disconnected, and other power sources are manually connected. Automatic reset of the medium-voltage power distribution system means that when the mains power is restored, the relevant mains power switches are automatically closed, and other power sources are automatically disconnected. For example, when the mains power supply 1 changes from loss to restoration, the mains power supply 1 incoming switch automatically closes and the bus tie switch automatically disconnects. When the dual mains power supply changes from loss to restoration, the relevant mains power incoming switch automatically closes and the diesel generator power supply related switch disconnects. The manual reset function of the medium-voltage power distribution system refers to manually closing the relevant mains power switch and manually disconnecting other power sources when the mains power is restored.

[0038] The automatic start of a diesel generator system refers to the automatic starting of the diesel generators when both mains power lines fail, completing the system's parallel output. For example, when both mains power 1 and mains power 2 fail, the diesel generators receive a start signal, and all six diesel generators start randomly. The first generator closes its incoming line switch, and the others close theirs synchronously. When five generators are in parallel operation, the GH11 and GH12 output switches are closed (subsequent logic switching is handled by the medium-voltage power distribution system). Manual start of a diesel generator system refers to manually starting the diesel generators when both mains power lines fail. After the generators automatically complete parallel operation, the GH11 and GH12 output switches are manually closed. Automatic shutdown of a diesel generator system means that after the generators are switched back to mains power, the GH11 and GH12 output switches are automatically opened, and the generators automatically shut down after cooling. Manual shutdown of a diesel generator system means that after the generators are switched back to mains power, the GH11 and GH12 output switches need to be manually opened to manually stop the generators.

[0039] Automatic transfer switching in a low-voltage power supply and distribution system refers to the automatic disconnection of the low-voltage incoming switch and subsequent automatic closing of the bus tie switch when one mains power line fails. Manual transfer switching in a low-voltage power supply and distribution system refers to the manual disconnection of the low-voltage incoming switch and subsequent manual closing of the bus tie switch when one mains power line fails. Automatic reset switching in a low-voltage power supply and distribution system refers to the automatic closing of the low-voltage incoming switch when the bus tie switch automatically disconnects and the two mains power lines are functioning normally. Manual reset switching in a low-voltage power supply and distribution system refers to the manual disconnection of the bus tie switch and manual closing of the low-voltage mains power incoming switch when both mains power lines are functioning normally.

[0040] Combined Figure 2As shown, the element controlling the operation mode is a circular rotating graphic. The voltage analog element is... Figure 2 The voltage operation diagrams are shown on the upper left and right sides; the current simulation element is... Figure 2 The current operation diagrams are shown on the upper left and right sides.

[0041] In detail, the interface elements are bound to the PLC's internal data block variables, and clicking the element triggers the assignment of the variable value.

[0042] For example, the voltage analog element includes a slider, which the user can move to set the voltage value, in conjunction with... Figure 2 As shown, the voltage analog element on the left controls the voltage of mains power 1, and the voltage analog element on the right controls the voltage of mains power 2. Similarly, the current analog element includes a slider, which the user can move to set the current value. Figure 2 As shown, when mains power 1 is under load, the current simulation element on the left controls the current of mains power 1; when mains power 2 is under load, the current simulation element on the right controls the current of mains power 2. When the diesel generator is under load, the current simulation elements on the left and right control the load current, thereby controlling the number of diesel engines started.

[0043] Specifically, the steps for responding to control commands triggered by the user on the user interface include: Receive interface elements triggered by the user on the operation interface; wherein, the interface elements include elements that control the operation mode, voltage simulation elements, and current simulation elements; determine the control command using the variables corresponding to the interface elements.

[0044] In detail, the system receives information about the user moving a slider to determine the simulated voltage and current. It also receives information about the user moving an operation mode button, calls the program, uses the voltage slider's status as the corresponding voltage variable, and uses this variable as the program's input value. After program execution, the simulated voltage value is determined. Similarly, the system calls the program, uses the current slider's status as the corresponding current variable, and uses this variable as the program's input value. After program execution, the simulated current value is determined. Finally, the system uses the user moving an operation mode button as the corresponding operation mode variable, calls the program, uses this variable as the program's input value, and executes the program. After program execution, the simulated operation mode is determined, and the simulated voltage, current, and operation mode are used as control commands.

[0045] In some embodiments, determining the mains power state based on the voltage and current simulated by the user in the control command includes: If the simulated voltage in the control command is lower than the set no-voltage lower limit threshold, the simulated current is lower than the set no-current lower limit threshold, and the duration exceeds the first preset time, then the mains power state is a power outage state. If the simulated voltage in the control command is higher than the set lower limit threshold of the reference voltage and the duration exceeds the second preset time, then the mains power status is the power-on status.

[0046] For example, the above-mentioned scheme for determining the mains power status can be encapsulated independently. The independently encapsulated module is called FB Mains Detect, which provides the mains power status to the medium-voltage / diesel generator control module, that is, the mains power status is used as the input of the medium-voltage / diesel generator control module.

[0047] After encapsulation, the simulated voltage and threshold can be used as inputs to the encapsulated program. The encapsulated program is then executed, specifically determining whether the simulated voltage is lower than the set no-voltage lower limit threshold, whether the simulated current is lower than the set no-current lower limit threshold, and whether the duration exceeds a first preset time; and whether the simulated voltage is higher than the set reference voltage lower limit threshold and whether the duration exceeds a second preset time. If the simulated voltage and current in the control command are lower than the set no-voltage lower limit threshold and the duration exceeds the first preset time, the mains power state is set to power outage as the output. If the simulated voltage in the control command is higher than the set reference voltage lower limit threshold and the duration exceeds the second preset time, the mains power state is set to power on as the output.

[0048] In some embodiments, the control logic is determined in the following manner: If the power supply of all circuits of a medium-voltage power supply system with at least one mains power supply is converted to a power supply with at least one mains power supply, and the bus tie switch connecting multiple mains power supplies is closed, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply. If the power supply of all circuits of the medium-voltage power supply system with at least one mains power supply is converted to power supply with at least one mains power supply and the bus tie switch connected to multiple mains power supplies is tripped, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply and the power supply logic corresponding to the low-voltage power supply system. If at least one medium-voltage power supply system with mains power is switched to a medium-voltage power supply system with at least one mains power, and all mains power supplies are unable to provide power, then the control logic is determined to be the power supply logic for switching from mains power supply to emergency power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, the system is switched to supply power from at least one mains power supply line of the medium-voltage power supply system, and the bus tie switch connecting multiple mains power supply lines is closed, then the control logic is determined to be the power supply logic for switching from emergency power supply to mains power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, and the mains power supply line of the medium-voltage power supply system is switched to at least one mains power supply line, and the bus tie switch connecting multiple mains power supply lines is tripped, then the control logic is determined to be the power supply logic for switching the emergency power supply to the mains power supply and the power supply logic corresponding to the low-voltage power supply system.

[0049] For example, in combination Figure 2 As shown, the architecture logic of the medium-voltage power supply system is as follows: the medium-voltage dual-circuit mains power is divided into two independent sections, each section has 5 transformers, and the data block defines the variables "section 1 status", "section 2 status" and "bus tie switch status"; The switching of power supply logic corresponding to at least one mains power supply is triggered as follows: when the "Main Power 1 Power Outage" variable in the data block is TRUE (simulated power outage) and the delay reaches the set value, the program triggers the bus tie switch closing logic, updates the "Bus Tie Switch Status" to TRUE, and records the switching time at the same time; Manual operation processing: When the operation interface issues the "bus joint / open" command, the program checks the current mains power status (such as whether the manual operation conditions are met). After the check passes, the "manual closing command" variable is set / reset, the switch status is switched, and feedback is sent to the interface. The power supply logic is based on at least one mains power supply: if a single mains power supply fails, the bus coupler is automatically triggered; after the mains power is restored, the program automatically disconnects the bus coupler and switches back to the original mains power supply. Power supply logic for switching from mains power to emergency power supply: When both mains power lines fail, the diesel generator will automatically switch to operation. The power supply logic for emergency power supply switching to mains power supply: when any mains power is restored, it will automatically switch back to mains power operation; When the operation mode is self-starting and self-recovering, the above logic is all handled automatically; When the operating mode is automatic transfer and manual reset: if a single mains power supply fails, the bus tie will automatically shut off; after the mains power is restored, the bus tie tripping command must be manually triggered; if both mains power supplies fail, the diesel generator will automatically switch to operation; if any mains power supply is restored, the mains power supply must be manually switched back to operation. When the operation mode is manual-on-automatic-reset: if a single mains power supply fails, the bus coupler needs to be manually triggered; after the mains power is restored, the program automatically disconnects the bus coupler and switches back to the original mains power supply; if both mains power supplies fail, the diesel generator operation needs to be manually switched on; if any mains power supply is restored, the mains power operation will automatically switch back. When the operating mode is manual transfer and manual reset: the mains power 1 incoming switch, mains power 2 incoming switch, diesel generator 1 incoming switch, diesel generator 2 incoming switch, and bus tie switch all need to be operated manually; The medium-voltage mains power switching logic is divided into different states for handling. This addresses the challenge of handling the same state with different timing sequences, such as the situation where a single mains power failure triggers the bus tie connection, while a single mains power restoration restores the bus tie operation. However, the former is a switching phase, while the latter is a restoration phase. We employ a separate memory function for mains power failure and restoration, with mutual clearing of these memories. When one mains power line fails, the failure memory is entered while the restoration memory is cleared; conversely, when one mains power line restores, the restoration memory is entered while the failure memory is cleared. This makes it easy to determine whether the bus tie connection automatically switches on or off upon restoration.

[0050] Interlocking function: Only two of the five switches AH02, BH02, AH13, AH05, and BH05 can be closed at the same time, i.e., a five-to-two design. Furthermore, AH02 and AH05 cannot be closed at the same time, and BH02 and BH05 cannot be closed at the same time.

[0051] The logic design for activating the emergency power supply in the power supply logic for switching from mains power to emergency power supply is as follows: Triggering condition: When both "Main Power 1 Power Loss" and "Main Power 2 Power Loss" output in the data block are TRUE (dual mains power outage), the program triggers the "Main Power Incoming Switch Trip" instruction (updates the corresponding BOOL variable to FALSE) and simultaneously sends 6 diesel generator start commands; Parallel operation control: When the dual mains power supply is interrupted and the mains power input switch is in the open state, the system sends a command to start the diesel generator. Diesel generators 1 to 6 will start parallel operation randomly. When the number of parallel generators is ≥5, the diesel generator output switch will be automatically closed. Manual operation support: The operation interface allows manual clicking of the "Diesel Generator Start / Stop" and "Parallel / Decouple" buttons. Instructions are written to the data block as "Manual Start / Stop Instruction" and "Manual Parallel Instruction". The program prioritizes the execution of manual instructions (such as manually stopping the diesel generator, which immediately interrupts the automatic operation logic). The logic for shutting down the emergency power supply in the power supply logic for switching from mains power to emergency power is as follows: When the mains power is restored (the "Mains Power 1 / 2 Status" in the data block is TRUE), after successfully restoring to mains power operation, the program triggers the diesel generator parallel operation to exit, disconnects the diesel generator output switch, and shuts down the diesel generator operation; if a manual exit command is received, the exit logic is executed immediately.

[0052] Adding / reducing generator mode: When the adding / reducing generator mode is enabled, the load power P of the diesel generator parallel system is greater than (N-2). When P = 1800 + 200, automatic addition of equipment occurs with no delay; when P < (N-1) Between 1800 and 200, automatic generator reduction occurs, with a reduction interval set to 30 seconds. At least two diesel generators must remain running. If one generator fails, the standby generator automatically starts. If two or more generators fail, all idle generators start and operate in parallel. When the generator reduction / addition mode is disabled, automatic generator reduction / addition will no longer occur.

[0053] Note: When the diesel generator is under load, the output power of the parallel system is P=10.5. (Current simulator value of AC 1 + Current simulator value of AC 2).

[0054] The power supply logic design for the low-voltage power supply system is as follows: Switching logic: The low-voltage system is divided into 5 independent systems. The data block defines "incoming line status" and "bus tie status" variables for each system as a supplement to the medium-voltage automatic transfer switch. The low-voltage system independently judges the low-voltage incoming line voltage. If the low-voltage voltage is lower than a set value and exceeds a set time, the program triggers the low-voltage bus tie switch to achieve supplementary switching of the low-voltage side power supply. When a single mains power supply fails, the bus tie switch closes. When both mains power supplies are normal, the bus tie switches operate. When both mains power supplies fail, the switches remain unchanged.

[0055] Manual operation: Supports manual operation of incoming line switches and bus tie switches of each low-voltage system through the interface. Operation instructions are written into the corresponding data block variables, and the program executes the switch state switching. Mode adaptation: Consistent with medium-voltage systems, it supports four operating modes, and the logic execution mode is controlled by the corresponding variable in the data block "DB_Switch_Mode".

[0056] Switch interlocking function: Low-voltage two incoming lines and one bus tie switch can only close two switches at the same time, i.e., three-to-two design.

[0057] S120: The result of using control logic to simulate mains power under mains power conditions, determining the state of electrical components in the analog circuit.

[0058] The states of electrical components in the analog circuit include: the states of switches corresponding to at least one medium-voltage mains power supply system, the states of switches corresponding to the low-voltage power supply system, and the states of switches corresponding to the emergency power supply system.

[0059] For example, in combination Figure 2 As shown, the single-circuit mains power failure bus tie automatic transfer switch: The logic for the mains power 1 to change from an incoming power state to a de-energized state, which is evolved from the power supply logic corresponding to at least one mains power source, is as follows: it is determined that the incoming line has no voltage and no current for 3 seconds, the I section busbar has no voltage (the synchronous incoming line determines that the busbar has no voltage for 3 seconds), the I section outgoing line switch is opened, the mains power incoming line switch AH02 is opened, it is determined that AH02 is in the open position, the II section busbar has voltage and the bus tie is in the open position, the AH13 bus tie switch is closed after a delay of 2 seconds, the bus tie switch AH13 is closed and the I section busbar has voltage for 2 seconds, and the I section outgoing line switches are closed sequentially after a 2-second interval.

[0060] The logic for the mains power 2 to change from an incoming power state to a de-energized state, which is evolved from the power supply logic corresponding to at least one mains power source, is as follows: it is determined that the incoming line has no voltage and no current for 3 seconds, the II section busbar has no voltage (the synchronous incoming line determines that the busbar has no voltage for 3 seconds), the II section outgoing line switch is opened, the mains power incoming line switch BH02 is disconnected, it is determined that BH02 is in the open position, the I section busbar has voltage and the bus tie is in the open position, the AH13 bus tie switch is closed after a delay of 2 seconds, the bus tie switch AH13 is closed and the II section busbar has voltage for 2 seconds, and the I section outgoing line switch is closed sequentially after a 2-second interval.

[0061] The power supply logic evolution for switching from mains power to emergency power supply is as follows: When both mains power sources fail, the power supply will switch to diesel generator. Each circuit is judged to be without voltage and current for 3 seconds (based on the last circuit power outage time). The AH02 and BH02 mains power incoming switches and mains power feeder switches are disconnected. After a 2-second delay, a diesel generator start command is sent. The diesel generator receives the start command and starts after a 0.8-second delay and locks the start signal. When the number of diesel generators in parallel reaches 5, the diesel generator GH11 and GH12 feeder switches are closed. The diesel generator incoming switches AH05 and BH05 are detected to be under voltage and close after a 1-second delay. When the mains power section I bus and section II bus are under voltage, the feeder switches of each section close at 2-second intervals.

[0062] The power supply logic for switching from emergency power supply to mains power evolves from the loss of power to the restoration of power in both mains power sources. The logic for switching from diesel generator to mains power is as follows: 1. The logic of the two mains power outages becoming mains power 1 power restoration is as follows: Check if there is voltage at the front end of AH02 for 5 seconds; check the status of the bus tie switch (if any) and the diesel generator incoming switch; check the bus tie switch and the diesel generator incoming switch; check the open position of the diesel generator incoming switch and the bus tie; check if the dual mains power incoming switches are in the open position and there is no voltage on the bus for 1 second; close the mains power incoming switch AH02; check if BH02 is in the open position, the I section bus has voltage, and the bus tie is in the open position for 2 seconds; close the bus tie AH13 and close the I section outgoing switches in sequence after 2 seconds; check if the bus tie is in the closed position and the II section bus tie has voltage for 2 seconds; close the II section outgoing switches in sequence after 2 seconds.

[0063] 2. The logic of the two mains power outages becoming mains power 2 power restoration is as follows: Check if there is voltage at the front end of BH02 for 5 seconds; check the status of the bus tie switch (if any) and the diesel generator incoming switch; check the bus tie switch and the diesel generator incoming switch; check the open position of the diesel generator incoming switch and the bus tie; check if the dual mains power incoming switch is in the open position and there is no voltage on the bus for 1 second; close the second mains power incoming switch BH02; check if AH02 is in the open position, the II section bus has voltage, and the bus tie is in the open position for 2 seconds; close the bus tie AH13 and close the II section outgoing switch in sequence after 2 seconds; check if the bus tie is in the closed position and the I section bus tie has voltage for 2 seconds; close the I section outgoing switch in sequence after 2 seconds.

[0064] The logic for switching from single-path AC power to dual-path AC power operates in self-reset mode. Determine if there is voltage at the front end of AH02 (or BH02) for 5 seconds, determine if the bus tie is in the closed position, open the bus tie switch and the power supply side feeder switch, determine if the bus tie is in the closed position and if there is no voltage on section I bus (section II bus) for 2 seconds, determine if the mains power incoming switch AH02 (BH02) is in the open position, close the mains power incoming switch AH02 (BH02), determine if there is voltage on section I bus (section II bus) for 2 seconds, and close the power supply side feeder switches in sequence at 2-second intervals.

[0065] The evolution of the power supply logic for emergency power supply switching to mains power supply: Diesel generator to mains power manual reply: First, switch AH02, AH05, BH02, BH05, and AH13 to local control, disconnect the diesel generator incoming line switch AH05 and BH05, close the mains power incoming line switch AH02 (or BH02), and close switch AH13 (if necessary). Finally, restore switches AH02, AH05, BH02, BH05, and AH13 to remote control; the feeder switches will operate automatically without operation.

[0066] Diesel generator addition / reduction logic: In self-start mode, if both mains power supplies fail, the diesel generators will start and enter acceleration / deceleration mode after a 1-minute delay, satisfying P > (N-2). The generator is added at 1800+200 rpm with no delay, and the generator is removed at 5-second intervals. When the diesel generator is under load, the simulated current can simulate the changes in the diesel generator load current, thus simulating the generator addition and subtraction logic. The addition and subtraction logic can only be executed when the generator function is activated; when it is deactivated, the addition and subtraction logic does not intervene.

[0067] The power supply logic corresponding to the low-voltage power supply system is as follows: 1. Automatic transfer and automatic recovery: If a single mains power outage lasts for more than 12, 14, 16, 18, or 20 seconds, the mains power incoming switch will close after a 2-second delay. If the mains power is restored, the mains power incoming switch will close after a 2-second delay. The mains power incoming switch will close after a 1-second delay. When both mains power supplies fail, the switch remains in its original state. When one mains power supply is restored, the switch status is checked. When the mains power on the receiving side is brought under load, when both mains power supplies are restored, the busbar is connected to the switch, and the mains power incoming line switch is closed after a 1-second delay.

[0068] 2. Automatic switching and manual recovery: When the mains power fails, the same applies as above. When the mains power is restored, the switch remains inactive. The mains incoming switch and the bus tie switch need to be operated locally. First, disconnect the bus tie switch, then close the mains incoming switch. After the operation is completed, the switch will be switched to remote control.

[0069] 3. Manual to automatic reset: When the mains power fails, the switch remains in its original state and does not operate, requiring manual operation. When the mains power is restored, it can automatically reset.

[0070] 4. Manual switch: The switch remains inactive during both mains power failure and restoration, requiring manual operation.

[0071] Based on the above, when the mains power includes two mains power sources, mains power 1 and mains power 2, if the power supply status of mains power 1 and mains power 2 changes to mains power 1 being de-energized and mains power 2 being energized, the power supply logic corresponding to mains power 1 is adopted. The states of the electrical components in the analog circuit are: AH02 is open, GH01~GH06 are open, GH11 is open, GH12 is open, AH05 and BH05 are open, BH02 is closed, and BH06~BH10 are closed. If AH13 is closed, then TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open, and AH06~AH10 are closed, and TR1-AA1~TR10-AA1 are all closed. The corresponding power supply logic for the low-voltage power supply system is: if AH13 is open, the switch maintains its original state.

[0072] If the power supply status of mains power 1 and mains power 2 changes to mains power 2 being de-energized and mains power 1 being energized, the power supply logic corresponding to mains power 2 is adopted. The state of the electrical components in the analog circuit is as follows: AH02 is closed, GH01~GH06 are open, GH11 is open, GH12 is open, AH05 and BH05 are open, BH02 is open, and AH06~AH10 are closed. If AH13 is closed, then TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open, and BH06~BH10 are closed, and TR1-AA1~TR10-AA1 are all closed. The corresponding power supply logic for the low-voltage power supply system is: if AH13 is open, the switch maintains its original state.

[0073] If the power supply status of mains power 1 and mains power 2 changes to the power outage status of mains power 1 and mains power 2, the power supply logic of switching from mains power supply to emergency power supply is adopted. The state of the electrical components in the simulation circuit is as follows: AH02, BH02, and AH13 are all disconnected; AH06 to AH10 are all closed; GH01 to GH06 are closed; GH11 is closed; GH12 is closed; AH05 and BH05 are closed; BH06 to BH10 are all closed; TR1-AA1 to TR10-AA1 are all closed; TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all disconnected.

[0074] If the power outage status of mains power 1 and mains power 2 changes to mains power 1 being powered on and mains power 2 being powered off, the power supply logic for switching from mains power to emergency power supply is adopted. In the simulated circuit, the states of the electrical components are: AH02 closed, GH01~GH06 open, GH11 open, GH12 open, AH05 and BH05 open, BH02 open, and AH06~AH10 closed. If AH13 is closed, then TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open, and BH06~BH10 are closed, as are TR1-AA1~TR10-AA1. The corresponding power supply logic for the low-voltage power supply system is that if AH13 is open, the switch remains in its original state.

[0075] If the power outage status of mains power 1 and mains power 2 changes to mains power 2 being powered on and mains power 1 being powered out, the power supply logic for switching mains power supply using emergency power supply is adopted. In the simulated circuit, the states of the electrical components are: AH02 is open, GH01~GH06 are open, GH11 is open, GH12 is open, AH05 and BH05 are open, BH02 is closed, and BH06~BH10 are closed. If AH13 is closed, then TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open, and AH06~AH10 are closed, and TR1-AA1~TR10-AA1 are all closed. The corresponding power supply logic for the low-voltage power supply system is: if AH13 is open, the switch maintains its original state.

[0076] If the power outage of mains power 1 or mains power 2 is reversed to the state where mains power 1 and mains power 2 are restored, the power supply logic of switching mains power supply using emergency power supply is adopted. The state of the electrical components in the simulation circuit is as follows: AH02 is closed, AH06~AH10 are all closed, GH01~GH06 are open, GH11 is open, GH12 is open, AH05 and BH05 are open, BH02 is closed, BH06~BH10 are all closed, TR1-AA1~TR10-AA1 are all closed, TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open, and AH13 is in the open state.

[0077] If the power outage status of mains power 1 and mains power 2 remains unchanged, but the current changes, the control logic is determined to be the diesel generator start / stop logic. For example, if the number of diesel generator starts is determined to be 4 based on the user-set current, then the states of the electrical components in the analog circuit are as follows: AH02, BH02, and AH13 are all open; AH06 to AH10 are all closed; GH01 to GH04 are closed; GH05 to GH06 are open; GH11 is closed; GH12 is closed; AH05 and BH05 are closed; BH06 to BH10 are all closed; TR1-AA1 to TR10-AA1 are all closed; TR9-AA4, TR7-AA4, TR5-AA4, TR3-AA4, and TR1-AA4 are all open.

[0078] The control logic mentioned above can consist of multiple sub-logic, such as power supply logic corresponding to at least one mains power source and power supply logic corresponding to the low-voltage power supply system. The mains power status can be input into the control logic for execution.

[0079] S130: Adjust the electrical components in the analog circuit according to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit, and display the adjusted analog circuit to the user.

[0080] In detail, if the user selects the automatic mode in the control command, the control program corresponding to the state adjustment electrical component in the analog circuit is called, and the state of the electrical component in the analog circuit is used as the input of the called control program. The control program is executed to obtain the adjusted analog circuit. If the user selects the manual mode in the control command, the system will respond to the user's manual command on the operation interface. When the state of the electrical component determined by the control logic is the same as the state of the electrical component selected by the user in the manual command, the system will call the control program corresponding to the electrical component in the analog circuit that adjusts the state. The system will use the state of the electrical component in the analog circuit as the input of the called control program, execute the control program, and obtain the adjusted analog circuit.

[0081] Of course, when displaying the adjusted results to the user, the actions can be performed according to the timing of different components controlled in the above logic.

[0082] The electrical components include switches and a diesel engine. Before invoking the control program, the method further includes: firstly, encapsulating the relevant information of the switch; and secondly, developing and encapsulating the control program for the switch.

[0083] Regarding the first point: encapsulate the core parameters and states of all switches (UDT_Switch) to unify data standards and facilitate reuse. Encapsulate a unified data structure for the six diesel generators (UDT_Genset) to cover core states such as start-up, shutdown, parallel operation, and faults.

[0084] Regarding the second point, the core logic of the switch is encapsulated based on the switch UDT as a basic module, i.e., a general program that can be called by other programs to input and output parameters.

[0085] The specific control logic is as follows: Priority determination: Manual commands have higher priority than automatic commands; Delayed execution: After receiving the closing / opening command, the execution state switches according to the Delay_Time delay. Fault interception: When Fault_State is TRUE, all operation commands are prohibited from execution, and Fault_Alarm is output; Status feedback: OUT_Switch_State is updated in real time and synchronized to UDT and the operation interface.

[0086] Based on the diesel generator UDT, the core logic of diesel generator start-stop and parallel operation is encapsulated as a basic module, i.e. a general program, for other control programs to call.

[0087] The core logic is as follows: Start-stop control: Start-stop is executed according to the Manual_Start / Auto_Start command and the mains power status; Parallel operation judgment: Parallel operation is permitted when ≥5 diesel generators are running normally; Fault handling: When Fault_State is TRUE, immediately stop running and unlist the fault.

[0088] The power supply logic corresponding to at least one mains power supply includes a medium-voltage logic control module (FB_MV_Control). The power supply logic for switching from mains power to emergency power supply includes a medium-voltage logic control module (FB_MV_Control) and a diesel generator logic control module (FB_Genset_Control). The power supply logic for switching from mains power to emergency power supply includes a medium-voltage logic control module (FB_MV_Control) and a diesel generator logic control module (FB_Genset_Control). The power supply logic corresponding to the low-voltage power supply system includes a low-voltage logic control module (FB_LV_Control).

[0089] For the medium-voltage logic control module (FB_MV_Control): The core business module repeatedly calls the FB_Switch module to achieve the linkage control of the medium-voltage mains incoming switch, diesel generator incoming switch, bus tie switch, and feeder switch.

[0090] Core logic: Receive the mains power status input from FB_Mains_Detect; for example, the mains power status is either power outage or power on.

[0091] According to the operating mode, such as automatic transfer or automatic reset, automatic commands are issued to the corresponding FB_Switch module. Specifically, the FB_Switch module is invoked, with the mains power status as its input. After the FB_Switch module completes execution, the open / closed status of the corresponding medium-voltage logic switch is determined. For example, the open / closed status of the mains 1 incoming switch, mains 2 incoming switch, diesel generator 1 incoming switch, diesel generator 2 incoming switch, bus tie switch, and feeder switch is determined.

[0092] According to the operation mode, when the operation mode is manual transfer and manual reset, it responds to the manual command on the operation interface. When the operation result of the manual command is the same as the preset result, the mains power status is used as the input of the FB_Switch module, and the FB_Switch module is executed. After the FB_Switch module is completed, the opening / closing of the switch corresponding to the medium voltage logic is determined. All switch module calls are stored in a multi-background data block DB_MV_MultiInstance.

[0093] For the diesel generator logic control module (FB_Genset_Control), the core business module repeatedly calls the FB_Genset module to achieve parallel control of 6 diesel generators.

[0094] Core logic: Receive the dual-channel mains power failure status from FB_Mains_Detect; for example, the mains power status is either power failure or power restoration.

[0095] According to the diesel generator control mode, automatic start / stop / parallel operation commands are issued to the FB_Genset modules of the six diesel generators. Specifically, the FB_Genset module is invoked, with the mains power status as its input. After the FB_Genset module completes execution, the opening / closing of the switches corresponding to the diesel generator control logic is determined. For example, for diesel generators EG1 to EG6, the start / stop / parallel operation of these generators is determined.

[0096] According to the operating mode, when the operating mode is manual transfer or manual reset, it responds to the manual commands on the operating interface. When the result of the manual command is the same as the preset result, the mains power status is used as the input of the FB_Genset module, and the FB_Genset module is executed. After the FB_Genset module is completed, the opening / closing of the switch corresponding to the medium voltage logic is determined.

[0097] All diesel generator module calls to the dataset are centrally stored in the multi-background data block DB_Genset_MultiInstance.

[0098] For the low-voltage logic control module (FB_LV_Control), the core business module repeatedly calls the FB_Switch module to implement the backup automatic transfer control of 5 sets of low-voltage systems.

[0099] Core logic: Receives the output voltage of the medium-voltage feeder; wherein, the medium-voltage feeder is a feeder switch determined by the medium-voltage control logic, and the feeder output voltage can be determined by the opening and closing of the feeder.

[0100] In low-voltage switching mode, the FB_Switch module is called to realize low-voltage switch linkage; specifically, the FB_Switch module is called, the output voltage of the medium-voltage feeder is used as the input of the FB_Switch module, the FB_Switch module is executed, and after the FB_Switch module is completed, the opening / closing of the low-voltage switch is determined.

[0101] All low-voltage switch module call datasets are centrally stored in the multi-background data block DB_LV_MultiInstance.

[0102] The multiple background data block design is as follows: to avoid data being scattered and managed, the instance data of each core control module calling the basic function module is centrally stored in the multiple background data block.

[0103] In some embodiments, before invoking the control program corresponding to the state-adjusting electrical element in the analog circuit, the method further includes: If the user selects the automatic mode in the control command, then the control method of the state-adjusting electrical components in the analog circuit is determined to be the remote control mode. If the user selects the manual mode in the control command, then the control method of the state-adjusting electrical components in the analog circuit is determined to be the local control method. In the analog circuit, the control mode of the state-adjusting electrical components is determined in response to the user's command triggered on the operation interface, which displays the first sub-operation page.

[0104] Combination Figure 3As shown, when the user clicks the switch, the first sub-operation page is displayed. This first sub-operation page can be a pop-up window and includes local control mode and remote control mode (remote control). When the user selects remote control mode, the switch can operate automatically. When the user selects local control mode, they need to click the switch to open or close to manually control the switch's opening or closing.

[0105] In some embodiments, after displaying the adjusted analog circuit to the user, the method further includes: Responding to the user's trigger command on the operation interface, display the first sub-operation page triggered by the trigger command; In response to the user's selection command, the system uses the processing strategy corresponding to the selected fault mode to simulate the control of the mains power in the mains power operation environment, determines the state of the electrical components in the analog circuit, adjusts the analog circuit according to the state of the electrical components in the analog circuit, and displays the adjusted analog circuit to the user.

[0106] Combination Figure 3 As shown, when the user clicks the switch, the first sub-operation page is displayed. After the user clicks the fault mode, the system uses the corresponding handling strategy to simulate the control of the mains power in the mains power operation environment, determines the state of the electrical components in the analog circuit, adjusts the analog circuit according to the state of the electrical components in the analog circuit, and displays the adjusted analog circuit to the user.

[0107] Based on the above, combined with Figure 2 As shown, users can perform the following operations on the operation page: Simulation of mains power failure: Drag the "Main Power 1 Voltage and Current" simulator slider to the set lower limit to simulate Main Power 1 losing power; When the mains power 1 input switch is opened, the intermediate bus tie switch is automatically closed, and the intermediate voltage section 1 is powered by mains power 2. Verify the switching mode (such as automatic transfer and automatic recovery): Drag the "Main Power 1 Voltage and Current" simulator slider to the normal value to simulate the restoration of mains power. Observe the bus tie switch automatically tripping and the mains 1 incoming line switch automatically closing. Simulation of dual-circuit mains power failure: Drag the simulator sliders for "Main Power 1 Voltage and Current" and "Main Power 2 Voltage and Current" below the lower limit value; The observation interface shows that the six diesel generators start up in sequence, and after the parallel operation is completed, the parallel operation switch is closed, and the medium voltage bus is powered by the diesel generators. Manual operation: combined Figure 4As shown, clicking the "Fault" button on a diesel generator verifies the generator disconnection logic. The generator parallel switch turns to open, and the standby generator automatically starts parallel operation. When two diesel generators fail, all remaining standby generators start and are put into operation. Low-voltage standby automatic transfer simulation: Simulate low mains incoming voltage and abnormal low-voltage mains incoming voltage. Observe the automatic closing of the low-voltage bus tie switch, or manually operate the low-voltage bus tie switch to verify the supplementary switching logic.

[0108] After performing the above simulation operations, the method further includes: Acquire monitoring records; wherein the monitoring records include the switching status and time of the analog circuit; In response to a user-triggered start command, a monitoring interface is displayed, which includes the status of the analog circuit switches and the time.

[0109] In detail, real-time monitoring and logic tracing are performed by opening "Program Status Monitoring" in the TIA Portal V17 programming interface and combining it with the interface operation records to track the execution status of each functional block (FB_Switch / FB_Genset / medium voltage / diesel generator / low voltage control module) and locate the switching logic execution path.

[0110] Combination Figure 5 As shown, the monitoring record shows the process of stopping the backup power supply when power is restored: 1# diesel generator feeder switch tripped, 6# diesel generator stopped, 5# diesel generator stopped, 4# diesel generator stopped, 3# diesel generator stopped, 2# diesel generator stopped, and 1# diesel generator stopped. Clicking the chart with an exclamation mark at the bottom of the page displays the tripping / closing status of each switch when the AH02 mains power line 1 incoming switch fails, including: AH13 bus tie switch tripped, AH10 feeder switch tripped, AH09 feeder switch tripped, AH08 feeder switch tripped, and AH07 feeder switch tripped.

[0111] In addition to recording, embodiments of the present invention also provide a verification scheme, including responding to a user's test command on the operation interface to verify whether the control command matches the adjusted analog circuit; or verifying the correctness of the program execution state; or verifying the response speed and stability.

[0112] Specifically, the program logic is verified to be correct, including the effectiveness of UDT encapsulation, function block reuse, and management of multiple background data blocks; the execution results of switching logic, linkage control, and switching modes of each power system in the simulation environment are verified to be consistent with the design requirements; and the smoothness of interaction, accuracy of status feedback, and effectiveness of manual operation of the single-line diagram operation interface are verified, with no logical loopholes or interface interaction problems.

[0113] In detail, the UDT and function block tests verified that the switch / diesel generator UDT data read and write were normal, the FB_Switch / FB_Genset module call logic was correct, and there were no abnormalities in parameter passing; Multiple background data block tests: Verify that the instance data storage and updates of each control module calling the basic module are normal and there are no data conflicts; Medium-voltage mains power switching test: Simulate single-circuit mains power failure to verify bus tie linkage logic. The execution results of the four switching modes meet the design requirements, and the interface status is updated synchronously. Diesel generator parallel test: Simulate dual-circuit mains power failure to verify the timing and logic of starting, parallel operation and shutdown of 6 diesel generators, and confirm the effectiveness of manual start / stop / parallel operation; Low-voltage standby automatic transfer test: simulate an anomaly on the low-voltage side after medium-voltage switching, verify the low-voltage bus tie supplementary switching logic, and confirm that manual operation of the low-voltage switch is effective; Interface interaction test: Verify the manual operation functions of all switches and generators, and the accuracy of error blocking, status display, and parameter updates; Mode compatibility test: Each subsystem switches between four modes to verify the logical adaptability and interface mode selection function.

[0114] Scan cycle test: Monitor the virtual CPU scan cycle and ensure it is ≤100ms; Switching delay test: Verify that the execution delay of the switching command is ≤200ms and the interface state update delay is ≤300ms; Stability test: Continuous simulation for 12 hours, simulating multiple mains power failures / recoveries, diesel generator start-stop / parallel operation, and manual operation, with no program errors, interface lag, or data anomalies; Concurrent operation test: Simultaneously operate multiple switches / generators to verify the system's responsiveness and data consistency.

[0115] By comparing the changes in multiple background data block variables, interface status displays, and theoretical control strategies during the simulation process, it was ensured that the logic execution results of medium-voltage segmented operation, diesel generator parallel operation, and low-voltage standby automatic transfer were 100% consistent with the design requirements, and the execution results of manual operation commands were consistent with expectations.

[0116] The embodiments of the present invention can be tested using the following methods: Black-box testing: Simulate scenarios through manual operation via the interface, and only verify the consistency between input (operation commands) and output (state changes, parameter updates); White-box testing: Observe the execution status of the SCL program and verify the correctness of function block call logic, UDT parameter passing, and multiple background data block read and write. Scenario-based testing: Simulate real-world operation and maintenance scenarios (such as single-circuit mains power outage, dual-circuit mains power outage, diesel generator failure, and manual switching mode) to verify the entire switching logic and user interface experience. Stress test: Perform manual operations at high frequency (such as continuous switching, starting and stopping the diesel generator) to test the system's stability and response speed.

[0117] Based on the same inventive concept, embodiments of this application provide a working simulation system for a complex power supply system. Please refer to... Figure 6 As shown, the device includes: The response module 610 is used to respond to control commands triggered by the user on the operation interface, and to determine the mains power status based on the simulated voltage and simulated current in the control command; wherein, the operation interface includes: an analog circuit, and operation modes corresponding to multiple power supply systems included in the analog circuit; the analog circuit is a single-line circuit diagram integrating multiple power supply systems for power supply; The determination module 620 is used to determine the state of electrical components in the analog circuit by using the control logic to simulate the control of the mains power under the mains power state. The display module 630 is used to adjust the electrical components in the analog circuit according to the operation mode selected by the user in the control command and the state of the electrical components in the analog circuit, and to display the adjusted analog circuit to the user.

[0118] Optional, response module 610, used for: Receives interface elements triggered by the user on the operation interface; wherein, the interface elements include elements for controlling the operation mode, voltage simulation elements, and current simulation elements; The control commands are determined using the variables corresponding to the interface elements.

[0119] Optionally, module 620 is used for: If the simulated voltage in the control command is lower than the set no-voltage lower limit threshold, the simulated current is lower than the set no-current lower limit threshold, and the duration exceeds the first preset time, then the mains power state is a power outage state. If the simulated voltage in the control command is higher than the set lower limit threshold of the reference voltage and the duration exceeds the second preset time, then the mains power status is the power-on status.

[0120] Optionally, the power supply system composed of the analog circuit includes at least one medium-voltage power supply system from the mains, a low-voltage power supply system, and an emergency power supply system; the determining module 620 is used for: If the power supply of all circuits of a medium-voltage power supply system with at least one mains power supply is converted to a power supply with at least one mains power supply, and the bus tie switch connecting multiple mains power supplies is closed, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply. If the power supply of all circuits of the medium-voltage power supply system with at least one mains power supply is converted to power supply with at least one mains power supply and the bus tie switch connected to multiple mains power supplies is tripped, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply and the power supply logic corresponding to the low-voltage power supply system. If at least one medium-voltage power supply system with mains power is switched to a medium-voltage power supply system with at least one mains power, and all mains power supplies are unable to provide power, then the control logic is determined to be the power supply logic for switching from mains power supply to emergency power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, the system is switched to supply power from at least one mains power supply line of the medium-voltage power supply system, and the bus tie switch connecting multiple mains power supply lines is closed, then the control logic is determined to be the power supply logic for switching from emergency power supply to mains power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, and the mains power supply line of the medium-voltage power supply system is switched to at least one mains power supply line, and the bus tie switch connecting multiple mains power supply lines is tripped, then the control logic is determined to be the power supply logic for switching the emergency power supply to the mains power supply and the power supply logic corresponding to the low-voltage power supply system.

[0121] Optionally, the states of the electrical components in the analog circuit include: the state of the medium-voltage logic switch of the main power supply, the state of the backup power supply, and the state of the low-voltage logic switch of the main power supply. Display module 630 is used for: If the user selects the automatic mode in the control command, the control program corresponding to the state adjustment electrical component in the analog circuit is called, and the state of the electrical component in the analog circuit is used as the input of the called control program. The control program is executed to obtain the adjusted analog circuit. If the user selects the manual mode in the control command, then the system responds to the user's manual command on the operation interface. When the state of the electrical component determined by the control logic is the same as the state of the electrical component selected by the user in the manual command, the system calls the control program corresponding to the electrical component in the analog circuit that adjusts the state. The system uses the state of the electrical component in the analog circuit as the input of the called control program, executes the control program, and obtains the adjusted analog circuit.

[0122] Optionally, module 620 is used for: If the user selects the automatic mode in the control command, then the control method of the state-adjusting electrical element in the analog circuit is determined to be the remote control mode. If the user selects the manual mode in the control command, then the control method of the state-adjusting electrical components in the analog circuit is determined to be the local control method. The control mode of the state-adjusting electrical components in the analog circuit is determined when the user triggers the command on the operation interface to display the first sub-operation page.

[0123] Optionally, module 620 is also used for: In response to a user's trigger command on the operation interface, the first sub-operation page triggered by the trigger command is displayed; In response to the user's selection command, the system uses the processing strategy corresponding to the selected fault mode in the selection command to simulate the control of the mains power in the mains power operation environment, determines the state of the electrical components in the simulation circuit, adjusts the simulation circuit according to the state of the electrical components in the simulation circuit, and displays the adjusted simulation circuit to the user.

[0124] Optionally, module 620 is also used for: Acquire monitoring records; wherein the monitoring records include the switching status and time of the analog circuit; In response to a user-triggered start command, a monitoring interface is displayed, which includes the status of the analog circuit's switches and the time.

[0125] Optionally, module 620 is also used for: Responding to user test commands on the operating interface, verifying whether the control commands match the adjusted analog circuit; or verifying the correctness of the program execution state; or verifying the response speed and stability.

[0126] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be implemented entirely in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element and / or software instructions.

[0127] Based on the same inventive concept, embodiments of this application provide an electronic device. Figure 7 The diagram illustrates a schematic representation of an electronic device structure provided in some embodiments, such as... Figure 7 As shown, the electronic device includes: a processor 710, a memory 720, a communication interface 730, and a communication bus 740, wherein the processor 710, the communication interface 730, and the memory 720 communicate with each other through the communication bus 740. The memory 720 stores a computer program that, when executed by the processor 710, causes the processor 710 to perform a working simulation method for a complex power supply system as described in any one of the claims.

[0128] The processor 710 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) and / or other programmable logic devices, discrete gate and / or transistor logic devices, or discrete hardware components.

[0129] The memory 720 is connected to the processor 710 via the system bus 740 and completes communication between them. The memory 720 is used to store computer program instructions.

[0130] The system bus 740 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus 740 can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory.

[0131] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium, the computer program product including: computer program code, which, when run on a computer, causes the computer to perform a working simulation method for a complex power supply system as described in any one of the claims.

[0132] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the complex power supply system operation simulation methods discussed above. Since the principle of the problem-solving principle of the above-described computer program product is similar to that of the data analysis report construction method, the implementation of the above-described computer program product can refer to the implementation of the method, and repeated details will not be elaborated further.

[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0134] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0136] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of user-operated steps to be executed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0137] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for simulating the operation of a complex power supply system, characterized in that, include: Responding to control commands triggered by the user on the operation interface, the mains power status is determined based on the simulated voltage and simulated current provided by the user in the control commands; wherein, the operation interface includes: an analog circuit, and operation modes corresponding to multiple power supply systems included in the analog circuit; the analog circuit is a single-line circuit diagram integrating multiple power supply systems for power supply; The state of electrical components in the analog circuit is determined by using control logic to simulate control of the mains power under the mains power condition. According to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit, the electrical components in the analog circuit are adjusted, and the adjusted analog circuit is displayed to the user.

2. The method according to claim 1, characterized in that, Responding to control commands triggered by the user on the user interface, including: Receives interface elements triggered by the user on the operation interface; wherein, the interface elements include elements for controlling the operation mode, voltage simulation elements, and current simulation elements; The control commands are determined using the variables corresponding to the interface elements.

3. The method according to claim 1, characterized in that, Based on the user-simulated voltage and simulated current in the control command, determine the mains power status, including: If the simulated voltage in the control command is lower than the set no-voltage lower limit threshold, the simulated current is lower than the set no-current lower limit threshold, and the duration exceeds the first preset time, then the mains power state is a power outage state. If the simulated voltage in the control command is higher than the set lower limit threshold of the reference voltage and the duration exceeds the second preset time, then the mains power status is the power-on status.

4. The method according to claim 1, characterized in that, The power supply system composed of the analog circuit includes at least one medium-voltage power supply system, a low-voltage power supply system, and an emergency power supply system; The control logic is determined in the following ways: If the power supply of all circuits of a medium-voltage power supply system with at least one mains power supply is converted to a power supply with at least one mains power supply, and the bus tie switch connecting multiple mains power supplies is closed, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply. If the power supply of all circuits of the medium-voltage power supply system with at least one mains power supply is converted to power supply with at least one mains power supply and the bus tie switch connected to multiple mains power supplies is tripped, then the control logic is determined to be the power supply logic corresponding to at least one mains power supply and the power supply logic corresponding to the low-voltage power supply system. If at least one medium-voltage power supply system with mains power is switched to a medium-voltage power supply system with at least one mains power, and all mains power supplies are unable to provide power, then the control logic is determined to be the power supply logic for switching from mains power supply to emergency power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, the system is switched to supply power from at least one mains power supply line of the medium-voltage power supply system, and the bus tie switch connecting multiple mains power supply lines is closed, then the control logic is determined to be the power supply logic for switching from emergency power supply to mains power supply. If all the mains power supply lines of the medium-voltage power supply system with at least one mains power supply line are unable to supply power, and the mains power supply line of the medium-voltage power supply system is switched to at least one mains power supply line, and the bus tie switch connecting multiple mains power supply lines is tripped, then the control logic is determined to be the power supply logic for switching the emergency power supply to the mains power supply and the power supply logic corresponding to the low-voltage power supply system.

5. The method according to claim 1, characterized in that, Adjusting the electrical components in the analog circuit according to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit includes: If the user selects the automatic mode in the control command, the control program corresponding to the state adjustment electrical component in the analog circuit is called, and the state of the electrical component in the analog circuit is used as the input of the called control program. The control program is executed to obtain the adjusted analog circuit. If the user selects the manual mode in the control command, then the system responds to the user's manual command on the operation interface. When the state of the electrical component determined by the control logic is the same as the state of the electrical component selected by the user in the manual command, the system calls the control program corresponding to the electrical component in the analog circuit that adjusts the state. The system uses the state of the electrical component in the analog circuit as the input of the called control program, executes the control program, and obtains the adjusted analog circuit.

6. The method according to claim 5, characterized in that, Before invoking the control program corresponding to the state-adjusting electrical element in the analog circuit, the method further includes: If the user selects the automatic mode in the control command, then the control method of the state-adjusting electrical element in the analog circuit is determined to be the remote control mode. If the user selects the manual mode in the control command, then the control method of the state-adjusting electrical components in the analog circuit is determined to be the local control method. The control mode of the state-adjusting electrical components in the analog circuit is determined when the user triggers the command on the operation interface to display the first sub-operation page.

7. The method according to claim 1, characterized in that, After displaying the adjusted analog circuit to the user, the method further includes: In response to a user's trigger command on the operation interface, the first sub-operation page triggered by the trigger command is displayed; In response to the user's selection command, the system uses the processing strategy corresponding to the selected fault mode in the selection command to simulate the control of the mains power in the mains power operation environment, determines the state of the electrical components in the simulation circuit, adjusts the simulation circuit according to the state of the electrical components in the simulation circuit, and displays the adjusted simulation circuit to the user.

8. The method according to claim 7, characterized in that, After displaying the adjusted analog circuit to the user, the method further includes: Acquire monitoring records; wherein the monitoring records include the switching status and time of the analog circuit; In response to a user-triggered start command, a monitoring interface is displayed, which includes the status of the analog circuit's switches and the time.

9. The method according to claim 1, characterized in that, The method further includes: Responding to user test commands on the operating interface, verifying whether the control commands match the adjusted analog circuit; or verifying the correctness of the program execution state; or verifying the response speed and stability.

10. A working simulation system for a complex power supply system, characterized in that, include: The response module is used to respond to control commands triggered by the user on the operation interface, and determine the mains power status based on the simulated voltage and simulated current in the control command; wherein, the operation interface includes: an analog circuit, and operation modes corresponding to multiple power supply systems included in the analog circuit; the analog circuit is a single-line circuit diagram integrating multiple power supply systems for power supply; A determination module is used to determine the state of electrical components in the analog circuit by using the control logic to simulate control of the mains power under the mains power state. The display module is used to adjust the electrical components in the analog circuit according to the operating mode selected by the user in the control command and the state of the electrical components in the analog circuit, and to display the adjusted analog circuit to the user.