A digital amplitude measurement method for periodic signals

By adaptively adjusting the sampling rate and combining parity and semi-integer frequency division, the problem of low amplitude accuracy caused by spectrum leakage in the prior art is solved, and higher measurement accuracy and anti-interference ability are achieved.

CN114487581BActive Publication Date: 2025-03-07HUAZHONG UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210026599.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-11
Publication Date
2025-03-07
Estimated Expiration
2042-01-11

AI Technical Summary

Technical Problem

Existing digital amplitude measurement methods are prone to spectral leakage when the signal frequency changes, reducing the amplitude accuracy.

Method used

Adaptive sampling technology is adopted to adjust the sampling rate to make it close to the ideal sampling rate, and combine the combination of parity and even frequency division and semi-integer frequency division to generate the actual sampling clock to reduce spectrum leakage.

Benefits of technology

It improves the accuracy of amplitude measurement, reduces the error introduced by spectrum leakage, and enhances the anti-interference ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114487581B_ABST
    Figure CN114487581B_ABST
Patent Text Reader

Abstract

The present invention discloses a digital amplitude measurement method for periodic signals, which is implemented by digital measurement. Compared with the analog circuit measurement method, it has the advantages of simple hardware, good adaptability, and strong anti-interference ability, and can measure the amplitude of any frequency component, and can use digital methods to measure the amplitude of multiple frequency components of wide frequency range signals. Compared with other digital algorithm implementation methods, the method provided by the present invention adopts adaptive sampling to solve the spectrum leakage problem introduced by non-integer multiples, thereby improving the measurement accuracy. In addition, the ADC sampling clock is made close to the ideal sampling rate by combining odd-even division with half-integer division, reducing the error introduced by the spectrum leakage phenomenon, thereby improving the measurement accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of voltage signal or current signal amplitude measurement, and more specifically, relates to a digital amplitude measurement method for a periodic signal. Background Art

[0002] The amplitude of each frequency component of a periodic signal, such as a non-sinusoidal periodic signal, can reflect its energy component and has been widely used in the fields of harmonic analysis, speech processing, significant target detection, signal anomaly detection, etc. In particular, in determining the polarization direction of polarized light, measuring the amplitude of the double frequency signal (current signal) is an important step in measuring the polarization angle.

[0003] Amplitude measurement methods are divided into analog circuit measurement methods and digital algorithm measurement methods. The analog circuit method has the disadvantages of zero drift, high noise, and low measurement accuracy, and this method cannot extract the amplitude of multiple frequency components of the signal. The digital algorithm measurement method is widely used in most engineering fields due to its advantages such as simple circuit structure, low cost, high accuracy, and strong adaptability.

[0004] The existing digital algorithm measurement method is to first sample the signal and then perform a Fast Fourier Transform (FFT) to obtain the amplitude of multiple frequency components. However, when the signal frequency changes, the ratio of the sampling rate to the signal frequency changes, which may cause spectrum leakage in the Fast Fourier Transform result and reduce the amplitude accuracy. When the ratio is not an integer multiple, N is the processing length, f0 is the signal frequency, f S When the sampling rate is , the periodic signal obtained by periodically extending X(t) with N as the period has discontinuities, which causes the spectral components to expand from the normal spectrum, resulting in spectrum leakage. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention provides a digital amplitude measurement of a periodic signal, thereby solving the technical problem of low accuracy of the existing amplitude measurement method.

[0006] To achieve the above object, according to one aspect of the present invention, a method for measuring a digital amplitude of a periodic signal is provided, comprising:

[0007] S1, ADC follows the initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n), and the time domain information of X(n) is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); wherein the periodic signal is a current signal or a voltage signal, f S Determined according to a preset spectrum resolution;

[0008] S2, perform maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculate the maximum modulus value according to k and f S Calculate the fundamental frequency f0 of the periodic signal to be measured;

[0009] S3, adaptive adjustment of f S The actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `;

[0010] S4, ADC according to the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the time domain information of X(n)` is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`;

[0011] S5, according to the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; return S1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)` re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

