GPS Clock System (GPS Synchronization Clock) Technical Solution Document

In power systems, CDMA2000, DVB, DMB, and other systems, a high-precision GPS clock system (GPS synchronization clock) is of crucial importance for maintaining the normal operation of the system.

How to use GPS OEM for secondary development and generate high-precision clock generator is a hot topic of research.

For example, in the DVB-T single frequency network (SFN), the synchronization accuracy reaches several tens of ns for the requirement of time synchronization. How to design a commercial level system for such a high-precision and high-stability system?

I. Introduction

In many areas of the power system, such as time-sequential recording, relay protection, fault location, energy billing, real-time information acquisition, etc., there is a need for a unified, high-accuracy time reference. Using GPS satellite signals for timekeeping is one of the commonly used methods.

At present, there are many types of GPS-OEM boards on the market, and the prices are moderate and practical. Using the GPS-OEM board for secondary development, a GPS clock system (GPS synchronization clock) that can accurately obtain GPS time information can be obtained. This article is based on the SUPERSTAR GPS OEM board produced by Marconi of Canada as an example to introduce how to develop a GPS clock system (GPS synchronization clock) applied to power systems. 

Second, GPS time module

GPS clock system (GPS synchronization clock) uses SUPERSTAR GPS OEM board as GPS receiver module, SUPERSTAR GPS OEM board is parallel 12 tracking channels, full-view GPS receiver module. The OEM board has a rechargeable lithium battery. The L1 frequency is 1575.42 MHz, providing pseudo-range and carrier-phase observation output and 1PPS (1 PULSE PER SECOND) pulse output. The OEM board provides two input and output serial ports. One is used as the main communication port. The OEM board can be set through this serial port. You can also read the international standard time, date, location and other information from this serial port. Another serial port is used for the output of differential data in RTCM format. When there is no differential signal or only for GPS timing, this serial port can be used. The 1PPS pulse is a standard TTL logic output format. When the navigation output is valid, the rising edge of the pulse corresponds to the time. The 1PPS pulse is a positive pulse signal output per second. Its amplitude is 5V. The rising edge of the 1PPS pulse is synchronized with the second pulse of the UCT standard time, and the error is within plus or minus 1μs. The rising edge of this pulse signal can be used as the timing signal of UTC time. In addition, we can use the synchronous pulse circuit to expand the 1PPS signal to 1PPM (1 PULSE PER MINUTE), 1PPH (1 PULSE PER HOUR), etc. On time. The number of output ports for each pulse can be expanded according to the application requirements.

The communication data format of the main serial port of SUPERSTAR GPS OEM board can use CMC BINARY binary or NMEA ASCII code supported by CMC. The baud rate can be adjusted from 300bps to 38400bps according to the application requirements, with 8 data bits and 1 bit from The first bit, 1 stop bit, no parity bit. The GPS data information includes various information such as satellite status, longitude, latitude, time, altitude, speed, etc. For the development of the synchronous clock, we only need to read the time information. Therefore, the OEM board can be set through the main serial port to send only the time information at a certain baud rate and some communication data format. For example, if we use the ASCII code of NMEA, we only need to read the time data with “$GPZDA” as the command header, and then we can easily separate the year, month, day, hour, minute and second of UTC time from it. .

Third, the system composition

GPS clock system (GPS synchronization clock) includes GPS receiver module, central processing unit, RS-232/485 interface, CAN bus interface, synchronization pulse generation circuit, and display circuit.

1. Central processing unit

The GPS synchronization clock uses the DS80C320 as the system's CPU. The DS80C320 is an 8-bit high-speed single-chip microcomputer introduced by DALLAS of the United States. It is a single-chip microcomputer compatible with the MCS-51 series. Since the microprocessor core has been redesigned to eliminate redundant clocks and memory cycles, if the clocks operate at the same frequency and execute the same program code, the DS80C320's execution speed is at least 2.5 times that of 8051.

The DS80C320 and the 80C32 have the same package. In addition to the 80C32's I/O ports, 2 timer/counters, and serial ports, the DS80C320 also has some additional resources, which are listed below.

a. Serial port 1

