Multi-cycle Fully Synchronous Frequency Measurement Technology Based on Single Chip Microcomputer

Publisher:BlossomJoyLatest update time:2012-01-16 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Frequency measurement is a common problem in electronic measurement. How to improve the accuracy of frequency measurement is the key. Commonly used methods include low-frequency end measurement, high-frequency end measurement, and multi-cycle synchronous frequency measurement. When using low-frequency end measurement, high-frequency end measurement, there is a large measurement error in the middle frequency, that is, the measurement dead zone problem. That is to say, no matter how high the low-end and high-end measurement accuracy is, the measurement error in the middle frequency is always the largest. Therefore, theoretically speaking, it is difficult to improve the measurement accuracy of frequency to a certain order of magnitude; the multi-cycle synchronous frequency measurement law does not have such a problem. As long as the number of cycles is large enough, the measurement accuracy can always be improved to a certain extent. However, multi-cycle synchronous measurement actually only synchronizes the measured signal, and does not synchronize the clock signal, so it is only a quasi-synchronization. Based on the principle of multi-cycle synchronous frequency measurement and measurement error, this paper proposes a new method of fully synchronous frequency measurement. Finally, a single-chip microcomputer is used to implement this measurement, which greatly improves the accuracy of the measured frequency.

1 Principle and error analysis of multi-cycle synchronous frequency measurement

Multi-cycle frequency measurement is to measure the frequency of a signal in multiple time periods of the signal on the basis of measuring the cycle. Since the measured signal controls the opening of the gate signal, it is called synchronous measurement. Since both frequency measurement and period measurement will produce ±1 error (caused by the asynchronous counting pulse and gate signal) and standard frequency error (caused by the instability of the crystal oscillator used), and the ±1 error is larger than the standard frequency error, multi-period synchronous frequency measurement is to minimize the measurement error. The measurement principle is shown in Figure 1.

The measured signal fx and the standard crystal oscillator signal f0 are used as the counting pulses of counters A and B respectively, and the synchronous gate signal is used as the gate control signal of the main gates A and B, while the synchronous gate signal is controlled by the measured signal fx and the time controller. The measured signal is used as the trigger signal of the synchronous gate, and the time controller controls the preset time Tˊ of the synchronous gate. When the measurement starts, the slightly delayed preset time is at a low electron or high electron in a certain cycle of the measured signal, and the synchronous gate has not yet been opened. At this time, neither the measured signal nor the crystal oscillator pulse signal will be counted. Only when the rising edge of the next cycle of the measured signal arrives, the synchronous gate will be opened (here it is assumed that the trigger is a rising edge trigger), and the measured signal and the crystal oscillator pulse signal will start counting. When the preset time of the time controller ends, the synchronous gate will not close immediately, but will wait until the next rising edge of the measured signal arrives before closing. At this time, both counters A and B stop counting, and in fact the opening time of the synchronous gate is T instead of Tˊ. So we can get:

Where: T is the synchronous gating time; fx (Tx) is the measured signal frequency (period); f0 (T0) is the standard crystal signal frequency (period); M is the count value of counter A; N is the count value of counter B.

According to the error transfer formula, the relative error of the measured signal frequency can be obtained :

Among them: △f0/f0 is the frequency accuracy of the standard crystal oscillator; △M/M is the relative counting error of counter A; △N/N is the relative counting error of counter B.

Since the counting of counter A is performed at the synchronous gate T related to the measured signal, the measured signal is used as the trigger signal of the synchronous gate, and T/Tx is an integer, there is no counting error in the count value M of the measured signal, that is, △M/M = 0. Therefore, this measurement method in which the measurement error is independent of the measured signal is called synchronous measurement. However, since the crystal oscillator signal is unrelated to the gate signal, gate B will inevitably produce a quantization error, so △N ±1. And N=T/T0=M Tx/T0, the larger the M, the larger the N, and the smaller the △N/N, so multi-cycle measurement can reduce the measurement error. It can be seen that this multi-cycle synchronous frequency measurement method can significantly improve the measurement accuracy compared with the simple frequency measurement method, and the measurement error is independent of the frequency of the measured signal, and the calculation of the intermediate frequency and the selection of the measurement mode can be omitted; but due to the existence of △N/N, and ︱△N/N︱ is also much larger than ︱△f0/f︱ (the frequency stability of the dual constant temperature crystal oscillator can reach 10-11~10-12 orders of magnitude), this measurement mode still cannot meet the needs of high-accuracy measurements requiring more than 10-7, and this measurement can only be called quasi-synchronous measurement.

2 Principle of multi-cycle fully synchronous frequency measurement

