Movatterモバイル変換


[0]ホーム

URL:


CN114838809B - Audio signal measuring method capable of adaptively improving frequency measurement precision - Google Patents

Audio signal measuring method capable of adaptively improving frequency measurement precision
Download PDF

Info

Publication number
CN114838809B
CN114838809BCN202210282390.0ACN202210282390ACN114838809BCN 114838809 BCN114838809 BCN 114838809BCN 202210282390 ACN202210282390 ACN 202210282390ACN 114838809 BCN114838809 BCN 114838809B
Authority
CN
China
Prior art keywords
data
frequency
value
signal
extraction number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210282390.0A
Other languages
Chinese (zh)
Other versions
CN114838809A (en
Inventor
刘静
张鹏
杨桂林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Intelligent Automation Equipment Zhuhai Co Ltd
Original Assignee
Intelligent Automation Equipment Zhuhai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Intelligent Automation Equipment Zhuhai Co LtdfiledCriticalIntelligent Automation Equipment Zhuhai Co Ltd
Priority to CN202210282390.0ApriorityCriticalpatent/CN114838809B/en
Publication of CN114838809ApublicationCriticalpatent/CN114838809A/en
Application grantedgrantedCritical
Publication of CN114838809BpublicationCriticalpatent/CN114838809B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention relates to an audio signal measuring method capable of adaptively improving frequency measuring precision, and aims to provide an audio signal measuring method capable of adaptively improving the calculating resolution of FFT processing under the condition that the sampling rate and the calculated data quantity of actual FFT processing are unchanged, so that the signal frequency detecting precision is improved. The invention comprises the following procedures: firstly, setting the sampling rate of an analog-to-digital converter, setting a deviation ratio k and a data extraction number m as 1, performing windowing processing on n data acquired during primary acquisition, performing FFT operation processing to acquire corresponding complex data, performing calibration algorithm calculation to calculate the main frequency f1 of an input signal according to acquired parameters and the data, further calculating the multiple relation x of the main frequency f1 of the input signal and the current frequency resolution fp, performing self-adaptive adjustment on the data extraction number m according to the multiple relation x and the set deviation ratio k, re-sampling to acquire a frequency value f2 with higher precision after adjustment, and outputting a measurement result after comparison. The invention is applied to the technical field of audio signal measurement.

Description

Audio signal measuring method capable of adaptively improving frequency measurement precision
Technical Field
The invention is applied to the technical field of audio signal measurement, and particularly relates to an audio signal measurement method capable of adaptively improving frequency measurement accuracy.
Background
Various electronic devices with audio input such as mobile phones and computers and various electrical appliances which are common in life have the function of audio acquisition. These audio acquisition modules require verification of their function and performance prior to shipment. Common parameters for evaluating the audio acquisition function are: the frequency of the input signal, the amplitude of the input signal, the noise floor, harmonic components, etc. The range of sound frequencies that can be distinguished for the human ear is 20-20000 Hz, so the frequency of the signal that our audio module needs to test is also in this range. According to the nyquist sampling theorem, as long as the sampling frequency is greater than or equal to twice the highest frequency of the effective signal, the sampled value may contain all information of the original signal, and the sampled signal may be restored to the original signal without distortion. During the test, the sampling frequency of the common analog-to-digital converter is 48KHz,96KHz and 192KHz. In order to verify whether the frequency of the signal collected by the audio module is accurate, the input signal needs to be converted from the time domain to the frequency domain, so that various indexes of the signal can be calculated more conveniently. The FFT (fast fourier transform) is to convert a time domain signal into a frequency domain signal, and the input parameters are: signal under test, sampling frequency.
The resolution calculation formula of the FFT processing is: fp=fs/N, where fp is the frequency resolution, fs is the sampling rate, and N is the number of data of the acquired signal. If the accuracy of measuring the signal frequency is to be improved, it is necessary to reduce the signal sampling rate or increase the number of data of the acquired signal.
For uncertainty of the front-end input signal frequency, it cannot be determined how much more proper the sampling rate is set, and when the hardware determines that the chip of the analog-to-digital converter also determines, then the sampling rate that the analog-to-digital converter can select to use is fixed. If the data volume of the acquisition signal is simply increased, more resources and cost are required.
Disclosure of Invention
The invention aims to solve the technical problem of overcoming the defects of the prior art and providing the audio signal measurement method which adaptively improves the calculation resolution of FFT processing under the condition that the sampling rate and the calculated data quantity of actual FFT processing are unchanged, thereby improving the signal frequency detection precision.
The technical scheme adopted by the invention is as follows: the audio signal measuring method comprises the following steps:
Step S1, setting a fixed sampling rate Fs for an analog-digital converter for sampling and setting a deviation ratio as k;
step 2, setting data extraction number m=1 during primary sampling, wherein the data amount sampled by the analog-to-digital converter is not processed;
s3, performing primary signal acquisition, reading N data sampled by the analog-to-digital converter and storing the N data in a memory;
Step S4, after finishing the storage, performing windowing processing on the N data, performing FFT operation processing to generate N complex-form data, and calculating the main frequency f1 of the input signal according to the sampling rate Fs of the analog-to-digital converter, the N complex-form data, the data extraction number m and a window function calibration algorithm;
Step S5, setting the multiple relation between the main frequency f1 of the input signal and the current frequency resolution fp as x, wherein x=f1/fp, fp=Fs/N, calculating the numerical value of the current multiple relation x according to the main frequency f1 of the input signal, and comparing the value of the multiple relation x with the value of the set deviation proportion k;
Step S6, when x is less than k, the main frequency f1 of the input signal is obtained according to primary sampling, the number N of primary sampling data, the set deviation proportion k and the current frequency resolution fp are subjected to adjustment of the data extraction number m, the value of the data extraction number m is subjected to value taking according to an intermediate variable N, n= (fp x k)/(N x f 1), secondary signal acquisition is performed according to the adjusted data extraction number m, new N data are obtained, and after windowing processing is performed on the new N data, FFT operation processing is performed on the new N data, so that new N complex forms of data are generated;
Step S7, calculating the main frequency f2 of the input signal according to the sampling rate Fs of the analog-to-digital converter, the new N complex data, the data extraction number m and a calibration algorithm of a window function;
And S8, calculating the numerical value of the current multiple relation x according to the main frequency f2 of the adjusted input signal, comparing the value of the multiple relation x with the value of the set deviation proportion k, and when the value of x > =k, indicating that the frequency resolution reaches the set range and outputting a measurement result, otherwise, returning to the step S6.
According to the scheme, the audio signal acquired for the first time is analyzed, and whether the second processing analysis is needed or not is judged according to the analysis result. When the extracted data value is evaluated, the multiple relation x of the main frequency f1 of the input signal and the current frequency resolution fp is adopted to be compared with a set deviation proportion k, wherein k is a user set value, and when the k value is larger, the frequency resolution fp is higher. Whether the current detection frequency meets the resolution required by the user can be automatically evaluated, and finally the accuracy of frequency calculation can be improved. And the user is not required to adjust the sampling rate of the analog-to-digital converter and the number of acquired data according to the frequency of the input signal. Wherein, the selection of the window function in step S4 and step S7 is set according to the user' S requirement.
In a preferred embodiment, the window functions in step S4 and step S7 are nuttall th-order window functions.
According to the scheme, the window function is selected according to the requirement of a user, and through selecting nuttall four third-order window functions, the purpose is to enable the side lobe attenuation of thd+n to be < -80dB, so that the measurement accuracy is ensured.
Further preferably, the calculating frequency of the calibration algorithm of the nuttall four third-order window functions includes the following steps:
Step C1, the data are processed by FFT operation and are N complex form data x+yj, the modulus p of the N complex form data is obtained by calculation,
Step C2, finding the data with the maximum modulus valueAnd the second largest data of the modulusAnd the data corresponds to a sequential position in the N dataAnd
Step C3, calculating the calibration coefficient according to the parameters
Step C4, calculating a calibration coefficient according to the parametersWhereinAll are Nuttall four-term third-order calculationsA constant of the coefficient;
Step C5, calculating the frequency f,
The above scheme shows that the frequency calibration algorithm of the FFT processing different window functions is different, and the frequency f can be calculated by selecting the calibration algorithm suitable for the FFT processing according to the window functions.
In a preferred embodiment, the value of the data extraction number m in step S6 needs to satisfy m > =n and be a divisor of the current frequency resolution fp.
According to the scheme, when the data extraction number m is set, the sampling rate is guaranteed to be an integer by limiting that the extraction number is necessarily a common divisor of the sampling rate.
In a preferred embodiment, in step S6, the method for performing secondary signal acquisition according to the adjusted data extraction number m specifically includes: and reading m data when the signal is read every time, and storing the data which is read out last in the m data read at the time in a memory, so as to obtain new N signal data after finishing N times of data storage.
According to the scheme, the data quantity actually read is N x m through the adjusted data extraction number m, the data finally obtained when the signal is read each time is taken, and more accurate sampling data is obtained through taking stable values after multiple times of reading.
Drawings
Fig. 1 is a flow chart of the present invention.
Detailed Description
As shown in fig. 1, in this embodiment, the present invention includes the steps of:
Step S1, setting a fixed sampling rate Fs for an analog-digital converter for sampling and setting a deviation ratio as k;
step 2, setting data extraction number m=1 during primary sampling, wherein the data amount sampled by the analog-to-digital converter is not processed;
s3, performing primary signal acquisition, reading N data sampled by the analog-to-digital converter and storing the N data in a memory;
Step S4, after finishing the storage, performing windowing processing on the N data, performing FFT operation processing to generate N complex-form data, and calculating the main frequency f1 of the input signal according to the sampling rate Fs of the analog-to-digital converter, the N complex-form data, the data extraction number m and a window function calibration algorithm;
Step S5, setting the multiple relation between the main frequency f1 of the input signal and the current frequency resolution fp as x, wherein x=f1/fp, fp=Fs/N, calculating the numerical value of the current multiple relation x according to the main frequency f1 of the input signal, and comparing the value of the multiple relation x with the value of the set deviation proportion k;
And S6, when x is less than k, the main frequency f1 of the input signal is obtained according to primary sampling, the number N of primary sampling data, the set deviation proportion k and the current frequency resolution fp are subjected to adjustment of the data extraction number m, the value of the data extraction number m is subjected to value taking according to an intermediate variable N, n= (fp x k)/(N x f 1), meanwhile, secondary signal acquisition is performed according to the adjusted data extraction number m, new N data are obtained, and after windowing processing is performed on the new N data, FFT operation processing is performed on the new N data, so that new N complex data are generated. The method for executing secondary signal acquisition according to the adjusted data extraction number m specifically comprises the following steps: reading m data when reading signals every time, and storing the data read out last in the m data read at the time in a memory to obtain new N signal data after finishing N times of data storage;
Step S7, calculating the main frequency f2 of the input signal according to the sampling rate Fs of the analog-to-digital converter, the new N complex data, the data extraction number m and a calibration algorithm of a window function;
And S8, calculating the numerical value of the current multiple relation x according to the main frequency f2 of the adjusted input signal, comparing the value of the multiple relation x with the value of the set deviation proportion k, and when the value of x > =k, indicating that the frequency resolution reaches the set range and outputting a measurement result, otherwise, returning to the step S6.
In this embodiment, the window functions in step S4 and step S7 select nuttall four third-order window functions, so as to achieve that the side lobe attenuation of thd+n can be < -80dB.
In addition, step S4 and step S7 may freely select a window function of a corresponding performance according to the audio signal parameter to be measured, and the example window functions are shown in table 1:
in this embodiment, the calculating frequency of the calibration algorithm of the nuttall four third-order window functions includes the following steps:
Step C1, the data are processed by FFT operation and are N complex form data x+yj, the modulus p of the N complex form data is obtained by calculation,; Wherein x in the complex form data x+yj represents the real part of the complex form data and y represents the imaginary part of the complex form data;
Step C2, finding the data with the maximum modulus valueAnd the second largest data of the modulusAnd the data corresponds to a sequential position in the N dataAnd
Step C3, calculating the calibration coefficient according to the parameters
Step C4, calculating a calibration coefficient according to the parametersWhereinAll are Nuttall four-term third-order calculationsThe constant of the coefficient is set to be,
Step C5, calculating the frequency f,
In this embodiment, the value of the data extraction number m in step S6 needs to satisfy m > =n and be a divisor of the current frequency resolution fp.
Embodiment one:
the frequency of the input audio signal is 20Hz, and the sampling number N of the data is 8192;
Comparison of conventional measurement methods:
embodiment two:
The frequency of the input audio signal is 30Hz, and the sampling number N of the data is 8192;
Comparison of conventional measurement methods:
Embodiment III:
The frequency of the input audio signal is 40Hz, and the sampling number N of the data is 8192;
Comparison of conventional measurement methods:
Conclusion: setting the sampling rate of the analog-to-digital converter, setting a deviation ratio k and setting the data extraction number m as 1, performing windowing processing on the acquired n data during primary acquisition, performing FFT operation processing to acquire corresponding complex data, performing calibration algorithm calculation to calculate the main frequency f1 of an input signal according to the acquired parameters and the data, further calculating the multiple relation x of the main frequency f1 of the input signal and the current frequency resolution fp, performing self-adaptive adjustment on the data extraction number m according to the multiple relation x and the set deviation ratio k, performing secondary sampling and screening of the sampled data through the adjusted data extraction number, and performing calculation to acquire a measured value according to a function after automatic parameter adjustment to realize self-adaptive improvement of the measurement resolution. The method and the device achieve the purpose of adaptively improving the calculation resolution of FFT processing under the condition that the sampling rate and the calculated data quantity of actual FFT processing are unchanged, and improve the signal frequency detection precision under the condition that the consumed resources and the cost are the same.

Claims (4)

Step S6, when x is less than k, the main frequency f1 of the input signal is obtained according to primary sampling, the number N of primary sampling data, the set deviation proportion k and the current frequency resolution fp are subjected to adjustment of the data extraction number m, the value of the data extraction number m is subjected to value taking according to an intermediate variable N, n= (fp x k)/(N x f 1), secondary signal acquisition is performed according to the adjusted data extraction number m, new N data are obtained, and after windowing processing is performed on the new N data, FFT operation processing is performed on the new N data, so that new N complex forms of data are generated; the value of the data extraction number m needs to satisfy m > =n and is a divisor of the current frequency resolution fp;
CN202210282390.0A2022-03-222022-03-22Audio signal measuring method capable of adaptively improving frequency measurement precisionActiveCN114838809B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210282390.0ACN114838809B (en)2022-03-222022-03-22Audio signal measuring method capable of adaptively improving frequency measurement precision

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210282390.0ACN114838809B (en)2022-03-222022-03-22Audio signal measuring method capable of adaptively improving frequency measurement precision

Publications (2)

Publication NumberPublication Date
CN114838809A CN114838809A (en)2022-08-02
CN114838809Btrue CN114838809B (en)2024-10-18

Family

ID=82562509

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210282390.0AActiveCN114838809B (en)2022-03-222022-03-22Audio signal measuring method capable of adaptively improving frequency measurement precision

Country Status (1)

CountryLink
CN (1)CN114838809B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110377873A (en)*2019-08-122019-10-25山东超越数控电子股份有限公司A kind of signal spectrum analysis method and device based on FFT
CN111308199A (en)*2020-03-122020-06-19国网湖南省电力有限公司Double spectral line interpolation DFT harmonic wave analysis method, system and medium based on spectrum resolution self-adaption

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1062963C (en)*1990-04-122001-03-07多尔拜实验特许公司Adaptive-block-lenght, adaptive-transform, and adaptive-window transform coder, decoder, and encoder/decoder for high-quality audio
DE69431223T2 (en)*1993-06-292006-03-02Sony Corp. Apparatus and method for sound transmission
US6298363B1 (en)*1997-11-132001-10-02The Johns Hopkins UniversityAdaptive windowing of FFT data for increased resolution and sidelobe rejection
JP5300188B2 (en)*2006-09-112013-09-25株式会社東芝 Ultrasonic diagnostic apparatus and control program for ultrasonic diagnostic apparatus
CN103207319A (en)*2013-03-122013-07-17广东电网公司电力科学研究院Harmonic wave measurement method of electricity signal of digital substation under non-synchronous sampling condition
CN104391282A (en)*2014-11-242015-03-04天津大学Method for improving imaging quality by spectrum correction
CN105513608B (en)*2015-07-232018-12-28中国电子科技集团公司第四十一研究所A kind of audio signal analysis method
CN105307095B (en)*2015-09-152019-09-10中国电子科技集团公司第四十一研究所A kind of high definition audio frequency measurement method based on FFT
CN107064628B (en)*2017-04-132019-08-16中国电子科技集团公司第二十四研究所High-precision frequency measurement system and method
US11290903B2 (en)*2019-07-172022-03-29SiTune CorporationSpectrum monitoring
CN112541157B (en)*2020-11-302024-03-22西安精密机械研究所Signal frequency accurate estimation method
CN113611319B (en)*2021-04-072023-09-12珠海市杰理科技股份有限公司Wind noise suppression method, device, equipment and system based on voice component

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110377873A (en)*2019-08-122019-10-25山东超越数控电子股份有限公司A kind of signal spectrum analysis method and device based on FFT
CN111308199A (en)*2020-03-122020-06-19国网湖南省电力有限公司Double spectral line interpolation DFT harmonic wave analysis method, system and medium based on spectrum resolution self-adaption

Also Published As

Publication numberPublication date
CN114838809A (en)2022-08-02

Similar Documents

PublicationPublication DateTitle
US9363599B2 (en)Systems and methods for protecting a speaker
RU2596592C2 (en)Spatial audio processor and method of providing spatial parameters based on acoustic input signal
US9357300B2 (en)Systems and methods for protecting a speaker
CN108766454A (en)A kind of voice noise suppressing method and device
CN104485117B (en)Recording equipment detection method and system
CN101674520B (en)Method and device for analyzing and testing parameters of vibrating type sound pick-up
CN116437280A (en) Method, device, device and system for evaluating consistency of microphone arrays
CN109831733A (en)Test method, device, equipment and the storage medium of audio broadcast performance
US7203324B2 (en)Audio feedback processing system
CN117171516B (en)Data optimization correction method for X-ray thickness gauge
US20200082835A1 (en)Methods and apparatus to fingerprint an audio signal via normalization
CN111641422A (en)System and method for determining self-adaptive anti-interference detection threshold of high-dynamic digital receiver
JP5627440B2 (en) Acoustic apparatus, control method therefor, and program
CN114838809B (en)Audio signal measuring method capable of adaptively improving frequency measurement precision
CN106092492B (en)A kind of filtering and noise reduction method
US11528558B2 (en)Method and an audio processing unit for detecting a tone
CN114199365A (en)Vibration signal processing method
Hall et al.Use of adaptive filtering for improved performance in digital stethoscopes
JPH1198016A (en)Evaluation device for analog-to-digital converter
TWI475870B (en)Testing apparatus and method for telephone apparatus
US12135233B2 (en)Acoustic noise detection method and system using vibration sensor to detect acoustic noise
JP2012095254A (en)Volume adjustment device, volume adjustment method, volume adjustment program and acoustic equipment
JPH11103252A (en)Device for evaluating da converter
JP2024057456A (en) Seismic intensity estimation device, seismic intensity estimation program, and seismic intensity estimation method
CN118817064A (en) A software-defined vibration sensor measurement data calibration method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp