Method for real-time synchronization and online switching of redundancy control system
By using networks such as control networks in the plasma control system to achieve synchronization of the main and standby systems, the problem of inability to switch during steady-state operation is solved, the reliability and availability of the system are improved, and the safe operation of the device is ensured.
Patent Information
- Application Number
- CN202411346608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-31
AI Technical Summary
The existing plasma control system cannot achieve 100% reliability and availability during steady-state operation, and cannot operate simultaneously during main and standby redundant switching, resulting in the safe operation of the device.
The control network, clock synchronization network, central interlock network and real-time communication network can synchronize the time, data and control processes of the main and standby systems. Multi-stage state machine management can be used to achieve operational state synchronization, and online switching is performed when equipment or process is abnormal. and abnormal alarm.
The synchronous operation of the main and standby control system is realized, the reliability and availability of the plasma control system is improved, and the safety of the long-term steady-state operation of the device is ensured.
Smart Images

Figure CN119225157A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of plasma control systems, and in particular to a method for real-time synchronization and online switching of redundant control systems. Background Art
[0002] The plasma control system is one of the key systems of the fusion device. It controls the entire process of plasma discharge and detects and handles abnormalities in real time to ensure the safe operation of the device. It has the characteristics of high real-time performance, high reliability and high availability. In order to improve the reliability and availability of the system, a backup control system is generally configured. When the main control system fails, the switch is completed offline and the backup control system is used for plasma discharge control. This method of offline switching between primary and standby redundancy cannot achieve 100% reliability and availability of the system, that is, the plasma discharge control cannot be continued during the switch, and the pulse discharge needs to be terminated, which poses a certain hidden danger to the safe operation of the device. In view of the future steady-state safe operation requirements of fusion reactors, discharge operation control needs to be carried out on a daily basis, and higher safety and reliability requirements are also proposed.
[0003] In response to the future steady-state safe operation requirements of fusion reactors, the online synchronous operation of the main and standby control systems can be achieved through the synchronization of time, data, control process and status, and the online switching and abnormal alarm of the system can be completed when the equipment or process is abnormal. This can improve the reliability and availability of the plasma real-time control system and ensure the safe operation of the device.
[0004] As a key system of the fusion device, the plasma control system consists of a hardware and software infrastructure and device-specific control functions. In order to meet the real-time and scalability requirements of the control system, a cluster architecture is used on the hardware, with the main node running non-real-time applications and one or more computing nodes running real-time plasma control algorithms. In order to reduce the impact of system hardware failures on the operation of the device, a backup control system for plasma control is generally configured. The backup control system uses the same hardware configuration and is redundant with the main control system. At present, during the operation of the device, since the plasma control system and the external system need to communicate data through some devices, it is difficult to meet the simultaneous access of the main and standby systems. Therefore, the main and standby redundant systems are offline standby, that is, when the main control system fails, it is necessary to terminate the pulse discharge, and then complete the switching of the hardware connection offline, and use the backup control system for plasma control during the next discharge operation. This main and standby redundancy is only a hardware backup, and does not consider the operation synchronization problem. Offline switching after a failure cannot guarantee 100% reliability and availability of the plasma control system during steady-state operation.
[0005] To achieve high reliability and availability of the system, it is necessary to realize the synchronous operation and online switching of the main and standby redundancy. Synchronous operation includes time synchronization of the main and standby systems, data synchronization of communication with external systems, synchronization of control calculation processes, and synchronization of operating status when the faulty system is repaired and reconnected. Online switching is based on the synchronous operation of the main and standby systems. The main and standby redundant switcher monitors the operating status of the control system in real time. When the equipment or process is abnormal, the switching and abnormal alarm of the main and standby systems are completed without stopping and affecting the plasma control. Therefore, the present application proposes a method for real-time synchronization and online switching of redundant control systems. Summary of the invention
[0006] The purpose of the present invention is to address the problem in the background technology that the existing plasma control system cannot meet the high reliability requirements of the system under steady-state operation, and to propose a method for real-time synchronization and online switching of redundant control systems.
[0007] The technical solution of the present invention is a method for real-time synchronization and online switching of redundant control systems, comprising the following steps:
[0008] System interaction: redundant control systems interact with external systems through control networks, clock synchronization networks, central interlocking networks and real-time communication networks;
[0009] Time synchronization: the main and standby computing node servers synchronously receive the trigger signal and set the initial value of the running time. Each cycle, they read the external clock signal and calculate the running time according to the formula. The main control system shares the running time, and the standby control system synchronizes regularly, and repeats until the end.
[0010] Data synchronization: In the operation preparation stage, the main control system and the standby control system read and store the preset data. During operation, they analyze the configuration parameters, perform interpolation calculations, obtain collected data, complete control calculations, and output them through the main and standby redundant switchers.
[0011] The control process and operation status are synchronized. Through multi-level state machine management, the main control system reads and sends synchronization data, and the backup control system reads, parses, writes as needed and executes the control process according to the signal jump status;
[0012] Online switching and alarm, the main and standby redundant switch monitoring system performs online switching and alarm in case of abnormalities. The interlocking decision module obtains parameters, performs signal conversion and switching selection. The main control system and the standby control system confirm the status and role according to the decision results, and the abnormal system is restored to synchronization after repair.
[0013] Optionally, in the system interaction:
[0014] The control network is Ethernet, which is mainly used to transmit non-real-time data such as discharge information and configuration parameters;
[0015] The clock synchronization network is an optical fiber network used to transmit clock pulse signals and synchronization trigger signals;
[0016] The central interlocking network is composed of optical fibers or hardware connections and is used to transmit system status to achieve interlocking protection;
[0017] The real-time communication network is composed of a high-speed, low-latency optical fiber network, which is divided into a real-time communication input network and an output network according to the communication transmission direction, and is used to transmit real-time data.
[0018] Optionally, the time synchronization includes:
[0019] After completing the device initialization, the computing node server waits for an external trigger signal at time T0, and after receiving the trigger signal, sets the initial operation time of the control system to T0;
[0020] Read the external clock signal for counting. Each time a pulse change is detected, the running time increases accordingly. The time increment is continuously accumulated from the start time to obtain the current system running time. The calculation formula is:
[0021] T current =T0+(N-N0)*T cycle (1)
[0022] T current Indicates the current running time of the control system, T0 is the initial running time of the system, N represents the current clock signal count, N0 is the count at the starting time, T cycle Indicates the period of the clock pulse signal;
[0023] The main control system calculates the current running time and writes it into the shared memory, and sends this time to the real-time communication network;
[0024] The backup control system needs to be synchronized with the main control system regularly. If the current operation cycle needs to be synchronized, the backup control system first reads the current operation time t of the main control system from the real-time communication network, assigns t to T0, and assigns N to N0, and calculates and adjusts its own operation time according to formula (1) to complete the time synchronization with the main control system.
[0025] Optionally, the data synchronization includes the following steps:
[0026] During the operation preparation phase, the configuration management services of the main control system and the backup control system read the same interface preset data from the control network. The interface preset data includes static configuration data and dynamic configuration data. The static configuration data remains unchanged during the entire operation process, and the dynamic configuration data is waveform data that changes over time. The static data and waveform inflection point data are stored in the memory of the real-time computing node.
[0027] During operation, each real-time process runs according to the set cycle. In each cycle, the configuration parameters are first parsed according to the type. For the waveform inflection point data of the dynamic configuration parameters, linear interpolation calculation is performed according to the current system running time, and the results are stored in the data engine.
[0028] The collected data is periodically acquired through the real-time communication network, and the control calculation is completed in combination with the preset parameters. The calculation results are converted into control commands and output to the primary and standby redundant switcher. The device selects the output according to the operating status of the main control system and the standby control system, and finally outputs the command data to the real-time communication network.
[0029] Optionally, the control process and operation status synchronization include:
[0030] The operation of the control system is managed by a multi-level state machine. The overall execution process is completed by the first-level state machine. The first-level state machine includes several states: waiting, preparation for operation, running, and end. In the "running" stage, each real-time control process is managed by the second-level state machine, that is, each process corresponds to an execution scheduling state machine. The execution scheduling state machine mainly includes several states: startup, synchronization, normal operation, exception handling, and end.
[0031] Optionally, after the first-level state machine enters the "running" state, the second-level state machine immediately enters the startup state; when each process enters the end state, it triggers the first-level state machine to enter the end state; after completing the corresponding device shutdown, memory release or cleanup, the first-level state machine returns to the waiting state, waiting for the next discharge;
[0032] The execution process of each stage of the first-level state machine is as follows:
[0033] Waiting stage: The master node communicates with the central control system and enters the operation preparation stage after receiving the valid discharge gun number and discharge duration data;
[0034] Preparation phase: It is divided into two steps: preliminary locking and final locking. In the preliminary locking phase, stop receiving interface preset modifications, check the memory required by each process and complete initialization, and put the interface preset parameters into the corresponding memory; modify the preset parameters on the interface by forced unlocking, and re-enter the lock phase; when all processes are initialized, enter the final lock phase, and the control process on the real-time computing node completes device initialization and waits for external triggers, thus completing the operation preparation;
[0035] Running stage: Different control contents are classified into different categories. Each control class can have multiple execution sequences. Each execution sequence defines a series of algorithm segments. Each algorithm segment corresponds to a specific control algorithm and control parameters. These control classes run on the corresponding CPU processing cores according to the set cycle. Multiple CPU cores run in parallel. Different control classes deployed on the same CPU core are executed in the pre-configured order.
[0036] Ending stage: After the corresponding device shutdown, memory release or cleanup is completed, the first-level state machine returns to the waiting state and waits for the next discharge;
[0037] Optionally, the execution process of each stage of the second-level state machine is as follows:
[0038] Startup phase: complete device initialization, memory application and initialization, and write preset parameters into memory;
[0039] Synchronization phase: used for synchronization of the operating status of the backup control system. When synchronization is required, the synchronization event triggers the state machine to enter this state. After synchronization is completed, it enters the operating state consistent with the main control system.
[0040] Normal operation stage: The real-time control process sequentially executes the main execution sequence of the control class configured on the CPU core, that is, according to the current system running time, runs the control algorithm corresponding to the main execution sequence to control the parameters of the plasma in real time;
[0041] Abnormal handling stage: When the monitoring module of the control system finds any abnormality, including external system abnormality, key parameters exceeding the safe operation threshold, and plasma state abnormality, the process scheduling state machine enters the abnormal handling state and switches the execution sequence of the relevant control class, that is, changes the control algorithm or control parameters, controls the plasma to return to the normal state, or stops the current discharge in the case of unavoidable rupture;
[0042] Ending stage: The condition for entering the end state is that the discharge time reaches the set value or the abnormal processing result requires the discharge to be terminated; the corresponding device shutdown, memory release or cleanup are completed;
[0043] Optionally, the synchronization process of the main control system performs the following steps:
[0044] 1) Read the state of each process scheduling state machine and key intermediate calculation results from the shared memory;
[0045] 2) Summarize and organize the data in the agreed order;
[0046] 3) sending the sorted synchronization status data via the real-time communication network;
[0047] The synchronization process of the backup control system is as follows:
[0048] A. Determine whether synchronization is required. The judgment basis is that the set synchronization time has been reached or the standby control system has been connected after the fault is repaired. If synchronization is required, go to step B. Otherwise, skip this cycle and wait for the next cycle.
[0049] B. Read the synchronization data sent by the main control system from the real-time communication network;
[0050] C. After parsing, write the data into the corresponding shared memory and send a synchronization flag signal to enable each process scheduling state machine to enter the synchronization state;
[0051] D. When the state machine is in the synchronous state, the control system completes the overwriting of the synchronous data in the corresponding memory location. After completion, the state machine jumps from the synchronous state to a state consistent with the main control system according to the parsed state data and executes a consistent control process.
[0052] Optionally, the main-standby redundant switch includes an interlocking decision module, a photoelectric conversion and output switching module, and an alarm module. The switch monitors the operating status of key control system equipment and processes in real time, and completes online switching and abnormal alarm of the main control system and the standby control system when the equipment or process is abnormal; wherein,
[0053] The interlocking decision module obtains detailed parameters of the main control system and multiple backup control systems, including but not limited to CPU load rate, memory occupancy rate, hard disk occupancy rate, and process heartbeat, makes a switching decision based on the above parameter analysis, and applies the result to the switching module. At the same time, the alarm module sends error information to the monitoring terminal and notifies relevant personnel by SMS;
[0054] The photoelectric conversion and output switching module completes the conversion between the control command electrical signal and the optical signal, and completes the switching of the control command of the main control system and the backup control system to the output port according to the decision signal. Finally, the control command is transmitted to the real-time communication network in the form of an optical signal.
[0055] The active-standby redundant switch supports the above-mentioned automatic judgment mode, and also provides an externally specified forced switching mode, that is, the specified output is switched to the externally set system A or system B. The above-mentioned control method can be controlled by optical fiber signal or hard line signal.
[0056] Optionally, the status confirmation and recovery process of the main control system and the backup control system includes:
[0057] The main control system and backup control system read the interlocking decision results and confirm their current working status and roles, including the main control system, backup control system, and abnormal system, but there is only one main control system at each moment;
[0058] The main control system and the backup control system complete regular synchronization work according to their respective roles. When an abnormal system is repaired and reconnected, it first reads the configuration information and completes the role conversion by synchronizing the time, data, operation process and status with the main control system. That is, the abnormal system is changed to the backup system and the main-backup redundant state is restored.
[0059] Compared with the prior art, the present invention has at least one of the following beneficial technical effects:
[0060] The plasma control system real-time synchronization and online switching method of the present invention realizes the synchronous operation of the master and standby control systems through the synchronization of time, data, control process and operation status, and monitors the operation status of key equipment and processes of the control system in real time, and is used for the interlocking decision module to judge the effectiveness of the master-slave redundant system, completes the online switching and abnormal alarm of the system when the equipment or process is abnormal, and realizes the state synchronization after the offline system is connected and the recovery operation of the online redundant system through the real-time release and sharing of key operation information of the control system, thereby improving the reliability of the long-term steady-state operation of the real-time control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a schematic diagram of a redundant control system;
[0062] Figure 2 This is a schematic diagram of time synchronization between the primary and backup systems;
[0063] Figure 3 To control the overall execution process of the control system;
[0064] Figure 4 It is a schematic diagram of the execution flow of the real-time control process;
[0065] Figure 5 Diagram of the control process and state synchronization process of the main and standby redundant systems;
[0066] Figure 6 This is a working diagram of the main and standby redundant switch;
[0067] Figure 7 It is a structural diagram of the redundant system online switching and speed testing platform in this embodiment;
[0068] Figure 8 This is a diagram of the online switching result in this embodiment. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0070] Example
[0071] The redundant control system interacts with the external system through the control network, clock synchronization network, central interlocking network, and real-time communication network, such as Figure 1 As shown in the figure, the control network is generally Ethernet, which is used for the transmission of non-real-time data such as discharge information and configuration parameters; the clock synchronization network is generally a fiber optic network, which is used to transmit clock pulse signals and synchronization trigger signals; the central interlocking network is composed of optical fibers or hardware connections, and the transmission system status is used for interlocking protection; the real-time communication network is composed of a high-speed and low-latency fiber optic network, which is used to transmit real-time data between the plasma control system and the distributed acquisition system and the excitation system. It is generally divided into real-time communication input network and output network according to the communication transmission direction.
[0072] The general plasma discharge control process is as follows: after receiving the gun number, discharge length and other information from the master control system through the control network, it marks the start of this discharge. Next, the configuration parameters are obtained and transmitted to the memory of the corresponding real-time computing node server, all real-time processes are initialized, and wait for triggering. When the real-time computing node server, a cluster system composed of multiple real-time nodes, is generally equipped with a computing node with an I / O card runtime module, after receiving a trigger signal from the clock synchronization network, each real-time process begins to execute the control calculation process to control various plasma parameters to the expected target until the discharge ends. The control calculation process is executed in cycles, and each cycle completes the following work: acquiring the collected data, processing the data to obtain the actual value of the plasma control variable, and the difference between the value and the target value is input into the controller, and the controller completes the control calculation. The calculation result is limited according to the device operation threshold, and converted into a control command and output, and finally the target, collection, intermediate calculation and command data in this cycle are collected and stored. To achieve high reliability and availability of the system, it is necessary to realize the synchronous operation and online switching of the main and standby redundancy. Synchronous operation includes time synchronization, data synchronization, control calculation process and operation status synchronization of the main and standby systems. When the equipment or process is abnormal, online switching can complete the switching of the main and standby systems and abnormal alarm without stopping the machine and affecting the plasma control.
[0073] Time synchronization of active and standby redundant systems:
[0074] The running time and synchronization process of the active and standby control systems are as follows: Figure 2 As shown, most of the processes are the same, and the differences are indicated in the dotted box. The computing node server obtains external trigger and clock signals through the two channels of the I / O card for synchronization with the external system and calculation of the system running time. The process is as follows:
[0075] 1) After completing the equipment initialization, wait for an external -10 second trigger signal, and set the initial operation time of the control system to -10 seconds after receiving the trigger signal;
[0076] 2) Read the external clock signal to count and calculate the current system running time. For example, for a 20KHz clock signal, each time a pulse change is detected, the running time increases by 50 microseconds. The time increment is continuously accumulated from the start time to obtain the current system running time. The calculation method is shown in formula (1):
[0077] T current =T0+(N-N0)*T cycle (1)
[0078] T current Indicates the current running time of the control system, T0 is the initial running time of the system, in this case -10 seconds, N represents the current clock signal count, N0 is the count at the starting time, T cycle Represents the period of the clock pulse signal, that is, the time increment corresponding to each calculated change, which is 0.00005 seconds in this example. The processing process of the main and standby systems is different. The main control system calculates the current running time of the system and writes it into the shared memory, and sends this time to the real-time communication network. In order to eliminate the time accumulation error between the main and standby systems during long-term operation, the standby control system needs to be synchronized with the main control system regularly. For example, the synchronization period is set to 1 hour. When it is determined that synchronization is required, the standby control system first reads the current running time t of the main control system from the real-time communication network, assigns t to T0, and assigns N to N0. According to the above formula (1), the running time of the adjusted standby control system is consistent with that of the main control system. If synchronization is not required, the current running time is directly calculated according to formula (1). Finally, the running time is written to the shared memory for use by other real-time processes.
[0079] 3) Repeat step 2) until the set end time is reached.
[0080] Data synchronization of active and standby redundant systems:
[0081] The control system has input data and output data. Input data includes configuration parameters. Configuration parameters include interface presets, including target parameters and control parameters that change over time, as well as static configuration parameters and real-time acquisition data. Output data is the control command calculated and output by the control system or key parameter data for real-time display. The data synchronization process of the active-standby redundant system is as follows:
[0082] 1) In the operation preparation stage, the configuration management service of the active and standby systems reads the same interface preset data from the control network, including static configuration data and dynamic configuration data. The static configuration data includes data that remains unchanged during the entire operation process, and the dynamic configuration data includes waveform data that changes over time. The static data and waveform inflection point data are stored in the memory of the real-time computing node;
[0083] 2) During the operation, each real-time process runs according to the set cycle. In each cycle, the configuration parameters are first parsed according to the type. For the waveform inflection point data of the dynamic configuration parameters, linear interpolation calculation is performed according to the current system running time, and the results are stored in the data engine;
[0084] 3) Periodically acquire collected data through the real-time communication network, complete control calculations in combination with the preset parameters in step 2, and convert the calculation results into control commands and output them to the active-standby redundant switcher, which makes output selections based on the operating status of the active-standby system and finally outputs the command data to the real-time communication network.
[0085] Based on the time synchronization method, the redundant control system can achieve real-time analysis of configuration parameters, acquisition of collected data and consistent synchronization of output data in each control cycle through the above steps.
[0086] Active / standby redundant system control process and operation status synchronization:
[0087] The operation of the control system is managed by a multi-level state machine. The overall execution process is completed by the first-level state machine, including several states such as waiting, operation preparation, operation, and end. Figure 3 As shown in the figure, in the "running" stage, each real-time control process is managed by the second-level state machine, that is, each process corresponds to an execution scheduling state machine, which mainly includes startup, synchronization, normal operation, exception handling, and end states. After the first-level state machine enters the "running" state, the second-level state machine immediately enters the startup state. When each process enters the end state, it triggers the first-level state machine to enter the end state. After completing the corresponding device shutdown, memory release or cleanup, the first-level state machine returns to the waiting state and waits for the next discharge.
[0088] The execution process of each stage of the first-level state machine is as follows:
[0089] Waiting stage: The master node communicates with the central control system and enters the operation preparation stage after receiving the valid discharge gun number and discharge duration data.
[0090] Preparation phase: It is divided into two steps: the first lockout and the final lockout. In the first lockout phase, the interface preset modification is stopped, the memory required by each process is checked and initialized, and the interface preset parameters are placed in the corresponding memory. In this phase, the preset parameters can be modified on the interface by forced unlocking (unlock) and re-entering the lockout. When all processes are initialized, they enter the final lockout. After the control process on the real-time computing node completes the device initialization, it waits for external triggers, and the operation preparation is completed.
[0091] Running stage: Different control contents belong to different categories. Each control category can have multiple execution sequences. Each execution sequence defines a series of algorithm segments. Each phase corresponds to a specific control algorithm and control parameters. That is, the execution sequence is a collection of each moment and the corresponding execution algorithm, such as Figure 4 These control classes run on the corresponding CPU processing cores according to the set cycle, and multiple CPU cores run in parallel. Different control classes deployed on the same CPU core are executed in the pre-configured order.
[0092] Ending stage: After the corresponding device shutdown, memory release or cleanup is completed, the first-level state machine returns to the waiting state and waits for the next discharge.
[0093] The execution process of each stage of the second-level state machine is as follows:
[0094] Startup phase: complete device initialization, memory application and initialization, and write preset parameters into memory.
[0095] Synchronization phase: used for synchronization of the operating status of the backup control system. When synchronization is required, the synchronization event triggers the state machine to enter this state. After synchronization is completed, it enters the operating state consistent with the main control system.
[0096] Normal operation stage: The real-time control process sequentially executes the primary execution sequence (primary sequence) of the control class configured on the CPU core, that is, according to the current system running time, runs the control algorithm corresponding to the primary execution sequence to control the plasma parameters in real time.
[0097] Exception handling stage: When the monitoring module of the control system finds any abnormality, such as external system abnormality, key parameters exceeding the safe operation threshold, abnormal plasma state, etc., the process scheduling state machine enters the exception handling state and switches the execution sequence of the relevant control class, that is, changes the control algorithm or control parameters, and controls the plasma to return to normal state while ensuring safety, or stops the discharge in the event of unavoidable rupture.
[0098] Ending stage: The condition for entering the end state is that the discharge time reaches the set value or the abnormal processing result requires the discharge to be terminated. The corresponding device shutdown, memory release or cleanup is completed.
[0099] In order to achieve synchronization of the control process and operating status of the active and standby systems, in addition to time synchronization and data synchronization, it is also necessary to synchronize multi-level state machines, especially the process scheduling state machines and key intermediate calculation results on each CPU core, including the current state of each real-time control process scheduling state machine, the execution sequence number (sequence ID) of the currently running control class, the algorithm segment number (phase ID), the algorithm identifier (algorithm ID), and the key intermediate calculation quantities of the currently running algorithm, such as the PID controller integral and global variables.
[0100] The master and backup systems run the synchronization process at the fastest control cycle to complete the synchronization of the control process and operating status, such as Figure 5 As shown, the synchronization process of the main control system mainly performs the following steps:
[0101] 1) Read the state of each process scheduling state machine and key intermediate calculation results from the shared memory;
[0102] 2) Summarize and organize the data in the agreed order;
[0103] 3) Send the sorted synchronization status data through the real-time communication network.
[0104] The synchronization process of the backup control system is as follows:
[0105] A. Determine whether synchronization is required. The judgment basis is that the set synchronization time is reached or the backup control system is connected after failure recovery. If synchronization is required, go to step B. Otherwise, skip this cycle and wait for the next cycle.
[0106] B. Read the synchronization data sent by the main control system from the real-time communication network;
[0107] C. After parsing, write the data into the corresponding shared memory and send a synchronization flag signal to enable each process scheduling state machine to enter the synchronization state;
[0108] D. When the state machine is in the synchronous state, the control system completes the overwriting of the synchronous data in the corresponding memory location. After completion, the state machine jumps from the synchronous state to a state consistent with the main control system according to the parsed state data and executes a consistent control process.
[0109] Online switching and alarm of active and standby redundant systems:
[0110] The operating status of key devices and processes in the active / standby redundant system will be monitored in real time. When an abnormality occurs in a device or process, the active / standby redundant switch will complete the system online switching and abnormality alarm. Figure 6 As shown, the implementation process is as follows:
[0111] 1) The interlocking decision module obtains detailed parameters of the main control system and multiple backup control systems, including but not limited to CPU load rate, memory occupancy rate, hard disk occupancy rate, process heartbeat, etc.;
[0112] 2) The main control system and the backup control system send control command data to the main and backup redundant switch via optical fiber;
[0113] 3) The optical module in the active / standby redundant switch converts the received control command optical signal into an electrical signal and sends it to the switch;
[0114] 4) The interlocking decision module makes a switching selection based on the collected detailed parameters, applies the result to the switching switch, completes the switching of the signal to the output port, and sends the error information to the monitoring terminal through the alarm module and notifies the relevant personnel by SMS;
[0115] 5) The optical module in the active / standby redundant switch converts the control command electrical signal into an optical signal and transmits it to the real-time communication network;
[0116] 6) The main and standby systems read the interlocking decision results and confirm their current working status and roles. They are generally divided into the main control system, the standby control system, and the abnormal system. However, there is only one main control system at any time, and there can be multiple standby systems.
[0117] 7) The primary and backup systems complete regular synchronization work according to their roles. When an abnormal system is repaired and reconnected, it first reads the configuration information and completes the role conversion by synchronizing the time, data, operation process and status with the main control system. That is, the abnormal system is changed to the backup system and the primary and backup redundant status is restored.
[0118] The active-standby redundant switch supports the above-mentioned automatic judgment mode, and also provides an externally specified (forced switching) mode, that is, the specified output is switched to a certain system, such as the externally set system A or B. The above-mentioned control method can be controlled by optical fiber signal or hard wire signal.
[0119] In order to verify the technical effect of the present invention, the present invention is experimentally tested
[0120] The EAST real-time plasma control system consists of a main control system and a backup control system. The real-time communication network consists of a low-latency reflective memory fiber network (RFM). In order to verify the online switching function and switching speed of the main and backup redundant systems, a network was built as follows: Figure 7The test platform shown in the figure has three servers, namely the main control system, the backup control system, and the analog excitation system. The two optical input ports of the main and backup redundant switcher are connected to the control command optical signals of the main and backup systems respectively. The third optical port is used as the output of the switch to send the final control command optical signal. There is a forced switching enable signal, 1 represents the main control system, and 0 represents switching to the backup control system. The switching signal is connected to the forced switching enable port of the main and backup redundant switcher and the first channel of the oscilloscope at the same time. In order to observe the online switching and switching speed multiple times, the main control system outputs a high-level signal, while the backup control system outputs a low-level signal to distinguish the signal source. The output signal of the main and backup redundant switcher is connected to the analog excitation system server through optical fiber. The server runs the receiving program to read the reflective memory card data and outputs the read results through digital IO. The output results are connected to the second channel of the oscilloscope.
[0121] Test results such as Figure 8 As shown in the figure, the yellow rectangular wave is the output of the first channel of the oscilloscope, that is, the forced switching enable signal, and the blue rectangular wave is the output of the second channel, indicating the control command received by the analog excitation system. When the main control system switches to the backup control system, the command signal changes from a high level to a low level, and when the backup control system switches to the main control system, the command signal changes from a low level to a high level accordingly. This result shows that the online switching function of the main and standby redundant switch is normal. Analyzing the online switching speed, the delay between the two channels is 12.89 microseconds, including the switching time of the main and standby redundant switch, the data reading time of the reflective memory card, and the IO output time. Therefore, the switching time of the main and standby redundant switch is less than 12.89 microseconds, and the fastest control cycle of a normal plasma control system is 50 microseconds. This switching speed satisfies the requirement to complete the online switching within one control cycle.
[0122] The above specific embodiments are only several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A method for real-time synchronization and online switching of redundant control systems, characterized in that: The following steps are involved: System interaction: redundant control systems interact with external systems through control networks, clock synchronization networks, central interlocking networks and real-time communication networks; Time synchronization: the main and standby computing node servers synchronously receive the trigger signal and set the initial value of the running time. Each cycle, they read the external clock signal and calculate the running time according to the formula. The main control system shares the running time, and the standby control system synchronizes regularly, and repeats until the end. Data synchronization: In the operation preparation stage, the main control system and the standby control system read and store the preset data. During operation, they analyze the configuration parameters, perform interpolation calculations, obtain collected data, complete control calculations, and output them through the main and standby redundant switchers. The control process and operation status are synchronized. Through multi-level state machine management, the main control system reads and sends synchronization data, and the backup control system reads, parses, writes as needed and executes the control process according to the signal jump status; Online switching and alarm, the main and standby redundant switch monitoring system performs online switching and alarm in case of abnormalities. The interlocking decision module obtains parameters, performs signal conversion and switching selection. The main control system and the standby control system confirm the status and role according to the decision results, and the abnormal system is restored to synchronization after repair.
2. A method for real-time synchronization and online switching of redundant control systems according to claim 1, characterized in that: In the system interaction: The control network is Ethernet, which is mainly used to transmit non-real-time data such as discharge information and configuration parameters; The clock synchronization network is an optical fiber network used to transmit clock pulse signals and synchronization trigger signals; The central interlocking network is composed of optical fibers or hardware connections and is used to transmit system status to achieve interlocking protection; The real-time communication network is composed of a high-speed, low-latency optical fiber network, which is divided into a real-time communication input network and an output network according to the communication transmission direction, and is used to transmit real-time data.
3. A method for real-time synchronization and online switching of redundant control systems according to claim 1, characterized in that: The time synchronization includes: After completing the device initialization, the computing node server waits for an external trigger signal at time T0, and after receiving the trigger signal, sets the initial operation time of the control system to T0; Read the external clock signal for counting. Each time a pulse change is detected, the running time increases accordingly. The time increment is continuously accumulated from the start time to obtain the current control system running time. The calculation formula is: T current =T0+(N-N0)*T cycle (1) T current Indicates the current running time of the control system, T0 is the initial running time of the system, N represents the current clock signal count, N0 is the count at the starting time, T cycle Indicates the period of the clock pulse signal; The main control system calculates the current running time and writes it into the shared memory, and sends this time to the real-time communication network; The backup control system needs to be synchronized with the main control system regularly. If the current operation cycle needs to be synchronized, the backup control system first reads the current operation time t of the main control system from the real-time communication network, assigns t to T0, and assigns N to N0, and calculates and adjusts its own operation time according to formula (1) to complete the time synchronization with the main control system.
4. A method for real-time synchronization and online switching of redundant control systems according to claim 1, characterized in that: The data synchronization comprises the following steps: During the operation preparation phase, the configuration management services of the main control system and the backup control system read the same interface preset data from the control network. The interface preset data includes static configuration data and dynamic configuration data. The static configuration data remains unchanged during the entire operation process, and the dynamic configuration data is waveform data that changes over time. The static data and waveform inflection point data are stored in the memory of the real-time computing node. During operation, each real-time process runs according to the set cycle. In each cycle, the configuration parameters are first parsed according to the type. For the waveform inflection point data of the dynamic configuration parameters, linear interpolation calculation is performed according to the current system running time, and the results are stored in the data engine. The collected data is periodically acquired through the real-time communication network, and the control calculation is completed in combination with the preset parameters. The calculation results are converted into control commands and output to the primary and standby redundant switcher. The device selects the output according to the operating status of the main control system and the standby control system, and finally outputs the command data to the real-time communication network.
5. A method for real-time synchronization and online switching of redundant control systems according to claim 1, characterized in that: Control process and operation status synchronization include: The operation of the control system is managed by a multi-level state machine. The overall execution process is completed by the first-level state machine. The first-level state machine includes several states: waiting, operation preparation, running, and end. In the "running" stage, each real-time control process is managed by the second-level state machine, that is, each process corresponds to an execution scheduling state machine. The execution scheduling state machine mainly includes several states: startup, synchronization, normal operation, exception handling, and end.
6. A method for real-time synchronization and online switching of redundant control systems according to claim 5, characterized in that: After the first-level state machine enters the "running" state, the second-level state machine immediately enters the startup state; when each process enters the end state, it triggers the first-level state machine to enter the end state; after completing the corresponding device shutdown, memory release or cleanup, the first-level state machine returns to the waiting state, waiting for the next discharge; The execution process of each stage of the first-level state machine is as follows: Waiting stage: The master node communicates with the central control system and enters the operation preparation stage after receiving the valid discharge gun number and discharge duration data; Preparation phase: It is divided into two steps: preliminary locking and final locking. In the preliminary locking phase, stop receiving interface preset modifications, check the memory required by each process and complete the initialization, and put the interface preset parameters into the corresponding memory; Modify the preset parameters by forced unlocking on the interface and re-enter the lock; enter the final lock after all processes have completed initialization, and the control process on the real-time computing node completes device initialization and waits for external triggers, thus completing the operation preparation; Running stage: Different control contents are classified into different categories. Each control class can have multiple execution sequences. Each execution sequence defines a series of algorithm segments. Each algorithm segment corresponds to a specific control algorithm and control parameters. These control classes run on the corresponding CPU processing cores according to the set cycle. Multiple CPU cores run in parallel. Different control classes deployed on the same CPU core are executed in the pre-configured order. Ending stage: After the corresponding device shutdown, memory release or cleanup is completed, the first-level state machine returns to the waiting state and waits for the next discharge.
7. A method for real-time synchronization and online switching of redundant control systems according to claim 6, characterized in that: The execution process of each stage of the second-level state machine is as follows: Startup phase: complete device initialization, memory application and initialization, and write preset parameters into memory; Synchronization phase: used for synchronization of the operating status of the backup control system. When synchronization is required, the synchronization event triggers the state machine to enter this state. After synchronization is completed, it enters the operating state consistent with the main control system. Normal operation stage: The real-time control process sequentially executes the main execution sequence of the control class configured on the CPU core, that is, according to the current system running time, runs the control algorithm corresponding to the main execution sequence to control the parameters of the plasma in real time; Abnormal handling stage: When the monitoring module of the control system finds any abnormality, including external system abnormality, key parameters exceeding the safe operation threshold, and plasma state abnormality, the process scheduling state machine enters the abnormal handling state and switches the execution sequence of the relevant control class, that is, changes the control algorithm or control parameters, controls the plasma to return to the normal state, or stops the current discharge in the case of unavoidable rupture; Ending stage: The condition for entering the ending state is that the discharge time reaches the set value or the abnormal processing result requires the discharge to be terminated; the corresponding device shutdown, memory release or cleanup is completed.
8. A method for real-time synchronization and online switching of redundant control systems according to claim 7, characterized in that: The synchronization process of the master control system performs the following steps: 1) Read the state of each process scheduling state machine and key intermediate calculation results from the shared memory; 2) Summarize and organize the data in the agreed order; 3) sending the sorted synchronization status data via the real-time communication network; The synchronization process of the backup control system is as follows: A. Determine whether synchronization is required. The judgment basis is that the set synchronization time has been reached or the standby control system has been connected after the fault is repaired. If synchronization is required, go to step B. Otherwise, skip this cycle and wait for the next cycle. B. Read the synchronization data sent by the main control system from the real-time communication network; C. After parsing, write the data into the corresponding shared memory and send a synchronization flag signal to enable each process scheduling state machine to enter the synchronization state; D. When the state machine is in the synchronous state, the control system completes the overwriting of the synchronous data in the corresponding memory location. After completion, the state machine jumps from the synchronous state to a state consistent with the main control system according to the parsed state data and executes a consistent control process.
9. A method for real-time synchronization and online switching of redundant control systems according to claim 1, characterized in that: The main-standby redundant switch includes an interlocking decision module, a photoelectric conversion and output switching module, and an alarm module. The switch monitors the operating status of key control system equipment and processes in real time. When the equipment or process is abnormal, it completes the online switching of the main control system and the standby control system and the abnormal alarm; wherein, The interlocking decision module obtains detailed parameters of the main control system and multiple backup control systems, including but not limited to CPU load rate, memory occupancy rate, hard disk occupancy rate, and process heartbeat, makes a switching decision based on the above parameter analysis, and applies the result to the switching module. At the same time, the alarm module sends error information to the monitoring terminal and notifies relevant personnel by SMS; The photoelectric conversion and output switching module completes the conversion between the control command electrical signal and the optical signal, and completes the switching of the control commands of the main control system and the backup control system to the output port according to the decision signal. Finally, the control command is transmitted to the real-time communication network in the form of optical signal.
10. A method for real-time synchronization and online switching of redundant control systems according to claim 9, characterized in that: The status confirmation and recovery process of the main control system and backup control system includes: The main control system and backup control system read the interlocking decision results and confirm their current working status and roles, including the main control system, backup control system, and abnormal system, but there is only one main control system at each moment; The main control system and the backup control system complete regular synchronization work according to their respective roles. When an abnormal system is repaired and reconnected, it first reads the configuration information and completes the role conversion by synchronizing the time, data, operation process and status with the main control system. That is, the abnormal system is changed to the backup system and the main-backup redundant status is restored.
Citation Information
Patent Citations
Method implementing data synchronization between main and spare circuit board
CN101335541A
System for efficiently cracking electronic wastes based on strong plasma
CN102402216A
Digital safety interlocking system of magnetic confinement nuclear fusion experimental facility
CN102420020A
Real-time control system synchronization performance test method with redundancy mechanism and system
CN113867126A
High-reliability high-performance high-power plasma power supply
CN202306304U
Cited By
Control system of airborne air management system controller and control method thereof
CN119872896A
Master-slave synchronous control method, device and control system for central control unit
CN120327578A
Network real-time synchronization communication system
CN120602502A
Clock synchronization control method and system of multi-redundancy control system
CN121325550A
A clock synchronization control method and system for a multiple redundant control system
CN121325550B
