An Optimization Method for TCMS and ATC Time Synchronization Control

By optimizing the time synchronization control logic of the TCMS system, and by comparing the heartbeat and cached variables of the ATC system with preset judgment conditions, the misjudgment problem of time synchronization between the TCMS system and the ATC system was solved, thus realizing the reliability and stability of the TCMS system clock, which is suitable for the rail transit industry.

CN115623028BActive Publication Date: 2026-01-30CRRC NANJING PUZHEN CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211099548.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-09
Publication Date
2026-01-30
Estimated Expiration
2042-09-09

AI Technical Summary

Technical Problem

The existing TCMS system and ATC time synchronization control method have bugs, which cause the TCMS system time parameters to be incorrect or chaotic, and are completely controlled by the vehicle ATC time, resulting in incorrect synchronization when the ATC time is abnormal.

Method used

The time synchronization control logic has been optimized. By comparing the ATC heartbeat with the cached variables in the TCMS system and combining preset judgment conditions to determine the validity of the ATC information and the difference between the TCMS system's internal clock and the ATC time, the synchronization between the TCMS system's internal clock and the ATC time is controlled, avoiding misjudgment and abnormal synchronization.

Benefits of technology

Without increasing costs or hardware, the reliability and stability of the TCMS system clock are improved, ensuring the consistency of time for all onboard subsystems, facilitating train control and troubleshooting, and making it suitable for the rail transit industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115623028B_ABST
    Figure CN115623028B_ABST
Patent Text Reader

Abstract

This invention discloses an optimized method for TCMS and ATC time synchronization control. When ATC communication is normal, the time parameter information sent by ATC is valid, the ATP bypass switch is not in the bypass position, the time difference between the TCMS internal clock and the standard time sent by the ATC during normal communication exceeds 2 seconds, and the ATC heartbeat read in the current cycle differs from the called ATC heartbeat cache variable, and the ATC heartbeat read in the previous cycle also differs from the called ATC heartbeat cache variable, the TCMS internal clock is synchronized with the ATC time when all the above conditions are met. This method solves the problem of TCMS misinterpreting a change in ATC heartbeat when the gateway device is powered on again while the ATC heartbeat is stopped, causing the TCMS time to synchronize with the ATC time at the moment before the gateway power failure. This method has strong versatility and improves the reliability and stability of TCMS system clock control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a TCMS and ATC time synchronization method, belonging to the field of rail transit train time synchronization control technology. Background Technology

[0002] According to relevant requirements of the urban rail transit industry, the time of the onboard TCMS (Train Control and Management System) system must be synchronized with the time of the ATS (Automatic Train Monitoring System, which belongs to ATC), and the clock of each onboard subsystem must be synchronized with the TCMS system. The control of clock synchronization with the onboard ATC (Automatic Train Control System) equipment is one of the important control functions of the onboard TCMS system.

[0003] Currently, the conventional control for time synchronization between the TCMS system and the vehicle-mounted ATC is to determine the communication status of the ATC host based on the heartbeat of the ATC host device (if the ATC heartbeat does not change for more than 2 seconds, it is determined that the ATC host communication is faulty; otherwise, the communication is normal). When the time from the ATC with normal communication differs from the internal clock of the TCMS system by more than 2 seconds, the internal clock of the TCMS system will synchronize with the time sent by the ATC.

[0004] The time control method has a bug. The TCMS time is completely controlled by the onboard ATC time. Once the ATC time is abnormal or unavailable, it will cause the TCMS system and ATC to be forcibly synchronized with the wrong time, resulting in incorrect or chaotic train time parameters. Summary of the Invention

[0005] The technical problem to be solved by this invention is to overcome the defects of the prior art and provide an optimized method for time synchronization control of TCMS and ATC. Based on the existing control signals of the on-board TCMS system, the control logic of time synchronization is optimized and upgraded, the availability of time synchronization is improved, the defects of the existing time synchronization are solved, and it has strong versatility. It is applicable to the control of time synchronization between TCMS system and ATC in the rail transit industry, and improves the reliability and stability of clock control of TCMS system.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0007] An optimization method for TCMS and ATC time synchronization control includes the following steps:

[0008] Step 1: Compare the ATC heartbeat read in this cycle with the ATC heartbeat cache variable. If the ATC heartbeat and the ATC heartbeat cache variable are different, continue to Step 2; if the ATC heartbeat and the ATC heartbeat cache variable are the same, jump to Step 4.

[0009] Step 2: When ATC communication is normal, determine the validity of the ATC information according to preset judgment conditions;

[0010] If any of the preset judgment conditions are not met, proceed to step four.

[0011] If all the preset judgment conditions are met, continue to step three;

[0012] The preset judgment conditions include the following three conditions:

[0013] Condition 1. Determine the validity of the time parameter information sent by a normally communicating ATC;

[0014] Condition 2. Determine the status of the ATC bypass switch;

[0015] Condition 3. Determine the time difference between the TCMS system's internal clock and the ATC time;

[0016] Step 3: When ATC communication is normal, and the time parameter information sent by ATC is valid, and the ATP bypass switch is not in the bypass position, and the time difference between the timing of the internal clock of the TCMS system and the standard time sent by the ATC with normal communication exceeds 2 seconds, and the heartbeat of ATC read in this cycle is different from the ATC heartbeat cache variable called, and the heartbeat of ATC read in the previous cycle is different from the ATC heartbeat cache variable called, if all the above conditions are met, control the internal clock of the TCMS system to synchronize with the ATC time;

[0017] Step 4: Compare the ATC heartbeat read in this cycle with the ATC heartbeat cache variable called, and use the comparison result as a judgment condition to be called in the next cycle to determine whether synchronization is possible;

[0018] Step 5: Assign the ATC heartbeat value read in this cycle to the ATC heartbeat cache variable to update the ATC heartbeat cache variable, which will be used to compare with the read ATC heartbeat in the next cycle.

[0019] Continue repeating steps one through five to enter the next cycle.

[0020] Furthermore, when judging the validity of the time parameter information sent by the ATC with normal communication, if all the time information sent by the ATC is within the valid range, then the time information sent by the ATC is determined to be valid and satisfies one of the synchronization conditions.

[0021] Otherwise, the time information sent by ATC is deemed invalid.

[0022] Furthermore, when judging the bypass switch status of ATC, if the bypass switch status of ATC diagnosed by TCMS is in the bypass position, it is determined that the on-board ATC device is abnormal and the time information sent by ATC is unreliable.

[0023] When the bypass switch of the ATC is not in the bypass position, one of the synchronization conditions is met.

[0024] Furthermore, when judging the time difference between the internal clock of the TCMS system and the ATC time, if the time difference between the timing of the internal clock of the TCMS system and the standard time sent by the ATC when communication is normal exceeds 2 seconds, then one of the synchronization conditions is met.

[0025] Otherwise, the TCMS system's internal clock is not allowed to synchronize with the ATC time.

[0026] Furthermore, the ATC's heartbeat is obtained from the information sent by the ATC via the data bus.

[0027] Furthermore, the bypass switch status of the ATC is obtained from a signal transmitted via hardwired communication within the vehicle.

[0028] Furthermore, in step one, when the ATC heartbeat is different from the ATC heartbeat cache variable, the first identifier xFlag1 is set to 0, and when they are the same, the first identifier xFlag1 is set to 1.

[0029] Furthermore, in step two, the validity of the time parameter information sent by the ATC with normal communication is judged. If all the time information sent by the ATC is within the valid range, the time information sent by the ATC is determined to be valid, and the valid bit xATCDateTimeValid = 1, which satisfies one of the conditions for the synchronization between the internal clock of the TCMS system and the ATC time.

[0030] The bypass switch status of the ATC is judged. When the bypass switch status of the ATC is not in the bypass position, the bypass switch status ATC_xATPFR = 0, which satisfies one of the conditions for the synchronization of the internal clock of the TCMS system with the ATC time.

[0031] The time difference between the internal clock of the TCMS system and the ATC time is judged. When the time difference between the timing of the internal clock of the TCMS system and the standard time sent by the ATC when communication is normal exceeds 2s, the time synchronization valid bit xATCChange = 1, which satisfies one of the synchronization conditions between the internal clock of the TCMS system and the ATC time.