Fully synchronous measurement means that the gate signal is related to the measured signal and the standard crystal oscillator signal. At the beginning and end of the measurement, the gate signal is synchronized with the measured signal and the standard crystal oscillator signal, that is, the gate time is both an integer multiple of the measured signal period and an integer multiple of the crystal oscillator signal period. In this way, there is no quantization error between the measured signal and the standard crystal oscillator signal during the gate time, thereby achieving complete dual synchronization of the two signals. Here, the phase detection technology is cleverly used to control the synchronous trigger to achieve this. When two signals have the same phase at a certain point, and after a number of cycles, they have the same phase again at the same phase point, then during this period, both signals must have gone through an integer number of cycles (but the number of cycles is not necessarily the same). It is used as the synchronous gating time to control the opening of the two main gates. Neither counter will produce ±1 error, thus achieving true synchronous measurement. The measurement principle is shown in Figure 2.

After shaping, the measured signal and the crystal oscillator signal are added to the phase detector; when the phase detector detects that both signals are at a certain phase point (zero phase point), a trigger signal is generated, the gate circuit outputs a high level, the main gates A and B are opened at the same time, and the counters A and B count at the same time; after a period of time
, the phase detector detects that the two signals have reached the same phase point again, and a trigger signal is generated. At this time, the gate circuit outputs a low level, the main gates A and B are closed at the same time, and the counters A and B stop counting. Since the phase detector is triggered from the same zero phase point of the two signals, and another zero phase point is triggered again, the time interval between the two triggers is related to both signals and is an integer multiple of the cycle of each signal. As with the previous multi-cycle measurement, T=MTx=NT0, fx=M/Nf0, △fx/fx=△M/M-△N/N+△f0/f0. But at this time △M/M=0, △N/N=0, so △fx/fx=△f0/f0. That is, the frequency accuracy of the measured signal is equal to the frequency stability of the crystal oscillator. Theoretically, the frequency accuracy of the measured signal can reach 10-11~10-12 orders of magnitude, which is several orders of magnitude higher than the accuracy of the previous multi-cycle measurement. But in fact, due to the zero-crossing detection of the phase detector and the triggering of the gate circuit, errors will occur, and the actual measured frequency accuracy will be lower than the theoretical value. Moreover, this measurement also relies on sacrificing measurement time to improve measurement accuracy, so it is not suitable for fast measurement.

3 Implementation of multi-cycle fully synchronous frequency measurement in the single-chip microcomputer measurement system

The entire measurement system consists of a single-chip microcomputer, an analog circuit and a display circuit. The single-chip microcomputer mainly completes the timing, counting and calculation functions in the measurement system. At the beginning of the measurement, the measured signal and the crystal oscillator signal after shaping are sent to the phase detector. When they are both at the first zero phase point, the detector sends a high level to the single-chip microcomputer, and the two counters start counting at the same time. When the second zero phase point of the two signals arrives, the detector sends a low level to the single-chip microcomputer, and the counters stop counting. The two count values ​​are displayed on the display after calculation. The measurement principle block diagram is shown in Figure 3. The software flow chart is shown in Figure 4.

During the measurement process, a timer and two counters are used. The timer is controlled by the phase detector. When the phase detector detects that both signals are at zero phase, a trigger pulse is generated and the timer starts timing. When the phase detector detects that both signals are at zero phase again, a trigger pulse is generated and the timer stops timing. At the same time, the two counters count the measured signal and the crystal oscillator signal respectively during the timer timing, and send the count results to the operator for calculation (programmed by software). Finally, the display shows the measurement results. Due to the high measurement accuracy, the number of digits of the display should also be appropriately increased.

4 Practical application and analysis

According to the above design, this frequency measurement system was tested in three experiments: First, the frequency reference (4.43361875MHz) of the CCTV synchronization signal system was measured, and its frequency accuracy was higher than 5×10-12. The frequency stability of the double constant temperature crystal oscillator was 1×10-11. The last digit was changing during the measurement, and the frequency accuracy of the whole system reached 2×10-9; second, the frequency of a radar signal was measured, and its frequency was 8988.67436MHz, and the last digit had a change of 3 characters, and the frequency accuracy was 3×10-9; third, the crystal oscillator signal was measured by dividing the frequency by two and obtained 20.00000006MHz, and the last digit had a change of 3 characters, and the frequency accuracy was 3×10-10. From the measurement results, the whole measurement system cannot make the frequency measurement accuracy and the frequency stability of the crystal oscillator in the same order of magnitude, but there is a gap of nearly two orders of magnitude. This is mainly due to the trigger error caused by the phase detector trigger and the response error caused by the system response. However, the frequency measurement system is three orders of magnitude higher than the conventional multi-cycle synchronous measurement system (the frequency measurement accuracy can reach 10-6).

Through the analysis of the multi-cycle synchronous frequency measurement method, a design method for the multi-cycle fully synchronous frequency measurement method is proposed. Finally, this method is implemented with a single-chip microcomputer, which increases the frequency measurement accuracy from the original 10-6 order of magnitude to 10-9 order of magnitude. The circuit structure of the entire measurement system is relatively simple, and the software design is also very easy, which can be well applied.

Reference address:Multi-cycle Fully Synchronous Frequency Measurement Technology Based on Single Chip Microcomputer

Previous article:Getting Started with Deterministic Distributed I/O Systems
Next article:Temperature compensated linear wind energy meter

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号