An intelligent terminal system and precise timing method based on 5G precise timing
Through the 5G precise timing intelligent terminal system, the 5G communication module and CPU multi-architecture processor directly output high-precision time, solving the problems of large repeatability of B code analysis and low time accuracy in the existing technology, achieving fast and low-cost time synchronization, supporting multi-device connections, and promoting the application of 5G in the industrial field.
Patent Information
- Application Number
- CN202211540227.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-12-02
AI Technical Summary
The existing 5G communication modules have high repetition and low time accuracy in analyzing B-code pulse code streams in industrial sites, which increases the hardware and software challenges of downstream equipment and requires additional R&D costs for accurate timing analysis.
Using an intelligent terminal system based on 5G precise timing, accurate clock information is obtained through the 5G communication module, and B code is driven and parsed by CPU multi-architecture processors to directly output high-precision time information. Downstream devices communicate with the system through interactive peripheral interfaces to obtain accurate time.
It can quickly connect to the 5G network without investing downstream equipment in R&D costs, obtain high-precision time, reduce technical thresholds and costs, and is conducive to the promotion of 5G networks in traditional industrial fields.
Smart Images

Figure CN116318499B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system communication technology, and in particular to an intelligent terminal system and a precise timing method based on 5G precise timing. Background Art
[0002] With the widespread adoption of 5G network technology, 5G application scenarios are becoming larger and more complex, placing increasing demands on time synchronization and accuracy. Timing is expanding into telecommunications, power generation, computer systems, finance, national defense, e-government, smart factories, and other fields. 5G smart terminals are the hubs connecting these applications to the 5G network. The importance of their precise timing capabilities is becoming increasingly prominent, providing crucial support for diverse scenarios, including differential protection for power distribution networks, collaborative operation of multiple automated guided vehicles (AGVs), aerospace, multi-robot systems, and data collection.
[0003] Existing 5G communication modules use PRUs to generate B-code pulse streams. Subsequent slave devices must parse the B-code pulse stream again to obtain accurate time information. In industrial settings, varying processing capabilities of devices increase the repeatability of parsing the B-code pulse stream, which also impacts time accuracy. This poses significant challenges to the hardware and software of downstream devices. Summary of the Invention
[0004] The purpose of the present invention is to overcome the problems in the prior art of directly using slave devices to parse B codes, which result in high repeatability of the B code pulse stream and low time accuracy. An intelligent terminal system and a precise timing method based on 5G precise timing are provided. By using the 5G precise timing intelligent terminal system, downstream devices can quickly connect to the 5G network without investing R&D costs in precise timing analysis. Industrial equipment can directly communicate with the 5G precise timing intelligent terminal system to obtain precise time for business operations.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] An intelligent terminal system based on 5G precise timing, comprising:
[0007] 5G communication module: Obtains precise clock information from the 5G base station through the air interface SIB9, compensates for the transmission delay between the terminal and the base station, converts the precise clock into B code, and sends the generated B code to the CPU multi-architecture processor;
[0008] CPU multi-architecture processor: drives the 5G module to generate B code and parses the generated B code to obtain time information;
[0009] Interactive peripheral interface: Sends the time information parsed by the CPU multi-architecture processor to downstream industrial processing equipment.
[0010] By directly outputting a B-code pulse stream using the 5G communication module and leveraging the multi-architecture features of the CPU, the B-code waveform is analyzed to obtain high-precision time. Industrial equipment only needs to communicate with the 5G Precision Timing Intelligent Terminal System via an interactive peripheral interface. This system allows downstream equipment to quickly connect to the 5G network without the R&D costs of precise timing analysis. Industrial equipment can directly communicate with the 5G Precision Timing Intelligent Terminal System to obtain accurate time for business operations. The system can also connect to multiple devices. This lowers the technical barriers and costs for 5G network use cases, facilitating the rapid adoption of 5G networks in traditional industrial sectors.
[0011] Preferably, the CPU multi-architecture processor includes:
[0012] Driver processor: runs the Linux system, drives the 5G communication module to connect to the network and output B-code waveforms, and supports various protocols and functions including routing gateways to achieve data processing and data transmission;
[0013] B-code parsing processor: runs the FreeRTOS real-time operating system, parses the B-code waveform and converts it into time information.
[0014] Leveraging the multi-architecture nature of the CPU, the driver processor runs the Linux system, leveraging the processor's high-performance data processing and computing capabilities to handle data processing and data transmission. The B-code parsing processor runs the FreeRTOS real-time operating system, leveraging its real-time nature to parse the B-code waveform and derive high-precision time. The driver processor and the B-code parsing processor can directly communicate between cores, sharing high-precision time with greater efficiency. Time information can be directly transmitted to downstream devices via the driver processor's system time or UART, SPI, or the B-code parsing processor itself can directly use the parsed time information for industrial field processing.
[0015] Preferably, the driving processor is a Cortex-A series processor; and the B code parsing processor is a Cortex-M series processor.
[0016] The Cortex-A series processors drive the 5G communication module and support various protocols and functions, including routing gateways. The 5G communication module directly outputs a B-code pulse stream. The B-code waveform output I / O is directly connected to the GPIOs of the Cortex-M series processors. The Cortex-M series processors parse the B-code waveform and convert it into time information. The Cortex-M series processors then transmit the resulting precise time information to downstream industrial processing equipment via UART, SPI, or the A53 gateway system.
[0017] A precise timing method based on 5G precise timing, comprising the following steps:
[0018] S1: Generate B-code waveform using 5G communication module;
[0019] S2: Analyze the generated B-code waveform and obtain the B-code symbol by using interruption;
[0020] S3: Parse B code symbols into time;
[0021] S4: Calculate the precise time and send it to downstream devices for use.
[0022] The 5G communication module generates a B-code waveform, which is then parsed to obtain precise time. This time is then sent to downstream devices for use, ensuring their time synchronization. Without the need for R&D costs to analyze precise timing, industrial equipment can directly communicate with the 5G precise timing intelligent terminal system to obtain accurate time for business operations.
[0023] Preferably, the B code symbols generated in step S1 are 100pps DC codes, and the B code symbols include 0 symbol, 1 symbol and P symbol; an interrupt mode is set during parsing, and the interrupt is used to parse the B code waveform to obtain the three symbol 0, 1 and P.
[0024] The B code output waveform is a square wave. Depending on the timing of the high and low voltages, it is possible to obtain B code elements after parsing. However, only when two pp appear during parsing can the parsed data correctly start a B code frame. Interrupting parsing interrupts the process of obtaining B code elements from the B code waveform.
[0025] Preferably, the step S2 further comprises:
[0026] S2.1: Interrupt the code element parsing and determine whether the obtained code element is P. If not, continue to interrupt until the first P code element is found.
[0027] S2.2: Continue interrupting the code element and determine whether the code element after the first P code element is P. If not, return to step S2.1 and find the first P code element again until two consecutive P code elements are found to obtain the B code start node;
[0028] S2.3: Interrupt the codeword parsing and determine whether it is the 100th B codeword. If it is the 100th B codeword, the parsing is completed. If not, continue to interrupt the codeword parsing until the 100th B codeword is parsed, and the B code parsing is completed.
[0029] A B code frame begins with two consecutive Ps, with the first flag being P0 and the second being Pr. The rising edge of Pr marks the quasi-second of the second, and Pr is the zeroth code element. Therefore, after parsing the P code element, the code continues parsing until two consecutive P code elements are parsed, marking the beginning of a B code frame. After parsing 100 code elements, a B code frame is completely parsed.
[0030] Preferably, in step S2, parsing the generated B-code waveform is parsing the B-code waveform into B-code symbols:
[0031] Initialize the timer, obtain the current IO voltage, and wait for the interrupt to trigger;
[0032] Get interrupt trigger, timer timing, read IO level status V0, and wait for the next interrupt;
[0033] Get the second interrupt, restart the timer, get the time T0, read the IO level status V1, and wait for the next interrupt;
[0034] Get the third interrupt, the timer restarts, and gets the time T1;
[0035] Obtain parsed codewords based on V0, V1, T0, and T1.
[0036] Parsing the B-code waveform means judging whether the waveform is a 0 code element, a 1 code element or a p code element based on the interrupt. When the parsing is completed, the 100 code elements are a combination of 0, 1 and p. The time information is obtained according to the definition table.
[0037] Preferably, in step S3: the time information of the B code is parsed using the B code symbol definition table; in step S4, the precise time is the sum of the parsed B code time information and the parsed B code usage time. The parsed B code usage time is based on the +Nth code symbol 0 received after the code symbol is parsed, and the precise time is sent out at the full second of the code symbol.
[0038] After the B code is parsed, the B code Pr accurate second time feature is used. When the nth Pr code element is parsed again, the parsed B code information time is added to the parsing time n seconds. This time is the precise time and is sent to the peripheral or other equipment.
[0039] Therefore, the present invention has the following beneficial effects: 1. By utilizing the 5G precise timing intelligent terminal system, downstream equipment can quickly connect to the 5G network without investing R&D costs in precise timing analysis. Industrial equipment can directly communicate with the 5G precise timing intelligent terminal system to obtain precise time for business operations; 2. The 5G precise timing intelligent terminal system can connect to multiple devices, reducing the technical threshold and cost of 5G network usage scenarios, which is conducive to the rapid promotion of 5G networks in traditional industrial fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a system architecture diagram of the intelligent terminal system in the present invention.
[0041] Figure 2 It is a system architecture diagram of the CPU multi-architecture processor in the present invention.
[0042] Figure 3 2 is a schematic diagram of the B code symbol waveform in the embodiment.
[0043] Figure 4 Schematic diagram of B code elements in the embodiment.
[0044] Figure 5 It is a flowchart of the steps of the precise timing method in the present invention.
[0045] Figure 6 It is a flow chart of the steps of B code parsing in the present invention.
[0046] Figure 7 It is a flow chart of the steps of B code symbol analysis in the present invention.
[0047] In the figure: 1. 5G communication module; 2. CPU multi-architecture processor; 3. Interactive peripheral interface; 4. Smart terminal system; 5. 5G network; 6. Industrial equipment; 7. M7 processor; 8. A53 processor. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0049] Example 1:
[0050] This embodiment is a smart terminal system based on 5G precise timing. Figure 1 As shown, it includes: obtaining precise clock information from the 5G base station through the air interface SIB9, converting the precise clock into B code after compensating for the transmission delay between the terminal and the base station inside the 5G module, and sending the generated B code to the 5G communication module 1 of the CPU multi-architecture processor; driving the 5G communication module to generate B code, and parsing the generated B code to obtain time information from the CPU multi-architecture processor 2; sending the time information parsed by the CPU multi-architecture processor to the interactive peripheral interface 3 of the downstream industrial equipment.
[0051] Among them, the intelligent terminal system 4 is connected to the 5G network 5, the 5G communication module and the interactive interface are both connected to the CPU multi-architecture processor, and the interactive peripheral interface is connected to the industrial equipment 6, which can connect to multiple industrial equipment.
[0052] The present invention utilizes the 5G communication module to directly output the B-code pulse stream, and utilizes the multi-architecture characteristics of the CPU to analyze the B-code waveform and obtain high-precision time. Industrial equipment only needs to use the interactive peripheral interface to communicate with the 5G precise timing intelligent terminal system. Utilizing the 5G precise timing intelligent terminal system, downstream equipment can quickly connect to the 5G network without investing R&D costs in analyzing precise timing. Industrial equipment can directly communicate with the 5G precise timing intelligent terminal system to obtain precise time for business operations. At the same time, the system can also connect to multiple devices. This reduces the technical threshold and cost of 5G network usage scenarios, which is conducive to the rapid promotion of 5G networks in traditional industrial fields.
[0053] Specifically, such as Figure 2 As shown, in this embodiment, the multi-architecture CPU processor includes an M7 processor 7 and an A53 processor 8. Leveraging the multi-architecture nature of the CPU, the A53 processor runs the Linux system, utilizing its high-performance data processing and computing capabilities to handle data processing and data transmission. The M7 processor runs the FreeRTOS real-time operating system, leveraging its real-time nature to parse the B-code waveform and derive high-precision time. The A53 and M7 processors can directly communicate between cores, sharing high-precision time with greater efficiency. Time information can be directly transmitted to downstream devices via the A53 processor system time or UART, SPI, or the M7 processor itself can directly use the parsed time information for industrial field processing.
[0054] Current B-code analysis uses specialized CPLDs or FPGAs. This invention uses a dual architecture: the A53 processor runs the gateway and router functions, while the M7 processor's MCU parses the B-code; the B-code originates from the 5G communication module.
[0055] When the smart terminal system is operating, the A53 processor drives the 5G communication module, supporting various protocols and functions such as routing gateways. The 5G communication module directly outputs a B-code pulse stream. The B-code waveform output I / O is directly connected to the M7 processor's GPIO (RF GPIO, B-code output, used for high-precision timing). The M7 processor is responsible for interpreting the B-code waveform and converting it into time information.
[0056] The B code element of the 5G communication module is a 100pps DC code, and the waveform has three types: 0 code element, 1 code element, and P code element. Figure 3 When parsing, the GPIO of the M7 processor is set to interrupt mode, and the GPIO interrupt is used to parse the three code elements 0, 1, and P. The complete format of the B code element obtained in this embodiment is as follows Figure 4 shown.
[0057] After the B code is parsed, the B code Pr accurate second time feature is used. When the nth Pr code element is parsed again, the parsed B code information time is added to the parsing time n seconds. This time is the precise time and is sent to the peripheral or other equipment.
[0058] The precise time information obtained by the M7 processor is sent to downstream industrial processing equipment through UART, SPI or A53 gateway systems. Industrial equipment only needs to communicate with the 5G precise timing intelligent terminal system through the interactive peripheral interface. For example, the industrial equipment receives the time information of the M7 processor in real time, and after obtaining the time information, it gives the time information to the actual industrial equipment, such as the attached Figure 2 Specifically, when multiple AGVs work together and the same cargo is transported by multiple AVGs, in order to ensure the stability of the transportation process, the AVG movements need to be synchronized. At this time, high-precision time is required as the movement condition of the AVG to ensure its synchronization.
[0059] Through the intelligent terminal system based on 5G precise timing of the present invention, the B code output of the 5G communication module and the multi-architecture characteristics of the CPU are utilized, the M7 processor gives full play to its real-time performance to parse the B code, the high-performance architecture such as the A53 processor gives full play to its high processing capability, the peripherals are shared between multiple architectures, and the gateway system and the FreeRTOS system are integrated into the same hardware.
[0060] CPU multi-architecture processors include not only the A53 processor and the M processor 7, but also more architectures such as the Cortex-A series processors (such as the A7 processor, A8 processor, A9 processor, A57 processor, A73 processor) and the Cortex-M series processors (such as the M4 processor, M7 processor, etc.).
[0061] For example, this embodiment uses a combination of an A53 processor and an M7 processor. Alternatively, an A72 processor may be combined with an M4 processor, an A53 processor may be combined with an M4 processor, and so on.
[0062] This embodiment also provides a precise timing method based on 5G precise timing, such as Figure 5 As shown, the following steps are included: the first step is to use the 5G communication module to generate a B-code waveform; the second step is to parse the generated B-code waveform and use interrupts to obtain B-code code elements; the third step is to parse the B-code code elements into time; the fourth step is to calculate the precise time and send the precise time to downstream devices for use.
[0063] The 5G communication module generates a B-code waveform, which is then parsed to obtain precise time. This time is then sent to downstream devices for use, ensuring their time synchronization. Without the need for R&D costs to analyze precise timing, industrial equipment can directly communicate with the 5G precise timing intelligent terminal system to obtain accurate time for business operations.
[0064] The following is a further explanation of the precise timing method of this application:
[0065] Step 1: Generate B-code waveform using the 5G communication module.
[0066] The 5G communication module is used to send time information and second pulses, and the sent time information is converted into pulse stream width data. The PRU is used to generate a B-code pulse stream based on the pulse stream width data. The PRU is used to de-jitter the second pulse to generate a de-jittered second pulse. The de-jittered second pulse is used to control the output enable of the B-code pulse stream, so that the B-code pulses are valid signals with uniform intervals.
[0067] The B-code symbols generated by the 5G communication module are 100pps DC codes, and the B-code symbols include 0, 1, and P symbols. The interrupt mode is set during parsing, and the interrupt is used to parse the B-code waveform to obtain the three symbols 0, 1, and P.
[0068] Step 2: Analyze the generated B-code waveform and use interrupts to obtain the B-code symbols.
[0069] A B code frame begins with two consecutive Ps, with the first flag being P0 and the second being Pr. The rising edge of Pr marks the quasi-second of the second, and Pr is the zeroth code element. Therefore, after parsing the P code element, the code continues parsing until two consecutive P code elements are parsed, marking the beginning of a B code frame. After parsing 100 code elements, a B code frame is completely parsed.
[0070] The specific process is as follows Figure 6 As shown:
[0071] First, interrupt the parsing of code elements to determine whether the obtained code element is P. If not, continue to interrupt until the first P code element is found; continue to interrupt the parsing of code elements to determine whether the code element after the first P code element is P. If not, return to the previous step, find the first P code element again, and continue to interrupt the parsing of code elements until two consecutive P code elements are found to obtain the B code start node.
[0072] Interrupt the parsing of codewords and determine whether it is the 100th B codeword. If it is the 100th B codeword, the parsing is completed. If not, continue to interrupt the parsing of codewords until the 100th B codeword is parsed and the B code parsing is completed.
[0073] Parsing the generated B code waveform is to parse the B code waveform into B code symbols. The specific process is as follows: Figure 7 As shown:
[0074] Initialize the timer, obtain the current IO voltage, and wait for the interrupt to trigger;
[0075] Get interrupt trigger, timer timing, read IO level status V0, and wait for the next interrupt;
[0076] Get the second interrupt, restart the timer, get the time T0, read the IO level status V1, and wait for the next interrupt;
[0077] Get the third interrupt, the timer restarts, and gets the time T1;
[0078] Obtain parsed codewords based on V0, V1, T0, and T1.
[0079] Step 3: Parse the B code elements into time.
[0080] After parsing 100 B-code symbols, the B-code symbol definition table is used to parse out the time information of the B-code.
[0081] Step 4: Calculate the precise time and send it to downstream devices for use.
[0082] The precise time is the sum of the parsed B-code time information and the B-code usage time. The B-code usage time is based on the +Nth code element 0 received after the code element is parsed. The precise time is sent out at the exact second of the code element. This can be understood as taking advantage of the B-code Pr accurate time feature and adding the parsed time n seconds to the parsed B-code information time when the nth Pr code element is parsed again. This time is the precise time and is sent to the peripheral or other device.
[0083] Specifically:
[0084] For example, if the CPU parses two consecutive pps, the first p is defined as Pn and the second p is defined as P0. P0 is the 0th code element of the next code element and is the whole second of 1 second. After parsing the B code element (the time may be parsed after receiving the 80th code element), the time obtained is 2022-11-21 17:32:30. The exact time is the time when P0 is received.
[0085] After the parsing is completed, if the B code has not been transmitted yet, if the time is parsed after receiving 80 code elements, then the next time two pp are received, the first p is defined as Pn, and the second p is defined as P0. P0 is the 0 code of the next code element, and P0 is the 0 code element of the next code element. The precise time of PO is 2022-11-21 17:32:31. At this time, 2022-11-21 17:32:31 is sent through the interface.
[0086] After parsing is completed, the B code has reached the 50th code element of the third B code (that is, when the subsequent time parsing is completed, pp is parsed three times). After waiting for four pp code elements, the precise time of the second p moment is 2022-11-21 17:32:34. At this time, 2022-11-21 17:32:34 is sent through the interface.
[0087] The embodiment described above is only a preferred solution of the present invention and does not limit the present invention in any form. Other variations and modifications are possible without exceeding the technical solution described in the claims.
Claims
1. An intelligent terminal system based on 5G precise timing, characterized in that: include: 5G communication module: Obtains precise clock information from the 5G base station through the air interface SIB9, compensates for the transmission delay between the terminal and the base station, converts the precise clock into B code, and sends the generated B code to the CPU multi-architecture processor; CPU multi-architecture processor: drives the 5G communication module to generate B code and parses the generated B code to obtain time information; Interactive peripheral interface: Sends the time information parsed by the CPU multi-architecture processor to downstream industrial equipment.
2. The intelligent terminal system based on 5G precise timing according to claim 1, characterized in that: The CPU multi-architecture processor includes: Driver processor: runs the Linux system, drives the 5G communication module to connect to the network and output B-code waveforms, and supports various protocols and functions including routing gateways to achieve data processing and data transmission; B-code parsing processor: runs the FreeRTOS real-time operating system, parses the B-code waveform and converts it into time information.
3. The intelligent terminal system based on 5G precise timing according to claim 2, characterized in that: The driving processor is a Cortex-A series processor; the B code parsing processor is a Cortex-M series processor.
4. A precise timing method based on 5G precise timing, applied to a smart terminal system based on 5G precise timing as claimed in any one of claims 1 to 3, characterized in that: The following steps are involved: S1: Generate B-code waveform using 5G communication module; S2: Analyze the generated B-code waveform and obtain the B-code symbol by using interruption; S3: Parse B code symbols into time; S4: Calculate the precise time and send it to downstream devices for use.
5. The precise timing method based on 5G precise timing according to claim 4, characterized in that: The B code elements generated in step S1 are 100 pps DC codes, and the B code elements include 0 code element, 1 code element and P code element. During parsing, an interrupt mode is set, and the B code waveform is parsed using interrupts to obtain the three code elements 0, 1 and P.
6. The precise timing method based on 5G precise timing according to claim 4, characterized in that: The step S2 further comprises: S2.1: Interrupt the code element parsing and determine whether the obtained code element is P. If not, continue to interrupt until the first P code element is found. S2.2: Continue parsing the codewords and determine whether the codeword following the first P codeword is P. If not, return to step S2.1 and find the first P codeword again until two consecutive P codewords are found to obtain the B code start node. S2.3: Interrupt the codeword parsing and determine whether it is the 100th B codeword. If it is the 100th B codeword, the parsing is completed. If not, continue to interrupt the codeword parsing until the 100th B codeword is parsed, and the B code parsing is completed.
7. A precise timing method based on 5G precise timing according to claim 4 or 6, characterized in that: In step S2, parsing the generated B-code waveform is parsing the B-code waveform into B-code symbols: Initialize the timer, obtain the current IO voltage, and wait for the interrupt to trigger; Get interrupt trigger, timer timing, read IO level status V0, and wait for the next interrupt; Get the second interrupt, restart the timer, get the time T0, read the IO level status V1, and wait for the next interrupt; Get the third interrupt, the timer restarts, and gets the time T1; Obtain parsed codewords based on V0, V1, T0, and T1.
8. The precise timing method based on 5G precise timing according to claim 4 or 6, characterized in that: In step S3, the time information of the B code is parsed using the B code symbol definition table; in step S4, the precise time is the sum of the parsed B code time information and the parsed B code usage time. The parsed B code usage time is based on the 1+Nth code element 0 received after the code element is parsed. The precise time is sent out at the full second of the code element.
Citation Information
Patent Citations
Time service calibration method and device of time code, terminal and storage medium
CN112422221A
Time shared rake fingers and path searcher
US20080240067A1