[0032] Furthermore, in step four, when the ATC heartbeat and the ATC heartbeat cache variable are different, the second identifier xFlag2 is set to 1; when they are the same, the second identifier xFlag2 is set to 0.

[0033] Furthermore, in step three, when ATC communication is normal, the time information valid bit xATCDateTimeValid = 1, the bypass switch status ATC_xATPFR = 0, the time synchronization valid bit xATCChange = 1, the first identifier of this cycle xFlag1 = 0, and the second identifier of the previous cycle xFlag2 = 1, then the internal clock of the TCMS system is controlled to synchronize with the ATC time.

[0034] The beneficial effects achieved by this invention are as follows:

[0035] This invention discloses an optimized method for TCMS and ATC time synchronization control. It detects changes in the ATC heartbeat and compares them with the heartbeat of the previous cycle. By utilizing the execution order and the state of the ATC heartbeat in the current and previous cycles for logical processing, it controls the time synchronization between TCMS and ATC. This solves the problem of TCMS misinterpreting a change in the ATC heartbeat when the gateway device is powered on again after the ATC heartbeat has stopped, causing TCMS time synchronization to the ATC time just before the gateway power failure (time information during the ATC heartbeat stop phase is unusable). This method achieves time synchronization control between the onboard TCMS system and the onboard ATC device without increasing costs or adding other hardware, utilizing existing equipment, communication interfaces, and data of the onboard TCMS system. It overcomes the shortcomings of existing time synchronization methods, has strong versatility, and ensures the reliability and stability of the TCMS system clock. It is particularly suitable for time synchronization control between the TCMS system and ATC in the rail transit industry. Attached Figure Description

[0036] Figure 1 This is a communication architecture diagram between the TCMS system and the ATC system;

[0037] Figure 2 This is a flowchart of the time synchronization control method of the present invention. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0039] In numerous rail transit projects, the TCMS system and ATC communication architecture are as follows: Figure 1 As shown, in actual project applications, it was found that communication abnormalities of the gateway device can directly lead to abnormal time synchronization control between the TCMS system and the ATC system, resulting in incorrect time information in the TCMS system.

[0040] Furthermore, this fault can be reproduced: First, disconnect the power to the gateway device. At this time, the gateway device experiences a communication failure, and the TCMS system retains the ATC-related data forwarded by the gateway device before the power outage (including: ATC system heartbeat, ATC standard time, vehicle control commands, etc.). Then, disconnect the power to the ATC device again, and then restore power to the gateway device. The new data sent by the gateway device at this time will clear all the ATC-related data forwarded by the gateway device before the power outage retained by the TCMS system. This results in a fluctuating ATC heartbeat over a program cycle, causing the TCMS to mistakenly determine that ATC communication has been restored. This leads to incorrect time synchronization between the TCMS and the ATC time data forwarded by the gateway device before the power outage, resulting in a time error in the TCMS system.

[0041] The optimization method for TCMS and ATC time synchronization control of the present invention will be described in detail below with specific embodiments.

[0042] Example 1

[0043] Combination Figure 2 As shown, the optimization method for TCMS and ATC time synchronization control in this embodiment has the following specific implementation steps:

[0044] Step 1: Compare the ATC heartbeat read in this cycle with the ATC heartbeat cache variable. If the ATC heartbeat and the ATC heartbeat cache variable are different, continue to Step 2; if the ATC heartbeat and the ATC heartbeat cache variable are the same, jump to Step 4.

[0045] Step 2: When ATC communication is normal, determine the validity of the ATC information according to preset judgment conditions;

[0046] If any preset judgment condition is not met, the TCMS system internal clock is not allowed to synchronize with the ATC time, and the process jumps to step four.

[0047] If all preset judgment conditions are met, proceed to step three to synchronize the internal clock of the TCMS system with the ATC time.

[0048] The preset judgment conditions include the following three conditions:

[0049] Condition 1. Determine the validity of the time parameter information sent by ATC;

[0050] Condition 2. Determine the status of the ATC bypass switch;

[0051] Condition 3. Determine the time difference between the TCMS system's internal clock and the ATC time;

[0052] The validity (authenticity and availability) of ATC time is identified by comprehensively judging three preset judgment conditions, thereby ensuring the reliability and stability of the internal clock of the TCMS system, further controlling the consistency of time of various on-board subsystems, and facilitating train control and fault diagnosis.

