CN116500886B - Multi-machine hot standby control method - Google Patents
Multi-machine hot standby control method Download PDFInfo
- Publication number
- CN116500886B CN116500886B CN202310771749.5A CN202310771749A CN116500886B CN 116500886 B CN116500886 B CN 116500886B CN 202310771749 A CN202310771749 A CN 202310771749A CN 116500886 B CN116500886 B CN 116500886B
- Authority
- CN
- China
- Prior art keywords
- controller
- control state
- control
- slave
- controllers
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000004891 communication Methods 0.000 claims abstract description 5
- 238000004364 calculation method Methods 0.000 description 17
- 238000005516 engineering process Methods 0.000 description 7
- 230000001360 synchronised effect Effects 0.000 description 5
- 238000001914 filtration Methods 0.000 description 4
- 230000009977 dual effect Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 239000000463 material Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B9/00—Safety arrangements
- G05B9/02—Safety arrangements electric
- G05B9/03—Safety arrangements electric with multiple-channel loop, i.e. redundant control systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30076—Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30076—Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
- G06F9/30087—Synchronisation or serialisation instructions
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Hardware Redundancy (AREA)
- Safety Devices In Control Systems (AREA)
Abstract
The invention relates to the technical field of multi-machine hot standby, in particular to a multi-machine hot standby control method which is used for a control system formed by N controllers, wherein all the controllers are in data communication connection, and the control states of the controllers are respectively judged by the controllers so as to execute corresponding steps, so that the switching between a master controller and a slave controller in one control period is realized, and each control period has and only has one output interface to output a control instruction. The control method of the invention has little improvement on the existing hardware platform, does not need to add an arbitration module, has high overall reliability of the system, can realize smooth switching of the master controller and the slave controller in one control period, and ensures the continuity of control instructions output during switching of the master controller and the slave controller.
Description
Technical Field
The invention relates to the technical field of multi-machine hot standby, in particular to a multi-machine hot standby control method.
Background
With the development of computer technology, the automation degree of an industrial control system is increasingly improved, and meanwhile, the problem of safety and reliability of the system is also increasingly outstanding. During continuous long-term operation of the system, faults are unavoidable, and in order to maintain high reliability and high availability of the system, an effective fault-tolerant scheme must be adopted to ensure uninterrupted and stable operation of the system.
Hot standby technology is one of the key technologies for fault tolerance of control systems. At present, the research of the dual-machine hot standby technology is mature, and along with the improvement of the reliability of the system by industrial control, the multi-machine hot standby technology is generated.
The multi-machine hot standby technology is an expansion of the dual-machine hot standby technology, an arbitration module is needed to be additionally arranged in a conventional multi-machine hot standby scheme, the master-slave control state of the multi-machine is identified, and a system instruction is output, but the overall reliability of the system is reduced due to the fact that a hardware module is added; the conventional scheduling logic is multi-machine independent calculation, and performs source selection or weighted fusion output on calculation results of the multi-machines, but long-time calculation deviation accumulation is caused by the fact that the calculation processes of the multi-machines are not synchronized, and the problem of discontinuous output can occur when a master controller and a slave controller are switched.
Disclosure of Invention
The present invention is directed to solving at least one of the technical problems existing in the related art. Therefore, the invention provides a multi-machine hot standby control method.
The invention is realized by the following technical scheme: the multi-machine hot standby control method is used for a control system formed by N controllers, and all the controllers are in data communication connection with each other, wherein N is a natural number greater than 1, and the control method comprises the following steps:
step S100, numbering each controller from No. 1 to N in sequence;
step S200, each controller respectively judges the current control state, sets one controller as the main control state, and executes step S300; the rest N-1 controllers are set to be in a slave control state, and the step S400 is executed;
step S300, the controller currently in the main control state performs the following steps in one control period:
step S301, an input interface reads control parameters; step S302, the controller calculates; step S303, judging the control state of the controller again, if the controller is in the main control state, synchronizing the operation result of the controller to the cache area of each slave controller, and executing step S304; if the controller is in the slave control state, no other operation is executed in the present control period, and step S400 is executed in the next control period; step S304, the control state of the controller is judged again, if the controller is in the main control state, the output interface outputs a control instruction, and the step S300 is executed again in the next control period; if the controller is in the slave control state, no other operation is executed in the present control period, and step S400 is executed in the next control period;
step S400, the controller currently in the slave control state performs the following steps in one control cycle:
step S401, synchronizing the cached controller operation result from the cache area of the controller; step S402, an input interface reads control parameters; step S403, the controller calculates; step S404, judging the control state of the controller again, if the controller is in the main control state, outputting a control instruction by the output interface, and executing step S300 again in the next control period; if the controller is in the slave control state, no other operation is performed in the present control period, and step S400 is performed in the next control period.
Preferably, the step of each controller judging the current control state thereof includes: step S201, a controller 1 detects whether the controller has no fault, if yes, the controller is set to be in a master control state, and if not, the controller is set to be in a slave control state; step S202, the controllers No. 2 to N respectively detect whether the controller has no fault and sequentially detect whether the preamble controller of the controller has fault or no heartbeat, if yes, the controller is set to be in a master control state, otherwise, the controller is set to be in a slave control state.
Preferably, the substep of determining whether the corresponding controller is in the main control state in the step S303 is as follows: detecting whether the controller has no fault, if so, the controller is in a main control state; otherwise the present controller is set to the slave control state.
Preferably, the step of determining whether the corresponding controller is in the main control state in the step S304 is the same as the step of determining whether the corresponding controller is in the main control state in the step S404, and includes: if the controller is a No. 1 controller, detecting whether the controller has no fault, if so, setting the controller to be in a main control state; otherwise, the controller is set to be in a slave control state; if the controller is any one of the controllers from No. 2 to N, detecting whether the controller has no fault and sequentially detecting whether the preamble controller of the controller has fault or no heartbeat, and if so, setting the controller to be in a main control state; otherwise the present controller is set to the slave control state.
The above technical solutions in the embodiments of the present invention have at least one of the following technical effects:
the control method disclosed by the invention has the advantages that the improvement on the existing hardware platform is small, an arbitration module is not needed to be additionally arranged, the overall reliability of the system is high, the control method can be used for dual-machine hot standby and multi-machine hot standby above dual machines, and the expansibility is good; the seamless switching between the master controller and the slave controller of the multi-machine hot standby control system in one control period can be realized; in addition, each master controller can synchronize the operation result of the controller to the corresponding slave controller in the control period of each non-master controller and slave controller switching as the initial value of the slave controller in the next control period controller operation, so that the operation result of the controllers has no calculation deviation or the calculation deviation is extremely small under the condition, the smooth switching of the master controller and the slave controller in one control period can be realized, the continuity of control instructions output during the master-slave controller switching is ensured, and the control method has strong compatibility to a hardware platform and wide universality; in addition, even if the master controller and the slave controller are switched in a certain control period, the master controller corresponding to the next control period of the control period still synchronizes the operation result to the slave controller, so that the calculation deviation is not accumulated; the controller with the front number becomes the main controller, and has higher priority than the controller with the rear number, so that the logic is clear, the implementation is easy, and the fault controller can be positioned by monitoring the serial number of the main controller in the maintenance process of the control system, thereby being convenient for management.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a timing chart of the control method according to the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The following examples are illustrative of the invention but are not intended to limit the scope of the invention.
In the description of the embodiments of the present invention, it should be noted that the terms "center", "longitudinal", "lateral", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In describing embodiments of the present invention, it should be noted that, unless explicitly stated and limited otherwise, the terms "coupled," "coupled," and "connected" should be construed broadly, and may be either a fixed connection, a removable connection, or an integral connection, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in embodiments of the present invention will be understood in detail by those of ordinary skill in the art.
In embodiments of the invention, unless expressly specified and limited otherwise, a first feature "up" or "down" on a second feature may be that the first and second features are in direct contact, or that the first and second features are in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The invention provides a multi-machine hot standby control method, which is used for a control system formed by N controllers, wherein the controllers are mutually in data communication connection, namely, the controllers can be in data communication through optical fibers, network cables and other mediums, N is a natural number larger than 1, and the control method is characterized by comprising the following steps:
and step S100, numbering the controllers from the No. 1 to the N in sequence, and dividing the control system into a No. 1 controller, a No. 2 controller, a No. 3 controller, & gtand an N controller.
Step S200, each controller respectively judges the current control state, sets one controller as the main control state, and executes step S300; the remaining N-1 controllers are set to slave control states, and step S400 is performed.
Step S300, the controller currently in the main control state performs the following steps in one control period:
step S301, the input interface reads control parameters, wherein the control parameters refer to all input information required by the controller to perform controller operation, such as user parameter setting, measurement information and the like;
in step S302, the controller calculates, that is, based on the result of the last control period controller calculation and the control parameter of the current control period, the current control period controller calculation to obtain the result of the controller calculation of the current control period of the controller. Specifically, the controller operations corresponding to the controllers with different purposes may involve different algorithms, and the algorithms possibly involved include, but are not limited to, filtering algorithms such as kalman filtering, weighted recursive filtering, arithmetic average filtering, etc., and control algorithms such as PID, neural network, intelligent control, etc.;
step S303, judging the control state of the controller again, if the controller is in the main control state, synchronizing the operation result of the controller to the cache area of each slave controller through media such as optical fiber, network cable and the like, and executing step S304; if the controller is in the slave control state, no other operation is executed in the present control period, and step S400 is executed in the next control period;
step S304, the control state of the controller is judged again, if the controller is in the main control state, the output interface outputs a control instruction, and the step S300 is executed again in the next control period; if the controller is in the slave control state, no other operation is performed in the present control period, and step S400 is performed in the next control period. Specifically, the control command is a value for performing system control in a controller operation result corresponding to a controller for outputting the control command.
Step S400, the controller currently in the slave control state performs the following steps in one control cycle:
step S401, synchronizing the operation result of the controller from the buffer area of the controller, namely taking the operation result of the controller buffered in the buffer area of the controller as the initial value of the current control period controller operation of the controller;
step S402, the input interface reads control parameters, i.e. all input information required by the controller to perform controller operation, such as user parameter setting, measurement information, etc., and in each control period, the control parameters read from the controller in the control state are the same as the control parameters read from the controller in the main control state;
step S403, performing controller operation, that is, performing controller operation of the current control period based on the initial value obtained in step S401 and the control parameter obtained in step S402, to obtain a controller operation result of the current control period of the controller. Specifically, for the same control system, step S403 is the same as the algorithm involved in step S302;
step S404, judging the control state of the controller again, if the controller is in the main control state, outputting a control instruction by the output interface, and executing step S300 again in the next control period; if the controller is in the slave control state, no other operation is performed in the present control period, and step S400 is performed in the next control period. Because step S304 and step S404 run synchronously, in each control period, there is only one output interface outputting a control command, so that seamless switching between the master controller and the slave controller of the multi-machine hot standby control system in one control period can be realized, wherein the master controller refers to the controller in the master control state, and the slave controller refers to the controller in the slave control state.
The control method has little improvement on the existing hardware platform, does not need to add an arbitration module, has high overall reliability of the system, can be used for dual-machine hot standby and multi-machine hot standby above dual machines, and has good expansibility; the seamless switching between the master controller and the slave controller of the multi-machine hot standby control system in one control period can be realized; in addition, each master controller can synchronize the operation result of the controller to the corresponding slave controller in the control period of each non-master controller and slave controller switching as the initial value of the slave controller in the next control period controller operation, so that the operation result of the controllers has no calculation deviation or the calculation deviation is extremely small under the condition, the smooth switching of the master controller and the slave controller in one control period can be realized, the continuity of the control instruction output in the control state switching is ensured, and the control method has strong compatibility to a hardware platform and wide universality; in addition, even if the master controller and the slave controller are switched in a certain control period, the master controller corresponding to the next control period of the control period synchronizes the operation result with the slave controller, so that the calculation deviation is not accumulated.
In the step S200, the step of each controller judging the current control state thereof includes: step S201, a controller 1 detects whether the controller has no fault, if yes, the controller is set to be in a master control state, and if not, the controller is set to be in a slave control state, wherein the term "the controller has no fault" means "the controller operates normally, and the CPU, the disk and the like have no fault alarm"; step S202, the controllers No. 2 to N respectively detect whether the controller has no fault and sequentially detect whether the preamble controller of the controller has faults or has no heartbeat, if yes, the controller is set to a main control state, otherwise, the controller is set to a slave control state, wherein the preamble controller of the controller refers to a controller with the corresponding number smaller than the number of the controller, for example, the preamble controller of the controller No. 3 refers to a controller No. 1 and a controller No. 2, and the preamble controller of the controller No. 5 refers to a controller No. 1 to a controller No. 4. The "failure or no heartbeat" of the preamble controller of the controller means that the preamble controller of the controller is abnormal in operation, the failure of the CPU, the disk and the like is alarmed, or the heartbeat information of the preamble controller is not received. Through step S200, only 1 controller is enabled to be a master controller, the other controllers are all slave controllers, control state management of each controller is achieved, an arbitration module is not needed to be additionally arranged, and overall reliability of the system is high.
The substep of determining whether the corresponding controller is in the main control state in step S303 is as follows: detecting whether the controller has no fault, if so, the controller is in a main control state; otherwise the present controller is set to the slave control state. When executing step S303, if the present controller is any one of the number 2 controller to the number N controller, it can be determined whether the present controller is the main controller without detecting the preamble controller of the present controller, so that the determination process can be simplified.
The step of judging whether the corresponding controller is in the main control state in the step S304 is the same as the step of judging whether the corresponding controller is in the main control state in the step S404, and includes: if the controller is a No. 1 controller, detecting whether the controller has no fault, if so, setting the controller to be in a main control state; otherwise, the controller is set to be in a slave control state; if the controller is any one of the controllers from No. 2 to N, detecting whether the controller has no fault and sequentially detecting whether the preamble controller of the controller has fault or no heartbeat, and if so, setting the controller to be in a main control state; otherwise the present controller is set to the slave control state. The steps are equivalent to redefining the master controller and the slave controllers before outputting the control instruction, and the controllers with the front numbers become the master controllers and have higher priority than the controllers with the rear numbers, so that the logic is clear, the implementation is easy, and the fault controllers can be positioned by monitoring the serial numbers of the master controllers in the maintenance process of the control system, so that the management is convenient.
Referring to fig. 1, when n=3, there are No. 1 controller, no. 2 controller and No. 3 controller, if a failure of the main controller is detected at time t1_2 in the current period, the specific control steps are as follows:
in the current control period, at the time T1-0, if the No. 1 controller is the main controller, the controller reads the control parameters and carries out controller operation; the No. 2 controller and the No. 3 controller are used as slave controllers to execute corresponding steps of the slave controllers. At the time T1-1, if the No. 1 controller has no fault, the No. 1 controller is still the master controller, and the operation result of the controllers is synchronized to the buffer area of the slave controller; the No. 2 controller and the No. 3 controller are used as slave controllers to execute corresponding steps of the slave controllers. At the time T1_2, if the controller No. 1 fails, the controller No. 1 is set as a slave controller, and a control instruction is not output; if the No. 2 controller has no fault, the No. 2 controller is set as a master controller, and the No. 2 controller outputs a control instruction, and the No. 3 controller is still a slave controller at the moment and does not output the control instruction.
After entering the next control period, the controller No. 2 is used as a master controller at the moment T2-0, the control parameters are read and the controller operation is carried out, and the controller No. 1 and the controller No. 3 are used as slave controllers and execute the corresponding steps of the slave controllers. At the time T2-1, if the No. 2 controller has no fault, the No. 2 controller is still the master controller, and the operation result of the controllers is synchronized to the buffer area of the slave controller; the controller 1 and the controller 3 are used as slave controllers to execute corresponding steps of the slave controllers. At the time T2-2, if the controller No. 1 fails, the controller No. 1 is still a slave controller, and a control instruction is not output; if the No. 2 controller has no fault, the No. 2 controller is still the main controller, the No. 2 controller outputs a control instruction, and the No. 3 controller is still the slave controller at the moment and does not output the control instruction.
Referring to fig. 1, when n=3, there are No. 1 controller, no. 2 controller and No. 3 controller, if a failure of the main controller is detected at time t1_1 in the current period, the specific control steps are as follows:
in the current control period, at the time T1-0, if the No. 1 controller is the main controller, the controller reads the control parameters and carries out controller operation; the No. 2 controller and the No. 3 controller are used as slave controllers to execute corresponding steps of the slave controllers. At the time T1-1, if the No. 1 controller fails, the No. 1 controller is switched to a slave controller, and the operation result of the controllers is not synchronized with the rest slave controller buffer areas; the controller No. 2 and the controller No. 3 still act as slave controllers, executing the corresponding steps of the slave controllers. At the time T1_2, the No. 1 controller fails and does not output a control instruction; if the No. 2 controller has no fault, the No. 2 controller is set as a master controller, and the No. 2 controller outputs a control instruction, and the No. 3 controller is still a slave controller at the moment and does not output the control instruction.
After entering the next control period, the controller 2 is used as the master controller, the control parameters are read and the controller operation is performed, and since the corresponding master controller does not synchronize the controller operation results with the slave controllers in the previous control period, that is, the controller 1 does not synchronize the controller operation results with the controller 2 and the controller 3 between the time T1_1 and the time T1_2, the controller operation result read by the controller 1 from the controller cache region after the time T1_2 in the control period is the controller operation result of the controller 1 from the controller cache region in the previous control period, and the controller operation result read by the controller 3 from the controller cache region after the time T1_2 in the control period is the controller operation result of the controller 3 from the controller cache region in the previous control period, that is, each controller independently calculates and does not synchronize the controller operation results in the control period with faults, but since the corresponding master controller still synchronizes the slave controllers in the next control period with faults can not accumulate the calculation deviation. At the time T2-1, if the No. 2 controller has no fault, the No. 2 controller is still the master controller, and the operation result of the controllers is synchronized to the buffer area of the slave controller; the controller 1 and the controller 3 are used as slave controllers to execute corresponding steps of the slave controllers. At the time T2-2, if the controller No. 1 fails, the controller No. 1 is still a slave controller, and a control instruction is not output; if the No. 2 controller has no fault, the No. 2 controller is still the main controller, the No. 2 controller outputs a control instruction, and the No. 3 controller is still the slave controller at the moment and does not output the control instruction.
The control method disclosed by the invention has the advantages that the improvement on the existing hardware platform is small, an arbitration module is not needed to be additionally arranged, the overall reliability of the system is high, the control method can be used for dual-machine hot standby and multi-machine hot standby above dual machines, and the expansibility is good; the seamless switching between the master controller and the slave controller of the multi-machine hot standby control system in one control period can be realized; in addition, each master controller can synchronize the operation result of the controller to the corresponding slave controller in the control period of each non-master controller and slave controller switching as the initial value of the slave controller in the next control period controller operation, so that the operation result of the controllers has no calculation deviation or the calculation deviation is extremely small under the condition, the smooth switching of the master controller and the slave controller in one control period can be realized, the continuity of control instructions output during the master-slave controller switching is ensured, and the control method has strong compatibility to a hardware platform and wide universality; in addition, even if the master controller and the slave controller are switched in a certain control period, the master controller corresponding to the next control period of the control period still synchronizes the operation result to the slave controller, so that the calculation deviation is not accumulated; the controller with the front number becomes the main controller, and has higher priority than the controller with the rear number, so that the logic is clear, the implementation is easy, and the fault controller can be positioned by monitoring the serial number of the main controller in the maintenance process of the control system, thereby being convenient for management.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (4)
1. The multi-machine hot standby control method is used for a control system formed by N controllers, and all the controllers are connected with each other in a data communication way through network wires, wherein N is a natural number greater than 1, and the control method is characterized by comprising the following steps:
step S100, numbering each controller from No. 1 to N in sequence;
step S200, each controller respectively judges the current control state, sets one controller as the main control state, and executes step S300; the rest N-1 controllers are set to be in a slave control state, and the step S400 is executed;
step S300, the controller currently in the main control state performs the following steps in one control period:
step S301, an input interface reads control parameters; step S302, the controller calculates; step S303, judging the control state of the controller again, if the controller is in the main control state, synchronizing the operation result of the controller to the cache area of each slave controller, and executing step S304; if the controller is in the slave control state, no other operation is executed in the present control period, and step S400 is executed in the next control period; step S304, the control state of the controller is judged again, if the controller is in the main control state, the output interface outputs a control instruction, and the step S300 is executed again in the next control period; if the controller is in the slave control state, no other operation is executed in the present control period, and step S400 is executed in the next control period;
step S400, the controller currently in the slave control state performs the following steps in one control cycle:
step S401, synchronizing the cached controller operation result from the cache area of the controller; step S402, an input interface reads control parameters; step S403, the controller calculates; step S404, judging the control state of the controller again, if the controller is in the main control state, outputting a control instruction by the output interface, and executing step S300 again in the next control period; if the controller is in the slave control state, no other operation is performed in the present control period, and step S400 is performed in the next control period.
2. The method of claim 1, wherein in step S200, each controller determines the current control state of each controller respectively, the method comprises:
step S201, a controller 1 detects whether the controller has no fault, if yes, the controller is set to be in a master control state, and if not, the controller is set to be in a slave control state;
step S202, the controllers No. 2 to N respectively detect whether the controller has no fault and sequentially detect whether the preamble controller of the controller has fault or no heartbeat, if yes, the controller is set to be in a master control state, otherwise, the controller is set to be in a slave control state.
3. The method according to claim 1, wherein the sub-step of determining whether the corresponding controller is in the main control state in the step S303 is as follows: detecting whether the controller has no fault, if so, the controller is in a main control state; otherwise the present controller is set to the slave control state.
4. The method as set forth in claim 1, wherein the step of determining whether the corresponding controller is in the main control state in the step S304 is the same as the step of determining whether the corresponding controller is in the main control state in the step S404, and the method includes:
if the controller is a No. 1 controller, detecting whether the controller has no fault, if so, setting the controller to be in a main control state; otherwise, the controller is set to be in a slave control state;
if the controller is any one of the controllers from No. 2 to N, detecting whether the controller has no fault and sequentially detecting whether the preamble controller of the controller has fault or no heartbeat, and if so, setting the controller to be in a main control state; otherwise the present controller is set to the slave control state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310771749.5A CN116500886B (en) | 2023-06-28 | 2023-06-28 | Multi-machine hot standby control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310771749.5A CN116500886B (en) | 2023-06-28 | 2023-06-28 | Multi-machine hot standby control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116500886A CN116500886A (en) | 2023-07-28 |
CN116500886B true CN116500886B (en) | 2023-09-08 |
Family
ID=87328797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310771749.5A Active CN116500886B (en) | 2023-06-28 | 2023-06-28 | Multi-machine hot standby control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116500886B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101004587A (en) * | 2006-01-13 | 2007-07-25 | 艾默生过程管理电力和水力解决方案有限公司 | Method for redundant controller synchronization during normal and program mismatch conditions |
CN107229221A (en) * | 2016-03-23 | 2017-10-03 | 通用汽车环球科技运作有限责任公司 | Fault-tolerant mode and handoff protocol for multiple hot and cold standby redundancies |
CN107300851A (en) * | 2016-04-14 | 2017-10-27 | 南京南瑞继保电气有限公司 | A kind of logical algorithm unperturbed update method of redundancy control system |
CN109306875A (en) * | 2018-09-25 | 2019-02-05 | 中国船舶重工集团公司第七0三研究所 | A kind of synchronous hot backup redundancy switching device of steam turbine DEH dual controller and method |
CN109991899A (en) * | 2019-04-01 | 2019-07-09 | 上海电气泰雷兹交通自动化系统有限公司 | Half dynamic synchronization method of data between the active and standby controller of Rail Transit System |
CN110843857A (en) * | 2019-11-21 | 2020-02-28 | 南京恩瑞特实业有限公司 | Fault detection and switching system for dual-machine hot standby ATO equipment |
-
2023
- 2023-06-28 CN CN202310771749.5A patent/CN116500886B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101004587A (en) * | 2006-01-13 | 2007-07-25 | 艾默生过程管理电力和水力解决方案有限公司 | Method for redundant controller synchronization during normal and program mismatch conditions |
CN107229221A (en) * | 2016-03-23 | 2017-10-03 | 通用汽车环球科技运作有限责任公司 | Fault-tolerant mode and handoff protocol for multiple hot and cold standby redundancies |
CN107300851A (en) * | 2016-04-14 | 2017-10-27 | 南京南瑞继保电气有限公司 | A kind of logical algorithm unperturbed update method of redundancy control system |
CN109306875A (en) * | 2018-09-25 | 2019-02-05 | 中国船舶重工集团公司第七0三研究所 | A kind of synchronous hot backup redundancy switching device of steam turbine DEH dual controller and method |
CN109991899A (en) * | 2019-04-01 | 2019-07-09 | 上海电气泰雷兹交通自动化系统有限公司 | Half dynamic synchronization method of data between the active and standby controller of Rail Transit System |
CN110843857A (en) * | 2019-11-21 | 2020-02-28 | 南京恩瑞特实业有限公司 | Fault detection and switching system for dual-machine hot standby ATO equipment |
Also Published As
Publication number | Publication date |
---|---|
CN116500886A (en) | 2023-07-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA2733788C (en) | Method and systems for redundant server automatic failover | |
US9323823B2 (en) | Method for operating a redundant automation system | |
US20050028024A1 (en) | Process data collection system | |
CN114500554B (en) | Internet of things system management method | |
CN111064646B (en) | Looped network redundancy method, device and storage medium based on broadband field bus | |
CN109104347A (en) | Gateway shift process, system and its apparatus based on CANopen agreement transmission data | |
US7991286B2 (en) | Optical transmission apparatus | |
CN116500886B (en) | Multi-machine hot standby control method | |
JPH0951332A (en) | Communication network automatic restoring system | |
CN118502346A (en) | Control method of PLC controller network with redundant CPU | |
CN114148174A (en) | Battery management module, working method thereof, battery management system and electric vehicle | |
EP2372554B1 (en) | Information processing device and error processing method | |
CN113472891B (en) | SDN controller cluster data processing method, equipment and medium | |
CN117271227A (en) | Database cluster master node switching method, system and management and control platform | |
CN109088937B (en) | Cluster authorization method and device based on unified management | |
CN114244735B (en) | Master and slave operation switching method, device and storage medium | |
CN117929610A (en) | Liquid chromatograph system control method and device | |
JP3374067B2 (en) | Distributed monitoring and control system and its database switching method | |
CN101500183B (en) | Method for synchronizing frame head by transmission equipment and apparatus thereof | |
CN114500525B (en) | Method, device, computer equipment and medium for updating nodes in distributed system | |
CN115509796B (en) | Method and device for processing fault node, nonvolatile storage medium and processor | |
JPH03179543A (en) | Data equalizing method and computer system | |
JP3663571B2 (en) | Monitoring system, monitoring apparatus and monitoring method | |
CN116804911A (en) | Controller software partition synchronization method, system, equipment and medium | |
CN115766403A (en) | Working mode management method and system for power grid dispatching system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |