Clock generating device and method suitable for node seismograph
By using a combination of crystal oscillator, GPS module and microcontroller in the node seismometer, and using GPS second pulses to correct the crystal oscillator signal, the problems of unstable accuracy and high power consumption of traditional clock signals are solved, and high-precision, low-power clock generation is achieved. , significantly improving the accuracy of data collection and processing.
Patent Information
- Application Number
- CN201910041057.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-16
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-01-16
AI Technical Summary
The accuracy of the clock signal of traditional node seismometers is unstable over a long period of time, resulting in out-of-synchronization in data collection. The high power consumption of constant-temperature crystal oscillators reduces battery life and is not conducive to field use.
A clock generation device including a crystal oscillator, a GPS module and a microcontroller is used, the GPS second pulse is used to measure the frequency deviation of the crystal oscillator, and the clock signal is corrected by adjusting the input voltage of the crystal oscillator through the microcontroller to achieve high accuracy and low power consumption of the clock signal.
It significantly reduces the power consumption of node seismometers, improves the accuracy of data acquisition and subsequent data processing, extends battery life, and reduces synchronization errors.
Smart Images

Figure CN109557577B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geophysical exploration technology, and in particular to a clock generating device and method suitable for a node seismograph. Background Art
[0002] Seismographs are the most commonly used instruments in geophysical exploration, but traditional seismographs are almost always connected to various acquisition units through long cables. These copper cables are very heavy and bulky, which is time-consuming, labor-intensive and inconvenient during field construction.
[0003] In this case, cableless seismographs have become a better alternative. Such cableless seismographs are also called node seismographs. Each acquisition unit is an independent node. While the equipment is more portable, it also brings difficulties in synchronous acquisition of multiple nodes in a large area. In addition, such seismographs need to continuously acquire data for a long time, which requires the clock signal to have the characteristics of long-term high precision, otherwise the data collected by each station will be out of sync.
[0004] The clock signal is generated by a crystal oscillator. The stability of the crystal oscillator frequency is mainly affected by temperature. Therefore, the oven-controlled crystal oscillator (OCXO) can maintain high precision for a long time. However, the power consumption of the oven-controlled crystal oscillator (500-1000 milliwatts) is too large compared to the acquisition system of only 100 to 200 milliwatts. It will greatly reduce the battery life when used in the field. In addition, it is expensive, which is not conducive to mass production.
[0005] Some literatures mention the use of the Global Positioning System (GPS) signal to calibrate a short-time high-precision crystal oscillator. The principle of this method is to use the GPS signal without cumulative error for a long time to count the number of high-precision crystal pulses, and then dynamically adjust the output frequency by changing the frequency division coefficient in real time through the Field-Programmable Gate Array (FPGA), thereby compensating for the long-term frequency drift and initial frequency deviation of the crystal oscillator. However, this method is not suitable for node seismometers, because FPGA chips are not required in node seismometers. In order to realize the clock correction system, an additional FPGA system is required, which is not conducive to the improvement of integration and the control of power consumption. Summary of the invention
[0006] The object of the present invention is to provide a clock generating device and method suitable for a node seismograph, so as to reduce the power consumption of the seismic instrument.
[0007] To achieve the above objectives, the present invention adopts a clock generating device suitable for a node seismograph, comprising: a crystal oscillator, a GPS module and a single-chip microcomputer;
[0008] The output interface of the GPS module is connected to the general input and output interface of the single-chip microcomputer, the voltage output pin of the single-chip microcomputer is connected to the voltage control pin of the crystal oscillator, the clock signal output pin of the crystal oscillator is connected to the input interface of the single-chip microcomputer, and the clock signal output pin of the crystal oscillator synchronously outputs the corrected clock signal to the acquisition unit.
[0009] Preferably, the single-chip microcomputer is integrated with a digital-to-analog converter, an output pin of the single-chip microcomputer is configured as an output pin of the digital-to-analog converter, and the output pin of the digital-to-analog converter is connected to a voltage control pin of the crystal oscillator.
[0010] Preferably, the single chip microcomputer is integrated with a counter for counting the time intervals between adjacent second pulse signals.
[0011] Preferably, the counter comprises a first counter and a second counter, and the first counter and the second counter are cascaded.
[0012] Preferably, the general input and output interface of the single-chip microcomputer is an interrupt pin.
[0013] Preferably, the acquisition unit is an analog-to-digital converter, and the output pin of the analog-to-digital converter is connected to the SPI interface of the single-chip microcomputer via a serial peripheral interface.
[0014] Preferably, the secure data input and output interface of the single chip microcomputer is connected to a data storage card.
[0015] Preferably, the crystal oscillator is a voltage-controlled temperature compensated crystal oscillator.
[0016] On the other hand, a clock generation method applicable to a node seismograph is provided, which is used to correct a clock signal input by each acquisition unit of the node seismograph, comprising:
[0017] The average value of the clock frequency signal of the crystal oscillator to be calibrated within n consecutive seconds is taken as the average count value;
[0018] Process the average count value and the set standard count value to calculate the real-time frequency deviation of the crystal oscillator;
[0019] Based on the set frequency deviation adjustment amplitude, the input voltage of the crystal oscillator is adjusted using the real-time frequency deviation to correct the clock signal output by the crystal oscillator.
[0020] Preferably, it also includes:
[0021] The average count value is updated periodically using the average value of the clock frequency signal of the crystal oscillator to be calibrated within n seconds before the current moment.
[0022] Compared with the prior art, the present invention has the following technical effects: the present invention uses the crystal oscillator to achieve high-precision clock signals in a short period of time, but there is a cumulative deviation in a long period of time; the GPS module's second pulse has low short-term stability but no cumulative error in a long period of time. Therefore, the GPS second pulse is used to measure the actual frequency of the crystal oscillator, calculate its deviation from the nominal frequency, and then use the deviation to adjust the control voltage of the crystal oscillator in direct proportion to fine-tune the output frequency of the crystal oscillator's clock signal.
[0023] Compared with the traditional node-type seismograph method of adding FPGA to dynamically adjust the frequency division coefficient of the crystal oscillator to tune its frequency, the solution proposed by the present invention can reduce the power consumption of the entire instrument to less than half. Compared with the node-type seismograph without crystal oscillator frequency correction, the aging index can be greatly improved, so that the synchronization error can be significantly reduced during long-term acquisition, thereby improving the accuracy of data acquisition and the accuracy of subsequent data processing profile inversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings:
[0025] Figure 1 It is a structural schematic diagram of a clock generating device suitable for a node seismograph;
[0026] Figure 2 is a schematic diagram of a clock generating device suitable for a node seismograph;
[0027] Figure 3 The invention is a flow chart of a clock generation method suitable for a node seismograph. DETAILED DESCRIPTION
[0028] In order to further illustrate the features of the present invention, please refer to the following detailed description and drawings of the present invention. The drawings are for reference and illustration only and are not intended to limit the scope of protection of the present invention.
[0029] like Figure 1 As shown, this embodiment discloses a clock generating device suitable for a node seismograph, including: a crystal oscillator 10, a GPS module 20 and a single-chip microcomputer 30; the output interface of the GPS module 20 is connected to the general input and output interface of the single-chip microcomputer 30, the voltage output pin of the single-chip microcomputer 30 is connected to the voltage control pin of the crystal oscillator 10, the clock signal output pin of the crystal oscillator 10 is connected to the input interface of the single-chip microcomputer 30, and the clock signal output pin of the crystal oscillator 10 synchronously outputs the corrected clock signal to the acquisition unit.
[0030] Among them: since multiple wireless nodes need to be synchronized and the distance between the nodes may be very far, the system achieves synchronization between each node device by adding a GPS module 20. Although the short-term stability of the second pulse of the GPS module 20 is not high, there is no cumulative error for a long time; at the same time, the device also needs to maintain a high-precision clock in a short time. The system achieves high precision in a short time by adding a crystal oscillator 10. The crystal oscillator has high precision in a short time, but there is a cumulative error for a long time.
[0031] In this embodiment, the GPS module 20 generates a pulse per second (PPS) within a period of time after power-on, which is the number of pulses per second; in GPS, the GPS pulse per second signal PPS is one per second. The counter 31 in the single-chip computer 30 uses the crystal oscillator 10 to be calibrated as the clock source, and uses the GPS pulse per second to measure the actual frequency of the crystal oscillator 10 within a period of time. The current real-time frequency deviation value of the crystal oscillator 10 is obtained by using the actual frequency and the standard frequency of the crystal oscillator 10 frequency, and then the real-time frequency deviation value is used to tune the crystal oscillator 10, and the clock signal output by the crystal oscillator 10 is corrected, and the corrected clock signal is output to the acquisition unit of the seismograph.
[0032] It should be noted that the function of the GPS second pulse signal is to indicate the moment of the whole second, which is usually marked by the rising edge of the PPS second pulse. GPS can give the Coordinated Universal Time (UTC), and there will be a delay when the user receives it. In order to accurately synchronize time, the rising edge of the PPS signal is introduced to mark the whole second of UTC, which has a high accuracy of nanoseconds and no cumulative error. Therefore, in this embodiment, the general input and output interface (GPIO) of the single-chip microcomputer 30 is configured as an interrupt pin. Every time the rising edge of the PPS arrives, it will enter the interrupt processing, and in this process, the current value of the counter 31 is recorded and the counter 31 (TIMER) is reset and restarted. The counter 31 uses the crystal oscillator 10 to be calibrated as the clock source to count the intervals between adjacent second pulses. After continuous recording for a period of time, the average value of the counts in this period of time is used as the clock signal frequency of this period of time.
[0033] Preferably, if the counter 31 integrated on the single-chip microcomputer 30 is 16 bits, and the count of the clock in 1 second obviously exceeds 65536, the counter 31 integrated on the single-chip microcomputer 30 in this embodiment includes a first counter and a second counter, and the first counter and the second counter are cascaded. Among them: the first counter is configured to use the external clock to be calibrated as the clock source, and its working mode is configured to count up. When its count reaches 65536, an overflow event will be generated, and the count value will be automatically reset to 0. This internal event is used as the clock of the second counter, so that a 32-bit counter can be realized to meet the counting requirements.
[0034] Preferably, the single-chip microcomputer 30 is integrated with a digital-to-analog converter 32 (DAC), and an output pin of the single-chip microcomputer 30 is configured as an output pin of the digital-to-analog converter 32, and the output pin of the digital-to-analog converter 32 is connected to the voltage control pin of the crystal oscillator 10. In this embodiment, the single-chip microcomputer 30 converts the corrected voltage value into a 12-bit DAC register value and writes it to be output to the voltage control pin of the crystal oscillator 10.
[0035] It should be noted that the working principle of the clock generating device is:
[0036] The counter uses the crystal oscillator 10 to be calibrated as the clock source to count the intervals between adjacent second pulses. After recording continuously for n seconds (for example, 60 seconds), the average value of the n-second counts is taken as the frequency of this period of time. This average count value is compared with its standard count value. For example, if the frequency of the crystal oscillator 10 is 19.2MHz, then its standard count value within a 1-second interval is 19200000, and the current real-time frequency deviation (in parts per million, ppm) is the count value minus 19200000 and then divided by 19.2. The crystal oscillator 10 is then tuned according to this frequency deviation. Assuming that the crystal oscillator 10 used in this embodiment is a voltage-controlled temperature-compensated crystal oscillator 10VCTCXO, model LFTVXO076344, then its frequency deviation adjustment amplitude is +7ppm / V, which means that for every 1V increase in voltage above the 1.5V standard input on its voltage control pin, its frequency will increase by 7ppm (seven millionths). At this time, the voltage that needs to be added to the voltage control pin is 1.5V minus the real-time frequency deviation divided by 7. For example, if the real-time frequency deviation is -0.7ppm at a certain moment, the control voltage should be 1.6V.
[0037] Specifically, the microcontroller model 30 can use STM32F415RGT6, which has an integrated DAC module, so this control voltage is also generated by the MCU, without adding extra cost and power consumption. Since the reference voltage of the DAC module is +3.3V, and the DAC module is 12 bits, the output voltage of the DAC is the value of the DAC data register divided by 4096 and then multiplied by 3.3V, that is, the output voltage is between 0 and 3.3V, which can meet the 0.5V to 2.5V adjustment range required by the VCTCXO.
[0038] Preferably, the acquisition unit connected to the clock signal output pin of the crystal oscillator 10 is an analog-to-digital converter 40 (ADC), the output pin of the analog-to-digital converter 40 is connected to the SPI interface of the single-chip microcomputer 30 via a serial peripheral interface, and the secure data input and output interface of the single-chip microcomputer 30 is connected to a data storage card 50. Among them: the single-chip microcomputer 30 signal reads the ADC data through the serial peripheral interface SPI and writes the data storage card SD card through the secure data input and output interface SDIO after accumulating a certain amount of data; the single-chip microcomputer 30 fine-tunes the real-time frequency of the crystal oscillator 10 by adjusting the output voltage of the DAC, and the clock signal output pin of the crystal oscillator 10 outputs the corrected clock signal to the analog-to-digital converter 40 (ADC).
[0039] like Figure 2 As shown, in this embodiment: the GPS module 20 model is RXM-GPS-FM. On the one hand, its PPS output is connected to the PC12 pin of the MCU as an interrupt line, and an interrupt is generated every second during normal operation; on the other hand, it is connected to the UART3 of the MCU through the UART (Universal Asynchronous Receiver and Transmitter) interface, and the MCU parses the current UTC time and other information from it to achieve synchronization of multiple seismographs. The model of the MCU is STM32F415RGT6, which has an integrated DAC module inside, and its PA4 pin is configured as a DAC output pin connected to the voltage control pin of the VCTCXO. The main acquisition chip ADC uses ADS1282, which is connected to the SPI1 interface of the MCU through a 3-wire SPI. In addition, its data ready signal DRDY is connected to the PB1 pin of the MCU as an interrupt line. Every time the ADC data is converted, an interrupt will be generated to notify the MCU to fetch data. The MCU also needs to be connected to a micro SD card through the SDIO interface to store the acquisition data of the seismograph.
[0040] It should be noted that this embodiment realizes the long-term acquisition requirements of the node-type seismograph by using several main chips such as GPS module 20, crystal oscillator, single-chip microcomputer 30, etc., eliminating the conventional practice of using FPGA chip to change the frequency division coefficient to compensate for the crystal oscillator drift, and reducing the power consumption of the entire instrument to less than half. At the same time, compared with the node-type seismograph without crystal oscillator frequency correction, the aging index can be greatly improved. During the long-term acquisition process, the synchronization error can be significantly reduced, and the data acquisition accuracy and the accuracy of subsequent data processing profile inversion can be improved. Taking the crystal oscillator of this system using VCTCXO as an example, the aging index can be reduced from plus or minus 20 ppb (one billionth) per day to 0.2 ppb using this method.
[0041] like Figure 3 As shown, this embodiment discloses a clock generation method applicable to a node seismograph, comprising the following steps S1 to S3:
[0042] S1, taking the average value of the clock frequency signal of the crystal oscillator to be calibrated within n seconds as the average count value;
[0043] For example: record the real counts for 60 seconds continuously and take the average value as the real average frequency of the clock source during this period.
[0044] S2, processing the average count value and the set standard count value to calculate the real-time frequency deviation of the crystal oscillator;
[0045] It should be noted that the standard count value is the frequency parameter of the crystal oscillator itself. For example, if the crystal oscillator frequency is 19.2MHz, then the standard count value within a 1-second interval is 19200000. The current real-time frequency deviation (in parts per million, ppm) is the count value minus 19200000 divided by 19.2.
[0046] S3. Based on the set frequency deviation adjustment amplitude, the input voltage of the crystal oscillator is adjusted using the real-time frequency deviation to correct the clock signal output by the crystal oscillator.
[0047] It should be noted that the frequency deviation adjustment amplitude is set according to the model of the crystal oscillator. For example, the VCTCXO model is LFTVXO076344, and its frequency deviation adjustment amplitude is +7ppm / V. This means that for every 1V increase in voltage above the 1.5V standard input on its voltage control pin, the frequency will increase by 7ppm (seven millionths). Therefore, the voltage that needs to be added to the voltage control pin at this time is 1.5V minus the real-time frequency deviation divided by 7. For example, if the real-time frequency deviation is -0.7ppm at a certain moment, the control voltage should be 1.6V.
[0048] The method is specifically described in conjunction with the clock generating device applicable to the node seismograph in the above embodiment:
[0049] (1) Use CubeMX, a quick engineering tool for the STM32 platform, to graphically generate the basic code framework, which includes selecting the type of peripherals actually connected, specifying the input clock frequency, configuring the MCU internal clock tree, and configuring the corresponding GPIO pin functions.
[0050] (2) After the project is established, first configure the counter during the initialization process. The specific implementation is as follows: Since the internal counters of STM32 are all 16 bits, and the clock count within 1 second obviously exceeds 65536, two counters need to be cascaded to achieve it. Configure counter 1 to use the external clock to be calibrated as the clock source, and configure its working mode to count up. When its count reaches 65536, an overflow event will be generated, and the count value will automatically reset to 0. Use this internal event as the clock of counter 2, so that a 32-bit counter can be implemented. Rewrite the callback function HAL_GPIO_EXTI_Callback in the GPIO interrupt processing function
[0051] (3) Determine whether the interrupt source is PC12. If not, proceed to other processing;
[0052] (4) If the interrupt source is PC12, read the current value registers of counter 1 and counter 2 respectively, take the 16-bit value of counter 2 as the high 16 bits, and the 16-bit value of counter 1 as the low 16 bits, and splice them into a 32-bit data. This data is the actual count of the clock source within 1 second. After reading, reset these two registers and start counting up again;
[0053] (5) Record the real counts for 60 seconds continuously and take the average value as the real average frequency of the clock source during this period. Then calculate the difference ratio between this average frequency and the nominal frequency (in ppm), and then calculate the voltage value that needs to be corrected based on the voltage adjustment coefficient of the VCTCXO;
[0054] (6) Convert the corrected voltage value into a 12-bit DAC register value and write it to the voltage control pin of the crystal oscillator.
[0055] Preferably, it also includes:
[0056] The average count value is updated periodically using the average value of the clock frequency signal of the crystal oscillator to be calibrated within n seconds before the current moment.
[0057] It should be noted that the average frequency is updated every second thereafter, and the difference between the real-time frequency and the nominal frequency is updated each time the second pulse interrupt processing function is entered. For example, the average count of the last n seconds is used, and this average count value is compared with its standard count value, and then the voltage value to be corrected is updated.
[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A clock generating device suitable for a node seismograph, characterized in that: include: Crystal oscillator, GPS module and microcontroller; The output interface of the GPS module is connected to the general input and output interface of the single-chip microcomputer, the voltage output pin of the single-chip microcomputer is connected to the voltage control pin of the crystal oscillator, the clock signal output pin of the crystal oscillator is connected to the input interface of the single-chip microcomputer, and the clock signal output pin of the crystal oscillator synchronously outputs the corrected clock signal to the acquisition unit; The PPS output of the GPS module is connected to the PC12 pin of the microcontroller as an interrupt line, which generates an interrupt once per second during normal operation. The GPS module is connected to the UART3 pin of the microcontroller through the UART interface, and the microcontroller parses the current UTC time information to achieve synchronization of multiple seismographs. The DAC module is integrated inside the single-chip microcomputer. The PA4 pin of the single-chip microcomputer is configured as the DAC output pin connected to the voltage control pin of the VCTCXO. The main acquisition chip ADC is connected to the SPI1 interface of the single-chip microcomputer through a 3-wire SPI. The data ready signal DRDY of the main acquisition chip ADC is connected to the PB1 pin of the single-chip microcomputer as an interrupt line. The main acquisition chip ADC generates an interrupt to notify the single-chip microcomputer to fetch data every time the data is converted. The microcontroller is connected to a micro SD card via an SDIO interface, and the micro SD card is used to store the collected data of the seismograph; The counter in the single-chip microcomputer uses the crystal oscillator to be calibrated as the clock source, uses the GPS second pulse to measure the actual frequency of the crystal oscillator, and compares the actual frequency with the nominal frequency of the crystal oscillator to obtain the current real-time frequency deviation value of the crystal oscillator. The real-time frequency deviation value is used to tune the crystal oscillator to correct the clock signal output by the crystal oscillator. The corrected clock signal is output to the acquisition unit of the seismograph.
2. The clock generating device for a node seismograph according to claim 1, characterized in that: The single-chip microcomputer is integrated with a digital-to-analog converter, an output pin of the single-chip microcomputer is configured as an output pin of the digital-to-analog converter, and the output pin of the digital-to-analog converter is connected to the voltage control pin of the crystal oscillator.
3. The clock generating device for a node seismograph according to claim 1 or 2, characterized in that: The single chip microcomputer is integrated with a counter for counting the intervals between adjacent second pulses using the crystal oscillator to be calibrated as a clock source.
4. The clock generating device for a node seismograph according to claim 3, characterized in that: The counter includes a first counter and a second counter, and the first counter and the second counter are cascaded.
5. The clock generating device for a node seismograph according to claim 1, characterized in that: The general input and output interface of the single chip microcomputer is an interrupt pin.
6. The clock generating device for a node seismograph according to claim 1 or 2, characterized in that: The acquisition unit is an analog-to-digital converter, and the output pin of the analog-to-digital converter is connected to the SPI interface of the single-chip microcomputer via a serial peripheral interface.
7. The clock generating device for a node seismograph according to claim 1, characterized in that: The safety data input and output interface of the single chip microcomputer is connected with a data storage card.
8. The clock generating device for a node seismograph according to claim 1, characterized in that: The crystal oscillator is a voltage-controlled temperature-compensated crystal oscillator.
9. A clock generation method suitable for a node seismograph, characterized in that: It is used to correct the clock signal input by each acquisition unit of the node-type seismograph using the clock generating device applicable to the node-type seismograph as claimed in any one of claims 1 to 8, comprising: The average value of the clock frequency signal of the crystal oscillator to be calibrated within n consecutive seconds is taken as the average count value; Process the average count value and the set standard count value to calculate the real-time frequency deviation of the crystal oscillator; Based on the set frequency deviation adjustment amplitude, the input voltage of the crystal oscillator is adjusted using the real-time frequency deviation to correct the clock signal output by the crystal oscillator.
10. The clock generation method applicable to a node seismograph according to claim 9, characterized in that: Also includes: The average count value is updated periodically using the average value of the clock frequency signal of the crystal oscillator to be calibrated within n seconds before the current moment.