The DS80C320 additionally provides the same hardware serial communication port as the 80C32. In the development of the GPS synchronization clock, we obtain the GPS time data from the serial communication port 0, and the serial communication port 1 is responsible for communication with various grid automation devices. .

b. Double data pointers

The DS80C320 provides two data pointers. When the GPS clock receives GPS OEM board information, these two data pointers can be used to send data to different memory areas.

c. On-chip reset circuit

The DS80C320 has a complete set of power-on/power-down reset logic. Therefore, using the DS80C320 eliminates the need for an external reset circuit. Simplified hardware and improved reliability.

d. Watchdog timer

The DS80C320 has a programmable watchdog timer and does not require an additional watchdog circuit like the 80C32.
2. Synchronization pulse generation circuit

P3.2 and P3.3 are strobe signal output terminals of 1PPM (1 PULSE PER MINUTE) and 1PPH (1 PULSE PER HOUR) pulses (to prohibit the transmission of 1PPS pulses, both control terminals are set to be low in peacetime). Take 1PPM pulse as an example: After reading the UTC time information from the serial port 0 and judging that it is a minute of 59 seconds, the CPU will set P3.2 high to send a pulse at the integral time. When the time information is read in again and it is judged that it is an integral time, P3.2 is set to be low again to prohibit the sending of pulses. Cycle in sequence to get accurate 1PPM pulse signal. Using the same method, a 1 PPH pulse signal can also be generated.

Because the static empty node mode control end is isolated from the signal channel better and the withstand voltage is higher, the GPS clock system (GPS synchronous clock) outputs the synchronization pulse signal as a switch quantity in a static empty node manner.

3. RS-232/485 interface

The GPS clock system (GPS synchronization clock) has two communication interfaces, RS232 and RS485, to meet the requirements of different communication systems. Through these two interfaces, the synchronous clock can output complete UTC time information including the year, month, day, hour, minute, and second every second. It can also be used as the communication slave machine to automate the power grid of the host computer when needed. The device provides accurate time information.

4. CAN bus interface

The CAN (Controller Area Network) bus is one of the important fieldbuses and is currently also used in some areas of the power system (such as a substation integrated automation system). Therefore, when designing a GPS clock system (GPS synchronization clock), a CAN bus interface is configured. The GPS clock system (GPS synchronization clock) uses the SJA1000 produced by PHILIPS as the CAN protocol controller, and the PCA82C250 serves as the interface between the SJA1000 and the physical bus. During integer or integer time, the DS80C320 can send the identifier and data directly to the SJA1000's transmit buffer through the address/data bus, and then set the transmit request bit TR in the command register CMR to enable the CAN core module to read the transmit buffer. The data in the package is encapsulated into a complete CAN frame according to the CAN protocol and sent to the bus via the transceiver. It can also respond to external interrupts when required by the grid automation device, and output the GPS data in the buffer of the single-chip microcomputer out of the CAN protocol.

Fourth, software design

The software for the GPS clock system (GPS synchronization clock) consists of a main program and receive/transmit interrupt subroutines. System initialization is performed in the main program, including initialization of SUPERSTAR GPS OEM board, two serial communication ports, built-in programmable watchdog, timer, etc. The program generates a serial communication port 0 interrupt every second, reads the UTC time data, converts it into Beijing time, and sends it through the serial communication port 1 in the BCD code format. In the interrupt subroutine, the time information will also be judged. The strobe signals of 1PPM and 1PPH signals are generated at 59 seconds per minute and 59 minutes and 59 seconds per hour, and are prohibited at full or whole minutes. Send a strobe signal.

The GPS clock system (GPS synchronization clock) can also respond to the timing command sent by the grid automation device and send accurate time information at that time. For this purpose, it is only necessary to add an interrupt subroutine of the serial communication port 1 to the program so as to provide real-time time information for the grid automation device according to a certain communication protocol.

V. Concluding remarks

The DS80C320-based GPS clock generator (GPS synchronization clock) introduced in this paper has been used in practical substation automation systems. The results of debugging and operation show that the clock device provides accurate time information for the entire system, with high reliability, accuracy and practicality. In terms of power system accident analysis, fault location, phase measurement and so on, the synchronous clock device has a very wide range of application prospects.

This entry was posted in on