[0053] The specific judgment process for each condition in the preset judgment conditions is as follows:

[0054] Condition 1. The validity of the time parameter information sent by the ATC with normal communication is judged. If all the time information sent by the ATC is within the valid range, then the time information sent by the ATC is determined to be valid and meets Condition 1, that is, it meets one of the conditions that allows the internal clock of the TCMS system to synchronize with the ATC time; otherwise, the time information sent by the ATC is determined to be invalid and does not meet Condition 1.

[0055] Condition 2. Determine the status of the ATC bypass switch;

[0056] When the bypass switch status of the ATC diagnosed by TCMS is in the bypass position, it is determined that the on-board ATC equipment is abnormal and the time information sent by the ATC is unreliable. Even if the data sent by the ATC with normal communication is valid, it cannot be synchronized with the time sent by the ATC. That is, the internal clock of the TCMS system is not allowed to synchronize with the ATC time to avoid the impact on the train clock in the case of ATC abnormality.

[0057] When the bypass switch of the ATC is not in the bypass position, condition 2 is satisfied, which is one of the conditions that allows the internal clock of the TCMS system to be synchronized with the ATC time.

[0058] Condition 3. Determine the time difference between the TCMS system's internal clock and the ATC time;

[0059] When the time difference between the internal clock of the TCMS system and the standard time sent by the ATC during normal communication exceeds 2 seconds, condition 3 is met, which is one of the conditions that allows the internal clock of the TCMS system to synchronize with the ATC time. Otherwise, the internal clock of the TCMS system is not allowed to synchronize with the ATC time.

[0060] Step 3: When ATC communication is normal, the time parameter information sent by ATC is valid, the ATP bypass switch is not in the bypass position, the time difference between the TCMS system's internal clock and the standard time sent by the ATC during normal communication exceeds 2 seconds, and the ATC heartbeat read in this cycle is different from the called ATC heartbeat cache variable, and the ATC heartbeat read in the previous cycle is also different from the called ATC heartbeat cache variable, the TCMS system's internal clock is synchronized with the ATC time. If any condition is not met, the TCMS system's internal clock and ATC time are not synchronized, and Step 4 is executed directly.

[0061] Step 4: Compare the ATC heartbeat read in this cycle with the ATC heartbeat cache variable called, and use the comparison result as a judgment condition to be called in the next cycle to determine whether synchronization is possible.

[0062] Step 5: Assign the ATC heartbeat value read in this cycle to the ATC heartbeat cache variable to update the ATC heartbeat cache variable, which will be used to compare with the read ATC heartbeat in the next cycle.

[0063] Continue repeating steps one through five to enter the next cycle.

[0064] By performing logical judgments and processing at each step, and combining the changes in the ATC heartbeat status between the two cycles, the system diagnoses whether the ATC communication status has truly recovered. This prevents abnormal changes in the ATC heartbeat data forwarded by the gateway from causing misjudgments of the ATC communication status by the TCMS. It enables the TCMS system to determine the validity and availability of ATC time information, ensuring the reliability and stability of the TCMS system's timekeeping.

[0065] In this embodiment, the ATC's heartbeat is obtained from the information sent by the ATC through the data bus.

[0066] The status of the ATC bypass switch is obtained from the signal transmitted by the vehicle's hardwire.

[0067] The system detects changes in the ATC heartbeat and compares them with the ATC heartbeat of the previous cycle. It uses the execution order and the state of the ATC heartbeat in the current and previous cycles to perform logical processing and control the time synchronization between TCMS and ATC. This solves the problem that when the gateway device is powered on again while the ATC heartbeat is stopped, TCMS misjudges that the ATC heartbeat has changed, causing TCMS time to synchronize with the ATC time just before the gateway was powered off (the time information during the ATC heartbeat stop phase is not available).

[0068] Example 2

[0069] Combination Figure 2As shown, the optimization method for TCMS and ATC time synchronization control in this embodiment will be described in detail.

[0070] To clearly explain the variables involved in the following logical processing steps, the parameters involved in this method are explained as follows:

[0071] ATC communication status: gATCF_t.VxATCComFlt, when communication is normal, gATCF_t.VxATCComFlt = 0, when communication fails, gATCF_t.VxATCComFlt = 1;

[0072] The valid bit for the time information sent by ATC is xATCDateTimeValid. If valid, xATCDateTimeValid = 1; otherwise, xATCDateTimeValid = 0.

[0073] This period's ATC heartbeat read: gII_ATC_t.usDevIsAlive (directly obtains the heartbeat sent by ATC);

[0074] ATC heartbeat cache variable: usATCDevIsAliveOld, initial value is 0;

[0075] The first identifier, xFlag1, is initially 0. It represents the relationship between the ATC heartbeat gII_ATC_t.usDevIsAlive read in this cycle and the ATC heartbeat cache variable usATCDevIsAliveOld. When the two are the same, xFlag1 = 1; when they are different, xFlag1 = 0.

[0076] The second identifier, xFlag2, is initially set to 0. It represents the relationship between the ATC heartbeat gII_ATC_t.usDevIsAlive read in this cycle and the ATC heartbeat cache variable usATCDevIsAliveOld. When the two are the same, xFlag2 = 0; when they are different, xFlag2 = 1.

[0077] The optimization method for TCMS and ATC time synchronization control, and the specific implementation steps are as follows:

[0078] Step 1: Compare the ATC heartbeat gII_ATC_t.usDevIsAlive read in this cycle with the ATC heartbeat cache variable usATCDevIsAliveOld (the initial value of the ATC heartbeat cache variable usATCDevIsAliveOld is 0). If the ATC heartbeat gII_ATC_t.usDevIsAlive and the ATC heartbeat cache variable usATCDevIsAliveOld are the same, set the first identifier xFlag1 = 1; otherwise, set the first identifier xFlag1 = 0.

[0079] Step 2: When ATC communication is normal (gATCF_t.VxATCComFlt=0), determine the validity of the ATC information according to the preset judgment conditions;

[0080] If any preset judgment condition is not met, the TCMS system internal clock is not allowed to synchronize with the ATC time, and step four is executed directly.

[0081] If all preset judgment conditions are met, proceed to step three to synchronize the internal clock of the TCMS system with the ATC time.

[0082] The specific judgment process for each condition in the preset judgment conditions is as follows:

[0083] Condition 1. Determine the validity of the time parameter information sent by a normally communicating ATC, and reset the valid bit xATCDateTimeValid based on the determination result;

[0084] If all the time information sent by the ATC is within the valid range, then the time information sent by the ATC is determined to be valid, and the valid bit xATCDateTimeValid = 1, which satisfies one of the conditions for the synchronization between the internal clock of the TCMS system and the ATC time; otherwise, the time information sent by the ATC is determined to be invalid, and the valid bit xATCDateTimeValid = 0.

[0085] For example, whether the year is within the valid range, whether the month is within 1-12, whether the day is within 1-31, and whether the hour, minute, and second information are valid, all must be within the valid range for the ATC time to be considered valid; otherwise, the ATC time is considered invalid.

[0086] Condition 2. Determine the bypass switch status of the ATC and reset the bypass switch status ATC_xATPFR based on the determination result;

[0087] When the bypass switch status of the ATC diagnosed by TCMS is in the bypass position, the bypass switch status ATC_xATPFR = 1, which indicates that the on-board ATC equipment is abnormal and the time information sent by the ATC is unreliable (xATCDateTimeNOK = 1). Even if the data sent by the ATC with normal communication is valid (xATCDateTimeValid = 1), it cannot be synchronized with the time sent by the ATC. That is, the internal clock of the TCMS system is not allowed to synchronize with the ATC time to avoid the impact on the train clock in the case of ATC abnormality.

[0088] When the bypass switch of the ATC is not in the bypass position, the bypass switch state ATC_xATPFR = 0, which satisfies one of the conditions for the internal clock of the TCMS system to synchronize with the ATC time.

[0089] Condition 3. Determine the time difference between the TCMS system's internal clock and the ATC time, and reset the time synchronization valid bit xATCChange based on the determination result;

[0090] When the time difference between the TCMS system's internal clock and the standard time sent by the ATC during normal communication exceeds 2 seconds, the time synchronization valid bit xATCChange = 1 is activated, satisfying one of the conditions for TCMS system's internal clock to synchronize with ATC time; otherwise, xATCChange = 0, and TCMS system's internal clock is not allowed to synchronize with ATC time.

