Main and standby vehicle control unit synchronous operation method and vehicle control unit
By implementing the synchronous operation method of the vehicle control unit in the TCMS system, through data synchronization and hot standby redundancy, the problem of discontinuity of commands during main and standby switching in traditional systems is solved, ensuring the smooth operation of the vehicle and the comfort of passengers.
Patent Information
- Application Number
- CN202211710832.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In traditional TCMS systems, the two VCU programs run independently and are not strictly synchronized, resulting in discontinuity of instructions during main and backup switching, causing impulsiveness or abruptness of the vehicle, affecting passenger comfort.
A method for synchronous operation of the main and backup vehicle control unit is provided. After entering the cycle, the micro-period in which the train control and monitoring system TCMS is used every preset cycle, and data synchronization with another VCU is performed according to the micro-period. If the VCU is backup, hot backup redundancy is performed based on the synchronized data.
Through data synchronization and hot standby redundancy, the TCMS applications in the main and standby VCU are executed synchronously every cycle, and the same results are output, ensuring that the main and standby VCU can be switched completely seamlessly, avoiding impulsiveness or jerks in the vehicle.
Smart Images

Figure CN116373945B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of rail transit technology, and in particular to a method for synchronously operating a primary and standby vehicle control unit and a vehicle control unit. Background Art
[0002] During the operation of the train, TCMS (Train Control and Monitoring System) completes the logic control, data monitoring and fault diagnosis of the train through information exchange between various subsystems. Since the TCMS system is the basic equipment for manual and automatic driving of the vehicle, it has high requirements for the safety and reliability of the hardware platform. Generally, two VCUs (Vehicle Control Units) at the head and tail are used for hot standby redundancy. When the main VCU fails, the other VCU automatically switches to the main VCU.
[0003] The two VCU programs of the traditional TCMS system run independently without strict synchronization. As a result, when the two VCUs switch, the vehicle may feel impulsive or jerky due to discontinuous instructions, affecting the comfort of passengers. Summary of the invention
[0004] In order to solve one of the above-mentioned technical defects, the present application provides a method for synchronous operation of a primary and standby vehicle control units and a vehicle control unit.
[0005] In a first aspect of the present application, a method for synchronous operation of a primary and standby vehicle control unit is provided, wherein the method is executed by a vehicle control unit VCU, and the method comprises:
[0006] After entering the cycle operation, every preset cycle, the microcycle of the train control and monitoring system TCMS application is determined; the microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle;
[0007] Synchronize data with another VCU according to the microcycle;
[0008] If the VCU is a backup, hot standby redundancy is performed based on the synchronized data.
[0009] Optionally, the VCU and the other VCU are located in different semi-mobile and semi-supported TMC vehicles with a cab;
[0010] The VCU and another VCU are connected to the TCMS backbone network through dual channels respectively;
[0011] The VCU communicates with another VCU via dual channels;
[0012] One of the VCU and the other VCU is a master, and the other is a backup.
[0013] Optionally, the microcycle is an application processing microcycle;
[0014] Data synchronization with another VCU is performed according to the microcycle, including:
[0015] If the VCU is the master, it sends external input data to another VCU via the Ethernet communication network ECN;
[0016] If the VCU is in standby mode, it receives external input data sent by another VCU through ECN;
[0017] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0018] If the VCU is in standby mode, application logic processing is performed based on external input data sent by another VCU.
[0019] Optionally, before sending the external input data to another VCU through the ECN, the method further includes:
[0020] Obtain external input data and perform application logic processing based on the obtained input data.
[0021] Optionally, the microcycle is an application output microcycle;
[0022] Data synchronization with another VCU is performed according to the microcycle, including:
[0023] If the VCU is the master, the application logic processing results are sent to another VCU via ECN;
[0024] If the VCU is a backup, it receives the application logic processing result sent by another VCU through ECN;
[0025] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0026] If the VCU is a standby VCU, determine whether the application logic processing result sent by another VCU is consistent with its own application logic processing result;
[0027] If they are inconsistent, an alarm will be issued.
[0028] Optionally, the microcycle is an application input microcycle;
[0029] Data synchronization with another VCU is performed according to the microcycle, including:
[0030] If the VCU is the master, it sends external input data to the other VCU via ECN;
[0031] If the VCU is in standby mode, it receives external input data sent by another VCU through ECN;
[0032] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0033] If the VCU is in standby mode, the input of the application operation is determined based on the external input data sent by another VCU.
[0034] Optionally, the microcycle is an application idle microcycle;
[0035] Data synchronization with another VCU is performed according to the microcycle, including:
[0036] If the VCU is the master, after receiving the clock synchronization message sent by another VCU through the first channel, it determines the time when the clock synchronization message is received, and feeds back the time when the clock synchronization message is received and the time of sending the feedback to the other VCU through the first channel; after receiving the clock synchronization message sent by another VCU through the second channel, it determines the time when the clock synchronization message is received, and feeds back the time when the clock synchronization message is received and the time of sending the feedback to the other VCU through the second channel; wherein the first channel is one of the dual channels between the VCU and the other VCU, and the second channel is the other of the dual channels between the VCU and the other VCU;
[0037] If the VCU is a standby VCU, a clock synchronization message is sent to another VCU through the first channel, and the time when the clock synchronization message is received and the feedback sending time are received from the other VCU through the first channel; a clock synchronization message is sent to another VCU through the second channel, and the time when the clock synchronization message is received and the feedback sending time are received from the other VCU through the second channel;
[0038] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0039] If the VCU is in standby mode,
[0040] From the synchronized data, obtain the time t at which another VCU receives the clock synchronization message fed back through the first channel 12 and feedback sending time t 13 ; Get the time t at which another VCU receives the clock synchronization message through the second channel feedback 22 and feedback sending time t 23 ;
[0041] Determine the time t at which a clock synchronization message is sent to another VCU via the first channel 11 , and the time t at which feedback from another VCU is received through the first channel 14 ; Determine the time t to send a clock synchronization message to another VCU through the second channel21 , and the time t at which feedback from another VCU is received through the second channel 24 ;
[0042] Calculate the clock offset of the first channel Calculate the clock skew of the second channel
[0043] If both offset1 and offset2 are valid, and neither offset1 nor offset2 exceeds the preset error, the average value of offset1 and offset2 is output;
[0044] If only one of offset1 and offset2 is valid, the valid clock offset is output;
[0045] If both offset1 and offset2 are invalid, hot standby redundancy switching is performed.
[0046] Optionally, after entering the cycle operation, before determining the microcycle in which the train control and monitoring system TCMS application is located at each preset cycle, the method further includes:
[0047] After power-on, complete hardware and software initialization;
[0048] After successful initialization, receive the board ID of another VCU;
[0049] If the board ID of another VCU is not received within a preset time period, the VCU is determined to be a standby;
[0050] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is greater than the board ID of the own VCU, the VCU is determined to be the master;
[0051] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is smaller than its own board ID, the VCU is determined to be a standby;
[0052] If the VCU is the master, it sends a follow-up data information frame to another VCU after entering the cycle operation;
[0053] If the VCU is in standby mode, it will follow after receiving the follow-up data information frame, and enter the cycle operation after the follow-up is successful.
[0054] Optionally, after power-on and hardware and software initialization, the following steps are also included:
[0055] Send the board ID to another VCU.
[0056] According to a second aspect of the present application, a vehicle control unit is provided, on which a computer program is stored; the computer program is executed by a processor to implement the method described in the first aspect above.
[0057] The present application provides a method for synchronous operation of a primary and standby vehicle control unit and a vehicle control unit, the method being executed by a vehicle control unit VCU, the method comprising: after entering cyclic operation, determining the microcycle in which a train control and monitoring system TCMS application is located at every preset cycle; the microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle; synchronizing data with another VCU according to the microcycle in which it is located; if the VCU is a standby, performing hot standby redundancy according to the synchronized data.
[0058] The method provided in the present application performs data synchronization every preset period after entering the cycle operation, thereby ensuring that the TCMS applications in the primary and standby VCUs are executed synchronously every cycle and output the same results, thereby ensuring that the primary and standby VCUs can switch completely seamlessly.
[0059] In addition, in one implementation, the VCU and another VCU are located in different TCMS vehicles, and dual-channel communication is implemented between the VCUs and between the VCU and the TCMS to ensure completely seamless switching when the primary and standby VCUs are switched.
[0060] In addition, in one implementation, the data synchronization and hot standby redundancy scheme in the application processing microcycle are clarified to ensure data synchronization during the application processing microcycle and ensure completely seamless switching when the primary and standby VCUs switch.
[0061] In addition, in one implementation, before sending external input data to another VCU, the external input data is also acquired, and application logic processing is performed according to the acquired input data, thereby ensuring accurate processing of the application logic.
[0062] In addition, in one implementation, the data synchronization and hot standby redundancy scheme in the application output microcycle are clarified to ensure data synchronization during the application output microcycle and to ensure completely seamless switching when the primary and standby VCUs are switched.
[0063] In addition, in one implementation, the data synchronization and hot standby redundancy scheme in the application input microcycle are clarified to ensure data synchronization during the application input microcycle and ensure completely seamless switching when the primary and standby VCUs switch.
[0064] In addition, in one implementation, a clock synchronization scheme in an idle microcycle of an application is clarified, data synchronization during an idle microcycle of an application is ensured, and completely seamless switching is ensured when the primary and standby VCUs are switched.
[0065] In addition, in one implementation, the data synchronization during the power-on process and the hot standby redundancy scheme are clarified to ensure data synchronization during the power-on process and to ensure completely seamless switching when the primary and standby VCUs are switched.
[0066] In addition, in one implementation, after power-on and hardware and software initialization, the board ID is sent to another VCU to determine the active and standby VCUs, and then data synchronization and seamless switching of the active and standby VCUs are performed.
[0067] The vehicle control unit provided in the present application has a computer program executed by a processor to perform data synchronization every preset cycle after entering the cycle operation, thereby ensuring that the TCMS applications in the primary and standby VCUs are executed synchronously every cycle and output the same results, thereby ensuring that the primary and standby VCUs can switch completely seamlessly. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0069] Figure 1 A schematic flow chart of a method for synchronous operation of a primary and standby vehicle control unit provided in an embodiment of the present application;
[0070] Figure 2 A schematic diagram of a VCU redundant configuration provided in an embodiment of the present application;
[0071] Figure 3 A schematic diagram of power-on synchronization provided in an embodiment of the present application;
[0072] Figure 4 A synchronization schematic diagram of a method for synchronous operation of a primary and standby vehicle control unit provided in an embodiment of the present application;
[0073] Figure 5 A schematic diagram of clock synchronization provided for an embodiment of the present application. DETAILED DESCRIPTION
[0074] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0075] In the process of realizing this application, the inventor discovered that TCMS (Train Control and Monitoring System) is the command system and nerve center of the train, which completes the logical control, data monitoring and fault diagnosis of the train through the information interaction of various subsystems. VCU (Vehicle Control Unit) is the core component of the TCMS system, a high-performance computer used in the train network control system, which can perform the control, monitoring and diagnosis functions of the subway train, thereby ensuring the safe and reliable operation of the train.
[0076] In subway vehicles, VCU generally adopts hot standby redundant configuration, with a set of VCU hosts arranged in the head and tail vehicles. Under normal circumstances, one host is the main one, responsible for the management of the unit and the train; the other host is the backup one, which does not perform any output and monitors the status of the host. When the main device fails, the slave device determines that the main device has failed based on the life signal, takes over the control function of the main device, and becomes the new main device without affecting the train control.
[0077] There is a certain synchronization operation mechanism between the two VCUs with hot standby redundancy to ensure that when the main and standby systems are switched, the control instructions output to the external vehicle subsystems, especially the traction and braking system, are completed continuously, ensuring that the TCMS system does not cause command jumps due to the switching of the VCU main and standby systems, thereby causing the vehicle to feel impulsive or frustrated and affecting the comfort of passengers.
[0078] In response to the above problems, an embodiment of the present application provides a method for synchronous operation of a primary and standby vehicle control unit and a vehicle control unit. The method is executed by a vehicle control unit VCU, and the method includes: after entering the cyclic operation, every preset cycle, determining the microcycle in which the train control and monitoring system TCMS application is located; the microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle; data synchronization is performed with another VCU according to the microcycle in which it is located; if the VCU is a standby, hot standby redundancy is performed according to the synchronized data. The method provided by the present application performs data synchronization every preset cycle after entering the cyclic operation, ensuring that the TCMS applications in the primary and standby VCUs are synchronously executed every cycle and output the same results, ensuring that the primary and standby VCUs can switch completely seamlessly when switching. .
[0079] The implementation process of the method for synchronous operation of the main and standby vehicle control units provided in this embodiment is as follows: Figure 1 shown.
[0080] 101. After entering the cycle operation, every preset cycle, determine the micro cycle of the TCMS application.
[0081] The microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle.
[0082] 102. Perform data synchronization with another VCU according to the microcycle.
[0083] 103. If the VCU is a standby, hot standby redundancy is performed according to the synchronized data.
[0084] The method for synchronous operation of the main and standby vehicle control units provided in this embodiment is executed by the VCU. The VCU executing the method in this embodiment and another VCU are respectively located in TMc (different semi-mobile and semi-supported with a cab) vehicles. The VCU and another VCU are respectively connected to the TCMS backbone network through dual channels. The VCU and another VCU communicate through dual channels. One of the VCU and another VCU is the main one and the other is the standby one.
[0085] by Figure 2 Taking the four-carriage train shown as an example, a VCU is set in each of the two TMC cars, each VCU is connected to the TCMS backbone network through the A / B dual channel, and the two VCUs communicate through the A / B dual channel to form hot standby redundancy.
[0086] Under normal circumstances, one VCU is the master, responsible for the management of the unit and the train, and the output control of the vehicle subsystem; the other VCU is the backup, running in full synchronization with the host but without any output, and monitoring the status of the host. When the master device fails, the slave device determines that the master device has failed based on the synchronization signal, takes over the control function of the master device, and becomes the new master device without affecting the train control.
[0087] The VCU that executes the method of this embodiment may be a main VCU or a backup VCU.
[0088] In addition, after the VCU is powered on, it will enter a cycle operation. Figure 1 The method for synchronous operation of the active and standby vehicle control units shown performs data synchronization and hot standby redundancy.
[0089] In order to ensure that the active and standby VCUs are synchronized during the periodic operation, power-on synchronization is also performed during the power-on process. The synchronization process is as follows:
[0090] 201, after power-on, complete hardware and software initialization.
[0091] 202, after successful initialization, receiving the board ID of another VCU. At the same time, the board ID is also sent to another VCU.
[0092] 203. If the board ID of another VCU is not received within the preset time period, the VCU is determined to be a standby.
[0093] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is greater than its own board ID, the VCU is determined to be the master.
[0094] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is smaller than its own board ID, the VCU is determined to be a backup.
[0095] 204, if the VCU is the master, after entering the cycle operation, it sends a follow-up data information frame to another VCU.
[0096] If the VCU is in standby mode, it will follow after receiving the follow-up data information frame, and enter the cycle operation after the follow-up is successful.
[0097] The following uses the example of VCU1 and VCU2 being powered on in sequence to further illustrate the above power-on synchronization process. It should be noted that the execution subject of the above synchronization process, that is, the VCU, can be VCU1 or VCU2. If the execution subject is VCU1, the other VCU is VCU2. If the execution subject is VCU2, the other VCU is VCU1.
[0098] like Figure 3 shown.
[0099] 1. After the VCU1 and VCU2 systems are powered on, VCU1 and VCU2 complete hardware initialization and software initialization respectively.
[0100] 2. After successful initialization, the master-slave status determination stage is entered. In this stage, VCU1 and VCU2 send pre-upgrade master information frames to each other. VCU1 receives the pre-upgrade master information frame of the other party VCU2 and the ID of its own VCU board is smaller, and determines that VCU1 is the master; VCU2 receives the pre-upgrade master information frame of the other party VCU1 and the ID of its own VCU board is larger, and determines that VCU2 is the standby.
[0101] If only one VCU is powered on, such as only VCU1, VCU1 completes hardware initialization and software initialization, and enters the master-slave state determination stage. VCU1 will still send a pre-upgrade master information frame to VCU2. However, since VCU2 does not exist, VCU1 cannot receive the pre-upgrade master information sent by VCU2. After VCU1 waits for receiving VCU2's pre-upgrade master information for more than a preset period of time, it is considered that VCU2 has failed and VCU1 is upgraded to the master.
[0102] 3. The main VCU (such as VCU1) enters the cycle operation and sends a follow-up data information frame to the standby VCU (such as VCU2), including the cycle number, global variables and other information. After the standby VCU (such as VCU2) successfully follows the main VCU (such as VCU1), it also enters the cycle operation in the next cycle, completes the power-on synchronization, and the two VCUs control the TCMS application software to start executing from the same time.
[0103] According to the characteristics of the TCMS system, the content of the follow-up data information frame sent by the main VCU to the standby VCU is the global variable information and cumulative information generated by the main VCU, so as to avoid the calculation result being inconsistent with that of the main VCU when the standby VCU starts running from the initial value. The follow-up data that the main VCU should send to the standby VCU is determined by the TCMS application. Typical follow-up data include TCMS self-test results, driver's cab activation status, train static test results, train dynamic test results, train cumulative driving energy consumption information, train cumulative driving history information, etc.
[0104] During the above power-on synchronization process, if at least one of the two channels A / B can successfully send and receive pre-upgrade main information and follow-up information frames between the VCUs at both ends, the VCU hosts at both ends can determine the master-slave relationship. If both channels cannot send and receive pre-upgrade main information and follow-up information frames, the VCUs at both ends will become standby hosts.
[0105] After both VCUs enter cycle operation, cycle synchronization will be performed. Figure 1 ,
[0106] 101. After entering the cycle operation, every preset cycle, determine the micro cycle of the TCMS application.
[0107] The microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle.
[0108] In the application processing microcycle, if the VCU executing the method described in this embodiment is the master, external input data will be obtained, and application logic processing will be performed according to the obtained input data.
[0109] 102. Perform data synchronization with another VCU according to the microcycle.
[0110] 1. If the microcycle is an application processing microcycle, the execution process of step 102 is:
[0111] If the VCU executing the method described in this embodiment is the master, the external input data is sent to another VCU via ECN (Ethernet Consist Network).
[0112] If the VCU executing the method described in this embodiment is a standby VCU, external input data sent by another VCU is received through ECN.
[0113] 2. If the microcycle is an application output microcycle, the execution process of step 102 is:
[0114] If the VCU executing the method described in this embodiment is the master, the application logic processing result (the result is the result of application logic processing based on the acquired input data) is sent to another VCU through the ECN.
[0115] If the VCU executing the method described in this embodiment is a standby VCU, the application logic processing result sent by another VCU is received through the ECN.
[0116] 3. If the microcycle is an application input microcycle, the execution process of step 102 is:
[0117] If the VCU executing the method described in this embodiment is the master, external input data is sent to another VCU through ECN (the external input data here may be the same as or different from the external input data sent in the application processing microcycle, and this embodiment does not limit the relationship between the two).
[0118] If the VCU executing the method described in this embodiment is a backup, it receives external input data sent by another VCU through ECN (the external input data here may be the same as or different from the external input data sent in the application processing microcycle, and this embodiment does not limit the relationship between the two).
[0119] 4. If the microcycle is an application idle microcycle, the execution process of step 102 is a clock synchronization process:
[0120] If the VCU executing the method described in this embodiment is the master, after receiving the clock synchronization message sent by another VCU through the first channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the first channel. After receiving the clock synchronization message sent by another VCU through the second channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the second channel.
[0121] The first channel is one of the dual channels between the VCU and another VCU, and the second channel is the other of the dual channels between the VCU and another VCU.
[0122] If the VCU executing the method described in this embodiment is a standby, a clock synchronization message is sent to another VCU through the first channel, and the time when the clock synchronization message is received and the feedback sending time are received from the first channel by another VCU. A clock synchronization message is sent to another VCU through the second channel, and the time when the clock synchronization message is received and the feedback sending time are received from the second channel by another VCU.
[0123] 103. If the VCU is a standby, hot standby redundancy is performed according to the synchronized data.
[0124] 1. If the microcycle is an application processing microcycle, the execution process of step 103 is:
[0125] If the VCU executing the method described in this embodiment is a standby VCU, application logic processing is performed according to the external input data sent by another VCU.
[0126] 2. If the microcycle is an application output microcycle, the execution process of step 103 is:
[0127] If the VCU executing the method described in this embodiment is a standby, it determines whether the application logic processing result sent by another VCU is consistent with its own application logic processing result. If not, an alarm is issued.
[0128] 3. If the microcycle is an application input microcycle, the execution process of step 103 is:
[0129] If the VCU executing the method described in this embodiment is a standby VCU, the input of the application operation is determined according to the external input data sent by another VCU.
[0130] 4. If the microcycle is an application idle microcycle, the execution process of step 103 is:
[0131] If the VCU executing the method described in this embodiment is a standby, then
[0132] 1) From the synchronized data, obtain the time t at which the other VCU receives the clock synchronization message fed back through the first channel 12 and feedback sending time t 13 . Get the time t at which another VCU receives the clock synchronization message fed back through the second channel 22 and feedback sending time t 23 .
[0133] 2) Determine the time t at which a clock synchronization message is sent to another VCU via the first channel 11 , and the time t at which feedback from another VCU is received through the first channel 14 . Determine the time t to send a clock synchronization message to another VCU via the second channel 21, and the time t at which feedback from another VCU is received through the second channel 24 .
[0134] 3) Calculate the clock offset of the first channel Calculate the clock skew of the second channel
[0135] 4) If both offset1 and offset2 are valid and both offset1 and offset2 do not exceed the preset error, the average value of offset1 and offset2 is output.
[0136] 5) If only one of offset1 and offset2 is valid, the valid clock offset is output.
[0137] 6) If both offset1 and offset2 are invalid, hot standby redundancy switching is performed.
[0138] Below Figure 4 Taking the synchronization schematic diagram of the method for synchronously operating the active and standby vehicle control units shown in FIG. 1 as an example, the implementation process of the method for synchronously operating the active and standby vehicle control units is described again.
[0139] After both VCUs enter the cycle operation, the main VCU and the standby VCU exchange periodic synchronization frames through the redundant ECN network (it should be noted that the VCU that executes the method provided in this embodiment can be the main VCU or the standby VCU) to ensure that the TCMS application software in the main and standby VCUs are executed synchronously every cycle. In order to ensure the consistency of the output results of the main and standby VCUs, the TCMS application cycle is divided into four micro-cycles: application processing, application output, application input, and application idle, to achieve seamless hot standby redundant switching.
[0140] 1. In the application processing microcycle, the main and standby VCUs call exactly the same TCMS application software respectively. The main VCU completes the application logic processing according to the external input data it receives; the standby VCU completes the application logic processing according to the external input data synchronized from the main VCU in the input microcycle.
[0141] 2. In the application output microcycle, that is, after the application processing is completed, the main VCU sends output comparison data (that is, application operation results, including network interface data output by TCMS to the vehicle subsystem and DO data packets output by TCMS to RIOM) to the standby VCU. The standby VCU compares the output of its own application operation results with the main VCU application operation results. If the output data is inconsistent, an alarm is issued.
[0142] 3. In the application input microcycle, the main VCU packages the external input data (including network interface data such as traction and braking, and IO interface data) and sends it to the standby VCU. The standby VCU performs application processing based on the external input to ensure that the input used in the TCMS application calculations of the main and standby systems is completely consistent.
[0143] 4. In the application idle microcycle, clock synchronization is performed to fine-tune the deviation of the execution time of the primary and standby VCUs to ensure that the running time of the primary and standby VCUs in this cycle is consistent.
[0144] In addition, the clock can also be synchronized periodically. That is to say, clock synchronization can be performed in the application idle microcycle, and clock synchronization can also be performed during the entire operation of the VCU. Periodic clock synchronization can be performed in the application idle microcycle, and clock synchronization can also be performed during the entire operation of the VCU. This embodiment does not limit the number of executions and execution time of clock synchronization. This embodiment only takes the clock synchronization in the application idle microcycle as an example for explanation. In actual application, whenever clock synchronization is performed, the clock synchronization method in the application idle microcycle provided in this embodiment can be used to perform clock synchronization.
[0145] That is, the clock synchronization process is:
[0146] 1) If the VCU executing the method described in this embodiment is the master, after receiving the clock synchronization message sent by another VCU through the first channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the first channel. After receiving the clock synchronization message sent by another VCU through the second channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the second channel.
[0147] The first channel is one of the dual channels between the VCU and another VCU, and the second channel is the other of the dual channels between the VCU and another VCU.
[0148] If the VCU executing the method described in this embodiment is a standby, a clock synchronization message is sent to another VCU through the first channel, and the time when the clock synchronization message is received and the feedback sending time are received from the first channel by another VCU. A clock synchronization message is sent to another VCU through the second channel, and the time when the clock synchronization message is received and the feedback sending time are received from the second channel by another VCU.
[0149] 2) If the VCU executing the method described in this embodiment is a standby, then
[0150] (1) From the synchronized data, obtain the time t at which the other VCU receives the clock synchronization message fed back through the first channel12 and feedback sending time t 13 . Get the time t at which another VCU receives the clock synchronization message fed back through the second channel 22 and feedback sending time t 23 .
[0151] (2) Determine the time t at which a clock synchronization message is sent to another VCU via the first channel 11 , and the time t at which feedback from another VCU is received through the first channel 14 . Determine the time t to send a clock synchronization message to another VCU via the second channel 21 , and the time t at which feedback from another VCU is received through the second channel 24 .
[0152] (3) Calculate the clock offset of the first channel Calculate the clock skew of the second channel
[0153] (4) If both offset1 and offset2 are valid and neither offset1 nor offset2 exceeds the preset error, the average value of offset1 and offset2 is output.
[0154] (5) If only one of offset1 and offset2 is valid, the valid clock offset is output.
[0155] (6) If both offset1 and offset2 are invalid, hot standby redundancy switching is performed.
[0156] Below Figure 5 Taking the clock synchronization diagram shown in the figure as an example, the implementation process of clock synchronization is explained again:
[0157] During the clock synchronization process, a similar 1588 protocol is used between the main VCU and the backup VCU to achieve accurate clock synchronization.
[0158] A. When the VCU is in standby mode, it periodically sends clock synchronization messages and receives clock synchronization replies.
[0159] B. Calculate the timing deviation offset based on the clock synchronization measurement data of the send-reply message.
[0160] For example, use the following formula to calculate the clock offset between the standby VCU and the active VCU:
[0161] Among them, t1 is the time when the clock synchronization message is sent, and t4 is the time when the clock synchronization reply is received. These two values are obtained by the standby VCU obtaining the system clock.
[0162] is the time when the clock synchronization message is received, and t3 is the time when the clock synchronization reply is sent. These two values are obtained by the main VCU obtaining the system clock.
[0163] The clock synchronization between the active and standby VCUs uses dual-channel redundant communication. The above formula is used for the two redundant channels to calculate the offsets corresponding to the two channels.
[0164] C. After de-redundancy checking of the results of the redundant dual channels, the output is located at the offset.
[0165] When both channel results are valid, if the offset difference calculated by the two channels does not exceed the clock synchronization tolerance, the average value of the two offsets is output.
[0166] When only one of the two channels is valid, a unique offset is output.
[0167] When both channels are invalid, no offset is output and the system is switched (i.e., hot standby redundant switching).
[0168] D. The backup VCU uses its own operating system time + output offset as the new clock to control the periodic operation time to maintain strict synchronization with the main VCU timing.
[0169] When the VCU is the master, it only responds to the clock synchronization message of the standby VCU and uses its own operating system time to control the periodic operation time.
[0170] Based on the above synchronous control process, when the main-standby VCU switching occurs, the original output data can be guaranteed to be completely continuous, avoiding abnormal train impulses caused by data jumps.
[0171] The present embodiment provides a method for synchronous operation of a primary and standby vehicle control unit, which can be applied to the TCMS system or other high-safety-level vehicle control systems. Through power-on synchronization and periodic operation synchronization mechanisms, it can ensure that when the primary and standby systems are switched, the control instructions output to the external vehicle subsystems, especially the traction and braking system, are completed continuously, and the TCMS system is ensured not to cause command jumps due to the switching of the primary and standby VCUs, thereby causing the vehicle to feel impulsive or frustrated, affecting the comfort of the passengers.
[0172] In a method for synchronous operation of a primary and standby vehicle control unit provided in this embodiment, power-on synchronization of the primary and standby VCUs ensures that when the two VCUs are started simultaneously or non-simultaneously, the applications in the two VCUs can start running at the same reference point; periodic synchronization ensures that the TCMS application software in the primary and standby VCUs are executed synchronously every cycle and output the same results through periodic interaction of periodic synchronization frames, thereby ensuring completely seamless switching when the primary and standby VCUs are switched.
[0173] The method for synchronous operation of the main and standby vehicle control units provided in this embodiment has the following advantages:
[0174] (1) Based on the 1588 protocol, it supports millisecond-level master and standby VCU clock synchronization, which serves as the time benchmark for the synchronous operation of the master and standby VCUs;
[0175] (2) Ensure that both the primary and standby VCUs can start the next cycle at the same time and produce the same execution results in the same cycle;
[0176] (3) The smoothness of vehicle operation during the TCMS system's active-standby switching process is fully considered, which can bring a more comfortable travel experience to passengers.
[0177] The present embodiment provides a method for synchronous operation of a primary and standby vehicle control unit and a vehicle control unit, the method being executed by a vehicle control unit VCU, the method comprising: after entering cyclic operation, determining the microcycle in which the train control and monitoring system TCMS application is located at every preset cycle; the microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle; synchronizing data with another VCU according to the microcycle in which it is located; if the VCU is a standby, performing hot standby redundancy according to the synchronized data. The method provided in the present embodiment, after entering cyclic operation, performs data synchronization at every preset cycle, ensuring that the TCMS applications in the primary and standby VCUs are synchronously executed every cycle, outputting the same results, and ensuring that the primary and standby VCUs can switch completely seamlessly when switching.
[0178] Based on the same inventive concept of the method for synchronously operating the active and standby vehicle control units, this embodiment provides a vehicle control unit having a computer program stored thereon. The computer program is executed by a processor to implement the method for synchronously operating the active and standby vehicle control units.
[0179] Specifically,
[0180] After entering the cycle operation, the microcycle of the train control and monitoring system TCMS application is determined every preset cycle. The microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle.
[0181] Data is synchronized with another VCU according to the microcycle.
[0182] If the VCU is a backup, hot standby redundancy is performed based on the synchronized data.
[0183] Optionally, the VCU and the other VCU are located in different semi-mobile and semi-supported TMc vehicles with a cab.
[0184] The VCU and another VCU are connected to the TCMS backbone network through dual channels respectively.
[0185] The VCU communicates with another VCU via dual channels.
[0186] One of the VCU and the other VCU is a master, and the other is a backup.
[0187] Optionally, the microcycle is an application processing microcycle.
[0188] Data synchronization with another VCU is performed according to the microcycle, including:
[0189] If the VCU is the master, external input data is sent to another VCU via the Ethernet communication network ECN.
[0190] If the VCU is a backup VCU, it receives external input data sent by another VCU through ECN.
[0191] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0192] If the VCU is in standby mode, application logic processing is performed based on external input data sent by another VCU.
[0193] Optionally, before sending the external input data to another VCU through the ECN, the method further includes:
[0194] Obtain external input data and perform application logic processing based on the obtained input data.
[0195] Optionally, the microcycle is an application output microcycle.
[0196] Data synchronization with another VCU is performed according to the microcycle, including:
[0197] If the VCU is the master, the application logic processing results are sent to another VCU through ECN.
[0198] If the VCU is a backup VCU, it receives the application logic processing result sent by another VCU through ECN.
[0199] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0200] If the VCU is a standby VCU, it determines whether the application logic processing result sent by another VCU is consistent with its own application logic processing result.
[0201] If they are inconsistent, an alarm will be issued.
[0202] Optionally, the microcycle is an application input microcycle.
[0203] Data synchronization with another VCU is performed according to the microcycle, including:
[0204] If the VCU is the master, external input data is sent to another VCU via ECN.
[0205] If the VCU is a backup VCU, it receives external input data sent by another VCU through ECN.
[0206] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0207] If the VCU is in standby mode, the input of the application operation is determined based on the external input data sent by another VCU.
[0208] Optionally, the microcycle is an application idle microcycle.
[0209] Data synchronization with another VCU is performed according to the microcycle, including:
[0210] If the VCU is the master, after receiving the clock synchronization message sent by another VCU through the first channel, it determines the time when the clock synchronization message is received, and feeds back the time when the clock synchronization message is received and the time of sending the feedback to the other VCU through the first channel. After receiving the clock synchronization message sent by another VCU through the second channel, it determines the time when the clock synchronization message is received, and feeds back the time when the clock synchronization message is received and the time of sending the feedback to the other VCU through the second channel. Among them, the first channel is one of the dual channels between the VCU and another VCU, and the second channel is the other of the dual channels between the VCU and another VCU.
[0211] If the VCU is a standby VCU, a clock synchronization message is sent to another VCU through the first channel, and the time when the clock synchronization message is received and the feedback sending time are received from the first channel by another VCU. A clock synchronization message is sent to another VCU through the second channel, and the time when the clock synchronization message is received and the feedback sending time are received from the second channel by another VCU.
[0212] If the VCU is a standby, hot standby redundancy is performed based on the synchronized data, including:
[0213] If the VCU is in standby mode,
[0214] From the synchronized data, obtain the time t at which another VCU receives the clock synchronization message fed back through the first channel 12 and feedback sending time t 13 . Get the time t at which another VCU receives the clock synchronization message fed back through the second channel 22 and feedback sending time t 23 .
[0215] Determine the time t at which a clock synchronization message is sent to another VCU via the first channel 11, and the time t at which feedback from another VCU is received through the first channel 14 . Determine the time t to send a clock synchronization message to another VCU via the second channel 21 , and the time t at which feedback from another VCU is received through the second channel 24 .
[0216] Calculate the clock offset of the first channel Calculate the clock skew of the second channel
[0217] If both offset1 and offset2 are valid and neither offset1 nor offset2 exceeds the preset error, the average value of offset1 and offset2 is output.
[0218] If only one of offset1 and offset2 is valid, the valid clock offset is output.
[0219] If both offset1 and offset2 are invalid, hot standby redundancy switching is performed.
[0220] Optionally, after entering the cycle operation, before determining the microcycle in which the train control and monitoring system TCMS application is located at each preset cycle, the method further includes:
[0221] After power-on, hardware and software initialization is completed.
[0222] After successful initialization, receive the board ID of another VCU.
[0223] If the board ID of another VCU is not received within a preset time period, the VCU is determined to be a standby.
[0224] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is greater than its own board ID, the VCU is determined to be the master.
[0225] If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is smaller than its own board ID, the VCU is determined to be a backup.
[0226] If the VCU is the master, it sends a follow-up data information frame to another VCU after entering the cycle operation.
[0227] If the VCU is in standby mode, it will follow after receiving the follow-up data information frame, and enter the cycle operation after the follow-up is successful.
[0228] Optionally, after power-on and hardware and software initialization, the following steps are also included:
[0229] Send the board ID to another VCU.
[0230] The vehicle control unit provided in this embodiment has a computer program executed by a processor to perform data synchronization every preset cycle after entering the cycle operation, thereby ensuring that the TCMS applications in the primary and standby VCUs are executed synchronously every cycle and output the same results, thereby ensuring that the primary and standby VCUs can switch completely seamlessly.
[0231] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0232] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0233] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0234] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0235] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0236] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0237] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for synchronous operation of a main and standby vehicle control unit, characterized in that: The method is executed by a vehicle control unit VCU, and the method comprises: After entering the cycle operation, every preset cycle, determine the microcycle of the train control and monitoring system TCMS application; the microcycle is an application processing microcycle, or an application output microcycle, or an application input microcycle, or an application idle microcycle; Synchronize data with another VCU according to the microcycle; If the VCU is a backup, hot standby redundancy is performed based on the synchronized data; The VCU and another VCU are located in different semi-mobile and semi-supported TMC vehicles with a cab; The VCU and the other VCU are respectively connected to the TCMS backbone network through dual channels; The VCU and the other VCU communicate via a dual channel; One of the VCU and the other VCU is a main VCU, and the other is a backup VCU; The microcycle is an application idle microcycle; The step of performing data synchronization with another VCU according to the microcycle includes: If the VCU is the master, after receiving the clock synchronization message sent by another VCU through the first channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the first channel; after receiving the clock synchronization message sent by another VCU through the second channel, the time when the clock synchronization message is received is determined, and the time when the clock synchronization message is received and the feedback sending time are fed back to the other VCU through the second channel; wherein the first channel is one of the dual channels between the VCU and the other VCU, and the second channel is the other of the dual channels between the VCU and the other VCU; If the VCU is a standby VCU, a clock synchronization message is sent to another VCU through a first channel, and the time when the clock synchronization message is received and the feedback sending time are received from the first channel by the other VCU; a clock synchronization message is sent to another VCU through a second channel, and the time when the clock synchronization message is received and the feedback sending time are received from the second channel by the other VCU; If the VCU is a standby, hot standby redundancy is performed according to the synchronized data, including: If the VCU is a standby, then From the synchronized data, obtain the time t at which another VCU receives the clock synchronization message fed back through the first channel 12 and feedback sending time t 13 ; Get the time t at which another VCU receives the clock synchronization message through the second channel feedback 22 and feedback sending time t 23 ; Determine the time t at which a clock synchronization message is sent to another VCU via the first channel 11 , and the time t at which the feedback from the other VCU is received via the first channel 14 ; Determine the time t to send a clock synchronization message to another VCU through the second channel 21 , and the time t at which the feedback from the other VCU is received via the second channel 24 ; Calculate the clock offset of the first channel Calculate the clock skew of the second channel If both offset1 and offset2 are valid, and neither offset1 nor offset2 exceeds the preset error, the average value of offset1 and offset2 is output; If only one of offset1 and offset2 is valid, the valid clock offset is output; If both offset1 and offset2 are invalid, hot standby redundancy switching is performed.
2. The method according to claim 1, characterized in that The microcycle is an application processing microcycle; The step of performing data synchronization with another VCU according to the microcycle includes: If the VCU is the master, external input data is sent to another VCU via the Ethernet communication network ECN; If the VCU is a standby VCU, external input data sent by another VCU is received through ECN; If the VCU is a standby, hot standby redundancy is performed according to the synchronized data, including: If the VCU is a standby VCU, application logic processing is performed according to the external input data sent by another VCU.
3. The method according to claim 2, characterized in that Before sending the external input data to another VCU through the ECN, the method further includes: Obtain external input data and perform application logic processing based on the obtained input data.
4. The method according to claim 3, characterized in that: The microcycle is an application output microcycle; The step of performing data synchronization with another VCU according to the microcycle includes: If the VCU is the master, the application logic processing result is sent to another VCU via ECN; If the VCU is a standby VCU, the application logic processing result sent by another VCU is received through the ECN; If the VCU is a standby, hot standby redundancy is performed according to the synchronized data, including: If the VCU is a standby VCU, determining whether the application logic processing result sent by another VCU is consistent with the application logic processing result of the VCU itself; If they are inconsistent, an alarm will be issued.
5. The method according to claim 1, characterized in that The microcycle is an application input microcycle; The step of performing data synchronization with another VCU according to the microcycle includes: If the VCU is the master, external input data is sent to another VCU via ECN; If the VCU is a standby VCU, external input data sent by another VCU is received through ECN; If the VCU is a standby, hot standby redundancy is performed according to the synchronized data, including: If the VCU is a standby VCU, the input of the application operation is determined according to the external input data sent by another VCU.
6. The method according to claim 1, characterized in that After entering the cycle operation, before determining the microcycle of the train control and monitoring system TCMS application at every preset cycle, the method further includes: After power-on, complete hardware and software initialization; After successful initialization, receive the board ID of another VCU; If the board ID of another VCU is not received within a preset time period, the VCU is determined to be a standby; If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is greater than the board ID of the own VCU, the VCU is determined to be the master; If the board ID of another VCU is received within a preset time period, and the board ID of the other VCU is smaller than the board ID of the own VCU, the VCU is determined to be a standby; If the VCU is the master, after entering the cycle operation, it sends a follow-up data information frame to another VCU; If the VCU is a standby, it follows after receiving the follow-up data information frame, and enters a cycle operation after following successfully.
7. The method according to claim 6, characterized in that After power-on, after hardware and software initialization is completed, it also includes: Send the board ID to another VCU.
8. A vehicle control unit, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Dynamic redundancy backup method and system suitable for train control system platform
CN112477919A