Earthquake Reaearch in China  2017, Vol. 31 Issue (2): 282-288
Development of the Multipurpose Timing Instrument Based on BDS
Yang Feng, Ding Xinjuan, Li Xiaodong, Li Jinxiang     
Earthquake Administration of Xinjiang Uygur Autonomous Region, Urumqi 830011, China
Abstract: With the increasingly high requirement of clock source accuracy for seismic data servers and equipment, the development of a multipurpose timing system is urgently needed in the seismic industry. We have developed low-cost timing equipment according to the actual earthquake industry situation. This set of timing equipment can provide a unified solution to the different environment and different earthquake instruments with different timing precision demands.
Key words: GNSS     BDS     Clock source     Seismic instrument     Timing services    

INTRODUCTION

Data is mostly recorded in pairs in geophysical field observations, and a data pair contains two parts; the data itself and the specific time when the data is output, both of which are interdependent and indispensable. As technology improves, we demand a higher observation system sampling rate and accuracy of observation data, as well as higher observation system clock source accuracy. High precision of a clock source includes two aspects. One is that it provides the absolute accuracy of time itself, that is, the error between the given time and the standard time should be as small as possible. On the other hand, time synchronization between different instruments and equipment in the same observation system also needs to be ensured in an acceptable fixed scope, which allows no sharp changes, i.e, time differences between different separated devices in the same system should be close to a fixed value, and if one device is ahead of another device in time at a certain moment, it should also be ahead of the device at another time, and the time difference between the both should be in an acceptable fixed scope.

In order to get high-precision time, instruments and equipment need to calibrate their clocks frequently. There are many methods for clock calibration for instruments and equipment. Because wireless time carrier signals are susceptible to interference from the corona discharge of electric substations, precision cannot be guaranteed. Therefore, at present, the commonly used high-precision clock calibration methods for instruments and equipment include only the satellite navigation system time service and network server time service. These two methods have their own advantages and disadvantages. The precision of network timing is relatively low (with 10 millisecond precision), and network timing requires not only a reliable time server, but also that instruments and equipment be connected to the internet. The satellite navigation system time service has the merits of high precision, less disturbance and real-time performance, but it also requires an open field with no shelter, thus it is not possible to apply the navigation system time service to those instruments and equipment installed deep inside bomb shelters. Besides, equipping a timing device for each instrument also has the disadvantage of high cost.

Therefore, when the demand for clock accuracy is not very high or due to environmental factors, it is not suitable to use the satellite navigation system time service, the time service via satellite navigation system is first provided for the time server, and then internet timing for instruments and equipment is done via the time server. When the demand for clock accuracy is very high and the environment complies with requirements, the direct use of the satellite navigation system for the timing of instruments and equipment is a simple and practical solution to the clock problem of equipment and instruments of the whole earthquake system.

1 CLOCKS IN INSTRUMENTS AND GENERATION MECHANISM FOR CLOCK ERROR

Current geophysical field observation data is all obtained by automatic recording with various digital monitoring instruments. A digital instrument is essentially an embedded computer system. The internal clock of the computer system is maintained by a quartz crystal oscillator (crystal oscillator for short), which is made from piezoelectric quartz crystal plate. Because quartz crystal sheet will produce a mechanical vibration when it is acted upon by an applied alternating electric field, and when the frequency of the alternating electric field is equal to the inherent frequency of quartz crystal, the vibration will become very strong. This is the external performance of the resonant characteristics of quartz crystal.

The inherent frequency of quartz crystal is determined by its material and external dimension. When quartz crystal vibrates with a fixed frequency, each oscillation cycle is called a clock cycle and multiple clock cycles constitute a machine cycle of the computer system processor. When using a timing circuit to record clock cycle or machine cycle, the product of counting results at any time and clock cycle or machine cycle is the value of passed time since the count started.

Although material and external dimensions determine the inherent frequency of quartz crystal, the oscillation frequency of quartz crystal is not an absolute fixed value without any error. Under the effect of various factors such as ambient temperature, degree of aging and voltage stability, it will deviate to a certain degree. The accumulation of the deviation will also ultimately lead to a certain degree of deviation between a calibrated computer or internal clock of an embedded system and standard clock every once in a while. In addition, because of various inherent properties and the external environment of quartz crystals used in different instruments, even if clock calibration is performedt for multiple instruments at the same time, the internal clocks of various instruments will also have the synchronization problem.

The only way to solve problems such as internal clock precision and lack of synchronism is to compare the internal clocks of instruments with a standard clock every once in a while, and to calibrate the deviated clocks at any moment.

2 OVERALL DESIGN SCHEME OF THE BEIDOU TIMING INSTRUMENT

The original design scheme for timing system of seismic instruments and equipment based on the BeiDou satellite mainly refers to the actual situation of the Xinjiang Earthquake Precursory Network. Each seismic station in Xinjiang has an earthquake precursory data server equipped with a Linux server, but except for the precursory data server with IP address 10.65.252.47 which uses internet timing, all other precursory data servers are not equipped with an automatic time calibration function, and there is at least more than one minute difference between the server time and standard time. Even the No.47 server, in the case of unsuccessful time checking for a long time, will sometimes show large deviations. On October 27, 2014, we found approximately two minutes difference between the No.47 server clock and the standard time in dealing with data loss of the quartz pendulum tiltmeter at Shichang station.

Due to the lack of a configurable internet timing server, precursory data servers at seismic stations will produce greater deviations under the condition of infrequent manual calibration. Besides precursory data servers, many earthquake precursor instruments are installed deep inside caves in Xinjiang in order to avoid external environment disturbance, which do not fulfill the requirements for the direct use of the navigation satellite time service. Meanwhile, due to the lack of a fixed remote time server, most of the earthquake precursory instruments haven't undergone automatic time calibration since installation, leading to a time error of even a few minutes in some of the instruments, which has a very adverse effect on precursor observation. Therefore, we put forward three basic design requirements for the development of the BeiDou satellite timing device.

The first requirement is low cost. Low cost is the basic premise for the mass use of the instrument. If the cost of a timing device can be kept at a relatively low level, we can equip a timing device for each earthquake precursor server, to ensure that precursor servers still can have precise time even in the event of regional internet loss.

Secondly, the device must be based on Linux operating system. Considering that earthquake precursor servers all use Linux operating system, if the time controlling software of timing devices can be based on Linux, after configuring the NTP protocol for the earthquake precursor server, it can directly offer the time service to all earthquake instruments and equipment managed by the server, which is particularly important for those instruments installed in air-raid shelters.

Finally, the device should have good extensibility. The timing device should be able to satisfy the requirements of various timing accuracy for different earthquake instruments installed in different environments at the same time. In normal operation, the timing system can provide accurate time for a Linux timing server in conjunction with the host computer software, and provide internet timing for instruments in conjunction with the Linux server. In the meantime, in the event of only using a timing instrument but not a host computer software, the timing device can also provide external integrate interface directly, taking the timing instrument as a hardware module directly integrated into the interior of earthquake instruments to directly offer a timing service with microsecond-level accuracy for an earthquake instrument.

In accordance with the requirements for the overall design of the instrument, the development of the BeiDou timing system is divided into two parts. One is the BeiDou timing device, including a hardware circuit independently designed based on a PIC18F6720 single chip microcomputer (http://kazus.ru/nuke/pic/39580a.pdf, 2001) and slave computer software running on the single chip microcomputer, the other is server control software based on the Linux operating system, with main functions such as communication with the BeiDou timing device, the management of server time and some parameter settings and status display. When used in network timing, the BeiDou timing device is applied in combination with the host computer software running on the Linux operating system, and when the timing device is integrated into the interior of earthquake instruments, we only use the BeiDou timing device. The functional module of the BeiDou timing device hardware system is shown in Fig. 1.

Fig. 1 Functional module of hardware system of the BeiDou timing device

The development of the BeiDou timing system involves knowledge of electronics, computer and communication. System environment and specific tools used in the development process are shown in Table 1.

Table 1 System environment and specific tools used in the development of the BeiDou timing system
3 THE APPLICATION OF THE BEIDOU TIMING DEVICE

After the completion of the development of software and hardware and welding of electronic components, the circuit board of the BeiDou timing device is as shown in Fig. 2.

Fig. 2 Photo of the BeiDou timing device after removing the case

For the host computer software based on Linux, wedesigned and implemented a Linux instruction named bdst. The instruction can accept three options, among which, two options require parameters. Details of bdst command are stated as below:

bdstbdst-option[argument]

The Linux command implemented by host computer software is used to realize the setting of the serial port on the timing server in the BeiDou system to which the BeiDou timing device is connected, directly checking server connection parameters and specific time information for the last successful time check and starting time check procedure.

Options-p PortNo

Option p is used to set the serial port number on Linux server to which the BeiDou timing device is connected. Serial port number is expressed numerically, within the range between 0 and 9. It should be noted that the Linux operating system is different from Windows. The system serial port number in Windows starts from 1, while it starts from 0 in Linux. Therefore, if the BeiDou timing device is connected to the first serial port on the Linux timing server——/dev/ttyS0, the command is set as bdst-p 0. After the system is connected, we should first configure the serial port number, if no serial port number is configured, the default port number used by the system is 0.

-s

Option s is used to display configured system parameters, including the serial port number used by the host computer and specific time of the last successful time check.

-r time

The initial goal of the design of option r is to start time check procedure after a confirmed minute. Considering that once the time check procedure is started, the system will keep receiving output data from the BeiDou timing device, until a valid time is obtained, the valid time requires not only successful positioning, but also totally corrects output data format, and then feedback time information from slave computer is adopted and the process is stopped after the acquisition of valid time. Therefore, the parameter time receives only now at present, but may receive numeric parameters for system expansion in the future.

When the timing system is applied in combination with earthquake precursory data server for internet timing, the BeiDou timing device is connected to the Linux server via the serial port, then the serial port number used by the host computer software is configured, and by timed job control (Richard Blum et al., 2012) under Linux, the bdst-r now command is automatically called.

When the timing device is integrated into the interior of the equipment and provides it with a high-precision timing service, the BeiDou timing device operates as a complete module, operating mode of which is mostly the same way as applied in combination with the internet timing server, only the usage of a PIC18F6720 pin will change. This pin, connected to the red and green LED, is the No.52 pin, RD4/PSP4. After the BeiDou timing device is integrated into the interior of an earthquake instrument, in order to draw out the indicator light for the operating state of the BeiDou chip to the instrument chassis panel, a 3P socket needs to be adapted on the three 2.54mm-spacing bonding pads which were originally used to weld a two-colored LED. The No.54 pin of PIC18F6720 single-chip microcomputer and bonding pad in between——ground (GND), are together connected to two pins of a red LED, and the red LED is used to indicate the current working status of the BeiDou Navigation Satellite System. The vacated No.52 pin is separately drawn out and connected to the instrument that needs a high-precision timing service.

When designing the circuit, we have used PPS signal of the BeiDou navigation chip UM220-Ⅲ N as an external high-priority interrupt, connected to the pin of a RB1 single-chip microcomputer. When the PPS signal is effective, we use its rising edge to trigger an external interrupt, and the interrupt handler function outputs a square wave on the No.52 pin of the PIC18F6720 single-chip microcontroller.

Time accuracy of the PPS signal of the BeiDou navigation satellite chip is 20ns (http://www.unicorecomm.com/files/PDF/Ch/NPL/UM220-III%20N_UserManual_Rel_Ed1.55.pdf, 2013). Because the single-chip microcomputer will perform some regular time-consuming operations such as pushing on stack and skipping etc., if we estimate conservatively with a crystal oscillator frequency of 18.432MHz, the average clock accuracy probability can be up to 128ns, and in extreme cases of maximum error, clock accuracy is about 237ns.

The application of the BeiDou timing device to the earthquake instrument is first of all to obtain the current time in plain text via the serial port, and the time error is about 10ms. This time value is set as a right time into the interior of the earthquake instrument, then we wait for the first square wave signal from the No.52 pin of the PIC18F6720 single-chip microcomputer in the BeiDou timing device. After the arrival of the signal, we immediately fetch the time from the earthquake instrument, add 1 second to this time value and at the same time reset all sub-second time values to 0. After waiting once again for the next square wave signal output from the No.52 pin, after the arrival of the square wave signal, we immediately set this time value into the instrument. In this way, the time value can be very well modified.

4 CONCLUSIONS

At present, the coverage of the BeiDou Navigation System is only limited to the Chinese mainland. Xinjiang is located near the northwest border of China, thus in the Xinjiang Uygur Autonomous Region, when there is a blockade in the southeast, the system will not be able to receive signals and will receive signals from only a few BeiDou satellites. To ensure the availability of the system, when designing the timing system for earthquake instruments based on the BeiDou satellite, we select the navigation chip UM220-Ⅲ integrated with BeiDou and the GPS system. Using this chip, we can still use the GPS system to obtain precise time outside the area covered by the BeiDou system. This scheme helps to solve not only the problem of limited coverage of the BeiDou system, but also the security performance of GPS in times of war, blockade or interference.

This paper has been published in Chinese in the journal of Inland Earthquake, Volume 29, Number 3, 2015.

REFERENCES
Blum R. , Bresnahan C. Linux Command Line and Shell Scripting Bible [M]. (Wu H. F. , trans. (2nd ed. )) Beijing: Posts & Telecom Press, 2012. 324-330.
Microchip Technology Inc. PIC18FXX20 Data Sheet [EB/OL]. (2003)[2015-08-25] http://kazus.ru/nuke/pic/39580a.pdf.
UNICORECOMM. UM220-III N User Manual [EB/OL]. (2013-07-01)[2015-08-25]http://www.unicorecomm.com/files/PDF/Ch/NPL/UM220-III%20N_UserManual_Rel_Ed1.55.pdf.
基于北斗卫星的多用途授时仪的研制
杨峰, 丁新娟, 李晓东, 李金香     
新疆维吾尔自治区地震局, 新疆 乌鲁木齐 830011
摘要:随着地震行业数据服务器和仪器设备对时钟源精度要求越来越高,开发一款多用途授时系统的需求在地震行业内显得非常迫切,为此我们根据地震行业的实际情况,研制了一套适应地震行业信息节点规划的低成本授时设备,这套授时设备能对不同环境下、不同地震仪器的不同精度的授时需求提供一个统一的解决方案。
关键词卫星导航系统    北斗导航系统    时钟源    地震仪器设备    授时服务