[0091] Step 3: When ATC communication is normal (gATCF_t.VxATCComFlt=0), the time information sent by ATC is valid (xATCDateTimeValid=1), the ATP bypass switch state (ATC_xATPFR=0) is not in the bypass position, the time synchronization valid bit (xATCChange=1) is activated, and the first identifier xFlag1=0 and the second identifier xFlag2=1, then TCMS determines that the time from ATC is reliable and usable, and controls the internal clock of the TCMS system to synchronize with the ATC time.

[0092] Step 4: Compare the ATC heartbeat gII_ATC_t.usDevIsAlive read in this cycle with the ATC heartbeat cache variable usATCDevIsAliveOld. If the ATC heartbeat gII_ATC_t.usDevIsAlive read in this cycle is different from the ATC heartbeat cache variable usATCDevIsAliveOld, set the second identifier xFlag2 = 1; otherwise, set the second identifier xFlag2 = 0.

[0093] When the second identifier xFlag2 = 1, it will be effective when the synchronization call is judged in the next cycle, thus avoiding the impact of the change of ATC heartbeat in one cycle on TCMS time synchronization.

[0094] Step 5: Assign the ATC heartbeat value gII_ATC_t.usDevIsAlive read in this cycle to the ATC heartbeat cache variable, which will be used to compare with the new ATC heartbeat read in the next cycle.

[0095] Continue repeating steps one through five to enter the next cycle.

[0096] This method achieves time synchronization control between the onboard TCMS system and the onboard ATC device without increasing costs or adding other hardware, utilizing existing equipment, communication interfaces, and data within the onboard TCMS system. This method solves the problem of TCMS misinterpreting a change in the ATC heartbeat when the gateway device is powered on again after the ATC heartbeat has stopped, causing TCMS time to synchronize with the ATC time just before the gateway power failure. This method has strong versatility, improves the reliability and stability of TCMS system clock control, and is particularly suitable for time synchronization control between the TCMS system and ATC in the rail transit industry.

[0097] Example 3

[0098] Based on Example 2, in this example, the specific judgment logic for determining the validity of the time parameter information sent by the ATC is as follows:

[0099] Parameter: Year, gII_ATC_t.IusDateYear≥2000; Determine if the year gII_ATC_t.IusDateYear is within the valid range; In this embodiment, based on the actual application of the project, values ​​below 2000 are considered invalid.

[0100] Parameter: Month, where 12 ≥ gII_ATC_t.IusDateMonth ≥ 1; Determine if the month gII_ATC_t.IusDateMonth is between 1 and 12;

[0101] Parameter: Day, where 31 ≥ gII_ATC_t.IusDateDay ≥ 1; Determine if day gII_ATC_t.IusDateDay is between 1 and 31;

[0102] Parameter: When 23≥gII_ATC_t.IusDateHour≥0; Determine whether gII_ATC_t.IusDateHour is between 0 and 23;

[0103] Parameter: Minutes, where 59 ≥ gII_ATC_t.IusDateMinute ≥ 0; Determine if the minute gII_ATC_t.IusDateMinute is between 0 and 59;

[0104] Parameter: seconds, 59 ≥ gII_ATC_t.IusDateSecond ≥ 0; Determine if seconds gII_ATC_t.IusDateSecond are between 0 and 59;

[0105] When all the above time parameters are within the valid range, the time information sent by ATC is determined to be valid, and the time information validity bit xATCDateTimeValid is set to 1.

