CN114814358A - Frequency measurement system and method - Google Patents
Frequency measurement system and method Download PDFInfo
- Publication number
- CN114814358A CN114814358A CN202210733484.5A CN202210733484A CN114814358A CN 114814358 A CN114814358 A CN 114814358A CN 202210733484 A CN202210733484 A CN 202210733484A CN 114814358 A CN114814358 A CN 114814358A
- Authority
- CN
- China
- Prior art keywords
- module
- phase
- frequency
- signal
- counting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R23/00—Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
- G01R23/02—Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measuring Frequencies, Analyzing Spectra (AREA)
Abstract
The invention discloses a frequency measurement system and a frequency measurement method, which relate to the technical field of frequency measurement and comprise a reference signal generation module, a signal filtering module, a phase accumulation module, a phase detection module, a reference signal counting module, a frequency measurement value calculation module and a measurement period counting module. The invention can amplify the slight change of the frequency signal to be measured by directly accumulating the digital phases for a plurality of times through a direct digital phase accumulation algorithm, thereby improving the detection resolution, realizing the high-precision measurement of the signal frequency, solving the defect that the high-precision measurement is difficult to realize by the existing frequency measurement algorithm and shortening the frequency test conversion time. According to the invention, the phase zero crossing point is accurately detected through a phase detection algorithm, the detection of the small change of the signal frequency is realized, the test starting point and the test end point of the frequency signal to be detected are accurately identified, the accuracy of the signal frequency test is ensured, and the defect that the high-resolution measurement is difficult to realize by the existing frequency measurement algorithm is solved.
Description
Technical Field
The invention relates to the technical field of frequency measurement, in particular to a frequency measurement system and method.
Background
In the environment of aircraft with complex electromagnetic radiation and serious interference, such as: in an electronic equipment cabin of an airplane, a sensor converts physical quantity signals such as temperature, pressure and the like to be measured into corresponding frequency signals, a signal cable is used as a transmission medium, and the frequency signals are transmitted to airborne equipment. A central processing unit or a field programmable gate array chip (FPGA) in the airborne equipment measures frequency signals by using a frequency-digital conversion technology, converts the frequency signals into digital signals and realizes the measurement of physical quantity signals.
The frequency-digital conversion technology has the advantages of high measurement precision, strong anti-electromagnetic interference capability, convenience for long-distance transmission measurement, simple electrical interface and the like, and can simplify the structural design and reduce the cost when being used in the fields of measurement, control instruments and meters and the like. The core of the design of the frequency-to-digital conversion technology is a frequency measurement algorithm, and the current commonly used frequency measurement algorithm comprises: direct measurement frequency algorithm, indirect measurement frequency algorithm. The direct measurement frequency algorithm takes a self high-precision and high-stability frequency source in a measurement device as a reference counting signal, detects an upper jumping edge or a lower jumping edge of a measured signal, takes the jumping edge as a counter gating signal, and calculates the period and the frequency of the measured signal by counting the reference counting signal counting value in a plurality of periods of the measured signal. The indirect measurement frequency algorithm also takes a self frequency source in the measurement equipment as a reference counting signal, records the number of jumping edges of the measured signal in a specified time by detecting the counting value of the reference counting signal, and calculates the period and the frequency of the measured signal. Regardless of which algorithm is used, the current frequency measurement algorithms have the following disadvantages.
In engineering applications, if the number of frequency signals to be measured is large, multiple frequency measurement channels are usually used to convert and monitor the signals. Because the measurement requirements of the frequency measurement channels are different, a plurality of functional modules corresponding to different frequency reference counting signals and different length counting cycles need to be designed respectively. The frequency measurement algorithm is therefore complex, each functional module needs to be individually debugged, resulting in poor portability of the design.
Given the importance of frequency measurement in on-board signal measurement, the design typically requires that the accuracy of the frequency-to-digital conversion algorithm be at least on the order of parts per million (ppm). The current frequency measurement algorithm has larger error which is more than ten-thousandth of order, so that the precision index of the frequency measurement algorithm is difficult to meet the design requirement. To improve the measurement accuracy, it is generally necessary to reduce the measurement resolution or to extend the test time.
When part of measured physical quantity changes, the corresponding signal frequency change amplitude is extremely small, the frequency resolution of the existing frequency measurement algorithm is low, and the small frequency change is difficult to identify, so that the small change of the sensor signal cannot be identified in time in the use process, the interpretation of the pilot on the state of the airplane is influenced, the pilot takes wrong measures, and the safety of the airplane is influenced. Increasing the measurement resolution generally requires either a reduction in measurement accuracy or an increase in test time.
The critical system of the airplane part has strict requirements on the frequency-digital conversion completion time, and usually requires that the frequency measurement is completed within millisecond time to obtain an accurate frequency value. In engineering practice, therefore, to meet the time requirements, methods are usually adopted that sacrifice measurement accuracy in exchange for shorter measurement changeover times. The reduction in measurement accuracy often causes the onboard equipment to fail to operate properly because it cannot recognize signals near the critical frequency value.
At present, the conventional frequency measurement algorithm has the above disadvantages, so that in some application occasions with particularly strict requirements on frequency measurement accuracy, resolution and measurement speed, for example: aircraft atmospheric data systems, etc., cannot meet the requirements of such systems, affecting the application of frequency-to-digital conversion techniques. A frequency measurement algorithm with high accuracy and high resolution and taking into account measurement time is urgently to be realized.
Disclosure of Invention
Aiming at the defects in the prior art, the frequency measurement system and the method provided by the invention solve the problem that the existing frequency measurement precision and resolution cannot be considered at the same time.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
the frequency measurement system comprises a reference signal generation module, a signal filtering module, a phase accumulation module, a phase detection module, a reference signal counting module, a frequency measurement value calculation module and a measurement period counting module;
the reference signal generating module is used for providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module and driving each module to work according to time sequence by the jumping edge of the reference signals;
the signal filtering module is used for acquiring a frequency signal to be detected, performing burr filtering and time delay on the frequency signal to be detected, and generating a frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to the phase accumulating module after the frequency signal to be detected is stable;
the phase accumulation module is used for taking the jump edge of the input frequency signal as clock drive and accumulating preset phase values in sequence;
the phase detection module is used for detecting the accumulated phase value, acquiring the starting time of reference signal counting and controlling the reference signal counting module to start counting;
the reference signal counting module is used for counting the reference signals after receiving the starting counting signals of the phase detection module and outputting counting results to the frequency measurement value calculating module;
the frequency measurement value calculation module is used for calculating a frequency measurement value according to the received reference signal count value after the set measurement period is finished;
and the measurement period counting module is used for counting the measurement period, and outputting a signal for closing the frequency measurement corresponding function of each module when the counting value reaches the set measurement period.
Further, the reference signal generating module generates a stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generates the reference signal through an external high-precision frequency source signal of the FPGA by adopting a counting frequency division method.
Furthermore, the phase accumulation module adopts a direct digital phase accumulation algorithm to realize the accumulation of the phase value, continuously accumulates the phase value according to the jump edge of the input frequency signal to be measured until the overflow is reset to zero, and repeats the accumulation process until the set measurement period is reached.
There is provided a frequency measurement method, comprising the steps of:
s1, providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module through the reference signal generating module, and driving the modules to work according to time sequence by the jumping edge of the reference signals;
s2, acquiring a frequency signal to be measured through a signal filtering module, filtering burrs and delaying the frequency signal to be measured, and generating a frequency signal which has the same frequency as the frequency signal to be measured and has a fixed phase to a phase accumulation module after the frequency signal to be measured is stable;
s3, using the jump edge of the input frequency signal as a clock to drive through a phase accumulation module, and accumulating preset phase values in sequence to obtain a phase accumulation value;
s4, detecting the phase accumulated value through the phase detection module, acquiring the starting time of the reference signal counting, and controlling the reference signal counting module to start counting;
s5, after receiving the start counting signal of the phase detection module, the reference signal counting module counts the reference signal and outputs the counting result to the frequency measurement value calculating module;
s6, after the frequency measurement is completed in the set measurement period through the frequency measurement value calculation module, calculating the frequency measurement value according to the received reference signal count value;
and S7, counting the measuring period by the measuring period counting module, and outputting a signal for closing the frequency measuring corresponding function of each module when the counting value reaches the set measuring period to finish single frequency measurement.
Further, the specific method for providing the reference signal for the signal filtering module, the phase detecting module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module by the reference signal generating module in step S1 includes the following sub-steps:
s1-1, generating a stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generating the reference signal through an external high-precision frequency source signal of the FPGA by adopting a counting frequency division method;
and S1-2, providing a reference signal for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module.
Further, the specific method of step S2 includes the following sub-steps:
s2-1, circularly detecting the level of the input frequency signal to be detected through a state machine, and entering the step S2-2 when the level is high;
s2-2, waiting for 1 reference signal time, detecting the input frequency signal level to be detected again, and if the level is still high, entering the step S2-3; otherwise, judging that the burrs appear, and returning to the step S2-1;
s2-3, synchronously generating a high-level frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to a phase accumulation module;
s2-4, circularly detecting the level of the input frequency signal to be detected, and entering the step S2-5 when the level is low;
s2-5, waiting for 1 reference signal time, detecting the level of the input frequency signal to be detected again, and if the level is still low, entering the step S2-6; otherwise, judging that the burrs appear, and returning to the step S2-4;
s2-6, synchronously generating a low level frequency signal with the same frequency as the frequency signal to be measured and fixed phase to the phase accumulation module.
Further, the specific method of step S3 includes the following sub-steps:
s3-1, clearing the accumulated phase value and initializing a preset phase value;
and S3-2, at each jump edge of the input frequency signal to be detected, updating the phase accumulated value by adding a preset phase value and the current phase accumulated value, and sending the updated phase accumulated value to the phase detection module.
Further, the specific method of step S4 includes the following sub-steps:
s4-1, clearing the current phase accumulated value and the phase accumulated value variables;
s4-2, reading the phase accumulated value output by the phase accumulated module in each reference signal period, and simultaneously acquiring the phase accumulated value variable in the phase detection module;
s4-3, in each reference signal period, comparing the phase accumulated value with the phase accumulated value variable, and if the phase accumulated value is larger than the phase accumulated value variable and the counting of the reference signal counting module is not started, prohibiting the counting of the reference signal counting module; otherwise, the reference signal counting module is controlled to start counting, and the phase accumulated value is stored in the phase accumulated value variable.
Further, the specific method of step S6 includes the following sub-steps:
s6-1, selecting a set measuring cycle, and according to the formula:
S6-2, carrying out frequency measurement in a set measurement period to obtain a measurement period frequency measurement result;
s6-3, according to the formula:
obtaining a frequency measurement(ii) a WhereinIs a preset phase value;counting results of the reference signal counting module;is the reference signal.
Further, the specific method of step S7 includes the following sub-steps:
s7-1, reading a phase accumulated value output by the phase accumulated module and a phase accumulated value variable inside the phase detection module in each reference signal period;
s7-2, comparing the phase accumulated value with the phase accumulated value variable, if the phase accumulated value is smaller than the phase accumulated value variable, adding 1 to the counting value of the measuring period, and proceeding to the step S7-3; otherwise, returning to the step S7-1;
s7-3, judging whether the current measurement period count value is equal to the measurement period number set in advance, if so, outputting a signal for closing the frequency measurement corresponding function of each module, and completing single frequency measurement; otherwise, the process returns to step S7-1.
The invention has the beneficial effects that:
1. the invention can amplify the slight change of the frequency signal to be measured by directly accumulating the digital phases for a plurality of times through a direct digital phase accumulation algorithm, thereby improving the detection resolution, realizing the high-precision measurement of the signal frequency, solving the defect that the high-precision measurement is difficult to realize by the existing frequency measurement algorithm and shortening the frequency test conversion time. According to the invention, the phase zero crossing point is accurately detected through a phase detection algorithm, the detection of the small change of the signal frequency is realized, the test starting point and the test end point of the frequency signal to be detected are accurately identified, the accuracy of the signal frequency test is ensured, and the defect that the high-resolution measurement is difficult to realize by the existing frequency measurement algorithm is solved.
2. The invention realizes signal filtering through state jump combinational logic of the state machine, generates good filtering effect on a frequency signal to be measured, simultaneously ensures that the phase difference between the signal generated after filtering and the original signal is fixed, and solves the problem that the phase difference between the signal generated by the existing filtering algorithm and the original signal is not fixed.
3. The invention adopts a parameterization mode to set a preset phase value and a measurement period, and can adjust the frequency test conversion completion time and the testable frequency range by changing parameters, thereby realizing that one system meets the measurement requirements of various frequency measurement channels.
Drawings
FIG. 1 is a block diagram of the present system;
FIG. 2 is a schematic flow diagram of the present method;
FIG. 3 is a flow chart of the operation of the signal filtering module;
FIG. 4 is a flow chart of the operation of the phase accumulation module;
FIG. 5 is a flow chart of the operation of the phase detection module;
FIG. 6 is a flowchart of the operation of the reference signal counting module;
FIG. 7 is a flow chart of the operation of the frequency measurement calculation module;
fig. 8 is a flowchart of the operation of the measurement cycle count module.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined in the appended claims, and all matters produced by the invention using the inventive concept are protected.
As shown in fig. 1, the frequency measurement system includes a reference signal generation module, a signal filtering module, a phase accumulation module, a phase detection module, a reference signal counting module, a frequency measurement value calculation module, and a measurement period counting module;
the reference signal generating module is used for providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module and driving each module to work according to time sequence by the jumping edge of the reference signals;
the signal filtering module is used for acquiring a frequency signal to be detected, performing burr filtering and time delay on the frequency signal to be detected, and generating a frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to the phase accumulating module after the frequency signal to be detected is stable;
the phase accumulation module is used for taking the jump edge of the input frequency signal as clock drive and accumulating preset phase values in sequence;
the phase detection module is used for detecting the accumulated phase value, acquiring the starting time of reference signal counting and controlling the reference signal counting module to start counting;
the reference signal counting module is used for counting the reference signals after receiving the starting counting signals of the phase detection module and outputting counting results to the frequency measurement value calculating module;
the frequency measurement value calculation module is used for calculating a frequency measurement value according to the received reference signal count value after the set measurement period is finished;
and the measurement period counting module is used for counting the measurement period, and outputting a signal for closing the frequency measurement corresponding function of each module when the counting value reaches the set measurement period.
And the reference signal generating module generates a stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generates the reference signal through an external high-precision frequency source signal of the FPGA by adopting a counting frequency division method.
The phase accumulation module adopts a direct digital phase accumulation algorithm to realize the accumulation of the phase value, accumulates a preset phase value and a phase accumulated value on each jumping edge of the input frequency signal to be detected, and sets the current accumulated result as the phase accumulated value used in the next accumulation. Resetting the accumulation value to zero if the phase accumulation value overflows and repeating the accumulation process until a set measurement period is reached.
As shown in fig. 2, the frequency measurement method includes the steps of:
s1, providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module through the reference signal generating module, and driving the modules to work according to time sequence by the jumping edge of the reference signals;
s2, acquiring a frequency signal to be measured through a signal filtering module, filtering burrs and delaying the frequency signal to be measured, and generating a frequency signal which has the same frequency as the frequency signal to be measured and has a fixed phase to a phase accumulation module after the frequency signal to be measured is stable;
s3, using the jump edge of the input frequency signal as a clock to drive through a phase accumulation module, and accumulating preset phase values in sequence to obtain a phase accumulation value;
s4, detecting the phase accumulated value through the phase detection module, acquiring the starting time of the reference signal counting, and controlling the reference signal counting module to start counting;
s5, after receiving the start counting signal of the phase detection module, the reference signal counting module counts the reference signal and outputs the counting result to the frequency measurement value calculating module;
s6, after the frequency measurement is completed in the set measurement period through the frequency measurement value calculation module, calculating the frequency measurement value according to the received reference signal count value;
and S7, counting the measuring period by the measuring period counting module, and outputting a signal for closing the frequency measuring corresponding function of each module when the counting value reaches the set measuring period to finish single frequency measurement.
In step S1, the specific method for providing a reference signal for the signal filtering module, the phase detecting module, the reference signal counting module, the frequency measurement value calculating module, and the measurement period counting module by the reference signal generating module includes the following substeps:
s1-1, generating a stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generating the reference signal through an external high-precision frequency source signal of the FPGA by adopting a counting frequency division method;
and S1-2, providing a reference signal for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module.
The specific method of step S2 includes the following sub-steps:
s2-1, circularly detecting the level of the input frequency signal to be detected through a state machine, and entering the step S2-2 when the level is high;
s2-2, waiting for 1 reference signal time, detecting the level of the input frequency signal to be detected again, and if the level is still high, entering the step S2-3; otherwise, judging that the burrs appear, and returning to the step S2-1;
s2-3, synchronously generating a high-level frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to a phase accumulation module;
s2-4, circularly detecting the level of the input frequency signal to be detected, and entering the step S2-5 when the level is low;
s2-5, waiting for 1 reference signal time, detecting the level of the input frequency signal to be detected again, and if the level is still low, entering the step S2-6; otherwise, judging that the burrs appear, and returning to the step S2-4;
s2-6, synchronously generating a low level frequency signal with the same frequency as the frequency signal to be measured and fixed phase to the phase accumulation module.
The specific method of step S3 includes the following sub-steps:
s3-1, clearing the accumulated phase value and initializing a preset phase value;
and S3-2, at each jump edge of the input frequency signal to be detected, updating the phase accumulated value by adding a preset phase value and the current phase accumulated value, and sending the updated phase accumulated value to the phase detection module.
The specific method of step S4 includes the following substeps:
s4-1, clearing the current phase accumulated value and the phase accumulated value variables;
s4-2, reading the phase accumulated value output by the phase accumulated module in each reference signal period, and simultaneously acquiring the phase accumulated value variable in the phase detection module;
s4-3, in each reference signal period, comparing the phase accumulated value with the phase accumulated value variable, and if the phase accumulated value is larger than the phase accumulated value variable and the counting of the reference signal counting module is not started, prohibiting the counting of the reference signal counting module; otherwise, the reference signal counting module is controlled to start counting, and the phase accumulated value is stored in the phase accumulated value variable. The initial value of the phase accumulation value variable is also 0. When the phase accumulated value is larger than the phase accumulated value variable, the phase accumulated value is over-flowed. Two adjacent phase accumulation values overflow to indicate that one measurement period is obtained.
The specific method of step S6 includes the following substeps:
s6-1, selecting a set measuring cycle, and according to the formula:
S6-2, carrying out frequency measurement in a set measurement period to obtain a measurement period frequency measurement result;
s6-3, according to the formula:
obtaining a frequency measurement(ii) a WhereinIs a preset phase value;counting results of the reference signal counting module;is the reference signal.
The specific method of step S7 includes the following substeps:
s7-1, reading a phase accumulated value output by the phase accumulated module and a phase accumulated value variable inside the phase detection module in each reference signal period; as long as the jump edge of the frequency signal to be detected does not come, the phase accumulated value and the phase accumulated value variable are not changed no matter how many reference signal periods are passed;
s7-2, comparing the phase accumulated value with the phase accumulated value variable, if the phase accumulated value is smaller than the phase accumulated value variable, adding 1 to the counting value of the measuring period, and proceeding to the step S7-3; otherwise, returning to the step S7-1;
s7-3, judging whether the current measurement period count value is equal to the measurement period number set in advance, if so, outputting a signal for closing the frequency measurement corresponding function of each module, and completing single frequency measurement; otherwise, the process returns to step S7-1.
In a specific implementation process, the work flow charts of the signal filtering module, the phase accumulating module, the phase detecting module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module are respectively shown in fig. 3, fig. 4, fig. 5, fig. 6, fig. 7 and fig. 8.
In one embodiment of the invention, the frequency of the input frequency signal to be measured is 2 k-100 kHz, the conversion precision is required to be 50ppm, and the conversion time is less than 10 ms. When the frequency of the frequency signal to be measured is 2 k-50 kHz, the resolution ratio is less than or equal to 1 Hz.
On the basis of the above requirements, the input clock of the FPGA is 10MHz, the clock frequency division is not carried out, and the input clock is directly used as the reference signal (std) of the FPGA internal module clk ) And providing the clock to other algorithm modules except the phase accumulation module as a driving clock. The preset phase value can be any integer value within the range of decimal numbers 42949672-858993459. In this embodiment 858993459. The measurement cycle sets a selection range to be any integer value within 1-200 decimal numbers, the resolution ratio is higher when the numerical value is larger, and the corresponding measurement conversion time is longer.
Actual test results 1:
the measurement cycle number (cycle) is set to 2. The frequency of the input frequency signal to be measured is 2.0008kHz, the actual measurement frequency is 2.0008kHz, the conversion precision is better than 2ppm, and the conversion time is 7.74 ms.
Actual test results 2:
the number of measurement cycles (cycle) is set to 10. The frequency of the input frequency signal to be measured is 50.505kHz, the actual measurement frequency is 50.505kHz, the conversion precision is better than 2ppm, and the conversion time is 1.09 ms.
Actual test results 3:
the number of measurement cycles (cycle) was set to 50. The frequency of the input frequency signal to be measured is 50.5041kHz, the actual measurement frequency is 50.5040kHz, the conversion precision is better than 2ppm, and the conversion time is 5.00 ms.
Comparing the actual test result 2 with the actual test result 3, wherein the actual measurement result of the frequency measurement resolution is as follows:
50.505kHz - 50.5041kHz = 0.0009kHz = 0.9Hz。
actual test results 4:
the number of measurement cycles (cycle) is set to 10. The frequency of the input frequency signal to be measured is 100kHz, the actual measurement frequency is 100kHz, the conversion precision is better than 2ppm, and the conversion time is 0.55 ms.
Actual test results 5:
the number of measurement cycles (cycle) is set to 180. The frequency of the input frequency signal to be measured is 99.999kHz, the actual measurement frequency is 99.9988kHz, the conversion precision is better than 2ppm, and the conversion time is 9.05 ms.
Comparing the actual test result 4 with the actual test result 5, wherein the actual measurement result of the frequency measurement resolution is as follows:
100kHz - 99.999kHz = 0.001kHz = 1Hz。
in summary, the invention can amplify the slight change of the frequency signal to be measured by directly accumulating the digital phase for a plurality of times through the direct digital phase accumulation algorithm, thereby improving the detection resolution, realizing the high-precision measurement of the signal frequency, solving the defect that the high-precision measurement is difficult to realize by the existing frequency measurement algorithm, and shortening the frequency test conversion time. According to the invention, the phase zero crossing point is accurately detected through a phase detection algorithm, the detection of the small change of the signal frequency is realized, the test starting point and the test end point of the frequency signal to be detected are accurately identified, the accuracy of the signal frequency test is ensured, and the defect that the high-resolution measurement is difficult to realize by the existing frequency measurement algorithm is solved.
Claims (10)
1. A frequency measurement system is characterized by comprising a reference signal generation module, a signal filtering module, a phase accumulation module, a phase detection module, a reference signal counting module, a frequency measurement value calculation module and a measurement period counting module;
the reference signal generating module is used for providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module, and driving each module to work according to time sequence by the jumping edge of the reference signals;
the signal filtering module is used for acquiring a frequency signal to be detected, performing burr filtering and time delay on the frequency signal to be detected, and generating a frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to the phase accumulating module after the frequency signal to be detected is stable;
the phase accumulation module is used for taking the jump edge of the input frequency signal as clock drive and accumulating preset phase values in sequence;
the phase detection module is used for detecting the accumulated phase value, acquiring the starting time of reference signal counting and controlling the reference signal counting module to start counting;
the reference signal counting module is used for counting the reference signals after receiving the starting counting signals of the phase detection module and outputting counting results to the frequency measurement value calculating module;
the frequency measurement value calculating module is used for calculating a frequency measurement value according to the received reference signal counting value after the set measuring period is finished;
and the measurement period counting module is used for counting the measurement period, and outputting a signal for closing the frequency measurement corresponding function of each module when the counting value reaches the set measurement period.
2. The frequency measurement system of claim 1, wherein the reference signal generation module generates the stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generates the reference signal through an external high-precision frequency source signal of the FPGA by using a counting frequency division method.
3. The frequency measurement system of claim 1, wherein the phase accumulation module accumulates the phase value using a direct digital phase accumulation algorithm, continuously accumulates the phase value according to a jump edge of the input frequency signal to be measured until the overflow is reset to zero, and repeats the accumulation process until a predetermined measurement period is reached.
4. A method of frequency measurement, comprising the steps of:
s1, providing reference signals for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module through the reference signal generating module, and driving the modules to work according to time sequence by the jumping edge of the reference signals;
s2, acquiring a frequency signal to be measured through a signal filtering module, filtering burrs and delaying the frequency signal to be measured, and generating a frequency signal which has the same frequency as the frequency signal to be measured and has a fixed phase to a phase accumulation module after the frequency signal to be measured is stable;
s3, using the jump edge of the input frequency signal as a clock to drive through a phase accumulation module, and accumulating preset phase values in sequence to obtain a phase accumulation value;
s4, detecting the phase accumulated value through the phase detection module, acquiring the starting time of the reference signal counting, and controlling the reference signal counting module to start counting;
s5, after receiving the start counting signal of the phase detection module, the reference signal counting module counts the reference signal and outputs the counting result to the frequency measurement value calculating module;
s6, after the frequency measurement is completed in the set measurement period through the frequency measurement value calculation module, calculating the frequency measurement value according to the received reference signal count value;
and S7, counting the measuring period by the measuring period counting module, and outputting a signal for closing the frequency measuring corresponding function of each module when the counting value reaches the set measuring period to finish single frequency measurement.
5. The method for measuring frequency according to claim 4, wherein the step S1 of providing the reference signal for the signal filtering module, the phase detecting module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module by the reference signal generating module comprises the following sub-steps:
s1-1, generating a stable reference signal through a phase-locked loop or a phase-locked delay loop technology of the FPGA, or generating the reference signal through an external high-precision frequency source signal of the FPGA by adopting a counting frequency division method;
and S1-2, providing a reference signal for the signal filtering module, the phase detection module, the reference signal counting module, the frequency measurement value calculating module and the measurement period counting module.
6. The frequency measurement method according to claim 4, wherein the specific method of step S2 includes the following sub-steps:
s2-1, circularly detecting the level of the input frequency signal to be detected through a state machine, and entering the step S2-2 when the level is high;
s2-2, waiting for 1 reference signal time, detecting the level of the input frequency signal to be detected again, and if the level is still high, entering the step S2-3; otherwise, judging that the burrs appear, and returning to the step S2-1;
s2-3, synchronously generating a high-level frequency signal which has the same frequency as the frequency signal to be detected and has a fixed phase to a phase accumulation module;
s2-4, circularly detecting the level of the input frequency signal to be detected, and entering the step S2-5 when the level is low;
s2-5, waiting for 1 reference signal time, detecting the level of the input frequency signal to be detected again, and if the level is still low, entering the step S2-6; otherwise, judging that burrs occur, and returning to the step S2-4;
s2-6, synchronously generating a low level frequency signal with the same frequency as the frequency signal to be measured and fixed phase to the phase accumulation module.
7. The frequency measurement method according to claim 4, wherein the specific method of step S3 includes the following sub-steps:
s3-1, clearing the accumulated phase value and initializing a preset phase value;
and S3-2, at each jump edge of the input frequency signal to be detected, updating the phase accumulated value by adding a preset phase value and the current phase accumulated value, and sending the updated phase accumulated value to the phase detection module.
8. The frequency measurement method according to claim 4, wherein the specific method of step S4 includes the following sub-steps:
s4-1, clearing the current phase accumulated value and the phase accumulated value variables;
s4-2, in each reference signal period, reading a phase accumulated value output by the phase accumulation module, and simultaneously acquiring a phase accumulated value variable inside the phase detection module;
s4-3, in each reference signal period, comparing the phase accumulated value with the phase accumulated value variable, and if the phase accumulated value is larger than the phase accumulated value variable and the counting of the reference signal counting module is not started, prohibiting the counting of the reference signal counting module; otherwise, the reference signal counting module is controlled to start counting, and the phase accumulated value is stored in the phase accumulated value variable.
9. The method for measuring frequency according to claim 4, wherein the specific method of step S6 comprises the following sub-steps:
s6-1, selecting a set measuring cycle, and according to the formula:
S6-2, carrying out frequency measurement in a set measurement period to obtain a measurement period frequency measurement result;
s6-3, according to the formula:
10. The frequency measurement method according to claim 8, wherein the specific method of step S7 includes the following sub-steps:
s7-1, reading a phase accumulated value output by the phase accumulated module and a phase accumulated value variable inside the phase detection module in each reference signal period;
s7-2, comparing the phase accumulated value with the phase accumulated value variable, if the phase accumulated value is smaller than the phase accumulated value variable, adding 1 to the counting value of the measuring period, and proceeding to the step S7-3; otherwise, returning to the step S7-1;
s7-3, judging whether the current measurement period count value is equal to the measurement period number set in advance, if so, outputting a signal for closing the frequency measurement corresponding function of each module, and completing single frequency measurement; otherwise, the process returns to step S7-1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210733484.5A CN114814358B (en) | 2022-06-27 | 2022-06-27 | Frequency measurement system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210733484.5A CN114814358B (en) | 2022-06-27 | 2022-06-27 | Frequency measurement system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114814358A true CN114814358A (en) | 2022-07-29 |
CN114814358B CN114814358B (en) | 2022-11-01 |
Family
ID=82523182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210733484.5A Active CN114814358B (en) | 2022-06-27 | 2022-06-27 | Frequency measurement system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114814358B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115469149A (en) * | 2022-08-29 | 2022-12-13 | 陕西航空电气有限责任公司 | Frequency acquisition method and device suitable for aviation power supply system generator |
CN117639739A (en) * | 2024-01-15 | 2024-03-01 | 长沙新南信息技术有限公司 | Square wave signal frequency conversion method, system, computer equipment and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6580775B1 (en) * | 1998-11-26 | 2003-06-17 | Samsung Electronics Co., Ltd | Method of detecting frequency of digital phase locked loop |
CN1963543A (en) * | 2006-11-23 | 2007-05-16 | 江汉大学 | Improved method and apparatus for measuring stability of frequency of time domain signal |
JP2009177259A (en) * | 2008-01-21 | 2009-08-06 | Sony Corp | Pll circuit, radio terminal device and frequency detection method |
WO2009122843A1 (en) * | 2008-03-31 | 2009-10-08 | 日本電気株式会社 | Frequency synthesizer and method for controlling oscillation frequency of oscillator |
CN101652926A (en) * | 2007-04-10 | 2010-02-17 | Nxp股份有限公司 | High-frequency counter |
US20110301895A1 (en) * | 2009-02-27 | 2011-12-08 | Kazunori Miyahara | Phase measuring device and frequency measuring device |
CN102540865A (en) * | 2012-01-04 | 2012-07-04 | 西安近代化学研究所 | High-precision time interval measurement method based on phase modulation |
CN106443179A (en) * | 2016-08-30 | 2017-02-22 | 石家庄数英仪器有限公司 | Ps-grade time frequency measurement circuit and measurement method thereof |
CN107271975A (en) * | 2017-06-16 | 2017-10-20 | 北京理工大学 | The radar return Doppler frequency coherent analogy method measured in real time based on frequency |
CN107817383A (en) * | 2017-10-31 | 2018-03-20 | 郑州轻工业学院 | A kind of High Precise Frequency Measurement System based on moving emitter |
CN113708758A (en) * | 2020-05-20 | 2021-11-26 | 中兴通讯股份有限公司 | Phase detection method, device and equipment thereof |
CN113848384A (en) * | 2021-09-22 | 2021-12-28 | 浙江大学 | High-precision feedback type frequency measuring device and method based on phase frequency detector |
CN114221659A (en) * | 2022-02-22 | 2022-03-22 | 成都凯天电子股份有限公司 | Method and system for improving conversion precision of low-frequency signal and electronic equipment |
-
2022
- 2022-06-27 CN CN202210733484.5A patent/CN114814358B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6580775B1 (en) * | 1998-11-26 | 2003-06-17 | Samsung Electronics Co., Ltd | Method of detecting frequency of digital phase locked loop |
CN1963543A (en) * | 2006-11-23 | 2007-05-16 | 江汉大学 | Improved method and apparatus for measuring stability of frequency of time domain signal |
CN101652926A (en) * | 2007-04-10 | 2010-02-17 | Nxp股份有限公司 | High-frequency counter |
JP2009177259A (en) * | 2008-01-21 | 2009-08-06 | Sony Corp | Pll circuit, radio terminal device and frequency detection method |
WO2009122843A1 (en) * | 2008-03-31 | 2009-10-08 | 日本電気株式会社 | Frequency synthesizer and method for controlling oscillation frequency of oscillator |
US20110301895A1 (en) * | 2009-02-27 | 2011-12-08 | Kazunori Miyahara | Phase measuring device and frequency measuring device |
CN102540865A (en) * | 2012-01-04 | 2012-07-04 | 西安近代化学研究所 | High-precision time interval measurement method based on phase modulation |
CN106443179A (en) * | 2016-08-30 | 2017-02-22 | 石家庄数英仪器有限公司 | Ps-grade time frequency measurement circuit and measurement method thereof |
CN107271975A (en) * | 2017-06-16 | 2017-10-20 | 北京理工大学 | The radar return Doppler frequency coherent analogy method measured in real time based on frequency |
CN107817383A (en) * | 2017-10-31 | 2018-03-20 | 郑州轻工业学院 | A kind of High Precise Frequency Measurement System based on moving emitter |
CN113708758A (en) * | 2020-05-20 | 2021-11-26 | 中兴通讯股份有限公司 | Phase detection method, device and equipment thereof |
CN113848384A (en) * | 2021-09-22 | 2021-12-28 | 浙江大学 | High-precision feedback type frequency measuring device and method based on phase frequency detector |
CN114221659A (en) * | 2022-02-22 | 2022-03-22 | 成都凯天电子股份有限公司 | Method and system for improving conversion precision of low-frequency signal and electronic equipment |
Non-Patent Citations (1)
Title |
---|
黄超 等: "基于AD9850的频率特性测试系统的设计", 《自动化应用》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115469149A (en) * | 2022-08-29 | 2022-12-13 | 陕西航空电气有限责任公司 | Frequency acquisition method and device suitable for aviation power supply system generator |
CN117639739A (en) * | 2024-01-15 | 2024-03-01 | 长沙新南信息技术有限公司 | Square wave signal frequency conversion method, system, computer equipment and storage medium |
CN117639739B (en) * | 2024-01-15 | 2024-05-10 | 长沙新南信息技术有限公司 | Square wave signal frequency conversion method, system, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114814358B (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114814358B (en) | Frequency measurement system and method | |
CN103605023B (en) | A kind of combining unit time response measuring method and measurement apparatus | |
CN106253883B (en) | Device and method for measuring jitter built in chip | |
CN107872221B (en) | Full-phase digital delay phase-locked loop device and working method | |
CN106681127B (en) | Shift-register circuit, phase difference calculating method and time-to-digit converter | |
CN102253643A (en) | High-precision time measuring circuit and method | |
CN105245203B (en) | High-precision low-speed clock duty ratio detecting system and method | |
CN110579618B (en) | Motor rotating speed acquisition and analysis device and method based on FPGA | |
CN111766771A (en) | Voltage-controlled crystal oscillator taming-based time interval measuring method and system | |
CN103354448B (en) | Based on the high resolution time interval generation system of FPGA | |
CN110421247A (en) | A kind of ultrafast laser for crispy material is equidistant to get processing method ready | |
US8427195B1 (en) | Digital signal generator and automatic test equipment having the same | |
CN102466779B (en) | Built-in testing method for delay of trigger and circuit | |
CN105702016B (en) | Device and method for checking an operating clock signal of a position measuring device | |
CN104079265A (en) | High-speed clock duty ratio detection system | |
CN109631949A (en) | A kind of fiber strapdown inertial navigation system equipment testing device and test method | |
JP2013024854A (en) | Distance measuring method and system therefor | |
CN112886951B (en) | Multi-clock source seamless switching circuit and method of high-precision time keeping equipment | |
CN113377003B (en) | Phase adjustment method and device for cesium and hydrogen atomic frequency standard | |
EP2546657A1 (en) | Method and system for measuring speed. | |
CN112698181B (en) | State-configurable in-situ aging sensor system | |
CN110857890A (en) | High-precision temperature detection method and device | |
CN2713741Y (en) | Clock detecting circuit | |
CN110687773B (en) | Method, device and system for measuring time service precision of time unification system | |
CN104158452A (en) | AC servo permanent magnetic driver |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |