Method for rapidly measuring resonant frequency of resonant cavity based on frequency spectrum polynomial fitting
The resonance frequency of the resonant cavity is quickly measured through a spectral polynomial fitting algorithm, which solves the problems of cumbersome steps and low efficiency of the existing method, and achieves faster and more accurate resonance frequency measurement. It is suitable for rapid frequency calibration and real-time monitoring in fields such as acoustic resonators and resonant photoacoustic spectroscopy.
Patent Information
- Application Number
- CN202510870358.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-09-26
AI Technical Summary
The existing methods for measuring the resonance frequency of a resonant cavity are complicated, inefficient, time-consuming, and unstable, making it difficult to achieve fast and accurate measurements in fields such as environmental monitoring, medical imaging, and aerospace.
The spectrum polynomial fitting algorithm is used to perform curve fitting on the mixed excitation response spectrum. The resonance frequency is quickly calculated by reducing the frequency step of the excitation signal and improving the frequency resolution of Fourier transform. The electroacoustic converter and acoustic wave sensor are used to obtain the signal, and the noise interference is eliminated by combining preamplification and bandpass filter processing.
Significantly improve the speed and accuracy of resonance frequency measurement, reduce system power consumption and computational complexity, enhance anti-interference capability, and achieve fast and accurate resonance frequency calibration and real-time monitoring.
Smart Images

