A method for operating a real-time one-third octave digital filter

CN122951618APending Publication Date: 2026-10-20JIANGSU ENVIRONMENTAL MONITORING CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611433053.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0007]本发明提供了一种实时三分之一倍频程数字滤波器的运行方法,用于解决传统声学分析方案中全频带统一高采样率处理导致计算资源严重浪费、实时性差的技术问题

Benefits of technology

[0018]本发明的机理如下:利用频带与采样率之间的自适应匹配机制,在确保满足抗混叠条件和统计有效性(块内样本数不少于八个)的前提下,将计算资源集中分配给真正需要高分辨率处理的低频段,而高频段则在充分降采样后的低采样率下以极低运算量完成滤波,同时通过中心对称半带滤波器的系数共享优化和双二阶节级联结构,显著降低了乘法累加次数和存储开销,从而在嵌入式平台上实现了高实时性、可逐块连续运行的三分之一倍频程声级分析;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to the field of acoustic measurement and discloses a method for operating a real-time one-third octave band digital filter to solve the problem of severe waste of computational resources caused by uniform high sampling rate processing across the entire frequency band in traditional acoustic analysis schemes. The method includes receiving a block of sound pressure digital signals; performing downsampling filtering on the signal block step by step to generate a set of multiple downsampling signals; for each one-third octave band, matching and determining the corresponding target downsampling level from the set of multiple downsampling signals based on frequency and sample quantity conditions; performing bandpass filtering to obtain a time-domain bandpass output sequence; calculating the corresponding sound level value based on the time-domain bandpass output sequence of each band, and outputting the real-time sound level result. This invention, through a multi-rate signal processing architecture, allocates the sampling rate according to frequency band requirements, reducing redundant computational overhead and significantly improving the real-time processing performance of multi-band concurrent analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of acoustic measurement, and more particularly to a method for operating a real-time one-third octave band digital filter. Background Technology

[0002] In fields such as acoustic measurement, environmental noise monitoring, audio equipment analysis, architectural acoustics, and industrial noise control, one-third octave (1 / 3 octave) spectrum analysis is a widely adopted acoustic evaluation method based on international standards. It divides the audible frequency range of 20 Hz to 20 kHz into approximately 30 frequency bands according to a logarithmic relationship. Each band has a constant center frequency to bandwidth ratio, which closely matches the non-linear perception characteristics of human ear for sound frequencies, thus providing a direct and standardized reflection of the spectral energy distribution of noise or sound signals.

[0003] With the continuous improvement of the performance of digital signal processing chips, field-programmable gate arrays (FPGAs), and embedded processors, real-time one-third octave band sound level meters based on digital filters have gradually replaced traditional analog filter bank devices, offering significant advantages such as high accuracy, low temperature drift, and flexible configurability. However, the core challenge of real-time digital implementation lies in the fact that sound pressure signals are typically converted from analog to digital at a high uniform sampling rate to cover the entire audible frequency band, while the bandwidth of different one-third octave bands spans multiple orders of magnitude, with the highest frequency band exceeding 3 kHz. This extremely wide dynamic range makes achieving real-time, high-precision, and low-latency filtering and sound level calculation across the entire frequency band with limited computing resources a key technical challenge that continues to be researched in this field.

[0004] Traditional real-time solutions typically operate all digital filters across one-third of the octave band at their original high sampling rate. While a high sampling rate is necessary for high-frequency bands, for low-frequency bands, an excessively high sampling rate results in extremely long and high-order impulse responses from the filters, leading to orders of magnitude of redundant computation. This makes it difficult for the system to run in real-time on embedded, low-power, or multi-channel parallel processing hardware platforms.

[0005] Half-band filters are among the most computationally efficient filter structures for 2x decimation scenarios due to their near-half number of coefficients being zero and their symmetry. However, in existing multi-band real-time analysis systems, the parameter design (passband / stopband boundaries, attenuation) and structural optimization (using symmetry to reduce the number of multiplications) of half-band filters are often not considered or utilized at the system level.

[0006] Therefore, we propose a real-time one-third octave band digital filter operation method to solve the above problems. Summary of the Invention

[0007] This invention provides a method for operating a real-time one-third octave band digital filter to solve the technical problems of serious waste of computing resources and poor real-time performance caused by the uniform high sampling rate processing across the entire frequency band in traditional acoustic analysis schemes.

[0008] The first aspect of this invention provides a method for operating a real-time one-third octave band digital filter. The method includes: receiving a block of sound pressure digital signals; performing downsampling filtering on the sound pressure digital signals block step by step to generate a multi-channel downsampled signal set containing multiple downsampled signal sequences, wherein the effective sampling rate of each downsampled signal sequence decreases sequentially; for each one-third octave band, determining a corresponding target downsampling level in the multi-channel downsampled signal set based on frequency and sample quantity conditions; extracting the downsampled signal sequence corresponding to the target downsampled level from the multi-channel downsampled signal set, and performing bandpass filtering on the extracted downsampled signal sequence to obtain a time-domain bandpass output sequence for that frequency band; calculating the corresponding sound level value based on the time-domain bandpass output sequence for each one-third octave band, and outputting the sound level values ​​for all frequency bands as a real-time sound level result.

[0009] Optionally, in a first implementation of the first aspect of the present invention, the method includes: The sound pressure digital signal block is used as the input signal sequence for the initial stage; For each processing stage, a low-pass filter is used to filter the input signal sequence of the current stage to obtain a low-pass filtered output sequence, and the low-pass filtered output sequence is decimated to obtain the downsampled signal sequence of that stage. The downsampled signal sequence of this level is used as the input signal sequence of the next level, and the filtering and decimation process is repeated until the preset number of levels is reached; The input signal sequence of the initial stage and the downsampled signal sequence obtained from each stage are combined to form a multi-channel downsampled signal set.

[0010] Optionally, in a second implementation of the first aspect of the present invention, the low-pass filter is a half-band low-pass filter, and the decimation process is decimation by a factor of two. The passband cutoff frequency of the half-band low-pass filter is 0.225 times the effective sampling rate corresponding to the input signal sequence of the current stage, the stopband start frequency is 0.275 times the effective sampling rate corresponding to the input signal sequence of the current stage, and the stopband attenuation is not less than 70 decibels.

[0011] Optionally, in a third implementation of the first aspect of the present invention, the length of the half-band low-pass filter is an odd number between fifteen and twenty-three, and the non-zero coefficients of the half-band low-pass filter are arranged in a centrally symmetrical manner with the center tap as the axis of symmetry. When filtering the input signal sequence of the current stage, the input samples located at the center-symmetric position are first added in pairs, then each sum is multiplied by the corresponding non-zero coefficient, and finally the products are added together to obtain the low-pass filtered output sequence.

[0012] Optionally, in a fourth implementation of the first aspect of the present invention, the method further includes: evaluating the computational overhead using a centrally symmetric folding filter time consumption model, and controlling the theoretical total time consumption obtained from the evaluation within a set reception time window; the time consumption model is: ; in, M represents the theoretical total time; B represents the preset number of levels; and B represents the total number of samples contained in the sound pressure digital signal block. This represents the number of sample pairs formed when each input sample is added together. The unit time required to perform a pairwise addition; The unit time required to perform one multiply-accumulate operation.

[0013] Optionally, in a fifth implementation of the first aspect of the present invention, each level of the downsampled signal sequence in the multi-channel downsampled signal set corresponds to a different downsampled level; determining the corresponding target downsampled level for the frequency band in the multi-channel downsampled signal set based on the frequency band condition and the sample quantity condition includes: Obtain the upper cutoff frequency of each of the three-thirds octave bands; Obtain the effective sampling rate and the number of samples included for each downsampling level; Starting from the highest downsampling level, the system judges each level downwards and determines the highest level that satisfies the condition that the upper cutoff frequency does not exceed a preset proportion of the corresponding effective sampling rate and the number of samples is not less than a preset sample number threshold. This highest level is then identified as the target downsampling level for that frequency band.

[0014] Optionally, in the sixth implementation of the first aspect of the present invention, the preset ratio is one-three-fifth, and the preset sample number threshold is eight; the step of judging step by step downward from the highest downsampling level includes: A downsampling level parameter table is pre-constructed, wherein the downsampling level parameter table records the level of each downsampling level, the corresponding effective sampling rate, and the number of samples in descending order of level; For each of the aforementioned one-third octave bands, the parameters are read line by line from the first to the last in the downsampling level parameter table. When the current line being read meets the conditions, the level of the record in that line is determined as the target downsampling level corresponding to that frequency band, and subsequent line-by-line reading of that frequency band is stopped.

[0015] Optionally, in a seventh implementation of the first aspect of the present invention, the method includes: The extracted downsampled signal sequence is input sample by sample into the bandpass filter corresponding to the frequency band for filtering to obtain the time-domain bandpass output sequence; The bandpass filter is a Butterworth bandpass filter composed of multiple cascaded double second-order sections, and the coefficients of the multiple double second-order sections are designed at the effective sampling rate corresponding to the target downsampling level.

[0016] Optionally, in an eighth implementation of the first aspect of the present invention, the Butterworth bandpass filter is a sixth-order Butterworth bandpass filter and includes three of the aforementioned double second-order sections; it also includes: Based on the poles obtained from the design of the sixth-order Butterworth bandpass filter, the poles are sorted by magnitude to obtain the pole arrangement order from the smallest magnitude to the largest magnitude. According to the pole arrangement order, the pole pair with the smallest modulus is constructed as the coefficient of the first double second-order node, the pole pair with the second smallest modulus is constructed as the coefficient of the second double second-order node, and the pole pair with the largest modulus is constructed as the coefficient of the third double second-order node. The first bisecond-order section, the second bisecond-order section, and the third bisecond-order section are connected in series in sequence.

[0017] Optionally, in a ninth implementation of the first aspect of the present invention, it further includes: By using a pre-established A-weighted correction value table, find the A-weighted correction value corresponding to the center frequency of each one-third octave band. The A-weighted correction value is added to the corresponding sound level value to obtain the A-weighted sound level value for that frequency band; The A-weighted sound level values ​​of all frequency bands are summed up, and the A-weighted real-time sound level result is output.

[0018] The mechanism of this invention is as follows: by utilizing the adaptive matching mechanism between frequency band and sampling rate, under the premise of ensuring that anti-aliasing conditions and statistical validity are met (the number of samples in the block is not less than eight), computing resources are concentrated on the low frequency band that truly needs high-resolution processing, while the high frequency band is filtered with extremely low computational load at a low sampling rate after sufficient downsampling. At the same time, through the coefficient sharing optimization of the centrally symmetric half-band filter and the double second-order cascade structure, the number of multiplication accumulations and storage overhead are significantly reduced, thereby realizing high real-time performance and block-by-block continuous operation of one-third octave band sound level analysis on an embedded platform. Beneficial effects: The mechanism of dynamically matching the lowest feasible sampling rate for each frequency band balances high-frequency anti-aliasing and low-frequency statistical effectiveness, eliminates redundant calculations across the entire frequency band, and achieves an order-of-magnitude reduction in computational complexity (several to tens of times). In embedded systems with finite word lengths, high-order IIR filters are prone to instability due to quantization errors. By sorting the poles in ascending order of magnitude before cascading, the signal first passes through a stage with a gradual gain change. This deeply integrates with the multi-sampling-rate environment, significantly improving numerical stability and dynamic range. It solves the problem of deploying high-precision filters on low-end hardware and demonstrates non-obviousness. The combination of dual-storage area alternating write mechanism and block processing, as well as the lookup application of A-weighted correction value table, eliminates the mutual waiting between data acquisition and processing, ensures true continuous real-time stream processing, and meets the requirements of low latency and no data loss in acoustic measurement. This enables real-time one-third octave band analysis, which originally required high-performance DSPs or FPGAs, to be deployed on ordinary MCUs or embedded processors at low cost and low power consumption, thus expanding the application scenarios of acoustic measurement equipment. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of an embodiment of the operation method of a real-time one-third octave band digital filter according to the present invention; Figure 2 This is a schematic diagram of another embodiment of the operation method of the real-time one-third octave digital filter in the present invention; Figure 3 This is a schematic diagram of signal reception and preprocessing, where a simulated sound pressure signal is converted into a floating-point digital signal by an analog-to-digital converter. Figure 4 This is a schematic diagram of one embodiment of the operating device of the real-time one-third octave digital filter in the present invention. Detailed Implementation

[0020] This invention provides a method for operating a real-time one-third octave band digital filter to address the technical problems of severe waste of computing resources and poor real-time performance caused by uniform high sampling rate processing across the entire frequency band in traditional acoustic analysis schemes. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the operation method of the real-time one-third octave band digital filter in this invention includes: 101. Receive a sound pressure digital signal block with a length of B.

[0022] It is understood that the executing entity of this invention can be a device for operating a real-time one-third octave band digital filter, or it can be a terminal or a server; the specific implementation is not limited here. This embodiment of the invention will be described using a server as an example.

[0023] It should be noted that in the noise monitoring system of this embodiment, the front-end measuring microphone is responsible for sensing the physical sound pressure in the environment and converting it into a continuous analog voltage signal. This analog signal is then sent to the analog-to-digital converter inside the system for digital processing.

[0024] The analog-to-digital converter is configured with a sampling rate of 48,000 Hz and a sampling bit depth of 24 bits. The system samples the analog audio signal 48,000 times per second at equal intervals, outputting a discrete digital value representing the instantaneous sound pressure level for each sample. These digital samples are continuously output to the subsequent data bus in chronological order.

[0025] In this step, the system controller predefines the length parameter B of the signal block as 4096. To receive and organize this streaming data, the system allocates a ping-pong buffer in the microprocessor's random access memory, with each half-block having a capacity that can hold exactly 4096 data points.

[0026] The specific receiving process is as follows: The system uses a direct memory access controller to move the sound pressure digital samples generated by the analog-to-digital converter one by one to the currently active receiving buffer. When the direct memory access controller writes the 4096th sound pressure digital sample to the buffer, the system hardware counter triggers a receiving completion interrupt. At this point, the 4096 digital samples arranged in sequence in the buffer constitute a complete sound pressure digital signal block of length B.

