B code time synchronization and forwarding system

By using a single -chip microcomputer to replace FPGA or CPLD in the power system, the B code pairs and forwarding functions are realized, and the problem of high -time and forwarding functions in existing technologies has a high cost of time and forwarding function. Equipment costs and improve the real -time and stability of the system.

CN119363280APending Publication Date: 2025-01-24SHANDONG LUNENG SOFTWARE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411583608.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the existing power systems, the B-code time-to-time and forwarding functions are costly and do not have the ability to transmit multi-level time information, making it difficult to meet the needs of complex power systems.

Method used

Use a single -chip machine to replace the FPGA or CPLD, send the decoding time data to the main control chip through the serial port to achieve the B -code -pair and forwarding function, reducing the cost of the device.

Benefits of technology

Effectively reduce the time -to -time circuit cost of the embedded equipment of the substation, improve the real -time and stability of the system, and has a multi -level time information transmission ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363280A_ABST
    Figure CN119363280A_ABST
Patent Text Reader

Abstract

The invention provides a B code time synchronization and forwarding system, and the system comprises a B code time synchronization receiving circuit which is used for receiving a B code time synchronization differential signal from a standard timing system device, converting the B code time synchronization differential signal into a level signal, and transmitting the level signal to a single-chip microcomputer; the single chip microcomputer is used for receiving the level signal, converting the level signal into a digital signal according to a B code rule, calculating corresponding time information and sending the time information to the main control chip; after responding to the received clock pulse signal and the updated system time, performing second plus 1 processing on the corresponding time information, converting the time information into a B code signal, and sending the B code signal to the B code time synchronization forwarding circuit; the main control chip is used for receiving the time information sent by the single chip microcomputer, finishing time synchronization operation by updating system time and clock chip time, and sending the updated system time to the single chip microcomputer; the clock chip is used for providing a clock signal for the system and sending a clock pulse signal to the single chip microcomputer; and the B code time synchronization forwarding circuit is used for processing the B code signal and then outputting the B code signal to external equipment or a network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of time synchronization, and more particularly to a B code time synchronization and forwarding system. Background Art

[0002] B code is a type of IRIG time coding sequence, specifically the IRIG-B format. It realizes the transmission and synchronization of time information by loading the time synchronization signal and time code information such as seconds, minutes, hours, and days into a signal carrier with a frequency of 1kHz. It is widely used in power, communication and other fields.

[0003] With the continuous development of power systems, the requirements for accurate time synchronization of power equipment are increasing. Existing DC power supplies and integrated power supply monitoring devices for power supply need to have B code synchronization and forwarding functions to ensure time synchronization between various devices in the power system and improve the stability and reliability of the system.

[0004] There are two main implementation methods for the existing B-code timing scheme for substations. The first is an industrial computer system based on the x86 / x64 architecture. The system receives the B-code signal through the serial port and uses its powerful processing power to parse the B-code. Since hardware interrupts need to be frequently generated during the B-code parsing process, this solution has high performance requirements for the industrial computer to ensure that when parsing the B-code, it will not cause delays or freezes to other software running in the system. However, this solution has obvious limitations, namely, its hardware resources are relatively abundant, the cost is high, and it usually does not have the B-code forwarding function, which makes it difficult to meet the needs of multi-level transmission of time information in the power system.

[0005] Another solution is an ARM-based embedded system. In order to reduce the burden on the CPU and prevent the frequent hardware interrupts during B-code parsing from affecting the real-time performance of the system, this solution usually uses dedicated chips such as FPGA (field programmable gate array) or CPLD (complex programmable logic device) to decode the B-code. These dedicated chips can efficiently process the B-code signal and send the decoded time information to the CPU of the embedded system for time synchronization. Although this solution improves the real-time performance and stability of the system to a certain extent, its cost is relatively high and it also does not have the B-code forwarding function, which limits its application in complex power systems. Summary of the invention

[0006] In view of the problems existing in the prior art, the purpose of the present invention is to provide a B-code timing and forwarding system, which adopts a single-chip microcomputer to replace FPGA or CPLD to perform B-code decoding, and sends the decoded time data to the main control chip through the serial port to complete the timing work, thereby effectively reducing the cost of the B-code timing circuit of the embedded equipment in the substation.

