Method for measuring carrier frequency in digital oscilloscope in real time
Through the method of matching the FFT and curve fitting of parallel flow lines, the problem of difficulty in achieving high -speed and high -precision frequency measurement in existing technology has been solved, and the high -efficiency frequency measurement of high sampling rate signals is realized, and the measurement accuracy and resolution are improved.
Patent Information
- Application Number
- CN202411507626.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-24
AI Technical Summary
It is difficult for the prior art to achieve high-speed and high-precision frequency measurements, especially in the environment of high sampling rate signals, and traditional frequency measurement methods cannot effectively process high-frequency and broadband signals.
Using parallel pipeline FFT and supplemented by curve fitting method, high-speed frequency real-time measurement is achieved. The signal is collected through the acquisition system of the oscilloscope, and the parallel multi-channel sampling data is split and parallel-to-serial processing is performed. Finally, the FFT transform is performed in the parallel pipeline FFT unit to obtain the spectrum data, and the main frequency point is found through parabolic fitting.
Real-time measurement of high-speed frequencies is achieved, the accuracy and resolution of frequency measurement are improved, noise interference is reduced, and high sampling rate signals can be effectively processed.
Smart Images

Figure CN119355363A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of frequency measurement, and more specifically, relates to a real-time measurement method for carrier frequency in a digital oscilloscope. Background Art
[0002] Frequency measurement is a crucial technology in modern engineering, and is widely used in many fields such as communications, electronics, electricity, aerospace, and automation. Accurate frequency measurement is crucial to the performance, stability, and reliability of the system. For oscilloscopes, frequency measurement is also one of the indispensable functions. High-speed and high-precision frequency measurement functions are essential for oscilloscopes to monitor and detect changes in the spectrum of the measured signal.
[0003] With the rapid development of digital acquisition technology, the sampling rate of digital signals has reached tens of gigabits per second (GSPS). To monitor the frequency of high sampling rate signals in real time, it is necessary to seamlessly process the continuous data stream, which is undoubtedly a huge challenge for the frequency measurement unit. Therefore, it is urgent and necessary to design a high-speed frequency measurement system.
[0004] For single and periodic signals, common frequency measurement methods include direct counting method, interval measurement method and phase comparison method. The above methods are based on direct analog measurement in the time domain, and their shortcomings are also obvious. When the frequency of the measured signal is high and the bandwidth is large, these methods cannot be implemented.
[0005] Discrete Fourier transform is one of the most basic theoretical algorithms in the frequency domain. The most widely used method for calculating DFT is fast Fourier transform. By Fourier transforming a sampling sequence of a certain length of a signal, a more detailed spectrum can be drawn and the main frequency of the measured signal can be intuitively seen. However, due to the high computational complexity of FFT and the large time cost required, the traditional Fourier transform can no longer complete the task of real-time frequency measurement at a time when signal sampling speeds are getting faster and faster and the real-time requirements for signal analysis are getting higher and higher.
[0006] In addition, analysis methods that jointly analyze the time domain and frequency domain, such as short-time Fourier transform and wavelet transform, also play an important role in observing the time-frequency domain information of the measured signal and extracting the time-frequency domain features. However, in terms of pure frequency measurement, their calculation speed and frequency accuracy are not as good as the frequency domain measurement method, so they are not suitable for high-speed frequency measurement. Summary of the invention
[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a real-time measurement method for carrier frequency in a digital oscilloscope, which is based on parallel pipeline FFT and assisted by curve fitting to achieve high-speed real-time frequency measurement, while greatly improving the accuracy of frequency measurement and avoiding noise interference to the greatest extent.
[0008] To achieve the above-mentioned object of the invention, the present invention provides a method for real-time measurement of carrier frequency in a digital oscilloscope, characterized in that it comprises the following steps:
[0009] (1) Set the oscilloscope measurement parameters;
[0010] (2) The measured signal is collected by the acquisition system of the oscilloscope to obtain parallel multi-channel sampling data, and then the parallel multi-channel sampling data is split and processed by a multi-stage splitter and a multi-stage parallel-to-serial module, and finally the FFT unit of the parallel pipeline is used to perform FFT transformation to finally obtain the spectrum data of each FFT unit;
[0011] (3) Find the main frequency point by parabola fitting;
[0012] (4) Filter the main frequency points and upload the filtered main frequency points to the host computer;
[0013] (5) The host computer draws a time-frequency trend graph based on the uploaded main frequency point, thereby obtaining the frequency of the measured signal.
[0014] The object of the invention of the present invention is achieved in this way:
[0015] The present invention discloses a real-time measurement method for carrier frequency in a digital oscilloscope. An input signal is input into the oscilloscope, and the sampled data is subjected to FFT transformation in a parallel FFT unit after passing through a multi-stage parallel-to-serial conversion module, so as to obtain spectrum data of each FFT unit; then, a main frequency point is found by a parabola fitting method, and the main frequency point meeting the requirements is screened out and uploaded to a host computer; finally, a time-frequency trend diagram is drawn by the host computer, so as to obtain the frequency of the measured signal.
[0016] At the same time, the real-time carrier frequency measurement method in a digital oscilloscope of the present invention also has the following beneficial effects:
[0017] (1) The parallel FFT architecture greatly improves the measurement frequency and achieves frequency measurement with zero dead time.
[0018] (2) By introducing the accurate point finding method of curve fitting, the resolution of frequency measurement is greatly improved, and the mode extraction function is added to reduce the interference of noise points; BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of a method for real-time measurement of carrier frequency in a digital oscilloscope of the present invention;
[0020] Figure 2 is a schematic diagram of the signal under test;
[0021] Figure 3It is a flow chart of the measured signal sampling, branching, parallel-to-serial conversion and FFT transformation;
[0022] Figure 4 It is a schematic diagram of the curve after parabola fitting;
[0023] Figure 5 It is a schematic diagram of the random distribution of main frequency points within the full bandwidth;
[0024] Figure 6 It is a time-frequency trend graph. DETAILED DESCRIPTION
[0025] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0026] Example
[0027] Figure 1 The present invention discloses a flow chart of a method for real-time measurement of carrier frequency in a digital oscilloscope.
[0028] In this embodiment, if Figure 1 As shown, the present invention provides a real-time measurement method of carrier frequency in a digital oscilloscope, comprising the following steps:
[0029] (1) Set the oscilloscope measurement parameters, including amplitude range, time base range, analysis length, FFT length, signal synchronization delay, and window function type;
[0030] Amplitude range: The amplitude display interval of the measured signal occupies about 6div;
[0031] Time base: set to real-time sampling mode;
[0032] Analysis length: Set the actual number of analysis points for the measured signal f s is the oscilloscope sampling rate, t c is the effective duration of the measured signal, and M is the number of parallel paths of the oscilloscope sampling data;
[0033] FFT length: the number of FFT calculation points N;
[0034] Signal synchronization delay: Set the delay of the external trigger signal to ensure that its edge does not overlap with the effective interval of the measured signal;
[0035] Window type: multiple options are available, depending on the input signal type, including Hanning window, Hamming window, rectangular window and Gaussian window;
[0036] (2) The measured signal is collected by the acquisition system of the oscilloscope to obtain parallel multi-channel sampling data, and then the parallel multi-channel sampling data is split and processed by a multi-stage splitter and a multi-stage parallel-to-serial module, and finally the FFT unit of the parallel pipeline is used to perform FFT transformation to finally obtain the spectrum data of each FFT unit;
[0037] In this embodiment, the multi-stage splitter includes two stages, wherein there is one primary splitter and P secondary splitters; the multi-stage parallel-to-serial module includes two stages, wherein there are P primary parallel-to-serial modules and P*R secondary parallel-to-serial modules; the primary splitter is connected to P primary parallel-to-serial modules, each primary parallel-to-serial module is connected to one secondary splitter, and each secondary splitter is connected to R secondary parallel-to-serial modules;
[0038] The number of cycles required for each parallel-to-serial conversion module to receive data Among them, f s is the sampling rate of the oscilloscope, t c is the maximum duration of the measured signal, and M is the number of parallel paths of the oscilloscope sampling data.
[0039] The parallel pipeline FFT unit includes L FFT units, L = P*R ≥ N*B / f w , the number of calculation points for each FFT unit Among them, f s is the sampling rate of the oscilloscope, f w is the operating frequency of the oscilloscope, B is the number of measurements per unit time of the oscilloscope, t c is the maximum duration of the measured signal.
[0040] In this embodiment, the oscilloscope sampling rate is f s =10GSPS, the oscilloscope operating frequency is f w =250MHz, the number of parallel sampling data paths is M=40, the maximum duration of the measured signal is t c It is 44ns, P=3, R=8, so the number of calculation points of a single FFT unit is 512, the number of FFT units is 24, and the number of cycles required for a single parallel-to-serial conversion module to receive data is 11;
[0041] Next, we describe the specific process of sampling, branching, parallel-to-serial conversion and FFT transformation of the measured signal to obtain spectrum data;
[0042] (2.1) Input the measured signal into the oscilloscope, sample the measured signal through the acquisition system in the oscilloscope, and obtain 40 channels of parallel sampling data;
[0043] In this embodiment, the measured signal is a modulated pulse signal, such as Figure 2As shown, the pulse repetition period is 45.5ns and the effective duration is 26-44ns, so the required measurement frequency is about 11MHz and its modulation frequency is 0.1-4GHz.
[0044] (2.2) Process the 40 parallel sampling data by dividing them into different channels and converting them into serial channels;
[0045] In this embodiment, as shown in 3, the front-end acquisition system transmits in the form of multiple parallel channels. First, it must be "divided". In order to avoid excessive fan-out, a two-stage splitter is used here. The output of the first-stage splitter is converted from 40 channels to 8 channels and then distributed to the subsequent 8-channel to 1-channel module by the second-stage splitter. The corresponding FFT unit immediately jumps to the operation mode after receiving the data, and the next data is sent to another FFT unit. This cycle repeats, and the data within the calculation time of one FFT unit is received by other FFT units in turn. When the calculation is completed, it continues to receive data. By reasonably selecting the number of calculation points of a single FFT unit and the number of FFT units, real-time data reception, real-time processing and real-time output can be achieved.
[0046] Next we combine Figure 3 , the specific processing process is described in detail as follows:
[0047] (2.2.1) The 40 parallel sampling data are first input to the first-level splitter, and the first-level splitter cyclically switches and outputs the 40 parallel sampling data to three first-level parallel-to-serial modules according to the rising edge of the external trigger signal;
[0048] (2.2.2) When the rising edge of the first cycle of the external trigger signal arrives, the first-stage splitter inputs the parallel 40-channel sampling data and the external trigger signal into the first-stage parallel-to-serial module 1, and converts the parallel 40-channel sampling data into parallel 8-channel data, and at the same time continues to transmit the external trigger signal to the first secondary splitter 1;
[0049] (2.2.3) When the 8-channel parallel data and the external trigger signal are input to the first secondary splitter 1, the first secondary splitter 1 cyclically switches the 8-channel parallel data and outputs them to the 8 secondary parallel-to-serial modules according to the rising edge of the external trigger signal;
[0050] (2.2.4) When the rising edge of the external trigger signal arrives, the parallel 8-channel sampling data is transmitted to the secondary parallel-to-serial module, which converts the parallel 8-channel data into serial data, and then inputs it into the connected FFT unit; the first second-stage splitter inputs the parallel 8-channel sampling data into the first secondary parallel-to-serial module 1-1 according to the rising edge of the external trigger signal, and then converts the parallel 8-channel data into serial data, and then inputs the serial data into the connected FFT unit 1-1;
[0051] (2.2.5) When the rising edge of the second cycle of the external trigger signal arrives, the first-stage splitter switches the 40 parallel sampling data and the external trigger signal to the second-stage parallel-to-serial module 2, and then processes them according to steps (2.2.2) to (2.2.4);
[0052] Then, by analogy, when the rising edge of the third cycle of the external trigger signal arrives, the first-stage splitter switches the 40 parallel sampling data and the external trigger signal to the third first-stage parallel-to-serial module 3, and then processes according to steps (2.2.2) to (2.2.4);
[0053] When the rising edge of the 4th cycle of the external trigger signal arrives, the first-level splitter cyclically switches the 40 parallel sampling data and the external trigger signal to the first first-level parallel-to-serial module 1 for processing, and then cyclically switches the 8 parallel data to the second second-level parallel-to-serial module 1-2 for processing through the first second-level splitter 1, and so on; when the rising edge of the 7th cycle of the external trigger signal arrives, the first-level splitter cyclically switches the 40 parallel sampling data and the external trigger signal to the first first-level parallel-to-serial module 1 for processing, and then cyclically switches the 8 parallel data to the third second-level parallel-to-serial module 1-3 for processing through the first second-level splitter 1, and so on, when the cyclic switching input is processed by the eighth second-level parallel-to-serial module 1-8, it is cyclically switched and input to the eighth second-level parallel-to-serial module 1-1 for processing;
[0054] (2.2.6) A single FFT unit performs FFT transformation on the input serial data to obtain the spectrum characteristics;
[0055] (3) Find the main frequency point by parabola fitting;
[0056] (3.1) Traverse the spectrum data output by each FFT unit, find the maximum amplitude in the spectrum, and the two values adjacent to the maximum amplitude, and then record the frequency points corresponding to these three amplitudes;
[0057] (3.2) According to the three frequency points and their corresponding amplitudes, parabola fitting is performed to obtain a smooth and continuous parabola curve, and then the frequency point corresponding to the maximum amplitude in the parabola curve is found as the main frequency point. The main frequency point found after processing the output spectrum of each FFT unit is recorded as f i , i=1,2,…,L;
[0058] In this embodiment, the calculation result of a single FFT unit represents the frequency information of this section of the sampling signal. In order to obtain the main frequency of this section of the signal, the frequency point with the largest amplitude in the FFT result is generally regarded as the main frequency point of the signal. However, due to spectrum leakage in the spectrum analysis process, the maximum amplitude point of the FFT calculation result cannot reflect the actual location of the main frequency, and its maximum error can reach a unit of frequency resolution. Based on the above explanation, this embodiment introduces a precise point finding method based on parabola fitting. The basic principle is: use the maximum amplitude point and its two adjacent points in the FFT calculation result to realize parabola fitting, and then find the horizontal coordinate of the maximum value of the fitted parabolic curve as the true main frequency.
[0059] Assume that the spectrum distribution of the measured signal conforms to Gaussian distribution. The spectrum representation is recorded as X(jw):
[0060]
[0061] The main frequency is denoted as w c , the adjacent spectrum points can be obtained as follows:
[0062]
[0063] The parabolic curve used to fit the spectral distribution is defined as:
[0064] y=a(wb) 2 +c
[0065] Substituting into the formula we get:
[0066]
[0067] According to the limit theorem:
[0068]
[0069] When there is only one spectral point, σ is a maximum value, so we can get:
[0070]
[0071] According to the above formula, the fitted curve can be obtained by extracting the maximum value and its adjacent points from the calculation result of an FFT unit, and substituting three points into the equation, as shown in Figure 4 As shown, the main frequency point is obtained.
[0072] (4) Screening the main frequency points;
[0073] In this embodiment, the main frequency point result obtained is as follows: Figure 5As shown, outliers are randomly distributed in the full bandwidth, and a phased pattern is swallowed up in the noise. How to filter out frequency points that meet the frequency domain characteristics from all the calculation results is mainly divided into two steps: one is to compare it with the set minimum frequency. If it is less than the minimum frequency, the point is discarded, otherwise it is retained; the second is to compare each frequency point with several adjacent frequency points. If the difference is too large, the point is discarded, otherwise it is retained; after the above two steps, the discrete points and noise points in the calculation results can be accurately removed, and the real frequency points are retained, thereby reflecting the frequency domain characteristics of the measured signal.
[0074] Below we describe the specific operation process of the two steps in detail:
[0075] (4.1) Set the minimum frequency value to 100MHz, the comparison length to 4, and the maximum difference to 12MHz;
[0076] (4.2), each main frequency point f i Compare with the lowest frequency value 100MHz in turn, and filter out the main frequency points that are less than the lowest frequency value;
[0077] (4.3) Traverse the main frequency points that are retained, and each main frequency point f i Subtract the frequency difference from the next four consecutive main frequency points to get four frequency difference values, then calculate the absolute value of the four frequency difference values, and then compare them with the maximum difference value 12MHz. If there is an absolute value greater than the maximum difference, it is considered that the main frequency point f i If there is an abnormality, it will be screened out, otherwise it will be retained, and the main frequency point finally retained will be uploaded to the host computer;
[0078] (5) The host computer draws a time-frequency trend graph according to the uploaded main frequency point, thereby obtaining the frequency of the measured signal; in this embodiment, after the above series of processing, the graph drawn by the frequency point that finally meets the requirements is obtained. Figure 6 The time-frequency trend diagram shown is used to characterize the real-time frequency of the measured signal, and its frequency resolution can be below 3MHz.
[0079] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A method for real-time measurement of carrier frequency in a digital oscilloscope, characterized in that: The following steps are involved: (1) Set the oscilloscope measurement parameters; (2) The measured signal is collected by the acquisition system of the oscilloscope to obtain parallel multi-channel sampling data, and then the parallel multi-channel sampling data is split and processed by a multi-stage splitter and a multi-stage parallel-to-serial module, and finally the FFT unit of the parallel pipeline is used to perform FFT transformation to finally obtain the spectrum data of each FFT unit; (3) Find the main frequency point by parabola fitting; (4) Filter the main frequency points and upload the filtered main frequency points to the host computer; (5) The host computer draws a time-frequency trend graph based on the uploaded main frequency point, thereby obtaining the frequency of the measured signal.
2. The method for real-time measurement of carrier frequency in a digital oscilloscope according to claim 1, characterized in that: The multi-stage splitter includes two stages, wherein there is one primary splitter and P secondary splitters; the multi-stage parallel-to-serial module includes two stages, wherein there are P primary parallel-to-serial modules and P*R secondary parallel-to-serial modules; the primary splitter is connected to P primary parallel-to-serial modules, each primary parallel-to-serial module is connected to a secondary splitter, and each secondary splitter is connected to R secondary parallel-to-serial modules; The number of cycles required for each parallel-to-serial conversion module to receive data Among them, f s is the sampling rate of the oscilloscope, t c is the maximum duration of the measured signal, and M is the number of parallel paths of the oscilloscope sampling data.
3. The method for real-time measurement of carrier frequency in a digital oscilloscope according to claim 1, characterized in that: The parallel pipeline FFT unit includes L FFT units, L = P*R ≥ N*B / f w , the number of calculation points for each FFT unit Among them, f s is the sampling rate of the oscilloscope, f w is the operating frequency of the oscilloscope, B is the number of measurements per unit time of the oscilloscope, t c is the maximum duration of the measured signal.
4. The method for real-time measurement of carrier frequency in a digital oscilloscope according to claim 1, characterized in that: In step (2), the specific process of sampling, branching, parallel-to-serial conversion and FFT transformation of the measured signal is as follows: (4.1) Input the measured signal into the oscilloscope, sample the measured signal through the acquisition system in the oscilloscope, and obtain M parallel sampling data; (4.2) splitting and converting parallel M sampling data into serial data; (4.2.1) The parallel M-channel sampling data is first input to the first-stage splitter, and the first-stage splitter cyclically switches and outputs the parallel M-channel sampling data to P first-stage parallel-to-serial modules according to the rising edge of the external trigger signal; (4.2.2) When the rising edge of the first cycle of the external trigger signal arrives, the first-stage splitter inputs the parallel M-channel sampling data and the external trigger signal into the first-stage parallel-to-serial module, and converts the parallel M-channel sampling data into parallel Q-channel data, and at the same time continues to pass the external trigger signal to the first secondary splitter; (4.2.3) When the parallel Q-channel data and the external trigger signal are input to the first secondary splitter, the first secondary splitter cyclically switches the parallel Q-channel data and outputs them to R secondary parallel-to-serial modules according to the rising edge of the external trigger signal; (4.2.4), the first second-stage splitter inputs the parallel Q-channel sampling data into the first second-stage parallel-to-serial module according to the rising edge of the external trigger signal, and then converts the parallel Q-channel data into serial data, and then inputs the serial data into the connected FFT unit; (4.2.5) When the rising edge of the second cycle of the external trigger signal arrives, the first-stage splitter switches the parallel M-channel sampling data and the external trigger signal to the second-stage parallel-to-serial module, and then processes them according to steps (4.2.2) to (4.2.4); Then, by analogy, when the rising edge of the Pth cycle of the external trigger signal arrives, the first-stage splitter switches the M parallel sampling data and the external trigger signal and inputs them to the Pth first-stage parallel-to-serial module, and then processes them according to steps (4.2.2) to (4.2.4); When the rising edge of the P+1th cycle of the external trigger signal arrives, the first-stage splitter cyclically switches the parallel M-channel sampling data and the external trigger signal to the first-stage parallel-to-serial module for processing, and then the first-stage splitter cyclically switches the parallel Q-channel data to the second-stage parallel-to-serial module for processing, and so on; (4.2.6) Each FFT unit performs FFT transformation on the input serial data to obtain spectrum data.
5. The method for real-time measurement of carrier frequency in a digital oscilloscope according to claim 1, characterized in that: The method of finding the main frequency point by the parabola fitting method is: (5.1) Traverse the spectrum data output by each FFT unit, find the peak point of the spectrum, and the two values adjacent to the peak point, and then record the frequency points corresponding to these three amplitudes; (5.2) According to the three frequency points and their corresponding amplitudes, parabola fitting is performed to obtain a smooth and continuous parabola curve. Then, the frequency point corresponding to the maximum amplitude in the parabola curve is found as the main frequency point. The main frequency point found after processing the output spectrum of each FFT unit is recorded as f i , i=1,2,…,L.
6. The method for real-time measurement of carrier frequency in a digital oscilloscope according to claim 1, characterized in that: The method for screening the main frequency point is: (6.1), set the minimum frequency value f min , compare the length X and the maximum difference D; (6.2), each main frequency point f i Sequentially with the lowest frequency value f min For comparison, filter out f i <f min The main frequency point; (6.3), traverse the retained main frequency points, and then use the main frequency point f i Respectively with the main frequency f i Then, the difference of X consecutive main frequency points is calculated to obtain X frequency difference values, and then the absolute value of X frequency difference values is calculated. j ,j=1,2,…,X, and then use each Δf j Compare with the maximum difference D respectively. If there is a Δf j If it is greater than the maximum difference D, then the main frequency point f i If there is any abnormality, it will be screened out; otherwise, it will be retained and the main frequency point finally retained will be uploaded to the host computer.
Citation Information
Patent Citations
Digital storage oscillograph with very high waveform capturing rate
CN101275973A
Method and system for triggering digital oscilloscope based on power spectrum entropy
CN106771456A
FFT (Fast Fourier Transformation) analyzer for digital oscilloscopes
CN108776264A
Bandwidth real-time spectrum analysis method and system for oscilloscope
CN116381336A
Cited By
Abnormality detection method based on time domain joint features
CN120352672A