[0012] Preferably, the actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `, including:

[0013] A1, uses counter count to divide the ADC main clock, where: If the fractional part of count Q<0.25, go to step A2; if Q>0.75, go to step A4; otherwise, go to step A3.

[0014] A2, using odd-even frequency division, the counter count value is count, the actual sampling rate

[0015] A3, using half-integer frequency division, the counter count value is count+0.5, the actual sampling rate

[0016] A4, using odd-even frequency division, the counter count value is count, the actual sampling rate

[0017] Preferably, the sampling effective length N and the effective sampling length n per cycle satisfy the following relationship:

[0018]

[0019] Where q is the number of sampling cycles, and q satisfies the condition f max is the maximum frequency component tested, f S.max is the maximum sampling rate of the ADC.

[0020] Preferably, the ADC is sampled at an initial sampling rate f S Sampling the periodic signal to be measured includes:

[0021] The periodic signal to be measured is input into the isolation amplifier after passing through the proportional operation circuit module. The ADC is sampled at the initial sampling rate f S The output signal of the isolation amplifier is sampled and converted into a discrete digital sequence X(n).

[0022] Preferably, the maximum modulus point is a point in the frequency domain where the frequency component has the largest amplitude in the time domain.

[0023] Preferably, according to k and f S , according to the formula Calculate the fundamental frequency f0 of the periodic signal to be measured.

[0024] According to another aspect of the present invention, there is provided a digital amplitude measurement system for a periodic signal, characterized in that it comprises:

[0025] An ADC, an FFT module and an amplitude calculation module connected in sequence, a maximum modulus detection module, a sampling rate adaptation module and an ADC timing control module connected in sequence; the output end of the FFT module is connected to the input end of the maximum modulus detection module, and the output end of the ADC timing control module is connected to the clock pin of the ADC;

[0026] The ADC is sampled at an initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n). The FFT module converts the time domain information of X(n) into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); wherein, f S Determined according to a preset spectrum resolution;

[0027] The maximum modulus detection module performs maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculates the maximum modulus value according to k and f. S Calculate the fundamental frequency f0 of the periodic signal to be measured;

[0028] The adaptive module will f SThe ADC timing control module generates the actual sampling clock of the ADC by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `;

[0029] ADC follows the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the FFT module converts the time domain information of X(n)` into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`;