[0027] Under these parameter settings, this single sound pressure level (SPL) digital signal block contains all waveform information of the ambient sound within a time window of approximately 85.3ms. Upon receiving a completion interrupt, the system immediately transfers the memory region address pointer currently storing 4096 samples to the next-level processing module for reading and downsampling. Simultaneously, the direct memory access controller automatically stores the subsequent 4097th digital sample into the other half-empty buffer, beginning the reception loop for the next new data block. Through this mechanism, the system continuously and without frame loss receives fixed-length blocks of SPL digital signals, using 4096 samples as the basic unit.

[0028] 102. Perform half-band low-pass filtering and double decimation on the sound pressure digital signal block step by step to generate a multi-level downsampled signal sequence with the effective sampling rate halved in succession. All downsampled signal sequences constitute a multi-channel downsampled signal set.

[0029] It should be noted that the system has already received a sound pressure digital signal block with a length of 4096 sample points and an initial sampling rate of 48000Hz (here, it is regarded as the level 0 raw sequence). The system signal processor starts a step-by-step downsampling loop. To avoid boundary truncation errors and frequency leakage during cross-block processing, the system has allocated an independent historical status register for each level.

[0030] In the first-stage downsampling process, the system inputs these 4096 raw samples into a digital half-band low-pass filter. Before processing begins, the processor retrieves and loads the historical state samples retained at the end of the first-stage filtering of the previous data block to ensure absolute continuity in the time domain. The cutoff frequency of this filter is set to 1 / 4 of the current effective sampling rate (i.e., the actual cutoff frequency is approximately 12000Hz) to filter out high-frequency components and prevent aliasing. After filtering the current block, the latest state sample is saved for later use. Subsequently, the system performs a 2x decimation operation on the output data, that is, retaining one sample every other sample on the time axis. After the first-stage processing, the first-stage downsampling signal sequence is generated, with the effective sampling rate halved to 24000Hz and the number of samples in the block halved to 2048.

[0031] Next, the second level of downsampling processing is performed. The system first loads the historical state of the second level, and then takes the first level downsampled signal sequence as input. After half-band low-pass filtering with an equivalent cutoff frequency of 6000Hz and decimation by 2, the second level downsampled signal sequence is generated, with its effective sampling rate becoming 12000Hz and the number of samples in the block becoming 1024.

[0032] This state-inherited low-pass filtering and 2x decimation process is repeated continuously in a cascaded manner within the system. Taking an 8-level downsampling process extending to the lower frequency band as an example: when processing reaches the 8th level, after half-band low-pass filtering and decimation with an equivalent cutoff frequency of approximately 93.75Hz, the 8th-level downsampled signal sequence is generated, with the effective sampling rate reduced to 187.5Hz, containing 16 samples within the block. All data from levels 0 to 8 are stored in parallel in the system memory, forming a multi-channel downsampled signal set for subsequent retrieval.

[0033] 103. For each one-third octave band, select the largest downsampling level number from the set of multiple downsampled signals that simultaneously satisfies the following conditions: the cutoff frequency of the band does not exceed one-third of the effective sampling rate of the corresponding downsampled signal sequence, and the number of samples in the block of the corresponding downsampled signal sequence is not less than eight.

[0034] It should be noted that the system memory already contains a set of multiple downsampled signal sequences. Some of these sequences are listed here: Level 0 original sequence (48000Hz effective sampling rate), Level 3 sequence (6000Hz effective sampling rate, 512 samples in the current block), Level 4 sequence (3000Hz effective sampling rate, 256 samples in the current block), Level 6 sequence (750Hz effective sampling rate, 64 samples in the current block), and Level 7 sequence (375Hz effective sampling rate, 32 samples in the current block).

[0035] The system now begins searching for a matching signal source for a 1 / 3 octave band with a center frequency of 100Hz. According to acoustic standards, the upper cutoff frequency of the 100Hz band is approximately 112.2Hz. To find the maximum downsampling level number, the system processor searches in reverse order, starting with higher levels containing fewer samples and working down to lower levels: Examining the 7th-level downsampled signal sequence, multiplying its effective sampling rate of 375Hz by 1 / 3.5 yields a frequency safety threshold of approximately 107.1Hz. The upper cutoff frequency of the 100Hz band, 112.2Hz, exceeds this threshold, thus condition 1 is not met, and level 7 is rejected.

[0036] The system reverts to the previous level and examines the Level 6 sequence, whose effective sampling rate is 750Hz. Multiplying this by 1 / 3.5 yields a frequency threshold of approximately 214.3Hz. At this point, the upper limit of the frequency band does not exceed this threshold. Furthermore, the Level 6 sequence contains 64 samples, no fewer than 8, thus fulfilling the second condition. Since the investigation proceeds from high to low, Level 6 is the maximum downsampling level that simultaneously satisfies both conditions; therefore, the 100Hz frequency band is bound to the Level 6 downsampling sequence.

[0037] Similarly, the frequency band with a center frequency of 1000Hz is processed. Its upper cutoff frequency is approximately 1122Hz. When checking to level 4 (threshold approximately 857.1Hz), it was found that the requirements were not met. Returning to level 3, its effective sampling rate of 6000Hz corresponds to a threshold of approximately 1714.3Hz, which can cover the upper limit of 1122Hz, and its 512 samples within the block far exceed the requirement of 8. Therefore, the downsampling level number bound to the 1000Hz frequency band is locked to level 3, and all frequency bands in the entire system are matched independently according to this logic.

[0038] 104. For each one-third octave band, extract the downsampled signal sequence corresponding to the downsampled level number from the set of multiple downsampled signals, and input it into the sixth-order Butterworth bandpass filter corresponding to the band for sample-by-sample filtering. The sixth-order Butterworth bandpass filter is designed at the effective sampling rate of the corresponding downsampled level number and operates in a three-double second-order cascade mode to obtain the time-domain bandpass output sequence of the band.

[0039] It should be noted that for the 1 / 3 octave band with a center frequency of 100Hz, the optimal signal source has been determined to be the 6th level downsampled signal sequence.

[0040] The system processor extracts this Level 6 sequence from the set of downsampled signals in memory. Based on the pre-parameters, the effective sampling rate of this sequence is 750Hz, and the data block contains a total of 64 discrete samples.

[0041] A 6th-order Butterworth bandpass filter specifically configured for the 100Hz frequency band is used. All operational coefficients of this filter are pre-calculated strictly based on a 750Hz sampling rate. To avoid numerical stability risks associated with higher-order systems, the filter is decomposed into three dual 2nd-order sections: the 1st, 2nd, and 3rd.

[0042] The processing loop is initiated sample-by-sample: the processor reads the first sample out of 64 samples and inputs it into the first double second-order block. The arithmetic unit multiplies the current input, the historical input, and the two previous historical outputs of this block by preset coefficients and sums them to obtain the output of the first double second-order block, while simultaneously refreshing the historical status register. The output of the first double second-order block is directly used as the input of the second double second-order block, and the same multiplication and addition operation is performed; its output then enters the third double second-order block. After this first sample passes through the three cascaded modules in sequence, the value constitutes the first sample point of the 100Hz bandpass output sequence.

[0043] The above single-sample, three-section cascade processing flow is repeated for each of the 64 extracted samples. After processing the 64th sample of this data block, the system carefully saves the latest state data within the three double second-order sections for use when the next 85.3ms data block arrives. At this point, the system obtains a new sequence of 64 sample points. This sequence has been filtered to remove interference from other frequencies, retaining only the acoustic waveform characteristics of the 100Hz frequency band, and is stored in the output buffer for subsequent calculations.

[0044] 105. Calculate the mean square value within the time-domain bandpass output sequence for each third octave band, convert the mean square value into a sound level value, and output the real-time sound level results for the entire third octave band.

[0045] It should be noted that the system memory generates time-domain bandpass output sequences for each frequency band. Considering that the current 85.3ms data block is relatively short, directly calculating the mean square value is prone to significant fluctuations due to the influence of the low-frequency waveform phase. Therefore, the system introduces a time smoothing mechanism at this stage.

[0046] The system processor independently calculates the mean square value within the current block for each frequency band. Taking the 100Hz frequency band as an example, the processor squares each of the 64 samples in its sequence, sums the squares, and then divides by 64 to obtain the original mean square value of the current time block. For the 1000Hz frequency band, the same squaring and averaging operation is performed on its 512 samples.

[0047] A standard slow-speed exponential time-weighted smoothing method is introduced. The processor calculates the raw mean square value of the current 100Hz frequency band and adds it to the smoothed mean square value of the previous cycle stored in memory, weighted according to a preset time constant. Through this exponential moving average mechanism across data blocks, the system can effectively filter out drastic fluctuations caused by short time windows and output a stable and reliable equivalent smoothed mean square value. After the smoothing calculation for each frequency band is completed, the system writes its latest smoothed mean square value back to memory for use in the next cycle.

[0048] The sound level conversion stage begins. The processor divides the smoothed mean square value by the preset 20μPa reference calibration mean square value, performs a base-10 logarithmic operation on the obtained ratio, and multiplies the result by 10 to map it to the actual physical sound pressure level.

[0049] After correction and conversion, Table 1 below shows the smoothed mean square values ​​of typical frequency bands within the current period and the sound level results that strictly follow the physical logarithmic conversion relationship: Table 1 100Hz 64 0.0015 65.2dB 1000Hz 512 0.0085 72.7dB 10000Hz 4096 0.0030 68.2dB Through the above smoothing and logarithmic transformation process, the system successfully completed the mapping of the waveform to the energy distribution perceived by the human ear, and the output real-time sound level result was then sent to the display terminal or storage module.

[0050] Please see Figure 2 and Figure 3 Another embodiment of the operation method of the real-time one-third octave digital filter in this invention includes: 201. Receive a sound pressure digital signal block with a length of B.

[0051] Specifically, the system receives the original sound pressure digital sample sequence obtained after analog-to-digital conversion; performs fixed-point conversion on the original sound pressure digital sample sequence to obtain a fixed-point sound pressure digital sample sequence; and alternately writes the fixed-point sound pressure digital sample sequence into two storage areas. When the number of samples accumulated in one storage area reaches B, the B samples in that storage area are used as the current sound pressure digital signal block, and the system switches to the other storage area to continue receiving subsequent fixed-point sound pressure digital samples.

[0052] It should be noted that in the noise monitoring system of this embodiment, the environmental sound physical quantity is sensed by the measuring microphone and converted into a continuous digital signal by a high-precision analog-to-digital converter. The system receives the original sound pressure digital sample sequence obtained after analog-to-digital conversion. The sampling rate of the analog-to-digital converter is set to 48000Hz, and the output original sound pressure digital samples adopt a 32-bit single-precision floating-point format. The relative sound pressure amplitude represented by this data is normalized by the underlying hardware to the range of -1.0 to 1.0. The system continuously receives these floating-point samples at a constant rate of 48000 per second.

[0053] The system performs fixed-point conversion on the original sound pressure digital sample sequence. Since the efficiency of fixed-point integer multiplication and addition operations in the underlying digital signal processor is significantly higher than that of floating-point operations, the system needs to convert the input floating-point numbers into 32-bit signed fixed-point numbers. During the conversion, the system multiplies the value of each original floating-point sample by a scaling factor of 2147483647 and then rounds it down. When the value of a single original sound pressure floating-point sample output by the analog-to-digital converter is 0.00152588, the system multiplies it by the scaling factor and rounds it down to obtain the fixed-point value 3276800. Through this sample-by-sample multiplication and rounding mapping, the system obtains a continuous sequence of fixed-point sound pressure digital samples, preserving the dynamic range and numerical resolution required for subsequent filtering.

[0054] The fixed-point sound pressure digital sample sequence is alternately written to two independent storage areas. The system allocates two contiguous memory spaces of equal capacity within its internal high-speed random access memory, named Storage Area 1 and Storage Area 2. The system controller pre-sets the signal block length parameter B to 4096. During operation, the converted fixed-point sound pressure digital samples are sequentially stored into Storage Area 1 via a direct memory access channel. When Storage Area 1 has accumulated and written the 4096th fixed-point sample, the system determines that the area is full. At this point, these 4096 fixed-point samples together constitute the current sound pressure digital signal block of length B, which contains approximately 85.3ms of sound characteristics from the environment.

[0055] This triggers a hardware interrupt, transferring the base address of storage area one to the next-level half-band low-pass filter module for reading and processing. Within the same sampling period (approximately 20.8 μs) when storage area one is fully loaded and submitted, the system hardware bus rapidly changes the write pointer, switching to storage area two. The subsequent 4097th fixed-point sound pressure digital sample is seamlessly stored in storage area two. Once storage area two has also accumulated 4096 samples, the system also submits it as the new current signal block and switches the receive write pointer back to storage area one. Through this ping-pong alternating buffering mechanism, continuous fixed-point reception and fixed-length block segmentation of the original audio data are achieved.

[0056] 202. Perform half-band low-pass filtering and double decimation on the sound pressure digital signal block step by step to generate a multi-level downsampled signal sequence with the effective sampling rate halved in succession. All downsampled signal sequences constitute a multi-channel downsampled signal set.

[0057] Specifically, the sound pressure digital signal block is used as the zeroth-level downsampled signal sequence. In each stage of processing, a half-band low-pass filter is first used to filter the current stage input signal sequence to obtain a half-band filtered output sequence. The passband cutoff frequency of this half-band low-pass filter is 0.225 times the effective sampling rate of the current stage input, the stopband start frequency is 0.275 times the effective sampling rate of the current stage input, and the stopband attenuation is not less than 70 dB. Then, the half-band filtered output sequence is decimated by 2 to obtain the downsampled signal sequence of this stage. The downsampled signal sequence of this stage is then used as the input signal sequence of the next stage, and the filtering and decimation operations are repeated until the preset number of stages is reached. Finally, the zeroth-level downsampled signal sequence and the downsampled signal sequences generated in each stage are combined to form a multi-channel downsampled signal set.