[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0008] A B code timing and forwarding system comprises: a B code timing receiving circuit, a B code timing forwarding circuit, a single chip microcomputer, a main control chip and a clock chip; the single chip microcomputer is respectively connected to the B code timing receiving circuit, the B code timing forwarding circuit and the main control chip signal, and the clock chip is respectively connected to the single chip microcomputer and the main control chip signal; the B code timing receiving circuit is used to receive the B code timing differential signal from the standard time system equipment, convert the B code timing differential signal into a level signal and send it to the single chip microcomputer;

[0009] The single chip microcomputer is used to receive the level signal, and according to the B code rule, convert the level signal into a digital signal, calculate the corresponding time information and send it to the main control chip; in response to receiving the clock pulse signal and the updated system time, the corresponding time information is processed by adding 1 to the second, and then converted into a B code signal and sent to the B code time forwarding circuit;

[0010] The main control chip is used to receive the time information sent by the single-chip microcomputer, complete the time synchronization operation by updating the system time and the clock chip time, and send the updated system time to the single-chip microcomputer;

[0011] The clock chip is used to provide the system with a clock signal and send a clock pulse signal to the single-chip microcomputer; the B-code timing forwarding circuit is used to process the B-code signal and output it to an external device or network.

[0012] Furthermore, the single-chip microcomputer is connected to the B code time synchronization receiving circuit signal through the GPIO interrupt input pin, the single-chip microcomputer is connected to the B code time synchronization forwarding circuit signal through the GPIO interrupt output pin, the single-chip microcomputer is connected to the second interrupt pin signal of the clock chip through the GPIO interrupt input pin, the single-chip microcomputer is connected to the main control chip through serial port data, and the single-chip microcomputer is connected to the GPIO interrupt input pin signal of the main control chip through the GPIO interrupt output pin; the clock chip is connected to the main control chip data through the I2C bus.

[0013] Furthermore, the single chip microcomputer is specifically used for:

[0014] Receive the level signal through the GPIO port, capture the level pulse width, convert the pulse width into a digital signal according to the B code rule, and calculate the time information and send it to the main control information;

[0015] Send an interrupt signal to the main control chip when the B code starts in the next second;

[0016] The time information sent by the main control chip is received through the serial interface port, and the pulse signal of the clock chip is received through the GPIO port. The corresponding time information is processed by adding 1 to the second, and then converted into a B code signal and sent to the B code time forwarding circuit.

[0017] Furthermore, the main control chip is specifically used for:

[0018] Run the embedded Linux system and receive time information through the application;

[0019] Use the application to read the time information from the serial interface and send the time information to the driver. After receiving the interrupt signal sent by the microcontroller, the driver increases the number of seconds of the time information received from the application by 1, updates the time information to the system time, and completes the time synchronization;

[0020] Use the driver to send the current system time to the microcontroller through the serial port every 1 second.

[0021] Furthermore, the clock chip is specifically used for:

[0022] Provides a clock signal for the system and sends a pulse signal with a preset pulse width to the microcontroller every second.

[0023] Furthermore, the single chip microcomputer is also used for:

[0024] When the rising edge of the pulse of the current system time and pulse signal is received, the second of the time information received from the main control chip is added by 1, and then converted into a B code level signal and sent to the B code time forwarding circuit.

[0025] Further, the B code timing forwarding circuit includes: a signal conversion circuit and an output circuit, the signal conversion circuit is respectively connected to the GPIO interrupt output pin of the single chip microcomputer and the output circuit;

[0026] A signal conversion circuit, used for converting a B-code level signal into a B-code differential signal;

[0027] The output circuit is used to output the B-code differential signal to an external device or network.

[0028] Furthermore, the B code timing receiving circuit includes: a differential signal receiving module, a filtering module, a signal conversion module and an interface circuit;

[0029] A differential signal receiving module is used to receive a B-code timing differential signal from a standard timing device;

[0030] A filtering module, used for filtering the B code time difference signal;