[0030] The amplitude calculation module is based on the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)` re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

[0031] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0032] 1. The digital amplitude measurement method of periodic signals provided by the present invention is implemented by digital measurement. Compared with the analog circuit measurement method, it has the advantages of simple hardware, good adaptability, and strong anti-interference ability. It can measure the amplitude of any frequency component and can use digital methods to measure the amplitude of multiple frequency components of wide frequency range signals. Compared with other digital algorithm implementation methods, the method provided by the present invention adopts adaptive sampling to solve the problem of The spectrum leakage problem introduced by non-integer multiples is solved, thereby improving the measurement accuracy.

[0033] 2. In the digital amplitude measurement method for periodic signals provided by the present invention, the ADC main clock division adopts a combination of odd-even division and half-integer division to make the actual sampling rate as close to the ideal sampling rate as possible, that is, the ADC timing control module divides the ADC main clock according to the ideal sampling rate provided by the sampling rate adaptation module, and uses a combination of odd-even division and half-integer division to make the ADC sampling clock close to the ideal sampling rate, thereby reducing the error introduced by the spectrum leakage phenomenon, thereby improving the measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic flow chart of a method for measuring the digital amplitude of a periodic signal provided by the present invention;

[0035] Figure 2This is the ADC sampling timing diagram;

[0036] Figure 3 A schematic diagram of a frequency division method combining odd-even frequency division and half-integer frequency division;

[0037] Figure 4 A schematic diagram of the structure of a digital amplitude measurement system for periodic signals provided by the present invention;

[0038] Figure 5 It is a schematic diagram of the adaptive sampling process;

[0039] FIG6(a) and FIG6(b) are timing diagrams when the counter is an odd number and an even number respectively in odd-even frequency division;

[0040] Figure 7 This is the timing diagram using half-integer frequency division;

[0041] 8(a) and 8(b) are comparison diagrams of the measurement percentage error of the fundamental wave amplitude and the third harmonic amplitude using the three sampling methods of the combination of odd-even frequency division and half-integer frequency division, fixed sampling rate, and odd-even frequency division provided by the present invention, respectively. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0043] The embodiment of the present invention provides a method for measuring the digital amplitude of a periodic signal. Figure 1 As shown, including:

[0044] S1, ADC follows the initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n), and the time domain information of X(n) is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); where f S Determined by preset spectrum resolution.

[0045] The periodic signal may be a current signal or a voltage signal. For example, in harmonic analysis or speech processing, a voltage signal or a current signal is usually used; in significant target detection, a current signal is usually used; in signal anomaly detection, a voltage signal is usually used.

[0046] Specifically, the spectrum resolution Δf is set according to the minimum frequency interval expected to be distinguished in a wide frequency range. The spectrum resolution formula is:

[0047]

[0048] The base-2DIT-FFT algorithm requires that the effective sampling length N must be an integer power of 2. The initial sampling rate f is calculated using the above formula. S .

[0049] The sampling rate should satisfy Shannon's sampling theorem, that is, the sampling rate should be greater than twice the fundamental frequency of the signal to be measured. At the same time, to improve the sampling accuracy, the sampling rate should be as high as possible during the initial setting. To avoid spectrum leakage, the number of sampling cycles q should be an integer, and q should satisfy the following conditions:

[0050]

[0051] Among them, Z+ represents a positive integer, that is, q is a positive integer, f max is the maximum frequency component expected to be tested, f S.max is the maximum sampling rate of the ADC chip. According to the above conditions, the number of sampling cycles q is determined. The relationship between the effective sampling length N and the effective sampling length n per cycle is:

[0052]

[0053] According to the above formula, determine the effective sampling length n per cycle.

[0054] Preferably, the ADC is sampled at an initial sampling rate f S Sampling the periodic signal to be measured includes:

[0055] The periodic signal to be measured is input into the isolation amplifier after passing through the proportional operation circuit module. The ADC is sampled at the initial sampling rate f S The output signal of the isolation amplifier is sampled and converted into a discrete digital sequence X(n).

[0056] Specifically, the signal to be measured is input into the isolation amplifier after resistor voltage division, and the ADC samples the output signal of the isolation amplifier and converts it into a discrete digital sequence x(n); based on the radix-2DIT-FFT algorithm, the time domain information of X(n) is converted into frequency domain information to obtain the spectrum X(k):

[0057]

[0058] Where, k = 0, 1, 2…, N-1;

[0059] S2, perform maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculate the maximum modulus value according to k and f S Calculate the fundamental frequency f0 of the periodic signal to be measured.

[0060] Furthermore, the maximum modulus point is a point in the frequency domain where the frequency component with the largest amplitude in the time domain exists.

[0061] Specifically, the maximum modulus detection is performed on the output result after FFT to find the data point with the largest modulus, that is, the point in the frequency domain where the frequency component with the largest amplitude in the time domain is located. The modulus is the positive square root of the sum of the squares of the real part and the imaginary part, and the calculation formula is:

[0062]

[0063] Using the position k of the spectrum line corresponding to the maximum modulus point, the fundamental frequency of the signal to be measured is calculated as f0. The fundamental frequency calculation formula is:

[0064]

[0065] S3, adaptive adjustment of f S The actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `.

[0066] It can be understood that nf0 is an ideal sampling rate, based on which the ADC main clock is divided, and the actual sampling rate f of the ADC is determined by combining odd-even division with half-integer division. S `, making the ADC sampling clock close to the ideal sampling rate, reducing spectrum leakage and improving measurement accuracy.

[0067] Specifically, the initial sampling rate f is adaptively adjusted S is n times the fundamental frequency of the signal to be measured, that is:

[0068] f S =nf0 (7)

[0069] In addition, the actual ADC sampling clock is generated by combining odd-even division and half-integer division. The ADC sampling timing diagram is shown in Figure 2 As shown, it can be understood that the frequency division method adopted by the present invention is suitable for an ADC chip that uses the rising edge of the clock to trigger sampling.

[0070] Furthermore, the actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `, the frequency division method combining odd-even division and half-integer division is as follows Figure 3 As shown, including:

[0071] A1, use the counter count to divide the ADC main clock, and use the following formula to calculate the counter:

[0072]

[0073] Determine the relationship between the decimal part Q of the above formula and 0.25 and 0.75. If Q<0.25, proceed to step A2; if Q>0.75, proceed to step A4; otherwise, proceed to step A3.

[0074] A2, using odd-even frequency division, the counter count value is count, the actual sampling rate is:

[0075]

[0076] A3, using half-integer frequency division, the counter count value is count+0.5, the actual sampling rate is:

[0077]

[0078] A4, using odd-even frequency division, the counter count value is count, the actual sampling rate is:

[0079]

[0080] S4, ADC according to the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the time domain information of X(n)` is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`;

[0081] S5, according to the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; return S1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)` re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

[0082] Specifically, the position k1 corresponding to the target frequency component f1 is determined on the spectrum X(k) using the following formula:

[0083]

[0084] The amplitude of the spectral line x(k1) corresponding to the target frequency component f1 is calculated using the following formula:

[0085]

[0086] After the amplitude calculation is completed, return to step S1.

[0087] When the frequency of the signal to be measured changes, the amplitude of the new signal to be measured can be automatically measured by setting a loop.

[0088] The periodic signal digital amplitude measurement system provided by the present invention is described below. The periodic signal digital amplitude measurement system described below and the periodic signal digital amplitude measurement method described above can be referred to each other.

[0089] The embodiment of the present invention provides a periodic signal digital amplitude measurement system, such as Figure 4 As shown, including:

[0090] An ADC, an FFT module and an amplitude calculation module connected in sequence, a maximum modulus detection module, a sampling rate adaptation module and an ADC timing control module connected in sequence; the output end of the FFT module is connected to the input end of the maximum modulus detection module, and the output end of the ADC timing control module is connected to the clock pin of the ADC;

[0091] The ADC is sampled at an initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n). The FFT module converts the time domain information of X(n) into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); wherein, f S Determined according to a preset spectrum resolution;

[0092] The maximum modulus detection module performs maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculates the maximum modulus value according to k and f. S Calculate the fundamental frequency f0 of the periodic signal to be measured;

[0093] The adaptive module will f S The ADC timing control module generates the actual sampling clock of the ADC by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `;

[0094] ADC follows the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the FFT module converts the time domain information of X(n)` into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`;

[0095] The amplitude calculation module is based on the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)`re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

[0096] Furthermore, if Figure 4 As shown, the system further includes a proportional operation circuit module and an isolation module which are connected in sequence, and the output end of the isolation module is connected to the input end of the ADC.

[0097] Specifically, the proportional operation circuit module divides the voltage of the signal to be measured into the ADC recommended input voltage range and then inputs it into the isolation module;

[0098] The isolation module prevents the ADC from being affected by potentially destructive voltages and plays a role in impedance matching;

[0099] The ADC module, under the action of the ADC timing control module, converts the signal to be measured into a digital sequence X(n);

[0100] The ADC timing control module divides the ADC main clock by the ideal sampling rate nf0 provided by the sampling rate adaptive module, and uses a combination of odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `, making the ADC sampling clock close to the ideal sampling rate, reducing spectrum leakage and improving measurement accuracy;

[0101] The FIFO module realizes cross-clock domain data transmission, and the ADC sampling data is input into the FFT module after the FIFO is fully stored;

[0102] The FFT module performs a fast Fourier transform on the sampled signal X(n) to obtain a spectrum X(k);

[0103] The maximum modulus detection module performs maximum modulus detection on the FFT output result, finds the data point with the largest modulus, and calculates its fundamental frequency f0;

[0104] The sampling rate adaptive module uses the product of the fundamental frequency f0 obtained by the first FFT and the effective length n of each cycle sampling as the ideal sampling rate for the second sampling;

[0105] The amplitude calculation module performs amplitude calculation on the target frequency component f1 in the spectrum.

[0106] The method provided by the present invention is further illustrated by taking a specific example as follows.