[0106] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An optimization method for TCMS and ATC time synchronization control, characterized in that, The method comprises the following steps: Step 1: compare the ATC heartbeat read in the current cycle with the ATC heartbeat cache variable, when the ATC heartbeat is different from the ATC heartbeat cache variable, continue to execute step 2; when the ATC heartbeat is the same as the ATC heartbeat cache variable, jump to execute step 4; Step 2: when the ATC communication is normal, judge the validity of the ATC information according to the preset judgment condition; If any of the preset judgment conditions is not met, jump to execute step 4; If all the preset judgment conditions are met, continue to execute step 3; The preset judgment condition comprises the following three conditions: Condition 1: judge the validity of the time parameter information sent by the normal communication ATC; Condition 2: judge the bypass switch state of the ATC; Condition 3: judge the time difference between the TCMS system internal clock and the ATC time; Step 3: when the ATC communication is normal, the time parameter information sent by the ATC is valid, the ATP bypass switch state is not in the bypass position, the time difference between the timing of the TCMS system internal clock and the standard time sent by the normal communication ATC is more than 2s, the ATC heartbeat read in the current cycle is different from the called ATC heartbeat cache variable, and the ATC heartbeat read in the last cycle is also different from the called ATC heartbeat cache variable, all the above conditions are met, control the TCMS system internal clock and the ATC time to be synchronized; Step 4: compare the ATC heartbeat read in the current cycle with the called ATC heartbeat cache variable, and take the comparison result as a judgment condition for calling in the next cycle when judging whether to synchronize; Step 5: assign the ATC heartbeat value read in the current cycle to the ATC heartbeat cache variable, so as to update the ATC heartbeat cache variable and call it when comparing with the read ATC heartbeat in the next cycle; Continue to repeat steps 1 to 5 to enter the next cycle; In step 1, when the ATC heartbeat is different from the ATC heartbeat cache variable, set the first identifier xFlag1=0, and when they are the same, set the first identifier xFlag1=1; In step 2, judge the validity of the time parameter information sent by the normal communication ATC, when all the time information sent by the ATC is in the valid range, it is determined that the time information sent by the ATC is valid, the time information valid bit xATCDateTimeValid=1, and one of the TCMS system internal clock and ATC time synchronization conditions is met; Judge the bypass switch state of the ATC, when the bypass switch state of the ATC is not in the bypass position, the bypass switch state ATC_xATPFR=0, and one of the TCMS system internal clock and ATC time synchronization conditions is met; Judge the time difference between the TCMS system internal clock and the ATC time, when the time difference between the timing of the TCMS system internal clock and the standard time sent by the normal communication ATC is more than 2s, the time change valid bit xATCChange=1, and one of the TCMS system internal clock and ATC time synchronization conditions is met.

2. The method of claim 1, wherein the method further comprises: When judging the validity of the time parameter information sent by the ATC in normal communication, if all the time information sent by the ATC is within the valid range, it is determined that the time information sent by the ATC is valid, and one of the synchronization conditions is met; Otherwise, it is determined that the time information sent by the ATC is not valid.

3. The method of claim 1, wherein the method further comprises: determining a time synchronization between the TCMS and the ATC; and determining a time synchronization between the TCMS and the ATC. When judging the bypass switch state of the ATC, if the bypass switch state of the ATC diagnosed by the TCMS is in the bypass position, it is determined that the on-board ATC device is abnormal, and the time information sent by the ATC is not reliable; If the bypass switch state of the ATC is not in the bypass position, one of the synchronization conditions is met.

4. The method of claim 1, wherein the method further comprises: When judging the time difference between the internal clock of the TCMS system and the ATC time, if the time difference between the timing of the internal clock of the TCMS system and the standard time sent by the ATC in normal communication exceeds 2s, one of the synchronization conditions is met; Otherwise, the internal clock of the TCMS system is not allowed to be synchronized with the ATC time.

5. The method of claim 1, wherein the method further comprises: The heartbeat of the ATC is obtained from the information sent by the ATC through the data bus.

6. The method of claim 1, wherein the method further comprises: The bypass switch state of the ATC is obtained from the signal transmitted by the vehicle hard line.

7. The method of claim 1, wherein the method further comprises: In step four, when the ATC heartbeat is different from the ATC heartbeat cache variable, set the second identifier xFlag2=1, and when they are the same, set the second identifier xFlag2=0.

8. The method of claim 7, wherein the method further comprises: In step three, when the ATC is in normal communication, the time information is valid xATCDateTimeValid=1, the bypass switch state ATC_xATPFR=0, the time change is valid xATCChange=1, the first identifier of the current period xFlag1=0, and the second identifier of the last period xFlag2=1, synchronize the internal clock of the TCMS system with the ATC time.

Citation Information

Patent Citations

  • TCMS-based unified time service method, device and system

    CN109677467A