[0031] A signal conversion module, used for converting the B-code time differential signal after filtering into a single-ended TTL level signal or a CMOS level signal;

[0032] The interface circuit is used to send a TTL level signal or a CMOS level signal to a GPIO interrupt input pin of a microcontroller through a GPIO interface.

[0033] Compared with the prior art, the beneficial effect of the present invention is that the present invention provides a B-code time synchronization and forwarding system, which uses a low-cost single-chip microcomputer to replace FPGA or CPLD to perform B-code decoding, and sends the time data decoded by the single-chip microcomputer to the main control chip through the serial port to complete the time synchronization of the system. The main control chip sends the current time to the low-cost single-chip microcomputer, and then the second interrupt signal of the RTC real-time clock of the main control chip is connected to the low-cost single-chip microcomputer. When the low-cost single-chip microcomputer receives the interrupt signal and time data sent by the main control chip, it adds one to the time data seconds and encodes it into B code, and then forwards the B code through the GPIO port of the single-chip microcomputer, thereby realizing the B-code time synchronization and forwarding function.

[0034] The present invention can reduce the cost of the B-code timing circuit of the embedded equipment in the transformer substation, does not occupy the system interruption during operation, has high system real-time performance, and uses the serial port to communicate with the main control chip, occupying less main control chip resources.

[0035] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0037] Figure 1 It is a system structure diagram of a specific implementation mode of the present invention.

[0038] Figure 2 It is an electrical block diagram of a B-code timing receiving circuit according to a specific implementation mode of the present invention.

[0039] Figure 3 It is an electrical block diagram of a B-code time synchronization and forwarding circuit according to a specific implementation mode of the present invention. DETAILED DESCRIPTION

[0040] The specific implementation of the present invention is described below with reference to the accompanying drawings.

[0041] like Figure 1 The B code timing and forwarding system shown includes: a B code timing receiving circuit 1, a B code timing forwarding circuit 2, a single chip microcomputer 3, a main control chip 4 and a clock chip 5; the single chip microcomputer 3 is respectively connected to the B code timing receiving circuit 1, the B code timing forwarding circuit 2 and the main control chip 4 by signals, and the clock chip 5 is respectively connected to the single chip microcomputer 3 and the main control chip 4 by signals.

[0042] Specifically, the single-chip computer 3 is connected to the signal of the B code time synchronization receiving circuit 1 through the GPIO interrupt input pin, the single-chip computer 3 is connected to the signal of the B code time synchronization forwarding circuit 2 through the GPIO interrupt output pin, the single-chip computer 3 is connected to the second interrupt pin signal of the clock chip 5 through the GPIO interrupt input pin, the single-chip computer 3 is connected to the main control chip 4 through serial port data, and the single-chip computer 3 is connected to the GPIO interrupt input pin signal of the main control chip 4 through the GPIO interrupt output pin; the clock chip 5 is connected to the main control chip 4 through the I2C bus.

[0043] The B code timing receiving circuit 1 is used to receive the B code timing differential signal from the standard timing equipment, convert the B code timing differential signal into a level signal and send it to the single chip microcomputer 3.

[0044] In a specific embodiment, Figure 2 As shown, the B code timing receiving circuit 1 includes: a differential signal receiving module 11, a filtering module 12, a signal conversion module 13 and an interface circuit 14. The filtering module 12 is connected to the differential signal receiving module 11 and the signal conversion module 13 respectively, and the interface circuit 14 is connected to the signal conversion module 13. The differential signal receiving module 11 is used to receive the B code timing differential signal from the standard timing equipment; the differential signal receiving module 11 can effectively suppress common mode noise and improve the reliability and stability of signal transmission. The filtering module 12 is used to filter the B code timing differential signal; the filtering process helps to improve the signal-to-noise ratio of the signal and ensure the accuracy of subsequent processing. The signal conversion module 13 is used to convert the B code timing differential signal after filtering into a single-ended level TTL level signal or CMOS level signal; the signal conversion module 13 can use a level converter or a simple voltage comparison circuit to achieve level conversion. The interface circuit 14 is used to send the TTL level signal or CMOS level signal to the GPIO interrupt input pin of the single-chip computer 3 through the GPIO interface.

