Real-time digital audio filtering system and implementation method thereof
By combining a high- and low-cutoff filter bank composed of multi-stage low-pass filter units with a subtractor and a sampling rate converter, the bandwidth adjustment problem in real-time digital audio systems is solved, achieving flexible bandwidth control and low-latency, low-computation filtering effects, which is suitable for a variety of digital audio systems.
Patent Information
- Application Number
- CN202511165902.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-19
AI Technical Summary
In real-time digital audio processing systems, existing technologies struggle to flexibly adjust bandwidth. Using a single FIR filter results in significant delays and computational burdens, while using an IIR filter leads to poor stability and difficulty in meeting the requirements of various frequency bands.
A high- and low-cutoff filter bank composed of multi-stage low-pass filter units is adopted, combined with a subtractor, a sampling rate synchronization interpolator and a sampling rate converter, and the filter combination is realized through an FIR low-pass filter to control the filtering bandwidth. Low-order FIR filters are used to reduce time delay and computation.
It achieves flexible bandwidth adjustment, low latency, low computational load, linear phase distortion-free output signal, and good versatility, making it suitable for various real-time digital audio systems.
Smart Images

Figure CN121173253A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of digital audio system, and particularly relates to a real-time digital audio filter system and an implementation method thereof. BACKGROUND
[0002] In a digital audio processing system, a digital filter is a common application, which can filter out noise, interference, and extract useful frequency bands. Generally, a digital filter is classified into a FIR (Finite Impulse Response) filter and an IIR (Infinite Impulse Response) filter from the type, and is classified into a low-pass filter, a high-pass filter, and a band-pass filter from the passband range.
[0003] Generally, in a digital filter system, when different frequency band ranges need to be met, a large number of filter coefficients must be generated and stored in advance; when a narrow bandwidth needs to be processed, a single FIR filter is used, and a large order is required, which will increase the system delay and operation amount, and a single IIR filter is used, which has poor system stability and nonlinear phase, and is difficult to be practically applied. In a real-time audio processing system, the above problems will become more prominent, greatly increasing the implementation difficulty and reliability of the system. SUMMARY
[0004] The technical problem to be solved by the present application is to provide a real-time digital audio filter system and an implementation method thereof, which only needs to design a small number of low-pass filters to meet different bandwidth requirements, and has flexible and convenient bandwidth adjustment; the filters used are low-order FIR filters, so that the system has less time delay and small operation amount, and the output signal is linear phase without distortion, and the present application also has good universality, and can be applied to other real-time digital audio systems after simple adjustment of the filter cutoff frequency.
[0005] The technical solution of the present application is to provide a real-time digital audio filter system, which is composed of a high and low cutoff filter group module, a subtracter module, a sampling rate synchronous interpolator module, and a sampling rate converter module; wherein,
[0006] The high and low cutoff filter groups are each composed of multiple low-pass filter units, and each low-pass filter unit is composed of multiple FIR low-pass filters;
[0007] The sampling rate synchronous interpolator is used to synchronize the frequencies of the high and low cutoff filter group output signals;
[0008] The subtracter is used to generate a filter bandwidth, which is obtained by subtracting the low cutoff filter group output signal from the high cutoff filter group output signal;
[0009] The sampling rate conversion interpolator converts the sampling rate of the subtracter output into the output sampling rate of the digital filter system.
[0010] As preferred, each low-pass filter unit is identical, and the pre-generated FIR low-pass filter coefficients correspond to the low-pass filter one by one, and the sampling frequency of the output signal of each low-pass filter unit will be reduced to 1 / 2 of the input sampling rate. The number of FIR low-pass filters determines the selectable number of filter bandwidths.
[0011] As preferred, the number of low-pass filter units used by the high and low cut-off filter group is determined by the high and low cut-off frequencies of the processing band.
[0012] As preferred, a delay device is further included, which is used to buffer the output signal of the high and low cut-off filter group, so that the output signals of the high and low cut-off filter group are synchronized in time.
[0013] As preferred, in the high and low cut-off filter group, assuming that the number of stages of the high cut-off filter group is P, and the number of stages of the low cut-off filter group is Q, then P≥Q. For example, if a signal in the band [FL FH] is needed, the number of stages of the high cut-off filter group is equal to the number of low-pass filter units P (the unit in which the high cut-off frequency closest to FH in Table 1); and the number of stages of the low cut-off filter group is equal to the number of low-pass filter units Q (the unit in which the low cut-off frequency closest to FL in Table 1). Generally, P≥Q. By selecting the number of stages of the high and low cut-off filter group, and the number of filters in the filter unit, the output bandwidth of the filter system is controlled.
[0014] As preferred, the delay time of the delay device is determined by the value of P-Q and the order of the FIR filter; if P=Q, then no delay device is needed.
[0015] As preferred, the sampling rate of the output signal of the low cut-off filter group is lower than that of the high cut-off filter group, and the sampling frequencies of the two are unified through interpolation processing; if P=Q, then no sampling rate synchronization interpolator is needed.
[0016] As preferred, the output sampling rate of the digital filter system is an integer multiple of the output sampling rate of the subtractor, which is realized by interpolation processing.
[0017] Further, the present application also provides an implementation method of the real-time digital audio filter system as described above, comprising the following steps,
[0018] Step 1, determining the number N of filter units in the high and low filter group according to actual needs unit The number of filters contained in each filter unit is N filter The cut-off frequency is The cut-off frequency of the output signal of the nth-stage filter unit can be expressed as:
[0019] f1 n = F s / 2 n *ω1
[0020]
[0021] …
[0022]
[0023] where F s is the original sampling rate of the input signal, nmaxis N unit , thus the digital audio filter system can select two of the N unit * N filter cut-off frequencies to form the filter bandwidth;
[0024] Step 2: According to the required filter band [FL FH], determine the order P, Q of the high and low cut-off filter sets, as follows,
[0025]
[0026] where [] represents rounding; calculate the minimum value of FH, FL and the P, Q order filter cut-off frequency, then the cut-off frequency number corresponding to minP, minQ is the filter number m selected by the high and low filter sets h , m l , as follows,
[0027]
[0028] Step 3: The input signal passes through the high cut-off filter set, P order FIR low-pass filtering and 2:1 decimation, and the filter coefficients corresponding to the number m h are used for filtering; the sampling rate of the output signal X fout of the high cut-off filter set is F s / 2 P ; assuming that the input signals of each filter set unit are X(n), X1(n), …, X P-1 (n) in turn, the filter is h mh , the filter order is K, and the number of X(n) data points is N, then the output of each filter unit of the high cut-off filter set is:
[0029]
[0030] …
[0031]
[0032] X fout (n)=X p (n) n=0,1,…,N / 2 P
[0033] Step 4: according to the value of P-Q and the order of the FIR filter, delaying the output signal X of the cut-off filter bank fout ; out if P=Q, no delay is needed;
[0034] Step 5: the input signal is filtered by a low cut-off filter bank, and Q-stage FIR low-pass filtering and 2:1 decimation are performed, the filter uses the filter coefficient numbered m l ; the output signal Y of the low cut-off filter bank fout has a sampling rate of F s / 2 Q ; assuming that the input signals of each filter bank unit are Y(n), Y1(n), …, Y Q-1 (n) in turn, the filter is h ml , the filter order is K, and the number of Y(n) data points is N, then the output of each filter unit of the low cut-off filter bank is:
[0035]
[0036] …… ……
[0037]
[0038] Y fout (n)=Y Q (n) n=0, 1, …, N / 2 Q
[0039] Step 6: the output signal Y of the low cut-off filter bank fout is interpolated by 2 Q-P times, so that the sampling rate is increased to the same as that of X fout , and the output signal Y out ; if P=Q, no interpolation is needed;
[0040] Step 7: the signals X out and Y out enter a subtractor to perform subtraction, i.e. X out -Y out , and the output signal Z has a sampling frequency of F s / 2 P ;
[0041] Step 8: the signal Z enters a sampling rate converter to convert the sampling frequency F s / 2 P to the required output signal sampling rate F s1 ; the sampling rate conversion is interpolation operation, and the frequency band of the output signal of the digital audio filtering system is [FL FH] at this time.
[0042] Compared with the prior art, the present application has the following advantages:
[0043] The present application only needs to design a small number of low-pass filters to cope with different bandwidth requirements, and the bandwidth adjustment is flexible and convenient; the filters used are all low-order FIR filters, with less time delay and small amount of calculation, and the output signal is linear phase without distortion; and the present application has good versatility and can be applied to other real-time digital audio systems after adjusting the filter cutoff frequency. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 is a system block diagram of the present application. DETAILED DESCRIPTION
[0045] As shown in Figure 1 a real-time digital audio filtering system, which is composed of high and low cutoff filter group modules, subtracter modules, sampling rate synchronous interpolator modules, and sampling rate converter modules; wherein,
[0046] The high and low cutoff filter groups are both composed of multiple low-pass filter units, and each low-pass filter unit is composed of multiple FIR low-pass filters;
[0047] The sampling rate synchronous interpolator is used to synchronize the frequencies of the high and low cutoff filter group output signals;
[0048] The subtracter is used to generate the filtering bandwidth, which is obtained by subtracting the low cutoff filter group output signal from the high cutoff filter group output signal;
[0049] The sampling rate conversion interpolator converts the sampling rate of the subtracter output into the output sampling rate of the digital filtering system.
[0050] As a preferred mode, it further includes a delay device, which is used to buffer the high and low cutoff filter group output signals to synchronize the high and low cutoff filter group output signals in time.
[0051] In the high and low cutoff filter groups, assuming that the number of stages of the high cutoff filter group is P and the number of stages of the low cutoff filter group is Q, then P≥Q. For example, to obtain a signal with a frequency band [FL FH], the number of stages of the high cutoff filter group is equal to the number of low-pass filter units P (the unit in which the high cutoff frequency closest to FH in Table 1); and the number of stages of the low cutoff filter group is equal to the number of low-pass filter units Q (the unit in which the low cutoff frequency closest to FL in Table 1). Generally, P≥Q.
[0052] The filtering bandwidth provided by the present application can be any combination of the high and low cutoff frequencies in Table 1, but it needs to meet the condition that the high cutoff frequency is greater than the low cutoff frequency.
[0053] Table 1: High and low cutoff frequency table
[0054]
[0055]
[0056] Both the high and low cutoff filter banks consist of multiple stages of low-pass filter units, and each stage of the low-pass filter unit comprises multiple FIR low-pass filters. All filter units are identical, and the pre-generated FIR low-pass filter coefficients correspond one-to-one with the low-pass filters. The sampling frequency of the output signal of each stage of the low-pass filter unit will be reduced to half of the input sampling rate.
[0057] In one implementation, the number of low-pass filter stages used in the high and low cutoff filter banks is determined by the high and low cutoff frequencies of the processing frequency band.
[0058] In one implementation, the delay time of the delay unit is determined by the value of PQ and the order of the FIR filter; if P = Q, then no delay unit is needed.
[0059] As one implementation method, the sampling rate of the output signal of the low cutoff filter bank is lower than that of the high cutoff filter bank. The sampling frequencies of the two are unified through interpolation. If P = Q, then there is no need to go through the sampling rate synchronization interpolator.
[0060] In addition, the output sampling rate of the digital filtering system is an integer multiple of the output sampling rate of the subtractor, which is achieved by interpolation.
[0061] The present invention also provides a method for implementing the real-time digital audio filtering system as described above, comprising the following steps:
[0062] Step 1: Determine the number N of filter units in the high and low filter banks according to actual needs. unit Each filter unit contains N filters. filter With cutoff frequency The cutoff frequency of the output signal of the nth stage filter unit can be expressed as:
[0063] f1 n =F s / 2 n *ω1
[0064]
[0065] ...
[0066]
[0067] Among them, F s The original sampling rate of the input signal is n, which is at most N. unit Therefore, digital audio filtering systems can be used in N unit *N filter Choose two cutoff frequencies and combine them to form the filter bandwidth;
[0068] Step 2: According to the required filter band [FL FH], determine the number of stages P, Q of the high and low cutoff filter set, as follows,
[0069]
[0070] Where [ ] represents rounding; calculate the minimum value of FH, FL and the filter cutoff frequency of the P, Q stage, then the cutoff frequency number corresponding to minP, minQ is the filter number m selected by the high and low filter set h , m l , as follows,
[0071]
[0072] Step 3: The input signal passes through the high cutoff filter set, and P-stage FIR low-pass filtering and 2:1 decimation are performed, and the filter coefficients with number m h corresponding to are used for filtering; the output signal X fout of the high cutoff filter set has a sampling rate of F s / 2 P ; assuming that the input signals of each filter set unit are X(n), X1(n), …, X P-1 (n) in turn, the filter is h mh , the filter order is K, and the number of X(n) data points is N, then the output of each filter unit of the high cutoff filter set is:
[0073]
[0074] …… …
[0075]
[0076] X fout (n) = X p (n) n = 0, 1, …, N / 2 P
[0077] Step 4: Delay the output signal X fout of the cutoff filter set according to the values of P-Q and the order of the FIR filter, and output the signal X out ; if P = Q, no delay is needed;
[0078] Step 5: The input signal passes through the low cutoff filter set, and Q-stage FIR low-pass filtering and 2:1 decimation are performed, and the filter coefficients with number m l corresponding to are used for filtering; the output signal Y fout of the low cutoff filter set has a sampling rate of F s / 2 Q;Assume that the input signals of each filter unit of the filter bank are Y(n), Y1(n),…, Y Q-1 (n) in turn, the filter is h ml , the filter order is K, and the number of Y(n) data points is N, then the output of each filter unit of the low cut-off filter bank is:
[0079]
[0080] …
[0081]
[0082] Y fout (n) = Y Q (n) n = 0, 1,…, N / 2 Q
[0083] Step 6: 2 fout times interpolation is performed on the output signal Y Q-P of the low cut-off filter bank, the sampling rate is increased to the same as that of X fout , and the output signal Y out is output; if P = Q, no interpolation is needed.
[0084] Step 7: the signals X out and Y out enter a subtractor to perform subtraction, i.e., X out -Y out , and the output signal Z is output, with a sampling frequency of F s / 2 P .
[0085] Step 8: the signal Z enters a sampling rate converter to convert the sampling frequency F s / 2 P to the required output signal sampling rate F s1 . The sampling rate conversion is interpolation operation, and the frequency band of the output signal of the digital audio filter system is [FL FH] at this time.
[0086] The present application only needs to design a small number of low pass filters and store their coefficients, so that the filter frequency band can be flexibly adjusted. For example, in a system with N filter units and M filters, only M sets of filter coefficients need to be designed and stored, and at most N 2 M(M-1) filter frequency band combinations can be generated, so that the needs of various filter bandwidths can be met. In the present application, low-order FIR filters are used, with less time delay and small operation amount, and the output signal is linear phase and distortion-free. The present application also has good versatility, and can be adapted to different digital audio filter systems by adjusting the filter unit number N, the filter number M, and the filter cut-off frequency.
[0087] The above description is only for the preferred embodiments of the present application, but should not be understood as a limitation to the claims. Any equivalent changes made according to the description of the present application are included in the patent protection scope of the present application.
Claims
1. A real-time digital audio filtering system, characterized in that: It consists of a high and low cutoff filter bank module, a subtractor module, a sampling rate synchronization interpolator module, and a sampling rate converter module; among which, Both the high and low cutoff filter banks are composed of multiple low-pass filter units, and each low-pass filter unit is composed of multiple FIR low-pass filters. The sampling rate synchronization interpolator is used to synchronize the frequency of the output signals of the high and low cutoff filter banks. The subtractor is used to generate the filter bandwidth, which is obtained by subtracting the output signal of the cutoff filter bank from the output signal of the high cutoff filter bank; The sampling rate conversion interpolator converts the subtractor's output sampling rate to the digital filter system's output sampling rate.
2. The real-time digital audio filtering system according to claim 1, characterized in that: Each low-pass filter unit is identical, and the pre-generated FIR low-pass filter coefficients correspond one-to-one with the low-pass filter. The sampling frequency of the output signal of each low-pass filter unit will be reduced to 1 / 2 of the input sampling rate.
3. The real-time digital audio filtering system according to claim 1, characterized in that: The number of low-pass filter stages used in high and low cutoff filter banks is determined by the high and low cutoff frequencies of the processing frequency band.
4. The real-time digital audio filtering system according to claim 1, characterized in that: It also includes a delay unit, which is used to buffer the output signals of the high and low cutoff filter banks so that the output signals of the high and low cutoff filter banks are synchronized in time.
5. The real-time digital audio filtering system according to claim 4, characterized in that: In high-cutoff and low-cutoff filter banks, assuming the high-cutoff filter bank has an order of P and the low-cutoff filter bank has an order of Q, then P ≥ Q.
6. The real-time digital audio filtering system according to claim 5, characterized in that: The delay time of the delay unit is determined by the value of PQ and the order of the FIR filter; if P = Q, then no delay unit is needed.
7. The real-time digital audio filtering system according to claim 5, characterized in that: The sampling rate of the output signal of the low cutoff filter bank is lower than that of the high cutoff filter bank. Interpolation is used to unify the sampling frequencies of the two. If P = Q, then there is no need to go through the sampling rate synchronization interpolator.
8. The real-time digital audio filtering system according to claim 1, characterized in that: The output sampling rate of the digital filtering system is an integer multiple of the subtractor's output sampling rate, achieved through interpolation.
9. A method for implementing the real-time digital audio filtering system as described in any one of claims 1-8, characterized in that: Includes the following steps, Step 1: Determine the number N of filter units in the high and low filter banks according to actual needs. unit Each filter unit contains N filters. filter With cutoff frequency The cutoff frequency of the output signal of the nth stage filter unit can be expressed as: f1 n =F s / 2 n *ω1 …… Among them, F s The original sampling rate of the input signal is n, which is at most N. unit ; Step 2: Determine the order P and Q of the high and low cutoff filter banks based on the required filtering bandwidth [FL FH], as shown below. Where [] denotes rounding; calculate the minimum values of FH, FL and the cutoff frequencies of the P and Q stages of the filter, then the cutoff frequency numbers corresponding to minP and minQ are the filter numbers m selected by the high and low filter banks. h m l As shown below, Step 3: The input signal passes through a high-cutoff filter bank, undergoing P-stage FIR low-pass filtering and 2:1 downsampling. The filter uses filter number m. h The corresponding filter coefficients; the output signal X of the high cutoff filter bank. fout The sampling rate is F s / 2 P Assume the input signals of each filter group unit are X(n), X1(n), ..., Xn, respectively. P-1 (n), filter is h mh If the filter order is K and the number of data points X(n) is N, then the output of each filter unit in the high cutoff filter bank is: X fout (n)=X p (n)n=0,1,…,N / 2 P Step 4: Based on the values of PQ and the order of the FIR filter, adjust the output signal X of the cutoff filter bank. fout Delay the output signal X out If P = Q, then no delay is needed. Step 5: The input signal passes through a low-cutoff filter bank, undergoing Q-stage FIR low-pass filtering and 2:1 downsampling. The filter uses filter number m. l The corresponding filter coefficients; the output signal Y of the low-cutoff filter bank fout The sampling rate is F s / 2 Q Assume the input signals of each filter group unit are Y(n), Y1(n), ..., Y2(n) respectively. Q-1 (n), filter is h ml If the filter order is K and the number of Y(n) data points is N, then the output of each filter unit in the low-cutoff filter bank is: Y fout (n)=Y Q (n)n=0,1,…,N / 2 Q Step 6: Output signal Y of the low-cutoff filter bank fout Perform 2 Q-P Multiplication interpolation increases the sampling rate to the level of X. fout With the same sampling rate, the output signal Y out If P = Q, then no interpolation is needed. Step 7: Signal X out With Y out Enter the subtractor to perform the subtraction operation, i.e., X out -Y out The output signal is Z, and the sampling frequency is F. s / 2 P ; Step 8: Signal Z enters the sampling rate converter, and the sampling frequency F is changed. s / 2 P Convert to the desired output signal sampling rate F s1 The sampling rate is converted into interpolation, and the bandwidth of the output signal of the digital audio filtering system is [FL FH].