[0107] This embodiment can realize the extraction of the fundamental amplitude and the third harmonic amplitude of the signal to be measured in a wide frequency range in the signal processing system based on FPGA, such as Figure 5As shown. The triangular wave has complex spectral characteristics. This embodiment uses a triangular wave as a test signal to verify the measurement effect of the present invention on the amplitude of each frequency component. In this embodiment, the initial test signal is a triangular wave with an amplitude of 5V and a frequency of 24KHz, and the FPGA control ADC module clock is set to 100MHz, including the following steps:

[0108] Step 1: Set the spectrum resolution Δf to 1kHz according to the minimum frequency interval that you want to distinguish in a wide frequency range. The spectrum resolution formula is:

[0109]

[0110] The effective sampling length N must meet the requirement that N must be an integer power of 2 when using the radix-2DIT-FFT algorithm. Take N as 1024, radix-2DIT-FFT algorithm:

[0111]

[0112] The last level of decomposition is a two-point time domain sequence. The DFT of the two-point sequence is calculated using the following formula:

[0113]

[0114] The last two points are synthesized into four points, and the synthesis is continuously pushed back. This algorithm only has one level of conversion from time domain to frequency domain. Other operations use short sequence DFT to synthesize long sequence DFT. The initial sampling rate is calculated using formula (1) to be 1.024MS / s. To avoid spectrum leakage, the number of sampling cycles q should be an integer, and q should meet the following conditions:

[0115]

[0116] Among them, f max is the maximum frequency component you want to test, f S.max is the maximum sampling rate of the ADC chip. According to the above conditions, the number of sampling cycles q is determined to be 8. The relationship between the effective sampling length N and the effective sampling length n per cycle is:

[0117]

[0118] According to the above formula, the effective sampling length n per cycle is 128;

[0119] Step 2, the signal to be measured is input into the isolation amplifier after passing through the proportional operation circuit module, the output signal of the isolation amplifier is input into the ADC for sampling, and converted into a digital sequence X1(n), and the N valid data obtained by sampling are stored in the FIFO;

[0120] Step 3: Use the radix-2DIT-FFT algorithm to transform the time domain information into frequency domain information to obtain the spectrum;

[0121] Step 4: Use formula (5) to perform maximum modulus detection on the FFT output result to find the data point with the largest modulus, that is, the point in the frequency domain where the frequency component with the largest amplitude in the time domain is located. The position k of the spectrum line corresponding to the maximum modulus point is 24. Then use formula (6) to calculate the fundamental frequency f0 of the signal to be measured to be 24kHz.

[0122] Step 5: Automatically adjust the sampling rate f S The actual sampling rate of the ADC is n times the fundamental frequency of the signal to be measured, and the odd-even division and half-integer division are combined to set the actual sampling rate of the ADC.

[0123] Step 6, repeating steps 2 and 3, that is, setting the ADC to sample the signal to be measured at the actual sampling rate, performing analog-to-digital conversion, and performing Fourier transform according to the radix-2 DIT-FFT algorithm to obtain the spectrum X(k)`;

[0124] Step 7: Determine the position k1 corresponding to the target frequency component f1 on the spectrum X(k)` using the following formula:

[0125]

[0126] The spectral line position k1 corresponding to the fundamental component is 8;

[0127] Step 8: The amplitude calculation module uses formula (13) to calculate the amplitude of the target frequency component f1 corresponding to the spectrum line X(k1)`, and obtains that the amplitude of the signal to be measured is 5.032V, with an error of 0.64%;

[0128] Step 9: After the amplitude calculation is completed, return to step 1.

[0129] Furthermore, the frequency division method combining odd-even frequency division and half-integer frequency division in step 5 is as follows: Figure 2 As shown, the specific method is:

[0130] Step 5.1, use the counter to divide the ADC module main clock, use formula (10) to calculate the counter, and judge the relationship between the decimal part Q and 0.25 and 0.75. When Q is less than 0.25, jump to step 5.2; when Q is greater than 0.75, jump to step 5.4; otherwise, jump to step 5.3;

[0131] Step 5.2, using the odd-even frequency division method, the counter count value is count, and the actual sampling rate is:

[0132]

[0133] Step 5.3, using half-integer frequency division, the counter count value is count+0.5, and the actual sampling rate is:

[0134]

[0135] Step 5.4, using the odd-even frequency division method, the counter count value is count, and the actual sampling rate is:

[0136]

[0137] Furthermore, the odd-even frequency division described in step 5.2 is as follows: Figure 6(a) , 6(b) As shown, the specific method is as follows: Determine the parity of count. When count is an odd number, keep the rising edge clock and the falling edge clock counting at the same time, and pull both the rising edge clock and the falling edge clock high. clock cycles, pull low clock cycles, and finally the rising edge and falling edge clocks are phase-ored to obtain the final output clock; when count is an even number, the rising edge clock is pulled high clock cycles, pull low clock cycles, which is the final output clock.

[0138] Furthermore, the half-integer frequency division described in step 5.3 is as follows: Figure 7 As shown, the specific method is as follows: count+0.5 division requires the use of both the rising and falling edges of the system clock. The rising edge clock pulls up count+1 clock cycles, and the falling edge clock pulls down count clock cycles, with a half clock cycle interval before and after the rising edge clock.

[0139] The frequency division method combining the above-mentioned odd-even frequency division and half-integer frequency division can effectively reduce the error between the actual sampling rate and the ideal sampling rate. In this embodiment, the ideal sampling rate is n times the fundamental frequency of the signal to be measured, that is, 3.072MS / s. If the odd-even frequency division method is used, the actual sampling rate is 3.030MS / s; if the frequency division method of the present invention is used, the actual sampling rate is 3.077MS / s, which reduces the sampling rate error and effectively reduces the spectrum leakage phenomenon.

[0140] The amplitude test results of the triangular wave test signal with a frequency of 20-30kHz and an amplitude of 5V under different frequency division modes are shown in Table 1, Table 2, and Table 3 respectively. The theoretical amplitude of the fundamental frequency of the test signal is 4.053V. The percentage error calculation formula is:

[0141]

[0142] In the above formula, V 测 is the amplitude result of the test.

[0143] Table 1 Fixed sampling rate fundamental amplitude test results

[0144]

[0145] Table 2 Odd-even frequency division fundamental wave amplitude test results

[0146]

[0147]

[0148] Table 3 Test results of fundamental amplitude combined with odd-even frequency division and half-integer frequency division

[0149]

[0150] This embodiment realizes the input of the wide frequency range of 20-30kHz and the output of the amplitude of the fundamental component. The amplitude percentage error measured by the frequency division method combining odd-even frequency division with half-integer frequency division is within the range of 0.6%. The amplitude percentage error measured by the fixed sampling rate is relatively large, and the maximum can reach 2.39%. The amplitude percentage error measured by the odd-even frequency division method is 1.70% and 1.95% at 22kHz and 24kHz, respectively. The frequency division method combining odd-even frequency division with half-integer frequency division adopted by the present invention reduces the amplitude percentage error at 22kHz and 24kHz to 0.57% and 0.32%, respectively. In addition, by changing k1, the amplitude of different frequency components can be measured. The amplitude test results of the third harmonic of the triangular wave test signal with a frequency of 20-30kHz and an amplitude of 5V are described in Tables 4, 5, and 6 respectively. The theoretical amplitude of the third harmonic of the test signal is 0.450V, and the percentage error is calculated using formula (23).

[0151] Table 4 Fixed sampling rate third harmonic amplitude test results

[0152]

[0153]

[0154] Table 5 Odd-even frequency division third harmonic amplitude test results

[0155]

[0156] Table 6 Test results of third harmonic amplitude combined with odd-even frequency division and half-integer frequency division

[0157]

[0158]

[0159] This embodiment realizes the input of a wide frequency range of 20-30kHz and the output of the third harmonic component amplitude. Figure 8(a) , 8(b)As shown, the amplitude percentage error measured by the frequency division method combining odd-even frequency division with half-integer frequency division is within 0.7%. The amplitude percentage error measured by the fixed sampling rate is relatively large, and the maximum can reach 2.22%. The amplitude percentage error measured by the odd-even frequency division method is 1.78% and 2.22% at 22kHz and 24kHz, respectively. The frequency division method combining odd-even frequency division with half-integer frequency division adopted by the present invention reduces the amplitude percentage error at 22kHz and 24kHz to 0.63% and 0.39%, respectively. In addition, by changing the spectrum resolution Δf, the amplitude of the signal to be measured in different frequency ranges can be measured.

[0160] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring the digital amplitude of a periodic signal, characterized in that: include: S1, ADC follows the initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n), and the time domain information of X(n) is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); wherein the periodic signal is a current signal or a voltage signal, f S Determined according to a preset spectrum resolution; S2, perform maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculate the maximum modulus value according to k and f S Calculate the fundamental frequency f0 of the periodic signal to be measured; S3, adaptive adjustment of f S The actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `; S4, ADC according to the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the time domain information of X(n)` is converted into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`; S5, according to the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; return S1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)` re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

2. The method according to claim 1, characterized in that The actual sampling clock of the ADC is generated by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `, including: A1, uses the counter count to divide the ADC main clock, where: If the fractional part of count Q<0.25, go to step A2; if Q>0.75, go to step A4; otherwise, go to step A3. A2, using odd-even frequency division, the counter count value is count, the actual sampling rate A3, using half-integer frequency division, the counter count value is count+0.5, the actual sampling rate A4, using odd-even frequency division, the counter count value is count, the actual sampling rate 3. The method according to claim 1 or 2, characterized in that The effective sampling length N and the effective sampling length n per cycle satisfy the following relationship: Where q is the number of sampling cycles, and q satisfies the condition f max is the maximum frequency component tested, f S.max is the maximum sampling rate of the ADC.