[0058] Furthermore, the length of the half-band low-pass filter is an odd number between 15 and 23, and the non-zero coefficients are arranged in a centrally symmetrical manner with the center tap of the filter as the axis of symmetry. When performing half-band low-pass filtering on the input signal sequence of the current stage, the input samples at the centrally symmetrical positions are first added pairwise, and then each sum is multiplied by the corresponding non-zero coefficient. Finally, all products are added together to obtain the half-band filtered output sequence. This half-band filtered output sequence will be used as the input for the same stage decimation operation.

[0059] It should be noted that when a fixed-point sample data block of length B=4096 is received from the storage area, it is treated as the 0th-level downsampling signal sequence, with an effective sampling rate of 48000Hz. The system signal processor then initiates a progressive downsampling loop. To avoid boundary truncation errors and frequency leakage at the data header during cross-block processing, the system allocates an independent historical state buffer for each level to store boundary samples left over from the previous data block at the end of the filtering at that level.

[0060] In the first stage of processing, the system invokes a preset half-band low-pass filter with a length set to 19. For an input effective sampling rate of 48000Hz, the filter's passband cutoff frequency is precisely designed to be 10800Hz (0.225 times 48000Hz), the stopband start frequency is 13200Hz (0.275 times 48000Hz), and the stopband attenuation reaches 75dB. Due to the characteristics of the half-band filter, these 19 coefficients are centrally symmetrical about the 10th coefficient (center tap), with coefficients at even-numbered shifts being zero. Only 11 non-zero coefficients are actually used in the calculation: one center tap coefficient and five pairs of symmetrical non-zero coefficients.

[0061] Before filtering the current 4096 samples, the processor retrieves and loads the last 18 samples from the historical state buffer of the previous data block, concatenating them with the header of the current data block to ensure the continuity of the time-domain sequence. The processor aligns a computation window containing 19 samples with the current data segment, prioritizing the pairwise addition of two input fixed-point samples at relatively symmetrical positions (performing a total of 5 pre-additions). The resulting 5 sums are multiplied by the corresponding 5 one-sided non-zero coefficients, while the sample at the center position is multiplied by the center tap coefficient. Finally, these 6 product results are summed to output one half-band filtered output sample. After completing the calculation of one output sample, the computation window slides back 2 sample positions to achieve a 2x decimation. After traversing the current block, the system updates the last 18 samples of the data block to the historical state buffer for later use. This generates a first-level downsampled signal sequence containing 2048 samples, with the effective sampling rate halved to 24000Hz.

[0062] The first-level sequence was then used as the input to the second-level sequence, with the filter coefficients reused and its equivalent passband cutoff frequency scaled to 5400Hz. After performing the same operations of loading historical states, folding and adding, and extracting and saving states, a second-level sequence of 1024 samples was generated, with the sampling rate reduced to 12000Hz. This process was cascaded eight times, and a total of nine sets of sequences from level 0 to level 8 (187.5Hz, 16 samples) were stored in parallel in the microprocessor memory.

[0063] The system incorporates a center-symmetric folding filter time consumption model to evaluate computational overhead: ; In this formula, This represents the theoretical total time (in seconds). For a series, , The time it takes for a microprocessor to perform a pairwise addition. The time taken to perform a single multiply-accumulate operation is calibrated to 10ns. The calibration is set to 20 ns. Substitute the values: calculate the time taken to generate a single output sample. The total number of output samples calculated by the entire system is 4080. Total execution time... The time cost is 0.6936ms, which is much smaller than the 85.3ms reception time window.

[0064] 203. For each one-third octave band, select the largest downsampling level number from the set of multiple downsampled signals that simultaneously satisfies the following conditions: the cutoff frequency of the band does not exceed one-third of the effective sampling rate of the corresponding downsampled signal sequence, and the number of samples in the block of the corresponding downsampled signal sequence is not less than eight.

[0065] Specifically, the upper cutoff frequency of each one-third octave band is obtained; the effective sampling rate and the number of samples of each downsampling level in the multi-channel downsampling signal set are obtained; starting from the level with the largest downsampling level number, the process proceeds step by step to the level with the smallest downsampling level number. When the upper cutoff frequency of the frequency band does not exceed one-three-fifth of the effective sampling rate of the downsampling level, and the number of samples of the frequency band in the block of the downsampling level is not less than eight, the downsampling level number is determined as the downsampling level number corresponding to the frequency band, and the step-by-step process for the frequency band is stopped; the downsampling level numbers corresponding to all frequency bands are summarized into the allocation relationship between frequency bands and downsampling level numbers.

[0066] Furthermore, starting from the level with the largest downsampling level number, the process proceeds step-by-step from the level with the smallest downsampling level number. This includes: before starting the step-by-step process, a downsampling level parameter table is pre-constructed. The downsampling level parameter table records each downsampling level number, the effective sampling rate corresponding to that downsampling level, and the number of samples for that downsampling level within the block, in descending order of the downsampling level number. For each one-third octave band, after obtaining the upper cutoff frequency of that band, the downsampling level parameter table is read line by line from the first line to the last line. When the effective sampling rate recorded in the current line is not less than one-three-fifth of the upper cutoff frequency of that band, and the number of samples within the block recorded in that line is not less than eight, the downsampling level number recorded in that line is determined as the downsampling level number corresponding to that band, and the subsequent line-by-line reading of that band is stopped.

[0067] It should be noted that, following the previous step, a set of multiple downsampled signals from level 0 to level 8 has been generated in the system memory. To achieve matching of signal sources in each frequency band, the system internally constructs a static downsampling level parameter table. This table is strictly arranged in descending order of downsampling level number and contains 9 rows of data: the first row is level 8 (corresponding to an effective sampling rate of 187.5Hz, with 16 samples in the block); the second row is level 7 (corresponding to an effective sampling rate of 375Hz, with 32 samples in the block); the third row is level 6 (corresponding to an effective sampling rate of 750Hz, with 64 samples in the block); and so on, until the last row is level 0 (corresponding to an effective sampling rate of 48000Hz, with 4096 samples in the block).

[0068] The system then proceeds to the automatic matching stage for each 1 / 3 octave band. Taking a band with a center frequency of 100Hz as an example, the system calculates that the upper cutoff frequency of this band is approximately 112.2Hz. Next, the system reads and performs dual conditional checks line by line from top to bottom according to the constructed downsampling level parameter table: Reading the first line (level 8): The system extracts the effective sampling rate of this line as 187.5Hz, and calculates its 1 / 3.5 value as approximately 53.6Hz. Since the upper cutoff frequency of the 100Hz band, 112.2Hz, is significantly greater than 53.6Hz, the first frequency condition is not met, so the system skips this level and continues reading the next line.

[0069] Reading the second line (level 7): the effective sampling rate is extracted as 375Hz, and its 1 / 3.5 is approximately 107.1Hz. At this point, 112.2Hz is still greater than 107.1Hz, so the condition is still not met, and we continue reading downwards.

[0070] Reading the third line (level 6): the effective sampling rate is extracted to be 750Hz, and its 1 / 3.5 is approximately 214.3Hz. At this point, the upper cutoff frequency of this band, 112.2Hz, is already less than 214.3Hz, thus satisfying the first frequency threshold condition. Simultaneously, the system reads 64 samples within the block recorded in this line, exceeding the minimum requirement of 8, thus satisfying the second sample quantity condition. Since the reading proceeds line by line from largest to smallest, this indicates that the largest downsampling level sequence number that simultaneously satisfies both conditions has been found. The system then determines level 6 as the downsampling level sequence number corresponding to the 100Hz band and immediately stops subsequent line-by-line readings of this band.

[0071] Similarly, the system processes a 1 / 3 octave band with a center frequency of 1000Hz. Its upper cutoff frequency is approximately 1122Hz. The system again checks downwards from the first row of the parameter table. When it reads level 4 (effective sampling rate 3000Hz, 1 / 3.5 of which is approximately 857.1Hz), since 1122Hz is greater than 857.1Hz, the condition is not met. Continuing to read the next row, level 3, it extracts an effective sampling rate of 6000Hz, 1 / 3.5 of which is approximately 1714.3Hz. This covers the upper cutoff frequency of 1122Hz, and the number of recorded samples is 512, exceeding the requirement of 8. Therefore, the system determines level 3 as the downsampling level number corresponding to the 1000Hz band. After all bands are matched, the system solidifies these results and summarizes them to generate a table of band and downsampling level number allocation relationships.

[0072] 204. For each one-third octave band, extract the downsampled signal sequence corresponding to the downsampled level number from the set of multiple downsampled signals, and input it into the sixth-order Butterworth bandpass filter corresponding to the band for sample-by-sample filtering. The sixth-order Butterworth bandpass filter is designed at the effective sampling rate of the corresponding downsampled level number and operates in a cascaded manner of three double second-order sections to obtain the time-domain bandpass output sequence of the band.

[0073] Specifically, based on the allocation relationship, a downsampled signal sequence corresponding to the downsampled level number of each one-third octave band is extracted from the set of multiple downsampled signals; the extracted downsampled signal sequence is input sample by sample into the first of the three double second-order sections corresponding to the band to obtain the first intermediate output sequence; the first intermediate output sequence is input sample by sample into the second of the three double second-order sections corresponding to the band to obtain the second intermediate output sequence. The second intermediate output sequence is input sample by sample into the third of the three bi-second-order sections corresponding to the frequency band to obtain the time-domain bandpass output sequence of the frequency band. The coefficients of the three bi-second-order sections are converted by a sixth-order Butterworth bandpass filter designed at the effective sampling rate of the corresponding downsampling level number. The three bi-second-order sections are cascaded.

[0074] Furthermore, before the three bisecond-order sections are cascaded, the following steps are also included: based on the poles designed according to the effective sampling rate of the sixth-order Butterworth bandpass filter at the corresponding downsampling stage number, the poles are sorted by magnitude to obtain the pole arrangement order from the smallest magnitude to the largest magnitude; according to the pole arrangement order, the pole pair with the smallest magnitude is constructed as the coefficient of the first bisecond-order section, the pole pair with the second smallest magnitude is constructed as the coefficient of the second bisecond-order section, and the pole pair with the largest magnitude is constructed as the coefficient of the third bisecond-order section; the first bisecond-order section, the second bisecond-order section, and the third bisecond-order section are connected in series in sequence to obtain the cascaded bisecond-order section structure.

[0075] It should be noted that the following explanation uses a 1 / 3 octave band with a center frequency of 100Hz as an example. The system knows that the downsampling level corresponding to this band is level 6, its effective sampling rate is 750Hz, and the number of samples in the current data block is 64.

[0076] Before performing signal filtering, the system pre-designed the structured filter for this frequency band. At an effective sampling rate of 750Hz, the system designed a 6th-order Butterworth bandpass filter for the 100Hz frequency band. In the complex plane of the digital signal, this 6th-order filter has three pairs of conjugate poles. The system calculated the magnitudes of these three pairs of poles, assuming they are 0.85, 0.91, and 0.96, respectively.

[0077] The system sorts the poles by their magnitudes. Following the order from smallest to largest magnitude, the system extracts the pole pair with the smallest magnitude (0.85), converts it into digital coefficients, and assigns it to the first double second-order node; the second smallest pole pair (0.91) is converted into digital coefficients and assigned to the second double second-order node; and the pole pair with the largest magnitude and physical characteristics closest to the unit circle (0.96) is converted into digital coefficients and assigned to the third double second-order node. Since poles with larger magnitudes correspond to stronger resonance characteristics, placing them at the end of the cascaded link can effectively prevent data overflow within the filter. After configuration, the system connects these three double second-order nodes in series.

[0078] Upon entering the processing phase, the system extracts the sequence containing 64 samples from the set of multiple downsampled signals, specifically the 6th level sequence. To ensure continuity across data blocks, the processor loads the internal delay line state data left over from the previous cycle into these three dual 2nd-order sections.

[0079] After reading the first sample, the first double second-order section is input. The arithmetic unit uses this sample, the historical state loaded in the first section, and the coefficients generated by the 0.85 modulus poles to perform multiplication and addition operations, outputting the first value of the first intermediate output sequence and refreshing the status register of the first section. This value is immediately sent to the second double second-order section. After processing, the first value of the second intermediate output sequence is output, and the status register of the second section is refreshed. Then, this value enters the third double second-order section, outputting the first sample point of the 100Hz bandpass time-domain output sequence.

[0080] The above operation is repeated for each of the 64 samples. After the 64th sample of this data block is processed, the system properly saves the latest delay line status data within these three double second-order sections to an independent memory area for seamless use when the next 85.3ms data block arrives. This yields a time-domain bandpass output sequence containing 64 sample points, which is then handed over to the next stage.

[0081] 205. Calculate the mean square value within the time-domain bandpass output sequence for each third octave band, convert the mean square value into a sound level value, and output the real-time sound level results for the entire third octave band.

[0082] Specifically, the square operation is performed on each sample in the time-domain bandpass output sequence of each one-third octave band to obtain a squared sample sequence; all samples in the squared sample sequence are summed sequentially to obtain a sum of squares; the sum of squares is divided by the number of samples in the block under the corresponding downsampling level number of the frequency band to obtain the mean square value in the block of the frequency band; the mean square value in the block is divided by the square of the reference sound pressure value to obtain the energy ratio of the frequency band; the logarithm of the energy ratio is taken to the base 10, and the result is multiplied by 10 to obtain the sound level value of the frequency band; the sound level values ​​of all one-third octave bands are summed to obtain the real-time sound level result and output.

[0083] It should be noted that the time-domain bandpass output sequences for each 1 / 3 octave band within the current 85.3ms data block have been obtained. The system's built-in acoustic reference sound pressure level is a standard 20 μPa, corresponding to a squared reference sound pressure level of 0.0000000004 Pa. 2 (i.e., 4×10) -10 Pa 2 Since the data block of 85.3ms is relatively short, direct calculation and conversion are easily affected by the phase truncation of low-frequency waveforms. Therefore, the system has added a standard exponential time weighted smoothing mechanism.

[0084] Assume the monitoring environment is currently in steady-state continuous noise. Taking a frequency band with a center frequency of 100Hz as an example, the system extracts 64 samples from the sequence after the 6th level of filtering. The processor performs a squaring operation on each of these 64 discrete samples to generate a squared sample sequence, and the sum of the squares is obtained by accumulating them to obtain a sum of 0.08064 Pa. 2 Dividing the sum of squares by the sample size of 64, the original mean square value within the current block of this frequency band is calculated to be 0.00126 Pa. 2 The system incorporates a slow-speed (S mode, time constant 1s) exponential time weighting for smoothing. The processor will then apply the currently calculated 0.00126 Pa... 2 The smoothed equivalent mean square value is then weighted and accumulated with the previously stored smoothed mean square value according to a preset constant. Since it is in a steady state, the smoothed equivalent mean square value stabilizes at 0.00126 Pa. 2 The system divides the equivalent mean square value by the square of the reference sound pressure level to obtain an energy ratio of 3,150,000. Taking the logarithm to base 10 of 3,150,000 and multiplying by 10, the sound level value for the 100Hz frequency band is 65.0 dB.

[0085] For a frequency band with a center frequency of 1000Hz (containing 512 samples), the processor sums the squares of the samples to obtain a sum of squares of 4.08576 Pa. 2 Dividing by the sample size of 512, the mean square value within the block is 0.00798 Pa. 2After time smoothing, the equivalent mean square value remains at 0.00798 Pa. 2 Dividing it by the square of the reference sound pressure level gives an energy ratio of 19,950,000. Taking the logarithm and multiplying by 10 gives a sound level of 73.0 dB.

[0086] For the high-frequency band with a center frequency of 10000Hz (containing 4096 samples), the system calculates its sum of squares to be 10.32192 Pa. 2 Dividing by 4096 yields a mean square value within the block of 0.00252 Pa. 2 After time smoothing, the equivalent mean square value is 0.00252 Pa. 2 Its energy ratio is 6,300,000. Taking the logarithm and multiplying by 10 yields a sound level of 68.0 dB. The table below lists the calculated data and output results for some frequency bands: Table 2 100Hz 64 <![CDATA[0.00126Pa 2 ]]> <![CDATA[0.00126Pa 2 ]]> 3150000 65.0dB 1000Hz 512 <![CDATA[0.00798Pa 2 ]]> <![CDATA[0.00798Pa 2 ]]> 19950000 73.0dB 10000Hz 4096 <![CDATA[0.00252Pa 2 ]]> <![CDATA[0.00252Pa 2 ]]> 6300000 68.0dB After all frequency bands have been converted, the system will summarize and package this data as a real-time sound level result and output it to the next stage.

[0087] 206. Obtain the A-weighted correction value corresponding to the center frequency of each one-third octave band; add the A-weighted correction value to the real-time sound level value of that band in the real-time sound level result to obtain the A-weighted sound level value of that band; summarize the A-weighted sound level values ​​of all one-third octave bands and output the A-weighted real-time sound level result.

[0088] Furthermore, obtaining the A-weighted correction value corresponding to the center frequency of each one-third octave band includes: pre-establishing an A-weighted correction value table, which contains the correspondence between the center frequencies of all one-third octave bands and their corresponding A-weighted correction values; for each one-third octave band, finding the corresponding A-weighted correction value in the A-weighted correction value table based on the center frequency of the band to obtain the A-weighted correction value for that band.

[0089] It should be noted that within the current 85.3ms data block processing cycle, the objective linear real-time sound level results for the entire 1 / 3 octave band (i.e., unweighted Z-weighted sound pressure level) have already been calculated and output. In order to simulate the auditory characteristics of the human ear's sensitivity to different frequencies of sound, the system needs to perform A-weighted network correction on the objective sound pressure level before outputting the environmental noise evaluation index.

[0090] The system has a static A-weighted correction value table pre-built in its internal read-only memory. This table is constructed strictly according to international acoustic standards, covering the center frequencies of all 1 / 3 octave bands from low to high frequencies, and the correction parameters for human auditory response are fixed in the corresponding memory addresses.

[0091] After entering the weighting process, the processor initiates table lookup and addition correction operations for each frequency band.

[0092] Taking a frequency band with a center frequency of 100Hz as an example, the measured real-time sound level value of this band is 65.0dB. The microprocessor uses 100Hz as the index instruction to look up the A-weighted correction value table and reads the corresponding A-weighted correction value of -19.1dB. Since the human ear is relatively insensitive to low-frequency sounds, the system performs an addition operation, adding the objectively measured 65.0dB to the -19.1dB obtained from the table lookup, and calculates the A-weighted sound level value of this frequency band to be 45.9dB.

[0093] For a frequency band with a center frequency of 1000Hz, the real-time sound level measured in the previous step was 73.0dB. In acoustic specifications, 1000Hz is usually defined as a reference frequency and does not require attenuation or gain compensation. The microprocessor looks up the corresponding A-weighted correction value of 0.0dB for 1000Hz in a table. The system adds 73.0dB to 0.0dB, resulting in an A-weighted sound level value of 73.0dB for this frequency band.

[0094] For the high-frequency band with a center frequency of 10000Hz, the real-time sound level result from the previous step is 68.0dB. The microprocessor retrieves the A-weighted correction value corresponding to 10000Hz as -2.5dB by looking up a table. The system executes an addition instruction, combining 68.0dB with -2.5dB to calculate the A-weighted sound level value for this high-frequency band as 65.5dB.

[0095] The system performs the above table lookup and summation correction operations in parallel for all 1 / 3 octave bands within the operating frequency band. Table 3 below shows the conversion data from objective sound pressure level to simulated human subjective hearing level for some typical frequency bands in the current cycle: Table 3 100Hz 65.0dB -19.1dB 45.9dB 1000Hz 73.0dB 0.0dB 73.0dB 10000Hz 68.0dB -2.5dB 65.5dB After the A-weighted sound level values ​​for all frequency bands have been calculated, the processor summarizes this set of frequency band data corrected for auditory characteristics. This summarized array of frequency band sound levels constitutes the complete A-weighted real-time sound level result. The system then sends this result, along with the unweighted raw result, to the output bus for display as a histogram spectrum on the system screen, or writes it to an external memory card as data for environmental noise monitoring. The entire process, from continuous sound pressure sampling to digital filtering processing corrected for human auditory response, is then completed.

[0096] Figure 4This is a schematic diagram of the structure of a real-time one-third octave band digital filter operating device provided in an embodiment of the present invention. The real-time one-third octave band digital filter operating device 300 may include a processor 301 and a memory 302. The memory 302 is used to store program instructions and / or data, and the processor 301 is used to execute the program instructions stored in the memory 302, thereby implementing the method in the above-described method embodiment.

[0097] Optionally, the memory 302 and the processor 301 are coupled. The coupling is an indirect coupling or communication connection between devices, units, or modules, and can be electrical, mechanical, or other forms, for information interaction between devices, units, or modules.

[0098] Optionally, the operating device 300 of the real-time one-third octave band digital filter may further include a communication interface 303. The communication interface 303 is used to communicate with other devices via a transmission medium, for example, to transmit signals received from other communication devices to the processor 301, or to transmit signals from the processor 301 to other communication devices. The communication interface 303 may be a transceiver or an interface circuit, such as a transceiver circuit or a transceiver chip.

[0099] This application embodiment does not limit the specific connection medium between the processor 301, memory 302, and communication interface 303. This application embodiment... Figure 4 The processor 301, memory 302, and communication interface 303 are connected via a bus 304. Figure 4 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0100] The present invention also provides an operating device for a real-time third-octave digital filter, the operating device for the real-time third-octave digital filter including a memory and a processor, the memory storing computer-readable instructions, when the computer-readable instructions are executed by the processor, causing the processor to perform the steps of the operating method of the real-time third-octave digital filter in the above embodiments.

[0101] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the operation method of the real-time one-third octave band digital filter.

[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0104] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for operating a real-time one-third octave band digital filter, characterized in that, include: Receives digital sound pressure signal blocks; The sound pressure digital signal block is downsampled and filtered step by step to generate a multi-channel downsampled signal set containing multi-level downsampled signal sequences, wherein the effective sampling rate of each downsampled signal sequence decreases sequentially. For each one-third octave band, based on the band frequency conditions and sample quantity conditions, a corresponding target downsampling level is determined for that band in the set of multi-channel downsampling signals; Extract the downsampled signal sequence corresponding to the target downsampled level from the set of multiple downsampled signals, and perform bandpass filtering on the extracted downsampled signal sequence to obtain the time-domain bandpass output sequence of that frequency band; The corresponding sound level value is calculated based on the time-domain bandpass output sequence of each of the three-thirds octave bands, and the sound level values ​​of all bands are output as real-time sound level results.

2. The operation method of the real-time one-third octave band digital filter according to claim 1, characterized in that, include: The sound pressure digital signal block is used as the input signal sequence for the initial stage; For each processing stage, a low-pass filter is used to filter the input signal sequence of the current stage to obtain a low-pass filtered output sequence, and the low-pass filtered output sequence is decimated to obtain the downsampled signal sequence of that stage. The downsampled signal sequence of this level is used as the input signal sequence of the next level, and the filtering and decimation process is repeated until the preset number of levels is reached; The input signal sequence of the initial stage and the downsampled signal sequence obtained from each stage are combined to form a multi-channel downsampled signal set.

3. The operation method of the real-time one-third octave band digital filter according to claim 2, characterized in that, The low-pass filter is a half-band low-pass filter, and the decimation process is a 2x decimation. The passband cutoff frequency of the half-band low-pass filter is 0.225 times the effective sampling rate corresponding to the input signal sequence of the current stage, the stopband start frequency is 0.275 times the effective sampling rate corresponding to the input signal sequence of the current stage, and the stopband attenuation is not less than 70 decibels.

4. The operation method of the real-time one-third octave band digital filter according to claim 3, characterized in that, The length of the half-band low-pass filter is an odd number between fifteen and twenty-three, and the non-zero coefficients of the half-band low-pass filter are arranged in a centrally symmetrical manner with the center tap as the axis of symmetry. When filtering the input signal sequence of the current stage, the input samples located at the center-symmetric position are first added in pairs, then each sum is multiplied by the corresponding non-zero coefficient, and finally the products are added together to obtain the low-pass filtered output sequence.

5. The operation method of the real-time one-third octave band digital filter according to claim 4, characterized in that, Also includes: The computational overhead is evaluated using a centrally symmetric folding filter time consumption model, and the estimated total theoretical time consumption is controlled within a set reception time window; the time consumption model is as follows: ; in, M represents the theoretical total time; B represents the preset number of levels; and B represents the total number of samples contained in the sound pressure digital signal block. This represents the number of sample pairs formed when each input sample is added together. The unit time required to perform a pairwise addition; The unit time required to perform one multiply-accumulate operation.

6. The method for operating a real-time one-third octave band digital filter according to claim 1, characterized in that, The downsampled signal sequences at each level in the multi-channel downsampled signal set correspond to different downsampled levels; determining the target downsampled level for the frequency band in the multi-channel downsampled signal set based on frequency band conditions and sample quantity conditions includes: Obtain the upper cutoff frequency of each of the three-thirds octave bands; Obtain the effective sampling rate and the number of samples included for each downsampling level; Starting from the highest downsampling level, the system judges each level downwards and determines the highest level that satisfies the condition that the upper cutoff frequency does not exceed a preset proportion of the corresponding effective sampling rate and the number of samples is not less than a preset sample number threshold. This highest level is then identified as the target downsampling level for that frequency band.

7. The operation method of the real-time one-third octave band digital filter according to claim 6, characterized in that, The preset ratio is one-three-fifths, and the preset sample number threshold is eight. The process of judging step by step from the highest downsampling level includes: A downsampling level parameter table is pre-constructed, wherein the downsampling level parameter table records the level of each downsampling level, the corresponding effective sampling rate, and the number of samples in descending order of level; For each of the aforementioned one-third octave bands, the parameters are read line by line from the first to the last in the downsampling level parameter table. When the current line being read meets the conditions, the level of the record in that line is determined as the target downsampling level corresponding to that frequency band, and subsequent line-by-line reading of that frequency band is stopped.

8. The method for operating a real-time one-third octave band digital filter according to claim 1, characterized in that, include: The extracted downsampled signal sequence is input sample by sample into the bandpass filter corresponding to the frequency band for filtering to obtain the time-domain bandpass output sequence; The bandpass filter is a Butterworth bandpass filter composed of multiple cascaded double second-order sections, and the coefficients of the multiple double second-order sections are designed at the effective sampling rate corresponding to the target downsampling level.

9. The method for operating a real-time one-third octave band digital filter according to claim 8, characterized in that, The Butterworth bandpass filter is a sixth-order Butterworth bandpass filter and includes three of the aforementioned double second-order sections; it also includes: Based on the poles obtained from the design of the sixth-order Butterworth bandpass filter, the poles are sorted by magnitude to obtain the pole arrangement order from the smallest magnitude to the largest magnitude. According to the pole arrangement order, the pole pair with the smallest modulus is constructed as the coefficient of the first double second-order node, the pole pair with the second smallest modulus is constructed as the coefficient of the second double second-order node, and the pole pair with the largest modulus is constructed as the coefficient of the third double second-order node. The first bisecond-order section, the second bisecond-order section, and the third bisecond-order section are connected in series in sequence.

10. The method for operating a real-time one-third octave band digital filter according to claim 1, characterized in that, Also includes: By using a pre-established A-weighted correction value table, find the A-weighted correction value corresponding to the center frequency of each one-third octave band. The A-weighted correction value is added to the corresponding sound level value to obtain the A-weighted sound level value for that frequency band; The A-weighted sound level values ​​of all frequency bands are summed up, and the A-weighted real-time sound level result is output.