Figure CN120702589A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resonance frequency measurement in an acoustic / optical sensor system, and in particular to a method for quickly measuring the resonance frequency of a resonance cavity based on spectrum polynomial fitting. Background Art
[0002] Detection technology based on the resonant frequency of a resonant cavity has been widely used in fields such as environmental monitoring, medical imaging, and aerospace. The resonant cavity's resonance enhancement effect and high resonant frequency significantly improve the signal-to-noise ratio of acoustic detection systems. Rapidly and accurately measuring the resonant frequency of the resonant cavity is key to ensuring the sensitivity and accuracy of the detection system. However, in practical applications, the resonant frequency of the resonant cavity varies nonlinearly with changes in physical quantities (such as temperature and pressure), and the presence of a large number of interfering signals in the detection environment makes it very difficult to quickly and accurately measure the resonant frequency from the response signal.
[0003] The commonly used methods for measuring the resonant frequency of a resonant cavity are mainly the following: ① The steady-state frequency sweep method is to continuously change the frequency of the excitation signal (from low to high or vice versa). When the signal frequency is consistent with the natural resonant frequency of the object, the vibration amplitude or sound pressure level of the object will appear, thereby determining the resonant frequency. This method is time-consuming. ② The phase-locked amplification method uses a phase-locked amplifier to lock the phase of the acoustic signal, and determines the resonant frequency by modulating the excitation frequency and monitoring the phase mutation point. This method has high measurement accuracy but a complex measurement process; ③ The differential acoustic resonance spectroscopy method measures the resonant frequency of the cavity by detecting the change in the resonant frequency of the cavity caused by the introduction of the sample. This method is suitable for low-frequency cavity measurements but relies on specific models and systems. In view of the limitations of existing methods, it is urgent to develop a new method for measuring the resonant frequency of a resonant cavity that is more efficient and accurate to meet the ever-evolving application needs.
[0004] The present invention proposes a method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting. The method uses a multi-spectrum polynomial fitting algorithm to perform curve fitting on the response spectrum obtained by mixing excitation, and calculates the frequency according to the fitting function to obtain the resonance frequency. The method can shorten the spectrum positioning time by reducing the frequency step of the excitation signal and the frequency resolution of the Fourier transform, thereby improving the speed and accuracy of the resonance frequency measurement. The method has the advantages of good real-time performance, fast response speed and high accuracy. The method is suitable for rapid frequency calibration and real-time monitoring in the fields of acoustic wave resonators, resonance photoacoustic spectroscopy, etc., and provides a new method for resonance frequency measurement in the fields of high-sensitivity resonance photoacoustic spectroscopy and acoustic trace gas detection. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention proposes a rapid measurement method for the resonance frequency of a resonant cavity based on spectrum polynomial fitting, which aims to solve the problems of complicated steps, low efficiency, long time, poor stability and other problems existing in the resonance frequency measurement method of a resonant cavity or a resonant photoacoustic cavity; the spectrum polynomial fitting algorithm is used to perform curve fitting on the frequency points in the mixed excitation response spectrum information, which can effectively solve the problem that the FFT sampling points are limited by the frequency step size of the excitation signal, significantly improve the resonance frequency positioning accuracy and reduce the sampling frequency of spectrum analysis, thereby improving the resonance frequency measurement accuracy and speed, while reducing system power consumption and computational complexity.
[0006] The technical solutions of the present invention are as follows:
[0007] A method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting comprises the following steps:
[0008] S1. Select an appropriate broadband signal source and electroacoustic converter based on the theoretical natural frequency of the resonant cavity and the possible drift range of the resonant frequency during the changes of various physical quantities. The signal frequency generated by the selected broadband signal source can cover the drift range of the resonant frequency of the resonant cavity.
[0009] S2, the broadband signal source transmits a mixed single-frequency sinusoidal excitation signal covering the resonant frequency drift frequency band; the excitation signal contains single-frequency signals with the same amplitude and phase, and the frequency is gradually accumulated from the lower limit to the upper limit of the drift frequency band according to the set step size, such as Figure 3 As shown;
[0010] S3, the emitted mixed single-frequency sinusoidal excitation signal drives the electroacoustic converter installed in the resonant cavity to generate sound waves. After the sound signal is amplified by resonance, it is received by the sound wave sensor to obtain a response signal, such as Figure 4 As shown;
[0011] S4. The acoustic wave sensor converts the received acoustic signal into an electrical signal. The electrical signal is converted into a digital signal through an A / D converter after passing through a preamplifier and a bandpass filter and then transmitted back to the processor. The sampling rate of the A / D converter is set to f. s ;
[0012] S5. The processor performs an FFT transform on the digital signal to obtain a spectrum signal A(k), where k=0, 1, ..., N-1 represents a frequency index and A(k) is the spectrum amplitude corresponding to the frequency. The frequency resolution of FFT is:
[0013]
[0014] Where N is the number of points in the FFT, and the frequency range is from 0 to (Nyquist frequency), because the actual sound signal is a real signal, the spectrum is symmetrical;
[0015] S6. Use the direct traversal algorithm to find the frequency point (f2, s2) with the largest amplitude in the spectrum signal A(k), and find the frequency points (f1, s1) and (f3, s3) adjacent to it on the left and right according to the frequency resolution Δf;
[0016] S7. Perform spectrum polynomial fitting on the frequency points in the spectrum signal A(k) to obtain a fitting function:
[0017] A(f)=a0+a1f+a2f 2 +...+a n f n
[0018] Where f represents the signal frequency, A(f) represents the spectrum amplitude, and a i represents the fitting coefficient, such as Figure 5 As shown;
[0019] S8. Obtain the extreme point (f0, s0) of the fitting function A(f) of the spectrum signal within the frequency range (f1, f3). The frequency f0 of this point is the resonant frequency of the resonant cavity.
[0020] Furthermore, the broadband signal source can simultaneously transmit frequency signals within the frequency band where the resonance frequency drift range is located, without the need to scan them one by one, thereby ensuring the rapidity of resonance frequency measurement.
[0021] Furthermore, since abnormal frequency points may appear in actual measurements, resulting in multiple extreme points in the fitting function A(f), and the resonant frequency only exists between frequencies f1 and f3, the extreme points of A(f) are found within the limited frequency range (f1, f3) to ensure the accuracy of the resonant frequency measurement results.
[0022] Furthermore, the electroacoustic converter can convert the mixed single-frequency signal into an acoustic wave signal of the corresponding frequency without distortion, thereby ensuring the accuracy of the excitation signal and the measurement precision of the resonance frequency.
[0023] Furthermore, the electrical signal received by the acoustic wave sensor can effectively improve the signal-to-noise ratio of the response signal after being processed by the preamplifier and the bandpass filter, so that the measurement system has better anti-interference ability and stronger robustness.
[0024] Furthermore, the spectrum polynomial fitting is the best resonance spectrum fitting algorithm determined after experimental comparison with fitting algorithms such as Gaussian fitting and Lorentz fitting, and its fitting curve has the best fitting coefficient R 2 , and the error of the resonance frequency of the resonant cavity measured based on this method is the smallest.
[0025] Furthermore, the spectrum polynomial fitting algorithm can effectively solve the defect of the mixing method being limited by the number of FFT sampling points by performing curve fitting on the spectrum signal of the response signal, which can significantly improve the resonance frequency positioning accuracy, reduce the sampling frequency of spectrum analysis and increase the resonance frequency measurement speed.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] 1. Faster response speed and higher measurement accuracy: Using a mixing signal as excitation can emit signals of all frequencies including the resonant frequency drift range at one time. Using spectrum polynomial fitting to calculate the resonant frequency can effectively reduce the number of FFT sampling points, making the present invention have the advantages of fast response speed and high accuracy.
[0028] 2. Stronger anti-interference ability and robustness: The original response signal can effectively remove the interference of noise on the response signal after pre-amplification and band-pass filtering, which is beneficial to subsequent signal processing; in addition, since the frequency range is limited to (f1, f3) in the process of calculating the resonant frequency of the fitting function, signal noise can be effectively eliminated, so that the present invention has better anti-interference ability and stronger robustness.
[0029] 3. Significantly reduce the system's computational complexity and improve the resonant frequency resolution: Curve fitting of the resonance spectrum through a spectrum polynomial fitting algorithm can solve the problems of low measurement accuracy and long measurement time of other methods, and significantly improve the accuracy of resonance frequency positioning and reduce the sampling frequency of spectrum analysis, thereby improving the measurement speed and accuracy of the resonance frequency, while reducing system power consumption and computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a flow chart of a method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting provided by the present invention.
[0031] Figure 2 The present invention provides a schematic diagram of the system structure of a method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting.
[0032] Figure 3 It is a time domain diagram of the excitation signal of the measurement system in the present invention.
[0033] Figure 4 It is a spectrum diagram of the resonance response signal of the measurement system in the present invention.
[0034] Figure 5 It is a schematic diagram of performing spectrum polynomial fitting on the resonance response spectrum of the measurement system in the present invention.
[0035] Reference numerals:
[0036] 1-MCU; 2-Low-pass filter; 3-Operational amplifier; 4-Resonant cavity; 4-1-Buffer chamber; 4-2-Buffer chamber; 5-Electroacoustic converter; 6-Acoustic wave sensor; 7-Preamplifier; 8-Bandpass filter; 9-ADC. DETAILED DESCRIPTION
[0037] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.
[0038] Implementation example Figure 2 As shown, the present invention discloses an embodiment of a method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting, which specifically includes the following contents:
[0039] 1-MCU; 2-Low-pass filter; 3-Operational amplifier; 4-Resonant cavity; 4-1-Buffer chamber; 4-2-Buffer chamber; 5-Electroacoustic converter; 6-Acoustic wave sensor; 7-Preamplifier; 8-Bandpass filter; 9-ADC.
[0040] In this preferred embodiment, the steps of implementing the present invention are as follows:
[0041] S1, MCU first outputs a PWM wave with a certain duty cycle according to the natural frequency of the resonant cavity and the drift range of the resonant frequency;
[0042] S2, PWM wave is shaped, amplified and buffered by low-pass filter and operational amplifier to generate a mixed single-frequency sinusoidal excitation signal of a certain frequency, such as Figure 3 As shown;
[0043] S3, the emitted mixed single-frequency sinusoidal signal drives the electroacoustic converter installed in the resonant cavity to produce sound, and the sound signal is amplified by resonance and received by the acoustic wave sensor to obtain a response signal, such as Figure 4 As shown;
[0044] S4, the acoustic wave sensor converts the received acoustic signal into an electrical signal, the electrical signal is converted into a digital signal by A / D after passing through a preamplifier and a bandpass filter and then transmitted back to the MCU;
[0045] S5. MCU performs FFT transformation on the digital signal to obtain a spectrum signal A(k);
[0046] S6. Use the direct traversal algorithm to find the frequency point (f2, s2) with the largest amplitude in the spectrum signal A(k), and find the frequency points (f1, s1) and (f3, s3) adjacent to it on the left and right according to the frequency resolution Δf;
[0047] S7, MCU performs spectrum polynomial fitting on the frequency points in the spectrum signal A(k) to obtain the fitting function A(f) describing the resonance spectrum, as shown in Figure 5 As shown;
[0048] S8. The MCU further obtains the extreme point (f0, s0) of the fitting function A(f) within the frequency range (f1, f3). The frequency f0 of this point is the resonant frequency of the resonant cavity.
[0049] In this preferred embodiment, the MUC, low-pass filter and operational amplifier constitute a broadband signal source, and the signal frequency generated by the broadband signal source can cover the drift range of the resonance frequency of the resonant cavity, and the selected electroacoustic converter can convert the broadband sinusoidal signal into a sound wave signal of the corresponding frequency without distortion.
[0050] In this preferred embodiment, the mixed single-frequency sinusoidal signal includes single-frequency signals with the same amplitude and phase, and the frequency is gradually accumulated from the lower limit to the upper limit of the drift frequency band according to a set step size.
[0051] In this preferred embodiment, the response signal can effectively improve the signal-to-noise ratio after being processed by the preamplifier and the bandpass filter, so that the system has better anti-interference ability and stronger robustness.
[0052] In this preferred embodiment, the broadband signal source can simultaneously transmit signals of various frequencies within the frequency band where the resonance frequency drift range is located, without the need to scan them one by one, thereby ensuring the detection speed of the system.
[0053] In this preferred embodiment, since the extreme point of the fitting function A(f) is limited to the frequency range (f1, f3), the influence of signal noise can be effectively eliminated, the accuracy of the measured resonant frequency is guaranteed, and the present invention has stronger robustness.
[0054] In this preferred embodiment, the spectrum polynomial fitting is the best resonance response spectrum fitting algorithm determined after experimental comparison with fitting algorithms such as Gaussian fitting and Lorentz fitting, and its fitting curve has the best fitting coefficient R 2 , and the resonance frequency of the resonant cavity measured based on this method has the highest accuracy.
[0055] In this preferred embodiment, the curve fitting of the resonance spectrum by the spectrum polynomial fitting can solve the problems of low measurement accuracy and long measurement time of other methods, and significantly improve the resonance frequency positioning accuracy and reduce the spectrum analysis sampling frequency, thereby improving the measurement speed and accuracy of the resonance frequency, while reducing system power consumption and computational complexity.
Claims
1. A method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting, characterized in that: The following steps are involved: S1. Select an appropriate broadband signal source and electroacoustic converter based on the theoretical natural frequency of the resonant cavity and the possible drift range of the resonant frequency caused by changes in physical quantities; S2. The broadband signal source transmits a mixed single-frequency sinusoidal signal covering the resonant frequency drift frequency band, wherein the mixed single-frequency sinusoidal signal comprises single-frequency signals with the same amplitude and phase, and the frequency is gradually accumulated from the lower limit to the upper limit of the drift frequency band according to a set step size; S3, the mixed single-frequency signal drives the electroacoustic converter installed in the resonant cavity to generate sound waves, and the sound signal is received by the sound wave sensor after resonance amplification; S4. The acoustic wave sensor converts the received acoustic signal into an electrical signal. The electrical signal is converted into a digital signal through an A / D converter after passing through a preamplifier and a bandpass filter and then transmitted back to the processor. The sampling rate of the A / D converter is f s ; S5. The processor performs an FFT transform on the digital signal to obtain a spectrum signal A(k), where k=0, 1, ..., N-1 represents a frequency index, and A(k) is a spectrum amplitude corresponding to the frequency; S6. Use the direct traversal algorithm to find the frequency point (f2, s2) with the largest amplitude in the spectrum signal A(k), and find the frequency points (f1, s1) and (f3, s3) adjacent to it on the left and right according to the frequency resolution Δf; S7, performing spectrum polynomial fitting on the frequency points in the spectrum signal A(k) to obtain a fitting function A(f); S8. Obtain the extreme point (f0, s0) of the fitting function A(f) of the spectrum signal within the frequency range (f1, f3). The frequency f0 of this point is the resonant frequency of the resonant cavity.
2. The method for rapidly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: In step S4, the electrical signal can be processed by the preamplifier and the bandpass filter to effectively improve the signal-to-noise ratio of the response signal, so that the system has better anti-interference ability and stronger robustness.
3. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: The frequency resolution of the FFT in step S5 is: Where N is the number of points in the FFT, and the frequency range is from 0 to (Nyquist frequency), because the actual sound signal is a real signal, the spectrum is symmetrical.
4. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: The fitting function in step S7 is: <h2 style=";text-align:left;direction:ltr">A(f)=a0+a1f+a2f<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> +...+a<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> f<h2 style=";text-align:left;direction:ltr"> n Where f represents the signal frequency, A(f) represents the spectrum amplitude, and a i represents the fitting coefficient.
5. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: The spectrum polynomial fitting is the best resonance spectrum fitting algorithm determined after experimental comparison with fitting algorithms such as Gaussian fitting and Lorentz fitting. Its fitting curve has the best fitting coefficient R 2 , and the error of the resonance frequency of the resonant cavity measured based on this method is the smallest.
6. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: In step S8, the extreme point of A(f) is found within the limited frequency range (f1, f3). The reason is that signal noise points may cause the fitting function A(f) to have multiple extreme points, but the resonant frequency only exists between frequencies f1 and f3. Therefore, this method can effectively eliminate signal noise, ensure the accuracy of resonant frequency measurement and improve robustness.
7. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: The broadband signal source can emit all frequency band signals including the resonance frequency drift range at one time by using a mixing signal as excitation, and the use of a fitting algorithm to process the response signal spectrum can effectively reduce the number of FFT sampling points, significantly improving the speed and accuracy of resonance frequency measurement.
8. The method for quickly measuring the resonance frequency of a resonant cavity based on spectrum polynomial fitting according to claim 1, characterized in that: The method can solve the problems of low measurement accuracy and long measurement time of other methods, and greatly improve the accuracy of resonant frequency positioning and reduce the sampling frequency of spectrum analysis, thereby improving the measurement speed and accuracy of resonant frequency, while reducing system power consumption and computational complexity.
Citation Information
Cited By
Gas detection method based on resonance fusion of acoustic signal and photoacoustic signal
CN121899027A