Filter design method, filter, and program
The filter design method expresses the transfer function as a rational polynomial to simplify calculations and facilitate the design of filters with abrupt characteristics, addressing the complexity issues in existing methods.
Patent Information
- Application Number
- JP2023182469
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-05-09
AI Technical Summary
Existing filter design methods, such as those described in Patent Documents 1 and 2, face complications in frequency conversion, especially for high-order filters, and require complex calculations including atan operations, making it difficult to design filters with abrupt characteristics.
The proposed filter design method expresses the transfer function of an analog low-pass filter as a rational polynomial, allowing for easy determination of gain, zero points, and poles, and facilitates frequency conversion and bilinear conversion with simplified calculations.
This method enables the easy design of filters with high-order steep characteristics and simplifies the calculation process, allowing for the creation of digital filters with abrupt characteristics by prewarping and bilinear conversion.
Smart Images

Figure 2025071995000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for designing a filter for adjusting the frequency characteristics of an audio signal, and to the filter. [Background technology]
[0002] In some cases, the frequency characteristics of an electrical audio signal are adjusted according to the purpose. For example, if you want to suppress low frequencies and emphasize high frequencies, you can adjust the frequency characteristics by applying a high-pass filter. Conversely, if you want to suppress high frequencies and emphasize low frequencies, you can adjust the frequency characteristics by applying a low-pass filter. In this way, the audio signal is adjusted to have a desired frequency characteristic by passing it through a predetermined filter.
[0003] There are analog filters and digital filters, each of which has its own unique transfer function. In designing analog filters, a common method is to first design a normalized low-pass filter, and then obtain the transfer functions of various filters by frequency converting the transfer function.
[0004] In addition, in designing digital filters, there is a method of obtaining the transfer function of a digital filter by performing a bilinear transformation on the transfer function of an analog filter. Once the transfer function of a digital filter is obtained, the filter coefficients can be calculated to implement the digital filter in an arithmetic circuit.
[0005] As an example of conventional technology, Patent Document 1 describes that a high-pass filter, a band-pass filter, and a band-elimination filter can be derived by frequency converting a basic low-pass filter. However, since frequency conversion processing involves very complicated calculations, Patent Document 1 discloses a method for simply designing an FIR digital filter by extracting real terms by performing an inverse Fourier transform, rearranging the numeric sequence, and multiplying it by a window function.
[0006] Furthermore, Patent Document 2 discloses a technology relating to a method for designing a digital filter, in which a target analog high-pass shelving filter is designed, its transfer function is subjected to a bilinear transformation, and then a so-called pre-warping process is performed to obtain the transfer function of a digital filter. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] JP 2003-168958 A [Patent Document 2] JP 2005-348315 A Summary of the Invention [Problem to be solved by the invention]
[0008] However, as described in Patent Document 1, when a normalized low-pass filter is frequency-converted, there is a problem that the calculations become complicated, particularly in the case of a low-pass filter with a large order. For example, the transfer function of a second-order normalized low-pass filter can be expressed as follows:
number
[0009] The transfer function of not only low-pass filters but also high-pass filters, band-pass filters, and band elimination filters has a denominator of s as shown in the above formula. 2 +(1 / Q)s+1. Now, if we factorize the denominator in the transfer function of the above second-order low-pass filter, we can express it as follows. In the second-order case, P is a complex number that satisfies |P|=1, and P(-) is the complex conjugate of P.
number
[0010] This is also true for Nth-order filters. The denominator is a polynomial according to the order, and can be expressed as multiple multiplications by factorizing it. In other words, it is in the form of multiple first-order low-pass filters superimposed on top of each other. However, to perform frequency conversion based on this, it is necessary to perform frequency conversion for each term, which causes a problem of complicated calculations.
[0011] In Patent Document 1, a method is adopted in which, without performing such a frequency transformation, a function of a target frequency characteristic is subjected to an inverse Fourier transform to extract real terms, and the numerical sequence is rearranged and multiplied by a window function. However, the technique of Patent Document 1 has a problem in that although it allows for the simple design of digital filters, it cannot be applied to the design of analog filters.
[0012] Moreover, in Patent Document 2, the transfer function of a digital filter is calculated by performing a bilinear transformation on the transfer function of an analog filter. In general, to convert a transfer function in the s domain into a transfer function in the z domain, the following relational expression called z-transform is used.
number
[0013] Here, e sT If we transform this into an equation to find s, we can approximate it to get the following:
number
[0014] To correct this error, a process called prewarping is performed, which converts the cutoff frequencies of the analog filter and the digital filter to the correct frequencies. The numerator and denominator of the bilinear transformation are z (-1 / 2) Multiplying by
number
number
[0015] The technique of Patent Document 2 also requires the calculation of atan, which is problematic in that the calculation is not easy.
[0016] The present invention has been made in consideration of the above-mentioned problems, and an object of the present invention is to provide a filter design method that can easily design a filter having steep characteristics. Another object of the present invention is to provide a filter having steep characteristics that can be designed by simple calculations, and a program for the same. [Means for solving the problem]
[0017] The means adopted by the present inventors to solve the above problems will be described below. The filter design method of the present invention is a filter design method for obtaining a predetermined filter by frequency converting the transfer function of an analog low-pass filter. The present invention includes a step of designing an analog low-pass filter using a transfer function that is a function of s and can be expressed as a rational polynomial, where j is an imaginary unit, ω is an angular frequency, and s is jω.
[0018] As mentioned above, in general, in an Nth-order filter, when the denominator, which is a polynomial according to the order, is factorized, it takes the form of multiple first-order low-pass filters superimposed on top of each other. To perform frequency conversion based on this, it is necessary to perform frequency conversion for each term. In contrast, in the present invention, the numerator is expressed by a polynomial of the same degree as the denominator, and the entire transfer function is in the form of a rational polynomial. By expanding it as a rational polynomial, the gain, zeros, and poles can be easily found.
[0019] For example, general-purpose technical calculation programs provide functions that allow you to design filters by specifying the gain, zeros, and poles. Therefore, by specifying these three values, you can easily design an analog filter with a small number of calculations.
[0020] As another means adopted by the present invention to solve the above-mentioned problems, in the above configuration, when the transfer function of the low-pass filter is defined as a filter order N, a gain α, a complex number P whose absolute value satisfies 1, and a complex conjugate of P(-), the following is given:
number
[0021] In the above formula, the gain is α and the example point is P N / α (1 / N) and the pole is P NIn this way, even for high-order filters, since they can be expressed as a multiplication of first-order terms, it is easy to calculate the gain, zeros, and poles, and filters can be easily designed using general-purpose technical calculation programs. Note that when the order is odd, there are terms for which P(-) does not exist.
[0022] As another means adopted by the present invention to solve the above-mentioned problems, it is possible to cause a computer to execute the filter design method having the above-mentioned configuration, thereby providing a filter design program for calculating gain, poles and zeros in a transfer function of a filter in accordance with the filter design method.
[0023] On the other hand, in the present invention, when the imaginary unit is j, the angular frequency is ω, and jω is s, it is possible to construct a filter that can be expressed as a transfer function that is a function of s and can be expressed as a rational polynomial, and it is possible to connect in series a high-pass shelving filter and a bathtub filter that have been frequency converted from the above filter.
[0024] A low-order high-pass shelving filter has a gentle filter characteristic. For example, if you try to use the flat part of the high frequency range, you have no choice but to lower the cutoff frequency. Therefore, it may not be suitable for applications where you do not want to affect the audible range. Therefore, a bathtub filter is added to this high-pass shelving filter. A bathtub filter is a band elimination filter that has a shelving characteristic.
[0025] By adding a bathtub filter to a high-pass shelving filter, the characteristics can be made flat up to the cutoff frequency. Therefore, the cutoff frequency can be set to a higher value. In other words, the cutoff frequency can be brought closer to the Nyquist frequency, so the audible band can be widened even at a low sampling frequency. Effect of the Invention
[0026] As described above, the present invention has the advantage that a filter having high-order steep characteristics can be easily designed by calculating the transfer function in the form of a rational polynomial in an analog filter. [Brief description of the drawings]
[0027] [Figure 1] 1 is a flowchart showing a procedure for designing a digital filter using a filter design method of the present invention. [Diagram 2] 1 is a graph showing frequency characteristics of an example of a low-pass shelving filter designed by a filter design method of the present invention. [Diagram 3] 1 is a graph showing frequency characteristics of an example of a high-pass shelving filter designed by a filter design method of the present invention. [Figure 4] 1 is a graph showing frequency characteristics of an example of a bathtub filter designed by the filter design method of the present invention. [Diagram 5] 1 is a graph showing frequency characteristics of an example of a filter that combines a bathtub filter with a high-pass shelving filter designed by the filter design method of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. The graphs shown in the drawings show the characteristics in a schematic manner.
[0029] The filter design method of the present invention can obtain a desired filter by frequency converting the transfer function of an analog low-pass filter. Using a filter designed using this method, a digital filter can be easily designed from an analog filter.
[0030] FIG. 1 shows a procedure for designing a digital filter using the filter design method of the present invention. In the procedure of Figure 1, first, a normalized analog low-pass filter is designed. At this time, the order and the coefficients of the transfer function are adjusted to obtain any desired characteristics. For example, a filter with shelving characteristics can be created. Next, a frequency conversion is performed to obtain any desired analog filter. If the original low-pass filter is a shelving filter, the filter after frequency conversion will also be a shelving filter. Next, pre-warping is performed to convert to a specified frequency according to possible errors. Then, a bilinear transformation is performed to obtain the transfer function of a digital filter.
[0031] 『S1: Analog Low-Pass Filter Design』 The transfer function of an analog filter can generally be expressed as a function of s (=jω). For example, the transfer function H(s) of each quadratic normalized filter is expressed as follows. Note that Q is the selectivity and is a coefficient that indicates the sharpness of the filter.
number
number
number
number
[0032] Here, looking at the denominator of each of the above transfer functions, s 2 +(1 / Q)s+1. For example, by factorizing the denominator in the transfer function of a second-order low-pass filter, it can be expressed as in Equation 2, as described above. However, as described above, in this format, in the case of a high-order filter with a large N, it is necessary to perform frequency conversion for each term, which causes a problem of complicated calculations.
[0033] Therefore, the numerator is expressed as a polynomial of the same degree as the denominator, and the entire transfer function is in the form of a rational polynomial. For example, the transfer function of a second-order low-pass filter can be expressed as follows:
number
[0034] If we express this as an Nth order equation, we get the following:
number
[0035] In the above formula, the gain is α and the example point is P N / α (1 / N) and the pole is P N It can be expressed as follows. Note that when the degree is odd, there are terms for which P(-) does not exist. As shown above, by expanding it as a rational polynomial, the gain, zeros, and poles can be easily found. General-purpose technical calculation programs provide functions that allow you to design a filter by specifying the three values: gain, zeros, and poles. Therefore, by specifying the above three values, you can easily design a filter using a general-purpose technical calculation program.
[0036] Using equation (12), one can design an analog low-pass shelving filter, for example, as shown in FIG. In equation 12, if a value other than -∞ (dB) is substituted for the gain α, it converges to α (dB) at frequency 0, and the cutoff frequency f c It becomes a filter with low-pass shelving characteristics that converges to 1 (dB) at higher frequencies than
[0037] 『S2: Frequency Conversion』 Next, the transfer function of the designed analog low-pass filter is converted into a predetermined filter by frequency conversion. In analog filters, each filter can be obtained by performing a process called frequency conversion on a low-pass filter. In other words, for s, which represents the original frequency, the transfer function p, which represents the converted frequency, can be obtained according to the following rules. Below is an example of converting a second-order low-pass filter into each second-order filter.
number
number
number
number
[0038] In this way, when designing filters, if a normalized low-pass filter is designed in advance, it can be immediately converted into various filters using frequency conversion, eliminating the need to design each filter separately. For example, by performing frequency conversion on a low-pass shelving filter having the characteristics shown in FIG. 2, it is possible to obtain a high-pass shelving filter, a notch shelving filter (hereinafter also referred to as a bathtub filter), or the like.
[0039] In the bathtub filter, the gain value is the gain α value in the high-pass shelving filter shown in Figure 3 and the cutoff frequency f c If we add the amplitude attenuation β at By adding a bathtub filter having the characteristics shown in Fig. 4 to a high-pass filter having the characteristics shown in Fig. 3, a high-pass shelving filter with steeper characteristics can be obtained, as shown in Fig. 5. The coefficients of the bathtub filter are adjusted appropriately according to the target characteristics.
[0040] "S3: Pre-warping" To convert an analog filter into a digital filter, a bilinear transform is performed, but as mentioned above, the bilinear transform is an approximation and therefore generates errors. To correct these errors, the frequency is converted in advance using a process called prewarping. Prewarping is performed using the above-mentioned relational expression (5), but there is a problem in that the calculation of atan is complicated.
[0041] So, the cutoff frequency ω a Instead, the sampling frequency f s This allows us to obtain results similar to those of conventional prewarping. That is, the conversion is performed so as to obtain the following formula.
number
[0042] Here, ω a is the original cutoff frequency, and ω is the cutoff frequency of the digital filter. d The cutoff frequency ω in the analog filter a Since we want to make it the same as ω a =ω d In addition, T0 is the original sampling period. That is, the above formula can be expressed as follows:
number
[0043] In this way, by shifting the sampling frequency and performing the bilinear transformation, the cutoff frequency ω a can be transformed to obtain a result similar to that obtained by performing a bilinear transform. Therefore, even if the filter is of order N, the error can be corrected by simply shifting one value, the sampling frequency, making the calculation extremely simple.
[0044] 『S4: Bilinear Transformation』 Finally, a bilinear transformation is performed to convert the analog filter into a digital filter. To convert to a digital filter, the transfer function in the s domain is transformed into a transfer function in the z domain. This transformation is called the z transform, and can be expressed by the relational equation (3) mentioned above. And in the relational expression of formula 3, e sT To find s, we transform it into the equation for equation 4, which represents the bilinear transformation mentioned above, by approximation. Note that because the approximation error is corrected in advance by prewarping, the characteristics of the converted digital filter are similar to those of the original analog filter.
[0045] As described above, according to the filter design method of the present invention, even a high-order filter having steep characteristics can be designed by simple calculations. In addition, since the transfer function of the designed analog filter can be pre-warped by simple calculations, a digital filter having steep characteristics can be easily obtained by performing a bilinear transformation. [Explanation of symbols]
[0046] Alpha Gain β Amplitude attenuation at fc f c Cutoff Frequency
Claims
1. A method for designing a filter to obtain a predetermined filter by frequency converting the transfer function of an analog low-pass filter, comprising the steps of: A method for designing a filter, comprising the steps of: designing an analog low-pass filter using a transfer function that is a function of s and can be expressed as a rational polynomial, where j is an imaginary unit, ω is an angular frequency, and s is jω.
2. The transfer function of the low-pass filter is expressed as follows, where N is the filter order, α is the gain, P is a complex number whose absolute value satisfies 1, and P(-) is the complex conjugate of P. [0010] 2. The method for designing a filter according to claim 1, characterized in that it is expressed by:
3. 3. A filter design program, which, when executed by a computer, calculates gain, poles and zeros in a transfer function of a filter according to the filter design method of claim 1 or 2.
4. In analog filters, A filter characterized in that it can be expressed as a transfer function that is a function of s and can be expressed as a rational polynomial, where j is an imaginary unit, ω is an angular frequency, and s is jω.
5. The transfer function of the filter is expressed as follows, where N is the filter order, α is the gain, P is a complex number whose absolute value satisfies 1, and P(-) is the complex conjugate of P. [0025] 5. The filter according to claim 4, characterized in that:
6. A filter comprising a high-pass shelving filter and a bathtub filter, the high-pass shelving filter being frequency-converted from the filter according to claim 4 or 5, connected in series.
7. A program that, when executed by a computer, causes the computer to function as the filter according to claim 4 or 5.
Citation Information
Patent Citations
Digital filter, method, apparatus and program for designing the same
JP2003168958A
Digital filter, its design system and method
JP2005348315A