Amplitude-frequency measurement method using third-order monotone fitting
Through the third-order monotonic fit amplitude frequency measurement method, the instantaneous frequency and amplitude of the signal are calculated using all sampling point information, solving the problems of large calculation amount and low accuracy in the prior art, and achieving fast and accurate signal frequency measurement and noise suppression.
Patent Information
- Application Number
- CN202210283442.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-03-22
AI Technical Summary
The prior art requires a full cycle of measurement when measuring the frequency of an electronic signal, which is large in calculation and low in accuracy, and is difficult to achieve rapid measurement especially when low-frequency signals and noise exist.
The third-order monotonic fit amplitude frequency measurement method is used to calculate the instantaneous frequency and amplitude of the signal through the monotonic interval calculation and third-order fitting of the signal, and use all sampling point information to calculate the instantaneous frequency and amplitude of the signal to be measured to achieve fast and accurate measurement.
It improves measurement speed and accuracy, can quickly measure frequency in less than one signal cycle, and effectively suppresses noise, improving measurement accuracy.
Smart Images

Figure CN114660359B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of electronic signal frequency measurement, and in particular to a third-order monotone fitting amplitude-frequency measurement method. Background Art
[0002] The measurement of the frequency of electronic signals has a wide range of applications in electronic technologies such as communications. For high-frequency signals, a counting method is usually used to measure the number of times the characteristic points of the signal occur within a fixed time period. For example, it is common to use the zero-crossing point as the characteristic point to convert the sinusoidal signal into a square wave and then count and measure the frequency; for low-frequency signals, a method is usually adopted in which the period of the signal is measured and the inverse is taken to obtain the period of the frequency; there is also a Fourier method that analyzes the frequency components of each signal after expanding the Fourier series; for these methods, from the perspective of measurement speed, at least one complete period of the signal to be measured needs to be measured, especially the Fourier method, which not only needs to measure the periods of multiple signals to be measured, but also has the problem of huge computational complexity, making it even more difficult to achieve fast measurement; from the perspective of measurement accuracy, the counting method and the period method can only use some isolated characteristic point information in the signal to be measured, while other information is discarded and lost, so the accuracy is low when measuring quickly.
[0003] For a signal to be measured that is mixed with noise, the Fourier method needs to first calculate all frequency components in the frequency band, and then sort them to find the frequency component with the largest energy, while the present invention can directly measure the largest frequency component. Summary of the invention
[0004] The present invention provides a third-order monotone fitting amplitude-frequency measurement method to solve the problems that the existing method needs to measure a complete cycle of the signal to be measured, has a large amount of calculation, has low measurement accuracy due to the loss of characteristic point information, and is difficult to achieve fast measurement.
[0005] The third-order monotonic fitting amplitude-frequency measurement method is implemented by calculating the monotonic interval of the measured signal, performing the third-order fitting, and calculating the signal amplitude-frequency. The specific process is as follows:
[0006] Step 1, calculating the monotonic interval of the signal to be measured to obtain the calculated signal to be measured;
[0007] Step A1, store the signal to be tested in the array S[i], and obtain the data S[P] at position i=P in the array S[i];
[0008] Step A2: using variable K as loop index number, the initial value of K is equal to P;
[0009] Step A3: compare S[K] with S[K-1]. If S[K-1] is greater than S[K], execute step A4; otherwise, execute step A5.
[0010] Step A4, K=K-1, return to execute step A3;
[0011] Step A5, if the value of variable K is less than P, then use variable U to save the current value of K and then execute step A6, otherwise execute step A11;
[0012] Step A6, setting the initial value of variable K equal to P;
[0013] Step A7, compare S[K] and S[K+1]. If S[K+1] is smaller than S[K], execute step A8. Otherwise, if it fails, jump to step A9.
[0014] Step A8, K=K+1, execute step A7;
[0015] Step A9, if the value of variable K is greater than P, then use variable E to save the current value of K and then execute step A10, otherwise it fails and executes step A11;
[0016] Step A10, at this time, the calculation information of the monotonic interval of the signal is stored in the variables U and E, and this interval is a decreasing interval, and step 2 is executed;
[0017] Step A11, use variable K as loop index number, the initial value of K is equal to P;
[0018] Step A12: compare S[K] with S[K+1]. If S[K+1] is greater than S[K], execute step A13; otherwise, jump to step A14.
[0019] Step A13, K=K+1, execute step A12;
[0020] Step A14, use variable U to save the current K value; use variable K as the loop index number, and the initial value of K is equal to P;
[0021] Step A15, compare S[K] and S[K-1]. If S[K-1] is smaller than S[K], execute step A16; otherwise, jump to step A17.
[0022] Step A16, K=K-1, execute step A15; use variable E to save the K value at this time; at this time, the calculation information of the monotonic interval of the signal is saved in variables U and E, and this interval is an increasing interval, and execute step 2;
[0023] Step 2: Perform a third-order fitting on the signal to be measured after the monotonic interval calculation in step 1. The specific process is as follows:
[0024] Step B1, define a one-dimensional array Q, the number of elements in the array is represented by Z, and the calculation method of Z is;
[0025] Z=4*(UE) / 5
[0026] Define a one-dimensional array R, the number of elements in the array is also Z;
[0027] Step B2, define a variable j, set the value of j equal to E, and set the initial value of the variable K to zero;
[0028] Step B3, using variable j as the index number of array S, save the value of data S[j] obtained from array S to Q[K] in array Q with K as the index number, and then fill the value of R[K] in array R with K as the index number with the square of K;
[0029] Step B4, after accumulating the variable K and then the variable j, if the value of j is greater than or equal to Z, execute step B5, otherwise execute step B3;
[0030] Step B5, simultaneously obtain data from array Q and array R, use j as the loop variable, construct the following third-order fitting equation group in matrix form, and solve the equation group to calculate the four unknown values of variables a, b, c, and d;
[0031]
[0032] In the formula, a is the coefficient of the cubic term, b is the coefficient of the quadratic term, c is the coefficient of the linear term, and d is the constant term;
[0033] Step 3: Calculate the instantaneous frequency f and instantaneous amplitude Amp of the signal to be measured after performing third-order fitting in step 2;
[0034] When the sampling frequency is F, the instantaneous frequency f of the signal to be measured is calculated using a, b, and c solved by the third-order fitting equation group;
[0035]
[0036] The instantaneous amplitude Amp of the measured signal in the corresponding monotonic interval is expressed as follows:
[0037]
[0038] The instantaneous frequency f is used for FM broadcast demodulation; the instantaneous amplitude Amp is used for AM broadcast demodulation.
[0039] Beneficial effects of the present invention: The measuring method of the present invention has fast measuring speed and high precision. Compared with the traditional frequency measurement method using the zero-crossing point as the characteristic point, the method provided by the present invention has higher precision because it utilizes the information of all sampling points; and because two frequency values are measured within one signal cycle, the average can be taken again to further improve the measurement accuracy; compared with traditional Fourier leaf methods, the problem that traditional technology cannot quickly measure the signal frequency within less than one cycle of the signal to be measured can be solved; because the present invention makes full use of the information of all sampling points, it can suppress the noise that may exist in the signal to be measured, effectively improve the measurement accuracy, and the higher the sampling frequency, the more beneficial it is to suppress noise; while measuring the signal frequency, the instantaneous amplitude and DC voltage components can be measured synchronously. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 The schematic diagram is a principle block diagram of the third-order monotone fitting amplitude-frequency measurement method of the present invention. DETAILED DESCRIPTION
[0041] Specific implementation method 1. Combination Figure 1 The present embodiment is described, a third-order monotone fitting amplitude-frequency measurement method, which is implemented by a third-order monotone fitting amplitude-frequency measurement system, the system comprising a data input terminal 1, a memory 2, a processor 3 and an output terminal 4;
[0042] The data input terminal 1 inputs the signal to be tested. If the signal to be tested is an analog signal, it needs to be converted by an analog-to-digital converter before being sent to the data input terminal 1; the signal data is required to be sampled at a fixed frequency F; the signal to be tested is the original signal mixed with a random noise signal; the original signal is a cosine signal of a single frequency, the instantaneous frequency is represented by f as an unknown value, and the instantaneous amplitude is represented by Amp as an unknown value; the maximum value of f is lower than the upper frequency limit H, and the sampling frequency F must be greater than 8 times the upper limit H; it is required that the noise signal strength mixed into the signal to be tested at any time must be smaller than the signal to be tested;
[0043] The memory 2 stores the signal data to be measured obtained from the data input terminal; in each measurement process, a batch of data with M values is required, which are logically stored continuously to form a one-dimensional array data structure, represented by S[i]; wherein S is the array name, and i is the subscript index number; the minimum value of the subscript index number i is zero, and the maximum value is N, which is equal to the number of signal data to be measured M minus one; it is defined that the direction in which the subscript index number decreases is the left direction, and the direction in which the subscript index number increases is the right direction;
[0044] The processor 3 analyzes the data stored in the memory 2, and analyzes the instantaneous frequency and instantaneous amplitude at the position with the subscript index number i=P through the calculation process of the signal monotonic interval calculation, third-order fitting and signal amplitude-frequency calculation of the signal to be measured.
[0045] The specific calculation process is as follows:
[0046] Step 1: Calculate the signal monotonic interval of the signal to be measured, wherein the goal of obtaining the signal monotonic interval is to obtain the signal monotonic interval stored in the variable E and the variable U. The specific steps are as follows:
[0047] A1. Get the data S[P] at position i=P in the array S[i].
[0048] A2. Use variable K as loop index number, and the initial value of K is equal to P;
[0049] A3. Compare S[K] and S[K-1]. If S[K-1] is greater than S[K], execute step A4; otherwise, jump to step A5.
[0050] A4, reduce the variable K by 1 and then execute step A3;
[0051] A5. If the value of variable K is less than P, then use variable U to save the current value of K and then execute step 6; otherwise, execute step A12;
[0052] A6. Set the initial value of variable K to P;
[0053] A7. Compare S[K] and S[K+1]. If S[K+1] is smaller than S[K], execute step A8. Otherwise, if it fails, jump to step A9.
[0054] A8. Add 1 to variable K and then execute step 7;
[0055] A9. If the value of variable K is greater than P, then use variable E to save the current value of K and then execute step A10. Otherwise, if it fails, execute step A12.
[0056] A10. At this time, the signal monotonic calculation interval information is stored in the variables U and E. This interval is a decreasing interval, and step 2 is executed.
[0057] A12. Use variable K as loop index number, and the initial value of K is equal to P;
[0058] A13. Compare S[K] and S[K+1]. If S[K+1] is greater than S[K], execute step A14; otherwise, jump to step A15.
[0059] A14, add 1 to variable K and then execute step A13;
[0060] A15. Use variable U to save the K value at this time;
[0061] A16. Set the initial value of K equal to P;
[0062] A17. Compare S[K] and S[K-1]. If S[K-1] is smaller than S[K], execute step A18; otherwise, jump to step A19.
[0063] A18, decrement variable K by 1 and then execute step A17;
[0064] A19. Use variable E to save the K value at this time;
[0065] A20, at this time, the signal monotonic calculation interval information is stored in the variables U and E, and this interval is an increasing interval, and step 2 is executed;
[0066] Step 2, performing a third-order fitting on the signal to be measured in the monotonic interval obtained in step 1;
[0067] B1. Define a one-dimensional array Q. The number of elements in the array is represented by Z. The calculation method of Z is:
[0068] Z=4*(UE) / 5
[0069] That is, the Z value is equal to variable U minus variable E, and then taking four fifths;
[0070] Define another one-dimensional array R, the number of elements in the array is also Z;
[0071] B2. Define a variable j, set its value equal to E, and set the initial value of variable K to zero;
[0072] B3. Use variable j as the index number of array S, save the value of data S[j] from array S to Q[K] in array Q with K as the index number, and then fill in the value of R[K] in array R with K as the index number with the square of K;
[0073] B4, after accumulating the variable K and then the variable j, if the value of j is greater than or equal to Z, execute step B5, otherwise execute step B3;
[0074] B5. Get data from array Q and array R at the same time, use j as the loop variable, construct the following third-order fitting equation group in matrix form, and solve the equation group to calculate the four unknown values of a, b, c, and d;
[0075]
[0076] In the formula, a is the coefficient of the cubic term, b is the coefficient of the quadratic term, c is the coefficient of the linear term, and d is the constant term;
[0077] Step 3: Calculate the amplitude and frequency of the signal to be measured;
[0078] If the signal superimposed noise component is too large, it may cause measurement errors. This problem can be discovered by checking the positive and negative signs in the solution of the equation group; if the calculation interval is a decreasing interval, the two values b and d calculated by solving the equation group must be negative values, and c must be positive value, otherwise the measurement is considered to be wrong; if the calculation interval is an increasing interval, the two values b and d calculated by solving the equation group must be positive values, and c must be negative value, otherwise the measurement is considered to be wrong;
[0079] When the sampling frequency is fixed to F, the instantaneous frequency f of the signal to be measured can be calculated by using a, b, and c solved by the fitting equation group;
[0080]
[0081] The instantaneous amplitude Amp of the signal to be measured within this monotonic interval;
[0082]
[0083] The DC voltage component V in this monotonic interval of the measured signal;
[0084]
[0085] The measurement results are output from the output terminal.
[0086] like Figure 1 In the process, the data input terminal can send data to the memory in two ways. One way is that the data input terminal directly inputs the data into the memory, and the other way is that the data input terminal first sends the data to the processor, and then the processor transfers the data to the memory; after the processor calculates and processes the data in the memory, it outputs the instantaneous frequency and instantaneous amplitude through the output terminal.
[0087] The method described in this embodiment does not need to know any parameters of the signal in advance. It analyzes a half-cycle data of rising or falling in the sampled quantized data of the signal to be measured as a monotonic calculation interval, and then fits it with a third-order function. Finally, the amplitude and frequency of the signal are calculated using the fitting system. For variable frequency signals, the required sampling frequency needs to be at least 8 times higher than the maximum frequency of the signal to be measured. Because only half a cycle of the signal to be measured needs to be measured, the present invention has the advantage of fast measurement speed. Because the information of all sampling points is used, increasing the sampling frequency can suppress the noise that may exist in the signal to be measured, effectively improving the measurement accuracy.
[0088] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0089] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. The third-order monotonic fitting amplitude-frequency measurement method is characterized by: This method is implemented by calculating the monotonic interval of the measured signal, third-order fitting, and calculating the signal amplitude and frequency. The specific process is as follows: Step 1, calculating the monotonic interval of the signal to be measured to obtain the calculated signal to be measured; Step A1, store the signal to be tested in the array S[i], and obtain the data S[P] at position i=P in the array S[i]; Step A2: use variable K as loop index number, and the initial value of K is equal to P; Step A3: compare S[K] with S[K-1]. If S[K-1] is greater than S[K], execute step A4; otherwise, execute step A5. Step A4, K=K-1, return to execute step A3; Step A5, if the value of variable K is less than P, then use variable U to save the current value of K and then execute step A6, otherwise execute step A11; Step A6, setting the initial value of variable K equal to P; Step A7, compare S[K] and S[K+1]. If S[K+1] is smaller than S[K], execute step A8. Otherwise, if it fails, jump to step A9. Step A8, K=K+1, execute step A7; Step A9, if the value of variable K is greater than P, then use variable E to save the current value of K and then execute step A10, otherwise it fails and executes step A11; Step A10, at this time, the calculation information of the monotonic interval of the signal is stored in the variables U and E, and this interval is a decreasing interval, and step 2 is executed; Step A11, use variable K as loop index number, the initial value of K is equal to P; Step A12: compare S[K] with S[K+1]. If S[K+1] is greater than S[K], execute step A13; otherwise, jump to step A14. Step A13, K=K+1, execute step A12; Step A14, use variable U to save the current K value; use variable K as the loop index number, and the initial value of K is equal to P; Step A15, compare S[K] and S[K-1]. If S[K-1] is smaller than S[K], execute step A16; otherwise, jump to step A17. Step A16, K=K-1, execute step A15; use variable E to save the K value at this time; at this time, the calculation information of the monotonic interval of the signal is saved in variables U and E, and this interval is an increasing interval, and execute step 2; Step 2: Perform a third-order fitting on the signal to be measured after the monotonic interval calculation in step 1. The specific process is as follows: Step B1, define a one-dimensional array Q, the number of elements in the array is represented by Z, and the calculation method of Z is; Z=4*(UE) / 5 Define another one-dimensional array R, the number of elements in the array is also Z; Step B2, define a variable j, set the value of j equal to E, and set the initial value of variable K to zero; Step B3, using variable j as the index number of array S, save the value of data S[j] obtained from array S to Q[K] in array Q with K as the index number, and then fill the value of R[K] in array R with K as the index number with the square of K; Step B4, after accumulating the variable K and then the variable j, if the value of j is greater than or equal to Z, execute step B5, otherwise execute step B3; Step B5, simultaneously obtain data from array Q and array R, use j as the loop variable, construct the following third-order fitting equation group in matrix form, and solve the equation group to calculate the four unknown values of variables a, b, c, and d; In the formula, a is the coefficient of the cubic term, b is the coefficient of the quadratic term, c is the coefficient of the linear term, and d is the constant term; Step 3: Calculate the instantaneous frequency f and instantaneous amplitude Amp of the signal to be measured after performing third-order fitting in step 2; When the sampling frequency is F, the instantaneous frequency f of the signal to be measured is calculated using a, b, and c solved by the third-order fitting equation group; The instantaneous amplitude Amp of the measured signal in the corresponding monotonic interval is expressed as follows: The instantaneous frequency f is used for FM broadcast demodulation; the instantaneous amplitude Amp is used for AM broadcast demodulation.
2. The third-order monotone fitting amplitude-frequency measurement method according to claim 1, characterized in that: In step 3, when the monotonic interval is a decreasing interval, the values of the calculated variables b and d are both negative, and the value of the variable c is positive, otherwise it is considered that the measurement is wrong and all data are discarded; When the monotonic interval is an increasing interval, the values of the calculated variables b and d are both positive, and the value of the variable c is negative. Otherwise, it is considered that the measurement is wrong and all data are discarded.
3. The third-order monotone fitting amplitude-frequency measurement method according to claim 1, characterized in that: In step 3, the DC voltage component V of the measured signal in the corresponding monotonic interval is calculated using the following formula:
4. The third-order monotone fitting amplitude-frequency measurement method according to claim 1, characterized in that: The measurement method is implemented by a third-order monotone fitting amplitude-frequency measurement system, which comprises a data input terminal (1), a memory (2), a processor (3) and an output terminal (4); The data input terminal (1) inputs the signal to be measured, and the memory (2) stores the data of the signal to be measured obtained from the data input terminal; in each measurement process, a batch of data with M values is required, which are logically stored continuously to form a one-dimensional array data structure, represented by S[i]; Where S is the array name, i is the subscript index number; the minimum value of the subscript index number i is zero, and the maximum value is N, which is equal to the number of signal data to be tested M minus 1; the direction in which the subscript index number decreases is defined as the left direction, and the direction in which the subscript index number increases is defined as the right direction; The processor (3) calculates the instantaneous amplitude frequency at the position with the subscript index number i=P for the data in the memory (2) through three steps: monotonic interval calculation of the signal to be measured, third-order fitting and calculation of the signal amplitude frequency.
5. The third-order monotone fitting amplitude-frequency measurement method according to claim 4 is characterized in that: The signal to be measured is required to be generated at a fixed sampling frequency F; The signal to be measured is the original signal mixed with a random noise signal; the original signal is a cosine signal of a single frequency, and the instantaneous frequency f and the instantaneous amplitude Amp are both unknown values; the maximum value of the instantaneous frequency f is lower than the upper frequency limit value H, ensuring that the fixed sampling frequency F is greater than 8 times the upper limit value H; it is required that the intensity of the noise signal mixed with the signal to be measured is less than the intensity of the signal to be measured.
6. The third-order monotone fitting amplitude-frequency measurement method according to claim 4, characterized in that: When the signal to be tested inputted by the data input terminal is an analog signal, it is converted by an analog-to-digital converter and then sent to the data input terminal.
Citation Information
Patent Citations
Digitalized automatic frequency correction method based on true frequency reference signal
CN101471726A
Three-order half-cycle fitting amplitude-frequency demodulation measurement method
CN114660358A
Method and apparatus for generating noise-signal
JP2003198337A
Frequency detection device and frequency relay using the same
JP2014013155A
Delta-predicted frequency offset compensation apparatus and method thereof
US20040120248A1