4. The method according to claim 1, characterized in that The ADC is sampled at an initial sampling rate f S Sampling the periodic signal to be measured includes: The periodic signal to be measured is input into the isolation amplifier after passing through the proportional operation circuit module. The ADC is sampled at the initial sampling rate f S The output signal of the isolation amplifier is sampled and converted into a discrete digital sequence X(n).

5. The method according to claim 1, characterized in that The maximum modulus point is the point in the frequency domain where the frequency component with the maximum amplitude in the time domain occurs.

6. The method according to claim 1, characterized in that According to k and f S , according to the formula Calculate the fundamental frequency f0 of the periodic signal to be measured.

7. A digital amplitude measurement system for a periodic signal, characterized in that: include: An ADC, an FFT module and an amplitude calculation module connected in sequence, a maximum modulus detection module, a sampling rate adaptation module and an ADC timing control module connected in sequence; The output end of the FFT module is connected to the input end of the maximum modulus detection module, and the output end of the ADC timing control module is connected to the clock pin of the ADC; The ADC is sampled at an initial sampling rate f S The periodic signal to be measured is sampled and converted into a discrete digital sequence X(n). The FFT module converts the time domain information of X(n) into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k); wherein, f S Determined according to a preset spectrum resolution; The maximum modulus detection module performs maximum modulus detection on X(k) to obtain the position k of the spectrum line corresponding to the maximum modulus point, and calculates the maximum modulus value according to k and f. S Calculate the fundamental frequency f0 of the periodic signal to be measured; The adaptive module will f S The ADC timing control module generates the actual sampling clock of the ADC by combining odd-even division and half-integer division to determine the actual sampling rate f of the ADC. S `; ADC according to the actual sampling rate f S `The periodic signal to be measured is sampled again and converted into a discrete digital sequence X(n)`, and the FFT module converts the time domain information of X(n)` into frequency domain information based on the base-2DIT-FFT algorithm to obtain the spectrum X(k)`; The amplitude calculation module is based on the formula Determine the position k1 corresponding to the target frequency component f1 on X(k)`; and according to the formula Determine the amplitude of the spectrum line X(k1)` corresponding to f1; where N is the effective sampling length, n is the effective sampling length per cycle, and X(k)` re and X(k)` im are the real and imaginary parts of the amplitude of the spectral line X(k)` respectively.

Citation Information

Patent Citations

  • Arbitrary integer frequency divider capable of presetting division number based on a single chip machine

    CN103138747A

  • Multi-ADC synchronization device based on phase-locked delay

    CN110350913A