[0045] The single chip microcomputer 3 is used to receive the level signal, and according to the B code rule, convert the level signal into a digital signal, calculate the corresponding time information and send it to the main control chip 4. In response to receiving the clock pulse signal and the updated system time, the corresponding time information is processed by adding 1 to the second, and then converted into a B code signal and sent to the B code time forwarding circuit 2.

[0046] In a specific implementation manner, the single chip computer 3 is specifically used for:

[0047] Receive the level signal through the GPIO port, capture the level pulse width, convert the pulse width into a digital signal according to the B code rule, and calculate the time information and send it to the main control information;

[0048] Send an interrupt signal to the main control chip 4 when the B code starts in the next second;

[0049] When receiving the current system time sent by the main control chip 4 and the rising edge of the pulse signal sent by the clock chip 5, the second of the current system time is added by 1 and converted into a B code signal and sent to the B code time forwarding circuit 2.

[0050] The main control chip 4 is used to receive time information by running the embedded Linux system, complete the time synchronization operation by updating the system time and the clock chip time, and send the updated system time to the single chip computer 3.

[0051] In a specific implementation, the main control chip 4 is specifically used for:

[0052] Run the embedded Linux system and receive time information through the application;

[0053] After receiving the interrupt signal sent by the single-chip computer 3, the time information is read from the application program, and the number of seconds of the received time information is increased by 1 by using the driver program, and the time information is updated to the system time to complete the time synchronization;

[0054] The driver is used to send the current system time to the microcontroller 3 via the serial port every 1 second.

[0055] The clock chip 5 is used to provide a clock signal for the system and a clock pulse signal to the single-chip microcomputer.

[0056] In a specific implementation, the clock chip 5 is specifically used to send a pulse signal with a pulse width of 500 ms to the single chip computer 3 every second.

[0057] The B code timing forwarding circuit 2 is used to process the B code signal and then output it to an external device or network.

[0058] In a specific embodiment, Figure 3 As shown, the B code timing forwarding circuit 2 includes: a signal conversion circuit 21 and an output circuit 22, and the signal conversion circuit 21 is connected to the GPIO interrupt output pin of the single chip computer 3 and the output circuit 22 respectively.

[0059] The signal conversion circuit 21 is used to convert the B-code level signal into a B-code differential signal. The output circuit 22 is used to output the B-code differential signal to an external device or network. Depending on the actual application scenario, the output circuit 22 may include a signal amplification circuit, a drive circuit, etc.

[0060] Based on the above system architecture, this system realizes the B code timing and forwarding functions.

[0061] Among them, the B code timing process is as follows:

[0062] 1. The B code timing receiving circuit receives the B code timing signal and converts the B code timing differential signal into a level signal;

[0063] 2. The microcontroller receives the level signal through the GPIO port, captures the level pulse width, converts the pulse width into a digital signal according to the B code rule, and finally calculates the time information. It also sends an interrupt signal to the main control chip when the B code starts in the next second.

[0064] 3. The microcontroller sends the calculated time information to the main control chip running the embedded Linux system through the serial port, and the Linux system receives the time information through the application program;

[0065] 4. After receiving the interrupt signal sent by the microcontroller, the Linux system driver reads the time information from the application program. The driver increases the second of the received time information by 1, and then updates the time to the system time to complete the time synchronization.

[0066] The B code forwarding process is as follows:

[0067] 1. The Linux system driver sends the current time to the microcontroller through the serial port every 1 second;

[0068] 2. The second interrupt pin of the real-time clock chip is connected to the GPIO interrupt input pin of the microcontroller. The real-time clock will send out a pulse waveform with a pulse width of 500ms per second. When the microcontroller receives the current time information and the rising edge of the pulse, it will add 1 to the second of the time information and convert it into a B code signal and send it through the B code time forwarding circuit.

[0069] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0070] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0071] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.

[0072] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.

[0073] The present invention will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the application.

Claims

1. A B code timing and forwarding system, characterized in that: include: B code timing receiving circuit, B code timing forwarding circuit, single chip microcomputer, main control chip and clock chip; The single chip microcomputer is respectively connected with the B code time synchronization receiving circuit, the B code time synchronization forwarding circuit and the main control chip signal, and the clock chip is respectively connected with the single chip microcomputer and the main control chip signal; The B code timing receiving circuit is used to receive the B code timing differential signal from the standard timing equipment, convert the B code timing differential signal into a level signal and send it to the single chip microcomputer; The single chip microcomputer is used to receive the level signal, and according to the B code rule, convert the level signal into a digital signal, calculate the corresponding time information and send it to the main control chip; in response to receiving the clock pulse signal and the updated system time, the corresponding time information is processed by adding 1 to the second, and then converted into a B code signal and sent to the B code time forwarding circuit; The main control chip is used to receive the time information sent by the single-chip microcomputer, complete the time synchronization operation by updating the system time and the clock chip time, and send the updated system time to the single-chip microcomputer; Clock chip, used to provide clock signal for the system and send clock pulse signal to the microcontroller; The B code timing forwarding circuit is used to process the B code signal and then output it to an external device or network.

2. The B-code timing and forwarding system according to claim 1, characterized in that: The single-chip microcomputer is connected to the B code time synchronization receiving circuit signal through the GPIO interrupt input pin, the single-chip microcomputer is connected to the B code time synchronization forwarding circuit signal through the GPIO interrupt output pin, the single-chip microcomputer is connected to the second interrupt pin signal of the clock chip through the GPIO interrupt input pin, the single-chip microcomputer is connected to the main control chip through serial port data, and the single-chip microcomputer is connected to the GPIO interrupt input pin signal of the main control chip through the GPIO interrupt output pin; the clock chip is connected to the main control chip data through the I2C bus.

3. The B-code timing and forwarding system according to claim 2, characterized in that: The single chip microcomputer is specifically used for: Receive the level signal through the GPIO port, capture the level pulse width, convert the pulse width into a digital signal according to the B code rule, and calculate the time information and send it to the main control information; Send an interrupt signal to the main control chip when the B code starts in the next second; The time information sent by the main control chip is received through the serial interface port, and the pulse signal of the clock chip is received through the GPIO port. The corresponding time information is processed by adding 1 to the second, and then converted into a B code signal and sent to the B code time forwarding circuit.

4. The B-code timing and forwarding system according to claim 3, characterized in that: The main control chip is specifically used for: Run the embedded Linux system and receive time information through the application; Use the application to read the time information from the serial interface and send the time information to the driver. After receiving the interrupt signal sent by the microcontroller, the driver increases the number of seconds of the time information received from the application by 1, updates the time information to the system time, and completes the time synchronization; Use the driver to send the current system time to the microcontroller through the serial port every 1 second.

5. The B-code timing and forwarding system according to claim 4, characterized in that: The clock chip is specifically used for: Provides a clock signal for the system and sends a pulse signal with a preset pulse width to the microcontroller every second.

6. The B-code timing and forwarding system according to claim 5, characterized in that: The single chip microcomputer is also used for: when receiving the current system time and the rising edge of the pulse signal, adding 1 to the seconds of the time information received from the main control chip, converting it into a B code level signal and sending it to the B code time forwarding circuit.

7. The B-code timing and forwarding system according to claim 6, characterized in that: The B code timing forwarding circuit comprises: a signal conversion circuit and an output circuit, wherein the signal conversion circuit is connected to the GPIO interrupt output pin of the single chip computer and the output circuit respectively; A signal conversion circuit, used for converting a B-code level signal into a B-code differential signal; The output circuit is used to output the B-code differential signal to an external device or network.

8. The B-code timing and forwarding system according to claim 1, characterized in that: The B code timing receiving circuit comprises: a differential signal receiving module, a filtering module, a signal conversion module and an interface circuit; A differential signal receiving module is used to receive a B-code timing differential signal from a standard timing device; A filtering module, used for filtering the B code time difference signal; A signal conversion module, used for converting the B-code time differential signal after filtering into a single-ended TTL level signal or a CMOS level signal; The interface circuit is used to send a TTL level signal or a CMOS level signal to a GPIO interrupt input pin of a microcontroller through a GPIO interface.